summaryrefslogtreecommitdiffstats
path: root/patches
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2018-05-25 23:29:36 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 15:18:32 -0700
commit8ff4f2f51a6cf07fc33742ce3bee81328896e49b (patch)
tree4a166b8389404be98a6c098babaa444e2dec8f48 /patches
parent76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 (diff)
downloadcurrent-8ff4f2f51a6cf07fc33742ce3bee81328896e49b.tar.gz
current-8ff4f2f51a6cf07fc33742ce3bee81328896e49b.tar.xz
Fri May 25 23:29:36 UTC 201814.1
patches/packages/glibc-zoneinfo-2018e-noarch-2_slack14.1.txz: Rebuilt. Handle removal of US/Pacific-New timezone. If we see that the machine is using this, it will be automatically switched to US/Pacific.
Diffstat (limited to 'patches')
-rw-r--r--patches/packages/MPlayer-1.2_20160125-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/apr-1.5.0-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/apr-util-1.5.3-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/bash-4.2.053-x86_64-2_slack14.1.txt11
-rw-r--r--patches/packages/bind-9.9.11_P1-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/blueman-r708-x86_64-4_slack14.1.txt11
-rw-r--r--patches/packages/bluez-4.99-x86_64-4_slack14.1.txt11
-rw-r--r--patches/packages/btrfs-progs-20150213-x86_64-1.txt11
-rw-r--r--patches/packages/ca-certificates-20161130-noarch-1_slack14.1.txt11
-rw-r--r--patches/packages/cairo-1.12.16-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/cups-1.5.4-x86_64-4_slack14.1.txt11
-rw-r--r--patches/packages/curl-7.60.0-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/dhcp-4.4.1-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/dhcpcd-6.0.5-x86_64-3_slack14.1.txt11
-rw-r--r--patches/packages/dnsmasq-2.78-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/emacs-25.3-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/expat-2.2.2-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/flac-1.3.1-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/freetype-2.5.5-x86_64-2_slack14.1.txt11
-rw-r--r--patches/packages/gdk-pixbuf2-2.28.2-x86_64-2_slack14.1.txt11
-rw-r--r--patches/packages/gegl-0.2.0-x86_64-3_slack14.1.txt11
-rw-r--r--patches/packages/gimp-2.8.18-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/git-2.14.1-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/glibc-2.17-x86_64-11_slack14.1.txt11
-rw-r--r--patches/packages/glibc-i18n-2.17-x86_64-11_slack14.1.txt11
-rw-r--r--patches/packages/glibc-profile-2.17-x86_64-11_slack14.1.txt11
-rw-r--r--patches/packages/glibc-solibs-2.17-x86_64-11_slack14.1.txt11
-rw-r--r--patches/packages/glibc-zoneinfo-2018e-noarch-2_slack14.1.txt11
-rw-r--r--patches/packages/gnupg-1.4.22-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/gnupg2-2.0.24-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/gnutls-3.3.26-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/grub-2.00-x86_64-3_slack14.1.txt11
-rw-r--r--patches/packages/gtk+2-2.24.20-x86_64-2_slack14.1.txt11
-rw-r--r--patches/packages/httpd-2.4.29-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/imagemagick-6.8.6_10-x86_64-3_slack14.1.txt11
-rw-r--r--patches/packages/inputproto-2.3.2-noarch-1_slack14.1.txt11
-rw-r--r--patches/packages/irssi-1.0.7-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/jasper-1.900.1-x86_64-4_slack14.1.txt11
-rw-r--r--patches/packages/kdelibs-4.10.5-x86_64-3_slack14.1.txt11
-rw-r--r--patches/packages/libX11-1.6.4-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/libXcursor-1.1.15-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/libXext-1.3.3-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/libXfixes-5.0.3-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/libXfont-1.4.7-x86_64-2_slack14.1.txt11
-rw-r--r--patches/packages/libXi-1.7.8-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/libXrandr-1.5.1-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/libXrender-0.9.10-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/libXres-1.2.0-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/libXtst-1.2.3-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/libXv-1.0.11-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/libXvMC-1.0.10-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/libarchive-3.2.1-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/libevent-2.0.22-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/libgcrypt-1.5.6-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/libidn-1.34-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/libiodbc-3.52.8-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/libjpeg-v8a-x86_64-2_slack14.1.txt11
-rw-r--r--patches/packages/libpcap-1.8.1-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/libpng-1.4.20-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/libsndfile-1.0.26-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/libsoup-2.42.2-x86_64-2_slack14.1.txt11
-rw-r--r--patches/packages/libssh-0.7.3-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/libtasn1-3.6-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/libvorbis-1.3.6-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/libwmf-0.2.8.4-x86_64-6_slack14.1.txt11
-rw-r--r--patches/packages/libxcb-1.11.1-x86_64-2_slack14.1.txt11
-rw-r--r--patches/packages/libxml2-2.9.5-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/libxslt-1.1.29-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/libyaml-0.1.6-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/linux-3.10.107/kernel-generic-3.10.107-x86_64-2.txt11
-rw-r--r--patches/packages/linux-3.10.107/kernel-headers-3.10.107-x86-2.txt11
-rw-r--r--patches/packages/linux-3.10.107/kernel-huge-3.10.107-x86_64-2.txt11
-rw-r--r--patches/packages/linux-3.10.107/kernel-modules-3.10.107-x86_64-2.txt11
-rw-r--r--patches/packages/linux-3.10.107/kernel-source-3.10.107-noarch-2.txt11
-rw-r--r--patches/packages/llvm-3.3-x86_64-3_slack14.1.txt11
-rw-r--r--patches/packages/loudmouth-1.5.3-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/lynx-2.8.8rel.2-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/mailx-12.5-x86_64-2_slack14.1.txt11
-rw-r--r--patches/packages/mariadb-5.5.60-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/mcabber-1.0.5-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/mercurial-4.3.1-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/minicom-2.7.1-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/mkinitrd-1.4.10-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/mozilla-firefox-45.9.0esr-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/mozilla-nss-3.31.1-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/mozilla-thunderbird-45.8.0-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/mutt-1.5.23-x86_64-2_slack14.1.txt11
-rw-r--r--patches/packages/ntp-4.2.8p11-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/openssh-7.4p1-x86_64-2_slack14.1.txt11
-rw-r--r--patches/packages/openssl-1.0.1u-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/openssl-solibs-1.0.1u-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/openvpn-2.4.6-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/patch-2.7.6-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/pcre-8.39-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/php-5.6.36-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/pidgin-2.12.0-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/ppp-2.4.5-x86_64-3_slack14.1.txt11
-rw-r--r--patches/packages/proftpd-1.3.5e-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/python-2.7.15-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/qt-4.8.7-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/randrproto-1.5.0-noarch-1_slack14.1.txt11
-rw-r--r--patches/packages/rsync-3.1.3-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/ruby-1.9.3_p484-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/rxvt-2.7.10-x86_64-5_slack14.1.txt11
-rw-r--r--patches/packages/samba-4.4.16-x86_64-3_slack14.1.txt11
-rw-r--r--patches/packages/seamonkey-2.46-x86_64-3_slack14.1.txt11
-rw-r--r--patches/packages/seamonkey-solibs-2.46-x86_64-3_slack14.1.txt11
-rw-r--r--patches/packages/sendmail-8.14.9-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/sendmail-cf-8.14.9-noarch-1_slack14.1.txt11
-rw-r--r--patches/packages/shadow-4.1.5.1-x86_64-3_slack14.1.txt11
-rw-r--r--patches/packages/stunnel-5.35-x86_64-2_slack14.1.txt11
-rw-r--r--patches/packages/subversion-1.7.22-x86_64-3_slack14.1.txt11
-rw-r--r--patches/packages/sudo-1.8.20p2-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/tcpdump-4.9.2-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/udisks-1.0.5-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/udisks2-2.1.3-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/vim-7.4.399-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/vim-gvim-7.4.399-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/wget-1.19.5-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/wpa_supplicant-2.6-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/xcb-proto-1.11-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/xextproto-7.3.0-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/xfce4-weather-plugin-0.8.10-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/xorg-server-1.14.3-x86_64-6_slack14.1.txt11
-rw-r--r--patches/packages/xorg-server-xephyr-1.14.3-x86_64-6_slack14.1.txt11
-rw-r--r--patches/packages/xorg-server-xnest-1.14.3-x86_64-6_slack14.1.txt11
-rw-r--r--patches/packages/xorg-server-xvfb-1.14.3-x86_64-6_slack14.1.txt11
-rw-r--r--patches/packages/xproto-7.0.29-noarch-1_slack14.1.txt11
-rw-r--r--patches/packages/xscreensaver-5.38-x86_64-1_slack14.1.txt11
-rw-r--r--patches/packages/yptools-2.14-x86_64-3_slack14.1.txt11
-rwxr-xr-xpatches/source/MPlayer/MPlayer.SlackBuild488
-rw-r--r--patches/source/MPlayer/slack-desc20
-rwxr-xr-xpatches/source/apr-util/apr-util.SlackBuild124
-rw-r--r--patches/source/apr-util/apr-util.url2
-rw-r--r--patches/source/apr-util/slack-desc19
-rwxr-xr-xpatches/source/apr/apr.SlackBuild110
-rw-r--r--patches/source/apr/apr.url2
-rw-r--r--patches/source/apr/slack-desc19
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-00178
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-00260
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-003318
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-00453
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-005131
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-00646
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-00746
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-00874
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-00982
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-01061
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-01146
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-012151
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-01352
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-01447
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-01581
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-01646
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-01747
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-01874
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-01947
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-02060
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-02161
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-02261
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-02362
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-02445
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-025143
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-02658
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-02747
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-02852
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-029524
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-030178
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-03180
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-03275
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-03357
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-03446
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-03566
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-03692
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-037112
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-03847
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-03958
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-04056
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-04147
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-04257
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-04365
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-04470
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-04553
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-04655
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-04749
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-048104
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-04943
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-050217
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-051173
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-05259
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-053132
-rw-r--r--patches/source/bash/bash.CVE-2016-0634.bash43-047150
-rw-r--r--patches/source/bash/bash.CVE-2016-7543.bash43-04854
-rwxr-xr-xpatches/source/bash/bash.SlackBuild173
-rw-r--r--patches/source/bash/doinst.sh18
-rw-r--r--patches/source/bash/slack-desc19
-rw-r--r--patches/source/bind/3link.sh136
-rwxr-xr-xpatches/source/bind/bind.SlackBuild166
-rw-r--r--patches/source/bind/bind.so_bsdcompat.diff11
-rw-r--r--patches/source/bind/caching-example/localhost.zone11
-rw-r--r--patches/source/bind/caching-example/named.conf31
-rw-r--r--patches/source/bind/caching-example/named.local10
-rw-r--r--patches/source/bind/caching-example/named.root90
-rw-r--r--patches/source/bind/doinst.sh36
-rw-r--r--patches/source/bind/rc.bind112
-rw-r--r--patches/source/bind/slack-desc19
-rw-r--r--patches/source/blueman/blueman-open114
-rw-r--r--patches/source/blueman/blueman-use_blueman-open_for_obexfs.diff12
-rw-r--r--patches/source/blueman/blueman.CVE-2015-8612.diff21
-rwxr-xr-xpatches/source/blueman/blueman.SlackBuild134
-rw-r--r--patches/source/blueman/doinst.sh23
-rw-r--r--patches/source/blueman/slack-desc19
-rw-r--r--patches/source/bluez/bluez-4.99.tar.sign17
-rw-r--r--patches/source/bluez/bluez-run_udev_helper.patch14
-rw-r--r--patches/source/bluez/bluez.CVE-2017-1000251.diff27
-rwxr-xr-xpatches/source/bluez/bluez.SlackBuild196
-rw-r--r--patches/source/bluez/bluez.enable.audio.socket.diff12
-rw-r--r--patches/source/bluez/config/bluetooth.modprobe3
-rw-r--r--patches/source/bluez/config/bluetooth.sh7
-rw-r--r--patches/source/bluez/config/rc.bluetooth29
-rw-r--r--patches/source/bluez/doinst.sh28
-rw-r--r--patches/source/bluez/slack-desc19
-rwxr-xr-xpatches/source/btrfs-progs/btrfs-progs.SlackBuild127
-rw-r--r--patches/source/btrfs-progs/slack-desc19
-rwxr-xr-xpatches/source/ca-certificates/ca-certificates.SlackBuild91
-rw-r--r--patches/source/ca-certificates/doinst.sh19
-rw-r--r--patches/source/ca-certificates/patches/fixup_DESTDIR.diff49
-rw-r--r--patches/source/ca-certificates/patches/fixup_update-ca-certificates.diff12
-rw-r--r--patches/source/ca-certificates/setup.11.cacerts3
-rw-r--r--patches/source/ca-certificates/slack-desc19
-rwxr-xr-xpatches/source/cairo/cairo.SlackBuild132
-rwxr-xr-xpatches/source/cairo/paredown.sh51
-rw-r--r--patches/source/cairo/slack-desc20
-rw-r--r--patches/source/cups/cups-1.5.4-usb-quirks.diff319
-rw-r--r--patches/source/cups/cups-blacklist-usblp.conf10
-rwxr-xr-xpatches/source/cups/cups.SlackBuild203
-rw-r--r--patches/source/cups/cups.url1
-rw-r--r--patches/source/cups/doinst.sh34
-rw-r--r--patches/source/cups/slack-desc19
-rw-r--r--patches/source/cups/str4609-1.5.patch341
-rwxr-xr-xpatches/source/curl/cacert-fetch.sh1
-rw-r--r--patches/source/curl/cacert.pem3338
-rwxr-xr-xpatches/source/curl/curl.SlackBuild152
-rw-r--r--patches/source/curl/slack-desc19
-rw-r--r--patches/source/dhcp/dhclient-script.PATH.diff13
-rwxr-xr-xpatches/source/dhcp/dhcp-remove-bind-tarball.sh49
-rwxr-xr-xpatches/source/dhcp/dhcp.SlackBuild179
-rw-r--r--patches/source/dhcp/doinst.sh21
-rw-r--r--patches/source/dhcp/slack-desc19
-rw-r--r--patches/source/dhcpcd/COPYRIGHT26
-rwxr-xr-xpatches/source/dhcpcd/dhcpcd.SlackBuild133
-rw-r--r--patches/source/dhcpcd/doinst.sh15
-rw-r--r--patches/source/dhcpcd/patches/Actually-validate-the-search-list.patch25
-rw-r--r--patches/source/dhcpcd/patches/dhcpcd.conf-Don-t-invoke-wpa_supplicant-by-default.patch26
-rw-r--r--patches/source/dhcpcd/patches/dhcpcd.dho_optionsoverloaded.dos.patch11
-rw-r--r--patches/source/dhcpcd/slack-desc19
-rwxr-xr-xpatches/source/dnsmasq/dnsmasq.SlackBuild107
-rw-r--r--patches/source/dnsmasq/dnsmasq.leasedir.diff24
-rw-r--r--patches/source/dnsmasq/doinst.sh26
-rw-r--r--patches/source/dnsmasq/rc.dnsmasq36
-rw-r--r--patches/source/dnsmasq/slack-desc19
-rw-r--r--patches/source/emacs/doinst.sh10
-rwxr-xr-xpatches/source/emacs/emacs.SlackBuild190
-rw-r--r--patches/source/emacs/slack-desc12
-rwxr-xr-xpatches/source/expat/expat.SlackBuild101
-rw-r--r--patches/source/expat/slack-desc19
-rwxr-xr-xpatches/source/flac/flac.SlackBuild124
-rw-r--r--patches/source/flac/flac.man.diff12
-rw-r--r--patches/source/flac/slack-desc19
-rw-r--r--patches/source/freetype/freetype.CVE-2017-8287.diff31
-rwxr-xr-xpatches/source/freetype/freetype.SlackBuild123
-rw-r--r--patches/source/freetype/freetype.illadvisederror.diff31
-rw-r--r--patches/source/freetype/freetype.subpixel.rendering.diff11
-rw-r--r--patches/source/freetype/slack-desc19
-rw-r--r--patches/source/gdk-pixbuf2/doinst.sh1
-rw-r--r--patches/source/gdk-pixbuf2/gdk-pixbuf.CVE-2015-4491.diff64
-rw-r--r--patches/source/gdk-pixbuf2/gdk-pixbuf.pnglz.diff12
-rwxr-xr-xpatches/source/gdk-pixbuf2/gdk-pixbuf2.SlackBuild153
-rw-r--r--patches/source/gdk-pixbuf2/slack-desc19
-rw-r--r--patches/source/gdk-pixbuf2/update-gdk-pixbuf-loaders60
-rw-r--r--patches/source/gegl/0001-matting-levin-Fix-the-build-with-recent-suitesparse-.patch68
-rw-r--r--patches/source/gegl/gegl-0.2.0-CVE-2012-4433.patch159
-rw-r--r--patches/source/gegl/gegl-0.2.0-libopenraw.patch71
-rw-r--r--patches/source/gegl/gegl-0.2.0-linker-flags.patch36
-rw-r--r--patches/source/gegl/gegl-0.2.0-lua-5.2.patch53
-rw-r--r--patches/source/gegl/gegl-0.2.0-remove-src-over-op.patch195
-rwxr-xr-xpatches/source/gegl/gegl.SlackBuild116
-rw-r--r--patches/source/gegl/slack-desc19
-rwxr-xr-xpatches/source/gimp/gimp.SlackBuild135
-rw-r--r--patches/source/gimp/slack-desc19
-rw-r--r--patches/source/git/git-2.14.1.tar.signbin0 -> 543 bytes
-rwxr-xr-xpatches/source/git/git.SlackBuild170
-rw-r--r--patches/source/git/git.url1
-rw-r--r--patches/source/git/slack-desc19
-rw-r--r--patches/source/glibc-zoneinfo/doinst.sh57
-rwxr-xr-xpatches/source/glibc-zoneinfo/glibc-zoneinfo.SlackBuild147
-rw-r--r--patches/source/glibc-zoneinfo/slack-desc19
-rwxr-xr-xpatches/source/glibc-zoneinfo/timezone-scripts/output-updated-timeconfig.sh60
-rw-r--r--patches/source/glibc-zoneinfo/timezone-scripts/parts/00132
-rw-r--r--patches/source/glibc-zoneinfo/timezone-scripts/parts/01585
-rw-r--r--patches/source/glibc-zoneinfo/timezone-scripts/parts/0228
-rw-r--r--patches/source/glibc-zoneinfo/timezone-scripts/parts/03585
-rw-r--r--patches/source/glibc-zoneinfo/timezone-scripts/parts/0433
-rw-r--r--patches/source/glibc-zoneinfo/timezone-scripts/parts/README2
-rw-r--r--patches/source/glibc-zoneinfo/timezone-scripts/setup.timeconfig3
-rw-r--r--patches/source/glibc-zoneinfo/timezone-scripts/timeconfig1363
-rw-r--r--patches/source/glibc/doinst.sh-glibc197
-rw-r--r--patches/source/glibc/doinst.sh-glibc-solibs137
-rw-r--r--patches/source/glibc/doinst.sh-glibc-zoneinfo17
-rw-r--r--patches/source/glibc/glibc-2.10-dns-no-gethostbyname4.diff26
-rw-r--r--patches/source/glibc/glibc-2.17_CVE-2012-4412.diff116
-rw-r--r--patches/source/glibc/glibc-2.17_CVE-2012-4424.diff400
-rw-r--r--patches/source/glibc/glibc-2.17_CVE-2013-2207.diff241
-rw-r--r--patches/source/glibc/glibc-2.17_CVE-2013-4237.diff286
-rw-r--r--patches/source/glibc/glibc-2.17_CVE-2013-4332.diff64
-rw-r--r--patches/source/glibc/glibc-2.17_CVE-2013-4458.diff52
-rw-r--r--patches/source/glibc/glibc-2.17_CVE-2013-4788.diff460
-rw-r--r--patches/source/glibc/glibc-2.17_CVE-2014-0475.diff404
-rw-r--r--patches/source/glibc/glibc-2.17_CVE-2014-4043.diff142
-rw-r--r--patches/source/glibc/glibc-2.17_CVE-2014-5119.diff206
-rw-r--r--patches/source/glibc/glibc-2.17_CVE-2014-6040.diff153
-rw-r--r--patches/source/glibc/glibc-2.17_CVE-2015-7547.diff571
-rw-r--r--patches/source/glibc/glibc-2.17_gcc48-unsafe-optim.diff49
-rw-r--r--patches/source/glibc/glibc-2.17_hardening.diff33
-rw-r--r--patches/source/glibc/glibc-2.17_strcoll-change.diff802
-rwxr-xr-xpatches/source/glibc/glibc-cvs-checkout.sh3
-rw-r--r--patches/source/glibc/glibc.CVE-2013-0242.diff189
-rw-r--r--patches/source/glibc/glibc.CVE-2013-1914.diff53
-rw-r--r--patches/source/glibc/glibc.CVE-2013-2207.diff241
-rw-r--r--patches/source/glibc/glibc.CVE-2013-4332.diff64
-rw-r--r--patches/source/glibc/glibc.CVE-2015-0235.glibc217.diff217
-rwxr-xr-xpatches/source/glibc/glibc.SlackBuild536
-rw-r--r--patches/source/glibc/glibc.disable.broken.optimized.memcpy.diff30
-rw-r--r--patches/source/glibc/glibc.getcwd.max.macro.diff10
-rw-r--r--patches/source/glibc/glibc.git-4a531bb0b3b582cb693de9f76d2d97d970f9a5d5.patch1212
-rw-r--r--patches/source/glibc/glibc.git-96611391ad8823ba58405325d78cefeae5cdf699-CVE-2010-3847b.patch27
-rw-r--r--patches/source/glibc/glibc.ldd.trace.through.dynamic.linker.diff49
-rw-r--r--patches/source/glibc/glibc.locale.no-archive.diff10
-rw-r--r--patches/source/glibc/glibc.make-3.82.diff28
-rw-r--r--patches/source/glibc/glibc.nis-netgroups.diff12
-rw-r--r--patches/source/glibc/glibc.revert.to.fix.build.breakages.diff13
-rw-r--r--patches/source/glibc/glibc.ru_RU.CP1251.diff10
-rw-r--r--patches/source/glibc/is_IS.diff19
-rwxr-xr-xpatches/source/glibc/profile.d/glibc.csh.new9
-rwxr-xr-xpatches/source/glibc/profile.d/glibc.sh.new8
-rw-r--r--patches/source/glibc/slack-desc.glibc19
-rw-r--r--patches/source/glibc/slack-desc.glibc-debug19
-rw-r--r--patches/source/glibc/slack-desc.glibc-i18n19
-rw-r--r--patches/source/glibc/slack-desc.glibc-profile19
-rw-r--r--patches/source/glibc/slack-desc.glibc-solibs19
-rw-r--r--patches/source/glibc/slack-desc.glibc-solibs-linuxthreads18
-rw-r--r--patches/source/glibc/slack-desc.glibc-zoneinfo19
-rw-r--r--patches/source/glibc/slack-desc.glibc-zoneinfo.olson19
-rw-r--r--patches/source/glibc/timezone-scripts/output-updated-timeconfig.sh53
-rw-r--r--patches/source/glibc/timezone-scripts/parts/00131
-rw-r--r--patches/source/glibc/timezone-scripts/parts/011658
-rw-r--r--patches/source/glibc/timezone-scripts/parts/0228
-rw-r--r--patches/source/glibc/timezone-scripts/parts/031658
-rw-r--r--patches/source/glibc/timezone-scripts/parts/0432
-rw-r--r--patches/source/glibc/timezone-scripts/parts/README2
-rw-r--r--patches/source/glibc/timezone-scripts/setup.timeconfig3
-rw-r--r--patches/source/glibc/timezone-scripts/timeconfig3695
-rwxr-xr-xpatches/source/gnupg/gnupg.SlackBuild115
-rw-r--r--patches/source/gnupg/slack-desc.gnupg19
-rwxr-xr-xpatches/source/gnupg2/gnupg2.SlackBuild163
-rw-r--r--patches/source/gnupg2/slack-desc19
-rwxr-xr-xpatches/source/gnutls/gnutls.SlackBuild150
-rw-r--r--patches/source/gnutls/slack-desc19
-rw-r--r--patches/source/grub/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch45
-rw-r--r--patches/source/grub/doinst.sh16
-rw-r--r--patches/source/grub/etc.default.grub28
-rwxr-xr-xpatches/source/grub/grub.SlackBuild195
-rw-r--r--patches/source/grub/grub.dejavusansmono.gfxterm.font.diff43
-rw-r--r--patches/source/grub/grub.e75fdee420a7ad95e9a465c9699adc2e2e970440.terminate.efi.several.times.diff75
-rw-r--r--patches/source/grub/initrd_naming.patch13
-rw-r--r--patches/source/grub/slack-desc19
-rw-r--r--patches/source/grub/txtHRnXiHYUrM.txt49
-rw-r--r--patches/source/gtk+2/doinst.sh28
-rw-r--r--patches/source/gtk+2/fix_build_issues_on_tutorial_and_faq.diff26
-rw-r--r--patches/source/gtk+2/gtk+-2.24.x.icon-compat.am.diff264
-rw-r--r--patches/source/gtk+2/gtk+-2.24.x.icon-compat.diff264
-rwxr-xr-xpatches/source/gtk+2/gtk+2.SlackBuild198
-rw-r--r--patches/source/gtk+2/gtk.CVE-2013-7447.diff29
-rw-r--r--patches/source/gtk+2/gtk.xid.nowarningflood.diff12
-rwxr-xr-xpatches/source/gtk+2/profile.d/gtk+.csh2
-rwxr-xr-xpatches/source/gtk+2/profile.d/gtk+.sh4
-rw-r--r--patches/source/gtk+2/slack-desc19
-rw-r--r--patches/source/gtk+2/update-gtk-immodules12
-rw-r--r--patches/source/gtk+2/update-gtk-immodules-2.048
-rw-r--r--patches/source/httpd/apache-2.4.CVE-2017-9798.optionsbleed.patch15
-rw-r--r--patches/source/httpd/doinst.sh71
-rwxr-xr-xpatches/source/httpd/httpd.SlackBuild246
-rw-r--r--patches/source/httpd/httpd.runasapache.diff13
-rw-r--r--patches/source/httpd/httpd.url2
-rw-r--r--patches/source/httpd/logrotate.httpd12
-rw-r--r--patches/source/httpd/rc.httpd44
-rw-r--r--patches/source/httpd/slack-desc19
-rw-r--r--patches/source/imagemagick/blob.c.undef.have_popen.diff10
-rwxr-xr-xpatches/source/imagemagick/imagemagick.SlackBuild183
-rw-r--r--patches/source/imagemagick/policy.xml.diff26
-rw-r--r--patches/source/imagemagick/slack-desc19
-rw-r--r--patches/source/inputproto/arch.use.flags9
-rw-r--r--patches/source/inputproto/build/inputproto1
-rw-r--r--patches/source/inputproto/configure/configure13
-rwxr-xr-xpatches/source/inputproto/inputproto.SlackBuild2
-rw-r--r--patches/source/inputproto/modularize279
-rw-r--r--patches/source/inputproto/noarch75
-rw-r--r--patches/source/inputproto/package-blacklist44
-rw-r--r--patches/source/inputproto/slack-desc/inputproto19
-rwxr-xr-xpatches/source/inputproto/x11.SlackBuild381
-rw-r--r--patches/source/irssi/doinst.sh12
-rwxr-xr-xpatches/source/irssi/irssi.SlackBuild143
-rw-r--r--patches/source/irssi/slack-desc19
-rwxr-xr-xpatches/source/jasper/jasper.SlackBuild137
-rw-r--r--patches/source/jasper/patches/jasper-1.900.1-CVE-2008-3520.patch928
-rw-r--r--patches/source/jasper/patches/jasper-1.900.1-CVE-2008-3522.patch14
-rw-r--r--patches/source/jasper/patches/jasper-1.900.1-CVE-2011-4516-CVE-2011-4517-CERT-VU-887409.patch23
-rw-r--r--patches/source/jasper/patches/jasper-1.900.1-Coverity-BAD_SIZEOF.patch17
-rw-r--r--patches/source/jasper/patches/jasper-1.900.1-Coverity-CHECKED_RETURN.patch141
-rw-r--r--patches/source/jasper/patches/jasper-1.900.1-Coverity-FORWARD_NULL.patch44
-rw-r--r--patches/source/jasper/patches/jasper-1.900.1-Coverity-NULL_RETURNS.patch61
-rw-r--r--patches/source/jasper/patches/jasper-1.900.1-Coverity-RESOURCE_LEAK.patch202
-rw-r--r--patches/source/jasper/patches/jasper-1.900.1-Coverity-UNREACHABLE.patch37
-rw-r--r--patches/source/jasper/patches/jasper-1.900.1-Coverity-UNUSED_VALUE.patch41
-rw-r--r--patches/source/jasper/patches/jasper-CVE-2014-8137.patch57
-rw-r--r--patches/source/jasper/patches/jasper-CVE-2014-8138.patch14
-rw-r--r--patches/source/jasper/patches/jasper-CVE-2014-8157.patch12
-rw-r--r--patches/source/jasper/patches/jasper-CVE-2014-8158.patch329
-rw-r--r--patches/source/jasper/patches/jasper-CVE-2014-9029.patch29
-rw-r--r--patches/source/jasper/patches/jpc_dec.c.patch18
-rw-r--r--patches/source/jasper/patches/patch-libjasper-stepsizes-overflow.diff14
-rw-r--r--patches/source/jasper/slack-desc19
-rwxr-xr-xpatches/source/kdelibs/KDE.SlackBuild532
-rw-r--r--patches/source/kdelibs/KDE.options58
-rw-r--r--patches/source/kdelibs/build/kdelibs1
-rw-r--r--patches/source/kdelibs/cmake/kdelibs17
-rw-r--r--patches/source/kdelibs/doinst.sh/kdelibs9
-rwxr-xr-xpatches/source/kdelibs/kdelibs.SlackBuild2
-rw-r--r--patches/source/kdelibs/modularize268
-rw-r--r--patches/source/kdelibs/modules/kdelibs1
-rw-r--r--patches/source/kdelibs/noarch5
-rw-r--r--patches/source/kdelibs/package-blacklist9
-rw-r--r--patches/source/kdelibs/patch/kdelibs.patch17
-rw-r--r--patches/source/kdelibs/patch/kdelibs/coding-style-fixes.patch62
-rw-r--r--patches/source/kdelibs/patch/kdelibs/kdelibs.CVE-2017-8422.diff201
-rw-r--r--patches/source/kdelibs/patch/kdelibs/kdelibs.docbook.patch11
-rw-r--r--patches/source/kdelibs/patch/kdelibs/kdelibs.upnp_conditional.patch15
-rw-r--r--patches/source/kdelibs/patch/kdelibs/return-application-icons-properly.patch56
-rw-r--r--patches/source/kdelibs/patch/kdelibs/return-not-break.-copy-paste-error.patch31
-rw-r--r--patches/source/kdelibs/post-install/kdelibs.post-install2
-rw-r--r--patches/source/kdelibs/slack-desc/kdelibs19
-rw-r--r--patches/source/libX11/arch.use.flags9
-rw-r--r--patches/source/libX11/build/libX111
-rw-r--r--patches/source/libX11/configure/libX1112
-rwxr-xr-xpatches/source/libX11/libX11.SlackBuild2
-rw-r--r--patches/source/libX11/modularize279
-rw-r--r--patches/source/libX11/noarch75
-rw-r--r--patches/source/libX11/package-blacklist44
-rw-r--r--patches/source/libX11/post-install/libX11.post-install2
-rw-r--r--patches/source/libX11/slack-desc/libX1119
-rwxr-xr-xpatches/source/libX11/x11.SlackBuild381
-rw-r--r--patches/source/libXcursor/arch.use.flags7
-rwxr-xr-xpatches/source/libXcursor/build/increment.sh17
-rw-r--r--patches/source/libXcursor/build/libXcursor1
-rw-r--r--patches/source/libXcursor/configure/configure12
-rwxr-xr-xpatches/source/libXcursor/libXcursor.SlackBuild26
-rw-r--r--patches/source/libXcursor/modularize272
-rw-r--r--patches/source/libXcursor/noarch76
-rw-r--r--patches/source/libXcursor/package-blacklist43
-rw-r--r--patches/source/libXcursor/slack-desc/libXcursor19
-rwxr-xr-xpatches/source/libXcursor/x11-build-script.sh374
-rw-r--r--patches/source/libXext/arch.use.flags9
-rw-r--r--patches/source/libXext/build/libXext1
-rw-r--r--patches/source/libXext/configure/configure13
-rwxr-xr-xpatches/source/libXext/libXext.SlackBuild2
-rw-r--r--patches/source/libXext/modularize279
-rw-r--r--patches/source/libXext/noarch75
-rw-r--r--patches/source/libXext/package-blacklist44
-rw-r--r--patches/source/libXext/slack-desc/libXext19
-rwxr-xr-xpatches/source/libXext/x11.SlackBuild381
-rw-r--r--patches/source/libXfixes/arch.use.flags9
-rw-r--r--patches/source/libXfixes/build/libXfixes1
-rw-r--r--patches/source/libXfixes/configure/configure13
-rwxr-xr-xpatches/source/libXfixes/libXfixes.SlackBuild2
-rw-r--r--patches/source/libXfixes/modularize279
-rw-r--r--patches/source/libXfixes/noarch75
-rw-r--r--patches/source/libXfixes/package-blacklist44
-rw-r--r--patches/source/libXfixes/slack-desc/libXfixes19
-rwxr-xr-xpatches/source/libXfixes/x11.SlackBuild381
-rw-r--r--patches/source/libXfont/arch.use.flags7
-rwxr-xr-xpatches/source/libXfont/build/increment.sh17
-rw-r--r--patches/source/libXfont/build/libXfont1
-rw-r--r--patches/source/libXfont/configure/configure12
-rwxr-xr-xpatches/source/libXfont/libXfont.SlackBuild26
-rw-r--r--patches/source/libXfont/modularize272
-rw-r--r--patches/source/libXfont/noarch76
-rw-r--r--patches/source/libXfont/package-blacklist43
-rw-r--r--patches/source/libXfont/patch/libXfont.patch1
-rw-r--r--patches/source/libXfont/patch/libXfont/libXfont.CVE-2017-16611.diff85
-rw-r--r--patches/source/libXfont/slack-desc/libXfont19
-rwxr-xr-xpatches/source/libXfont/x11-build-script.sh374
-rw-r--r--patches/source/libXi/arch.use.flags9
-rw-r--r--patches/source/libXi/build/libXi1
-rw-r--r--patches/source/libXi/configure/configure13
-rwxr-xr-xpatches/source/libXi/libXi.SlackBuild2
-rw-r--r--patches/source/libXi/modularize279
-rw-r--r--patches/source/libXi/noarch75
-rw-r--r--patches/source/libXi/package-blacklist44
-rw-r--r--patches/source/libXi/slack-desc/libXi19
-rw-r--r--patches/source/libXi/slack-desc/libXinerama19
-rwxr-xr-xpatches/source/libXi/x11.SlackBuild381
-rw-r--r--patches/source/libXrandr/arch.use.flags9
-rw-r--r--patches/source/libXrandr/build/libXrandr1
-rw-r--r--patches/source/libXrandr/configure/configure13
-rwxr-xr-xpatches/source/libXrandr/libXrandr.SlackBuild2
-rw-r--r--patches/source/libXrandr/modularize279
-rw-r--r--patches/source/libXrandr/noarch75
-rw-r--r--patches/source/libXrandr/package-blacklist44
-rw-r--r--patches/source/libXrandr/slack-desc/libXrandr19
-rwxr-xr-xpatches/source/libXrandr/x11.SlackBuild381
-rw-r--r--patches/source/libXrender/arch.use.flags9
-rw-r--r--patches/source/libXrender/build/libXrender1
-rw-r--r--patches/source/libXrender/configure/configure13
-rwxr-xr-xpatches/source/libXrender/libXrender.SlackBuild2
-rw-r--r--patches/source/libXrender/modularize279
-rw-r--r--patches/source/libXrender/noarch75
-rw-r--r--patches/source/libXrender/package-blacklist44
-rw-r--r--patches/source/libXrender/slack-desc/libXrender19
-rwxr-xr-xpatches/source/libXrender/x11.SlackBuild381
-rw-r--r--patches/source/libXres/arch.use.flags9
-rw-r--r--patches/source/libXres/build/libXres1
-rw-r--r--patches/source/libXres/configure/configure13
-rwxr-xr-xpatches/source/libXres/libXres.SlackBuild2
-rw-r--r--patches/source/libXres/modularize279
-rw-r--r--patches/source/libXres/noarch75
-rw-r--r--patches/source/libXres/package-blacklist44
-rw-r--r--patches/source/libXres/slack-desc/libXres19
-rwxr-xr-xpatches/source/libXres/x11.SlackBuild381
-rw-r--r--patches/source/libXtst/arch.use.flags9
-rw-r--r--patches/source/libXtst/build/libXtst1
-rw-r--r--patches/source/libXtst/configure/configure13
-rwxr-xr-xpatches/source/libXtst/libXtst.SlackBuild2
-rw-r--r--patches/source/libXtst/modularize279
-rw-r--r--patches/source/libXtst/noarch75
-rw-r--r--patches/source/libXtst/package-blacklist44
-rw-r--r--patches/source/libXtst/slack-desc/libXtst19
-rwxr-xr-xpatches/source/libXtst/x11.SlackBuild381
-rw-r--r--patches/source/libXv/arch.use.flags9
-rw-r--r--patches/source/libXv/build/libXv1
-rw-r--r--patches/source/libXv/configure/configure13
-rwxr-xr-xpatches/source/libXv/libXv.SlackBuild2
-rw-r--r--patches/source/libXv/modularize279
-rw-r--r--patches/source/libXv/noarch75
-rw-r--r--patches/source/libXv/package-blacklist44
-rw-r--r--patches/source/libXv/slack-desc/libXv19
-rw-r--r--patches/source/libXv/slack-desc/libXvMC19
-rwxr-xr-xpatches/source/libXv/x11.SlackBuild381
-rw-r--r--patches/source/libXvMC/arch.use.flags9
-rw-r--r--patches/source/libXvMC/build/libXvMC1
-rw-r--r--patches/source/libXvMC/configure/configure13
-rwxr-xr-xpatches/source/libXvMC/libXvMC.SlackBuild2
-rw-r--r--patches/source/libXvMC/modularize279
-rw-r--r--patches/source/libXvMC/noarch75
-rw-r--r--patches/source/libXvMC/package-blacklist44
-rw-r--r--patches/source/libXvMC/slack-desc/libXvMC19
-rwxr-xr-xpatches/source/libXvMC/x11.SlackBuild381
-rwxr-xr-xpatches/source/libarchive/libarchive.SlackBuild108
-rw-r--r--patches/source/libarchive/slack-desc19
-rwxr-xr-xpatches/source/libevent/libevent.SlackBuild154
-rw-r--r--patches/source/libevent/slack-desc19
-rwxr-xr-xpatches/source/libgcrypt/libgcrypt.SlackBuild124
-rw-r--r--patches/source/libgcrypt/slack-desc19
-rwxr-xr-xpatches/source/libidn/libidn.SlackBuild137
-rw-r--r--patches/source/libidn/slack-desc19
-rwxr-xr-xpatches/source/libiodbc/libiodbc.SlackBuild126
-rw-r--r--patches/source/libiodbc/libiodbc.disable.rpath.diff11
-rw-r--r--patches/source/libiodbc/slack-desc19
-rw-r--r--patches/source/libjpeg/jpeg.CVE-2013-6629.diff32
-rwxr-xr-xpatches/source/libjpeg/libjpeg.SlackBuild112
-rw-r--r--patches/source/libjpeg/slack-desc19
-rwxr-xr-xpatches/source/libpcap/libpcap.SlackBuild128
-rw-r--r--patches/source/libpcap/slack-desc19
-rwxr-xr-xpatches/source/libpng/libpng.SlackBuild134
-rw-r--r--patches/source/libpng/libpng.url1
-rw-r--r--patches/source/libpng/slack-desc19
-rwxr-xr-xpatches/source/libsndfile/libsndfile.SlackBuild106
-rw-r--r--patches/source/libsndfile/slack-desc19
-rw-r--r--patches/source/libsoup/libsoup.CVE-2017-2885.diff43
-rwxr-xr-xpatches/source/libsoup/libsoup.SlackBuild100
-rw-r--r--patches/source/libsoup/slack-desc19
-rwxr-xr-xpatches/source/libssh/libssh.SlackBuild113
-rw-r--r--patches/source/libssh/slack-desc19
-rwxr-xr-xpatches/source/libtasn1/libtasn1.SlackBuild124
-rw-r--r--patches/source/libtasn1/slack-desc19
-rwxr-xr-xpatches/source/libvorbis/libvorbis.SlackBuild102
-rw-r--r--patches/source/libvorbis/slack-desc19
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2004-0941.patch17
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2006-3376.patch27
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-0455.patch11
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-2756.patch16
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-3472.patch61
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-3473.patch13
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-3477.patch38
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2009-3546.patch13
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2015-0848+CVE-2015-4588.patch118
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2015-4695.patch56
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2015-4696.patch23
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-10167.patch30
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-10168.patch14
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-9011.patch36
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-9317.patch21
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2017-6362.patch32
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-fallbackfont.patch18
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-pixbufloaderdir.patch14
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-reducesymbols.patch520
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-useafterfree.patch10
-rwxr-xr-xpatches/source/libwmf/libwmf.SlackBuild142
-rw-r--r--patches/source/libwmf/libwmf.png14.diff11
-rw-r--r--patches/source/libwmf/slack-desc19
-rw-r--r--patches/source/libxcb/arch.use.flags9
-rw-r--r--patches/source/libxcb/build/libxcb1
-rw-r--r--patches/source/libxcb/configure/libxcb14
-rwxr-xr-xpatches/source/libxcb/libxcb.SlackBuild2
-rw-r--r--patches/source/libxcb/modularize279
-rw-r--r--patches/source/libxcb/noarch75
-rw-r--r--patches/source/libxcb/package-blacklist44
-rw-r--r--patches/source/libxcb/post-install/libxcb.post-install66
-rw-r--r--patches/source/libxcb/slack-desc/libxcb19
-rwxr-xr-xpatches/source/libxcb/x11.SlackBuild381
-rwxr-xr-xpatches/source/libxml2/libxml2.SlackBuild112
-rw-r--r--patches/source/libxml2/libxml2.do-not-check-crc.diff35
-rw-r--r--patches/source/libxml2/slack-desc19
-rwxr-xr-xpatches/source/libxslt/libxslt.SlackBuild100
-rw-r--r--patches/source/libxslt/slack-desc19
-rwxr-xr-xpatches/source/libyaml/libyaml.SlackBuild114
-rw-r--r--patches/source/libyaml/libyaml.url1
-rw-r--r--patches/source/libyaml/slack-desc19
-rwxr-xr-xpatches/source/llvm/llvm.SlackBuild173
-rw-r--r--patches/source/llvm/llvm.rpath.fix.diff14
-rw-r--r--patches/source/llvm/llvm.url2
-rw-r--r--patches/source/llvm/slack-desc19
-rwxr-xr-xpatches/source/loudmouth/loudmouth.SlackBuild133
-rw-r--r--patches/source/loudmouth/slack-desc19
-rw-r--r--patches/source/lynx/doinst.sh13
-rwxr-xr-xpatches/source/lynx/lynx.SlackBuild155
-rw-r--r--patches/source/lynx/lynx.cfg.diff31
-rw-r--r--patches/source/lynx/slack-desc19
-rw-r--r--patches/source/mailx/doinst.sh14
-rw-r--r--patches/source/mailx/heirloom-mailx-12.5-fixes-1.patch232
-rwxr-xr-xpatches/source/mailx/mailx.SlackBuild142
-rw-r--r--patches/source/mailx/slack-desc19
-rw-r--r--patches/source/mariadb/doinst.sh28
-rwxr-xr-xpatches/source/mariadb/mariadb.SlackBuild190
-rw-r--r--patches/source/mariadb/mirror.url1
-rw-r--r--patches/source/mariadb/rc.mysqld89
-rw-r--r--patches/source/mariadb/slack-desc19
-rwxr-xr-xpatches/source/mcabber/mcabber.SlackBuild128
-rw-r--r--patches/source/mcabber/slack-desc19
-rw-r--r--patches/source/mercurial/doinst.sh13
-rwxr-xr-xpatches/source/mercurial/mercurial.SlackBuild109
-rw-r--r--patches/source/mercurial/slack-desc22
-rw-r--r--patches/source/minicom/config.sub-x86_64.diff20
-rw-r--r--patches/source/minicom/doinst.sh15
-rw-r--r--patches/source/minicom/lrzsz_0.12.21-5.diff4194
-rwxr-xr-xpatches/source/minicom/minicom.SlackBuild160
-rw-r--r--patches/source/minicom/minicom.users36
-rw-r--r--patches/source/minicom/slack-desc19
-rw-r--r--patches/source/mkinitrd/README.initrd99
l---------patches/source/mkinitrd/busybox-dot-config1
-rw-r--r--patches/source/mkinitrd/busybox-dot-config.1.20.x1024
-rw-r--r--patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-kernel_ver.patch25
-rw-r--r--patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-ntpd.patch11
-rw-r--r--patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-pkg-config-selinux.patch67
-rw-r--r--patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-sys-resource.patch123
-rwxr-xr-xpatches/source/mkinitrd/init350
-rw-r--r--patches/source/mkinitrd/mkinitrd740
-rw-r--r--patches/source/mkinitrd/mkinitrd.8279
-rwxr-xr-xpatches/source/mkinitrd/mkinitrd.SlackBuild146
-rw-r--r--patches/source/mkinitrd/mkinitrd.conf.5244
-rw-r--r--patches/source/mkinitrd/mkinitrd.conf.sample21
-rw-r--r--patches/source/mkinitrd/mkinitrd_command_generator.8187
-rw-r--r--patches/source/mkinitrd/mkinitrd_command_generator.sh872
-rw-r--r--patches/source/mkinitrd/slack-desc19
-rw-r--r--patches/source/mozilla-firefox/firefox.moz_plugin_path.diff17
-rwxr-xr-xpatches/source/mozilla-firefox/gold/gold2
l---------patches/source/mozilla-firefox/gold/ld1
-rw-r--r--patches/source/mozilla-firefox/mimeTypes.rdf28
-rw-r--r--patches/source/mozilla-firefox/mozilla-firefox-mimeTypes-fix.diff45
-rwxr-xr-xpatches/source/mozilla-firefox/mozilla-firefox.SlackBuild326
-rw-r--r--patches/source/mozilla-firefox/mozilla-firefox.desktop80
-rw-r--r--patches/source/mozilla-firefox/slack-desc19
-rw-r--r--patches/source/mozilla-nss/MPL-1.1.txt470
-rw-r--r--patches/source/mozilla-nss/faq.html364
-rw-r--r--patches/source/mozilla-nss/gpl-2.0.txt339
-rw-r--r--patches/source/mozilla-nss/lgpl-2.1.txt504
-rwxr-xr-xpatches/source/mozilla-nss/mozilla-nss.SlackBuild186
-rw-r--r--patches/source/mozilla-nss/nss-config.in145
-rw-r--r--patches/source/mozilla-nss/slack-desc19
-rwxr-xr-xpatches/source/mozilla-thunderbird/gold/gold2
l---------patches/source/mozilla-thunderbird/gold/ld1
-rw-r--r--patches/source/mozilla-thunderbird/mozilla-firefox.xpcom_arm.patch18
-rwxr-xr-xpatches/source/mozilla-thunderbird/mozilla-thunderbird.SlackBuild240
-rw-r--r--patches/source/mozilla-thunderbird/mozilla-thunderbird.desktop84
-rw-r--r--patches/source/mozilla-thunderbird/slack-desc19
-rw-r--r--patches/source/mozilla-thunderbird/thunderbird.pngbin0 -> 47617 bytes
-rw-r--r--patches/source/mutt/doinst.sh13
-rw-r--r--patches/source/mutt/mutt.CVE-2014-9116.diff34
-rwxr-xr-xpatches/source/mutt/mutt.SlackBuild128
-rw-r--r--patches/source/mutt/slack-desc19
-rw-r--r--patches/source/ntp/doinst.sh28
-rwxr-xr-xpatches/source/ntp/ntp.SlackBuild158
-rw-r--r--patches/source/ntp/ntp.conf72
-rw-r--r--patches/source/ntp/ntp.keys2
-rw-r--r--patches/source/ntp/ntp.nano.diff17
-rw-r--r--patches/source/ntp/rc.ntpd71
-rw-r--r--patches/source/ntp/slack-desc19
-rw-r--r--patches/source/openssh/doinst.sh49
-rw-r--r--patches/source/openssh/openssh-7.4p1-libwrap.diff137
-rw-r--r--patches/source/openssh/openssh.CVE-2017-15906.patch19
-rwxr-xr-xpatches/source/openssh/openssh.SlackBuild169
-rw-r--r--patches/source/openssh/rc.sshd59
-rw-r--r--patches/source/openssh/slack-desc19
-rw-r--r--patches/source/openssl/certwatch130
-rw-r--r--patches/source/openssl/doinst.sh-openssl26
-rw-r--r--patches/source/openssl/doinst.sh-openssl-solibs12
-rwxr-xr-xpatches/source/openssl/openssl.SlackBuild213
-rw-r--r--patches/source/openssl/openssl.optsx86.diff11
-rw-r--r--patches/source/openssl/openssl.soname.diff11
-rw-r--r--patches/source/openssl/openssl0/certwatch130
-rw-r--r--patches/source/openssl/openssl0/doinst.sh-openssl21
-rw-r--r--patches/source/openssl/openssl0/doinst.sh-openssl-solibs12
-rwxr-xr-xpatches/source/openssl/openssl0/openssl.SlackBuild202
-rw-r--r--patches/source/openssl/openssl0/openssl.no.weak.sslv2.ciphers.diff51
-rw-r--r--patches/source/openssl/openssl0/openssl.no.weak.sslv3.ciphers.diff356
-rw-r--r--patches/source/openssl/openssl0/openssl.optsx86.diff11
-rw-r--r--patches/source/openssl/openssl0/openssl.soname.diff11
-rwxr-xr-xpatches/source/openssl/openssl0/openssl0.build205
-rw-r--r--patches/source/openssl/openssl0/slack-desc.openssl19
-rw-r--r--patches/source/openssl/openssl0/slack-desc.openssl-solibs19
-rw-r--r--patches/source/openssl/slack-desc.openssl19
-rw-r--r--patches/source/openssl/slack-desc.openssl-solibs19
-rw-r--r--patches/source/openvpn/README26
-rw-r--r--patches/source/openvpn/doinst.sh25
-rwxr-xr-xpatches/source/openvpn/openvpn.SlackBuild169
-rw-r--r--patches/source/openvpn/openvpn.url2
-rw-r--r--patches/source/openvpn/rc.openvpn111
-rw-r--r--patches/source/openvpn/slack-desc19
-rw-r--r--patches/source/openvpn/slackware.conf178
-rw-r--r--patches/source/patch/0001-Refuse-to-apply-ed-scripts-by-default.patch178
-rwxr-xr-xpatches/source/patch/patch.SlackBuild131
-rw-r--r--patches/source/patch/slack-desc19
-rwxr-xr-xpatches/source/pcre/pcre.SlackBuild149
-rw-r--r--patches/source/pcre/slack-desc19
-rw-r--r--patches/source/php/doinst.sh28
-rwxr-xr-xpatches/source/php/fetch-php.sh2
-rw-r--r--patches/source/php/mod_php.conf.example29
-rw-r--r--patches/source/php/php-fpm.conf.diff28
-rwxr-xr-xpatches/source/php/php.SlackBuild311
-rw-r--r--patches/source/php/php.ini-development.diff61
-rw-r--r--patches/source/php/slack-desc19
-rw-r--r--patches/source/pidgin/doinst.sh10
-rw-r--r--patches/source/pidgin/fix-gmain_h-compile-error.diff17
-rwxr-xr-xpatches/source/pidgin/pidgin.SlackBuild230
-rw-r--r--patches/source/pidgin/slack-desc19
-rw-r--r--patches/source/ppp/doinst.sh21
-rw-r--r--patches/source/ppp/options.new276
-rw-r--r--patches/source/ppp/ppp.CVE-2014-3158.diff30
-rw-r--r--patches/source/ppp/ppp.CVE-2015-3310.diff11
-rwxr-xr-xpatches/source/ppp/ppp.SlackBuild176
-rw-r--r--patches/source/ppp/ppp.crypt.diff64
-rw-r--r--patches/source/ppp/ppp.slack.diff28
-rw-r--r--patches/source/ppp/pppsetup-1.98.backupfiles.diff26
-rw-r--r--patches/source/ppp/pppsetup-1.98.moredevs.diff105
-rw-r--r--patches/source/ppp/pppsetup-1.98.pppoff.diff19
-rw-r--r--patches/source/ppp/pppsetup-1.98.slack.diff1709
-rw-r--r--patches/source/ppp/radius.msdict81
-rw-r--r--patches/source/ppp/realms22
-rw-r--r--patches/source/ppp/servers4
-rw-r--r--patches/source/ppp/slack-desc19
-rw-r--r--patches/source/proftpd/doinst.sh18
-rw-r--r--patches/source/proftpd/etc/ftpusers22
-rw-r--r--patches/source/proftpd/etc/proftpd.conf74
-rwxr-xr-xpatches/source/proftpd/proftpd.SlackBuild138
-rw-r--r--patches/source/proftpd/slack-desc19
-rwxr-xr-xpatches/source/python/python.SlackBuild167
-rw-r--r--patches/source/python/python.no-static-library.diff49
-rw-r--r--patches/source/python/python.readline.set_pre_input_hook.diff12
-rw-r--r--patches/source/python/python.x86_64.diff174
-rw-r--r--patches/source/python/slack-desc19
-rw-r--r--patches/source/qt/Qt.pc16
-rw-r--r--patches/source/qt/README9
-rw-r--r--patches/source/qt/doinst.sh10
-rw-r--r--patches/source/qt/profile.d/qt4.csh22
-rw-r--r--patches/source/qt/profile.d/qt4.sh23
-rwxr-xr-xpatches/source/qt/qt.SlackBuild311
-rw-r--r--patches/source/qt/qt.fix.broken.gif.crash.diff16
-rw-r--r--patches/source/qt/qt.glib-honor-ExcludeSocketNotifiers-flag.diff63
-rw-r--r--patches/source/qt/qt.mysql.h.diff12
-rw-r--r--patches/source/qt/qt.qclipboard_delay.patch12
-rw-r--r--patches/source/qt/qt.qclipboard_fix_recursive.patch94
-rw-r--r--patches/source/qt/qt.qsystemtrayicon-plugin-system.diff1466
-rw-r--r--patches/source/qt/qt.webkit-no_Werror.patch11
-rw-r--r--patches/source/qt/slack-desc19
-rw-r--r--patches/source/randrproto/arch.use.flags9
-rw-r--r--patches/source/randrproto/build/randrproto1
-rw-r--r--patches/source/randrproto/configure/configure13
-rw-r--r--patches/source/randrproto/modularize279
-rw-r--r--patches/source/randrproto/noarch75
-rw-r--r--patches/source/randrproto/package-blacklist44
-rwxr-xr-xpatches/source/randrproto/randrproto.SlackBuild2
-rw-r--r--patches/source/randrproto/slack-desc/randrproto19
-rwxr-xr-xpatches/source/randrproto/x11.SlackBuild381
-rwxr-xr-xpatches/source/rsync/rsync.SlackBuild110
-rw-r--r--patches/source/rsync/slack-desc19
-rwxr-xr-xpatches/source/ruby/ruby.SlackBuild130
-rw-r--r--patches/source/ruby/slack-desc19
-rw-r--r--patches/source/rxvt/rxvt-integer-overflow-fix.patch11
-rwxr-xr-xpatches/source/rxvt/rxvt.SlackBuild127
-rw-r--r--patches/source/rxvt/rxvt.utempter.diff277
-rw-r--r--patches/source/rxvt/slack-desc19
-rw-r--r--patches/source/samba/doinst.sh18
-rw-r--r--patches/source/samba/pytalloc-util.pc11
-rw-r--r--patches/source/samba/rc.samba46
-rw-r--r--patches/source/samba/samba-4.4.16-CVE-2018-1057.patch903
-rw-r--r--patches/source/samba/samba-4.5.14-security-2017-11-21.patch110
-rwxr-xr-xpatches/source/samba/samba.SlackBuild224
-rw-r--r--patches/source/samba/samba.install.talloc.tevent.tdb.diff102
-rw-r--r--patches/source/samba/samba.url2
-rw-r--r--patches/source/samba/slack-desc19
-rw-r--r--patches/source/samba/smb.conf.default223
-rw-r--r--patches/source/samba/smb.conf.default.orig223
-rw-r--r--patches/source/samba/smb.conf.diff29
-rw-r--r--patches/source/samba/talloc.pc11
-rw-r--r--patches/source/seamonkey/autoconf/autoconf-2.13-consolidated_fixes-1.patch504
-rwxr-xr-xpatches/source/seamonkey/autoconf/autoconf.build81
-rw-r--r--patches/source/seamonkey/doinst.sh11
-rwxr-xr-xpatches/source/seamonkey/gold/gold2
l---------patches/source/seamonkey/gold/ld1
-rw-r--r--patches/source/seamonkey/pkgconfig/seamonkey-gtkmozembed.pc11
-rw-r--r--patches/source/seamonkey/pkgconfig/seamonkey-libxul.pc11
-rw-r--r--patches/source/seamonkey/pkgconfig/seamonkey-nspr.pc12
-rw-r--r--patches/source/seamonkey/pkgconfig/seamonkey-nss.pc11
-rw-r--r--patches/source/seamonkey/pkgconfig/seamonkey-plugin.pc10
-rw-r--r--patches/source/seamonkey/pkgconfig/seamonkey-xpcom.pc12
-rw-r--r--patches/source/seamonkey/seamonkey-icon.pngbin0 -> 12796 bytes
-rw-r--r--patches/source/seamonkey/seamonkey-mail-icon.pngbin0 -> 185 bytes
-rw-r--r--patches/source/seamonkey/seamonkey-mail.desktop8
-rwxr-xr-xpatches/source/seamonkey/seamonkey.SlackBuild294
-rw-r--r--patches/source/seamonkey/seamonkey.desktop9
-rw-r--r--patches/source/seamonkey/slack-desc19
-rw-r--r--patches/source/sendmail/Build29
-rwxr-xr-xpatches/source/sendmail/SlackBuild-sendmail168
-rwxr-xr-xpatches/source/sendmail/SlackBuild-sendmail-cf57
-rw-r--r--patches/source/sendmail/linux.uucp.mc8
-rw-r--r--patches/source/sendmail/sendmail-slackware-tls-sasl.mc61
-rw-r--r--patches/source/sendmail/sendmail-slackware-tls.mc56
-rw-r--r--patches/source/sendmail/sendmail-slackware.mc42
-rwxr-xr-xpatches/source/sendmail/sendmail.SlackBuild3
-rw-r--r--patches/source/sendmail/site.config.m48
-rw-r--r--patches/source/sendmail/slack-desc.sendmail19
-rw-r--r--patches/source/sendmail/slack-desc.sendmail-cf19
-rw-r--r--patches/source/shadow/adduser445
-rw-r--r--patches/source/shadow/doinst.sh17
-rw-r--r--patches/source/shadow/login.defs389
-rw-r--r--patches/source/shadow/patches/README_PATCHES10
-rw-r--r--patches/source/shadow/patches/unused/r3299.diff12
-rw-r--r--patches/source/shadow/shadow.CVE-2005-4890.relax.diff35
-rwxr-xr-xpatches/source/shadow/shadow.SlackBuild175
-rw-r--r--patches/source/shadow/shadow.glibc217-crypt.diff258
-rw-r--r--patches/source/shadow/shadow.url1
-rw-r--r--patches/source/shadow/slack-desc19
-rw-r--r--patches/source/shadow/useradd8
-rw-r--r--patches/source/stunnel/doinst.sh12
-rw-r--r--patches/source/stunnel/generate-stunnel-key.sh13
-rw-r--r--patches/source/stunnel/slack-desc19
-rwxr-xr-xpatches/source/stunnel/stunnel.SlackBuild140
-rwxr-xr-xpatches/source/subversion/get-svn-book.sh9
-rw-r--r--patches/source/subversion/slack-desc19
-rw-r--r--patches/source/subversion/subversion.CVE-2015-5343.diff16
-rw-r--r--patches/source/subversion/subversion.CVE-2016-2167.diff11
-rw-r--r--patches/source/subversion/subversion.CVE-2016-2168.diff32
-rw-r--r--patches/source/subversion/subversion.CVE-2017-9800.diff105
-rwxr-xr-xpatches/source/subversion/subversion.SlackBuild183
-rw-r--r--patches/source/sudo/doinst.sh14
-rw-r--r--patches/source/sudo/slack-desc19
-rwxr-xr-xpatches/source/sudo/sudo.SlackBuild122
-rw-r--r--patches/source/tcpdump/slack-desc19
-rwxr-xr-xpatches/source/tcpdump/tcpdump.SlackBuild104
-rw-r--r--patches/source/udisks/slack-desc19
-rwxr-xr-xpatches/source/udisks/udisks.SlackBuild119
-rw-r--r--patches/source/udisks/udisks.url1
-rw-r--r--patches/source/udisks2/doinst.sh12
-rw-r--r--patches/source/udisks2/slack-desc19
-rwxr-xr-xpatches/source/udisks2/udisks2.SlackBuild139
-rw-r--r--patches/source/vim/doinst.sh5
-rw-r--r--patches/source/vim/gvim.desktop120
-rw-r--r--patches/source/vim/gvim.pngbin0 -> 8249 bytes
-rw-r--r--patches/source/vim/patches/7.4.001489
-rw-r--r--patches/source/vim/patches/7.4.00277
-rw-r--r--patches/source/vim/patches/7.4.003100
-rw-r--r--patches/source/vim/patches/7.4.004232
-rw-r--r--patches/source/vim/patches/7.4.00548
-rw-r--r--patches/source/vim/patches/7.4.00666
-rw-r--r--patches/source/vim/patches/7.4.00795
-rw-r--r--patches/source/vim/patches/7.4.00871
-rw-r--r--patches/source/vim/patches/7.4.00964
-rw-r--r--patches/source/vim/patches/7.4.01079
-rw-r--r--patches/source/vim/patches/7.4.011100
-rw-r--r--patches/source/vim/patches/7.4.012202
-rw-r--r--patches/source/vim/patches/7.4.01399
-rw-r--r--patches/source/vim/patches/7.4.014102
-rw-r--r--patches/source/vim/patches/7.4.015106
-rw-r--r--patches/source/vim/patches/7.4.016221
-rw-r--r--patches/source/vim/patches/7.4.01778
-rw-r--r--patches/source/vim/patches/7.4.01845
-rw-r--r--patches/source/vim/patches/7.4.01961
-rw-r--r--patches/source/vim/patches/7.4.02082
-rw-r--r--patches/source/vim/patches/7.4.02186
-rw-r--r--patches/source/vim/patches/7.4.022148
-rw-r--r--patches/source/vim/patches/7.4.02353
-rw-r--r--patches/source/vim/patches/7.4.02461
-rw-r--r--patches/source/vim/patches/7.4.02562
-rw-r--r--patches/source/vim/patches/7.4.02665
-rw-r--r--patches/source/vim/patches/7.4.02789
-rw-r--r--patches/source/vim/patches/7.4.028753
-rw-r--r--patches/source/vim/patches/7.4.02963
-rw-r--r--patches/source/vim/patches/7.4.030109
-rw-r--r--patches/source/vim/patches/7.4.03154
-rw-r--r--patches/source/vim/patches/7.4.03282
-rw-r--r--patches/source/vim/patches/7.4.033116
-rw-r--r--patches/source/vim/patches/7.4.034180
-rw-r--r--patches/source/vim/patches/7.4.03553
-rw-r--r--patches/source/vim/patches/7.4.036273
-rw-r--r--patches/source/vim/patches/7.4.037130
-rw-r--r--patches/source/vim/patches/7.4.038116
-rw-r--r--patches/source/vim/patches/7.4.039217
-rw-r--r--patches/source/vim/patches/7.4.04068
-rw-r--r--patches/source/vim/patches/7.4.04161
-rw-r--r--patches/source/vim/patches/7.4.04271
-rw-r--r--patches/source/vim/patches/7.4.04389
-rw-r--r--patches/source/vim/patches/7.4.04483
-rw-r--r--patches/source/vim/patches/7.4.045111
-rw-r--r--patches/source/vim/patches/7.4.04680
-rw-r--r--patches/source/vim/patches/7.4.04756
-rw-r--r--patches/source/vim/patches/7.4.04896
-rw-r--r--patches/source/vim/patches/7.4.04967
-rw-r--r--patches/source/vim/patches/7.4.05090
-rw-r--r--patches/source/vim/patches/7.4.05167
-rw-r--r--patches/source/vim/patches/7.4.052197
-rw-r--r--patches/source/vim/patches/7.4.05345
-rw-r--r--patches/source/vim/patches/7.4.05453
-rw-r--r--patches/source/vim/patches/7.4.055138
-rw-r--r--patches/source/vim/patches/7.4.05651
-rw-r--r--patches/source/vim/patches/7.4.057252
-rw-r--r--patches/source/vim/patches/7.4.05867
-rw-r--r--patches/source/vim/patches/7.4.05953
-rw-r--r--patches/source/vim/patches/7.4.06071
-rw-r--r--patches/source/vim/patches/7.4.061144
-rw-r--r--patches/source/vim/patches/7.4.06287
-rw-r--r--patches/source/vim/patches/7.4.063105
-rw-r--r--patches/source/vim/patches/7.4.064bin0 -> 5346 bytes
-rw-r--r--patches/source/vim/patches/7.4.06570
-rw-r--r--patches/source/vim/patches/7.4.066354
-rw-r--r--patches/source/vim/patches/7.4.067126
-rw-r--r--patches/source/vim/patches/7.4.068131
-rw-r--r--patches/source/vim/patches/7.4.0692559
-rw-r--r--patches/source/vim/patches/7.4.07047
-rw-r--r--patches/source/vim/patches/7.4.0711302
-rw-r--r--patches/source/vim/patches/7.4.07261
-rw-r--r--patches/source/vim/patches/7.4.073404
-rw-r--r--patches/source/vim/patches/7.4.07467
-rw-r--r--patches/source/vim/patches/7.4.075290
-rw-r--r--patches/source/vim/patches/7.4.07666
-rw-r--r--patches/source/vim/patches/7.4.07763
-rw-r--r--patches/source/vim/patches/7.4.078114
-rw-r--r--patches/source/vim/patches/7.4.079470
-rw-r--r--patches/source/vim/patches/7.4.08052
-rw-r--r--patches/source/vim/patches/7.4.08152
-rw-r--r--patches/source/vim/patches/7.4.082344
-rw-r--r--patches/source/vim/patches/7.4.083136
-rw-r--r--patches/source/vim/patches/7.4.084184
-rw-r--r--patches/source/vim/patches/7.4.085118
-rw-r--r--patches/source/vim/patches/7.4.086145
-rw-r--r--patches/source/vim/patches/7.4.08756
-rw-r--r--patches/source/vim/patches/7.4.088564
-rw-r--r--patches/source/vim/patches/7.4.08947
-rw-r--r--patches/source/vim/patches/7.4.090223
-rw-r--r--patches/source/vim/patches/7.4.09159
-rw-r--r--patches/source/vim/patches/7.4.09262
-rw-r--r--patches/source/vim/patches/7.4.09372
-rw-r--r--patches/source/vim/patches/7.4.094139
-rw-r--r--patches/source/vim/patches/7.4.09573
-rw-r--r--patches/source/vim/patches/7.4.09696
-rw-r--r--patches/source/vim/patches/7.4.09750
-rw-r--r--patches/source/vim/patches/7.4.098243
-rw-r--r--patches/source/vim/patches/7.4.099113
-rw-r--r--patches/source/vim/patches/7.4.10082
-rw-r--r--patches/source/vim/patches/7.4.10193
-rw-r--r--patches/source/vim/patches/7.4.10284
-rw-r--r--patches/source/vim/patches/7.4.10393
-rw-r--r--patches/source/vim/patches/7.4.104107
-rw-r--r--patches/source/vim/patches/7.4.10558
-rw-r--r--patches/source/vim/patches/7.4.10668
-rw-r--r--patches/source/vim/patches/7.4.107639
-rw-r--r--patches/source/vim/patches/7.4.108215
-rw-r--r--patches/source/vim/patches/7.4.109123
-rw-r--r--patches/source/vim/patches/7.4.110102
-rw-r--r--patches/source/vim/patches/7.4.11163
-rw-r--r--patches/source/vim/patches/7.4.11270
-rw-r--r--patches/source/vim/patches/7.4.113101
-rw-r--r--patches/source/vim/patches/7.4.11456
-rw-r--r--patches/source/vim/patches/7.4.11552
-rw-r--r--patches/source/vim/patches/7.4.11646
-rw-r--r--patches/source/vim/patches/7.4.117263
-rw-r--r--patches/source/vim/patches/7.4.11890
-rw-r--r--patches/source/vim/patches/7.4.119245
-rw-r--r--patches/source/vim/patches/7.4.12053
-rw-r--r--patches/source/vim/patches/7.4.12148
-rw-r--r--patches/source/vim/patches/7.4.122215
-rw-r--r--patches/source/vim/patches/7.4.12364
-rw-r--r--patches/source/vim/patches/7.4.12463
-rw-r--r--patches/source/vim/patches/7.4.12557
-rw-r--r--patches/source/vim/patches/7.4.12668
-rw-r--r--patches/source/vim/patches/7.4.12767
-rw-r--r--patches/source/vim/patches/7.4.12866
-rw-r--r--patches/source/vim/patches/7.4.12956
-rw-r--r--patches/source/vim/patches/7.4.13069
-rw-r--r--patches/source/vim/patches/7.4.131113
-rw-r--r--patches/source/vim/patches/7.4.13254
-rw-r--r--patches/source/vim/patches/7.4.13374
-rw-r--r--patches/source/vim/patches/7.4.13453
-rw-r--r--patches/source/vim/patches/7.4.13551
-rw-r--r--patches/source/vim/patches/7.4.13675
-rw-r--r--patches/source/vim/patches/7.4.137239
-rw-r--r--patches/source/vim/patches/7.4.13855
-rw-r--r--patches/source/vim/patches/7.4.13976
-rw-r--r--patches/source/vim/patches/7.4.140174
-rw-r--r--patches/source/vim/patches/7.4.14188
-rw-r--r--patches/source/vim/patches/7.4.142186
-rw-r--r--patches/source/vim/patches/7.4.143214
-rw-r--r--patches/source/vim/patches/7.4.14452
-rw-r--r--patches/source/vim/patches/7.4.14575
-rw-r--r--patches/source/vim/patches/7.4.14667
-rw-r--r--patches/source/vim/patches/7.4.147bin0 -> 2583 bytes
-rw-r--r--patches/source/vim/patches/7.4.14883
-rw-r--r--patches/source/vim/patches/7.4.149822
-rw-r--r--patches/source/vim/patches/7.4.15093
-rw-r--r--patches/source/vim/patches/7.4.1511470
-rw-r--r--patches/source/vim/patches/7.4.152708
-rw-r--r--patches/source/vim/patches/7.4.153176
-rw-r--r--patches/source/vim/patches/7.4.154153
-rw-r--r--patches/source/vim/patches/7.4.15583
-rw-r--r--patches/source/vim/patches/7.4.15649
-rw-r--r--patches/source/vim/patches/7.4.15753
-rw-r--r--patches/source/vim/patches/7.4.158140
-rw-r--r--patches/source/vim/patches/7.4.159116
-rw-r--r--patches/source/vim/patches/7.4.16066
-rw-r--r--patches/source/vim/patches/7.4.16175
-rw-r--r--patches/source/vim/patches/7.4.16245
-rw-r--r--patches/source/vim/patches/7.4.16375
-rw-r--r--patches/source/vim/patches/7.4.16478
-rw-r--r--patches/source/vim/patches/7.4.16571
-rw-r--r--patches/source/vim/patches/7.4.16653
-rw-r--r--patches/source/vim/patches/7.4.167195
-rw-r--r--patches/source/vim/patches/7.4.16891
-rw-r--r--patches/source/vim/patches/7.4.16953
-rw-r--r--patches/source/vim/patches/7.4.17090
-rw-r--r--patches/source/vim/patches/7.4.171841
-rw-r--r--patches/source/vim/patches/7.4.172346
-rw-r--r--patches/source/vim/patches/7.4.17361
-rw-r--r--patches/source/vim/patches/7.4.17494
-rw-r--r--patches/source/vim/patches/7.4.175180
-rw-r--r--patches/source/vim/patches/7.4.17691
-rw-r--r--patches/source/vim/patches/7.4.17748
-rw-r--r--patches/source/vim/patches/7.4.17862
-rw-r--r--patches/source/vim/patches/7.4.17957
-rw-r--r--patches/source/vim/patches/7.4.18076
-rw-r--r--patches/source/vim/patches/7.4.18168
-rw-r--r--patches/source/vim/patches/7.4.18256
-rw-r--r--patches/source/vim/patches/7.4.18349
-rw-r--r--patches/source/vim/patches/7.4.184250
-rw-r--r--patches/source/vim/patches/7.4.18564
-rw-r--r--patches/source/vim/patches/7.4.186164
-rw-r--r--patches/source/vim/patches/7.4.187136
-rw-r--r--patches/source/vim/patches/7.4.188617
-rw-r--r--patches/source/vim/patches/7.4.18952
-rw-r--r--patches/source/vim/patches/7.4.19070
-rw-r--r--patches/source/vim/patches/7.4.191689
-rw-r--r--patches/source/vim/patches/7.4.19244
-rw-r--r--patches/source/vim/patches/7.4.193106
-rw-r--r--patches/source/vim/patches/7.4.19453
-rw-r--r--patches/source/vim/patches/7.4.195164
-rw-r--r--patches/source/vim/patches/7.4.19651
-rw-r--r--patches/source/vim/patches/7.4.1971052
-rw-r--r--patches/source/vim/patches/7.4.198103
-rw-r--r--patches/source/vim/patches/7.4.199106
-rw-r--r--patches/source/vim/patches/7.4.20068
-rw-r--r--patches/source/vim/patches/7.4.201273
-rw-r--r--patches/source/vim/patches/7.4.202281
-rw-r--r--patches/source/vim/patches/7.4.203203
-rw-r--r--patches/source/vim/patches/7.4.204113
-rw-r--r--patches/source/vim/patches/7.4.205113
-rw-r--r--patches/source/vim/patches/7.4.20672
-rw-r--r--patches/source/vim/patches/7.4.207176
-rw-r--r--patches/source/vim/patches/7.4.20836
-rw-r--r--patches/source/vim/patches/7.4.20963
-rw-r--r--patches/source/vim/patches/7.4.210133
-rw-r--r--patches/source/vim/patches/7.4.21168
-rw-r--r--patches/source/vim/patches/7.4.2125720
-rw-r--r--patches/source/vim/patches/7.4.213211
-rw-r--r--patches/source/vim/patches/7.4.21450
-rw-r--r--patches/source/vim/patches/7.4.21587
-rw-r--r--patches/source/vim/patches/7.4.21673
-rw-r--r--patches/source/vim/patches/7.4.21785
-rw-r--r--patches/source/vim/patches/7.4.218578
-rw-r--r--patches/source/vim/patches/7.4.219100
-rw-r--r--patches/source/vim/patches/7.4.220106
-rw-r--r--patches/source/vim/patches/7.4.22162
-rw-r--r--patches/source/vim/patches/7.4.22283
-rw-r--r--patches/source/vim/patches/7.4.2236557
-rw-r--r--patches/source/vim/patches/7.4.224210
-rw-r--r--patches/source/vim/patches/7.4.22583
-rw-r--r--patches/source/vim/patches/7.4.226136
-rw-r--r--patches/source/vim/patches/7.4.22787
-rw-r--r--patches/source/vim/patches/7.4.228189
-rw-r--r--patches/source/vim/patches/7.4.229141
-rw-r--r--patches/source/vim/patches/7.4.23053
-rw-r--r--patches/source/vim/patches/7.4.231267
-rw-r--r--patches/source/vim/patches/7.4.232109
-rw-r--r--patches/source/vim/patches/7.4.23380
-rw-r--r--patches/source/vim/patches/7.4.23495
-rw-r--r--patches/source/vim/patches/7.4.235552
-rw-r--r--patches/source/vim/patches/7.4.236159
-rw-r--r--patches/source/vim/patches/7.4.237127
-rw-r--r--patches/source/vim/patches/7.4.238505
-rw-r--r--patches/source/vim/patches/7.4.23955
-rw-r--r--patches/source/vim/patches/7.4.24057
-rw-r--r--patches/source/vim/patches/7.4.241386
-rw-r--r--patches/source/vim/patches/7.4.242520
-rw-r--r--patches/source/vim/patches/7.4.2431109
-rw-r--r--patches/source/vim/patches/7.4.24460
-rw-r--r--patches/source/vim/patches/7.4.24552
-rw-r--r--patches/source/vim/patches/7.4.246121
-rw-r--r--patches/source/vim/patches/7.4.247227
-rw-r--r--patches/source/vim/patches/7.4.248515
-rw-r--r--patches/source/vim/patches/7.4.249bin0 -> 6037 bytes
-rw-r--r--patches/source/vim/patches/7.4.25052
-rw-r--r--patches/source/vim/patches/7.4.251164
-rw-r--r--patches/source/vim/patches/7.4.25247
-rw-r--r--patches/source/vim/patches/7.4.25376
-rw-r--r--patches/source/vim/patches/7.4.254183
-rw-r--r--patches/source/vim/patches/7.4.255108
-rw-r--r--patches/source/vim/patches/7.4.25683
-rw-r--r--patches/source/vim/patches/7.4.25764
-rw-r--r--patches/source/vim/patches/7.4.258114
-rw-r--r--patches/source/vim/patches/7.4.25953
-rw-r--r--patches/source/vim/patches/7.4.260281
-rw-r--r--patches/source/vim/patches/7.4.261106
-rw-r--r--patches/source/vim/patches/7.4.262314
-rw-r--r--patches/source/vim/patches/7.4.26344
-rw-r--r--patches/source/vim/patches/7.4.264176
-rw-r--r--patches/source/vim/patches/7.4.265153
-rw-r--r--patches/source/vim/patches/7.4.26646
-rw-r--r--patches/source/vim/patches/7.4.267438
-rw-r--r--patches/source/vim/patches/7.4.268108
-rw-r--r--patches/source/vim/patches/7.4.269213
-rw-r--r--patches/source/vim/patches/7.4.27062
-rw-r--r--patches/source/vim/patches/7.4.27152
-rw-r--r--patches/source/vim/patches/7.4.272148
-rw-r--r--patches/source/vim/patches/7.4.27357
-rw-r--r--patches/source/vim/patches/7.4.27446
-rw-r--r--patches/source/vim/patches/7.4.27556
-rw-r--r--patches/source/vim/patches/7.4.276302
-rw-r--r--patches/source/vim/patches/7.4.27780
-rw-r--r--patches/source/vim/patches/7.4.278183
-rw-r--r--patches/source/vim/patches/7.4.279616
-rw-r--r--patches/source/vim/patches/7.4.280125
-rw-r--r--patches/source/vim/patches/7.4.28180
-rw-r--r--patches/source/vim/patches/7.4.28248
-rw-r--r--patches/source/vim/patches/7.4.28356
-rw-r--r--patches/source/vim/patches/7.4.28453
-rw-r--r--patches/source/vim/patches/7.4.28549
-rw-r--r--patches/source/vim/patches/7.4.28652
-rw-r--r--patches/source/vim/patches/7.4.28747
-rw-r--r--patches/source/vim/patches/7.4.28846
-rw-r--r--patches/source/vim/patches/7.4.289122
-rw-r--r--patches/source/vim/patches/7.4.290156
-rw-r--r--patches/source/vim/patches/7.4.29156
-rw-r--r--patches/source/vim/patches/7.4.292139
-rw-r--r--patches/source/vim/patches/7.4.293301
-rw-r--r--patches/source/vim/patches/7.4.294125
-rw-r--r--patches/source/vim/patches/7.4.295144
-rw-r--r--patches/source/vim/patches/7.4.29653
-rw-r--r--patches/source/vim/patches/7.4.29776
-rw-r--r--patches/source/vim/patches/7.4.29852
-rw-r--r--patches/source/vim/patches/7.4.299458
-rw-r--r--patches/source/vim/patches/7.4.30062
-rw-r--r--patches/source/vim/patches/7.4.30153
-rw-r--r--patches/source/vim/patches/7.4.30278
-rw-r--r--patches/source/vim/patches/7.4.30385
-rw-r--r--patches/source/vim/patches/7.4.30445
-rw-r--r--patches/source/vim/patches/7.4.305.gzbin0 -> 2653 bytes
-rw-r--r--patches/source/vim/patches/7.4.30684
-rw-r--r--patches/source/vim/patches/7.4.307147
-rw-r--r--patches/source/vim/patches/7.4.30847
-rw-r--r--patches/source/vim/patches/7.4.30988
-rw-r--r--patches/source/vim/patches/7.4.310373
-rw-r--r--patches/source/vim/patches/7.4.311127
-rw-r--r--patches/source/vim/patches/7.4.312194
-rw-r--r--patches/source/vim/patches/7.4.313320
-rw-r--r--patches/source/vim/patches/7.4.314178
-rw-r--r--patches/source/vim/patches/7.4.315229
-rw-r--r--patches/source/vim/patches/7.4.31652
-rw-r--r--patches/source/vim/patches/7.4.31757
-rw-r--r--patches/source/vim/patches/7.4.31852
-rw-r--r--patches/source/vim/patches/7.4.31955
-rw-r--r--patches/source/vim/patches/7.4.320143
-rw-r--r--patches/source/vim/patches/7.4.32171
-rw-r--r--patches/source/vim/patches/7.4.32292
-rw-r--r--patches/source/vim/patches/7.4.32396
-rw-r--r--patches/source/vim/patches/7.4.324190
-rw-r--r--patches/source/vim/patches/7.4.32562
-rw-r--r--patches/source/vim/patches/7.4.32651
-rw-r--r--patches/source/vim/patches/7.4.327163
-rw-r--r--patches/source/vim/patches/7.4.32882
-rw-r--r--patches/source/vim/patches/7.4.32955
-rw-r--r--patches/source/vim/patches/7.4.3301131
-rw-r--r--patches/source/vim/patches/7.4.33147
-rw-r--r--patches/source/vim/patches/7.4.332118
-rw-r--r--patches/source/vim/patches/7.4.33372
-rw-r--r--patches/source/vim/patches/7.4.334112
-rw-r--r--patches/source/vim/patches/7.4.335108
-rw-r--r--patches/source/vim/patches/7.4.336100
-rw-r--r--patches/source/vim/patches/7.4.33751
-rw-r--r--patches/source/vim/patches/7.4.3381830
-rw-r--r--patches/source/vim/patches/7.4.33979
-rw-r--r--patches/source/vim/patches/7.4.34097
-rw-r--r--patches/source/vim/patches/7.4.341178
-rw-r--r--patches/source/vim/patches/7.4.34267
-rw-r--r--patches/source/vim/patches/7.4.34360
-rw-r--r--patches/source/vim/patches/7.4.344180
-rw-r--r--patches/source/vim/patches/7.4.34573
-rw-r--r--patches/source/vim/patches/7.4.34661
-rw-r--r--patches/source/vim/patches/7.4.34774
-rw-r--r--patches/source/vim/patches/7.4.34858
-rw-r--r--patches/source/vim/patches/7.4.349111
-rw-r--r--patches/source/vim/patches/7.4.350139
-rw-r--r--patches/source/vim/patches/7.4.351160
-rw-r--r--patches/source/vim/patches/7.4.352101
-rw-r--r--patches/source/vim/patches/7.4.353489
-rw-r--r--patches/source/vim/patches/7.4.35456
-rw-r--r--patches/source/vim/patches/7.4.355929
-rw-r--r--patches/source/vim/patches/7.4.35638
-rw-r--r--patches/source/vim/patches/7.4.35752
-rw-r--r--patches/source/vim/patches/7.4.358290
-rw-r--r--patches/source/vim/patches/7.4.359103
-rw-r--r--patches/source/vim/patches/7.4.36080
-rw-r--r--patches/source/vim/patches/7.4.36148
-rw-r--r--patches/source/vim/patches/7.4.36253
-rw-r--r--patches/source/vim/patches/7.4.363160
-rw-r--r--patches/source/vim/patches/7.4.36470
-rw-r--r--patches/source/vim/patches/7.4.365159
-rw-r--r--patches/source/vim/patches/7.4.36653
-rw-r--r--patches/source/vim/patches/7.4.36767
-rw-r--r--patches/source/vim/patches/7.4.36879
-rw-r--r--patches/source/vim/patches/7.4.36970
-rw-r--r--patches/source/vim/patches/7.4.370316
-rw-r--r--patches/source/vim/patches/7.4.37159
-rw-r--r--patches/source/vim/patches/7.4.372188
-rw-r--r--patches/source/vim/patches/7.4.37398
-rw-r--r--patches/source/vim/patches/7.4.37471
-rw-r--r--patches/source/vim/patches/7.4.37559
-rw-r--r--patches/source/vim/patches/7.4.37657
-rw-r--r--patches/source/vim/patches/7.4.377144
-rw-r--r--patches/source/vim/patches/7.4.378336
-rw-r--r--patches/source/vim/patches/7.4.37945
-rw-r--r--patches/source/vim/patches/7.4.380115
-rw-r--r--patches/source/vim/patches/7.4.38145
-rw-r--r--patches/source/vim/patches/7.4.38252
-rw-r--r--patches/source/vim/patches/7.4.38352
-rw-r--r--patches/source/vim/patches/7.4.38447
-rw-r--r--patches/source/vim/patches/7.4.38576
-rw-r--r--patches/source/vim/patches/7.4.386186
-rw-r--r--patches/source/vim/patches/7.4.387199
-rw-r--r--patches/source/vim/patches/7.4.38898
-rw-r--r--patches/source/vim/patches/7.4.389490
-rw-r--r--patches/source/vim/patches/7.4.39051
-rw-r--r--patches/source/vim/patches/7.4.391118
-rw-r--r--patches/source/vim/patches/7.4.39286
-rw-r--r--patches/source/vim/patches/7.4.3931946
-rw-r--r--patches/source/vim/patches/7.4.39456
-rw-r--r--patches/source/vim/patches/7.4.39599
-rw-r--r--patches/source/vim/patches/7.4.396291
-rw-r--r--patches/source/vim/patches/7.4.397150
-rw-r--r--patches/source/vim/patches/7.4.39852
-rw-r--r--patches/source/vim/patches/7.4.3995059
-rw-r--r--patches/source/vim/slack-desc.vim19
-rw-r--r--patches/source/vim/slack-desc.vim-gvim19
-rwxr-xr-xpatches/source/vim/vim-gvim.SlackBuild222
-rw-r--r--patches/source/vim/vim-runtime-syntax-20131002.diff0
-rwxr-xr-xpatches/source/vim/vim.SlackBuild228
-rw-r--r--patches/source/vim/vim.vimrc.diff12
-rw-r--r--patches/source/wget/doinst.sh14
-rw-r--r--patches/source/wget/slack-desc19
-rwxr-xr-xpatches/source/wget/wget.SlackBuild109
-rw-r--r--patches/source/wpa_supplicant/2017-1/rebased-v2.6-0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch174
-rw-r--r--patches/source/wpa_supplicant/2017-1/rebased-v2.6-0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch250
-rw-r--r--patches/source/wpa_supplicant/2017-1/rebased-v2.6-0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch184
-rw-r--r--patches/source/wpa_supplicant/2017-1/rebased-v2.6-0004-Prevent-installation-of-an-all-zero-TK.patch79
-rw-r--r--patches/source/wpa_supplicant/2017-1/rebased-v2.6-0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch64
-rw-r--r--patches/source/wpa_supplicant/2017-1/rebased-v2.6-0006-TDLS-Reject-TPK-TK-reconfiguration.patch132
-rw-r--r--patches/source/wpa_supplicant/2017-1/rebased-v2.6-0007-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch43
-rw-r--r--patches/source/wpa_supplicant/2017-1/rebased-v2.6-0008-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch82
-rw-r--r--patches/source/wpa_supplicant/2017-1/wpa-packet-number-reuse-with-replayed-messages.txt226
-rw-r--r--patches/source/wpa_supplicant/README.slackware55
-rw-r--r--patches/source/wpa_supplicant/config/dot.config37
-rw-r--r--patches/source/wpa_supplicant/config/wpa_gui.desktop7
-rw-r--r--patches/source/wpa_supplicant/config/wpa_gui.pngbin0 -> 5124 bytes
-rw-r--r--patches/source/wpa_supplicant/config/wpa_supplicant.conf2
-rw-r--r--patches/source/wpa_supplicant/config/wpa_supplicant.logrotate6
-rw-r--r--patches/source/wpa_supplicant/doinst.sh15
-rw-r--r--patches/source/wpa_supplicant/patches/assoc-timeout.diff16
-rw-r--r--patches/source/wpa_supplicant/patches/dbus-service-file-args.diff20
-rw-r--r--patches/source/wpa_supplicant/patches/flush-debug-output.diff50
-rw-r--r--patches/source/wpa_supplicant/patches/quiet-scan-results-message.diff16
-rw-r--r--patches/source/wpa_supplicant/slack-desc18
-rwxr-xr-xpatches/source/wpa_supplicant/wpa_supplicant.SlackBuild181
-rw-r--r--patches/source/xcb-proto/arch.use.flags9
-rw-r--r--patches/source/xcb-proto/build/xcb-proto1
-rw-r--r--patches/source/xcb-proto/configure/configure13
-rw-r--r--patches/source/xcb-proto/modularize279
-rw-r--r--patches/source/xcb-proto/noarch75
-rw-r--r--patches/source/xcb-proto/package-blacklist44
-rw-r--r--patches/source/xcb-proto/post-install/xcb-proto.post-install5
-rw-r--r--patches/source/xcb-proto/slack-desc/xcb-proto19
-rwxr-xr-xpatches/source/xcb-proto/x11.SlackBuild381
-rwxr-xr-xpatches/source/xcb-proto/xcb-proto.SlackBuild2
-rw-r--r--patches/source/xextproto/arch.use.flags9
-rw-r--r--patches/source/xextproto/build/xextproto1
-rw-r--r--patches/source/xextproto/configure/configure13
-rw-r--r--patches/source/xextproto/modularize279
-rw-r--r--patches/source/xextproto/noarch75
-rw-r--r--patches/source/xextproto/package-blacklist44
-rw-r--r--patches/source/xextproto/slack-desc/xextproto19
-rwxr-xr-xpatches/source/xextproto/x11.SlackBuild381
-rwxr-xr-xpatches/source/xextproto/xextproto.SlackBuild2
-rw-r--r--patches/source/xfce4-weather-plugin/slack-desc19
-rwxr-xr-xpatches/source/xfce4-weather-plugin/xfce4-weather-plugin.SlackBuild107
-rw-r--r--patches/source/xfce4-weather-plugin/xfce4-weather-plugin.url1
-rw-r--r--patches/source/xorg-server/arch.use.flags7
-rw-r--r--patches/source/xorg-server/build/xorg-server1
-rw-r--r--patches/source/xorg-server/configure/xorg-server50
-rw-r--r--patches/source/xorg-server/makepkg/xorg-server47
-rw-r--r--patches/source/xorg-server/modularize265
-rw-r--r--patches/source/xorg-server/noarch76
-rw-r--r--patches/source/xorg-server/package-blacklist39
-rw-r--r--patches/source/xorg-server/patch/xorg-server.patch43
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0001-Missing-parens-in-REQUEST_FIXED_SIZE-macro-CVE-2014-.patch32
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0001-glx-check-return-from-__glXGetAnswerBuffer.patch173
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0001-unchecked-malloc-may-allow-unauthed-client-to-crash-.patch41
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0002-dix-GetHosts-bounds-check-using-wrong-pointer-value-.patch35
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0002-dix-integer-overflow-in-ProcPutImage-CVE-2014-8092-1.patch38
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0003-dix-integer-overflow-in-GetHosts-CVE-2014-8092-2-4.patch50
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0004-dix-integer-overflow-in-RegionSizeof-CVE-2014-8092-3.patch129
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0005-dix-integer-overflow-in-REQUEST_FIXED_SIZE-CVE-2014-.patch35
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0006-dri2-integer-overflow-in-ProcDRI2GetBuffers-CVE-2014.patch36
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0007-dbe-unvalidated-lengths-in-DbeSwapBuffers-calls-CVE-.patch74
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0008-Xi-unvalidated-lengths-in-Xinput-extension-CVE-2014-.patch552
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0009-xcmisc-unvalidated-length-in-SProcXCMiscGetXIDList-C.patch28
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0010-Xv-unvalidated-lengths-in-XVideo-extension-swapped-p.patch180
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0011-randr-unvalidated-lengths-in-RandR-extension-swapped.patch52
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0012-render-check-request-size-before-reading-it-CVE-2014.patch37
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0013-render-unvalidated-lengths-in-Render-extn.-swapped-p.patch141
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0014-xfixes-unvalidated-length-in-SProcXFixesSelectSelect.patch28
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0015-Add-request-length-checking-test-cases-for-some-Xinp.patch214
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0016-Add-request-length-checking-test-cases-for-some-Xinp.patch90
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0017-Add-REQUEST_FIXED_SIZE-testcases-to-test-misc.c.patch75
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0018-glx-Be-more-paranoid-about-variable-length-requests-.patch48
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0019-glx-Be-more-strict-about-rejecting-invalid-image-siz.patch166
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0020-glx-Additional-paranoia-in-__glXGetAnswerBuffer-__GL.patch60
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0021-glx-Fix-image-size-computation-for-EXT_texture_integ.patch60
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0022-glx-Add-safe_-add-mul-pad-v3-CVE-2014-8093-4-6.patch83
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0023-glx-Length-checking-for-GLXRender-requests-v2-CVE-20.patch76
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0024-glx-Integer-overflow-protection-for-non-generated-re.patch226
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0025-glx-Top-level-length-checking-for-swapped-VendorPriv.patch52
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0026-glx-Request-length-checks-for-SetClientInfoARB-CVE-2.patch75
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0027-glx-Length-checking-for-non-generated-vendor-private.patch46
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0028-glx-Length-checking-for-non-generated-single-request.patch565
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0029-glx-Fix-mask-truncation-in-__glXGetAnswerBuffer-CVE-.patch35
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0030-glx-Length-checking-for-RenderLarge-requests-v2-CVE-.patch159
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0031-glx-Pass-remaining-request-length-into-varsize-v2-CV.patch935
-rw-r--r--patches/source/xorg-server/patch/xorg-server/x11.startwithblackscreen.diff14
-rw-r--r--patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-10971.diff40
-rw-r--r--patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-10972.diff36
-rw-r--r--patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12176.diff31
-rw-r--r--patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12179_p1.diff42
-rw-r--r--patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12179_p2.diff46
-rw-r--r--patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12183.diff95
-rw-r--r--patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-13723.diff116
-rw-r--r--patches/source/xorg-server/post-install/xorg-server.post-install66
-rw-r--r--patches/source/xorg-server/slack-desc/xorg-server19
-rw-r--r--patches/source/xorg-server/slack-desc/xorg-server-xephyr19
-rw-r--r--patches/source/xorg-server/slack-desc/xorg-server-xnest19
-rw-r--r--patches/source/xorg-server/slack-desc/xorg-server-xvfb19
-rwxr-xr-xpatches/source/xorg-server/x11.SlackBuild381
-rwxr-xr-xpatches/source/xorg-server/xorg-server.SlackBuild2
-rw-r--r--patches/source/xproto/arch.use.flags9
-rw-r--r--patches/source/xproto/build/xproto1
-rw-r--r--patches/source/xproto/configure/configure13
-rw-r--r--patches/source/xproto/modularize279
-rw-r--r--patches/source/xproto/noarch75
-rw-r--r--patches/source/xproto/package-blacklist44
-rw-r--r--patches/source/xproto/post-install/xproto.post-install2
-rw-r--r--patches/source/xproto/slack-desc/xproto19
-rwxr-xr-xpatches/source/xproto/x11.SlackBuild381
-rwxr-xr-xpatches/source/xproto/xproto.SlackBuild2
-rwxr-xr-xpatches/source/xscreensaver/dump.android.osx.sources.sh14
-rw-r--r--patches/source/xscreensaver/setuid.c274
-rw-r--r--patches/source/xscreensaver/slack-desc19
-rw-r--r--patches/source/xscreensaver/xscreensaver-getimage-file-5.14555
-rwxr-xr-xpatches/source/xscreensaver/xscreensaver.SlackBuild141
-rw-r--r--patches/source/xscreensaver/xscreensaver.electricsheep.diff20
-rw-r--r--patches/source/xscreensaver/xscreensaver.no.expiration.date.diff29
-rw-r--r--patches/source/xscreensaver/xscreensaver.setuid.diff179
-rw-r--r--patches/source/yptools/nsswitch.conf-nis45
-rw-r--r--patches/source/yptools/rc.yp123
-rw-r--r--patches/source/yptools/slack-desc19
-rw-r--r--patches/source/yptools/yp-tools-2.14-glibc217-crypt.diff86
-rwxr-xr-xpatches/source/yptools/yptools.SlackBuild292
1429 files changed, 180189 insertions, 0 deletions
diff --git a/patches/packages/MPlayer-1.2_20160125-x86_64-1_slack14.1.txt b/patches/packages/MPlayer-1.2_20160125-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..fcba8f20b
--- /dev/null
+++ b/patches/packages/MPlayer-1.2_20160125-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+MPlayer: MPlayer (Linux movie player)
+MPlayer:
+MPlayer: MPlayer is a movie player for Linux. It plays most MPEG, VOB, AVI,
+MPlayer: Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, FLI, RM, NuppelVideo,
+MPlayer: YUV4MPEG, FILM, RoQ, PVA files, supported by many native, XAnim,
+MPlayer: and Win32 DLL codecs. You can watch VideoCD, SVCD, DVD, 3ivx,
+MPlayer: DivX 3/4/5 and even WMV movies, too (without the avifile library).
+MPlayer: MPlayer supports 10 types of subtitles formats: VobSub,
+MPlayer: MicroDVD, SubRip, SubViewer, Sami, VPlayer, RT, SSA, AQTitle, MPsub.
+MPlayer:
+MPlayer: Homepage for MPLayer is http://www.mplayerhq.hu/
diff --git a/patches/packages/apr-1.5.0-x86_64-1_slack14.1.txt b/patches/packages/apr-1.5.0-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..462103daa
--- /dev/null
+++ b/patches/packages/apr-1.5.0-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+apr: apr (Apache Portable Runtime)
+apr:
+apr: The mission of the Apache Portable Runtime (APR) is to provide a
+apr: free library of C data structures and routines, forming a system
+apr: portability layer to as many operating systems as possible.
+apr:
+apr:
+apr:
+apr:
+apr:
+apr:
diff --git a/patches/packages/apr-util-1.5.3-x86_64-1_slack14.1.txt b/patches/packages/apr-util-1.5.3-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..8a5614af8
--- /dev/null
+++ b/patches/packages/apr-util-1.5.3-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+apr-util: apr-util (Apache Portable Runtime utilities)
+apr-util:
+apr-util: The mission of the Apache Portable Runtime (APR) is to provide a
+apr-util: free library of C data structures and routines, forming a system
+apr-util: portability layer to as many operating systems as possible.
+apr-util:
+apr-util: This package contains additional utility interfaces for APR;
+apr-util: including support for XML, LDAP, database interfaces, URI parsing,
+apr-util: and more.
+apr-util:
+apr-util:
diff --git a/patches/packages/bash-4.2.053-x86_64-2_slack14.1.txt b/patches/packages/bash-4.2.053-x86_64-2_slack14.1.txt
new file mode 100644
index 000000000..99268883a
--- /dev/null
+++ b/patches/packages/bash-4.2.053-x86_64-2_slack14.1.txt
@@ -0,0 +1,11 @@
+bash: bash (sh-compatible shell)
+bash:
+bash: The GNU Bourne-Again SHell. Bash is a sh-compatible command
+bash: interpreter that executes commands read from the standard input or
+bash: from a file. Bash also incorporates useful features from the Korn
+bash: and C shells (ksh and csh). Bash is ultimately intended to be a
+bash: conformant implementation of the IEEE Posix Shell and Tools
+bash: specification (IEEE Working Group 1003.2).
+bash:
+bash: Bash must be present for the system to boot properly.
+bash:
diff --git a/patches/packages/bind-9.9.11_P1-x86_64-1_slack14.1.txt b/patches/packages/bind-9.9.11_P1-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..3289b10db
--- /dev/null
+++ b/patches/packages/bind-9.9.11_P1-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+bind: bind (DNS server and utilities)
+bind:
+bind: The named daemon and support utilities such as dig, host, and
+bind: nslookup. Sample configuration files for running a simple caching
+bind: nameserver are included. Documentation for advanced name server
+bind: setup can be found in /usr/doc/bind-9.x.x/.
+bind:
+bind:
+bind:
+bind:
+bind:
diff --git a/patches/packages/blueman-r708-x86_64-4_slack14.1.txt b/patches/packages/blueman-r708-x86_64-4_slack14.1.txt
new file mode 100644
index 000000000..c1fff0da8
--- /dev/null
+++ b/patches/packages/blueman-r708-x86_64-4_slack14.1.txt
@@ -0,0 +1,11 @@
+blueman: Blueman (Graphical Bluetooth Manager)
+blueman:
+blueman: Blueman is a GTK+ Bluetooth Manager for tasks such as:
+blueman:
+blueman: - Connecting to 3G/EDGE/GPRS via DUN profile.
+blueman: - Connecting to/Creating bluetooth networks
+blueman: - Connecting to input and audio devices
+blueman: - Sending/Receiving/Browsing files via OBEX
+blueman: - Pairing
+blueman:
+blueman: Homepage: http://blueman-project.org
diff --git a/patches/packages/bluez-4.99-x86_64-4_slack14.1.txt b/patches/packages/bluez-4.99-x86_64-4_slack14.1.txt
new file mode 100644
index 000000000..b4b50d595
--- /dev/null
+++ b/patches/packages/bluez-4.99-x86_64-4_slack14.1.txt
@@ -0,0 +1,11 @@
+bluez: bluez (Bluetooth libraries and utilities)
+bluez:
+bluez: Bluez is the Bluetooth stack for Linux, allowing Bluetooth adaptors
+bluez: and devices to be used with Linux. This package contains the Bluez
+bluez: libraries, utilities, and other support files.
+bluez:
+bluez: For more info, visit: http://www.bluez.org
+bluez:
+bluez:
+bluez:
+bluez:
diff --git a/patches/packages/btrfs-progs-20150213-x86_64-1.txt b/patches/packages/btrfs-progs-20150213-x86_64-1.txt
new file mode 100644
index 000000000..e94dd7a9d
--- /dev/null
+++ b/patches/packages/btrfs-progs-20150213-x86_64-1.txt
@@ -0,0 +1,11 @@
+btrfs-progs: btrfs-progs (Btrfs filesystem utilities)
+btrfs-progs:
+btrfs-progs: Btrfs is a new copy on write filesystem for Linux aimed at implementing
+btrfs-progs: advanced features while focusing on fault tolerance, repair and easy
+btrfs-progs: administration. Initially developed by Oracle, Btrfs is licensed under
+btrfs-progs: the GPL and open for contribution from anyone.
+btrfs-progs:
+btrfs-progs:
+btrfs-progs:
+btrfs-progs: Btrfs homepage: http://btrfs.wiki.kernel.org
+btrfs-progs:
diff --git a/patches/packages/ca-certificates-20161130-noarch-1_slack14.1.txt b/patches/packages/ca-certificates-20161130-noarch-1_slack14.1.txt
new file mode 100644
index 000000000..a7215388c
--- /dev/null
+++ b/patches/packages/ca-certificates-20161130-noarch-1_slack14.1.txt
@@ -0,0 +1,11 @@
+ca-certificates: ca-certificates (PEM Files of CA Certificates)
+ca-certificates:
+ca-certificates: This package includes PEM files of CA certificates to allow SSL-based
+ca-certificates: applications to check for the authenticity of SSL connections.
+ca-certificates:
+ca-certificates: Homepage: http://packages.qa.debian.org/c/ca-certificates.html
+ca-certificates:
+ca-certificates:
+ca-certificates:
+ca-certificates:
+ca-certificates:
diff --git a/patches/packages/cairo-1.12.16-x86_64-1_slack14.1.txt b/patches/packages/cairo-1.12.16-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..375ea054e
--- /dev/null
+++ b/patches/packages/cairo-1.12.16-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+cairo: cairo (graphics library used by GTK+)
+cairo:
+cairo: Cairo is a vector graphics library designed to provide high-quality
+cairo: display and print output. Cairo is designed to produce
+cairo: identical output on all output media while taking advantage of display
+cairo: hardware acceleration when available (eg. through the X Render
+cairo: Extension or OpenGL).
+cairo:
+cairo:
+cairo:
+cairo:
diff --git a/patches/packages/cups-1.5.4-x86_64-4_slack14.1.txt b/patches/packages/cups-1.5.4-x86_64-4_slack14.1.txt
new file mode 100644
index 000000000..55818635f
--- /dev/null
+++ b/patches/packages/cups-1.5.4-x86_64-4_slack14.1.txt
@@ -0,0 +1,11 @@
+cups: CUPS (Common UNIX Printing System)
+cups:
+cups: The Common UNIX Printing System provides a portable printing layer for
+cups: UNIX(R)-like operating systems. It has been developed by Easy Software
+cups: Products to promote a standard printing solution for all UNIX vendors
+cups: and users. CUPS uses the Internet Printing Protocol ("IPP") as the
+cups: basis for managing print jobs and queues. The CUPS package includes
+cups: System V and Berkeley command-line interfaces, a PostScript RIP
+cups: package for supporting non-PostScript printer drivers, and tools for
+cups: creating additional printer drivers and other CUPS services.
+cups:
diff --git a/patches/packages/curl-7.60.0-x86_64-1_slack14.1.txt b/patches/packages/curl-7.60.0-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..eda0c0f28
--- /dev/null
+++ b/patches/packages/curl-7.60.0-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+curl: curl (command line URL data transfer tool)
+curl:
+curl: Curl is a command line tool for transferring data specified with URL
+curl: syntax. The command is designed to work without user interaction or
+curl: any kind of interactivity. Curl offers a busload of useful tricks
+curl: like proxy support, user authentication, ftp upload, HTTP post, SSL
+curl: (https:) connections, cookies, file transfer resume and more.
+curl:
+curl: libcurl is a library that Curl uses to do its job. It is readily
+curl: available to be used by your software, too.
+curl:
diff --git a/patches/packages/dhcp-4.4.1-x86_64-1_slack14.1.txt b/patches/packages/dhcp-4.4.1-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..beaa83c29
--- /dev/null
+++ b/patches/packages/dhcp-4.4.1-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+dhcp: dhcp (DHCP server and client utilities)
+dhcp:
+dhcp: This package provides the ISC's DHCP utilities, including both a
+dhcp: server and client. The DHCP protocol allows a host to contact a
+dhcp: central server which maintains a list of IP addresses which may be
+dhcp: assigned on one or more subnets. A DHCP client may request an
+dhcp: address from this pool, and then use it temporarily for communication
+dhcp: on the network. The DHCP protocol also provides a mechanism whereby
+dhcp: a client can learn important details about the network to which it is
+dhcp: attached, such as the location of a default router or name server.
+dhcp:
diff --git a/patches/packages/dhcpcd-6.0.5-x86_64-3_slack14.1.txt b/patches/packages/dhcpcd-6.0.5-x86_64-3_slack14.1.txt
new file mode 100644
index 000000000..31304a2ac
--- /dev/null
+++ b/patches/packages/dhcpcd-6.0.5-x86_64-3_slack14.1.txt
@@ -0,0 +1,11 @@
+dhcpcd: dhcpcd (DHCP client daemon)
+dhcpcd:
+dhcpcd: The DHCP client program dhcpcd is used to connect to a network by
+dhcpcd: contacting a DHCP server. dhcpcd gets an IP address and other
+dhcpcd: information from a corresponding DHCP server, configures the network
+dhcpcd: interface automatically, and tries to renew the lease time according
+dhcpcd: to RFC2131 or RFC1541 depending on the command line option.
+dhcpcd:
+dhcpcd:
+dhcpcd:
+dhcpcd:
diff --git a/patches/packages/dnsmasq-2.78-x86_64-1_slack14.1.txt b/patches/packages/dnsmasq-2.78-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..4029c10ff
--- /dev/null
+++ b/patches/packages/dnsmasq-2.78-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+dnsmasq: dnsmasq (small DNS and DHCP server)
+dnsmasq:
+dnsmasq: Dnsmasq is a lightweight, easy to configure DNS forwarder and DHCP
+dnsmasq: server. It is designed to provide DNS (and optionally DHCP) to a
+dnsmasq: small network, and can serve the names of local machines which are not
+dnsmasq: in the global DNS.
+dnsmasq:
+dnsmasq: Dnsmasq was written by Simon Kelley.
+dnsmasq:
+dnsmasq: Homepage: http://www.thekelleys.org.uk/dnsmasq/
+dnsmasq:
diff --git a/patches/packages/emacs-25.3-x86_64-1_slack14.1.txt b/patches/packages/emacs-25.3-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..77e793c2b
--- /dev/null
+++ b/patches/packages/emacs-25.3-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+emacs: emacs (GNU Emacs)
+emacs:
+emacs: Emacs is the extensible, customizable, self-documenting real-time
+emacs: display editor. If this seems to be a bit of a mouthful, an
+emacs: easier explanation is that Emacs is a text editor and more. At
+emacs: its core is an interpreter for Emacs Lisp, a dialect of the Lisp
+emacs: programming language with extensions to support text editing.
+emacs: This version supports X.
+emacs:
+emacs: http://www.gnu.org/software/emacs/
+emacs:
diff --git a/patches/packages/expat-2.2.2-x86_64-1_slack14.1.txt b/patches/packages/expat-2.2.2-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..fcd3a0060
--- /dev/null
+++ b/patches/packages/expat-2.2.2-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+expat: expat (C library for parsing XML)
+expat:
+expat: This is Expat, a C library for parsing XML, written by James Clark.
+expat: Expat is a stream-oriented XML parser used by Python, GNOME, Xft2,
+expat: and other things.
+expat:
+expat:
+expat:
+expat:
+expat:
+expat:
diff --git a/patches/packages/flac-1.3.1-x86_64-1_slack14.1.txt b/patches/packages/flac-1.3.1-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..a9d24d651
--- /dev/null
+++ b/patches/packages/flac-1.3.1-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+flac: flac (Free Lossless Audio Codec)
+flac:
+flac: FLAC stands for Free Lossless Audio Codec. Grossly oversimplified,
+flac: FLAC is similar to MP3, but lossless. "Free" means that the
+flac: specification of the stream format is in the public domain, and that
+flac: neither the FLAC format nor any of the implemented encoding/decoding
+flac: methods are covered by any patent. It also means that the sources for
+flac: libFLAC and libFLAC++ are available under the LGPL and the sources for
+flac: flac, metaflac, and the plugins are available under the GPL.
+flac:
+flac: FLAC was developed by Josh Coalson.
diff --git a/patches/packages/freetype-2.5.5-x86_64-2_slack14.1.txt b/patches/packages/freetype-2.5.5-x86_64-2_slack14.1.txt
new file mode 100644
index 000000000..89d99c6df
--- /dev/null
+++ b/patches/packages/freetype-2.5.5-x86_64-2_slack14.1.txt
@@ -0,0 +1,11 @@
+freetype: freetype (A Free, High-Quality, and Portable Font Engine)
+freetype:
+freetype: The FreeType engine is a free and portable TrueType font rendering
+freetype: engine. It has been developed to provide TrueType support to a
+freetype: great variety of platforms and environments.
+freetype:
+freetype:
+freetype:
+freetype:
+freetype:
+freetype:
diff --git a/patches/packages/gdk-pixbuf2-2.28.2-x86_64-2_slack14.1.txt b/patches/packages/gdk-pixbuf2-2.28.2-x86_64-2_slack14.1.txt
new file mode 100644
index 000000000..593db7699
--- /dev/null
+++ b/patches/packages/gdk-pixbuf2-2.28.2-x86_64-2_slack14.1.txt
@@ -0,0 +1,11 @@
+gdk-pixbuf2: gdk-pixbuf2 (image library used by GTK+ v2)
+gdk-pixbuf2:
+gdk-pixbuf2: The gdk-pixbuf library provides a number of features:
+gdk-pixbuf2: - GdkPixbuf structure for representing images.
+gdk-pixbuf2: - Image loading facilities, both synchronous and progressive.
+gdk-pixbuf2: - Rendering of a GdkPixbuf into various formats:
+gdk-pixbuf2: drawables (windows, pixmaps), GdkRGB buffers.
+gdk-pixbuf2: - Fast scaling and compositing of pixbufs.
+gdk-pixbuf2: - Simple animation loading (ie. animated gifs).
+gdk-pixbuf2:
+gdk-pixbuf2:
diff --git a/patches/packages/gegl-0.2.0-x86_64-3_slack14.1.txt b/patches/packages/gegl-0.2.0-x86_64-3_slack14.1.txt
new file mode 100644
index 000000000..e48bb58d5
--- /dev/null
+++ b/patches/packages/gegl-0.2.0-x86_64-3_slack14.1.txt
@@ -0,0 +1,11 @@
+gegl: GEGL (Generic Graphics Library)
+gegl:
+gegl: GEGL (Generic Graphics Library) is a graph based image processing
+gegl: framework.
+gegl:
+gegl: GEGL provides infrastructure to do demand based cached non destructive
+gegl: image editing on larger than RAM buffers. Through babl it provides
+gegl: support for a wide range of color models and pixel storage formats for
+gegl: input and output.
+gegl:
+gegl:
diff --git a/patches/packages/gimp-2.8.18-x86_64-1_slack14.1.txt b/patches/packages/gimp-2.8.18-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..7759a7efb
--- /dev/null
+++ b/patches/packages/gimp-2.8.18-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+gimp: gimp (The GNU Image Manipulation Program)
+gimp:
+gimp: The GIMP is a powerful tool for the preparation and manipulation of
+gimp: digital images. The GIMP provides the user with a wide variety of
+gimp: image manipulation, painting, processing, and rendering tools. The
+gimp: GIMP's open design and extensible architecture make for a very
+gimp: powerful end product for photo and image retouching, web graphics
+gimp: design, or digital illustration.
+gimp:
+gimp:
+gimp:
diff --git a/patches/packages/git-2.14.1-x86_64-1_slack14.1.txt b/patches/packages/git-2.14.1-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..059a95baf
--- /dev/null
+++ b/patches/packages/git-2.14.1-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+git: git (the stupid content tracker)
+git:
+git: Git is a fast, scalable, distributed revision control system with an
+git: unusually rich command set that provides both high-level operations
+git: and full access to internals.
+git:
+git: "git" can mean anything, depending on your mood.
+git:
+git: Git was originally written by Linus Torvalds and is currently
+git: maintained by Junio C. Hamano.
+git:
diff --git a/patches/packages/glibc-2.17-x86_64-11_slack14.1.txt b/patches/packages/glibc-2.17-x86_64-11_slack14.1.txt
new file mode 100644
index 000000000..9b940f889
--- /dev/null
+++ b/patches/packages/glibc-2.17-x86_64-11_slack14.1.txt
@@ -0,0 +1,11 @@
+glibc: glibc (GNU C libraries)
+glibc:
+glibc: This package contains the GNU C libraries and header files. The GNU
+glibc: C library was written originally by Roland McGrath, and is currently
+glibc: maintained by Ulrich Drepper. Some parts of the library were
+glibc: contributed or worked on by other people.
+glibc:
+glibc: You'll need this package to compile programs.
+glibc:
+glibc:
+glibc:
diff --git a/patches/packages/glibc-i18n-2.17-x86_64-11_slack14.1.txt b/patches/packages/glibc-i18n-2.17-x86_64-11_slack14.1.txt
new file mode 100644
index 000000000..7384659b2
--- /dev/null
+++ b/patches/packages/glibc-i18n-2.17-x86_64-11_slack14.1.txt
@@ -0,0 +1,11 @@
+glibc-i18n: glibc-i18n (locale files from glibc)
+glibc-i18n:
+glibc-i18n: These files go in /usr/lib/locale and /usr/share/i18n/ to provide
+glibc-i18n: internationalization support. You'll need this package unless you
+glibc-i18n: will be using US English only.
+glibc-i18n:
+glibc-i18n:
+glibc-i18n:
+glibc-i18n:
+glibc-i18n:
+glibc-i18n:
diff --git a/patches/packages/glibc-profile-2.17-x86_64-11_slack14.1.txt b/patches/packages/glibc-profile-2.17-x86_64-11_slack14.1.txt
new file mode 100644
index 000000000..f9b53ba66
--- /dev/null
+++ b/patches/packages/glibc-profile-2.17-x86_64-11_slack14.1.txt
@@ -0,0 +1,11 @@
+glibc-profile: glibc-profile (GNU C libraries with profiling support)
+glibc-profile:
+glibc-profile: This package contains static versions of the GNU C libraries with
+glibc-profile: support for profiling binaries using gprof. gprof calculates how
+glibc-profile: much time a program spends in each routine which can suggest where
+glibc-profile: to concentrate efforts to improve performance.
+glibc-profile:
+glibc-profile: See the gprof man page for more details.
+glibc-profile:
+glibc-profile:
+glibc-profile:
diff --git a/patches/packages/glibc-solibs-2.17-x86_64-11_slack14.1.txt b/patches/packages/glibc-solibs-2.17-x86_64-11_slack14.1.txt
new file mode 100644
index 000000000..3824184d8
--- /dev/null
+++ b/patches/packages/glibc-solibs-2.17-x86_64-11_slack14.1.txt
@@ -0,0 +1,11 @@
+glibc-solibs: glibc-solibs (shared GNU C libraries)
+glibc-solibs:
+glibc-solibs: This package contains the shared libraries, binaries, and support
+glibc-solibs: files required to run most Linux applications linked with glibc.
+glibc-solibs:
+glibc-solibs:
+glibc-solibs:
+glibc-solibs:
+glibc-solibs:
+glibc-solibs:
+glibc-solibs:
diff --git a/patches/packages/glibc-zoneinfo-2018e-noarch-2_slack14.1.txt b/patches/packages/glibc-zoneinfo-2018e-noarch-2_slack14.1.txt
new file mode 100644
index 000000000..c74ccc6a9
--- /dev/null
+++ b/patches/packages/glibc-zoneinfo-2018e-noarch-2_slack14.1.txt
@@ -0,0 +1,11 @@
+glibc-zoneinfo: glibc-zoneinfo (timezone database)
+glibc-zoneinfo:
+glibc-zoneinfo: This package allows you to configure your time zone.
+glibc-zoneinfo:
+glibc-zoneinfo: This timezone database comes from the tzdata and tzcode packages by
+glibc-zoneinfo: Arthur David Olson et.al. The latest version and more information
+glibc-zoneinfo: may be found at: http://www.iana.org/time-zones
+glibc-zoneinfo:
+glibc-zoneinfo: Use the timeconfig utility to set your local time zone.
+glibc-zoneinfo:
+glibc-zoneinfo:
diff --git a/patches/packages/gnupg-1.4.22-x86_64-1_slack14.1.txt b/patches/packages/gnupg-1.4.22-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..59d381368
--- /dev/null
+++ b/patches/packages/gnupg-1.4.22-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+gnupg: gnupg (The GNU Privacy Guard)
+gnupg:
+gnupg: GnuPG is GNU's tool for secure communication and data storage. It can
+gnupg: be used to encrypt data and to create digital signatures. It includes
+gnupg: an advanced key management facility and is compliant with the proposed
+gnupg: OpenPGP Internet standard as described in RFC2440.
+gnupg:
+gnupg:
+gnupg:
+gnupg:
+gnupg:
diff --git a/patches/packages/gnupg2-2.0.24-x86_64-1_slack14.1.txt b/patches/packages/gnupg2-2.0.24-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..73fb401dc
--- /dev/null
+++ b/patches/packages/gnupg2-2.0.24-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+gnupg2: GnuPG2 (The GNU Privacy Guard version 2.x)
+gnupg2:
+gnupg2: GnuPG is GNU's tool for secure communication and data storage. It can
+gnupg2: be used to encrypt data and to create digital signatures. It includes
+gnupg2: an advanced key management facility and is compliant with the proposed
+gnupg2: OpenPGP Internet standard as described in RFC2440 and the S/MIME
+gnupg2: standard as described by several RFCs.
+gnupg2:
+gnupg2: GnuPG 2.0 is the stable version of GnuPG integrating support for
+gnupg2: OpenPGP and S/MIME. It does not conflict with an installed 1.4.x
+gnupg2: OpenPGP-only version.
diff --git a/patches/packages/gnutls-3.3.26-x86_64-1_slack14.1.txt b/patches/packages/gnutls-3.3.26-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..40c151dc5
--- /dev/null
+++ b/patches/packages/gnutls-3.3.26-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+gnutls: gnutls (GNU TLS library)
+gnutls:
+gnutls: This is a TLS (Transport Layer Security) 1.0 and SSL (Secure Sockets
+gnutls: Layer) 3.0 implementation. In brief, GnuTLS can be described as a
+gnutls: library which offers an API to access secure communication protocols.
+gnutls: These protocols provide privacy over insecure lines, and were designed
+gnutls: to prevent eavesdropping, tampering, or message forgery.
+gnutls:
+gnutls: Homepage: http://www.gnu.org/software/gnutls/
+gnutls:
+gnutls:
diff --git a/patches/packages/grub-2.00-x86_64-3_slack14.1.txt b/patches/packages/grub-2.00-x86_64-3_slack14.1.txt
new file mode 100644
index 000000000..7892f242b
--- /dev/null
+++ b/patches/packages/grub-2.00-x86_64-3_slack14.1.txt
@@ -0,0 +1,11 @@
+grub: GRUB (the GRand Unified Bootloader)
+grub:
+grub: GNU GRUB is a multiboot boot loader.
+grub:
+grub: Website: http://www.gnu.org/software/grub/
+grub:
+grub:
+grub:
+grub:
+grub:
+grub:
diff --git a/patches/packages/gtk+2-2.24.20-x86_64-2_slack14.1.txt b/patches/packages/gtk+2-2.24.20-x86_64-2_slack14.1.txt
new file mode 100644
index 000000000..22afdcc8f
--- /dev/null
+++ b/patches/packages/gtk+2-2.24.20-x86_64-2_slack14.1.txt
@@ -0,0 +1,11 @@
+gtk+2: GTK+ version 2 (multi-platform GUI toolkit)
+gtk+2:
+gtk+2: This is GTK+, a multi-platform toolkit for creating graphical user
+gtk+2: interfaces. Offering a complete set of widgets, GTK+ is suitable for
+gtk+2: projects ranging from small one-off projects to complete application
+gtk+2: suites.
+gtk+2:
+gtk+2:
+gtk+2:
+gtk+2:
+gtk+2:
diff --git a/patches/packages/httpd-2.4.29-x86_64-1_slack14.1.txt b/patches/packages/httpd-2.4.29-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..e0fe474dc
--- /dev/null
+++ b/patches/packages/httpd-2.4.29-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+httpd: httpd (The Apache HTTP Server)
+httpd:
+httpd: Apache is an HTTP server designed as a plug-in replacement for the
+httpd: NCSA HTTP server. It fixes numerous bugs in the NCSA server and
+httpd: includes many frequently requested new features, and has an API which
+httpd: allows it to be extended to meet users' needs more easily.
+httpd:
+httpd: Apache is the most popular web server in the known universe; over
+httpd: half of the servers on the Internet are running Apache or one of
+httpd: its variants.
+httpd:
diff --git a/patches/packages/imagemagick-6.8.6_10-x86_64-3_slack14.1.txt b/patches/packages/imagemagick-6.8.6_10-x86_64-3_slack14.1.txt
new file mode 100644
index 000000000..20e32054a
--- /dev/null
+++ b/patches/packages/imagemagick-6.8.6_10-x86_64-3_slack14.1.txt
@@ -0,0 +1,11 @@
+imagemagick: imagemagick (a robust collection of image processing tools)
+imagemagick:
+imagemagick: ImageMagick is a collection of tools for manipulating and displaying
+imagemagick: digital images. It can merge images, transform image dimensions,
+imagemagick: do screen captures, create animation sequences, and convert between
+imagemagick: many different image formats.
+imagemagick:
+imagemagick: ImageMagick was written by John Cristy of ImageMagick Studio.
+imagemagick:
+imagemagick: Home page: http://www.imagemagick.org/
+imagemagick:
diff --git a/patches/packages/inputproto-2.3.2-noarch-1_slack14.1.txt b/patches/packages/inputproto-2.3.2-noarch-1_slack14.1.txt
new file mode 100644
index 000000000..e5287dfec
--- /dev/null
+++ b/patches/packages/inputproto-2.3.2-noarch-1_slack14.1.txt
@@ -0,0 +1,11 @@
+inputproto: inputproto (C prototypes for X Input extension)
+inputproto:
+inputproto: inputproto is part of X11.
+inputproto:
+inputproto: For more information about the X.Org Foundation (the providers of the
+inputproto: X.Org implementation of the X Window System), see their website:
+inputproto:
+inputproto: http://www.x.org
+inputproto:
+inputproto:
+inputproto:
diff --git a/patches/packages/irssi-1.0.7-x86_64-1_slack14.1.txt b/patches/packages/irssi-1.0.7-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..c7127d1f9
--- /dev/null
+++ b/patches/packages/irssi-1.0.7-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+irssi: irssi (Internet Relay Chat client)
+irssi:
+irssi: Irssi is an Internet Relay Chat client. Designed to be both secure
+irssi: and expandable, irssi is easily customized using modules and scripts.
+irssi:
+irssi: For more information, visit: http://irssi.org
+irssi:
+irssi: irssi was written by Timo Sirainen.
+irssi:
+irssi:
+irssi:
diff --git a/patches/packages/jasper-1.900.1-x86_64-4_slack14.1.txt b/patches/packages/jasper-1.900.1-x86_64-4_slack14.1.txt
new file mode 100644
index 000000000..77319af7f
--- /dev/null
+++ b/patches/packages/jasper-1.900.1-x86_64-4_slack14.1.txt
@@ -0,0 +1,11 @@
+jasper: jasper (free implementation of the JPEG-2000 standard)
+jasper:
+jasper: The JasPer Project is an open-source initiative to provide a free
+jasper: software-based reference implementation of the codec specified in the
+jasper: JPEG-2000 Part-1 standard (i.e., ISO/IEC 15444-1).jasper:
+jasper:
+jasper: jasper home: http://www.ece.uvic.ca/~mdadams/jasper/
+jasper:
+jasper:
+jasper:
+jasper:
diff --git a/patches/packages/kdelibs-4.10.5-x86_64-3_slack14.1.txt b/patches/packages/kdelibs-4.10.5-x86_64-3_slack14.1.txt
new file mode 100644
index 000000000..d192ec7a5
--- /dev/null
+++ b/patches/packages/kdelibs-4.10.5-x86_64-3_slack14.1.txt
@@ -0,0 +1,11 @@
+kdelibs: kdelibs (KDE libraries)
+kdelibs:
+kdelibs: System libraries and other resources required for the KDE Platform.
+kdelibs:
+kdelibs:
+kdelibs:
+kdelibs:
+kdelibs:
+kdelibs:
+kdelibs:
+kdelibs:
diff --git a/patches/packages/libX11-1.6.4-x86_64-1_slack14.1.txt b/patches/packages/libX11-1.6.4-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..7a0038ff4
--- /dev/null
+++ b/patches/packages/libX11-1.6.4-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+libX11: libX11 (Core X11 protocol client library)
+libX11:
+libX11: libX11 is part of X11.
+libX11:
+libX11: For more information about the X.Org Foundation (the providers of the
+libX11: X.Org implementation of the X Window System), see their website:
+libX11:
+libX11: http://www.x.org
+libX11:
+libX11:
+libX11:
diff --git a/patches/packages/libXcursor-1.1.15-x86_64-1_slack14.1.txt b/patches/packages/libXcursor-1.1.15-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..a95a82df7
--- /dev/null
+++ b/patches/packages/libXcursor-1.1.15-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+libXcursor: libXcursor (X Window System Cursor management library)
+libXcursor:
+libXcursor: libXcursor is part of X11.
+libXcursor:
+libXcursor: For more information about the X.Org Foundation (the providers of the
+libXcursor: X.Org implementation of the X Window System), see their website:
+libXcursor:
+libXcursor: http://www.x.org
+libXcursor:
+libXcursor:
+libXcursor:
diff --git a/patches/packages/libXext-1.3.3-x86_64-1_slack14.1.txt b/patches/packages/libXext-1.3.3-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..4a7d59523
--- /dev/null
+++ b/patches/packages/libXext-1.3.3-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+libXext: libXext (library for common extensions to the X11 protocol)
+libXext:
+libXext: libXext is part of X11.
+libXext:
+libXext: For more information about the X.Org Foundation (the providers of the
+libXext: X.Org implementation of the X Window System), see their website:
+libXext:
+libXext: http://www.x.org
+libXext:
+libXext:
+libXext:
diff --git a/patches/packages/libXfixes-5.0.3-x86_64-1_slack14.1.txt b/patches/packages/libXfixes-5.0.3-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..cad880c53
--- /dev/null
+++ b/patches/packages/libXfixes-5.0.3-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+libXfixes: libXfixes (client library for the Xfixes extension)
+libXfixes:
+libXfixes: libXfixes is part of X11.
+libXfixes:
+libXfixes: For more information about the X.Org Foundation (the providers of the
+libXfixes: X.Org implementation of the X Window System), see their website:
+libXfixes:
+libXfixes: http://www.x.org
+libXfixes:
+libXfixes:
+libXfixes:
diff --git a/patches/packages/libXfont-1.4.7-x86_64-2_slack14.1.txt b/patches/packages/libXfont-1.4.7-x86_64-2_slack14.1.txt
new file mode 100644
index 000000000..fd4ecec9b
--- /dev/null
+++ b/patches/packages/libXfont-1.4.7-x86_64-2_slack14.1.txt
@@ -0,0 +1,11 @@
+libXfont: libXfont (library for legacy X11 font system)
+libXfont:
+libXfont: libXfont provides the core of the legacy X11 font system, handling the
+libXfont: index files (fonts.dir, fonts.alias, fonts.scale), the various font
+libXfont: file formats, and rasterizing them. It is used by the X servers, the
+libXfont: X Font Server (xfs), and some font utilities (bdftopcf for instance),
+libXfont: but should not be used by normal X11 clients. X11 clients access fonts
+libXfont: via either the new API's in libXft, or the legacy API's in libX11.
+libXfont:
+libXfont:
+libXfont:
diff --git a/patches/packages/libXi-1.7.8-x86_64-1_slack14.1.txt b/patches/packages/libXi-1.7.8-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..f8ef8ec2d
--- /dev/null
+++ b/patches/packages/libXi-1.7.8-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+libXi: libXi (library for the X Input Extension)
+libXi:
+libXi: libXi is part of X11.
+libXi:
+libXi: For more information about the X.Org Foundation (the providers of the
+libXi: X.Org implementation of the X Window System), see their website:
+libXi:
+libXi: http://www.x.org
+libXi:
+libXi:
+libXi:
diff --git a/patches/packages/libXrandr-1.5.1-x86_64-1_slack14.1.txt b/patches/packages/libXrandr-1.5.1-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..7025c9ef4
--- /dev/null
+++ b/patches/packages/libXrandr-1.5.1-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+libXrandr: libXrandr (X Resize, Rotate and Reflection extension library)
+libXrandr:
+libXrandr: libXrandr is part of X11.
+libXrandr:
+libXrandr: For more information about the X.Org Foundation (the providers of the
+libXrandr: X.Org implementation of the X Window System), see their website:
+libXrandr:
+libXrandr: http://www.x.org
+libXrandr:
+libXrandr:
+libXrandr:
diff --git a/patches/packages/libXrender-0.9.10-x86_64-1_slack14.1.txt b/patches/packages/libXrender-0.9.10-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..254411dd3
--- /dev/null
+++ b/patches/packages/libXrender-0.9.10-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+libXrender: libXrender (library for the Render Extension to the X11 protocol)
+libXrender:
+libXrender: libXrender is part of X11.
+libXrender:
+libXrender: For more information about the X.Org Foundation (the providers of the
+libXrender: X.Org implementation of the X Window System), see their website:
+libXrender:
+libXrender: http://www.x.org
+libXrender:
+libXrender:
+libXrender:
diff --git a/patches/packages/libXres-1.2.0-x86_64-1_slack14.1.txt b/patches/packages/libXres-1.2.0-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..6abe3e3db
--- /dev/null
+++ b/patches/packages/libXres-1.2.0-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+libXres: libXres (X-Resource extension client library)
+libXres:
+libXres: libXres is part of X11.
+libXres:
+libXres: For more information about the X.Org Foundation (the providers of the
+libXres: X.Org implementation of the X Window System), see their website:
+libXres:
+libXres: http://www.x.org
+libXres:
+libXres:
+libXres:
diff --git a/patches/packages/libXtst-1.2.3-x86_64-1_slack14.1.txt b/patches/packages/libXtst-1.2.3-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..b44d139fb
--- /dev/null
+++ b/patches/packages/libXtst-1.2.3-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+libXtst: libXtst (client library for the XTEST & RECORD extensions)
+libXtst:
+libXtst: libXtst is part of X11.
+libXtst:
+libXtst: For more information about the X.Org Foundation (the providers of the
+libXtst: X.Org implementation of the X Window System), see their website:
+libXtst:
+libXtst: http://www.x.org
+libXtst:
+libXtst:
+libXtst:
diff --git a/patches/packages/libXv-1.0.11-x86_64-1_slack14.1.txt b/patches/packages/libXv-1.0.11-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..57e519053
--- /dev/null
+++ b/patches/packages/libXv-1.0.11-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+libXv: libXv (library for the X Video (Xv) extension to the X Window System)
+libXv:
+libXv: libXv is part of X11.
+libXv:
+libXv: For more information about the X.Org Foundation (the providers of the
+libXv: X.Org implementation of the X Window System), see their website:
+libXv:
+libXv: http://www.x.org
+libXv:
+libXv:
+libXv:
diff --git a/patches/packages/libXvMC-1.0.10-x86_64-1_slack14.1.txt b/patches/packages/libXvMC-1.0.10-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..b23d9bd23
--- /dev/null
+++ b/patches/packages/libXvMC-1.0.10-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+libXvMC: libXvMC (X.Org X11 libXvMC runtime library)
+libXvMC:
+libXvMC: libXvMC is part of X11.
+libXvMC:
+libXvMC: For more information about the X.Org Foundation (the providers of the
+libXvMC: X.Org implementation of the X Window System), see their website:
+libXvMC:
+libXvMC: http://www.x.org
+libXvMC:
+libXvMC:
+libXvMC:
diff --git a/patches/packages/libarchive-3.2.1-x86_64-1_slack14.1.txt b/patches/packages/libarchive-3.2.1-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..159b033ac
--- /dev/null
+++ b/patches/packages/libarchive-3.2.1-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+libarchive: libarchive (archive reading library)
+libarchive:
+libarchive: Libarchive is a programming library that can create and read
+libarchive: several different streaming archive formats, including most
+libarchive: popular TAR variants and several CPIO formats. It can also
+libarchive: write SHAR archives.
+libarchive:
+libarchive: Homepage: http://libarchive.org
+libarchive:
+libarchive:
+libarchive:
diff --git a/patches/packages/libevent-2.0.22-x86_64-1_slack14.1.txt b/patches/packages/libevent-2.0.22-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..29b2f2882
--- /dev/null
+++ b/patches/packages/libevent-2.0.22-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+libevent: libevent (event loop library)
+libevent:
+libevent: libevent is meant to replace the event loop found in event driven
+libevent: network servers. An application just needs to call event_dispatch()
+libevent: and then add or remove events dynamically without having to change the
+libevent: event loop. The libevent API provides a mechanism to execute a
+libevent: callback function when a specific event occurs on a file descriptor or
+libevent: after a timeout has been reached.
+libevent:
+libevent: Homepage: http://libevent.org
+libevent:
diff --git a/patches/packages/libgcrypt-1.5.6-x86_64-1_slack14.1.txt b/patches/packages/libgcrypt-1.5.6-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..079f2133e
--- /dev/null
+++ b/patches/packages/libgcrypt-1.5.6-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+libgcrypt: libgcrypt (General purpose crypto library)
+libgcrypt:
+libgcrypt: Libgcrypt is a general purpose crypto library based on the code
+libgcrypt: used in GnuPG.
+libgcrypt:
+libgcrypt:
+libgcrypt:
+libgcrypt:
+libgcrypt:
+libgcrypt:
+libgcrypt:
diff --git a/patches/packages/libidn-1.34-x86_64-1_slack14.1.txt b/patches/packages/libidn-1.34-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..86ffee4f9
--- /dev/null
+++ b/patches/packages/libidn-1.34-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+libidn: libidn (GNU Internationalized Domain Name library)
+libidn:
+libidn: GNU Libidn is an implementation of the Stringprep, Punycode and IDNA
+libidn: specifications defined by the IETF Internationalized Domain Names
+libidn: (IDN) working group, used for internationalized domain names.
+libidn:
+libidn:
+libidn:
+libidn:
+libidn:
+libidn:
diff --git a/patches/packages/libiodbc-3.52.8-x86_64-1_slack14.1.txt b/patches/packages/libiodbc-3.52.8-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..cc7615071
--- /dev/null
+++ b/patches/packages/libiodbc-3.52.8-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+libiodbc: libiodbc (Independent Open DataBase Connectivity)
+libiodbc:
+libiodbc: iODBC is the acronym for Independent Open DataBase Connectivity,
+libiodbc: an Open Source platform independent implementation of both the ODBC
+libiodbc: and X/Open specifications. It allows for developing solutions
+libiodbc: that are language, platform and database independent.
+libiodbc:
+libiodbc:
+libiodbc:
+libiodbc: Homepage: http://iodbc.org/
+libiodbc:
diff --git a/patches/packages/libjpeg-v8a-x86_64-2_slack14.1.txt b/patches/packages/libjpeg-v8a-x86_64-2_slack14.1.txt
new file mode 100644
index 000000000..5b4a1f09a
--- /dev/null
+++ b/patches/packages/libjpeg-v8a-x86_64-2_slack14.1.txt
@@ -0,0 +1,11 @@
+libjpeg: libjpeg (Independent JPEG Group's JPEG software)
+libjpeg:
+libjpeg: Software to implement JPEG image compression and decompression. JPEG
+libjpeg: (pronounced 'jay-peg') is a standardized compression method for
+libjpeg: full-color and gray-scale images. JPEG is intended for compressing
+libjpeg: 'real-world' scenes; cartoons and other non-realistic images are not
+libjpeg: its strong suit. JPEG is lossy, however, on typical images of
+libjpeg: real-world scenes, very good compression levels can be obtained with
+libjpeg: no visible change, and amazingly high compression levels are possible
+libjpeg: if you can tolerate a low-quality image.
+libjpeg:
diff --git a/patches/packages/libpcap-1.8.1-x86_64-1_slack14.1.txt b/patches/packages/libpcap-1.8.1-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..c8c985f3b
--- /dev/null
+++ b/patches/packages/libpcap-1.8.1-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+libpcap: libpcap (packet capture library)
+libpcap:
+libpcap: libpcap is a library for user-level packet capture. libpcap provides
+libpcap: a portable framework for low-level network monitoring. Applications
+libpcap: include network statistics collection, security monitoring, network
+libpcap: debugging, etc. The tcpdump utility uses libpcap.
+libpcap:
+libpcap: Project homepage: http://www.tcpdump.org
+libpcap:
+libpcap:
+libpcap:
diff --git a/patches/packages/libpng-1.4.20-x86_64-1_slack14.1.txt b/patches/packages/libpng-1.4.20-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..3d0deb675
--- /dev/null
+++ b/patches/packages/libpng-1.4.20-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+libpng: libpng (Portable Network Graphics library)
+libpng:
+libpng: PNG (Portable Network Graphics) is an extensible file format for the
+libpng: lossless, portable, well-compressed storage of raster images. PNG
+libpng: provides a patent-free replacement for GIF and can also replace many
+libpng: common uses of TIFF. Indexed-color, grayscale, and truecolor images
+libpng: are supported, plus an optional alpha channel. Sample depths range
+libpng: from 1 to 16 bits.
+libpng:
+libpng:
+libpng:
diff --git a/patches/packages/libsndfile-1.0.26-x86_64-1_slack14.1.txt b/patches/packages/libsndfile-1.0.26-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..ce6d96041
--- /dev/null
+++ b/patches/packages/libsndfile-1.0.26-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+libsndfile: libsndfile (C library for reading and writing wav files)
+libsndfile:
+libsndfile: Libsndfile is a C library for reading and writing files containing
+libsndfile: sampled sound (such as MS Windows WAV and Apple/SGI AIFF format).
+libsndfile:
+libsndfile: Homepage: http://www.mega-nerd.com/libsndfile/
+libsndfile:
+libsndfile:
+libsndfile:
+libsndfile:
+libsndfile:
diff --git a/patches/packages/libsoup-2.42.2-x86_64-2_slack14.1.txt b/patches/packages/libsoup-2.42.2-x86_64-2_slack14.1.txt
new file mode 100644
index 000000000..45e217419
--- /dev/null
+++ b/patches/packages/libsoup-2.42.2-x86_64-2_slack14.1.txt
@@ -0,0 +1,11 @@
+libsoup: libsoup (an HTTP client/server library)
+libsoup:
+libsoup: Soup is an HTTP client/server library implementation in C. It uses
+libsoup: GObjects and the glib main loop to integrate well with GTK+
+libsoup: applications, and has a synchronous API suitable for use in threaded
+libsoup: applications.
+libsoup:
+libsoup:
+libsoup:
+libsoup:
+libsoup:
diff --git a/patches/packages/libssh-0.7.3-x86_64-1_slack14.1.txt b/patches/packages/libssh-0.7.3-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..89e201c5f
--- /dev/null
+++ b/patches/packages/libssh-0.7.3-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+libssh: libssh (library implementing ssh protocols)
+libssh:
+libssh: libssh is a mulitplatform C library implementing the SSHv2 and SSHv1
+libssh: protocol on client and server side. With libssh, you can remotely
+libssh: execute programs, transfer files, and use a secure and transparent
+libssh: tunnel for your remote applications.
+libssh:
+libssh: Homepage: http://www.libssh.org/
+libssh:
+libssh:
+libssh:
diff --git a/patches/packages/libtasn1-3.6-x86_64-1_slack14.1.txt b/patches/packages/libtasn1-3.6-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..20e57f4e6
--- /dev/null
+++ b/patches/packages/libtasn1-3.6-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+libtasn1: libtasn1 (ASN.1 library)
+libtasn1:
+libtasn1: Libtasn1 is the GNU ASN.1 library. Abstract Syntax Notation One
+libtasn1: (ASN.1) is a standard and flexible notation that describes rules and
+libtasn1: structures for representing, encoding, transmitting, and decoding
+libtasn1: data in telecommunications and computer networking.
+libtasn1:
+libtasn1: Libtasn1 was written by Fabio Fiorina.
+libtasn1:
+libtasn1:
+libtasn1:
diff --git a/patches/packages/libvorbis-1.3.6-x86_64-1_slack14.1.txt b/patches/packages/libvorbis-1.3.6-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..aeddb637e
--- /dev/null
+++ b/patches/packages/libvorbis-1.3.6-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+libvorbis: libvorbis (Ogg Vorbis library)
+libvorbis:
+libvorbis: This library supports the Vorbis General Audio Compression Codec
+libvorbis: (commonly known as Ogg Vorbis). Ogg Vorbis is a fully open,
+libvorbis: non-proprietary, patent-and-royalty-free, general-purpose compressed
+libvorbis: audio format for audio and music at fixed and variable bitrates.
+libvorbis:
+libvorbis: The libvorbis library requires libao and libogg. You'll find some
+libvorbis: basic tools for creating and using Ogg Vorbis files in the
+libvorbis: vorbis-tools package.
+libvorbis:
diff --git a/patches/packages/libwmf-0.2.8.4-x86_64-6_slack14.1.txt b/patches/packages/libwmf-0.2.8.4-x86_64-6_slack14.1.txt
new file mode 100644
index 000000000..9ce901b81
--- /dev/null
+++ b/patches/packages/libwmf-0.2.8.4-x86_64-6_slack14.1.txt
@@ -0,0 +1,11 @@
+libwmf: libwmf (WMF graphics format library)
+libwmf:
+libwmf: libwmf is a library for interpreting metafile images and either
+libwmf: displaying them using X or converting them to standard formats such
+libwmf: as PNG, JPEG, PS, EPS and SVG.
+libwmf:
+libwmf:
+libwmf:
+libwmf:
+libwmf:
+libwmf:
diff --git a/patches/packages/libxcb-1.11.1-x86_64-2_slack14.1.txt b/patches/packages/libxcb-1.11.1-x86_64-2_slack14.1.txt
new file mode 100644
index 000000000..cc9d7054e
--- /dev/null
+++ b/patches/packages/libxcb-1.11.1-x86_64-2_slack14.1.txt
@@ -0,0 +1,11 @@
+libxcb: libxcb (X protocol C-language Binding)
+libxcb:
+libxcb: The XCB library provides an interface to the X Window System protocol
+libxcb: which is fully capable of replacing Xlib. In fact, libX11 makes use
+libxcb: of libxcb as much as possible. :-) Porting to XCB has several
+libxcb: advantages such as a smaller memory footprint, latency hiding, direct
+libxcb: protocol access, and improved thread support.
+libxcb:
+libxcb:
+libxcb:
+libxcb:
diff --git a/patches/packages/libxml2-2.9.5-x86_64-1_slack14.1.txt b/patches/packages/libxml2-2.9.5-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..806c97658
--- /dev/null
+++ b/patches/packages/libxml2-2.9.5-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+libxml2: libxml2 (XML parser library)
+libxml2:
+libxml2: Libxml2 is the XML C parser library and toolkit. XML itself is a
+libxml2: metalanguage to design markup languages -- i.e. a text language where
+libxml2: structures are added to the content using extra "markup" information
+libxml2: enclosed between angle brackets. HTML is the most well-known markup
+libxml2: language. Though the library is written in C, a variety of language
+libxml2: bindings make it available in other environments.
+libxml2:
+libxml2:
+libxml2:
diff --git a/patches/packages/libxslt-1.1.29-x86_64-1_slack14.1.txt b/patches/packages/libxslt-1.1.29-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..561c005a5
--- /dev/null
+++ b/patches/packages/libxslt-1.1.29-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+libxslt: libxslt (XML transformation library)
+libxslt:
+libxslt: XSLT support for libxml2. (XSLT is a language used for transforming
+libxslt: XML documents)
+libxslt:
+libxslt:
+libxslt:
+libxslt:
+libxslt:
+libxslt:
+libxslt:
diff --git a/patches/packages/libyaml-0.1.6-x86_64-1_slack14.1.txt b/patches/packages/libyaml-0.1.6-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..0d9e6c943
--- /dev/null
+++ b/patches/packages/libyaml-0.1.6-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+libyaml: libyaml (YAML parser, written in C)
+libyaml:
+libyaml: YAML Ain't Markup Language. It is a human friendly data serialization
+libyaml: standard for all programming languages.
+libyaml:
+libyaml: Homepage: http://pyyaml.org/wiki/LibYAML
+libyaml:
+libyaml:
+libyaml:
+libyaml:
+libyaml:
diff --git a/patches/packages/linux-3.10.107/kernel-generic-3.10.107-x86_64-2.txt b/patches/packages/linux-3.10.107/kernel-generic-3.10.107-x86_64-2.txt
new file mode 100644
index 000000000..b99e55093
--- /dev/null
+++ b/patches/packages/linux-3.10.107/kernel-generic-3.10.107-x86_64-2.txt
@@ -0,0 +1,11 @@
+kernel-generic: kernel-generic (a general purpose SMP Linux kernel)
+kernel-generic:
+kernel-generic: This is a Linux kernel with built-in support for most disk
+kernel-generic: controllers. To use filesystems, or to load support for a SCSI or
+kernel-generic: other controller, then you'll need to load one or more kernel
+kernel-generic: modules using an initial ramdisk, or initrd. For more information
+kernel-generic: about creating an initrd, see the README.initrd file in the /boot
+kernel-generic: directory.
+kernel-generic:
+kernel-generic: SMP is "Symmetric multiprocessing", or multiple CPU/core support.
+kernel-generic:
diff --git a/patches/packages/linux-3.10.107/kernel-headers-3.10.107-x86-2.txt b/patches/packages/linux-3.10.107/kernel-headers-3.10.107-x86-2.txt
new file mode 100644
index 000000000..27b46a0e6
--- /dev/null
+++ b/patches/packages/linux-3.10.107/kernel-headers-3.10.107-x86-2.txt
@@ -0,0 +1,11 @@
+kernel-headers: kernel-headers (Linux kernel include files)
+kernel-headers:
+kernel-headers: These are the include files from the Linux kernel.
+kernel-headers:
+kernel-headers: You'll need these to compile most system software for Linux.
+kernel-headers:
+kernel-headers:
+kernel-headers:
+kernel-headers:
+kernel-headers:
+kernel-headers:
diff --git a/patches/packages/linux-3.10.107/kernel-huge-3.10.107-x86_64-2.txt b/patches/packages/linux-3.10.107/kernel-huge-3.10.107-x86_64-2.txt
new file mode 100644
index 000000000..953570076
--- /dev/null
+++ b/patches/packages/linux-3.10.107/kernel-huge-3.10.107-x86_64-2.txt
@@ -0,0 +1,11 @@
+kernel-huge: kernel-huge (a fully-loaded SMP Linux kernel)
+kernel-huge:
+kernel-huge: This is a Linux kernel with built-in support for most disk
+kernel-huge: controllers. If you're looking for a more stripped down kernel
+kernel-huge: (this one contains everything but the kitchen sink ;-), then install
+kernel-huge: the kernel-generic in the /boot directory along with an initrd to
+kernel-huge: load support for your boot device and filesystem. For instructions
+kernel-huge: on the initrd, see README.initrd in the /boot directory.
+kernel-huge:
+kernel-huge: SMP is "Symmetric multiprocessing", or multiple CPU/core support.
+kernel-huge:
diff --git a/patches/packages/linux-3.10.107/kernel-modules-3.10.107-x86_64-2.txt b/patches/packages/linux-3.10.107/kernel-modules-3.10.107-x86_64-2.txt
new file mode 100644
index 000000000..56067d436
--- /dev/null
+++ b/patches/packages/linux-3.10.107/kernel-modules-3.10.107-x86_64-2.txt
@@ -0,0 +1,11 @@
+kernel-modules: kernel-modules (Linux kernel modules)
+kernel-modules:
+kernel-modules: A kernel module is a piece of object code that can be dynamically
+kernel-modules: loaded into the Linux kernel to provide new kernel functions. Most of
+kernel-modules: these modules provide support for devices such as CD-ROM drives, tape
+kernel-modules: drives, and ethernet cards. You can choose which modules to load by
+kernel-modules: editing /etc/rc.d/rc.modules.
+kernel-modules:
+kernel-modules:
+kernel-modules:
+kernel-modules:
diff --git a/patches/packages/linux-3.10.107/kernel-source-3.10.107-noarch-2.txt b/patches/packages/linux-3.10.107/kernel-source-3.10.107-noarch-2.txt
new file mode 100644
index 000000000..536c99c66
--- /dev/null
+++ b/patches/packages/linux-3.10.107/kernel-source-3.10.107-noarch-2.txt
@@ -0,0 +1,11 @@
+kernel-source: kernel-source (Linux kernel source)
+kernel-source:
+kernel-source: Source code for Linus Torvalds' Linux kernel.
+kernel-source:
+kernel-source: This is the complete source code for the Linux kernel.
+kernel-source:
+kernel-source: This kernel has been prepatched for the BlueBorne (Bluetooth L2CAP)
+kernel-source: security issue (CVE-2017-1000251), as well as an issue with the
+kernel-source: unix_dgram_sendmsg routine that could cause Samba to lock up.
+kernel-source:
+kernel-source:
diff --git a/patches/packages/llvm-3.3-x86_64-3_slack14.1.txt b/patches/packages/llvm-3.3-x86_64-3_slack14.1.txt
new file mode 100644
index 000000000..3877ee22d
--- /dev/null
+++ b/patches/packages/llvm-3.3-x86_64-3_slack14.1.txt
@@ -0,0 +1,11 @@
+llvm: llvm (LLVM compiler toolkit)
+llvm:
+llvm: Low Level Virtual Machine is a toolkit for the construction of highly
+llvm: optimized compilers, optimizers, and runtime environments.
+llvm:
+llvm: This package also includes the clang frontend for the C family of
+llvm: languages: C, C++, Objective-C, and Objective-C++
+llvm:
+llvm:
+llvm: Homepage: http://llvm.org/
+llvm:
diff --git a/patches/packages/loudmouth-1.5.3-x86_64-1_slack14.1.txt b/patches/packages/loudmouth-1.5.3-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..f77991098
--- /dev/null
+++ b/patches/packages/loudmouth-1.5.3-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+loudmouth: loudmouth (XMPP C programming library)
+loudmouth:
+loudmouth: Loudmouth is a lightweight and easy-to-use C library for programming
+loudmouth: with the Jabber protocol. It is designed to be easy to get started
+loudmouth: with, and yet extensible enough to allow you to do anything that the
+loudmouth: Jabber protocol allows.
+loudmouth:
+loudmouth: loudmouth home: https://github.com/mcabber/loudmouth
+loudmouth:
+loudmouth:
+loudmouth:
diff --git a/patches/packages/lynx-2.8.8rel.2-x86_64-1_slack14.1.txt b/patches/packages/lynx-2.8.8rel.2-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..925b5830e
--- /dev/null
+++ b/patches/packages/lynx-2.8.8rel.2-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+lynx: Lynx (text mode browser)
+lynx:
+lynx: Lynx is a distributed hypertext browser with full World Wide Web
+lynx: capabilities. Lynx can be used to access information on the World
+lynx: Wide Web, or to build information systems intended primarily for local
+lynx: access. For example, Lynx has been used to build several Campus Wide
+lynx: Information Systems (CWIS).
+lynx:
+lynx: Lynx's authors include Lou Montulli, Garrett Blythe, Craig Lavender,
+lynx: Michael Grobe, and Charles Rezac.
+lynx:
diff --git a/patches/packages/mailx-12.5-x86_64-2_slack14.1.txt b/patches/packages/mailx-12.5-x86_64-2_slack14.1.txt
new file mode 100644
index 000000000..5ae7aa79d
--- /dev/null
+++ b/patches/packages/mailx-12.5-x86_64-2_slack14.1.txt
@@ -0,0 +1,11 @@
+mailx: mailx (a simple mail client)
+mailx:
+mailx: Mailx is derived from Berkeley Mail and is intended provide the
+mailx: functionality of the POSIX mailx command with additional support
+mailx: for MIME, IMAP, POP3, SMTP, and S/MIME. It provides enhanced
+mailx: features for interactive use, such as caching and disconnected
+mailx: operation for IMAP, message threading, scoring, and filtering.
+mailx: It is also usable as a mail batch language, both for sending
+mailx: and receiving mail.
+mailx:
+mailx: The maintainer and primary developer of mailx is Gunnar Ritter.
diff --git a/patches/packages/mariadb-5.5.60-x86_64-1_slack14.1.txt b/patches/packages/mariadb-5.5.60-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..6c42fc57d
--- /dev/null
+++ b/patches/packages/mariadb-5.5.60-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+mariadb: mariadb (Drop-in replacement for the MySQL Database Server)
+mariadb:
+mariadb: MariaDB is a backward compatible, drop-in replacement branch of the
+mariadb: MySQL(R) Database Server. It includes all major open source storage
+mariadb: engines, including the Aria storage engine.
+mariadb:
+mariadb: Homepage: http://mariadb.org/
+mariadb:
+mariadb:
+mariadb:
+mariadb:
diff --git a/patches/packages/mcabber-1.0.5-x86_64-1_slack14.1.txt b/patches/packages/mcabber-1.0.5-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..b88d33ff7
--- /dev/null
+++ b/patches/packages/mcabber-1.0.5-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+mcabber: mcabber (Jabber console client)
+mcabber:
+mcabber: mcabber is a small Jabber console client for Linux, maintained by
+mcabber: Mikael Berthe. Mcabber includes features such as SSL support,
+mcabber: multi-user chat (MUC), history logging, commands completion, and
+mcabber: external actions triggers.
+mcabber:
+mcabber: mcabber project home is: http://www.lilotux.net/~mikael/mcabber/
+mcabber:
+mcabber:
+mcabber:
diff --git a/patches/packages/mercurial-4.3.1-x86_64-1_slack14.1.txt b/patches/packages/mercurial-4.3.1-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..74728542a
--- /dev/null
+++ b/patches/packages/mercurial-4.3.1-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+mercurial: mercurial (a distributed source management system)
+mercurial:
+mercurial: Mercurial is a cross-platform, distributed source management tool for
+mercurial: software developers. It is written in Python, with a binary diff
+mercurial: implementation written in C. Its major features include high-
+mercurial: performance; serverless, fully distributed collaborative development;
+mercurial: robust handling of both plain text and binary files; advanced
+mercurial: branching and merging capabilities; and full source code available
+mercurial: under the terms of the LGPL.
+mercurial:
+mercurial: Mercurial was written by Matt Mackall and other contributors.
diff --git a/patches/packages/minicom-2.7.1-x86_64-1_slack14.1.txt b/patches/packages/minicom-2.7.1-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..ec008506a
--- /dev/null
+++ b/patches/packages/minicom-2.7.1-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+minicom: minicom (communications package)
+minicom:
+minicom: Minicom - a full featured menu-driven communications package similar
+minicom: to the DOS program 'Telix'. Also includes sz/rz - utilities used to
+minicom: upload and download files using the Zmodem protocol.
+minicom:
+minicom: Homepage: http://alioth.debian.org/projects/minicom
+minicom:
+minicom:
+minicom:
+minicom:
diff --git a/patches/packages/mkinitrd-1.4.10-x86_64-1_slack14.1.txt b/patches/packages/mkinitrd-1.4.10-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..ac8d3a741
--- /dev/null
+++ b/patches/packages/mkinitrd-1.4.10-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+mkinitrd: mkinitrd (make an initial ramdisk)
+mkinitrd:
+mkinitrd: mkinitrd is a script to create an initial ramdisk that is loaded at
+mkinitrd: the same time as the kernel. The initial ramdisk may be responsible
+mkinitrd: for loading kernel modules (such a filesystem or SCSI controller
+mkinitrd: module) that are needed to mount the root filesystem.
+mkinitrd:
+mkinitrd: The "initrd" is implemented as an initramfs. See the kernel
+mkinitrd: documentation for more information on this, if you are interested.
+mkinitrd:
+mkinitrd:
diff --git a/patches/packages/mozilla-firefox-45.9.0esr-x86_64-1_slack14.1.txt b/patches/packages/mozilla-firefox-45.9.0esr-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..1d399dbf1
--- /dev/null
+++ b/patches/packages/mozilla-firefox-45.9.0esr-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+mozilla-firefox: mozilla-firefox (Mozilla Firefox Web browser)
+mozilla-firefox:
+mozilla-firefox: This project is a redesign of the Mozilla browser component written
+mozilla-firefox: using the XUL user interface language. Firefox empowers you to
+mozilla-firefox: browse faster, more safely and more efficiently than with any other
+mozilla-firefox: browser.
+mozilla-firefox:
+mozilla-firefox: Visit the Mozilla Firefox project online:
+mozilla-firefox: http://www.mozilla.org/projects/firefox/
+mozilla-firefox:
+mozilla-firefox:
diff --git a/patches/packages/mozilla-nss-3.31.1-x86_64-1_slack14.1.txt b/patches/packages/mozilla-nss-3.31.1-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..9d2fe7086
--- /dev/null
+++ b/patches/packages/mozilla-nss-3.31.1-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+mozilla-nss: mozilla-nss (Network Security Services)
+mozilla-nss:
+mozilla-nss: Network Security Services (NSS) is a set of libraries designed to
+mozilla-nss: support cross-platform development of security-enabled client and
+mozilla-nss: server applications. Applications built with NSS can support
+mozilla-nss: SSL v2 and v3, TLS, PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME,
+mozilla-nss: X.509 v3 certificates, and other security standards.
+mozilla-nss:
+mozilla-nss:
+mozilla-nss: Read http://www.mozilla.org/projects/security/pki/nss/overview.html
+mozilla-nss:
diff --git a/patches/packages/mozilla-thunderbird-45.8.0-x86_64-1_slack14.1.txt b/patches/packages/mozilla-thunderbird-45.8.0-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..79d022522
--- /dev/null
+++ b/patches/packages/mozilla-thunderbird-45.8.0-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+mozilla-thunderbird: mozilla-thunderbird (Mozilla Thunderbird mail application)
+mozilla-thunderbird:
+mozilla-thunderbird: Mozilla Thunderbird is a redesign of the Mozilla mail component
+mozilla-thunderbird: written using the XUL user interface language. Thunderbird makes
+mozilla-thunderbird: emailing safer, faster, and easier than ever before with the
+mozilla-thunderbird: industry's best implementations of features such as intelligent spam
+mozilla-thunderbird: filters, built-in RSS reader, quick search, and much more.
+mozilla-thunderbird:
+mozilla-thunderbird: Visit the Mozilla Thunderbird project online:
+mozilla-thunderbird: http://www.mozilla.org/projects/thunderbird/
+mozilla-thunderbird:
diff --git a/patches/packages/mutt-1.5.23-x86_64-2_slack14.1.txt b/patches/packages/mutt-1.5.23-x86_64-2_slack14.1.txt
new file mode 100644
index 000000000..fdad157c1
--- /dev/null
+++ b/patches/packages/mutt-1.5.23-x86_64-2_slack14.1.txt
@@ -0,0 +1,11 @@
+mutt: Mutt (the Mutt mail user agent)
+mutt:
+mutt: Mutt is a small but very powerful text-based MIME mail client. Mutt
+mutt: is highly configurable, and is well suited to the mail power user with
+mutt: advanced features like key bindings, keyboard macros, mail threading,
+mutt: regular expression searches and a powerful pattern matching language
+mutt: for selecting groups of messages.
+mutt:
+mutt:
+mutt:
+mutt:
diff --git a/patches/packages/ntp-4.2.8p11-x86_64-1_slack14.1.txt b/patches/packages/ntp-4.2.8p11-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..128dd5c60
--- /dev/null
+++ b/patches/packages/ntp-4.2.8p11-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+ntp: ntp (Network Time Protocol daemon)
+ntp:
+ntp: The Network Time Protocol (NTP) is used to synchronize the time of a
+ntp: computer client or server to another server or reference time source,
+ntp: such as a radio or satellite receiver or modem. It provides client
+ntp: accuracies typically within a millisecond on LANs and up to a few tens
+ntp: of milliseconds on WANs relative to a primary server synchronized to
+ntp: Coordinated Universal Time (UTC) via a Global Positioning Service
+ntp: (GPS) receiver, for example.
+ntp:
+ntp:
diff --git a/patches/packages/openssh-7.4p1-x86_64-2_slack14.1.txt b/patches/packages/openssh-7.4p1-x86_64-2_slack14.1.txt
new file mode 100644
index 000000000..65f391715
--- /dev/null
+++ b/patches/packages/openssh-7.4p1-x86_64-2_slack14.1.txt
@@ -0,0 +1,11 @@
+openssh: openssh (Secure Shell daemon and clients)
+openssh:
+openssh: ssh (Secure Shell) is a program for logging into a remote machine and
+openssh: for executing commands on a remote machine. It is intended to replace
+openssh: rlogin and rsh, and provide secure encrypted communications between
+openssh: two untrusted hosts over an insecure network. sshd (SSH Daemon) is
+openssh: the daemon program for ssh. OpenSSH is based on the last free version
+openssh: of Tatu Ylonen's SSH, further enhanced and cleaned up by Aaron
+openssh: Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo de Raadt, and
+openssh: Dug Song. It has a homepage at http://www.openssh.com/
+openssh:
diff --git a/patches/packages/openssl-1.0.1u-x86_64-1_slack14.1.txt b/patches/packages/openssl-1.0.1u-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..26048b4f4
--- /dev/null
+++ b/patches/packages/openssl-1.0.1u-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+openssl: openssl (Secure Sockets Layer toolkit)
+openssl:
+openssl: The OpenSSL certificate management tool and the shared libraries that
+openssl: provide various encryption and decryption algorithms and protocols.
+openssl:
+openssl: This product includes software developed by the OpenSSL Project for
+openssl: use in the OpenSSL Toolkit (http://www.openssl.org). This product
+openssl: includes cryptographic software written by Eric Young
+openssl: (eay@cryptsoft.com). This product includes software written by Tim
+openssl: Hudson (tjh@cryptsoft.com).
+openssl:
diff --git a/patches/packages/openssl-solibs-1.0.1u-x86_64-1_slack14.1.txt b/patches/packages/openssl-solibs-1.0.1u-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..2811c662a
--- /dev/null
+++ b/patches/packages/openssl-solibs-1.0.1u-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+openssl-solibs: openssl-solibs (OpenSSL shared libraries)
+openssl-solibs:
+openssl-solibs: These shared libraries provide encryption routines required by
+openssl-solibs: programs such as openssh, bind, sendmail, and many others.
+openssl-solibs:
+openssl-solibs: This product includes software developed by the OpenSSL Project for
+openssl-solibs: use in the OpenSSL Toolkit (http://www.openssl.org). This product
+openssl-solibs: includes cryptographic software written by Eric Young
+openssl-solibs: (eay@cryptsoft.com). This product includes software written by Tim
+openssl-solibs: Hudson (tjh@cryptsoft.com).
+openssl-solibs:
diff --git a/patches/packages/openvpn-2.4.6-x86_64-1_slack14.1.txt b/patches/packages/openvpn-2.4.6-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..73bb76e03
--- /dev/null
+++ b/patches/packages/openvpn-2.4.6-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+openvpn: openvpn (secure IP tunnel daemon)
+openvpn:
+openvpn: OpenVPN is a full-featured SSL VPN which can accommodate a wide range
+openvpn: of configurations, including remote access, site-to-site VPNs, WiFi
+openvpn: security, and enterprise-scale remote access with load balancing,
+openvpn: failover, and fine-grained access-controls.
+openvpn:
+openvpn: OpenVPN's home on the net is: http://openvpn.net
+openvpn:
+openvpn:
+openvpn:
diff --git a/patches/packages/patch-2.7.6-x86_64-1_slack14.1.txt b/patches/packages/patch-2.7.6-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..0120ae50d
--- /dev/null
+++ b/patches/packages/patch-2.7.6-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+patch: patch (apply a diff file to an original file or files)
+patch:
+patch: Patch is a utility used to apply diffs (or patches) to files, which
+patch: are usually source code.
+patch:
+patch: Larry Wall wrote the original version of patch. Paul Eggert removed
+patch: patch's arbitrary limits; added support for binary files, setting
+patch: file times, and deleting files; and made it conform better to POSIX.
+patch: Other contributors include Wayne Davison, who added unidiff support,
+patch: and David MacKenzie, who added configuration and backup support.
+patch:
diff --git a/patches/packages/pcre-8.39-x86_64-1_slack14.1.txt b/patches/packages/pcre-8.39-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..70553664b
--- /dev/null
+++ b/patches/packages/pcre-8.39-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+pcre: pcre (Perl-compatible regular expression library)
+pcre:
+pcre: The PCRE library is a set of functions that implement regular
+pcre: expression pattern matching using the same syntax and semantics as
+pcre: Perl 5, with just a few differences (documented in the man page).
+pcre:
+pcre:
+pcre:
+pcre:
+pcre:
+pcre:
diff --git a/patches/packages/php-5.6.36-x86_64-1_slack14.1.txt b/patches/packages/php-5.6.36-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..e771b5f33
--- /dev/null
+++ b/patches/packages/php-5.6.36-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+php: php (HTML-embedded scripting language)
+php:
+php: PHP is an HTML-embedded scripting language. It shares syntax
+php: characteristics with C, Java, and Perl. The primary objective behind
+php: this language is to make a fast and easy-to-use scripting language
+php: for dynamic web sites.
+php:
+php: More information can be found online at http://www.php.net/
+php:
+php:
+php:
diff --git a/patches/packages/pidgin-2.12.0-x86_64-1_slack14.1.txt b/patches/packages/pidgin-2.12.0-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..1eb97f006
--- /dev/null
+++ b/patches/packages/pidgin-2.12.0-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+pidgin: pidgin (GTK+ instant messaging program)
+pidgin:
+pidgin: Pidgin allows you to talk to anyone using a variety of messaging
+pidgin: protocols, including AIM (Oscar and TOC), ICQ, IRC, Yahoo!, MSN
+pidgin: Messenger, Jabber, Gadu-Gadu, Napster, and Zephyr. These protocols
+pidgin: are implemented using a modular, easy to use design. To use a
+pidgin: protocol, just load the plugin for it.
+pidgin:
+pidgin: For more info, see: http://www.pidgin.im
+pidgin:
+pidgin:
diff --git a/patches/packages/ppp-2.4.5-x86_64-3_slack14.1.txt b/patches/packages/ppp-2.4.5-x86_64-3_slack14.1.txt
new file mode 100644
index 000000000..1c0d758cb
--- /dev/null
+++ b/patches/packages/ppp-2.4.5-x86_64-3_slack14.1.txt
@@ -0,0 +1,11 @@
+ppp: ppp (Point-to-Point Protocol)
+ppp:
+ppp: The Point-to-Point Protocol (PPP) provides a method for transmitting
+ppp: data over serial links. It's commonly used for connecting to the
+ppp: Internet using a modem. This package includes the PPP daemon (pppd),
+ppp: which negotiates with the peer to establish the link and sets up the
+ppp: ppp network interface, and pppsetup, an easy-to-use utility for
+ppp: setting up your PPP daemon.
+ppp:
+ppp:
+ppp:
diff --git a/patches/packages/proftpd-1.3.5e-x86_64-1_slack14.1.txt b/patches/packages/proftpd-1.3.5e-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..7053edf3e
--- /dev/null
+++ b/patches/packages/proftpd-1.3.5e-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+proftpd: proftpd (FTP server daemon)
+proftpd:
+proftpd: ProFTPD is the Professional File Transfer Protocol (FTP) server
+proftpd: daemon. ProFTPD grew out of the desire to have a secure and
+proftpd: configurable FTP server, and out of a significant admiration of the
+proftpd: Apache web server.
+proftpd:
+proftpd:
+proftpd:
+proftpd:
+proftpd:
diff --git a/patches/packages/python-2.7.15-x86_64-1_slack14.1.txt b/patches/packages/python-2.7.15-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..047c1bd44
--- /dev/null
+++ b/patches/packages/python-2.7.15-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+python: python (object-oriented interpreted programming language)
+python:
+python: Python is an interpreted, interactive, object-oriented programming
+python: language that combines remarkable power with very clear syntax.
+python: Python's basic power can be extended with your own modules written in
+python: C or C++. Python is also adaptable as an extension language for
+python: existing applications.
+python:
+python:
+python:
+python:
diff --git a/patches/packages/qt-4.8.7-x86_64-1_slack14.1.txt b/patches/packages/qt-4.8.7-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..3b2da1990
--- /dev/null
+++ b/patches/packages/qt-4.8.7-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+qt: Qt (a multi-platform C++ graphical user interface toolkit)
+qt:
+qt: Qt is a complete and well-developed object-oriented framework for
+qt: developing graphical user interface (GUI) applications using C++.
+qt:
+qt: Homepage: http://qt-project.org/
+qt:
+qt:
+qt:
+qt:
+qt:
diff --git a/patches/packages/randrproto-1.5.0-noarch-1_slack14.1.txt b/patches/packages/randrproto-1.5.0-noarch-1_slack14.1.txt
new file mode 100644
index 000000000..f28072637
--- /dev/null
+++ b/patches/packages/randrproto-1.5.0-noarch-1_slack14.1.txt
@@ -0,0 +1,11 @@
+randrproto: randrproto (C prototypes for RandR)
+randrproto:
+randrproto: RandR is the X11 Resize and Rotate Extension
+randrproto:
+randrproto:
+randrproto:
+randrproto:
+randrproto:
+randrproto:
+randrproto:
+randrproto:
diff --git a/patches/packages/rsync-3.1.3-x86_64-1_slack14.1.txt b/patches/packages/rsync-3.1.3-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..7565757a9
--- /dev/null
+++ b/patches/packages/rsync-3.1.3-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+rsync: rsync (remote file sync)
+rsync:
+rsync: rsync is a replacement for rcp that has many more features. It
+rsync: uses the "rsync algorithm" which provides a very fast method for
+rsync: bringing remote files into sync. It does this by sending just the
+rsync: differences in the files across the link, without requiring that both
+rsync: sets of files are present at one of the ends of the link beforehand.
+rsync: rsync was written by Andrew Tridgell and Paul Mackerras.
+rsync:
+rsync: Homepage: http://rsync.samba.org
+rsync:
diff --git a/patches/packages/ruby-1.9.3_p484-x86_64-1_slack14.1.txt b/patches/packages/ruby-1.9.3_p484-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..265efadf6
--- /dev/null
+++ b/patches/packages/ruby-1.9.3_p484-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+ruby: ruby (Interpreted object-oriented scripting language)
+ruby:
+ruby: Ruby is an interpreted scripting language for quick and easy
+ruby: object-oriented programming. It has many features to process text
+ruby: files and to do system management tasks (as in Perl). It is simple,
+ruby: straight-forward, and extensible.
+ruby:
+ruby: Visit the Ruby project online at http://www.ruby-lang.org/
+ruby:
+ruby:
+ruby:
diff --git a/patches/packages/rxvt-2.7.10-x86_64-5_slack14.1.txt b/patches/packages/rxvt-2.7.10-x86_64-5_slack14.1.txt
new file mode 100644
index 000000000..21fc353f9
--- /dev/null
+++ b/patches/packages/rxvt-2.7.10-x86_64-5_slack14.1.txt
@@ -0,0 +1,11 @@
+rxvt: rxvt (terminal emulator)
+rxvt:
+rxvt: rxvt is a color vt102 terminal emulator intended as an xterm
+rxvt: replacement for users who do not require features such as Tektronix
+rxvt: 4014 emulation and toolkit-style configurability. As a result, rxvt
+rxvt: uses much less memory -- a significant advantage on a machine serving
+rxvt: many X sessions. Also included is rclock, an analog clock for X.
+rxvt:
+rxvt:
+rxvt:
+rxvt:
diff --git a/patches/packages/samba-4.4.16-x86_64-3_slack14.1.txt b/patches/packages/samba-4.4.16-x86_64-3_slack14.1.txt
new file mode 100644
index 000000000..f4b2ff06d
--- /dev/null
+++ b/patches/packages/samba-4.4.16-x86_64-3_slack14.1.txt
@@ -0,0 +1,11 @@
+samba: samba (CIFS file and print server)
+samba:
+samba: Samba is a CIFS file and print server for CIFS clients. It allows
+samba: you to make file space or printers on a Samba host available to CIFS
+samba: clients (such as PCs running Windows).
+samba:
+samba: If you have any Windows file servers, you may be able to replace them
+samba: or supplement them with Samba. One of Samba's big strengths is
+samba: integration, so you can use it to tie together your Linux hosts and
+samba: Windows PC clients.
+samba:
diff --git a/patches/packages/seamonkey-2.46-x86_64-3_slack14.1.txt b/patches/packages/seamonkey-2.46-x86_64-3_slack14.1.txt
new file mode 100644
index 000000000..da07187a3
--- /dev/null
+++ b/patches/packages/seamonkey-2.46-x86_64-3_slack14.1.txt
@@ -0,0 +1,11 @@
+seamonkey: SeaMonkey (an open-source web browser suite)
+seamonkey:
+seamonkey: The SeaMonkey browser suite. SeaMonkey features a state-of-the-art
+seamonkey: web browser and powerful email client, as well as a WYSIWYG web page
+seamonkey: composer and a feature-rich IRC chat client.
+seamonkey:
+seamonkey:
+seamonkey:
+seamonkey: Visit the SeaMonkey project at this URL:
+seamonkey: http://www.mozilla.org/projects/seamonkey/
+seamonkey:
diff --git a/patches/packages/seamonkey-solibs-2.46-x86_64-3_slack14.1.txt b/patches/packages/seamonkey-solibs-2.46-x86_64-3_slack14.1.txt
new file mode 100644
index 000000000..830b825d0
--- /dev/null
+++ b/patches/packages/seamonkey-solibs-2.46-x86_64-3_slack14.1.txt
@@ -0,0 +1,11 @@
+seamonkey-solibs: seamonkey-solibs (Shared libraries from Seamonkey)
+seamonkey-solibs:
+seamonkey-solibs: This package contains a subset of the shared libraries from Seamonkey
+seamonkey-solibs: to provide runtime support for various programs.
+seamonkey-solibs: This package is built from the Seamonkey sources and is provided
+seamonkey-solibs: as a standalone runtime package for people who do not want to install
+seamonkey-solibs: the entire seamonkey package (as for server use).
+seamonkey-solibs:
+seamonkey-solibs: This package is runtime only. The include files and other files for
+seamonkey-solibs: development can be found in the seamonkey package.
+seamonkey-solibs:
diff --git a/patches/packages/sendmail-8.14.9-x86_64-1_slack14.1.txt b/patches/packages/sendmail-8.14.9-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..7498d7c95
--- /dev/null
+++ b/patches/packages/sendmail-8.14.9-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+sendmail: sendmail (mail transfer agent)
+sendmail:
+sendmail: Eric Allman's mail transport agent. The _Unix System Administration
+sendmail: Handbook_ calls sendmail 'The most complex and complete mail delivery
+sendmail: system in common use...'
+sendmail:
+sendmail: Ready-made configuration files are included for systems connected by
+sendmail: TCP/IP (with or without a nameserver) and for systems using UUCP.
+sendmail:
+sendmail: The procmail package is required to handle local mail delivery.
+sendmail:
diff --git a/patches/packages/sendmail-cf-8.14.9-noarch-1_slack14.1.txt b/patches/packages/sendmail-cf-8.14.9-noarch-1_slack14.1.txt
new file mode 100644
index 000000000..da73ab700
--- /dev/null
+++ b/patches/packages/sendmail-cf-8.14.9-noarch-1_slack14.1.txt
@@ -0,0 +1,11 @@
+sendmail-cf: sendmail-cf (configuration files for sendmail)
+sendmail-cf:
+sendmail-cf: These files are used to create sendmail.cf configuration files. The
+sendmail-cf: m4 macro processor is also required in order to make use of these
+sendmail-cf: files.
+sendmail-cf:
+sendmail-cf: The files and documentation in /usr/share/sendmail should make it
+sendmail-cf: possible to support virtually any mail configuration. NOTE: You
+sendmail-cf: probably won't need this package if you're planning to use one of the
+sendmail-cf: sendmail.cf samples included in the sendmail package.
+sendmail-cf:
diff --git a/patches/packages/shadow-4.1.5.1-x86_64-3_slack14.1.txt b/patches/packages/shadow-4.1.5.1-x86_64-3_slack14.1.txt
new file mode 100644
index 000000000..31744f557
--- /dev/null
+++ b/patches/packages/shadow-4.1.5.1-x86_64-3_slack14.1.txt
@@ -0,0 +1,11 @@
+shadow: shadow (shadow password suite)
+shadow:
+shadow: This set of login related programs utilizes an alternate, non-readable
+shadow: file to contain the actual encrypted passwords. This is presumed to
+shadow: increase system security by increasing the difficulty with which
+shadow: system crackers obtain encrypted passwords. It was written by
+shadow: Julianne Frances Haugh and the Linux port is maintained by Tomasz
+shadow: Kloczko.
+shadow:
+shadow: This package provides 'login', which is needed to log into the system.
+shadow:
diff --git a/patches/packages/stunnel-5.35-x86_64-2_slack14.1.txt b/patches/packages/stunnel-5.35-x86_64-2_slack14.1.txt
new file mode 100644
index 000000000..2e5c70caf
--- /dev/null
+++ b/patches/packages/stunnel-5.35-x86_64-2_slack14.1.txt
@@ -0,0 +1,11 @@
+stunnel: stunnel (Universal SSL tunnel)
+stunnel:
+stunnel: The stunnel program is designed to work as an SSL encryption wrapper
+stunnel: between remote client and local (inetd-startable) or remote servers.
+stunnel: The goal is to facilitate SSL encryption and authentication for
+stunnel: non-SSL-aware programs.
+stunnel:
+stunnel: stunnel can be used to add SSL functionality to commonly used inetd
+stunnel: daemons like POP-2, POP-3 and IMAP servers without any changes in the
+stunnel: programs' code.
+stunnel:
diff --git a/patches/packages/subversion-1.7.22-x86_64-3_slack14.1.txt b/patches/packages/subversion-1.7.22-x86_64-3_slack14.1.txt
new file mode 100644
index 000000000..7b4386899
--- /dev/null
+++ b/patches/packages/subversion-1.7.22-x86_64-3_slack14.1.txt
@@ -0,0 +1,11 @@
+subversion: subversion (a version control system)
+subversion:
+subversion: Subversion is a version control system which allows you to keep old
+subversion: versions of files and directories (usually source code), and keep a
+subversion: log of who, when, and why changes occurred, similar to other such
+subversion: systems like CVS, RCS or SCCS. Subversion keeps all the information
+subversion: to permit extracting previous versions of those files at any time.
+subversion:
+subversion: For more information about the Subversion project, visit:
+subversion: http://subversion.apache.org
+subversion:
diff --git a/patches/packages/sudo-1.8.20p2-x86_64-1_slack14.1.txt b/patches/packages/sudo-1.8.20p2-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..1f1087d7c
--- /dev/null
+++ b/patches/packages/sudo-1.8.20p2-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+sudo: sudo (give limited root privileges to certain users)
+sudo:
+sudo: 'sudo' is a command that allows users to execute some commands as
+sudo: root. The /etc/sudoers file (edited with 'visudo') specifies which
+sudo: users have access to sudo and which commands they can run. 'sudo'
+sudo: logs all its activities to /var/log/ so the system administrator
+sudo: can keep an eye on things.
+sudo:
+sudo:
+sudo:
+sudo:
diff --git a/patches/packages/tcpdump-4.9.2-x86_64-1_slack14.1.txt b/patches/packages/tcpdump-4.9.2-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..cee0ef1a1
--- /dev/null
+++ b/patches/packages/tcpdump-4.9.2-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+tcpdump: tcpdump (network monitoring tool)
+tcpdump:
+tcpdump: Tcpdump is a tool for network monitoring and data acquisition. You
+tcpdump: can use it to dump information on all the packets on a network that
+tcpdump: match a boolean expression. Tcpdump uses libpcap, a system
+tcpdump: independent interface for user-level packet capture.
+tcpdump:
+tcpdump: Project homepage: http://www.tcpdump.org
+tcpdump:
+tcpdump:
+tcpdump:
diff --git a/patches/packages/udisks-1.0.5-x86_64-1_slack14.1.txt b/patches/packages/udisks-1.0.5-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..9701b8e3a
--- /dev/null
+++ b/patches/packages/udisks-1.0.5-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+udisks: udisks (storage device daemon)
+udisks:
+udisks: The udisks project provides a storage daemon that implements D-Bus
+udisks: interfaces that can be used to query and manipulate storage devices.
+udisks:
+udisks: It also includes a command-line tool, udisks(1), that can be used to
+udisks: query and control the daemon.
+udisks:
+udisks: Homepage: http://www.freedesktop.org/wiki/Software/udisks
+udisks:
+udisks:
diff --git a/patches/packages/udisks2-2.1.3-x86_64-1_slack14.1.txt b/patches/packages/udisks2-2.1.3-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..4c223f4f9
--- /dev/null
+++ b/patches/packages/udisks2-2.1.3-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+udisks2: udisks2 (storage device daemon v2)
+udisks2:
+udisks2: The udisks project provides a storage daemon that implements D-Bus
+udisks2: interfaces that can be used to query and manipulate storage devices.
+udisks2:
+udisks2: It also includes a command-line tool, udisks(1), that can be used to
+udisks2: query and control the daemon.
+udisks2:
+udisks2: Homepage: http://www.freedesktop.org/wiki/Software/udisks
+udisks2:
+udisks2:
diff --git a/patches/packages/vim-7.4.399-x86_64-1_slack14.1.txt b/patches/packages/vim-7.4.399-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..3fef1b8d0
--- /dev/null
+++ b/patches/packages/vim-7.4.399-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+vim: vim (Vi IMproved)
+vim:
+vim: Vim is an almost compatible version of the UNIX editor vi. Many new
+vim: features have been added: multi level undo, command line history,
+vim: filename completion, block operations, and more.
+vim:
+vim: Vim's development is led by Bram Moolenaar.
+vim:
+vim: This package also contains the Exuberant Ctags program
+vim: written by Darren Hiebert.
+vim:
diff --git a/patches/packages/vim-gvim-7.4.399-x86_64-1_slack14.1.txt b/patches/packages/vim-gvim-7.4.399-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..bf6a19566
--- /dev/null
+++ b/patches/packages/vim-gvim-7.4.399-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+vim-gvim: vim-gvim (gvim, the X/GTK2 enabled version of vim)
+vim-gvim:
+vim-gvim: Gvim is a graphical version of vim. Vim is an almost compatible
+vim-gvim: version of the UNIX editor vi. Many new features have been added,
+vim-gvim: such as multi level undo, command line history, filename completion,
+vim-gvim: block operations, and more.
+vim-gvim:
+vim-gvim: The main vim package in the AP series is required to use this package.
+vim-gvim:
+vim-gvim: Vim's development is led by Bram Moolenaar.
+vim-gvim:
diff --git a/patches/packages/wget-1.19.5-x86_64-1_slack14.1.txt b/patches/packages/wget-1.19.5-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..cd0faad01
--- /dev/null
+++ b/patches/packages/wget-1.19.5-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+wget: wget (a non-interactive network retriever)
+wget:
+wget: GNU Wget is a free network utility to retrieve files from the
+wget: World Wide Web using HTTP and FTP, the two most widely used Internet
+wget: protocols. It works non-interactively, thus enabling work in the
+wget: background after having logged off.
+wget:
+wget: The author of Wget is Hrvoje Niksic <hniksic@srce.hr>.
+wget:
+wget:
+wget:
diff --git a/patches/packages/wpa_supplicant-2.6-x86_64-1_slack14.1.txt b/patches/packages/wpa_supplicant-2.6-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..3c64dd12e
--- /dev/null
+++ b/patches/packages/wpa_supplicant-2.6-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+wpa_supplicant: wpa_supplicant (WPA/WPA2/IEEE 802.1X Supplicant)
+wpa_supplicant:
+wpa_supplicant: wpa_supplicant is a WPA Supplicant for Linux with support for WPA and
+wpa_supplicant: WPA2 (IEEE 802.11i / RSN). Supplicant is the IEEE 802.1X/WPA
+wpa_supplicant: component that is used in the client stations. It implements key
+wpa_supplicant: negotiation with a WPA Authenticator and it controls the roaming and
+wpa_supplicant: IEEE 802.11 authentication/association of the wlan driver.
+wpa_supplicant:
+wpa_supplicant: More info: http://hostap.epitest.fi/wpa_supplicant/
+wpa_supplicant:
+wpa_supplicant:
diff --git a/patches/packages/xcb-proto-1.11-x86_64-1_slack14.1.txt b/patches/packages/xcb-proto-1.11-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..df6cd924f
--- /dev/null
+++ b/patches/packages/xcb-proto-1.11-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+xcb-proto: xcb-proto (X protocol C-language Binding protocol descriptions)
+xcb-proto:
+xcb-proto: xcb-proto provides the XML-XCB protocol descriptions that libxcb
+xcb-proto: uses to generate the majority of its code and API. We provide them
+xcb-proto: separately from libxcb to allow reuse by other projects, such as
+xcb-proto: additional language bindings, protocol dissectors, or documentation
+xcb-proto: generators.
+xcb-proto:
+xcb-proto:
+xcb-proto:
+xcb-proto:
diff --git a/patches/packages/xextproto-7.3.0-x86_64-1_slack14.1.txt b/patches/packages/xextproto-7.3.0-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..40d18943b
--- /dev/null
+++ b/patches/packages/xextproto-7.3.0-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+xextproto: xextproto (C prototypes for X Protocol Extensions)
+xextproto:
+xextproto: xextproto is part of X11.
+xextproto:
+xextproto: For more information about the X.Org Foundation (the providers of the
+xextproto: X.Org implementation of the X Window System), see their website:
+xextproto:
+xextproto: http://www.x.org
+xextproto:
+xextproto:
+xextproto:
diff --git a/patches/packages/xfce4-weather-plugin-0.8.10-x86_64-1_slack14.1.txt b/patches/packages/xfce4-weather-plugin-0.8.10-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..fa3bc6268
--- /dev/null
+++ b/patches/packages/xfce4-weather-plugin-0.8.10-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+xfce4-weather-plugin: xfce4-weather-plugin (weather plugin for the Xfce panel)
+xfce4-weather-plugin:
+xfce4-weather-plugin: The weather plugin displays current weather conditions and forecasts.
+xfce4-weather-plugin:
+xfce4-weather-plugin:
+xfce4-weather-plugin:
+xfce4-weather-plugin:
+xfce4-weather-plugin:
+xfce4-weather-plugin:
+xfce4-weather-plugin:
+xfce4-weather-plugin:
diff --git a/patches/packages/xorg-server-1.14.3-x86_64-6_slack14.1.txt b/patches/packages/xorg-server-1.14.3-x86_64-6_slack14.1.txt
new file mode 100644
index 000000000..1ebe1b270
--- /dev/null
+++ b/patches/packages/xorg-server-1.14.3-x86_64-6_slack14.1.txt
@@ -0,0 +1,11 @@
+xorg-server: xorg-server (The Xorg server, the core of the X Window System)
+xorg-server:
+xorg-server: Xorg is a full featured X server that was originally designed for UNIX
+xorg-server: and UNIX-like operating systems running on Intel x86 hardware. It now
+xorg-server: runs on a wider range of hardware and OS platforms. This work was
+xorg-server: derived by the X.Org Foundation from the XFree86 Project's XFree86
+xorg-server: 4.4rc2 release. The XFree86 release was originally derived from X386
+xorg-server: 1.2 by Thomas Roell which was contributed to X11R5 by Snitily Graphics
+xorg-server: Consulting Service.
+xorg-server:
+xorg-server: The home page for the X project is: http://www.x.org
diff --git a/patches/packages/xorg-server-xephyr-1.14.3-x86_64-6_slack14.1.txt b/patches/packages/xorg-server-xephyr-1.14.3-x86_64-6_slack14.1.txt
new file mode 100644
index 000000000..2ffb35f60
--- /dev/null
+++ b/patches/packages/xorg-server-xephyr-1.14.3-x86_64-6_slack14.1.txt
@@ -0,0 +1,11 @@
+xorg-server-xephyr: xorg-server-xephyr (Improved nested X server/client)
+xorg-server-xephyr:
+xorg-server-xephyr: Xephyr is a nested X-Client like Xnest, but with some additional
+xorg-server-xephyr: features like XRender support.
+xorg-server-xephyr:
+xorg-server-xephyr:
+xorg-server-xephyr:
+xorg-server-xephyr:
+xorg-server-xephyr:
+xorg-server-xephyr:
+xorg-server-xephyr:
diff --git a/patches/packages/xorg-server-xnest-1.14.3-x86_64-6_slack14.1.txt b/patches/packages/xorg-server-xnest-1.14.3-x86_64-6_slack14.1.txt
new file mode 100644
index 000000000..31dc1e78e
--- /dev/null
+++ b/patches/packages/xorg-server-xnest-1.14.3-x86_64-6_slack14.1.txt
@@ -0,0 +1,11 @@
+xorg-server-xnest: xorg-server-xnest (a nested X server)
+xorg-server-xnest:
+xorg-server-xnest: Xnest is an experimental nested server for X that acts as both a
+xorg-server-xnest: client and a server. Xnest is a client of the real server which
+xorg-server-xnest: manages windows and graphics requests on its behalf. Xnest is a
+xorg-server-xnest: server to its own clients. Xnest manages windows and graphics
+xorg-server-xnest: requests on their behalf. To these clients Xnest appears to be a
+xorg-server-xnest: conventional server.
+xorg-server-xnest:
+xorg-server-xnest:
+xorg-server-xnest:
diff --git a/patches/packages/xorg-server-xvfb-1.14.3-x86_64-6_slack14.1.txt b/patches/packages/xorg-server-xvfb-1.14.3-x86_64-6_slack14.1.txt
new file mode 100644
index 000000000..3a7122df2
--- /dev/null
+++ b/patches/packages/xorg-server-xvfb-1.14.3-x86_64-6_slack14.1.txt
@@ -0,0 +1,11 @@
+xorg-server-xvfb: xorg-server-xvfb (virtual framebuffer X server)
+xorg-server-xvfb:
+xorg-server-xvfb: Xvfb is an X server that can run on machines with no display hardware
+xorg-server-xvfb: and no physical input devices. It emulates a dumb framebuffer using
+xorg-server-xvfb: virtual memory. The primary use of this server is intended to be
+xorg-server-xvfb: server testing. The mfb or cfb code for any depth can be exercised
+xorg-server-xvfb: with this server without the need for real hardware that supports the
+xorg-server-xvfb: desired depths. A secondary use is testing clients against unusual
+xorg-server-xvfb: depths and screen configurations.
+xorg-server-xvfb:
+xorg-server-xvfb:
diff --git a/patches/packages/xproto-7.0.29-noarch-1_slack14.1.txt b/patches/packages/xproto-7.0.29-noarch-1_slack14.1.txt
new file mode 100644
index 000000000..b4397153f
--- /dev/null
+++ b/patches/packages/xproto-7.0.29-noarch-1_slack14.1.txt
@@ -0,0 +1,11 @@
+xproto: xproto (C prototypes for X Window System Core Protocol)
+xproto:
+xproto: xproto is part of X11.
+xproto:
+xproto: For more information about the X.Org Foundation (the providers of the
+xproto: X.Org implementation of the X Window System), see their website:
+xproto:
+xproto: http://www.x.org
+xproto:
+xproto:
+xproto:
diff --git a/patches/packages/xscreensaver-5.38-x86_64-1_slack14.1.txt b/patches/packages/xscreensaver-5.38-x86_64-1_slack14.1.txt
new file mode 100644
index 000000000..62dcff517
--- /dev/null
+++ b/patches/packages/xscreensaver-5.38-x86_64-1_slack14.1.txt
@@ -0,0 +1,11 @@
+xscreensaver: xscreensaver (a screen saver and locker for X)
+xscreensaver:
+xscreensaver: A modular screen saver and locker for the X Window System. Highly
+xscreensaver: customizable: allows the use of any program that can draw on the
+xscreensaver: root window as a display mode. More than 100 display modes are
+xscreensaver: included in this package.
+xscreensaver:
+xscreensaver: Homepage: http://www.jwz.org/xscreensaver
+xscreensaver:
+xscreensaver:
+xscreensaver:
diff --git a/patches/packages/yptools-2.14-x86_64-3_slack14.1.txt b/patches/packages/yptools-2.14-x86_64-3_slack14.1.txt
new file mode 100644
index 000000000..b6fce72cd
--- /dev/null
+++ b/patches/packages/yptools-2.14-x86_64-3_slack14.1.txt
@@ -0,0 +1,11 @@
+yptools: yptools (NIS servers and clients)
+yptools:
+yptools: NIS stands for Network Information Service. NIS is usually used to
+yptools: provide /etc/passwd and /etc/group information throughout the network.
+yptools: Most Sun-based networks run NIS, and Linux machines can take full
+yptools: advantage of existing NIS service or provide NIS service themselves.
+yptools:
+yptools:
+yptools:
+yptools:
+yptools:
diff --git a/patches/source/MPlayer/MPlayer.SlackBuild b/patches/source/MPlayer/MPlayer.SlackBuild
new file mode 100755
index 000000000..0eb4bb102
--- /dev/null
+++ b/patches/source/MPlayer/MPlayer.SlackBuild
@@ -0,0 +1,488 @@
+#!/bin/sh
+# $Id: MPlayer.SlackBuild,v 1.27 2012/07/01 13:07:08 root Exp root $
+# Copyright 2006, 2007, 2008, 2010, 2011, 2012 Eric Hameleers, Eindhoven, NL
+# Copyright 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# -----------------------------------------------------------------------------
+#
+# Slackware SlackBuild script
+# ===========================
+# By: Eric Hameleers <alien@slackware.com>
+# For: MPlayer
+# Descr: a movie player for LINUX
+# URL: http://www.mplayerhq.hu/
+# Needs:
+# Changelog:
+# 1.0rc1-1: 05/Nov/2006 by Eric Hameleers <alien@slackware.com>
+# * Initial build.
+# 1.0rc1-2: 07/Nov/2006 by Eric Hameleers <alien@slackware.com>
+# * Removed MPlayer's internal libdvdcss code from the build, so
+# that MPlayer no longer plays encrypted DVD's by default (and the
+# package is now safe to upload to public repositories).
+# If it is allowed in your country, you can either install
+# libdvdcss (which is picked up automatically by MPlayer), or
+# rebuild MPlayer yourself using this SlackBuild - and set the
+# variable REMOVECSS="no" first (see further down).
+# Use this commandline if you can't or won't modify the script:
+# REMOVECSS="no" ./MPlayer.SlackBuild
+# 1.0rc1-3: 08/Nov/2006 by Eric Hameleers <alien@slackware.com>
+# * Install the mplayer.conf into correct location '/etc/mplayer/'
+# 1.0rc1-4: 15/mar/2007 by Eric Hameleers <alien@slackware.com>
+# * Differentiate between versions of X11 (modular X has another
+# install-prefix); update default skin; enable mplayer menu;
+# add security fix
+# 1.0rc1-5: 07/jun/2007 by Eric Hameleers <alien@slackware.com>
+# * Add security fix.
+# 1.0rc2-1: 09/oct/2007 by Eric Hameleers <alien@slackware.com>
+# * New version.
+# 1.0rc2-2: 01/feb/2008 by Eric Hameleers <alien@slackware.com>
+# * Apply 4 security fixes.
+# 1.0rc2-3: 10/mar/2008 by Eric Hameleers <alien@slackware.com>
+# * Apply a patch that allows compilation against the ivtv driver
+# in the 2.6.24.x kernels.
+# r28148-1: 14/dec/2008 by Eric Hameleers <alien@slackware.com>
+# * Build SVN snapshot - remove support for *all* patented or
+# questionable software if "USE_PATENTS" is set to "NO" - think
+# of DECSS dvd decryption code, and mp3/aac/amr audio encoders.
+# r28929-1: 10/mar/2009 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# r29301-1: 12/may/2009 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# r29301-1: 12/may/2009 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 20100926-1: 26/sep/2010 by Eric Hameleers <alien@slackware.com>
+# * Slackware has MPlayer now of course, but it does not hurt
+# to have a full-featured binary package available. The 1.0rc3
+# was released recently but I prefer to build a snapshot.
+# 20110624-1: 24/jun/2011 by Eric Hameleers <alien@slackware.com>
+# * Provide an up-to-date snapshot to be used in conjunction
+# with UMPlayer (a MPlayer GUI). New MPlayer source requires
+# a separate ffmpeg download.
+# 20120514-1: 14/may/2012 by volkerdi@slackware.com
+# * Update.
+# 1.1_20120701-1: 28/jun/2012 by alien@slackware.com
+# * Update to the 1.1 branch (essentially this is MPlayer-1.1 but
+# I like to check it out of SVN).
+# 1.1_20130819-1: 19/aug/2013 by volkerdi@slackware.com
+# * Update to the latest 1.1 branch, and the same ffmpeg that was
+# shipped with the 1.1.1 tarball. The official 1.1.1 release
+# did not start a new repo branch, so this is the latest.
+# 20150308-1: 09/mar/2015 by pprkut@slackware.com
+# * Update to latest version from trunk, together with ffmpeg 2.6,
+# which was released roughly around that date as well.
+# 20140403-1: 03/apr/2015 by volkerdi@slackware.com
+# * Update to latest version from trunk and ffmpeg-2.6.1.
+#
+# Run 'sh MPlayer.SlackBuild' to build a Slackware package.
+# The package (.txz) plus descriptive .txt file are created in /tmp .
+# Install using 'installpkg'.
+#
+# -----------------------------------------------------------------------------
+
+# Set initial variables:
+
+PRGNAM=MPlayer
+VERSION=${VERSION:-20160125}
+BRANCH=${BRANCH:-1.2} # leave empty if you want to build MPlayer trunk
+FFMPEG=${FFMPEG:-2.8.5}
+BUILD=${BUILD:-1_slack14.1}
+TAG=${TAG:-}
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Show the branch version in the package name if we build from a branch:
+[ -n "$BRANCH" ] && PKGVERSION=${BRANCH}_${VERSION} || PKGVERSION=${VERSION}
+
+DOCS="AUTHORS Changelog Copyright LICENSE README VERSION DOCS/HTML DOCS/tech"
+
+# MPlayer repository characteristics:
+MPURI="svn://svn.mplayerhq.hu/mplayer/"
+if [ -n "$BRANCH" ]; then
+ MPBRANCH="branches/$BRANCH"
+else
+ MPBRANCH="trunk"
+fi
+
+FFURI=git://git.videolan.org/ffmpeg.git
+
+DEFSKIN=${DEFSKIN:-"Blue"} # Download more skins at the following url:
+SKINVER=${SKINVER:-"1.11"} # http://www.mplayerhq.hu/design7/dload.html
+
+# Available languages: all cs de en es fr hu it pl ru zh_CN
+LANGUAGES="en,de,es,fr"
+
+# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
+if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i486 ;;
+ armv7hl) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+fi
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+ # --enable-runtime-cpudetection is supported only for x86, x86_64, and PPC
+ EXTRACONFIGUREOPTIONS="--enable-runtime-cpudetection"
+elif [ "$ARCH" = "i486" -o \
+ "$ARCH" = "i586" -o \
+ "$ARCH" = "i686" ]; then
+ LIBDIRSUFFIX=""
+ EXTRACONFIGUREOPTIONS="--enable-runtime-cpudetection"
+else
+ LIBDIRSUFFIX=""
+ EXTRACONFIGUREOPTIONS=""
+fi
+
+# Where the WIN32 codecs are expectedfor instance
+CODECSDIR=/usr/lib${LIBDIRSUFFIX}/codecs
+
+# ---------------------------------------------------------------------------
+# -- PATENT ALERT! --
+# MPLayer can be built with MP3 (lame) and AMR audio encoders
+# (needed for FLV and .3GP videos) but these libraries are 'contaminated'
+# with patents from Fraunhofer and GGP.
+# Also, the AAC encoder has patent issues.
+# You can build these patended algorithms into ffmpeg, and if you are an
+# ordinary end user, no one will bother you for using them.
+# For the binaries based on this SlackBuild that I distribute, it is a
+# different story. I am not allowed to distribute binary packages that
+# incorporate patented code. So here you go. My Slackware package was
+# built with "USE_PATENTS=NO" i.e. without using
+# the lame mp3, faac, AMR and dvdcss libraries.
+# ---------------------------------------------------------------------------
+USE_PATENTS=${USE_PATENTS:-"NO"}
+
+# MPlayer will try to use one of the TrueType fonts present on the target
+# system for it's On Screen Display (OSD) font.
+# Slackware 11.0 ships with the Vera and DejaVu fonts, you may want to add
+# more fonts to this list. The first font found will be used by creating a
+# symbolic link "/usr/share/mplayer/subfont.ttf" to it.
+# The use of bitmapped fonts is considered deprecated, but you can still use
+# those if you want. Read http://www.mplayerhq.hu/DOCS/HTML/en/fonts-osd.html
+# if you want to know more about OSD font configuration.
+OSDFONTS="LiberationSans-Regular.ttf \
+ Arialuni.ttf arial.ttf \
+ DejaVuSans.ttf Vera.ttf"
+
+# Where do we look for sources?
+SRCDIR=$(cd $(dirname $0); pwd)
+
+SOURCE[0]="$SRCDIR/${PRGNAM}-${VERSION}.tar.xz"
+SRCURL[0]=""
+
+# The default skin to use (we need to add at least one)
+SOURCE[1]="$SRCDIR/${DEFSKIN}-${SKINVER}.tar.bz2"
+SRCURL[1]="http://www.mplayerhq.hu/MPlayer/skins/${DEFSKIN}-${SKINVER}.tar.bz2"
+
+# Ffmpeg needs to be checked out separately now:
+SOURCE[2]="$SRCDIR/ffmpeg-${FFMPEG}.tar.xz"
+SRCURL[2]=""
+
+# Use the src_checkout() function if no downloadable tarball exists.
+# This function checks out sources from SVN/CVS and creates a tarball of them.
+src_checkout() {
+ # Param #1 : index in the SOURCE[] array.
+ # Param #2 : full path to where SOURCE[$1] tarball should be created.
+ # Determine the tarball extension:
+ PEXT=$(echo "${2}" | sed -r -e 's/.*[^.].(tar.xz|tar.gz|tar.bz2|tgz).*/\1/')
+ case "$PEXT" in
+ "tar.xz") TARCOMP="J" ;;
+ "tar.gz") TARCOMP="z" ;;
+ "tgz") TARCOMP="z" ;;
+ "tar.bz2") TARCOMP="j" ;;
+ *) echo "Archive can only have extension 'tar.xz', '.tar.gz' '.tar.bz2' or '.tgz'" ; exit 1 ;;
+ esac
+ case ${1} in
+ 0) # mplayer
+ if [ "$(echo ${VERSION}|cut -c1)" == 'r' ]; then # revision instead of date
+ echo "Only supported VERSION is a date - yyyymmdd - or 'HEAD'"
+ else
+ REV="{${VERSION}}"
+ fi
+ mkdir MPlayer-${VERSION} \
+ && cd MPlayer-${VERSION} \
+ && svn checkout --revision $REV ${MPURI}/${MPBRANCH} . \
+ && svn propget svn:externals | sed -e 's/[[:space:]].*$//g' | xargs svn up --revision $REV \
+ && chown -R root:root . \
+ && cd .. \
+ && tar --exclude-vcs -${TARCOMP}cf ${2} MPlayer-${VERSION}
+ rm -rf MPlayer-${VERSION}
+ ;;
+ 2) # ffmpeg-${FFMPEG}
+ mkdir ffmpeg_temp_checkout_$$ \
+ && cd ffmpeg_temp_checkout_$$
+ echo "Checking out tag n$FFMPEG from '$FFURI':"
+ git clone ${FFURI} ffmpeg \
+ && cd ffmpeg \
+ && git checkout n$FFMPEG \
+ && cd ..
+ chown -R root:root . \
+ && tar --exclude-vcs -${TARCOMP}cf ${2} ffmpeg
+ cd ..
+ rm -rf ffmpeg_temp_checkout_$$
+ ;;
+ *) # Do nothing
+ ;;
+ esac
+}
+
+# Place to build (TMP) package (PKG) and output (OUTPUT) the program:
+TMP=${TMP:-/tmp/build}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+##
+## --- with a little luck, you won't have to edit below this point --- ##
+##
+
+# Exit the script on errors:
+set -e
+trap 'echo "$0 FAILED at line $LINENO!" | tee $OUTPUT/error-${PRGNAM}.log' ERR
+# Catch unitialized variables:
+set -u
+P1=${1:-1}
+
+# Create working directories:
+mkdir -p $TMP/tmp-$PRGNAM # location to build the source
+rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build
+mkdir -p $PKG # place for the package to be built
+rm -rf $PKG/* # erase old package's contents
+mkdir -p $OUTPUT # place for the package to be saved
+
+# Source file availability:
+for (( i = 0; i < ${#SOURCE[*]}; i++ )) ; do
+ if ! [ -f ${SOURCE[$i]} ]; then
+ echo "Source '$(basename ${SOURCE[$i]})' not available yet..."
+ # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT
+ [ -w "$SRCDIR" ] || SOURCE[$i]="$OUTPUT/$(basename ${SOURCE[$i]})"
+ if ! [ "x${SRCURL[$i]}" == "x" ]; then
+ echo "Will download file to $(dirname $SOURCE[$i])"
+ wget -nv -T 20 -O "${SOURCE[$i]}" "${SRCURL[$i]}" || true
+ if [ $? -ne 0 -o ! -s "${SOURCE[$i]}" ]; then
+ echo "Downloading '$(basename ${SOURCE[$i]})' failed.. aborting the build."
+ mv -f "${SOURCE[$i]}" "${SOURCE[$i]}".FAIL
+ exit 1
+ fi
+ else
+ # Try if we have a SVN/CVS download routine for ${SOURCE[$i]}
+ echo "Will checkout sources to $(dirname $SOURCE[$i])"
+ src_checkout $i "${SOURCE[$i]}" 2>&1 > $OUTPUT/checkout-$(basename ${SOURCE[$i]}).log
+ fi
+ if [ ! -f "${SOURCE[$i]}" -o ! -s "${SOURCE[$i]}" ]; then
+ echo "File '$(basename ${SOURCE[$i]})' not available.. aborting the build."
+ exit 1
+ fi
+ fi
+done
+
+if [ "$P1" == "--download" ]; then
+ echo "Download complete."
+ exit 0
+fi
+
+# --- PACKAGE BUILDING ---
+
+echo "++"
+echo "|| $PRGNAM-$VERSION"
+echo "++"
+
+cd $TMP/tmp-$PRGNAM
+echo "Extracting the source archive(s) for $PRGNAM..."
+tar -xvf ${SOURCE[0]}
+
+cd ${PRGNAM}-${VERSION}
+ # remove MPlayer's copy of libswscale
+ rm -rf ffmpeg
+
+ # Extract the ffmpeg source inside the MPlayer directory:
+ tar -xvf ${SOURCE[2]}
+
+ # in case we build with an official tarball
+ if [ -e "ffmpeg-$FFMPEG" ]; then
+ mv "ffmpeg-$FFMPEG" ffmpeg
+ fi
+
+cd ..
+
+chown -R root:root *
+chmod -R u+w,go+r-w,a+X-s *
+cd ${PRGNAM}-${VERSION}
+
+# Determine what X we're running (the modular X returns the prefix
+# in the next command, while older versions stay silent):
+XPREF=$(pkg-config --variable=prefix x11) || true
+[ "$XPREF" == "" ] && XPREF='/usr/X11R6'
+
+# Remove support for patent encumbered and possibly illegal code:
+if [ "$USE_PATENTS" != "YES" ]; then
+ DO_PATENTED="--disable-mp3lame --disable-mp3lame-lavc \
+ --disable-libopencore_amrnb \
+ --disable-libopencore_amrwb"
+else
+ DO_PATENTED=""
+fi
+
+echo Building ...
+# MPlayer wants to automatically determine compiler flags,
+# so we don't provide CFLAGS.
+./configure \
+ --prefix=/usr \
+ --mandir=/usr/man \
+ --confdir=/etc/mplayer \
+ --enable-gui \
+ --enable-menu \
+ --disable-arts \
+ --disable-bitmap-font \
+ --codecsdir=${CODECSDIR} \
+ --language="${LANGUAGES}" \
+ ${EXTRACONFIGUREOPTIONS} \
+ ${DO_PATENTED} \
+ 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
+# So that MPlayer does not report "UNKNOWN" as it's version:
+if [ ! -f VERSION ]; then
+ echo $VERSION > VERSION
+fi
+make $NUMJOBS 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
+make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log
+
+# Build the html documentation (not all languages are available):
+if [ "$LANGUAGES" = "all" ]; then
+ # make html-chunked
+ make html-single
+else
+ for i in $(echo $LANGUAGES | tr , ' ') ; do
+ # make html-chunked-$i ;
+ make html-single-$i ;
+ done
+fi
+
+# Prepare the configfile:
+mkdir -p $PKG/etc/mplayer
+cp etc/example.conf $PKG/etc/mplayer/mplayer.conf.new
+
+# Install our default skin:
+cd $PKG/usr/share/mplayer/skins
+tar -xvf ${SOURCE[1]}
+chown -R root:root *
+chmod -R u+w,go+r-w,a+X-s *
+ln -s ${DEFSKIN} default
+cd -
+
+# Add this to the doinst.sh:
+mkdir -p $PKG/install
+cat <<EOINS >> $PKG/install/doinst.sh
+# Handle the incoming configuration files:
+config() {
+ for infile in \$1; do
+ NEW="\$infile"
+ OLD="\`dirname \$NEW\`/\`basename \$NEW .new\`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r \$OLD ]; then
+ mv \$NEW \$OLD
+ elif [ "\`cat \$OLD | md5sum\`" = "\`cat \$NEW | md5sum\`" ]; then
+ # toss the redundant copy
+ rm \$NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+ done
+}
+
+# Installing a bitmap font is considered deprecated; use a TTF font instead.
+# We try to link to an installed TTF font at install time.
+# Configure a default TrueType font to use for the OSD :
+if [ ! -f usr/share/mplayer/subfont.ttf ]; then
+ for font in ${OSDFONTS}; do
+ if [ -f .${XPREF}/lib${LIBDIRSUFFIX}/X11/fonts/TTF/\${font} ]; then
+ ( cd usr/share/mplayer/
+ ln -sf ${XPREF}/lib${LIBDIRSUFFIX}/X11/fonts/TTF/\${font} subfont.ttf
+ )
+ break
+ fi
+ done
+fi
+
+# Prepare the new configuration file
+config etc/mplayer/mplayer.conf.new
+
+# Update the desktop database:
+if [ -x usr/bin/update-desktop-database ]; then
+ chroot . /usr/bin/update-desktop-database usr/share/applications 1> /dev/null 2> /dev/null
+fi
+
+# Update hicolor theme cache:
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x usr/bin/gtk-update-icon-cache ]; then
+ chroot . /usr/bin/gtk-update-icon-cache /usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
+
+# Update the mime database:
+if [ -x usr/bin/update-mime-database ]; then
+ chroot . /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
+fi
+
+EOINS
+
+# Add documentation:
+mkdir -p $PKG/usr/doc/$PRGNAM-$PKGVERSION
+cp -a $DOCS $PKG/usr/doc/$PRGNAM-$PKGVERSION || true
+cp -a $SRCDIR/$(basename $0) $PKG/usr/doc/$PRGNAM-$PKGVERSION/$PRGNAM.SlackBuild
+mv $PKG/usr/doc/$PRGNAM-$PKGVERSION/HTML $PKG/usr/doc/$PRGNAM-$PKGVERSION/html
+# Save a sample of all configuration files:
+for i in etc/*.conf ; do
+ cp $i $PKG/usr/doc/$PRGNAM-$PKGVERSION/$(basename $i)-sample
+done
+# Save a transcript of all configured options for this specific build:
+if [ -n $OUTPUT/configure-${PRGNAM}.log ]; then
+ cat $OUTPUT/configure-${PRGNAM}.log \
+ | sed -n "/^Config files successfully generated/,/^'config.h' and 'config.mak' contain your configuration options./p" \
+ > $PKG/usr/doc/$PRGNAM-$PKGVERSION/${PRGNAM}.configuration
+fi
+find $PKG/usr/doc -type f -exec chmod 644 {} \;
+
+# Compress the man page(s):
+if [ -d $PKG/usr/man ]; then
+ find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
+ for i in $(find $PKG/usr/man -type l -name "*.?") ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+fi
+
+# Strip binaries:
+( find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null )
+
+# Add a package description:
+mkdir -p $PKG/install
+cat $SRCDIR/slack-desc > $PKG/install/slack-desc
+if [ -f $SRCDIR/doinst.sh ]; then
+ cat $SRCDIR/doinst.sh >> $PKG/install/doinst.sh
+fi
+
+# Build the package:
+cd $PKG
+makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${PKGVERSION}-${ARCH}-${BUILD}${TAG}.txz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log
+cd $OUTPUT
+md5sum ${PRGNAM}-${PKGVERSION}-${ARCH}-${BUILD}${TAG}.txz > ${PRGNAM}-${PKGVERSION}-${ARCH}-${BUILD}${TAG}.txz.md5
+cd -
+cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${PKGVERSION}-${ARCH}-${BUILD}${TAG}.txt
+
diff --git a/patches/source/MPlayer/slack-desc b/patches/source/MPlayer/slack-desc
new file mode 100644
index 000000000..033b41706
--- /dev/null
+++ b/patches/source/MPlayer/slack-desc
@@ -0,0 +1,20 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+MPlayer: MPlayer (Linux movie player)
+MPlayer:
+MPlayer: MPlayer is a movie player for Linux. It plays most MPEG, VOB, AVI,
+MPlayer: Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, FLI, RM, NuppelVideo,
+MPlayer: YUV4MPEG, FILM, RoQ, PVA files, supported by many native, XAnim,
+MPlayer: and Win32 DLL codecs. You can watch VideoCD, SVCD, DVD, 3ivx,
+MPlayer: DivX 3/4/5 and even WMV movies, too (without the avifile library).
+MPlayer: MPlayer supports 10 types of subtitles formats: VobSub,
+MPlayer: MicroDVD, SubRip, SubViewer, Sami, VPlayer, RT, SSA, AQTitle, MPsub.
+MPlayer:
+MPlayer: Homepage for MPLayer is http://www.mplayerhq.hu/
+
diff --git a/patches/source/apr-util/apr-util.SlackBuild b/patches/source/apr-util/apr-util.SlackBuild
new file mode 100755
index 000000000..c3c8c8669
--- /dev/null
+++ b/patches/source/apr-util/apr-util.SlackBuild
@@ -0,0 +1,124 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+VERSION=${VERSION:-$(echo apr-util-*.tar.bz2 | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-apr-util
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf apr-util-$VERSION
+tar xvf $CWD/apr-util-$VERSION.tar.bz2 || exit 1
+cd apr-util-$VERSION
+
+# For now, this isn't working with svn (here, anyway) and is probably
+# more trouble than it's worth. Could be a grey area in regards to
+# licensing, too -- the Apache people say it's fine for third parties
+# to link this and distribute the result, but there are usually some
+# differing opinions when it comes to this sort of thing...
+#( cd dbd ; lftpget http://apache.webthing.com/svn/apache/apr/apr_dbd_mysql.c )
+# --with-mysql=/usr \
+#
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --with-apr=/usr \
+ --with-dbm=db44 \
+ --with-berkeley-db \
+ --disable-util-dso \
+ --without-gdbm \
+ --with-ldap \
+ --disable-static \
+ --without-sqlite2 \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make dox || exit 1
+make install DESTDIR=$PKG
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/usr/doc/apr-util-$VERSION
+cp -a \
+ INSTALL.MySQL LICENSE NOTICE \
+ $PKG/usr/doc/apr-util-$VERSION
+
+# If there's a CHANGES file, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r CHANGES ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat CHANGES | head -n 1000 > $DOCSDIR/CHANGES
+ touch -r CHANGES $DOCSDIR/CHANGES
+fi
+
+# This just seems like way too much stuff...
+#mv docs/dox/html $PKG/usr/doc/apr-util-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/apr-util-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/apr-util/apr-util.url b/patches/source/apr-util/apr-util.url
new file mode 100644
index 000000000..7bdef9de7
--- /dev/null
+++ b/patches/source/apr-util/apr-util.url
@@ -0,0 +1,2 @@
+http://www.apache.org/dist/apr/apr-util-1.5.3.tar.bz2
+http://www.apache.org/dist/apr/apr-util-1.5.3.tar.bz2.asc
diff --git a/patches/source/apr-util/slack-desc b/patches/source/apr-util/slack-desc
new file mode 100644
index 000000000..cec19063e
--- /dev/null
+++ b/patches/source/apr-util/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+apr-util: apr-util (Apache Portable Runtime utilities)
+apr-util:
+apr-util: The mission of the Apache Portable Runtime (APR) is to provide a
+apr-util: free library of C data structures and routines, forming a system
+apr-util: portability layer to as many operating systems as possible.
+apr-util:
+apr-util: This package contains additional utility interfaces for APR;
+apr-util: including support for XML, LDAP, database interfaces, URI parsing,
+apr-util: and more.
+apr-util:
+apr-util:
diff --git a/patches/source/apr/apr.SlackBuild b/patches/source/apr/apr.SlackBuild
new file mode 100755
index 000000000..34b7de761
--- /dev/null
+++ b/patches/source/apr/apr.SlackBuild
@@ -0,0 +1,110 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+VERSION=${VERSION:-$(echo apr-*.tar.bz2 | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-apr
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf apr-$VERSION
+tar xvf $CWD/apr-$VERSION.tar.bz2 || exit 1
+cd apr-$VERSION
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --with-installbuilddir=/usr/lib${LIBDIRSUFFIX}/apr-${VERSION}/build-1 \
+ --disable-static \
+ --with-devrandom=/dev/urandom \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make dox || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/usr/doc/apr-$VERSION
+cp -a \
+ LICENSE NOTICE README* \
+ $PKG/usr/doc/apr-$VERSION
+
+# If there's a CHANGES file, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r CHANGES ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat CHANGES | head -n 1000 > $DOCSDIR/CHANGES
+ touch -r CHANGES $DOCSDIR/CHANGES
+fi
+
+# This just seems like way too much stuff...
+#mv docs/dox/html $PKG/usr/doc/apr-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/apr-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/apr/apr.url b/patches/source/apr/apr.url
new file mode 100644
index 000000000..7ef8d7752
--- /dev/null
+++ b/patches/source/apr/apr.url
@@ -0,0 +1,2 @@
+http://www.apache.org/dist/apr/apr-1.5.0.tar.bz2
+http://www.apache.org/dist/apr/apr-1.5.0.tar.bz2.asc
diff --git a/patches/source/apr/slack-desc b/patches/source/apr/slack-desc
new file mode 100644
index 000000000..2e52660d5
--- /dev/null
+++ b/patches/source/apr/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+apr: apr (Apache Portable Runtime)
+apr:
+apr: The mission of the Apache Portable Runtime (APR) is to provide a
+apr: free library of C data structures and routines, forming a system
+apr: portability layer to as many operating systems as possible.
+apr:
+apr:
+apr:
+apr:
+apr:
+apr:
diff --git a/patches/source/bash/bash-4.2-patches/bash42-001 b/patches/source/bash/bash-4.2-patches/bash42-001
new file mode 100644
index 000000000..547aaa06f
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-001
@@ -0,0 +1,78 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-001
+
+Bug-Reported-by: Juergen Daubert <jue@jue.li>
+Bug-Reference-ID: <20110214175132.GA19813@jue.netz>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00125.html
+
+Bug-Description:
+
+When running in Posix mode, bash does not correctly expand the right-hand
+side of a double-quoted word expansion containing single quotes.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/subst.c 2011-01-02 16:12:51.000000000 -0500
+--- subst.c 2011-02-19 00:00:00.000000000 -0500
+***************
+*** 1380,1387 ****
+
+ /* The handling of dolbrace_state needs to agree with the code in parse.y:
+! parse_matched_pair() */
+! dolbrace_state = 0;
+! if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
+! dolbrace_state = (flags & SX_POSIXEXP) ? DOLBRACE_QUOTE : DOLBRACE_PARAM;
+
+ i = *sindex;
+--- 1380,1389 ----
+
+ /* The handling of dolbrace_state needs to agree with the code in parse.y:
+! parse_matched_pair(). The different initial value is to handle the
+! case where this function is called to parse the word in
+! ${param op word} (SX_WORD). */
+! dolbrace_state = (flags & SX_WORD) ? DOLBRACE_WORD : DOLBRACE_PARAM;
+! if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && (flags & SX_POSIXEXP))
+! dolbrace_state = DOLBRACE_QUOTE;
+
+ i = *sindex;
+***************
+*** 7177,7181 ****
+ /* Extract the contents of the ${ ... } expansion
+ according to the Posix.2 rules. */
+! value = extract_dollar_brace_string (string, &sindex, quoted, (c == '%' || c == '#') ? SX_POSIXEXP : 0);
+ if (string[sindex] == RBRACE)
+ sindex++;
+--- 7181,7185 ----
+ /* Extract the contents of the ${ ... } expansion
+ according to the Posix.2 rules. */
+! value = extract_dollar_brace_string (string, &sindex, quoted, (c == '%' || c == '#' || c =='/' || c == '^' || c == ',' || c ==':') ? SX_POSIXEXP|SX_WORD : SX_WORD);
+ if (string[sindex] == RBRACE)
+ sindex++;
+*** ../bash-4.2-patched/subst.h 2010-12-02 20:21:29.000000000 -0500
+--- subst.h 2011-02-16 21:12:09.000000000 -0500
+***************
+*** 57,60 ****
+--- 57,61 ----
+ #define SX_ARITHSUB 0x0080 /* extracting $(( ... )) (currently unused) */
+ #define SX_POSIXEXP 0x0100 /* extracting new Posix pattern removal expansions in extract_dollar_brace_string */
++ #define SX_WORD 0x0200 /* extracting word in ${param op word} */
+
+ /* Remove backslashes which are quoting backquotes from STRING. Modifies
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 0
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 1
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-002 b/patches/source/bash/bash-4.2-patches/bash42-002
new file mode 100644
index 000000000..077c7e0f8
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-002
@@ -0,0 +1,60 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-002
+
+Bug-Reported-by: Clark J. Wang <dearvoid@gmail.com>
+Bug-Reference-ID: <AANLkTimGbW7aC4E5infXP6ku5WPci4t=xVc+L1SyHqrD@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00157.html
+
+Bug-Description:
+
+The readline vi-mode `cc', `dd', and `yy' commands failed to modify the
+entire line.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/lib/readline/vi_mode.c 2010-11-20 19:51:39.000000000 -0500
+--- lib/readline/vi_mode.c 2011-02-17 20:24:25.000000000 -0500
+***************
+*** 1115,1119 ****
+ _rl_vi_last_motion = c;
+ RL_UNSETSTATE (RL_STATE_VIMOTION);
+! return (0);
+ }
+ #if defined (READLINE_CALLBACKS)
+--- 1115,1119 ----
+ _rl_vi_last_motion = c;
+ RL_UNSETSTATE (RL_STATE_VIMOTION);
+! return (vidomove_dispatch (m));
+ }
+ #if defined (READLINE_CALLBACKS)
+*** ../bash-4.2-patched/lib/readline/callback.c 2010-06-06 12:18:58.000000000 -0400
+--- lib/readline/callback.c 2011-02-17 20:43:28.000000000 -0500
+***************
+*** 149,152 ****
+--- 149,155 ----
+ /* Should handle everything, including cleanup, numeric arguments,
+ and turning off RL_STATE_VIMOTION */
++ if (RL_ISSTATE (RL_STATE_NUMERICARG) == 0)
++ _rl_internal_char_cleanup ();
++
+ return;
+ }
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 1
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 2
+
+ #endif /* _PATCHLEVEL_H_ */
+
diff --git a/patches/source/bash/bash-4.2-patches/bash42-003 b/patches/source/bash/bash-4.2-patches/bash42-003
new file mode 100644
index 000000000..c488e96b2
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-003
@@ -0,0 +1,318 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-003
+
+Bug-Reported-by: Clark J. Wang <dearvoid@gmail.com>
+Bug-Reference-ID: <AANLkTikZ_rVV-frR8Fh0PzhXnMKnm5XsUR-F3qtPPs5G@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00136.html
+
+Bug-Description:
+
+When using the pattern replacement and pattern removal word expansions, bash
+miscalculates the possible match length in the presence of an unescaped left
+bracket without a closing right bracket, resulting in a failure to match
+the pattern.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/lib/glob/gmisc.c 2011-02-05 16:11:17.000000000 -0500
+--- lib/glob/gmisc.c 2011-02-18 23:53:42.000000000 -0500
+***************
+*** 78,83 ****
+ size_t wmax;
+ {
+! wchar_t wc, *wbrack;
+! int matlen, t, in_cclass, in_collsym, in_equiv;
+
+ if (*wpat == 0)
+--- 78,83 ----
+ size_t wmax;
+ {
+! wchar_t wc;
+! int matlen, bracklen, t, in_cclass, in_collsym, in_equiv;
+
+ if (*wpat == 0)
+***************
+*** 119,123 ****
+ case L'[':
+ /* scan for ending `]', skipping over embedded [:...:] */
+! wbrack = wpat;
+ wc = *wpat++;
+ do
+--- 119,123 ----
+ case L'[':
+ /* scan for ending `]', skipping over embedded [:...:] */
+! bracklen = 1;
+ wc = *wpat++;
+ do
+***************
+*** 125,140 ****
+ if (wc == 0)
+ {
+! matlen += wpat - wbrack - 1; /* incremented below */
+! break;
+ }
+ else if (wc == L'\\')
+ {
+! wc = *wpat++;
+! if (*wpat == 0)
+! break;
+ }
+ else if (wc == L'[' && *wpat == L':') /* character class */
+ {
+ wpat++;
+ in_cclass = 1;
+ }
+--- 125,148 ----
+ if (wc == 0)
+ {
+! wpat--; /* back up to NUL */
+! matlen += bracklen;
+! goto bad_bracket;
+ }
+ else if (wc == L'\\')
+ {
+! /* *wpat == backslash-escaped character */
+! bracklen++;
+! /* If the backslash or backslash-escape ends the string,
+! bail. The ++wpat skips over the backslash escape */
+! if (*wpat == 0 || *++wpat == 0)
+! {
+! matlen += bracklen;
+! goto bad_bracket;
+! }
+ }
+ else if (wc == L'[' && *wpat == L':') /* character class */
+ {
+ wpat++;
++ bracklen++;
+ in_cclass = 1;
+ }
+***************
+*** 142,145 ****
+--- 150,154 ----
+ {
+ wpat++;
++ bracklen++;
+ in_cclass = 0;
+ }
+***************
+*** 147,152 ****
+ {
+ wpat++;
+ if (*wpat == L']') /* right bracket can appear as collating symbol */
+! wpat++;
+ in_collsym = 1;
+ }
+--- 156,165 ----
+ {
+ wpat++;
++ bracklen++;
+ if (*wpat == L']') /* right bracket can appear as collating symbol */
+! {
+! wpat++;
+! bracklen++;
+! }
+ in_collsym = 1;
+ }
+***************
+*** 154,157 ****
+--- 167,171 ----
+ {
+ wpat++;
++ bracklen++;
+ in_collsym = 0;
+ }
+***************
+*** 159,164 ****
+ {
+ wpat++;
+ if (*wpat == L']') /* right bracket can appear as equivalence class */
+! wpat++;
+ in_equiv = 1;
+ }
+--- 173,182 ----
+ {
+ wpat++;
++ bracklen++;
+ if (*wpat == L']') /* right bracket can appear as equivalence class */
+! {
+! wpat++;
+! bracklen++;
+! }
+ in_equiv = 1;
+ }
+***************
+*** 166,174 ****
+--- 184,196 ----
+ {
+ wpat++;
++ bracklen++;
+ in_equiv = 0;
+ }
++ else
++ bracklen++;
+ }
+ while ((wc = *wpat++) != L']');
+ matlen++; /* bracket expression can only match one char */
++ bad_bracket:
+ break;
+ }
+***************
+*** 214,219 ****
+ size_t max;
+ {
+! char c, *brack;
+! int matlen, t, in_cclass, in_collsym, in_equiv;
+
+ if (*pat == 0)
+--- 236,241 ----
+ size_t max;
+ {
+! char c;
+! int matlen, bracklen, t, in_cclass, in_collsym, in_equiv;
+
+ if (*pat == 0)
+***************
+*** 255,259 ****
+ case '[':
+ /* scan for ending `]', skipping over embedded [:...:] */
+! brack = pat;
+ c = *pat++;
+ do
+--- 277,281 ----
+ case '[':
+ /* scan for ending `]', skipping over embedded [:...:] */
+! bracklen = 1;
+ c = *pat++;
+ do
+***************
+*** 261,276 ****
+ if (c == 0)
+ {
+! matlen += pat - brack - 1; /* incremented below */
+! break;
+ }
+ else if (c == '\\')
+ {
+! c = *pat++;
+! if (*pat == 0)
+! break;
+ }
+ else if (c == '[' && *pat == ':') /* character class */
+ {
+ pat++;
+ in_cclass = 1;
+ }
+--- 283,306 ----
+ if (c == 0)
+ {
+! pat--; /* back up to NUL */
+! matlen += bracklen;
+! goto bad_bracket;
+ }
+ else if (c == '\\')
+ {
+! /* *pat == backslash-escaped character */
+! bracklen++;
+! /* If the backslash or backslash-escape ends the string,
+! bail. The ++pat skips over the backslash escape */
+! if (*pat == 0 || *++pat == 0)
+! {
+! matlen += bracklen;
+! goto bad_bracket;
+! }
+ }
+ else if (c == '[' && *pat == ':') /* character class */
+ {
+ pat++;
++ bracklen++;
+ in_cclass = 1;
+ }
+***************
+*** 278,281 ****
+--- 308,312 ----
+ {
+ pat++;
++ bracklen++;
+ in_cclass = 0;
+ }
+***************
+*** 283,288 ****
+ {
+ pat++;
+ if (*pat == ']') /* right bracket can appear as collating symbol */
+! pat++;
+ in_collsym = 1;
+ }
+--- 314,323 ----
+ {
+ pat++;
++ bracklen++;
+ if (*pat == ']') /* right bracket can appear as collating symbol */
+! {
+! pat++;
+! bracklen++;
+! }
+ in_collsym = 1;
+ }
+***************
+*** 290,293 ****
+--- 325,329 ----
+ {
+ pat++;
++ bracklen++;
+ in_collsym = 0;
+ }
+***************
+*** 295,300 ****
+ {
+ pat++;
+ if (*pat == ']') /* right bracket can appear as equivalence class */
+! pat++;
+ in_equiv = 1;
+ }
+--- 331,340 ----
+ {
+ pat++;
++ bracklen++;
+ if (*pat == ']') /* right bracket can appear as equivalence class */
+! {
+! pat++;
+! bracklen++;
+! }
+ in_equiv = 1;
+ }
+***************
+*** 302,310 ****
+--- 342,354 ----
+ {
+ pat++;
++ bracklen++;
+ in_equiv = 0;
+ }
++ else
++ bracklen++;
+ }
+ while ((c = *pat++) != ']');
+ matlen++; /* bracket expression can only match one char */
++ bad_bracket:
+ break;
+ }
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 2
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 3
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-004 b/patches/source/bash/bash-4.2-patches/bash42-004
new file mode 100644
index 000000000..fe29f82c7
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-004
@@ -0,0 +1,53 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-004
+
+Bug-Reported-by: Mike Frysinger <vapier@gentoo.org>
+Bug-Reference-ID: <201102182106.17834.vapier@gentoo.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00222.html
+
+Bug-Description:
+
+When used in contexts where word splitting and quote removal were not
+performed, such as pattern removal or pattern substitution, empty strings
+(either literal or resulting from quoted variables that were unset or
+null) were not matched correctly, resulting in failure.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/subst.c 2011-01-02 16:12:51.000000000 -0500
+--- subst.c 2011-02-18 22:30:13.000000000 -0500
+***************
+*** 3373,3379 ****
+ if (string == 0 || *string == '\0')
+ return (WORD_LIST *)NULL;
+
+! td.flags = 0;
+ td.word = string;
+ tresult = call_expand_word_internal (&td, quoted, 1, dollar_at_p, has_dollar_at);
+ return (tresult);
+--- 3373,3379 ----
+ if (string == 0 || *string == '\0')
+ return (WORD_LIST *)NULL;
+
+! td.flags = W_NOSPLIT2; /* no splitting, remove "" and '' */
+ td.word = string;
+ tresult = call_expand_word_internal (&td, quoted, 1, dollar_at_p, has_dollar_at);
+ return (tresult);
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 3
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 4
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-005 b/patches/source/bash/bash-4.2-patches/bash42-005
new file mode 100644
index 000000000..3ca9fc1da
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-005
@@ -0,0 +1,131 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-005
+
+Bug-Reported-by: Dennis Williamson <dennistwilliamson@gmail.com>
+Bug-Reference-ID: <AANLkTikDbEV5rnbPc0zOfmZfBcg0xGetzLLzK+KjRiNa@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00147.html
+
+Bug-Description:
+
+Systems that use tzset() to set the local timezone require the TZ variable
+to be in the environment. Bash must make sure the environment has been
+modified with any updated value for TZ before calling tzset(). This
+affects prompt string expansions and the `%T' printf conversion specification
+on systems that do not allow bash to supply a replacement for getenv(3).
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/variables.h 2010-12-02 20:22:01.000000000 -0500
+--- variables.h 2011-02-19 19:57:12.000000000 -0500
+***************
+*** 314,317 ****
+--- 314,318 ----
+ extern void sort_variables __P((SHELL_VAR **));
+
++ extern int chkexport __P((char *));
+ extern void maybe_make_export_env __P((void));
+ extern void update_export_env_inplace __P((char *, int, char *));
+*** ../bash-4.2-patched/variables.c 2011-01-24 20:07:48.000000000 -0500
+--- variables.c 2011-02-19 20:04:50.000000000 -0500
+***************
+*** 3654,3657 ****
+--- 3654,3673 ----
+ }
+
++ int
++ chkexport (name)
++ char *name;
++ {
++ SHELL_VAR *v;
++
++ v = find_variable (name);
++ if (exported_p (v))
++ {
++ array_needs_making = 1;
++ maybe_make_export_env ();
++ return 1;
++ }
++ return 0;
++ }
++
+ void
+ maybe_make_export_env ()
+***************
+*** 4215,4219 ****
+ { "TEXTDOMAINDIR", sv_locale },
+
+! #if defined (HAVE_TZSET) && defined (PROMPT_STRING_DECODE)
+ { "TZ", sv_tz },
+ #endif
+--- 4231,4235 ----
+ { "TEXTDOMAINDIR", sv_locale },
+
+! #if defined (HAVE_TZSET)
+ { "TZ", sv_tz },
+ #endif
+***************
+*** 4559,4568 ****
+ #endif /* HISTORY */
+
+! #if defined (HAVE_TZSET) && defined (PROMPT_STRING_DECODE)
+ void
+ sv_tz (name)
+ char *name;
+ {
+! tzset ();
+ }
+ #endif
+--- 4575,4585 ----
+ #endif /* HISTORY */
+
+! #if defined (HAVE_TZSET)
+ void
+ sv_tz (name)
+ char *name;
+ {
+! if (chkexport (name))
+! tzset ();
+ }
+ #endif
+*** ../bash-4.2-patched/parse.y 2011-01-02 15:48:11.000000000 -0500
+--- parse.y 2011-02-19 20:05:00.000000000 -0500
+***************
+*** 5136,5139 ****
+--- 5136,5142 ----
+ /* Make the current time/date into a string. */
+ (void) time (&the_time);
++ #if defined (HAVE_TZSET)
++ sv_tz ("TZ"); /* XXX -- just make sure */
++ #endif
+ tm = localtime (&the_time);
+
+*** ../bash-4.2-patched/builtins/printf.def 2010-11-23 10:02:55.000000000 -0500
+--- builtins/printf.def 2011-02-19 20:05:04.000000000 -0500
+***************
+*** 466,469 ****
+--- 466,472 ----
+ else
+ secs = arg;
++ #if defined (HAVE_TZSET)
++ sv_tz ("TZ"); /* XXX -- just make sure */
++ #endif
+ tm = localtime (&secs);
+ n = strftime (timebuf, sizeof (timebuf), timefmt, tm);
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 4
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 5
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-006 b/patches/source/bash/bash-4.2-patches/bash42-006
new file mode 100644
index 000000000..be6e49c72
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-006
@@ -0,0 +1,46 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-006
+
+Bug-Reported-by: Allan McRae <allan@archlinux.org>
+Bug-Reference-ID: <4D6D0D0B.50908@archlinux.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-03/msg00001.html
+
+Bug-Description:
+
+A problem with bash42-005 caused it to dump core if TZ was unset.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/variables.c 2011-02-25 12:07:41.000000000 -0500
+--- variables.c 2011-03-01 10:13:04.000000000 -0500
+***************
+*** 3661,3665 ****
+
+ v = find_variable (name);
+! if (exported_p (v))
+ {
+ array_needs_making = 1;
+--- 3661,3665 ----
+
+ v = find_variable (name);
+! if (v && exported_p (v))
+ {
+ array_needs_making = 1;
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 5
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 6
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-007 b/patches/source/bash/bash-4.2-patches/bash42-007
new file mode 100644
index 000000000..d16156e27
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-007
@@ -0,0 +1,46 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-007
+
+Bug-Reported-by: Matthias Klose <doko@debian.org>
+Bug-Reference-ID: <4D6FD2AC.1010500@debian.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-03/msg00015.html
+
+Bug-Description:
+
+When used in contexts where word splitting and quote removal were not
+performed, such as case statement word expansion, empty strings
+(either literal or resulting from quoted variables that were unset or
+null) were not expanded correctly, resulting in failure.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/subst.c 2011-02-25 12:03:58.000000000 -0500
+--- subst.c 2011-03-03 14:08:23.000000000 -0500
+***************
+*** 4609,4614 ****
+--- 4611,4617 ----
+ if (ifs_firstc == 0)
+ #endif
+ word->flags |= W_NOSPLIT;
++ word->flags |= W_NOSPLIT2;
+ result = call_expand_word_internal (word, quoted, 0, (int *)NULL, (int *)NULL);
+ expand_no_split_dollar_star = 0;
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 6
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 7
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-008 b/patches/source/bash/bash-4.2-patches/bash42-008
new file mode 100644
index 000000000..631abbdf7
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-008
@@ -0,0 +1,74 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-008
+
+Bug-Reported-by: Doug McMahon <mc2man@optonline.net>
+Bug-Reference-ID: <1299441211.2535.11.camel@doug-XPS-M1330>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-03/msg00050.html
+
+Bug-Description:
+
+Bash-4.2 does not attempt to save the shell history on receipt of a
+terminating signal that is handled synchronously. Unfortunately, the
+`close' button on most X11 terminal emulators sends SIGHUP, which
+kills the shell.
+
+This is a very small patch to save the history in the case that an
+interactive shell receives a SIGHUP or SIGTERM while in readline and
+reading a command.
+
+The next version of bash will do this differently.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/sig.c Tue Nov 23 08:21:22 2010
+--- sig.c Tue Mar 8 21:28:32 2011
+***************
+*** 47,50 ****
+--- 47,51 ----
+ #if defined (READLINE)
+ # include "bashline.h"
++ # include <readline/readline.h>
+ #endif
+
+***************
+*** 63,66 ****
+--- 64,68 ----
+ extern int history_lines_this_session;
+ #endif
++ extern int no_line_editing;
+
+ extern void initialize_siglist ();
+***************
+*** 506,510 ****
+ #if defined (HISTORY)
+ /* XXX - will inhibit history file being written */
+! history_lines_this_session = 0;
+ #endif
+ terminate_immediately = 0;
+--- 508,515 ----
+ #if defined (HISTORY)
+ /* XXX - will inhibit history file being written */
+! # if defined (READLINE)
+! if (interactive_shell == 0 || interactive == 0 || (sig != SIGHUP && sig != SIGTERM) || no_line_editing || (RL_ISSTATE (RL_STATE_READCMD) == 0))
+! # endif
+! history_lines_this_session = 0;
+ #endif
+ terminate_immediately = 0;
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 7
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 8
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-009 b/patches/source/bash/bash-4.2-patches/bash42-009
new file mode 100644
index 000000000..83a7e2c74
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-009
@@ -0,0 +1,82 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-009
+
+Bug-Reported-by: <piuma@piumalab.org>
+Bug-Reference-ID: <4DAAC0DB.7060606@piumalab.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-04/msg00075.html
+
+Bug-Description:
+
+Under certain circumstances, running `fc -l' two times in succession with a
+relative history offset at the end of the history will result in an incorrect
+calculation of the last history entry and a seg fault.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/builtins/fc.def 2010-05-30 18:25:38.000000000 -0400
+--- builtins/fc.def 2011-04-19 15:46:17.000000000 -0400
+***************
+*** 305,309 ****
+
+ /* XXX */
+! if (saved_command_line_count > 0 && i == last_hist && hlist[last_hist] == 0)
+ while (last_hist >= 0 && hlist[last_hist] == 0)
+ last_hist--;
+--- 305,309 ----
+
+ /* XXX */
+! if (i == last_hist && hlist[last_hist] == 0)
+ while (last_hist >= 0 && hlist[last_hist] == 0)
+ last_hist--;
+***************
+*** 476,480 ****
+ {
+ int sign, n, clen, rh;
+! register int i, j;
+ register char *s;
+
+--- 476,480 ----
+ {
+ int sign, n, clen, rh;
+! register int i, j, last_hist;
+ register char *s;
+
+***************
+*** 496,500 ****
+ calculation as if it were on. */
+ rh = remember_on_history || ((subshell_environment & SUBSHELL_COMSUB) && enable_history_list);
+! i -= rh + hist_last_line_added;
+
+ /* No specification defaults to most recent command. */
+--- 496,508 ----
+ calculation as if it were on. */
+ rh = remember_on_history || ((subshell_environment & SUBSHELL_COMSUB) && enable_history_list);
+! last_hist = i - rh - hist_last_line_added;
+!
+! if (i == last_hist && hlist[last_hist] == 0)
+! while (last_hist >= 0 && hlist[last_hist] == 0)
+! last_hist--;
+! if (last_hist < 0)
+! return (-1);
+!
+! i = last_hist;
+
+ /* No specification defaults to most recent command. */
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 8
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 9
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-010 b/patches/source/bash/bash-4.2-patches/bash42-010
new file mode 100644
index 000000000..e408abd61
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-010
@@ -0,0 +1,61 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-010
+
+Bug-Reported-by: Mike Frysinger <vapier@gentoo.org>
+Bug-Reference-ID: <201104122356.20160.vapier@gentoo.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-04/msg00058.html
+
+Bug-Description:
+
+Bash did not correctly print/reproduce here documents attached to commands
+inside compound commands such as arithmetic for loops and user-specified
+subshells. This affected the execution of such commands inside a shell
+function when the function definition is saved and later restored using
+`.' or `eval'.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/print_cmd.c 2010-05-30 18:34:08.000000000 -0400
+--- print_cmd.c 2011-04-14 10:43:18.000000000 -0400
+***************
+*** 316,319 ****
+--- 317,321 ----
+ skip_this_indent++;
+ make_command_string_internal (command->value.Subshell->command);
++ PRINT_DEFERRED_HEREDOCS ("");
+ cprintf (" )");
+ break;
+***************
+*** 593,596 ****
+--- 606,610 ----
+ indentation += indentation_amount;
+ make_command_string_internal (arith_for_command->action);
++ PRINT_DEFERRED_HEREDOCS ("");
+ semicolon ();
+ indentation -= indentation_amount;
+***************
+*** 654,657 ****
+--- 668,672 ----
+
+ make_command_string_internal (group_command->command);
++ PRINT_DEFERRED_HEREDOCS ("");
+
+ if (inside_function_def)
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 9
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 10
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-011 b/patches/source/bash/bash-4.2-patches/bash42-011
new file mode 100644
index 000000000..26fdf65f6
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-011
@@ -0,0 +1,46 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-011
+
+Bug-Reported-by: "David Parks" <davidparks21@yahoo.com>
+Bug-Reference-ID: <014101cc82c6$46ac1540$d4043fc0$@com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-10/msg00031.html
+
+Bug-Description:
+
+Overwriting a value in an associative array causes the memory allocated to
+store the key on the second and subsequent assignments to leak.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/assoc.c 2009-08-05 20:19:40.000000000 -0400
+--- assoc.c 2011-10-04 20:23:07.000000000 -0400
+***************
+*** 78,81 ****
+--- 78,86 ----
+ if (b == 0)
+ return -1;
++ /* If we are overwriting an existing element's value, we're not going to
++ use the key. Nothing in the array assignment code path frees the key
++ string, so we can free it here to avoid a memory leak. */
++ if (b->key != key)
++ free (key);
+ FREE (b->data);
+ b->data = value ? savestring (value) : (char *)0;
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 10
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 11
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-012 b/patches/source/bash/bash-4.2-patches/bash42-012
new file mode 100644
index 000000000..70f0a56b6
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-012
@@ -0,0 +1,151 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-012
+
+Bug-Reported-by: Rui Santos <rsantos@grupopie.com>
+Bug-Reference-ID: <4E04C6D0.2020507@grupopie.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-06/msg00079.html
+
+Bug-Description:
+
+When calling the parser to recursively parse a command substitution within
+an arithmetic expansion, the shell overwrote the saved shell input line and
+associated state, resulting in a garbled command.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/parse.y 2011-02-26 19:19:05.000000000 -0500
+--- parse.y 2011-06-24 20:08:22.000000000 -0400
+***************
+*** 3843,3846 ****
+--- 3849,3853 ----
+ {
+ sh_parser_state_t ps;
++ sh_input_line_state_t ls;
+ int orig_ind, nc, sflags;
+ char *ret, *s, *ep, *ostring;
+***************
+*** 3850,3857 ****
+--- 3857,3866 ----
+ ostring = string;
+
++ /*itrace("xparse_dolparen: size = %d shell_input_line = `%s'", shell_input_line_size, shell_input_line);*/
+ sflags = SEVAL_NONINT|SEVAL_NOHIST|SEVAL_NOFREE;
+ if (flags & SX_NOLONGJMP)
+ sflags |= SEVAL_NOLONGJMP;
+ save_parser_state (&ps);
++ save_input_line_state (&ls);
+
+ /*(*/
+***************
+*** 3862,3865 ****
+--- 3871,3876 ----
+ restore_parser_state (&ps);
+ reset_parser ();
++ /* reset_parser clears shell_input_line and associated variables */
++ restore_input_line_state (&ls);
+ if (interactive)
+ token_to_read = 0;
+***************
+*** 5909,5912 ****
+--- 5920,5929 ----
+ ps->echo_input_at_read = echo_input_at_read;
+
++ ps->token = token;
++ ps->token_buffer_size = token_buffer_size;
++ /* Force reallocation on next call to read_token_word */
++ token = 0;
++ token_buffer_size = 0;
++
+ return (ps);
+ }
+***************
+*** 5950,5953 ****
+--- 5967,6006 ----
+ expand_aliases = ps->expand_aliases;
+ echo_input_at_read = ps->echo_input_at_read;
++
++ FREE (token);
++ token = ps->token;
++ token_buffer_size = ps->token_buffer_size;
++ }
++
++ sh_input_line_state_t *
++ save_input_line_state (ls)
++ sh_input_line_state_t *ls;
++ {
++ if (ls == 0)
++ ls = (sh_input_line_state_t *)xmalloc (sizeof (sh_input_line_state_t));
++ if (ls == 0)
++ return ((sh_input_line_state_t *)NULL);
++
++ ls->input_line = shell_input_line;
++ ls->input_line_size = shell_input_line_size;
++ ls->input_line_len = shell_input_line_len;
++ ls->input_line_index = shell_input_line_index;
++
++ /* force reallocation */
++ shell_input_line = 0;
++ shell_input_line_size = shell_input_line_len = shell_input_line_index = 0;
++ }
++
++ void
++ restore_input_line_state (ls)
++ sh_input_line_state_t *ls;
++ {
++ FREE (shell_input_line);
++ shell_input_line = ls->input_line;
++ shell_input_line_size = ls->input_line_size;
++ shell_input_line_len = ls->input_line_len;
++ shell_input_line_index = ls->input_line_index;
++
++ set_line_mbstate ();
+ }
+
+*** ../bash-4.2-patched/shell.h 2011-01-06 22:16:55.000000000 -0500
+--- shell.h 2011-06-24 19:12:25.000000000 -0400
+***************
+*** 137,140 ****
+--- 139,145 ----
+ int *token_state;
+
++ char *token;
++ int token_buffer_size;
++
+ /* input line state -- line number saved elsewhere */
+ int input_line_terminator;
+***************
+*** 167,171 ****
+--- 172,186 ----
+ } sh_parser_state_t;
+
++ typedef struct _sh_input_line_state_t {
++ char *input_line;
++ int input_line_index;
++ int input_line_size;
++ int input_line_len;
++ } sh_input_line_state_t;
++
+ /* Let's try declaring these here. */
+ extern sh_parser_state_t *save_parser_state __P((sh_parser_state_t *));
+ extern void restore_parser_state __P((sh_parser_state_t *));
++
++ extern sh_input_line_state_t *save_input_line_state __P((sh_input_line_state_t *));
++ extern void restore_input_line_state __P((sh_input_line_state_t *));
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 11
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 12
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-013 b/patches/source/bash/bash-4.2-patches/bash42-013
new file mode 100644
index 000000000..5bb186b3a
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-013
@@ -0,0 +1,52 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-013
+
+Bug-Reported-by: Marten Wikstrom <marten.wikstrom@keystream.se>
+Bug-Reference-ID: <BANLkTikKECAh94ZEX68iQvxYuPeEM_xoSQ@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-05/msg00049.html
+
+Bug-Description:
+
+An off-by-one error caused the shell to skip over CTLNUL characters,
+which are used internally to mark quoted null strings. The effect
+was to have stray 0x7f characters left after expanding words like
+""""""""aa.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/subst.c 2011-03-06 14:11:11.000000000 -0500
+--- subst.c 2011-05-11 11:23:33.000000000 -0400
+***************
+*** 3707,3711 ****
+ }
+ else if (string[i] == CTLNUL)
+! i++;
+
+ prev_i = i;
+--- 3710,3717 ----
+ }
+ else if (string[i] == CTLNUL)
+! {
+! i++;
+! continue;
+! }
+
+ prev_i = i;
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 12
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 13
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-014 b/patches/source/bash/bash-4.2-patches/bash42-014
new file mode 100644
index 000000000..a43271c34
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-014
@@ -0,0 +1,47 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-014
+
+Bug-Reported-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
+Bug-Reference-ID: <20110504152320.6E8F28130527@dev1.rgmadvisors.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-05/msg00018.html
+
+Bug-Description:
+
+The regular expression matching operator did not correctly match
+expressions with an embedded ^A.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/pathexp.c 2010-08-13 23:21:57.000000000 -0400
+--- pathexp.c 2011-05-05 16:40:58.000000000 -0400
+***************
+*** 197,201 ****
+ if ((qflags & QGLOB_FILENAME) && pathname[i+1] == '/')
+ continue;
+! if ((qflags & QGLOB_REGEXP) && ere_char (pathname[i+1]) == 0)
+ continue;
+ temp[j++] = '\\';
+--- 197,201 ----
+ if ((qflags & QGLOB_FILENAME) && pathname[i+1] == '/')
+ continue;
+! if (pathname[i+1] != CTLESC && (qflags & QGLOB_REGEXP) && ere_char (pathname[i+1]) == 0)
+ continue;
+ temp[j++] = '\\';
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 13
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 14
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-015 b/patches/source/bash/bash-4.2-patches/bash42-015
new file mode 100644
index 000000000..865587385
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-015
@@ -0,0 +1,81 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-015
+
+Bug-Reported-by: <dnade.ext@orange-ftgroup.com>
+Bug-Reference-ID: <728_1312188080_4E3666B0_728_118711_1_3B5D3E0F95CC5C478D6500CDCE8B691F7AAAA4AA3D@PUEXCB2B.nanterre.francetelecom.fr>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-08/msg00000.html
+
+Bug-Description:
+
+When in a context where arithmetic evaluation is not taking place, the
+evaluator should not check for division by 0.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/expr.c 2010-12-21 11:12:13.000000000 -0500
+--- expr.c 2011-08-02 20:58:28.000000000 -0400
+***************
+*** 477,480 ****
+--- 481,492 ----
+ if (special)
+ {
++ if ((op == DIV || op == MOD) && value == 0)
++ {
++ if (noeval == 0)
++ evalerror (_("division by 0"));
++ else
++ value = 1;
++ }
++
+ switch (op)
+ {
+***************
+*** 483,493 ****
+ break;
+ case DIV:
+- if (value == 0)
+- evalerror (_("division by 0"));
+ lvalue /= value;
+ break;
+ case MOD:
+- if (value == 0)
+- evalerror (_("division by 0"));
+ lvalue %= value;
+ break;
+--- 495,501 ----
+***************
+*** 805,809 ****
+
+ if (((op == DIV) || (op == MOD)) && (val2 == 0))
+! evalerror (_("division by 0"));
+
+ if (op == MUL)
+--- 813,822 ----
+
+ if (((op == DIV) || (op == MOD)) && (val2 == 0))
+! {
+! if (noeval == 0)
+! evalerror (_("division by 0"));
+! else
+! val2 = 1;
+! }
+
+ if (op == MUL)
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 14
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 15
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-016 b/patches/source/bash/bash-4.2-patches/bash42-016
new file mode 100644
index 000000000..46025888b
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-016
@@ -0,0 +1,46 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-016
+
+Bug-Reported-by: Martin von Gagern <Martin.vGagern@gmx.net>
+Bug-Reference-ID: <4E43AD9E.8060501@gmx.net>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-08/msg00141.html
+
+Bug-Description:
+
+Bash should not check for mail while executing the `eval' builtin.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/parse.y Fri Feb 25 12:07:41 2011
+--- parse.y Thu Aug 11 19:02:26 2011
+***************
+*** 2500,2504 ****
+ is the mail alarm reset; nothing takes place in check_mail ()
+ except the checking of mail. Please don't change this. */
+! if (prompt_is_ps1 && time_to_check_mail ())
+ {
+ check_mail ();
+--- 2498,2502 ----
+ is the mail alarm reset; nothing takes place in check_mail ()
+ except the checking of mail. Please don't change this. */
+! if (prompt_is_ps1 && parse_and_execute_level == 0 && time_to_check_mail ())
+ {
+ check_mail ();
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 15
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 16
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-017 b/patches/source/bash/bash-4.2-patches/bash42-017
new file mode 100644
index 000000000..010ed1e50
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-017
@@ -0,0 +1,47 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-017
+
+Bug-Reported-by: Curtis Doty <Curtis@GreenKey.net>
+Bug-Reference-ID: <20110621035324.A4F70849F59@mx1.iParadigms.net>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-06/msg00053.html
+
+Bug-Description:
+
+Using `read -a foo' where foo was an already-declared associative array
+caused the shell to die with a segmentation fault.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/builtins/read.def 2011-01-04 11:43:36.000000000 -0500
+--- builtins/read.def 2011-06-21 10:31:02.000000000 -0400
+***************
+*** 643,646 ****
+--- 642,651 ----
+ return EXECUTION_FAILURE; /* readonly or noassign */
+ }
++ if (assoc_p (var))
++ {
++ builtin_error (_("%s: cannot convert associative to indexed array"), arrayname);
++ xfree (input_string);
++ return EXECUTION_FAILURE; /* existing associative array */
++ }
+ array_flush (array_cell (var));
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 16
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 17
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-018 b/patches/source/bash/bash-4.2-patches/bash42-018
new file mode 100644
index 000000000..5d11dce16
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-018
@@ -0,0 +1,74 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-018
+
+Bug-Reported-by: Thomas Cort <tcort@minix3.org>
+Bug-Reference-ID: <BANLkTik-ebGGw3k_1YtB=RyfV1bsqdxC_g@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-06/msg00110.html
+
+Bug-Description:
+
+Bash fails to compile unless JOB_CONTROL is defined.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/execute_cmd.c 2011-02-09 17:32:25.000000000 -0500
+--- execute_cmd.c 2011-11-06 15:12:48.000000000 -0500
+***************
+*** 2197,2200 ****
+--- 2315,2319 ----
+ cmd->flags |= CMD_IGNORE_RETURN;
+
++ #if defined (JOB_CONTROL)
+ lastpipe_flag = 0;
+ begin_unwind_frame ("lastpipe-exec");
+***************
+*** 2216,2228 ****
+ add_unwind_protect (lastpipe_cleanup, lastpipe_jid);
+ }
+! cmd->flags |= CMD_LASTPIPE;
+ }
+ if (prev >= 0)
+ add_unwind_protect (close, prev);
+
+ exec_result = execute_command_internal (cmd, asynchronous, prev, pipe_out, fds_to_close);
+
+ if (lstdin > 0)
+ restore_stdin (lstdin);
+
+ if (prev >= 0)
+--- 2335,2351 ----
+ add_unwind_protect (lastpipe_cleanup, lastpipe_jid);
+ }
+! if (cmd)
+! cmd->flags |= CMD_LASTPIPE;
+ }
+ if (prev >= 0)
+ add_unwind_protect (close, prev);
++ #endif
+
+ exec_result = execute_command_internal (cmd, asynchronous, prev, pipe_out, fds_to_close);
+
++ #if defined (JOB_CONTROL)
+ if (lstdin > 0)
+ restore_stdin (lstdin);
++ #endif
+
+ if (prev >= 0)
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 17
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 18
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-019 b/patches/source/bash/bash-4.2-patches/bash42-019
new file mode 100644
index 000000000..5fce40ae5
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-019
@@ -0,0 +1,47 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-019
+
+Bug-Reported-by: Diego Augusto Molina <diegoaugustomolina@gmail.com>
+Bug-Reference-ID: <CAGOxLdHcSQu3ck9Qy3pRjj_NBU5tAPSAvNm-95-nLQ9Szwb6aA@mail.gmail.com>
+Bug-Reference-URL: lists.gnu.org/archive/html/bug-bash/2011-09/msg00047.html
+
+Bug-Description:
+
+Using `declare' with attributes and an invalid array variable name or
+assignment reference resulted in a segmentation fault instead of a
+declaration error.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/builtins/declare.def 2010-05-30 18:25:21.000000000 -0400
+--- builtins/declare.def 2011-09-15 15:20:20.000000000 -0400
+***************
+*** 514,517 ****
+--- 514,522 ----
+ var = assign_array_element (name, value, 0); /* XXX - not aflags */
+ *subscript_start = '\0';
++ if (var == 0) /* some kind of assignment error */
++ {
++ assign_error++;
++ NEXT_VARIABLE ();
++ }
+ }
+ else if (simple_array_assign)
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 18
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 19
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-020 b/patches/source/bash/bash-4.2-patches/bash42-020
new file mode 100644
index 000000000..a1dd0443e
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-020
@@ -0,0 +1,60 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-020
+
+Bug-Reported-by: Vincent Sheffer <vince.sheffer@apisphere.com>
+Bug-Reference-ID: <F13C1C4F-C44C-4071-BFED-4BB6D13CF92F@apisphere.com>
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2011-08/msg00000.html
+
+Bug-Description:
+
+The shared object helper script needs to be updated for Mac OS X 10.7
+(Lion, darwin11).
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/support/shobj-conf 2009-10-28 09:20:21.000000000 -0400
+--- support/shobj-conf 2011-08-27 13:25:23.000000000 -0400
+***************
+*** 158,162 ****
+
+ # Darwin/MacOS X
+! darwin[89]*|darwin10*)
+ SHOBJ_STATUS=supported
+ SHLIB_STATUS=supported
+--- 172,176 ----
+
+ # Darwin/MacOS X
+! darwin[89]*|darwin1[012]*)
+ SHOBJ_STATUS=supported
+ SHLIB_STATUS=supported
+***************
+*** 187,191 ****
+
+ case "${host_os}" in
+! darwin[789]*|darwin10*) SHOBJ_LDFLAGS=''
+ SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
+ ;;
+--- 201,205 ----
+
+ case "${host_os}" in
+! darwin[789]*|darwin1[012]*) SHOBJ_LDFLAGS=''
+ SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
+ ;;
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 19
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 20
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-021 b/patches/source/bash/bash-4.2-patches/bash42-021
new file mode 100644
index 000000000..b6153c784
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-021
@@ -0,0 +1,61 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-021
+
+Bug-Reported-by: Dan Douglas <ormaaj@gmail.com>
+Bug-Reference-ID: <4585554.nZWb4q7YoZ@smorgbox>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-12/msg00084.html
+
+Bug-Description:
+
+Using `read -N' to assign values to an array can result in NUL values being
+assigned to some array elements. These values cause seg faults when referenced
+later.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/builtins/read.def 2011-11-21 18:03:38.000000000 -0500
+--- builtins/read.def 2011-12-19 19:52:12.000000000 -0500
+***************
+*** 738,742 ****
+ }
+ else
+! var = bind_read_variable (varname, t);
+ }
+ else
+--- 775,779 ----
+ }
+ else
+! var = bind_read_variable (varname, t ? t : "");
+ }
+ else
+***************
+*** 799,803 ****
+ }
+ else
+! var = bind_read_variable (list->word->word, input_string);
+
+ if (var)
+--- 836,840 ----
+ }
+ else
+! var = bind_read_variable (list->word->word, input_string ? input_string : "");
+
+ if (var)
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 20
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 21
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-022 b/patches/source/bash/bash-4.2-patches/bash42-022
new file mode 100644
index 000000000..0067b1335
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-022
@@ -0,0 +1,61 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-022
+
+Bug-Reported-by: Gregory Margo <gmargo@pacbell.net>
+Bug-Reference-ID: <20110727174529.GA3333@pacbell.net>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-07/msg00102.html
+
+Bug-Description:
+
+The return value from lseek is `off_t'. This can cause corrupted return
+values when the file offset is greater than 2**31 - 1.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/lib/sh/zread.c Mon Mar 2 08:54:45 2009
+--- lib/sh/zread.c Thu Jul 28 18:16:53 2011
+***************
+*** 161,166 ****
+ int fd;
+ {
+! off_t off;
+! int r;
+
+ off = lused - lind;
+--- 161,165 ----
+ int fd;
+ {
+! off_t off, r;
+
+ off = lused - lind;
+***************
+*** 169,173 ****
+ r = lseek (fd, -off, SEEK_CUR);
+
+! if (r >= 0)
+ lused = lind = 0;
+ }
+--- 168,172 ----
+ r = lseek (fd, -off, SEEK_CUR);
+
+! if (r != -1)
+ lused = lind = 0;
+ }
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 21
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 22
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-023 b/patches/source/bash/bash-4.2-patches/bash42-023
new file mode 100644
index 000000000..4f204efb0
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-023
@@ -0,0 +1,62 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-023
+
+Bug-Reported-by: Ewan Mellor <Ewan.Mellor@eu.citrix.com>
+Bug-Reference-ID: <6005BE083BF501439A84DC3523BAC82DC4B964FD12@LONPMAILBOX01.citrite.net>
+Bug-Reference-URL:
+
+Bug-Description:
+
+Under some circumstances, an exit trap triggered by a bad substitution
+error when errexit is enabled will cause the shell to exit with an
+incorrect exit status (0).
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/subst.c 2011-11-21 12:04:38.000000000 -0500
+--- subst.c 2012-02-08 13:36:28.000000000 -0500
+***************
+*** 7275,7278 ****
+--- 7281,7285 ----
+ case '\0':
+ bad_substitution:
++ last_command_exit_value = EXECUTION_FAILURE;
+ report_error (_("%s: bad substitution"), string ? string : "??");
+ FREE (value);
+*** ../bash-4.2-patched/error.c 2009-08-21 22:31:31.000000000 -0400
+--- error.c 2012-02-25 15:54:40.000000000 -0500
+***************
+*** 201,205 ****
+ va_end (args);
+ if (exit_immediately_on_error)
+! exit_shell (1);
+ }
+
+--- 201,209 ----
+ va_end (args);
+ if (exit_immediately_on_error)
+! {
+! if (last_command_exit_value == 0)
+! last_command_exit_value = 1;
+! exit_shell (last_command_exit_value);
+! }
+ }
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 22
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 23
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-024 b/patches/source/bash/bash-4.2-patches/bash42-024
new file mode 100644
index 000000000..b7b1158b8
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-024
@@ -0,0 +1,45 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-024
+
+Bug-Reported-by: Jim Avera <james_avera@yahoo.com>
+Bug-Reference-ID: <4F29E07A.80405@yahoo.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-02/msg00001.html
+
+Bug-Description:
+
+When `printf -v' is used to set an array element, the format string contains
+`%b', and the corresponding argument is the empty string, the buffer used
+to store the value to be assigned can be NULL, which results in NUL being
+assigned to the array element. This causes a seg fault when it's used later.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/builtins/printf.def 2011-02-25 12:07:41.000000000 -0500
+--- builtins/printf.def 2012-02-02 08:37:12.000000000 -0500
+***************
+*** 256,259 ****
+--- 257,262 ----
+ {
+ vflag = 1;
++ if (vbsize == 0)
++ vbuf = xmalloc (vbsize = 16);
+ vblen = 0;
+ if (vbuf)
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 23
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 24
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-025 b/patches/source/bash/bash-4.2-patches/bash42-025
new file mode 100644
index 000000000..34ac34300
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-025
@@ -0,0 +1,143 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-025
+
+Bug-Reported-by: Bill Gradwohl <bill@ycc.com>
+Bug-Reference-ID: <CAFyvKis-UfuOWr5THBRKh=vYHDoKEEgdW8hN1RviTuYQ00Lu5A@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/help-bash/2012-03/msg00078.html
+
+Bug-Description:
+
+When used in a shell function, `declare -g -a array=(compound assignment)'
+creates a local variable instead of a global one.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/command.h 2010-08-02 19:36:51.000000000 -0400
+--- command.h 2012-04-01 12:38:35.000000000 -0400
+***************
+*** 98,101 ****
+--- 98,102 ----
+ #define W_ASSIGNASSOC 0x400000 /* word looks like associative array assignment */
+ #define W_ARRAYIND 0x800000 /* word is an array index being expanded */
++ #define W_ASSNGLOBAL 0x1000000 /* word is a global assignment to declare (declare/typeset -g) */
+
+ /* Possible values for subshell_environment */
+*** ../bash-4.2-patched/execute_cmd.c 2011-11-21 18:03:41.000000000 -0500
+--- execute_cmd.c 2012-04-01 12:42:03.000000000 -0400
+***************
+*** 3581,3585 ****
+ WORD_LIST *w;
+ struct builtin *b;
+! int assoc;
+
+ if (words == 0)
+--- 3581,3585 ----
+ WORD_LIST *w;
+ struct builtin *b;
+! int assoc, global;
+
+ if (words == 0)
+***************
+*** 3587,3591 ****
+
+ b = 0;
+! assoc = 0;
+
+ for (w = words; w; w = w->next)
+--- 3587,3591 ----
+
+ b = 0;
+! assoc = global = 0;
+
+ for (w = words; w; w = w->next)
+***************
+*** 3604,3607 ****
+--- 3604,3609 ----
+ if (assoc)
+ w->word->flags |= W_ASSIGNASSOC;
++ if (global)
++ w->word->flags |= W_ASSNGLOBAL;
+ #endif
+ }
+***************
+*** 3609,3613 ****
+ /* Note that we saw an associative array option to a builtin that takes
+ assignment statements. This is a bit of a kludge. */
+! else if (w->word->word[0] == '-' && strchr (w->word->word, 'A'))
+ {
+ if (b == 0)
+--- 3611,3618 ----
+ /* Note that we saw an associative array option to a builtin that takes
+ assignment statements. This is a bit of a kludge. */
+! else if (w->word->word[0] == '-' && (strchr (w->word->word+1, 'A') || strchr (w->word->word+1, 'g')))
+! #else
+! else if (w->word->word[0] == '-' && strchr (w->word->word+1, 'g'))
+! #endif
+ {
+ if (b == 0)
+***************
+*** 3619,3626 ****
+ words->word->flags |= W_ASSNBLTIN;
+ }
+! if (words->word->flags & W_ASSNBLTIN)
+ assoc = 1;
+ }
+- #endif
+ }
+
+--- 3624,3632 ----
+ words->word->flags |= W_ASSNBLTIN;
+ }
+! if ((words->word->flags & W_ASSNBLTIN) && strchr (w->word->word+1, 'A'))
+ assoc = 1;
++ if ((words->word->flags & W_ASSNBLTIN) && strchr (w->word->word+1, 'g'))
++ global = 1;
+ }
+ }
+
+*** ../bash-4.2-patched/subst.c 2012-03-11 17:35:13.000000000 -0400
+--- subst.c 2012-04-01 12:38:35.000000000 -0400
+***************
+*** 367,370 ****
+--- 367,375 ----
+ fprintf (stderr, "W_ASSNBLTIN%s", f ? "|" : "");
+ }
++ if (f & W_ASSNGLOBAL)
++ {
++ f &= ~W_ASSNGLOBAL;
++ fprintf (stderr, "W_ASSNGLOBAL%s", f ? "|" : "");
++ }
+ if (f & W_COMPASSIGN)
+ {
+***************
+*** 2804,2808 ****
+ else if (assign_list)
+ {
+! if (word->flags & W_ASSIGNARG)
+ aflags |= ASS_MKLOCAL;
+ if (word->flags & W_ASSIGNASSOC)
+--- 2809,2813 ----
+ else if (assign_list)
+ {
+! if ((word->flags & W_ASSIGNARG) && (word->flags & W_ASSNGLOBAL) == 0)
+ aflags |= ASS_MKLOCAL;
+ if (word->flags & W_ASSIGNASSOC)
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 24
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 25
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-026 b/patches/source/bash/bash-4.2-patches/bash42-026
new file mode 100644
index 000000000..e15d74807
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-026
@@ -0,0 +1,58 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-026
+
+Bug-Reported-by: Greg Wooledge <wooledg@eeg.ccf.org>
+Bug-Reference-ID: <20120425180443.GO22241@eeg.ccf.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-04/msg00172.html
+
+Bug-Description:
+
+The `lastpipe' option does not behave correctly on machines where the
+open file limit is less than 256.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/execute_cmd.c 2011-11-21 12:04:47.000000000 -0500
+--- execute_cmd.c 2012-04-26 11:09:30.000000000 -0400
+***************
+*** 2206,2210 ****
+ if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0)
+ {
+! lstdin = move_to_high_fd (0, 0, 255);
+ if (lstdin > 0)
+ {
+--- 2325,2329 ----
+ if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0)
+ {
+! lstdin = move_to_high_fd (0, 1, -1);
+ if (lstdin > 0)
+ {
+***************
+*** 2252,2256 ****
+--- 2371,2377 ----
+ }
+
++ #if defined (JOB_CONTROL)
+ discard_unwind_frame ("lastpipe-exec");
++ #endif
+
+ return (exec_result);
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 25
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 26
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-027 b/patches/source/bash/bash-4.2-patches/bash42-027
new file mode 100644
index 000000000..c0c5d3f80
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-027
@@ -0,0 +1,47 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-027
+
+Bug-Reported-by: Mike Frysinger <vapier@gentoo.org>
+Bug-Reference-ID: <201204211243.30163.vapier@gentoo.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-04/msg00134.html
+
+Bug-Description:
+
+When the `extglob' shell option is enabled, pattern substitution does not
+work correctly in the presence of multibyte characters.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/subst.c 2012-03-11 17:52:57.000000000 -0400
+--- subst.c 2012-04-22 16:19:10.000000000 -0400
+***************
+*** 4167,4171 ****
+ #if defined (EXTENDED_GLOB)
+ if (extended_glob)
+! simple |= (wpat[1] != L'(' || (wpat[0] != L'*' && wpat[0] != L'?' && wpat[0] != L'+' && wpat[0] != L'!' && wpat[0] != L'@')); /*)*/
+ #endif
+
+--- 4167,4171 ----
+ #if defined (EXTENDED_GLOB)
+ if (extended_glob)
+! simple &= (wpat[1] != L'(' || (wpat[0] != L'*' && wpat[0] != L'?' && wpat[0] != L'+' && wpat[0] != L'!' && wpat[0] != L'@')); /*)*/
+ #endif
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 26
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 27
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-028 b/patches/source/bash/bash-4.2-patches/bash42-028
new file mode 100644
index 000000000..fa3be3b48
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-028
@@ -0,0 +1,52 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-028
+
+Bug-Reported-by: Mark Edgar <medgar123@gmail.com>
+Bug-Reference-ID: <CABHMh_3d+ZgO_zaEtYXPwK4P7tC0ghZ4g=Ue_TRpsEMf5YDsqw@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-03/msg00109.html
+
+Bug-Description:
+
+When using a word expansion for which the right hand side is evaluated,
+certain expansions of quoted null strings include spurious ^? characters.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/subst.c 2012-03-11 17:35:13.000000000 -0400
+--- subst.c 2012-03-20 19:30:13.000000000 -0400
+***************
+*** 5810,5813 ****
+--- 5810,5823 ----
+ if (qdollaratp && ((hasdol && quoted) || l->next))
+ *qdollaratp = 1;
++ /* If we have a quoted null result (QUOTED_NULL(temp)) and the word is
++ a quoted null (l->next == 0 && QUOTED_NULL(l->word->word)), the
++ flags indicate it (l->word->flags & W_HASQUOTEDNULL), and the
++ expansion is quoted (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
++ (which is more paranoia than anything else), we need to return the
++ quoted null string and set the flags to indicate it. */
++ if (l->next == 0 && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && QUOTED_NULL(temp) && QUOTED_NULL(l->word->word) && (l->word->flags & W_HASQUOTEDNULL))
++ {
++ w->flags |= W_HASQUOTEDNULL;
++ }
+ dispose_words (l);
+ }
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 27
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 28
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-029 b/patches/source/bash/bash-4.2-patches/bash42-029
new file mode 100644
index 000000000..c51704ca7
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-029
@@ -0,0 +1,524 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-029
+
+Bug-Reported-by: "Michael Kalisz" <michael@kalisz.homelinux.net>
+Bug-Reference-ID: <50241.78.69.11.112.1298585641.squirrel@kalisz.homelinux.net>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00274.html
+
+Bug-Description:
+
+Bash-4.2 tries to leave completed directory names as the user typed them,
+without expanding them to a full pathname. One effect of this is that
+shell variables used in pathnames being completed (e.g., $HOME) are left
+unchanged, but the `$' is quoted by readline because it is a special
+character to the shell.
+
+This patch introduces two things:
+
+1. A new shell option, `direxpand', which, if set, attempts to emulate the
+ bash-4.1 behavior of expanding words to full pathnames during
+ completion;
+2. A set of heuristics that reduce the number of times special characters
+ such as `$' are quoted when the directory name is not expanded.
+
+Patch (apply with `patch -p0'):
+
+diff -NrC 2 ../bash-4.2-patched/bashline.c ./bashline.c
+*** ../bash-4.2-patched/bashline.c 2011-01-16 15:32:47.000000000 -0500
+--- ./bashline.c 2012-05-07 16:27:18.000000000 -0400
+***************
+*** 122,125 ****
+--- 122,128 ----
+ static int bash_push_line __P((void));
+
++ static rl_icppfunc_t *save_directory_hook __P((void));
++ static void reset_directory_hook __P((rl_icppfunc_t *));
++
+ static void cleanup_expansion_error __P((void));
+ static void maybe_make_readline_line __P((char *));
+***************
+*** 244,251 ****
+--- 247,261 ----
+ int dircomplete_spelling = 0;
+
++ /* Expand directory names during word/filename completion. */
++ int dircomplete_expand = 0;
++ int dircomplete_expand_relpath = 0;
++
+ static char *bash_completer_word_break_characters = " \t\n\"'@><=;|&(:";
+ static char *bash_nohostname_word_break_characters = " \t\n\"'><=;|&(:";
+ /* )) */
+
++ static const char *default_filename_quote_characters = " \t\n\\\"'@<>=;|&()#$`?*[!:{~"; /*}*/
++ static char *custom_filename_quote_characters = 0;
++
+ static rl_hook_func_t *old_rl_startup_hook = (rl_hook_func_t *)NULL;
+
+***************
+*** 502,506 ****
+ /* Tell the completer that we might want to follow symbolic links or
+ do other expansion on directory names. */
+! rl_directory_rewrite_hook = bash_directory_completion_hook;
+
+ rl_filename_rewrite_hook = bash_filename_rewrite_hook;
+--- 512,516 ----
+ /* Tell the completer that we might want to follow symbolic links or
+ do other expansion on directory names. */
+! set_directory_hook ();
+
+ rl_filename_rewrite_hook = bash_filename_rewrite_hook;
+***************
+*** 530,534 ****
+
+ /* characters that need to be quoted when appearing in filenames. */
+! rl_filename_quote_characters = " \t\n\\\"'@<>=;|&()#$`?*[!:{~"; /*}*/
+
+ rl_filename_quoting_function = bash_quote_filename;
+--- 540,544 ----
+
+ /* characters that need to be quoted when appearing in filenames. */
+! rl_filename_quote_characters = default_filename_quote_characters;
+
+ rl_filename_quoting_function = bash_quote_filename;
+***************
+*** 565,570 ****
+ rl_attempted_completion_function = attempt_shell_completion;
+ rl_completion_entry_function = NULL;
+- rl_directory_rewrite_hook = bash_directory_completion_hook;
+ rl_ignore_some_completions_function = filename_completion_ignore;
+ }
+
+--- 575,582 ----
+ rl_attempted_completion_function = attempt_shell_completion;
+ rl_completion_entry_function = NULL;
+ rl_ignore_some_completions_function = filename_completion_ignore;
++ rl_filename_quote_characters = default_filename_quote_characters;
++
++ set_directory_hook ();
+ }
+
+***************
+*** 1280,1283 ****
+--- 1292,1298 ----
+ rl_ignore_some_completions_function = filename_completion_ignore;
+
++ rl_filename_quote_characters = default_filename_quote_characters;
++ set_directory_hook ();
++
+ /* Determine if this could be a command word. It is if it appears at
+ the start of the line (ignoring preceding whitespace), or if it
+***************
+*** 1592,1595 ****
+--- 1607,1616 ----
+ else
+ {
++ if (dircomplete_expand && dot_or_dotdot (filename_hint))
++ {
++ dircomplete_expand = 0;
++ set_directory_hook ();
++ dircomplete_expand = 1;
++ }
+ mapping_over = 4;
+ goto inner;
+***************
+*** 1792,1795 ****
+--- 1813,1819 ----
+ inner:
+ val = rl_filename_completion_function (filename_hint, istate);
++ if (mapping_over == 4 && dircomplete_expand)
++ set_directory_hook ();
++
+ istate = 1;
+
+***************
+*** 2694,2697 ****
+--- 2718,2767 ----
+ }
+
++ /* Functions to save and restore the appropriate directory hook */
++ /* This is not static so the shopt code can call it */
++ void
++ set_directory_hook ()
++ {
++ if (dircomplete_expand)
++ {
++ rl_directory_completion_hook = bash_directory_completion_hook;
++ rl_directory_rewrite_hook = (rl_icppfunc_t *)0;
++ }
++ else
++ {
++ rl_directory_rewrite_hook = bash_directory_completion_hook;
++ rl_directory_completion_hook = (rl_icppfunc_t *)0;
++ }
++ }
++
++ static rl_icppfunc_t *
++ save_directory_hook ()
++ {
++ rl_icppfunc_t *ret;
++
++ if (dircomplete_expand)
++ {
++ ret = rl_directory_completion_hook;
++ rl_directory_completion_hook = (rl_icppfunc_t *)NULL;
++ }
++ else
++ {
++ ret = rl_directory_rewrite_hook;
++ rl_directory_rewrite_hook = (rl_icppfunc_t *)NULL;
++ }
++
++ return ret;
++ }
++
++ static void
++ restore_directory_hook (hookf)
++ rl_icppfunc_t *hookf;
++ {
++ if (dircomplete_expand)
++ rl_directory_completion_hook = hookf;
++ else
++ rl_directory_rewrite_hook = hookf;
++ }
++
+ /* Handle symbolic link references and other directory name
+ expansions while hacking completion. This should return 1 if it modifies
+***************
+*** 2703,2720 ****
+ {
+ char *local_dirname, *new_dirname, *t;
+! int return_value, should_expand_dirname;
+ WORD_LIST *wl;
+ struct stat sb;
+
+! return_value = should_expand_dirname = 0;
+ local_dirname = *dirname;
+
+! if (mbschr (local_dirname, '$'))
+! should_expand_dirname = 1;
+ else
+ {
+ t = mbschr (local_dirname, '`');
+ if (t && unclosed_pair (local_dirname, strlen (local_dirname), "`") == 0)
+! should_expand_dirname = 1;
+ }
+
+--- 2773,2801 ----
+ {
+ char *local_dirname, *new_dirname, *t;
+! int return_value, should_expand_dirname, nextch, closer;
+ WORD_LIST *wl;
+ struct stat sb;
+
+! return_value = should_expand_dirname = nextch = closer = 0;
+ local_dirname = *dirname;
+
+! if (t = mbschr (local_dirname, '$'))
+! {
+! should_expand_dirname = '$';
+! nextch = t[1];
+! /* Deliberately does not handle the deprecated $[...] arithmetic
+! expansion syntax */
+! if (nextch == '(')
+! closer = ')';
+! else if (nextch == '{')
+! closer = '}';
+! else
+! nextch = 0;
+! }
+ else
+ {
+ t = mbschr (local_dirname, '`');
+ if (t && unclosed_pair (local_dirname, strlen (local_dirname), "`") == 0)
+! should_expand_dirname = '`';
+ }
+
+***************
+*** 2740,2743 ****
+--- 2821,2841 ----
+ dispose_words (wl);
+ local_dirname = *dirname;
++ /* XXX - change rl_filename_quote_characters here based on
++ should_expand_dirname/nextch/closer. This is the only place
++ custom_filename_quote_characters is modified. */
++ if (rl_filename_quote_characters && *rl_filename_quote_characters)
++ {
++ int i, j, c;
++ i = strlen (default_filename_quote_characters);
++ custom_filename_quote_characters = xrealloc (custom_filename_quote_characters, i+1);
++ for (i = j = 0; c = default_filename_quote_characters[i]; i++)
++ {
++ if (c == should_expand_dirname || c == nextch || c == closer)
++ continue;
++ custom_filename_quote_characters[j++] = c;
++ }
++ custom_filename_quote_characters[j] = '\0';
++ rl_filename_quote_characters = custom_filename_quote_characters;
++ }
+ }
+ else
+***************
+*** 2759,2762 ****
+--- 2857,2871 ----
+ }
+
++ /* no_symbolic_links == 0 -> use (default) logical view of the file system.
++ local_dirname[0] == '.' && local_dirname[1] == '/' means files in the
++ current directory (./).
++ local_dirname[0] == '.' && local_dirname[1] == 0 means relative pathnames
++ in the current directory (e.g., lib/sh).
++ XXX - should we do spelling correction on these? */
++
++ /* This is test as it was in bash-4.2: skip relative pathnames in current
++ directory. Change test to
++ (local_dirname[0] != '.' || (local_dirname[1] && local_dirname[1] != '/'))
++ if we want to skip paths beginning with ./ also. */
+ if (no_symbolic_links == 0 && (local_dirname[0] != '.' || local_dirname[1]))
+ {
+***************
+*** 2764,2767 ****
+--- 2873,2885 ----
+ int len1, len2;
+
++ /* If we have a relative path
++ (local_dirname[0] != '/' && local_dirname[0] != '.')
++ that is canonical after appending it to the current directory, then
++ temp1 = temp2+'/'
++ That is,
++ strcmp (temp1, temp2) == 0
++ after adding a slash to temp2 below. It should be safe to not
++ change those.
++ */
+ t = get_working_directory ("symlink-hook");
+ temp1 = make_absolute (local_dirname, t);
+***************
+*** 2798,2802 ****
+ }
+ }
+! return_value |= STREQ (local_dirname, temp2) == 0;
+ free (local_dirname);
+ *dirname = temp2;
+--- 2916,2928 ----
+ }
+ }
+!
+! /* dircomplete_expand_relpath == 0 means we want to leave relative
+! pathnames that are unchanged by canonicalization alone.
+! *local_dirname != '/' && *local_dirname != '.' == relative pathname
+! (consistent with general.c:absolute_pathname())
+! temp1 == temp2 (after appending a slash to temp2) means the pathname
+! is not changed by canonicalization as described above. */
+! if (dircomplete_expand_relpath || ((local_dirname[0] != '/' && local_dirname[0] != '.') && STREQ (temp1, temp2) == 0))
+! return_value |= STREQ (local_dirname, temp2) == 0;
+ free (local_dirname);
+ *dirname = temp2;
+***************
+*** 3003,3012 ****
+ orig_func = rl_completion_entry_function;
+ orig_attempt_func = rl_attempted_completion_function;
+- orig_dir_func = rl_directory_rewrite_hook;
+ orig_ignore_func = rl_ignore_some_completions_function;
+ orig_rl_completer_word_break_characters = rl_completer_word_break_characters;
+ rl_completion_entry_function = rl_filename_completion_function;
+ rl_attempted_completion_function = (rl_completion_func_t *)NULL;
+- rl_directory_rewrite_hook = (rl_icppfunc_t *)NULL;
+ rl_ignore_some_completions_function = filename_completion_ignore;
+ rl_completer_word_break_characters = " \t\n\"\'";
+--- 3129,3139 ----
+ orig_func = rl_completion_entry_function;
+ orig_attempt_func = rl_attempted_completion_function;
+ orig_ignore_func = rl_ignore_some_completions_function;
+ orig_rl_completer_word_break_characters = rl_completer_word_break_characters;
++
++ orig_dir_func = save_directory_hook ();
++
+ rl_completion_entry_function = rl_filename_completion_function;
+ rl_attempted_completion_function = (rl_completion_func_t *)NULL;
+ rl_ignore_some_completions_function = filename_completion_ignore;
+ rl_completer_word_break_characters = " \t\n\"\'";
+***************
+*** 3016,3023 ****
+ rl_completion_entry_function = orig_func;
+ rl_attempted_completion_function = orig_attempt_func;
+- rl_directory_rewrite_hook = orig_dir_func;
+ rl_ignore_some_completions_function = orig_ignore_func;
+ rl_completer_word_break_characters = orig_rl_completer_word_break_characters;
+
+ return r;
+ }
+--- 3143,3151 ----
+ rl_completion_entry_function = orig_func;
+ rl_attempted_completion_function = orig_attempt_func;
+ rl_ignore_some_completions_function = orig_ignore_func;
+ rl_completer_word_break_characters = orig_rl_completer_word_break_characters;
+
++ restore_directory_hook (orig_dir_func);
++
+ return r;
+ }
+diff -NrC 2 ../bash-4.2-patched/bashline.h ./bashline.h
+*** ../bash-4.2-patched/bashline.h 2009-01-04 14:32:22.000000000 -0500
+--- ./bashline.h 2012-05-07 16:27:18.000000000 -0400
+***************
+*** 34,41 ****
+--- 34,46 ----
+ extern int bash_re_edit __P((char *));
+
++ extern void bashline_set_event_hook __P((void));
++ extern void bashline_reset_event_hook __P((void));
++
+ extern int bind_keyseq_to_unix_command __P((char *));
+
+ extern char **bash_default_completion __P((const char *, int, int, int, int));
+
++ void set_directory_hook __P((void));
++
+ /* Used by programmable completion code. */
+ extern char *command_word_completion_function __P((const char *, int));
+diff -NrC 2 ../bash-4.2-patched/builtins/shopt.def ./builtins/shopt.def
+*** ../bash-4.2-patched/builtins/shopt.def 2010-07-02 22:42:44.000000000 -0400
+--- ./builtins/shopt.def 2012-05-07 16:27:18.000000000 -0400
+***************
+*** 62,65 ****
+--- 62,69 ----
+ #include "bashgetopt.h"
+
++ #if defined (READLINE)
++ # include "../bashline.h"
++ #endif
++
+ #if defined (HISTORY)
+ # include "../bashhist.h"
+***************
+*** 95,99 ****
+ extern int no_empty_command_completion;
+ extern int force_fignore;
+! extern int dircomplete_spelling;
+
+ extern int enable_hostname_completion __P((int));
+--- 99,103 ----
+ extern int no_empty_command_completion;
+ extern int force_fignore;
+! extern int dircomplete_spelling, dircomplete_expand;
+
+ extern int enable_hostname_completion __P((int));
+***************
+*** 122,125 ****
+--- 126,133 ----
+ #endif
+
++ #if defined (READLINE)
++ static int shopt_set_complete_direxpand __P((char *, int));
++ #endif
++
+ static int shopt_login_shell;
+ static int shopt_compat31;
+***************
+*** 151,154 ****
+--- 159,163 ----
+ { "compat41", &shopt_compat41, set_compatibility_level },
+ #if defined (READLINE)
++ { "direxpand", &dircomplete_expand, shopt_set_complete_direxpand },
+ { "dirspell", &dircomplete_spelling, (shopt_set_func_t *)NULL },
+ #endif
+***************
+*** 536,539 ****
+--- 545,559 ----
+ }
+
++ #if defined (READLINE)
++ static int
++ shopt_set_complete_direxpand (option_name, mode)
++ char *option_name;
++ int mode;
++ {
++ set_directory_hook ();
++ return 0;
++ }
++ #endif
++
+ #if defined (RESTRICTED_SHELL)
+ /* Don't allow the value of restricted_shell to be modified. */
+Binary files ../bash-4.2-patched/doc/._bashref.pdf and ./doc/._bashref.pdf differ
+diff -NrC 2 ../bash-4.2-patched/doc/bash.1 ./doc/bash.1
+*** ../bash-4.2-patched/doc/bash.1 2011-01-16 15:31:39.000000000 -0500
+--- ./doc/bash.1 2012-05-07 16:27:18.000000000 -0400
+***************
+*** 8949,8952 ****
+--- 8949,8962 ----
+ The default bash behavior remains as in previous versions.
+ .TP 8
++ .B direxpand
++ If set,
++ .B bash
++ replaces directory names with the results of word expansion when performing
++ filename completion. This changes the contents of the readline editing
++ buffer.
++ If not set,
++ .B bash
++ attempts to preserve what the user typed.
++ .TP 8
+ .B dirspell
+ If set,
+diff -NrC 2 ../bash-4.2-patched/doc/bashref.texi ./doc/bashref.texi
+*** ../bash-4.2-patched/doc/bashref.texi 2011-01-16 15:31:57.000000000 -0500
+--- ./doc/bashref.texi 2012-05-07 16:27:18.000000000 -0400
+***************
+*** 4536,4539 ****
+--- 4536,4546 ----
+ The default Bash behavior remains as in previous versions.
+
++ @item direxpand
++ If set, Bash
++ replaces directory names with the results of word expansion when performing
++ filename completion. This changes the contents of the readline editing
++ buffer.
++ If not set, Bash attempts to preserve what the user typed.
++
+ @item dirspell
+ If set, Bash
+diff -NrC 2 ../bash-4.2-patched/tests/shopt.right ./tests/shopt.right
+*** ../bash-4.2-patched/tests/shopt.right 2010-07-02 23:36:30.000000000 -0400
+--- ./tests/shopt.right 2012-05-07 16:27:18.000000000 -0400
+***************
+*** 13,16 ****
+--- 13,17 ----
+ shopt -u compat40
+ shopt -u compat41
++ shopt -u direxpand
+ shopt -u dirspell
+ shopt -u dotglob
+***************
+*** 69,72 ****
+--- 70,74 ----
+ shopt -u compat40
+ shopt -u compat41
++ shopt -u direxpand
+ shopt -u dirspell
+ shopt -u dotglob
+***************
+*** 102,105 ****
+--- 104,108 ----
+ compat40 off
+ compat41 off
++ direxpand off
+ dirspell off
+ dotglob off
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 28
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 29
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-030 b/patches/source/bash/bash-4.2-patches/bash42-030
new file mode 100644
index 000000000..261a619bb
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-030
@@ -0,0 +1,178 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-030
+
+Bug-Reported-by: Roman Rakus <rrakus@redhat.com>
+Bug-Reference-ID: <4D7DD91E.7040808@redhat.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-03/msg00126.html
+
+Bug-Description:
+
+When attempting to glob strings in a multibyte locale, and those strings
+contain invalid multibyte characters that cause mbsnrtowcs to return 0,
+the globbing code loops infinitely.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/lib/glob/xmbsrtowcs.c 2010-05-30 18:36:27.000000000 -0400
+--- lib/glob/xmbsrtowcs.c 2011-03-22 16:06:47.000000000 -0400
+***************
+*** 36,39 ****
+--- 36,41 ----
+ #if HANDLE_MULTIBYTE
+
++ #define WSBUF_INC 32
++
+ #ifndef FREE
+ # define FREE(x) do { if (x) free (x); } while (0)
+***************
+*** 149,153 ****
+ size_t wcnum; /* Number of wide characters in WSBUF */
+ mbstate_t state; /* Conversion State */
+! size_t wcslength; /* Number of wide characters produced by the conversion. */
+ const char *end_or_backslash;
+ size_t nms; /* Number of multibyte characters to convert at one time. */
+--- 151,155 ----
+ size_t wcnum; /* Number of wide characters in WSBUF */
+ mbstate_t state; /* Conversion State */
+! size_t n, wcslength; /* Number of wide characters produced by the conversion. */
+ const char *end_or_backslash;
+ size_t nms; /* Number of multibyte characters to convert at one time. */
+***************
+*** 172,176 ****
+ tmp_p = p;
+ tmp_state = state;
+! wcslength = mbsnrtowcs(NULL, &tmp_p, nms, 0, &tmp_state);
+
+ /* Conversion failed. */
+--- 174,189 ----
+ tmp_p = p;
+ tmp_state = state;
+!
+! if (nms == 0 && *p == '\\') /* special initial case */
+! nms = wcslength = 1;
+! else
+! wcslength = mbsnrtowcs (NULL, &tmp_p, nms, 0, &tmp_state);
+!
+! if (wcslength == 0)
+! {
+! tmp_p = p; /* will need below */
+! tmp_state = state;
+! wcslength = 1; /* take a single byte */
+! }
+
+ /* Conversion failed. */
+***************
+*** 187,191 ****
+ wchar_t *wstmp;
+
+! wsbuf_size = wcnum+wcslength+1; /* 1 for the L'\0' or the potential L'\\' */
+
+ wstmp = (wchar_t *) realloc (wsbuf, wsbuf_size * sizeof (wchar_t));
+--- 200,205 ----
+ wchar_t *wstmp;
+
+! while (wsbuf_size < wcnum+wcslength+1) /* 1 for the L'\0' or the potential L'\\' */
+! wsbuf_size += WSBUF_INC;
+
+ wstmp = (wchar_t *) realloc (wsbuf, wsbuf_size * sizeof (wchar_t));
+***************
+*** 200,207 ****
+
+ /* Perform the conversion. This is assumed to return 'wcslength'.
+! * It may set 'p' to NULL. */
+! mbsnrtowcs(wsbuf+wcnum, &p, nms, wsbuf_size-wcnum, &state);
+
+! wcnum += wcslength;
+
+ if (mbsinit (&state) && (p != NULL) && (*p == '\\'))
+--- 214,229 ----
+
+ /* Perform the conversion. This is assumed to return 'wcslength'.
+! It may set 'p' to NULL. */
+! n = mbsnrtowcs(wsbuf+wcnum, &p, nms, wsbuf_size-wcnum, &state);
+
+! /* Compensate for taking single byte on wcs conversion failure above. */
+! if (wcslength == 1 && (n == 0 || n == (size_t)-1))
+! {
+! state = tmp_state;
+! p = tmp_p;
+! wsbuf[wcnum++] = *p++;
+! }
+! else
+! wcnum += wcslength;
+
+ if (mbsinit (&state) && (p != NULL) && (*p == '\\'))
+***************
+*** 231,236 ****
+ of DESTP and INDICESP are NULL. */
+
+- #define WSBUF_INC 32
+-
+ size_t
+ xdupmbstowcs (destp, indicesp, src)
+--- 253,256 ----
+*** ../bash-4.2-patched/lib/glob/glob.c 2009-11-14 18:39:30.000000000 -0500
+--- lib/glob/glob.c 2012-07-07 12:09:56.000000000 -0400
+***************
+*** 201,206 ****
+ size_t pat_n, dn_n;
+
+ pat_n = xdupmbstowcs (&pat_wc, NULL, pat);
+! dn_n = xdupmbstowcs (&dn_wc, NULL, dname);
+
+ ret = 0;
+--- 201,209 ----
+ size_t pat_n, dn_n;
+
++ pat_wc = dn_wc = (wchar_t *)NULL;
++
+ pat_n = xdupmbstowcs (&pat_wc, NULL, pat);
+! if (pat_n != (size_t)-1)
+! dn_n = xdupmbstowcs (&dn_wc, NULL, dname);
+
+ ret = 0;
+***************
+*** 222,225 ****
+--- 225,230 ----
+ ret = 1;
+ }
++ else
++ ret = skipname (pat, dname, flags);
+
+ FREE (pat_wc);
+***************
+*** 267,272 ****
+ n = xdupmbstowcs (&wpathname, NULL, pathname);
+ if (n == (size_t) -1)
+! /* Something wrong. */
+! return;
+ orig_wpathname = wpathname;
+
+--- 272,280 ----
+ n = xdupmbstowcs (&wpathname, NULL, pathname);
+ if (n == (size_t) -1)
+! {
+! /* Something wrong. Fall back to single-byte */
+! udequote_pathname (pathname);
+! return;
+! }
+ orig_wpathname = wpathname;
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 29
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 30
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-031 b/patches/source/bash/bash-4.2-patches/bash42-031
new file mode 100644
index 000000000..419d4478e
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-031
@@ -0,0 +1,80 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-031
+
+Bug-Reported-by: Max Horn <max@quendi.de>
+Bug-Reference-ID: <20CC5C60-07C3-4E41-9817-741E48D407C5@quendi.de>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2012-06/msg00005.html
+
+Bug-Description:
+
+A change between bash-4.1 and bash-4.2 to prevent the readline input hook
+from being called too frequently had the side effect of causing delays
+when reading pasted input on systems such as Mac OS X. This patch fixes
+those delays while retaining the bash-4.2 behavior.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/lib/readline/input.c 2010-05-30 18:33:01.000000000 -0400
+--- lib/readline/input.c 2012-06-25 21:08:42.000000000 -0400
+***************
+*** 410,414 ****
+ rl_read_key ()
+ {
+! int c;
+
+ rl_key_sequence_length++;
+--- 412,416 ----
+ rl_read_key ()
+ {
+! int c, r;
+
+ rl_key_sequence_length++;
+***************
+*** 430,441 ****
+ while (rl_event_hook)
+ {
+! if (rl_gather_tyi () < 0) /* XXX - EIO */
+ {
+ rl_done = 1;
+ return ('\n');
+ }
+ RL_CHECK_SIGNALS ();
+- if (rl_get_char (&c) != 0)
+- break;
+ if (rl_done) /* XXX - experimental */
+ return ('\n');
+--- 432,447 ----
+ while (rl_event_hook)
+ {
+! if (rl_get_char (&c) != 0)
+! break;
+!
+! if ((r = rl_gather_tyi ()) < 0) /* XXX - EIO */
+ {
+ rl_done = 1;
+ return ('\n');
+ }
++ else if (r == 1) /* read something */
++ continue;
++
+ RL_CHECK_SIGNALS ();
+ if (rl_done) /* XXX - experimental */
+ return ('\n');
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 30
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 31
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-032 b/patches/source/bash/bash-4.2-patches/bash42-032
new file mode 100644
index 000000000..d4f25ca03
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-032
@@ -0,0 +1,75 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-032
+
+Bug-Reported-by: Ruediger Kuhlmann <RKuhlmann@orga-systems.com>
+Bug-Reference-ID: <OFDE975207.0C3622E5-ONC12579F3.00361A06-C12579F3.00365E39@orga-systems.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-05/msg00010.html
+
+Bug-Description:
+
+Bash-4.2 has problems with DEL characters in the expanded value of variables
+used in the same quoted string as variables that expand to nothing.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-20120427/subst.c 2012-04-22 16:19:10.000000000 -0400
+--- subst.c 2012-05-07 16:06:35.000000000 -0400
+***************
+*** 8152,8155 ****
+--- 8152,8163 ----
+ dispose_word_desc (tword);
+
++ /* Kill quoted nulls; we will add them back at the end of
++ expand_word_internal if nothing else in the string */
++ if (had_quoted_null && temp && QUOTED_NULL (temp))
++ {
++ FREE (temp);
++ temp = (char *)NULL;
++ }
++
+ goto add_string;
+ break;
+***************
+*** 8556,8560 ****
+ if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
+ tword->flags |= W_QUOTED;
+! if (had_quoted_null)
+ tword->flags |= W_HASQUOTEDNULL;
+ list = make_word_list (tword, (WORD_LIST *)NULL);
+--- 8564,8568 ----
+ if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
+ tword->flags |= W_QUOTED;
+! if (had_quoted_null && QUOTED_NULL (istring))
+ tword->flags |= W_HASQUOTEDNULL;
+ list = make_word_list (tword, (WORD_LIST *)NULL);
+***************
+*** 8587,8591 ****
+ if (word->flags & W_NOEXPAND)
+ tword->flags |= W_NOEXPAND;
+! if (had_quoted_null)
+ tword->flags |= W_HASQUOTEDNULL; /* XXX */
+ list = make_word_list (tword, (WORD_LIST *)NULL);
+--- 8595,8599 ----
+ if (word->flags & W_NOEXPAND)
+ tword->flags |= W_NOEXPAND;
+! if (had_quoted_null && QUOTED_NULL (istring))
+ tword->flags |= W_HASQUOTEDNULL; /* XXX */
+ list = make_word_list (tword, (WORD_LIST *)NULL);
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 31
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 32
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-033 b/patches/source/bash/bash-4.2-patches/bash42-033
new file mode 100644
index 000000000..e58d7286e
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-033
@@ -0,0 +1,57 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-033
+
+Bug-Reported-by: David Leverton <levertond@googlemail.com>
+Bug-Reference-ID: <4FCCE737.1060603@googlemail.com>
+Bug-Reference-URL:
+
+Bug-Description:
+
+Bash uses a static buffer when expanding the /dev/fd prefix for the test
+and conditional commands, among other uses, when it should use a dynamic
+buffer to avoid buffer overflow.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/lib/sh/eaccess.c 2011-01-08 20:50:10.000000000 -0500
+--- lib/sh/eaccess.c 2012-06-04 21:06:43.000000000 -0400
+***************
+*** 83,86 ****
+--- 83,88 ----
+ struct stat *finfo;
+ {
++ static char *pbuf = 0;
++
+ if (*path == '\0')
+ {
+***************
+*** 107,111 ****
+ On most systems, with the notable exception of linux, this is
+ effectively a no-op. */
+! char pbuf[32];
+ strcpy (pbuf, DEV_FD_PREFIX);
+ strcat (pbuf, path + 8);
+--- 109,113 ----
+ On most systems, with the notable exception of linux, this is
+ effectively a no-op. */
+! pbuf = xrealloc (pbuf, sizeof (DEV_FD_PREFIX) + strlen (path + 8));
+ strcpy (pbuf, DEV_FD_PREFIX);
+ strcat (pbuf, path + 8);
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 32
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 33
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-034 b/patches/source/bash/bash-4.2-patches/bash42-034
new file mode 100644
index 000000000..e4f05e103
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-034
@@ -0,0 +1,46 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-034
+
+Bug-Reported-by: "Davide Brini" <dave_br@gmx.com>
+Bug-Reference-ID: <20120604164154.69781EC04B@imaps.oficinas.atrapalo.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-06/msg00030.html
+
+Bug-Description:
+
+In bash-4.2, the history code would inappropriately add a semicolon to
+multi-line compound array assignments when adding them to the history.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/parse.y 2011-11-21 18:03:36.000000000 -0500
+--- parse.y 2012-06-07 12:48:47.000000000 -0400
+***************
+*** 4900,4905 ****
+--- 4916,4924 ----
+ return (current_command_line_count == 2 ? "\n" : "");
+ }
+
++ if (parser_state & PST_COMPASSIGN)
++ return (" ");
++
+ /* First, handle some special cases. */
+ /*(*/
+ /* If we just read `()', assume it's a function definition, and don't
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 33
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 34
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-035 b/patches/source/bash/bash-4.2-patches/bash42-035
new file mode 100644
index 000000000..6f0be6f90
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-035
@@ -0,0 +1,66 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-035
+
+Bug-Reported-by: Dan Douglas <ormaaj@gmail.com>
+Bug-Reference-ID: <2766482.Ksm3GrSoYi@smorgbox>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-06/msg00071.html
+
+Bug-Description:
+
+When given a number of lines to read, `mapfile -n lines' reads one too many.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/builtins/mapfile.def 2010-05-29 22:09:47.000000000 -0400
+--- builtins/mapfile.def 2012-06-20 09:48:33.000000000 -0400
+***************
+*** 196,206 ****
+ interrupt_immediately++;
+ for (array_index = origin, line_count = 1;
+! zgetline (fd, &line, &line_length, unbuffered_read) != -1;
+! array_index++, line_count++)
+ {
+- /* Have we exceeded # of lines to store? */
+- if (line_count_goal != 0 && line_count > line_count_goal)
+- break;
+-
+ /* Remove trailing newlines? */
+ if (flags & MAPF_CHOP)
+--- 196,202 ----
+ interrupt_immediately++;
+ for (array_index = origin, line_count = 1;
+! zgetline (fd, &line, &line_length, unbuffered_read) != -1;
+! array_index++)
+ {
+ /* Remove trailing newlines? */
+ if (flags & MAPF_CHOP)
+***************
+*** 218,221 ****
+--- 214,222 ----
+
+ bind_array_element (entry, array_index, line, 0);
++
++ /* Have we exceeded # of lines to store? */
++ line_count++;
++ if (line_count_goal != 0 && line_count > line_count_goal)
++ break;
+ }
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 34
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 35
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-036 b/patches/source/bash/bash-4.2-patches/bash42-036
new file mode 100644
index 000000000..73fac408a
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-036
@@ -0,0 +1,92 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-036
+
+Bug-Reported-by: gregrwm <backuppc-users@whitleymott.net>
+Bug-Reference-ID: <CAD+dB9B4JG+qUwZBQUwiQmVt0j6NDn=DDTxr9R+nkA8DL4KLJA@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-05/msg00108.html
+
+Bug-Description:
+
+Bash-4.2 produces incorrect word splitting results when expanding
+double-quoted $@ in the same string as and adjacent to other variable
+expansions. The $@ should be split, the other expansions should not.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/subst.c 2012-05-02 12:02:33.000000000 -0400
+--- subst.c 2012-07-08 21:19:32.000000000 -0400
+***************
+*** 7923,7927 ****
+ /* State flags */
+ int had_quoted_null;
+! int has_dollar_at;
+ int tflag;
+ int pflags; /* flags passed to param_expand */
+--- 7923,7927 ----
+ /* State flags */
+ int had_quoted_null;
+! int has_dollar_at, temp_has_dollar_at;
+ int tflag;
+ int pflags; /* flags passed to param_expand */
+***************
+*** 8128,8138 ****
+ *expanded_something = 1;
+
+! has_dollar_at = 0;
+ pflags = (word->flags & W_NOCOMSUB) ? PF_NOCOMSUB : 0;
+ if (word->flags & W_NOSPLIT2)
+ pflags |= PF_NOSPLIT2;
+ tword = param_expand (string, &sindex, quoted, expanded_something,
+! &has_dollar_at, &quoted_dollar_at,
+ &had_quoted_null, pflags);
+
+ if (tword == &expand_wdesc_error || tword == &expand_wdesc_fatal)
+--- 8128,8139 ----
+ *expanded_something = 1;
+
+! temp_has_dollar_at = 0;
+ pflags = (word->flags & W_NOCOMSUB) ? PF_NOCOMSUB : 0;
+ if (word->flags & W_NOSPLIT2)
+ pflags |= PF_NOSPLIT2;
+ tword = param_expand (string, &sindex, quoted, expanded_something,
+! &temp_has_dollar_at, &quoted_dollar_at,
+ &had_quoted_null, pflags);
++ has_dollar_at += temp_has_dollar_at;
+
+ if (tword == &expand_wdesc_error || tword == &expand_wdesc_fatal)
+***************
+*** 8275,8281 ****
+ temp = (char *)NULL;
+
+! has_dollar_at = 0;
+ /* Need to get W_HASQUOTEDNULL flag through this function. */
+! list = expand_word_internal (tword, Q_DOUBLE_QUOTES, 0, &has_dollar_at, (int *)NULL);
+
+ if (list == &expand_word_error || list == &expand_word_fatal)
+--- 8276,8283 ----
+ temp = (char *)NULL;
+
+! temp_has_dollar_at = 0; /* XXX */
+ /* Need to get W_HASQUOTEDNULL flag through this function. */
+! list = expand_word_internal (tword, Q_DOUBLE_QUOTES, 0, &temp_has_dollar_at, (int *)NULL);
+! has_dollar_at += temp_has_dollar_at;
+
+ if (list == &expand_word_error || list == &expand_word_fatal)
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 35
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 36
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-037 b/patches/source/bash/bash-4.2-patches/bash42-037
new file mode 100644
index 000000000..a12b8a7ee
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-037
@@ -0,0 +1,112 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-037
+
+Bug-Reported-by: Jakub Filak
+Bug-Reference-ID:
+Bug-Reference-URL: https://bugzilla.redhat.com/show_bug.cgi?id=813289
+
+Bug-Description:
+
+Attempting to redo (using `.') the vi editing mode `cc', `dd', or `yy'
+commands leads to an infinite loop.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/lib/readline/vi_mode.c 2011-02-25 11:17:02.000000000 -0500
+--- lib/readline/vi_mode.c 2012-06-02 12:24:47.000000000 -0400
+***************
+*** 1235,1243 ****
+ r = rl_domove_motion_callback (_rl_vimvcxt);
+ }
+! else if (vi_redoing)
+ {
+ _rl_vimvcxt->motion = _rl_vi_last_motion;
+ r = rl_domove_motion_callback (_rl_vimvcxt);
+ }
+ #if defined (READLINE_CALLBACKS)
+ else if (RL_ISSTATE (RL_STATE_CALLBACK))
+--- 1297,1313 ----
+ r = rl_domove_motion_callback (_rl_vimvcxt);
+ }
+! else if (vi_redoing && _rl_vi_last_motion != 'd') /* `dd' is special */
+ {
+ _rl_vimvcxt->motion = _rl_vi_last_motion;
+ r = rl_domove_motion_callback (_rl_vimvcxt);
+ }
++ else if (vi_redoing) /* handle redoing `dd' here */
++ {
++ _rl_vimvcxt->motion = _rl_vi_last_motion;
++ rl_mark = rl_end;
++ rl_beg_of_line (1, key);
++ RL_UNSETSTATE (RL_STATE_VIMOTION);
++ r = vidomove_dispatch (_rl_vimvcxt);
++ }
+ #if defined (READLINE_CALLBACKS)
+ else if (RL_ISSTATE (RL_STATE_CALLBACK))
+***************
+*** 1317,1325 ****
+ r = rl_domove_motion_callback (_rl_vimvcxt);
+ }
+! else if (vi_redoing)
+ {
+ _rl_vimvcxt->motion = _rl_vi_last_motion;
+ r = rl_domove_motion_callback (_rl_vimvcxt);
+ }
+ #if defined (READLINE_CALLBACKS)
+ else if (RL_ISSTATE (RL_STATE_CALLBACK))
+--- 1387,1403 ----
+ r = rl_domove_motion_callback (_rl_vimvcxt);
+ }
+! else if (vi_redoing && _rl_vi_last_motion != 'c') /* `cc' is special */
+ {
+ _rl_vimvcxt->motion = _rl_vi_last_motion;
+ r = rl_domove_motion_callback (_rl_vimvcxt);
+ }
++ else if (vi_redoing) /* handle redoing `cc' here */
++ {
++ _rl_vimvcxt->motion = _rl_vi_last_motion;
++ rl_mark = rl_end;
++ rl_beg_of_line (1, key);
++ RL_UNSETSTATE (RL_STATE_VIMOTION);
++ r = vidomove_dispatch (_rl_vimvcxt);
++ }
+ #if defined (READLINE_CALLBACKS)
+ else if (RL_ISSTATE (RL_STATE_CALLBACK))
+***************
+*** 1378,1381 ****
+--- 1456,1472 ----
+ r = rl_domove_motion_callback (_rl_vimvcxt);
+ }
++ else if (vi_redoing && _rl_vi_last_motion != 'y') /* `yy' is special */
++ {
++ _rl_vimvcxt->motion = _rl_vi_last_motion;
++ r = rl_domove_motion_callback (_rl_vimvcxt);
++ }
++ else if (vi_redoing) /* handle redoing `yy' here */
++ {
++ _rl_vimvcxt->motion = _rl_vi_last_motion;
++ rl_mark = rl_end;
++ rl_beg_of_line (1, key);
++ RL_UNSETSTATE (RL_STATE_VIMOTION);
++ r = vidomove_dispatch (_rl_vimvcxt);
++ }
+ #if defined (READLINE_CALLBACKS)
+ else if (RL_ISSTATE (RL_STATE_CALLBACK))
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 36
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 37
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-038 b/patches/source/bash/bash-4.2-patches/bash42-038
new file mode 100644
index 000000000..411e4dd54
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-038
@@ -0,0 +1,47 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-038
+
+Bug-Reported-by: armandsl@gmail.com
+Bug-Reference-ID: <20120822112810.8D14920040@windmill.latviatours.lv>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-08/msg00049.html
+
+Bug-Description:
+
+If a backslash-newline (which is removed) with no other input is given as
+input to `read', the shell tries to dereference a null pointer and seg faults.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/builtins/read.def 2012-03-11 17:52:44.000000000 -0400
+--- builtins/read.def 2012-08-22 11:53:09.000000000 -0400
+***************
+*** 792,796 ****
+ #endif
+
+! if (saw_escape)
+ {
+ t = dequote_string (input_string);
+--- 847,851 ----
+ #endif
+
+! if (saw_escape && input_string && *input_string)
+ {
+ t = dequote_string (input_string);
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 37
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 38
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-039 b/patches/source/bash/bash-4.2-patches/bash42-039
new file mode 100644
index 000000000..21457af12
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-039
@@ -0,0 +1,58 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-039
+
+Bug-Reported-by: Dan Douglas <ormaaj@gmail.com>
+Bug-Reference-ID: <1498458.MpVlmOXDB7@smorgbox>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-09/msg00008.html
+
+Bug-Description:
+
+Under certain circumstances, bash attempts to expand variables in arithmetic
+expressions even when evaluation is being suppressed.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/expr.c 2011-11-21 18:03:35.000000000 -0500
+--- expr.c 2012-09-09 16:31:18.000000000 -0400
+***************
+*** 1010,1013 ****
+--- 1073,1082 ----
+ #endif
+
++ /*itrace("expr_streval: %s: noeval = %d", tok, noeval);*/
++ /* If we are suppressing evaluation, just short-circuit here instead of
++ going through the rest of the evaluator. */
++ if (noeval)
++ return (0);
++
+ /* [[[[[ */
+ #if defined (ARRAY_VARS)
+***************
+*** 1183,1186 ****
+--- 1256,1263 ----
+
+ *cp = '\0';
++ /* XXX - watch out for pointer aliasing issues here */
++ if (curlval.tokstr && curlval.tokstr == tokstr)
++ init_lvalue (&curlval);
++
+ FREE (tokstr);
+ tokstr = savestring (tp);
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 38
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 39
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-040 b/patches/source/bash/bash-4.2-patches/bash42-040
new file mode 100644
index 000000000..1de0fe370
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-040
@@ -0,0 +1,56 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-040
+
+Bug-Reported-by: Andrey Zaitsev <jstcdr@gmail.com>
+Bug-Reference-ID: <CAEZVQT5PJ1Mb_Zh8LT5qz8sv+-9Q6hGfQ5DU9ZxdJ+gV7xBUaQ@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-04/msg00144.html
+
+Bug-Description:
+
+Output redirection applied to builtin commands missed I/O errors if
+they happened when the file descriptor was closed, rather than on write
+(e.g., like with an out-of-space error on a remote NFS file system).
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/redir.c 2011-01-02 16:00:31.000000000 -0500
+--- redir.c 2012-04-24 20:42:12.000000000 -0400
+***************
+*** 1092,1099 ****
+ #if defined (BUFFERED_INPUT)
+ check_bash_input (redirector);
+! close_buffered_fd (redirector);
+ #else /* !BUFFERED_INPUT */
+! close (redirector);
+ #endif /* !BUFFERED_INPUT */
+ }
+ break;
+--- 1092,1101 ----
+ #if defined (BUFFERED_INPUT)
+ check_bash_input (redirector);
+! r = close_buffered_fd (redirector);
+ #else /* !BUFFERED_INPUT */
+! r = close (redirector);
+ #endif /* !BUFFERED_INPUT */
++ if (r < 0 && (flags & RX_INTERNAL) && (errno == EIO || errno == ENOSPC))
++ REDIRECTION_ERROR (r, errno, -1);
+ }
+ break;
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 39
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 40
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-041 b/patches/source/bash/bash-4.2-patches/bash42-041
new file mode 100644
index 000000000..37d4ac704
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-041
@@ -0,0 +1,47 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-041
+
+Bug-Reported-by: Andrey Borzenkov <arvidjaar@gmail.com>
+Bug-Reference-ID: <20121202205200.2134478e@opensuse.site>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-12/msg00008.html
+
+Bug-Description:
+
+Process substitution incorrectly inherited a flag that inhibited using the
+(local) temporary environment for variable lookups if it was providing
+the filename to a redirection. The intent the flag is to enforce the
+Posix command expansion ordering rules.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/subst.c 2012-07-14 15:53:20.000000000 -0400
+--- subst.c 2012-12-02 22:26:54.000000000 -0500
+***************
+*** 5125,5128 ****
+--- 5129,5136 ----
+ #endif /* HAVE_DEV_FD */
+
++ /* subshells shouldn't have this flag, which controls using the temporary
++ environment for variable lookups. */
++ expanding_redir = 0;
++
+ result = parse_and_execute (string, "process substitution", (SEVAL_NONINT|SEVAL_NOHIST));
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 40
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 41
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-042 b/patches/source/bash/bash-4.2-patches/bash42-042
new file mode 100644
index 000000000..1ce0cae30
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-042
@@ -0,0 +1,57 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-042
+
+Bug-Reported-by: Adam Pippin <adam@gp-inc.ca>
+Bug-Reference-ID: <CAPYbNHr6ucZFOoWsRdUJj6KP3Ju0j1bkESa_cmb7iU+kZwdVpg@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-11/msg00087.html
+
+Bug-Description:
+
+Compilation failed after specifying the `--enable-minimal-config' option to
+configure (more specifically, specifying `--disable-alias').
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/parse.y 2012-07-08 21:53:33.000000000 -0400
+--- parse.y 2012-10-14 20:20:34.000000000 -0400
+***************
+*** 2394,2397 ****
+--- 2392,2396 ----
+ to consume the quoted newline and move to the next character in
+ the expansion. */
++ #if defined (ALIAS)
+ if (expanding_alias () && shell_input_line[shell_input_line_index+1] == '\0')
+ {
+***************
+*** 2404,2408 ****
+ goto next_alias_char; /* and get next character */
+ }
+! else
+ goto restart_read;
+ }
+--- 2403,2408 ----
+ goto next_alias_char; /* and get next character */
+ }
+! else
+! #endif
+ goto restart_read;
+ }
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 41
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 42
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-043 b/patches/source/bash/bash-4.2-patches/bash42-043
new file mode 100644
index 000000000..b25a5ee38
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-043
@@ -0,0 +1,65 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-043
+
+Bug-Reported-by: konsolebox <konsolebox@gmail.com>
+Bug-Reference-ID: <CAJnmqwZuGKLgMsMwxRK4LL+2NN+HgvmKzrnode99QBGrcgX1Lw@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2013-01/msg00138.html
+
+Bug-Description:
+
+When SIGCHLD is trapped, and a SIGCHLD trap handler runs when a pending
+`read -t' invocation times out and generates SIGALRM, bash can crash with
+a segmentation fault.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/builtins/read.def 2012-10-31 21:22:51.000517000 -0400
+--- builtins/read.def 2013-01-25 10:28:16.000038000 -0500
+***************
+*** 386,393 ****
+ /* Tricky. The top of the unwind-protect stack is the free of
+ input_string. We want to run all the rest and use input_string,
+! so we have to remove it from the stack. */
+! remove_unwind_protect ();
+! run_unwind_frame ("read_builtin");
+ input_string[i] = '\0'; /* make sure it's terminated */
+ retval = 128+SIGALRM;
+ goto assign_vars;
+--- 386,403 ----
+ /* Tricky. The top of the unwind-protect stack is the free of
+ input_string. We want to run all the rest and use input_string,
+! so we have to save input_string temporarily, run the unwind-
+! protects, then restore input_string so we can use it later. */
+!
+ input_string[i] = '\0'; /* make sure it's terminated */
++ if (i == 0)
++ {
++ t = (char *)xmalloc (1);
++ t[0] = 0;
++ }
++ else
++ t = savestring (input_string);
++
++ run_unwind_frame ("read_builtin");
++ input_string = t;
+ retval = 128+SIGALRM;
+ goto assign_vars;
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 42
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 43
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-044 b/patches/source/bash/bash-4.2-patches/bash42-044
new file mode 100644
index 000000000..e5bf28323
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-044
@@ -0,0 +1,70 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-044
+
+Bug-Reported-by: "Dashing" <dashing@hushmail.com>
+Bug-Reference-ID: <20130211175049.D90786F446@smtp.hushmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2013-02/msg00030.html
+
+Bug-Description:
+
+When converting a multibyte string to a wide character string as part of
+pattern matching, bash does not handle the end of the string correctly,
+causing the search for the NUL to go beyond the end of the string and
+reference random memory. Depending on the contents of that memory, bash
+can produce errors or crash.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/lib/glob/xmbsrtowcs.c 2012-07-08 21:53:19.000000000 -0400
+--- lib/glob/xmbsrtowcs.c 2013-02-12 12:00:39.000000000 -0500
+***************
+*** 217,220 ****
+--- 217,226 ----
+ n = mbsnrtowcs(wsbuf+wcnum, &p, nms, wsbuf_size-wcnum, &state);
+
++ if (n == 0 && p == 0)
++ {
++ wsbuf[wcnum] = L'\0';
++ break;
++ }
++
+ /* Compensate for taking single byte on wcs conversion failure above. */
+ if (wcslength == 1 && (n == 0 || n == (size_t)-1))
+***************
+*** 222,226 ****
+ state = tmp_state;
+ p = tmp_p;
+! wsbuf[wcnum++] = *p++;
+ }
+ else
+--- 228,238 ----
+ state = tmp_state;
+ p = tmp_p;
+! wsbuf[wcnum] = *p;
+! if (*p == 0)
+! break;
+! else
+! {
+! wcnum++; p++;
+! }
+ }
+ else
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 43
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 44
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-045 b/patches/source/bash/bash-4.2-patches/bash42-045
new file mode 100644
index 000000000..e0f8559ec
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-045
@@ -0,0 +1,53 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-045
+
+Bug-Reported-by: Stephane Chazelas <stephane.chazelas@gmail.com>
+Bug-Reference-ID: <20130218195539.GA9620@chaz.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2013-02/msg00080.html
+
+Bug-Description:
+
+The <&n- and >&n- redirections, which move one file descriptor to another,
+leave the file descriptor closed when applied to builtins or compound
+commands.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/redir.c 2013-01-30 11:56:09.000000000 -0500
+--- redir.c 2013-02-19 09:38:36.000000000 -0500
+***************
+*** 1008,1011 ****
+--- 1008,1021 ----
+ REDIRECTION_ERROR (r, errno, -1);
+ }
++ if ((flags & RX_UNDOABLE) && (ri == r_move_input || ri == r_move_output))
++ {
++ /* r_move_input and r_move_output add an additional close()
++ that needs to be undone */
++ if (fcntl (redirector, F_GETFD, 0) != -1)
++ {
++ r = add_undo_redirect (redir_fd, r_close_this, -1);
++ REDIRECTION_ERROR (r, errno, -1);
++ }
++ }
+ #if defined (BUFFERED_INPUT)
+ check_bash_input (redirector);
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 44
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 45
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-046 b/patches/source/bash/bash-4.2-patches/bash42-046
new file mode 100644
index 000000000..03a489e98
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-046
@@ -0,0 +1,55 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-046
+
+Bug-Reported-by: "Theodoros V. Kalamatianos" <thkala@gmail.com>
+Bug-Reference-ID: <20140112011131.GE17667@infinity.metashade.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-01/msg00044.html
+
+Bug-Description:
+
+Bash-4.2 patch 32 introduced a problem with "$@" and arrays expanding empty
+positional parameters or array elements when using substring expansion,
+pattern substitution, or case modfication. The empty parameters or array
+elements are removed instead of expanding to empty strings ("").
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/subst.c 2012-12-31 11:52:56.000000000 -0500
+--- subst.c 2014-03-31 14:19:56.000000000 -0400
+***************
+*** 7243,7247 ****
+ ret = alloc_word_desc ();
+ ret->word = temp1;
+! if (temp1 && QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ ret->flags |= W_QUOTED|W_HASQUOTEDNULL;
+ return ret;
+--- 7243,7253 ----
+ ret = alloc_word_desc ();
+ ret->word = temp1;
+! /* We test quoted_dollar_atp because we want variants with double-quoted
+! "$@" to take a different code path. In fact, we make sure at the end
+! of expand_word_internal that we're only looking at these flags if
+! quoted_dollar_at == 0. */
+! if (temp1 &&
+! (quoted_dollar_atp == 0 || *quoted_dollar_atp == 0) &&
+! QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ ret->flags |= W_QUOTED|W_HASQUOTEDNULL;
+ return ret;
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 45
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 46
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-047 b/patches/source/bash/bash-4.2-patches/bash42-047
new file mode 100644
index 000000000..65aff1c1b
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-047
@@ -0,0 +1,49 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-047
+
+Bug-Reported-by: Matthew Riley <mattdr@google.com>
+Bug-Reference-ID: <CA+NEdkwP3gw+gbcF5+xnR1pvcuzb1mDVzvmuJOpHRGHA9T7VFg@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2013-03/msg00047.html
+
+Bug-Description:
+
+The function that shortens pathnames for $PS1 according to the value of
+$PROMPT_DIRTRIM uses memcpy on potentially-overlapping regions of memory,
+when it should use memmove. The result is garbled pathnames in prompt
+strings.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/general.c 2010-12-12 15:06:27.000000000 -0500
+--- general.c 2014-01-30 16:46:15.000000000 -0500
+***************
+*** 767,771 ****
+
+ nlen = nend - ntail;
+! memcpy (nbeg, ntail, nlen);
+ nbeg[nlen] = '\0';
+
+--- 767,771 ----
+
+ nlen = nend - ntail;
+! memmove (nbeg, ntail, nlen);
+ nbeg[nlen] = '\0';
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 46
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 47
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-048 b/patches/source/bash/bash-4.2-patches/bash42-048
new file mode 100644
index 000000000..d6097fbb2
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-048
@@ -0,0 +1,104 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-048
+
+Bug-Reported-by: Stephane Chazelas <stephane.chazelas@gmail.com>
+Bug-Reference-ID:
+Bug-Reference-URL:
+
+Bug-Description:
+
+Under certain circumstances, bash will execute user code while processing the
+environment for exported function definitions.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2.47/builtins/common.h 2010-05-30 18:31:51.000000000 -0400
+--- builtins/common.h 2014-09-16 19:35:45.000000000 -0400
+***************
+*** 36,39 ****
+--- 36,41 ----
+
+ /* Flags for describe_command, shared between type.def and command.def */
++ #define SEVAL_FUNCDEF 0x080 /* only allow function definitions */
++ #define SEVAL_ONECMD 0x100 /* only allow a single command */
+ #define CDESC_ALL 0x001 /* type -a */
+ #define CDESC_SHORTDESC 0x002 /* command -V */
+*** ../bash-4.2.47/builtins/evalstring.c 2010-11-23 08:22:15.000000000 -0500
+--- builtins/evalstring.c 2014-09-16 19:35:45.000000000 -0400
+***************
+*** 262,265 ****
+--- 262,273 ----
+ struct fd_bitmap *bitmap;
+
++ if ((flags & SEVAL_FUNCDEF) && command->type != cm_function_def)
++ {
++ internal_warning ("%s: ignoring function definition attempt", from_file);
++ should_jump_to_top_level = 0;
++ last_result = last_command_exit_value = EX_BADUSAGE;
++ break;
++ }
++
+ bitmap = new_fd_bitmap (FD_BITMAP_SIZE);
+ begin_unwind_frame ("pe_dispose");
+***************
+*** 322,325 ****
+--- 330,336 ----
+ dispose_fd_bitmap (bitmap);
+ discard_unwind_frame ("pe_dispose");
++
++ if (flags & SEVAL_ONECMD)
++ break;
+ }
+ }
+*** ../bash-4.2.47/variables.c 2011-03-01 16:15:20.000000000 -0500
+--- variables.c 2014-09-16 19:35:45.000000000 -0400
+***************
+*** 348,357 ****
+ strcpy (temp_string + char_index + 1, string);
+
+! parse_and_execute (temp_string, name, SEVAL_NONINT|SEVAL_NOHIST);
+!
+! /* Ancient backwards compatibility. Old versions of bash exported
+! functions like name()=() {...} */
+! if (name[char_index - 1] == ')' && name[char_index - 2] == '(')
+! name[char_index - 2] = '\0';
+
+ if (temp_var = find_function (name))
+--- 348,355 ----
+ strcpy (temp_string + char_index + 1, string);
+
+! /* Don't import function names that are invalid identifiers from the
+! environment. */
+! if (legal_identifier (name))
+! parse_and_execute (temp_string, name, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_FUNCDEF|SEVAL_ONECMD);
+
+ if (temp_var = find_function (name))
+***************
+*** 362,369 ****
+ else
+ report_error (_("error importing function definition for `%s'"), name);
+-
+- /* ( */
+- if (name[char_index - 1] == ')' && name[char_index - 2] == '\0')
+- name[char_index - 2] = '('; /* ) */
+ }
+ #if defined (ARRAY_VARS)
+--- 360,363 ----
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 47
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 48
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-049 b/patches/source/bash/bash-4.2-patches/bash42-049
new file mode 100644
index 000000000..bf3abcefd
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-049
@@ -0,0 +1,43 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-049
+
+Bug-Reported-by: Tavis Ormandy <taviso@cmpxchg8b.com>
+Bug-Reference-ID:
+Bug-Reference-URL: http://twitter.com/taviso/statuses/514887394294652929
+
+Bug-Description:
+
+Under certain circumstances, bash can incorrectly save a lookahead character and
+return it on a subsequent call, even when reading a new line.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2.48/parse.y 2012-12-31 11:52:57.000000000 -0500
+--- parse.y 2014-09-25 16:12:19.000000000 -0400
+***************
+*** 2851,2854 ****
+--- 2851,2856 ----
+ word_desc_to_read = (WORD_DESC *)NULL;
+
++ eol_ungetc_lookahead = 0;
++
+ current_token = '\n'; /* XXX */
+ last_read_token = '\n';
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 48
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 49
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-050 b/patches/source/bash/bash-4.2-patches/bash42-050
new file mode 100644
index 000000000..76b37e528
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-050
@@ -0,0 +1,217 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-050
+
+Bug-Reported-by: Florian Weimer <fweimer@redhat.com>
+Bug-Reference-ID:
+Bug-Reference-URL:
+
+Bug-Description:
+
+This patch changes the encoding bash uses for exported functions to avoid
+clashes with shell variables and to avoid depending only on an environment
+variable's contents to determine whether or not to interpret it as a shell
+function.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2.49/variables.c 2014-09-16 19:35:45.000000000 -0400
+--- variables.c 2014-09-27 20:54:00.000000000 -0400
+***************
+*** 80,83 ****
+--- 80,88 ----
+ #define ifsname(s) ((s)[0] == 'I' && (s)[1] == 'F' && (s)[2] == 'S' && (s)[3] == '\0')
+
++ #define BASHFUNC_PREFIX "BASH_FUNC_"
++ #define BASHFUNC_PREFLEN 10 /* == strlen(BASHFUNC_PREFIX */
++ #define BASHFUNC_SUFFIX "%%"
++ #define BASHFUNC_SUFFLEN 2 /* == strlen(BASHFUNC_SUFFIX) */
++
+ extern char **environ;
+
+***************
+*** 269,273 ****
+ static void dispose_temporary_env __P((sh_free_func_t *));
+
+! static inline char *mk_env_string __P((const char *, const char *));
+ static char **make_env_array_from_var_list __P((SHELL_VAR **));
+ static char **make_var_export_array __P((VAR_CONTEXT *));
+--- 274,278 ----
+ static void dispose_temporary_env __P((sh_free_func_t *));
+
+! static inline char *mk_env_string __P((const char *, const char *, int));
+ static char **make_env_array_from_var_list __P((SHELL_VAR **));
+ static char **make_var_export_array __P((VAR_CONTEXT *));
+***************
+*** 339,357 ****
+ /* If exported function, define it now. Don't import functions from
+ the environment in privileged mode. */
+! if (privmode == 0 && read_but_dont_execute == 0 && STREQN ("() {", string, 4))
+ {
+ string_length = strlen (string);
+! temp_string = (char *)xmalloc (3 + string_length + char_index);
+
+! strcpy (temp_string, name);
+! temp_string[char_index] = ' ';
+! strcpy (temp_string + char_index + 1, string);
+
+ /* Don't import function names that are invalid identifiers from the
+ environment. */
+! if (legal_identifier (name))
+! parse_and_execute (temp_string, name, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_FUNCDEF|SEVAL_ONECMD);
+
+! if (temp_var = find_function (name))
+ {
+ VSETATTR (temp_var, (att_exported|att_imported));
+--- 344,373 ----
+ /* If exported function, define it now. Don't import functions from
+ the environment in privileged mode. */
+! if (privmode == 0 && read_but_dont_execute == 0 &&
+! STREQN (BASHFUNC_PREFIX, name, BASHFUNC_PREFLEN) &&
+! STREQ (BASHFUNC_SUFFIX, name + char_index - BASHFUNC_SUFFLEN) &&
+! STREQN ("() {", string, 4))
+ {
++ size_t namelen;
++ char *tname; /* desired imported function name */
++
++ namelen = char_index - BASHFUNC_PREFLEN - BASHFUNC_SUFFLEN;
++
++ tname = name + BASHFUNC_PREFLEN; /* start of func name */
++ tname[namelen] = '\0'; /* now tname == func name */
++
+ string_length = strlen (string);
+! temp_string = (char *)xmalloc (namelen + string_length + 2);
+
+! memcpy (temp_string, tname, namelen);
+! temp_string[namelen] = ' ';
+! memcpy (temp_string + namelen + 1, string, string_length + 1);
+
+ /* Don't import function names that are invalid identifiers from the
+ environment. */
+! if (absolute_program (tname) == 0 && (posixly_correct == 0 || legal_identifier (tname)))
+! parse_and_execute (temp_string, tname, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_FUNCDEF|SEVAL_ONECMD);
+
+! if (temp_var = find_function (tname))
+ {
+ VSETATTR (temp_var, (att_exported|att_imported));
+***************
+*** 359,363 ****
+ }
+ else
+! report_error (_("error importing function definition for `%s'"), name);
+ }
+ #if defined (ARRAY_VARS)
+--- 375,382 ----
+ }
+ else
+! report_error (_("error importing function definition for `%s'"), tname);
+!
+! /* Restore original suffix */
+! tname[namelen] = BASHFUNC_SUFFIX[0];
+ }
+ #if defined (ARRAY_VARS)
+***************
+*** 2538,2542 ****
+
+ INVALIDATE_EXPORTSTR (var);
+! var->exportstr = mk_env_string (name, value);
+
+ array_needs_making = 1;
+--- 2557,2561 ----
+
+ INVALIDATE_EXPORTSTR (var);
+! var->exportstr = mk_env_string (name, value, 0);
+
+ array_needs_making = 1;
+***************
+*** 3390,3408 ****
+
+ static inline char *
+! mk_env_string (name, value)
+ const char *name, *value;
+ {
+! int name_len, value_len;
+! char *p;
+
+ name_len = strlen (name);
+ value_len = STRLEN (value);
+! p = (char *)xmalloc (2 + name_len + value_len);
+! strcpy (p, name);
+! p[name_len] = '=';
+ if (value && *value)
+! strcpy (p + name_len + 1, value);
+ else
+! p[name_len + 1] = '\0';
+ return (p);
+ }
+--- 3409,3448 ----
+
+ static inline char *
+! mk_env_string (name, value, isfunc)
+ const char *name, *value;
++ int isfunc;
+ {
+! size_t name_len, value_len;
+! char *p, *q;
+
+ name_len = strlen (name);
+ value_len = STRLEN (value);
+!
+! /* If we are exporting a shell function, construct the encoded function
+! name. */
+! if (isfunc && value)
+! {
+! p = (char *)xmalloc (BASHFUNC_PREFLEN + name_len + BASHFUNC_SUFFLEN + value_len + 2);
+! q = p;
+! memcpy (q, BASHFUNC_PREFIX, BASHFUNC_PREFLEN);
+! q += BASHFUNC_PREFLEN;
+! memcpy (q, name, name_len);
+! q += name_len;
+! memcpy (q, BASHFUNC_SUFFIX, BASHFUNC_SUFFLEN);
+! q += BASHFUNC_SUFFLEN;
+! }
+! else
+! {
+! p = (char *)xmalloc (2 + name_len + value_len);
+! memcpy (p, name, name_len);
+! q = p + name_len;
+! }
+!
+! q[0] = '=';
+ if (value && *value)
+! memcpy (q + 1, value, value_len + 1);
+ else
+! q[1] = '\0';
+!
+ return (p);
+ }
+***************
+*** 3490,3494 ****
+ using the cached exportstr... */
+ list[list_index] = USE_EXPORTSTR ? savestring (value)
+! : mk_env_string (var->name, value);
+
+ if (USE_EXPORTSTR == 0)
+--- 3530,3534 ----
+ using the cached exportstr... */
+ list[list_index] = USE_EXPORTSTR ? savestring (value)
+! : mk_env_string (var->name, value, function_p (var));
+
+ if (USE_EXPORTSTR == 0)
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 49
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 50
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-051 b/patches/source/bash/bash-4.2-patches/bash42-051
new file mode 100644
index 000000000..4d5040aab
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-051
@@ -0,0 +1,173 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-051
+
+Bug-Reported-by: Florian Weimer <fweimer@redhat.com>
+Bug-Reference-ID:
+Bug-Reference-URL:
+
+Bug-Description:
+
+There are two local buffer overflows in parse.y that can cause the shell
+to dump core when given many here-documents attached to a single command
+or many nested loops.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2.50/parse.y 2014-09-27 12:18:53.000000000 -0400
+--- parse.y 2014-09-30 19:24:19.000000000 -0400
+***************
+*** 168,171 ****
+--- 168,174 ----
+ static int reserved_word_acceptable __P((int));
+ static int yylex __P((void));
++
++ static void push_heredoc __P((REDIRECT *));
++ static char *mk_alexpansion __P((char *));
+ static int alias_expand_token __P((char *));
+ static int time_command_acceptable __P((void));
+***************
+*** 265,269 ****
+ /* Variables to manage the task of reading here documents, because we need to
+ defer the reading until after a complete command has been collected. */
+! static REDIRECT *redir_stack[10];
+ int need_here_doc;
+
+--- 268,274 ----
+ /* Variables to manage the task of reading here documents, because we need to
+ defer the reading until after a complete command has been collected. */
+! #define HEREDOC_MAX 16
+!
+! static REDIRECT *redir_stack[HEREDOC_MAX];
+ int need_here_doc;
+
+***************
+*** 307,311 ****
+ index is decremented after a case, select, or for command is parsed. */
+ #define MAX_CASE_NEST 128
+! static int word_lineno[MAX_CASE_NEST];
+ static int word_top = -1;
+
+--- 312,316 ----
+ index is decremented after a case, select, or for command is parsed. */
+ #define MAX_CASE_NEST 128
+! static int word_lineno[MAX_CASE_NEST+1];
+ static int word_top = -1;
+
+***************
+*** 520,524 ****
+ redir.filename = $2;
+ $$ = make_redirection (source, r_reading_until, redir, 0);
+! redir_stack[need_here_doc++] = $$;
+ }
+ | NUMBER LESS_LESS WORD
+--- 525,529 ----
+ redir.filename = $2;
+ $$ = make_redirection (source, r_reading_until, redir, 0);
+! push_heredoc ($$);
+ }
+ | NUMBER LESS_LESS WORD
+***************
+*** 527,531 ****
+ redir.filename = $3;
+ $$ = make_redirection (source, r_reading_until, redir, 0);
+! redir_stack[need_here_doc++] = $$;
+ }
+ | REDIR_WORD LESS_LESS WORD
+--- 532,536 ----
+ redir.filename = $3;
+ $$ = make_redirection (source, r_reading_until, redir, 0);
+! push_heredoc ($$);
+ }
+ | REDIR_WORD LESS_LESS WORD
+***************
+*** 534,538 ****
+ redir.filename = $3;
+ $$ = make_redirection (source, r_reading_until, redir, REDIR_VARASSIGN);
+! redir_stack[need_here_doc++] = $$;
+ }
+ | LESS_LESS_MINUS WORD
+--- 539,543 ----
+ redir.filename = $3;
+ $$ = make_redirection (source, r_reading_until, redir, REDIR_VARASSIGN);
+! push_heredoc ($$);
+ }
+ | LESS_LESS_MINUS WORD
+***************
+*** 541,545 ****
+ redir.filename = $2;
+ $$ = make_redirection (source, r_deblank_reading_until, redir, 0);
+! redir_stack[need_here_doc++] = $$;
+ }
+ | NUMBER LESS_LESS_MINUS WORD
+--- 546,550 ----
+ redir.filename = $2;
+ $$ = make_redirection (source, r_deblank_reading_until, redir, 0);
+! push_heredoc ($$);
+ }
+ | NUMBER LESS_LESS_MINUS WORD
+***************
+*** 548,552 ****
+ redir.filename = $3;
+ $$ = make_redirection (source, r_deblank_reading_until, redir, 0);
+! redir_stack[need_here_doc++] = $$;
+ }
+ | REDIR_WORD LESS_LESS_MINUS WORD
+--- 553,557 ----
+ redir.filename = $3;
+ $$ = make_redirection (source, r_deblank_reading_until, redir, 0);
+! push_heredoc ($$);
+ }
+ | REDIR_WORD LESS_LESS_MINUS WORD
+***************
+*** 555,559 ****
+ redir.filename = $3;
+ $$ = make_redirection (source, r_deblank_reading_until, redir, REDIR_VARASSIGN);
+! redir_stack[need_here_doc++] = $$;
+ }
+ | LESS_LESS_LESS WORD
+--- 560,564 ----
+ redir.filename = $3;
+ $$ = make_redirection (source, r_deblank_reading_until, redir, REDIR_VARASSIGN);
+! push_heredoc ($$);
+ }
+ | LESS_LESS_LESS WORD
+***************
+*** 2534,2537 ****
+--- 2539,2557 ----
+ static int esacs_needed_count;
+
++ static void
++ push_heredoc (r)
++ REDIRECT *r;
++ {
++ if (need_here_doc >= HEREDOC_MAX)
++ {
++ last_command_exit_value = EX_BADUSAGE;
++ need_here_doc = 0;
++ report_syntax_error (_("maximum here-document count exceeded"));
++ reset_parser ();
++ exit_shell (last_command_exit_value);
++ }
++ redir_stack[need_here_doc++] = r;
++ }
++
+ void
+ gather_here_documents ()
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 50
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 51
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-052 b/patches/source/bash/bash-4.2-patches/bash42-052
new file mode 100644
index 000000000..186af0aee
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-052
@@ -0,0 +1,59 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-052
+
+Bug-Reported-by: Michal Zalewski <lcamtuf@coredump.cx>
+Bug-Reference-ID:
+Bug-Reference-URL:
+
+Bug-Description:
+
+When bash is parsing a function definition that contains a here-document
+delimited by end-of-file (or end-of-string), it leaves the closing delimiter
+uninitialized. This can result in an invalid memory access when the parsed
+function is later copied.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2.51/make_cmd.c 2009-09-11 17:26:12.000000000 -0400
+--- make_cmd.c 2014-10-02 11:26:58.000000000 -0400
+***************
+*** 690,693 ****
+--- 690,694 ----
+ temp->redirector = source;
+ temp->redirectee = dest_and_filename;
++ temp->here_doc_eof = 0;
+ temp->instruction = instruction;
+ temp->flags = 0;
+*** ../bash-4.2.51/copy_cmd.c 2009-09-11 16:28:02.000000000 -0400
+--- copy_cmd.c 2014-10-02 11:26:58.000000000 -0400
+***************
+*** 127,131 ****
+ case r_reading_until:
+ case r_deblank_reading_until:
+! new_redirect->here_doc_eof = savestring (redirect->here_doc_eof);
+ /*FALLTHROUGH*/
+ case r_reading_string:
+--- 127,131 ----
+ case r_reading_until:
+ case r_deblank_reading_until:
+! new_redirect->here_doc_eof = redirect->here_doc_eof ? savestring (redirect->here_doc_eof) : 0;
+ /*FALLTHROUGH*/
+ case r_reading_string:
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 51
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 52
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-053 b/patches/source/bash/bash-4.2-patches/bash42-053
new file mode 100644
index 000000000..cffd622fa
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-053
@@ -0,0 +1,132 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-053
+
+Bug-Reported-by: Michal Zalewski <lcamtuf@coredump.cx>
+Bug-Reference-ID:
+Bug-Reference-URL:
+
+Bug-Description:
+
+A combination of nested command substitutions and function importing from
+the environment can cause bash to execute code appearing in the environment
+variable value following the function definition.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2.52/builtins/evalstring.c 2014-09-16 19:35:45.000000000 -0400
+--- builtins/evalstring.c 2014-10-04 15:00:26.000000000 -0400
+***************
+*** 262,271 ****
+ struct fd_bitmap *bitmap;
+
+! if ((flags & SEVAL_FUNCDEF) && command->type != cm_function_def)
+ {
+! internal_warning ("%s: ignoring function definition attempt", from_file);
+! should_jump_to_top_level = 0;
+! last_result = last_command_exit_value = EX_BADUSAGE;
+! break;
+ }
+
+--- 262,284 ----
+ struct fd_bitmap *bitmap;
+
+! if (flags & SEVAL_FUNCDEF)
+ {
+! char *x;
+!
+! /* If the command parses to something other than a straight
+! function definition, or if we have not consumed the entire
+! string, or if the parser has transformed the function
+! name (as parsing will if it begins or ends with shell
+! whitespace, for example), reject the attempt */
+! if (command->type != cm_function_def ||
+! ((x = parser_remaining_input ()) && *x) ||
+! (STREQ (from_file, command->value.Function_def->name->word) == 0))
+! {
+! internal_warning (_("%s: ignoring function definition attempt"), from_file);
+! should_jump_to_top_level = 0;
+! last_result = last_command_exit_value = EX_BADUSAGE;
+! reset_parser ();
+! break;
+! }
+ }
+
+***************
+*** 332,336 ****
+
+ if (flags & SEVAL_ONECMD)
+! break;
+ }
+ }
+--- 345,352 ----
+
+ if (flags & SEVAL_ONECMD)
+! {
+! reset_parser ();
+! break;
+! }
+ }
+ }
+*** ../bash-4.2.52/parse.y 2014-09-30 19:24:19.000000000 -0400
+--- parse.y 2014-10-04 15:00:26.000000000 -0400
+***************
+*** 2436,2439 ****
+--- 2436,2449 ----
+ }
+
++ char *
++ parser_remaining_input ()
++ {
++ if (shell_input_line == 0)
++ return 0;
++ if (shell_input_line_index < 0 || shell_input_line_index >= shell_input_line_len)
++ return '\0'; /* XXX */
++ return (shell_input_line + shell_input_line_index);
++ }
++
+ #ifdef INCLUDE_UNUSED
+ /* Back the input pointer up by one, effectively `ungetting' a character. */
+***************
+*** 3891,3896 ****
+ /* reset_parser clears shell_input_line and associated variables */
+ restore_input_line_state (&ls);
+! if (interactive)
+! token_to_read = 0;
+
+ /* Need to find how many characters parse_and_execute consumed, update
+--- 3901,3906 ----
+ /* reset_parser clears shell_input_line and associated variables */
+ restore_input_line_state (&ls);
+!
+! token_to_read = 0;
+
+ /* Need to find how many characters parse_and_execute consumed, update
+*** ../bash-4.2.52/shell.h 2011-11-21 18:03:32.000000000 -0500
+--- shell.h 2014-10-04 15:00:26.000000000 -0400
+***************
+*** 178,181 ****
+--- 178,183 ----
+
+ /* Let's try declaring these here. */
++ extern char *parser_remaining_input __P((void));
++
+ extern sh_parser_state_t *save_parser_state __P((sh_parser_state_t *));
+ extern void restore_parser_state __P((sh_parser_state_t *));
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 52
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 53
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash.CVE-2016-0634.bash43-047 b/patches/source/bash/bash.CVE-2016-0634.bash43-047
new file mode 100644
index 000000000..316e3afcd
--- /dev/null
+++ b/patches/source/bash/bash.CVE-2016-0634.bash43-047
@@ -0,0 +1,150 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-047
+
+Bug-Reported-by: Bernd Dietzel
+Bug-Reference-ID:
+Bug-Reference-URL: https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1507025
+
+Bug-Description:
+
+Bash performs word expansions on the prompt strings after the special
+escape sequences are expanded. If a malicious user can modify the system
+hostname or change the name of the bash executable and coerce a user into
+executing it, and the new name contains word expansions (including
+command substitution), bash will expand them in prompt strings containing
+the \h or \H and \s escape sequences, respectively.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3-patched/parse.y 2015-08-13 15:11:54.000000000 -0400
+--- parse.y 2016-03-07 15:44:14.000000000 -0500
+***************
+*** 5259,5263 ****
+ int result_size, result_index;
+ int c, n, i;
+! char *temp, octal_string[4];
+ struct tm *tm;
+ time_t the_time;
+--- 5259,5263 ----
+ int result_size, result_index;
+ int c, n, i;
+! char *temp, *t_host, octal_string[4];
+ struct tm *tm;
+ time_t the_time;
+***************
+*** 5407,5411 ****
+ case 's':
+ temp = base_pathname (shell_name);
+! temp = savestring (temp);
+ goto add_string;
+
+--- 5407,5415 ----
+ case 's':
+ temp = base_pathname (shell_name);
+! /* Try to quote anything the user can set in the file system */
+! if (promptvars || posixly_correct)
+! temp = sh_backslash_quote_for_double_quotes (temp);
+! else
+! temp = savestring (temp);
+ goto add_string;
+
+***************
+*** 5497,5503 ****
+ case 'h':
+ case 'H':
+! temp = savestring (current_host_name);
+! if (c == 'h' && (t = (char *)strchr (temp, '.')))
+ *t = '\0';
+ goto add_string;
+
+--- 5501,5515 ----
+ case 'h':
+ case 'H':
+! t_host = savestring (current_host_name);
+! if (c == 'h' && (t = (char *)strchr (t_host, '.')))
+ *t = '\0';
++ if (promptvars || posixly_correct)
++ /* Make sure that expand_prompt_string is called with a
++ second argument of Q_DOUBLE_QUOTES if we use this
++ function here. */
++ temp = sh_backslash_quote_for_double_quotes (t_host);
++ else
++ temp = savestring (t_host);
++ free (t_host);
+ goto add_string;
+
+*** ../bash-4.3-patched/y.tab.c 2015-08-13 15:11:54.000000000 -0400
+--- y.tab.c 2016-03-07 15:44:14.000000000 -0500
+***************
+*** 7571,7575 ****
+ int result_size, result_index;
+ int c, n, i;
+! char *temp, octal_string[4];
+ struct tm *tm;
+ time_t the_time;
+--- 7571,7575 ----
+ int result_size, result_index;
+ int c, n, i;
+! char *temp, *t_host, octal_string[4];
+ struct tm *tm;
+ time_t the_time;
+***************
+*** 7719,7723 ****
+ case 's':
+ temp = base_pathname (shell_name);
+! temp = savestring (temp);
+ goto add_string;
+
+--- 7719,7727 ----
+ case 's':
+ temp = base_pathname (shell_name);
+! /* Try to quote anything the user can set in the file system */
+! if (promptvars || posixly_correct)
+! temp = sh_backslash_quote_for_double_quotes (temp);
+! else
+! temp = savestring (temp);
+ goto add_string;
+
+***************
+*** 7809,7815 ****
+ case 'h':
+ case 'H':
+! temp = savestring (current_host_name);
+! if (c == 'h' && (t = (char *)strchr (temp, '.')))
+ *t = '\0';
+ goto add_string;
+
+--- 7813,7827 ----
+ case 'h':
+ case 'H':
+! t_host = savestring (current_host_name);
+! if (c == 'h' && (t = (char *)strchr (t_host, '.')))
+ *t = '\0';
++ if (promptvars || posixly_correct)
++ /* Make sure that expand_prompt_string is called with a
++ second argument of Q_DOUBLE_QUOTES if we use this
++ function here. */
++ temp = sh_backslash_quote_for_double_quotes (t_host);
++ else
++ temp = savestring (t_host);
++ free (t_host);
+ goto add_string;
+
+*** ../bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500
+--- patchlevel.h 2014-03-20 20:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 46
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 47
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash.CVE-2016-7543.bash43-048 b/patches/source/bash/bash.CVE-2016-7543.bash43-048
new file mode 100644
index 000000000..6a8588ec0
--- /dev/null
+++ b/patches/source/bash/bash.CVE-2016-7543.bash43-048
@@ -0,0 +1,54 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-048
+
+Bug-Reported-by: up201407890@alunos.dcc.fc.up.pt
+Bug-Reference-ID: <20151210201649.126444eionzfsam8@webmail.alunos.dcc.fc.up.pt>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-12/msg00054.html
+
+Bug-Description:
+
+If a malicious user can inject a value of $SHELLOPTS containing `xtrace'
+and a value for $PS4 that includes a command substitution into a shell
+running as root, bash will expand the command substitution as part of
+expanding $PS4 when it executes a traced command.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3-patched/variables.c 2015-11-26 12:31:21.000000000 -0500
+--- variables.c 2015-12-23 10:19:01.000000000 -0500
+***************
+*** 496,500 ****
+ set_if_not ("PS2", secondary_prompt);
+ }
+! set_if_not ("PS4", "+ ");
+
+ /* Don't allow IFS to be imported from the environment. */
+--- 496,504 ----
+ set_if_not ("PS2", secondary_prompt);
+ }
+!
+! if (current_user.euid == 0)
+! bind_variable ("PS4", "+ ", 0);
+! else
+! set_if_not ("PS4", "+ ");
+
+ /* Don't allow IFS to be imported from the environment. */
+
+*** ../bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500
+--- patchlevel.h 2014-03-20 20:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 47
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 48
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash.SlackBuild b/patches/source/bash/bash.SlackBuild
new file mode 100755
index 000000000..6494545cc
--- /dev/null
+++ b/patches/source/bash/bash.SlackBuild
@@ -0,0 +1,173 @@
+#!/bin/sh
+
+# Copyright 2005-2017 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Modified 2011, 2012 by Eric Hameleers <alien at slackware.com> for ARM port.
+
+
+# Set initial variables:
+CWD=`pwd`
+if [ "$TMP" = "" ]; then
+ TMP=/tmp
+fi
+PKG=$TMP/package-bash
+
+VERSION=${VERSION:-$(echo bash-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-2_slack14.1}
+
+# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
+if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i486 ;;
+ armv7hl) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+fi
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+else
+ SLKCFLAGS="-O2"
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+if [ ! -d $TMP ]; then
+ mkdir -p $TMP # location to build the source
+fi
+rm -rf $PKG
+mkdir -p $PKG
+
+# Determine bash patchlevel:
+PATCHLEVEL="$( cd $CWD/bash-${VERSION}-patches ; /bin/ls bash4?-??? | tail -1 | cut -f 2 -d - 2> /dev/null )"
+if [ "$PATCHLEVEL" = "" ]; then
+ PATCHLEVEL=0
+fi
+
+cd $TMP
+rm -rf bash-$VERSION
+tar xvf $CWD/bash-$VERSION.tar.?z* || exit 1
+cd bash-$VERSION || exit 1
+chown -R root:root .
+find . -perm 664 | xargs chmod 644
+find . -perm 775 | xargs chmod 755
+
+if [ -d $CWD/bash-${VERSION}-patches ]; then
+ ( cd $CWD/bash-${VERSION}-patches ; cat bash4?-??? ) | patch -p0 --verbose || exit 1
+fi
+
+# Patch security issues with upstream patches for bash-4.3.
+# Don't worry about the patch rejections in patchlevel.h here.
+zcat $CWD/bash.CVE-2016-0634.bash43-047.gz | patch -p0 --verbose
+zcat $CWD/bash.CVE-2016-7543.bash43-048.gz | patch -p0 --verbose
+
+# End of preparations
+if echo "$*" | grep -qw -- --prep ; then
+ exit 0
+fi
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --build=$TARGET
+
+make -j4 || make || exit 1
+make install DESTDIR=$PKG
+mv $PKG/usr/share/doc $PKG/usr
+mkdir -p $PKG/bin
+mv $PKG/usr/bin/bash $PKG/bin/bash4.new
+# We don't include the "bashbug" script.
+rm -rf $PKG/usr/bin $PKG/usr/man/man1/bashbug.1
+
+# Strip binaries:
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# bash.1 is already installed by "make install"
+( cd doc
+ for page in builtins.1 rbash.1 ; do
+ cat $page | gzip -9c > $PKG/usr/man/man1/$page.gz
+ done
+)
+
+# Compress info files, if any:
+if [ -d $PKG/usr/info ]; then
+ ( cd $PKG/usr/info
+ rm -f dir
+ gzip -9 *
+ )
+fi
+
+mkdir -p $PKG/usr/doc/bash-$VERSION
+cp -a AUTHORS CHANGES COMPAT COPYING INSTALL MANIFEST NEWS NOTES \
+ README Y2K doc/FAQ doc/INTRO \
+ $PKG/usr/doc/bash-$VERSION
+( cd doc ; groff -ms -Tascii article.ms > $PKG/usr/doc/bash-$VERSION/article.txt )
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+makepkg -l y -c n $TMP/bash-$VERSION.$PATCHLEVEL-$ARCH-$BUILD.txz
+
diff --git a/patches/source/bash/doinst.sh b/patches/source/bash/doinst.sh
new file mode 100644
index 000000000..867958fb8
--- /dev/null
+++ b/patches/source/bash/doinst.sh
@@ -0,0 +1,18 @@
+if [ -r bin/bash ]; then
+ mv bin/bash bin/bash.old
+fi
+mv bin/bash4.new bin/bash
+if [ -f bin/bash.old ]; then
+ rm -f bin/bash.old
+fi
+if [ ! -r etc/shells ]; then
+ touch etc/shells
+ chmod 644 etc/shells
+fi
+if grep -wq /bin/bash etc/shells ; then
+ true
+else
+ echo /bin/bash >> etc/shells
+fi
+( cd usr/bin ; rm -rf bash )
+( cd usr/bin ; ln -sf /bin/bash bash )
diff --git a/patches/source/bash/slack-desc b/patches/source/bash/slack-desc
new file mode 100644
index 000000000..f2fdb9292
--- /dev/null
+++ b/patches/source/bash/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+bash: bash (sh-compatible shell)
+bash:
+bash: The GNU Bourne-Again SHell. Bash is a sh-compatible command
+bash: interpreter that executes commands read from the standard input or
+bash: from a file. Bash also incorporates useful features from the Korn
+bash: and C shells (ksh and csh). Bash is ultimately intended to be a
+bash: conformant implementation of the IEEE Posix Shell and Tools
+bash: specification (IEEE Working Group 1003.2).
+bash:
+bash: Bash must be present for the system to boot properly.
+bash:
diff --git a/patches/source/bind/3link.sh b/patches/source/bind/3link.sh
new file mode 100644
index 000000000..ec8ba4d19
--- /dev/null
+++ b/patches/source/bind/3link.sh
@@ -0,0 +1,136 @@
+rm -f lwres_addr_parse.3
+ln -sf lwres_resutil.3 lwres_addr_parse.3
+rm -f lwres_buffer_add.3
+ln -sf lwres_buffer.3 lwres_buffer_add.3
+rm -f lwres_buffer_back.3
+ln -sf lwres_buffer.3 lwres_buffer_back.3
+rm -f lwres_buffer_clear.3
+ln -sf lwres_buffer.3 lwres_buffer_clear.3
+rm -f lwres_buffer_first.3
+ln -sf lwres_buffer.3 lwres_buffer_first.3
+rm -f lwres_buffer_forward.3
+ln -sf lwres_buffer.3 lwres_buffer_forward.3
+rm -f lwres_buffer_getmem.3
+ln -sf lwres_buffer.3 lwres_buffer_getmem.3
+rm -f lwres_buffer_getuint16.3
+ln -sf lwres_buffer.3 lwres_buffer_getuint16.3
+rm -f lwres_buffer_getuint32.3
+ln -sf lwres_buffer.3 lwres_buffer_getuint32.3
+rm -f lwres_buffer_getuint8.3
+ln -sf lwres_buffer.3 lwres_buffer_getuint8.3
+rm -f lwres_buffer_init.3
+ln -sf lwres_buffer.3 lwres_buffer_init.3
+rm -f lwres_buffer_invalidate.3
+ln -sf lwres_buffer.3 lwres_buffer_invalidate.3
+rm -f lwres_buffer_putmem.3
+ln -sf lwres_buffer.3 lwres_buffer_putmem.3
+rm -f lwres_buffer_putuint16.3
+ln -sf lwres_buffer.3 lwres_buffer_putuint16.3
+rm -f lwres_buffer_putuint32.3
+ln -sf lwres_buffer.3 lwres_buffer_putuint32.3
+rm -f lwres_buffer_putuint8.3
+ln -sf lwres_buffer.3 lwres_buffer_putuint8.3
+rm -f lwres_buffer_subtract.3
+ln -sf lwres_buffer.3 lwres_buffer_subtract.3
+rm -f lwres_conf_clear.3
+ln -sf lwres_config.3 lwres_conf_clear.3
+rm -f lwres_conf_get.3
+ln -sf lwres_config.3 lwres_conf_get.3
+rm -f lwres_conf_init.3
+ln -sf lwres_config.3 lwres_conf_init.3
+rm -f lwres_conf_parse.3
+ln -sf lwres_config.3 lwres_conf_parse.3
+rm -f lwres_conf_print.3
+ln -sf lwres_config.3 lwres_conf_print.3
+rm -f lwres_context_allocmem.3
+ln -sf lwres_context.3 lwres_context_allocmem.3
+rm -f lwres_context_create.3
+ln -sf lwres_context.3 lwres_context_create.3
+rm -f lwres_context_destroy.3
+ln -sf lwres_context.3 lwres_context_destroy.3
+rm -f lwres_context_freemem.3
+ln -sf lwres_context.3 lwres_context_freemem.3
+rm -f lwres_context_initserial.3
+ln -sf lwres_context.3 lwres_context_initserial.3
+rm -f lwres_context_nextserial.3
+ln -sf lwres_context.3 lwres_context_nextserial.3
+rm -f lwres_context_sendrecv.3
+ln -sf lwres_context.3 lwres_context_sendrecv.3
+rm -f lwres_endhostent.3
+ln -sf lwres_gethostent.3 lwres_endhostent.3
+rm -f lwres_endhostent_r.3
+ln -sf lwres_gethostent.3 lwres_endhostent_r.3
+rm -f lwres_freeaddrinfo.3
+ln -sf lwres_getaddrinfo.3 lwres_freeaddrinfo.3
+rm -f lwres_freehostent.3
+ln -sf lwres_getipnode.3 lwres_freehostent.3
+rm -f lwres_gabnrequest_free.3
+ln -sf lwres_gabn.3 lwres_gabnrequest_free.3
+rm -f lwres_gabnrequest_parse.3
+ln -sf lwres_gabn.3 lwres_gabnrequest_parse.3
+rm -f lwres_gabnrequest_render.3
+ln -sf lwres_gabn.3 lwres_gabnrequest_render.3
+rm -f lwres_gabnresponse_free.3
+ln -sf lwres_gabn.3 lwres_gabnresponse_free.3
+rm -f lwres_gabnresponse_parse.3
+ln -sf lwres_gabn.3 lwres_gabnresponse_parse.3
+rm -f lwres_gabnresponse_render.3
+ln -sf lwres_gabn.3 lwres_gabnresponse_render.3
+rm -f lwres_getaddrsbyname.3
+ln -sf lwres_resutil.3 lwres_getaddrsbyname.3
+rm -f lwres_gethostbyaddr.3
+ln -sf lwres_gethostent.3 lwres_gethostbyaddr.3
+rm -f lwres_gethostbyaddr_r.3
+ln -sf lwres_gethostent.3 lwres_gethostbyaddr_r.3
+rm -f lwres_gethostbyname.3
+ln -sf lwres_gethostent.3 lwres_gethostbyname.3
+rm -f lwres_gethostbyname2.3
+ln -sf lwres_gethostent.3 lwres_gethostbyname2.3
+rm -f lwres_gethostbyname_r.3
+ln -sf lwres_gethostent.3 lwres_gethostbyname_r.3
+rm -f lwres_gethostent_r.3
+ln -sf lwres_gethostent.3 lwres_gethostent_r.3
+rm -f lwres_getipnodebyaddr.3
+ln -sf lwres_getipnode.3 lwres_getipnodebyaddr.3
+rm -f lwres_getipnodebyname.3
+ln -sf lwres_getipnode.3 lwres_getipnodebyname.3
+rm -f lwres_getnamebyaddr.3
+ln -sf lwres_resutil.3 lwres_getnamebyaddr.3
+rm -f lwres_gnbarequest_free.3
+ln -sf lwres_gnba.3 lwres_gnbarequest_free.3
+rm -f lwres_gnbarequest_parse.3
+ln -sf lwres_gnba.3 lwres_gnbarequest_parse.3
+rm -f lwres_gnbarequest_render.3
+ln -sf lwres_gnba.3 lwres_gnbarequest_render.3
+rm -f lwres_gnbaresponse_free.3
+ln -sf lwres_gnba.3 lwres_gnbaresponse_free.3
+rm -f lwres_gnbaresponse_parse.3
+ln -sf lwres_gnba.3 lwres_gnbaresponse_parse.3
+rm -f lwres_gnbaresponse_render.3
+ln -sf lwres_gnba.3 lwres_gnbaresponse_render.3
+rm -f lwres_herror.3
+ln -sf lwres_hstrerror.3 lwres_herror.3
+rm -f lwres_lwpacket_parseheader.3
+ln -sf lwres_packet.3 lwres_lwpacket_parseheader.3
+rm -f lwres_lwpacket_renderheader.3
+ln -sf lwres_packet.3 lwres_lwpacket_renderheader.3
+rm -f lwres_net_ntop.3
+ln -sf lwres_inetntop.3 lwres_net_ntop.3
+rm -f lwres_nooprequest_free.3
+ln -sf lwres_noop.3 lwres_nooprequest_free.3
+rm -f lwres_nooprequest_parse.3
+ln -sf lwres_noop.3 lwres_nooprequest_parse.3
+rm -f lwres_nooprequest_render.3
+ln -sf lwres_noop.3 lwres_nooprequest_render.3
+rm -f lwres_noopresponse_free.3
+ln -sf lwres_noop.3 lwres_noopresponse_free.3
+rm -f lwres_noopresponse_parse.3
+ln -sf lwres_noop.3 lwres_noopresponse_parse.3
+rm -f lwres_noopresponse_render.3
+ln -sf lwres_noop.3 lwres_noopresponse_render.3
+rm -f lwres_sethostent.3
+ln -sf lwres_gethostent.3 lwres_sethostent.3
+rm -f lwres_sethostent_r.3
+ln -sf lwres_gethostent.3 lwres_sethostent_r.3
+rm -f lwres_string_parse.3
+ln -sf lwres_resutil.3 lwres_string_parse.3
diff --git a/patches/source/bind/bind.SlackBuild b/patches/source/bind/bind.SlackBuild
new file mode 100755
index 000000000..fc14c99c4
--- /dev/null
+++ b/patches/source/bind/bind.SlackBuild
@@ -0,0 +1,166 @@
+#!/bin/sh
+
+# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=bind
+VERSION=${VERSION:-9.9.11-P1}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=/bind-$(mcookie)
+PKG=$TMP/package-${PKGNAM}
+rm -rf $PKG
+mkdir -p $TMP $PKG/etc/default
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+fi
+
+cd $TMP
+rm -rf ${PKGNAM}-${VERSION}
+tar xvf $CWD/${PKGNAM}-$VERSION.tar.gz || exit 1
+cd ${PKGNAM}-$VERSION || exit 1
+
+# Remove use of SO_BSDCOMPAT which has been obsolete since the 2.2.x kernel
+# series, and generates warnings under 2.6.x kernels. This _might_ be fixed
+# upstream already, but an explicit #undef SO_BSDCOMPAT does not hurt:
+zcat $CWD/bind.so_bsdcompat.diff.gz | patch -p1 --verbose || exit
+
+# Make sure ownerships and permissions are sane:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Configure:
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --with-libtool \
+ --with-idn=/usr \
+ --mandir=/usr/man \
+ --enable-shared \
+ --disable-static \
+ --enable-threads \
+ --with-openssl=/usr \
+ --build=$ARCH-slackware-linux || exit 1
+
+# Build and install:
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# We like symlinks.
+( cd $PKG/usr/sbin
+ ln -sf named lwresd
+)
+
+# We like a lot of symlinks.
+( cd $PKG/usr/man/man3
+ sh $CWD/3link.sh
+)
+
+# Install init script:
+mkdir -p $PKG/etc/rc.d
+cp -a $CWD/rc.bind $PKG/etc/rc.d/rc.bind.new
+chmod 644 $PKG/etc/rc.d/rc.bind.new
+
+# Add /var/run/named directory:
+mkdir -p $PKG/var/run/named
+
+# Fix library perms:
+chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/*
+
+# Strip binaries:
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.* 2> /dev/null
+ )
+ done
+ )
+fi
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+cp -a \
+ CHANGES COPYRIGHT FAQ* README* \
+ doc/arm doc/misc \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+
+# This one should have the correct perms of the config file:
+chmod 644 $PKG/usr/doc/${PKGNAM}-$VERSION/misc/rndc.conf-sample
+
+# One format of this is plenty. Especially get rid of the bloated PDF.
+( cd $PKG/usr/doc/bind-$VERSION/arm
+ rm -f Makefile* *.pdf *.xml README.SGML latex-fixup.pl
+)
+
+# Add sample config files for a simple caching nameserver:
+mkdir -p $PKG/var/named/caching-example
+cat $CWD/caching-example/named.conf > $PKG/etc/named.conf.new
+cat $CWD/caching-example/localhost.zone > $PKG/var/named/caching-example/localhost.zone
+cat $CWD/caching-example/named.local > $PKG/var/named/caching-example/named.local
+cat $CWD/caching-example/named.root > $PKG/var/named/caching-example/named.root
+# This name is deprecated, but having it here doesn't hurt in case
+# an old configuration file wants it:
+cat $CWD/caching-example/named.root > $PKG/var/named/caching-example/named.ca
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz
+
diff --git a/patches/source/bind/bind.so_bsdcompat.diff b/patches/source/bind/bind.so_bsdcompat.diff
new file mode 100644
index 000000000..5d78031b7
--- /dev/null
+++ b/patches/source/bind/bind.so_bsdcompat.diff
@@ -0,0 +1,11 @@
+--- ./lib/isc/unix/socket.c.orig 2005-11-03 17:08:42.000000000 -0600
++++ ./lib/isc/unix/socket.c 2006-02-18 13:09:15.000000000 -0600
+@@ -245,6 +245,8 @@
+
+ #define SOCK_DEAD(s) ((s)->references == 0)
+
++#undef SO_BSDCOMPAT
++
+ static void
+ manager_log(isc_socketmgr_t *sockmgr,
+ isc_logcategory_t *category, isc_logmodule_t *module, int level,
diff --git a/patches/source/bind/caching-example/localhost.zone b/patches/source/bind/caching-example/localhost.zone
new file mode 100644
index 000000000..c47baf5f1
--- /dev/null
+++ b/patches/source/bind/caching-example/localhost.zone
@@ -0,0 +1,11 @@
+$TTL 86400
+$ORIGIN localhost.
+@ 1D IN SOA @ root (
+ 42 ; serial (d. adams)
+ 3H ; refresh
+ 15M ; retry
+ 1W ; expiry
+ 1D ) ; minimum
+
+ 1D IN NS @
+ 1D IN A 127.0.0.1
diff --git a/patches/source/bind/caching-example/named.conf b/patches/source/bind/caching-example/named.conf
new file mode 100644
index 000000000..a8ee2795f
--- /dev/null
+++ b/patches/source/bind/caching-example/named.conf
@@ -0,0 +1,31 @@
+options {
+ directory "/var/named";
+ /*
+ * If there is a firewall between you and nameservers you want
+ * to talk to, you might need to uncomment the query-source
+ * directive below. Previous versions of BIND always asked
+ * questions using port 53, but BIND 8.1 uses an unprivileged
+ * port by default.
+ */
+ // query-source address * port 53;
+};
+
+//
+// a caching only nameserver config
+//
+zone "." IN {
+ type hint;
+ file "caching-example/named.root";
+};
+
+zone "localhost" IN {
+ type master;
+ file "caching-example/localhost.zone";
+ allow-update { none; };
+};
+
+zone "0.0.127.in-addr.arpa" IN {
+ type master;
+ file "caching-example/named.local";
+ allow-update { none; };
+};
diff --git a/patches/source/bind/caching-example/named.local b/patches/source/bind/caching-example/named.local
new file mode 100644
index 000000000..8f40bcf36
--- /dev/null
+++ b/patches/source/bind/caching-example/named.local
@@ -0,0 +1,10 @@
+$TTL 86400
+@ IN SOA localhost. root.localhost. (
+ 2011032500 ; Serial
+ 28800 ; Refresh
+ 14400 ; Retry
+ 3600000 ; Expire
+ 86400 ) ; Minimum
+ IN NS localhost.
+
+1 IN PTR localhost.
diff --git a/patches/source/bind/caching-example/named.root b/patches/source/bind/caching-example/named.root
new file mode 100644
index 000000000..9cc20228c
--- /dev/null
+++ b/patches/source/bind/caching-example/named.root
@@ -0,0 +1,90 @@
+; This file holds the information on root name servers needed to
+; initialize cache of Internet domain name servers
+; (e.g. reference this file in the "cache . <file>"
+; configuration file of BIND domain name servers).
+;
+; This file is made available by InterNIC
+; under anonymous FTP as
+; file /domain/named.cache
+; on server FTP.INTERNIC.NET
+; -OR- RS.INTERNIC.NET
+;
+; last update: November 05, 2014
+; related version of root zone: 2014110501
+;
+; formerly NS.INTERNIC.NET
+;
+. 3600000 NS A.ROOT-SERVERS.NET.
+A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
+A.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:ba3e::2:30
+;
+; FORMERLY NS1.ISI.EDU
+;
+. 3600000 NS B.ROOT-SERVERS.NET.
+B.ROOT-SERVERS.NET. 3600000 A 192.228.79.201
+B.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:84::b
+;
+; FORMERLY C.PSI.NET
+;
+. 3600000 NS C.ROOT-SERVERS.NET.
+C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
+C.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2::c
+;
+; FORMERLY TERP.UMD.EDU
+;
+. 3600000 NS D.ROOT-SERVERS.NET.
+D.ROOT-SERVERS.NET. 3600000 A 199.7.91.13
+D.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2d::d
+;
+; FORMERLY NS.NASA.GOV
+;
+. 3600000 NS E.ROOT-SERVERS.NET.
+E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10
+;
+; FORMERLY NS.ISC.ORG
+;
+. 3600000 NS F.ROOT-SERVERS.NET.
+F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241
+F.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2f::f
+;
+; FORMERLY NS.NIC.DDN.MIL
+;
+. 3600000 NS G.ROOT-SERVERS.NET.
+G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4
+;
+; FORMERLY AOS.ARL.ARMY.MIL
+;
+. 3600000 NS H.ROOT-SERVERS.NET.
+H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53
+H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::803f:235
+;
+; FORMERLY NIC.NORDU.NET
+;
+. 3600000 NS I.ROOT-SERVERS.NET.
+I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17
+I.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fe::53
+;
+; OPERATED BY VERISIGN, INC.
+;
+. 3600000 NS J.ROOT-SERVERS.NET.
+J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30
+J.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:c27::2:30
+;
+; OPERATED BY RIPE NCC
+;
+. 3600000 NS K.ROOT-SERVERS.NET.
+K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129
+K.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fd::1
+;
+; OPERATED BY ICANN
+;
+. 3600000 NS L.ROOT-SERVERS.NET.
+L.ROOT-SERVERS.NET. 3600000 A 199.7.83.42
+L.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:3::42
+;
+; OPERATED BY WIDE
+;
+. 3600000 NS M.ROOT-SERVERS.NET.
+M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33
+M.ROOT-SERVERS.NET. 3600000 AAAA 2001:dc3::35
+; End of file
diff --git a/patches/source/bind/doinst.sh b/patches/source/bind/doinst.sh
new file mode 100644
index 000000000..afeff946f
--- /dev/null
+++ b/patches/source/bind/doinst.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+# Keep same perms on rc.bind.new:
+if [ -e etc/rc.d/rc.bind ]; then
+ cp -a etc/rc.d/rc.bind etc/rc.d/rc.bind.new.incoming
+ cat etc/rc.d/rc.bind.new > etc/rc.d/rc.bind.new.incoming
+ mv etc/rc.d/rc.bind.new.incoming etc/rc.d/rc.bind.new
+fi
+
+config etc/named.conf.new
+config etc/rc.d/rc.bind.new
+
+# Add a /var/named if it doesn't exist:
+if [ ! -d var/named ]; then
+ mkdir -p var/named
+ chmod 755 var/named
+fi
+
+# Generate /etc/rndc.key if there's none there,
+# and there also no /etc/rndc.conf (the other
+# way to set this up).
+if [ ! -r etc/rndc.key -a ! -r /etc/rndc.conf ]; then
+ chroot . /sbin/ldconfig
+ chroot . /usr/sbin/rndc-confgen -r /dev/urandom -a 2> /dev/null
+fi
diff --git a/patches/source/bind/rc.bind b/patches/source/bind/rc.bind
new file mode 100644
index 000000000..6d77d73d9
--- /dev/null
+++ b/patches/source/bind/rc.bind
@@ -0,0 +1,112 @@
+#!/bin/sh
+# Start/stop/restart the BIND name server daemon (named).
+
+
+# Start bind. In the past it was more secure to run BIND as a non-root
+# user (for example, with '-u daemon'), but the modern version of BIND
+# knows how to use the kernel's capability mechanism to drop all root
+# privileges except the ability to bind() to a privileged port and set
+# process resource limits, so -u should not be needed. If you wish to
+# use it anyway, chown the /var/run/named and /var/named directories to
+# the non-root user. The command options can be set like this in
+# /etc/default/named :
+# NAMED_OPTIONS="-u daemon"
+# So you will not have to edit this script.
+
+# You might also consider running BIND in a "chroot jail",
+# a discussion of which may be found in
+# /usr/doc/Linux-HOWTOs/Chroot-BIND-HOWTO.
+
+# One last note: rndc has a lot of other nice features that it is not
+# within the scope of this start/stop/restart script to support.
+# For more details, see "man rndc" or just type "rndc" to see the options.
+
+# Load command defaults:
+if [ -f /etc/default/named ] ; then . /etc/default/named ; fi
+if [ -f /etc/default/rndc ] ; then . /etc/default/rndc ; fi
+
+# Sanity check. If /usr/sbin/named is missing then it
+# doesn't make much sense to try to run this script:
+if [ ! -x /usr/sbin/named ]; then
+ echo "/etc/rc.d/rc.bind: no /usr/sbin/named found (or not executable); cannot start."
+ exit 1
+fi
+
+# Start BIND. As many times as you like. ;-)
+# Seriously, don't run "rc.bind start" if BIND is already
+# running or you'll get more than one copy running.
+bind_start() {
+ if [ -x /usr/sbin/named ]; then
+ echo "Starting BIND: /usr/sbin/named $NAMED_OPTIONS"
+ /usr/sbin/named $NAMED_OPTIONS
+ sleep 1
+ fi
+ if ! ps axc | grep -q named ; then
+ echo "WARNING: named did not start."
+ echo "Attempting to start named again: /usr/sbin/named $NAMED_OPTIONS"
+ /usr/sbin/named $NAMED_OPTIONS
+ sleep 1
+ if ps axc | grep -q named ; then
+ echo "SUCCESS: named started."
+ else
+ echo "FAILED: Sorry, a second attempt to start named has also failed."
+ echo "There may be a configuration error that needs fixing. Good luck!"
+ fi
+ fi
+}
+
+# Stop all running copies of BIND (/usr/sbin/named):
+bind_stop() {
+ echo "Stopping BIND: /usr/sbin/rndc $RDNC_OPTIONS stop"
+ /usr/sbin/rndc $RDNC_OPTIONS stop
+ # A problem with using "/usr/sbin/rndc stop" is that if you
+ # managed to get multiple copies of named running it will
+ # only stop one of them and then can't stop the others even
+ # if you run it again. So, after doing things the nice way
+ # we'll do them the old-fashioned way. If you don't like
+ # it you can comment it out, but unless you have a lot of
+ # other programs you run called "named" this is unlikely
+ # to have any ill effects:
+ sleep 1
+ if ps axc | grep -q named ; then
+ echo "Using "killall named" on additional BIND processes..."
+ /bin/killall named 2> /dev/null
+ fi
+}
+
+# Reload BIND:
+bind_reload() {
+ /usr/sbin/rndc $RDNC_OPTIONS reload
+}
+
+# Restart BIND:
+bind_restart() {
+ bind_stop
+ bind_start
+}
+
+# Get BIND status:
+bind_status() {
+ /usr/sbin/rndc $RDNC_OPTIONS status
+}
+
+case "$1" in
+'start')
+ bind_start
+ ;;
+'stop')
+ bind_stop
+ ;;
+'reload')
+ bind_reload
+ ;;
+'restart')
+ bind_restart
+ ;;
+'status')
+ bind_status
+ ;;
+*)
+ echo "usage $0 start|stop|reload|restart|status"
+esac
+
diff --git a/patches/source/bind/slack-desc b/patches/source/bind/slack-desc
new file mode 100644
index 000000000..9e9b15d11
--- /dev/null
+++ b/patches/source/bind/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+bind: bind (DNS server and utilities)
+bind:
+bind: The named daemon and support utilities such as dig, host, and
+bind: nslookup. Sample configuration files for running a simple caching
+bind: nameserver are included. Documentation for advanced name server
+bind: setup can be found in /usr/doc/bind-9.x.x/.
+bind:
+bind:
+bind:
+bind:
+bind:
diff --git a/patches/source/blueman/blueman-open b/patches/source/blueman/blueman-open
new file mode 100644
index 000000000..0cfa688fa
--- /dev/null
+++ b/patches/source/blueman/blueman-open
@@ -0,0 +1,114 @@
+#!/bin/sh
+# Blueman Mount Script for Slackware
+# by Zarren Spry & Robby Workman
+# Based on http://kde-apps.org/content/show.php/kde4+bluetooth+files+open?content=108869
+
+# Set to 0 if you want more debugging messages
+DEBUG=1
+
+device_addr="$1"
+device_name="$(hcitool name $device_addr)"
+own_name="$(basename $0)"
+basedir="${basedir:-$HOME/obexfs}"
+mountpoint="${basedir}/${device_addr}"
+browser=${browser:-"xdg-open"}
+
+# If we're running in kde, use kdialog
+if [ "$KDE_FULL_SESSION" = "true" ]; then
+ if which kdialog 1>/dev/null 2>/dev/null; then
+ messagetype="kdialog"
+ fi
+# If not, then see if libnotify is available
+# Even if it is, there may not be a notification daemon running, but there's
+# no good way to check for this, so oh well...
+elif which notify-send 1>/dev/null 2>/dev/null; then
+ messagetype="libnotify"
+# If no libnotify, then use kdialog if it's installed
+elif which kdialog 1>/dev/null 2>/dev/null; then
+ messagetype="kdialog"
+# If all else fails, just don't do notifications
+else
+ messagetype=""
+fi
+
+# Mount function
+mount_device ()
+{
+ [ ! -z $DEBUG ] && logger -i -t $own_name "Attempting to mount device $device_name to $mountpoint..."
+ [ ! -z $DEBUG ] && logger -i -t $own_name "Execute: obexfs -b $device_addr $mountpoint"
+
+ mkdir -p $mountpoint
+ obexfs -b $device_addr $mountpoint 2>&1
+
+ if [ $? != 0 ]; then
+ MSG_TXT="Failed to mount $device_name to $mountpoint. $dbg_msg"
+ FAILZOR=definitely
+ if [ ! -z $DEBUG ]; then
+ logger -i -t $own_name "Failed to mount $device_name to $mountpoint."
+ fi
+ else
+ MSG_TXT="Successfully mounted $device_name to $mountpoint"
+ if [ ! -z $DEBUG ]; then
+ logger -i -t $own_name "Successfully mounted $device_name to $mountpoint."
+ fi
+ fi
+
+ if [ $messagetype == "kdialog" ]; then
+ kdialog --passivepopup "$MSG_TXT" 2
+ elif [ $messagetype == "libnotify" ]; then
+ notify-send --expire-time=20000 --icon=blueman "$MSG_TXT"
+ fi
+
+ [ "$FAILZOR" = "definitely" ] && exit 1
+
+ [ ! -z $DEBUG ] && logger -i -t $own_name "Opening $mountpoint with $browser..."
+ $browser $mountpoint 2>&1
+
+}
+
+# Unmount function
+umount_device ()
+{
+ if grep -qw $mountpoint /proc/mounts 2>/dev/null ; then
+ [ ! -z $DEBUG ] && logger -i -t $own_name \
+ "$mountpoint has something mounted on it already - unmounting it..."
+
+ fusermount -u $mountpoint 1>/dev/null 2>/dev/null
+
+ if [ $? != 0 ]; then
+ [ ! -z $DEBUG ] && logger -i -t $own_name "Failed to unmount $mountpoint with fusermount..."
+ umount -f $mountpoint 1>/dev/null 2>/dev/null
+ if [ $? != 0 ]; then
+ [ ! -z $DEBUG ] && \
+ logger -i -t $own_name \
+ "Failed to unmount $mountpoint with umount - try it manually as root and then start over."
+ FAILZOR=definitely
+ MSG_TXT="Failed to unmount $mountpoint with fusermount and umount - try it as root first."
+ else
+ break
+ fi
+ else
+ [ ! -z $DEBUG ] && logger -i -t $own_name "Successfully unmounted $device_name."
+ fi
+ else
+ [ ! -z $DEBUG ] && logger -i -t $own_name "$mountpoint has nothing mounted on it - continuing..."
+ fi
+
+ if [ $messagetype == "kdialog" ]; then
+ kdialog --passivepopup "$MSG_TXT" 3
+ elif [ $messagetype == "libnotify" ]; then
+ notify-send --expire-time=20000 --icon=blueman "$MSG_TXT"
+ fi
+ [ "$FAILZOR" = "definitely" ] && exit 1
+}
+
+MSG_TXT="Attempting to mount $device_name - please wait..."
+if [ $messagetype == "kdialog" ]; then
+ kdialog --passivepopup "$MSG_TXT" 4
+elif [ $messagetype == "libnotify" ]; then
+ notify-send --expire-time=20000 --icon=blueman "$MSG_TXT"
+fi
+
+umount_device
+mount_device
+
diff --git a/patches/source/blueman/blueman-use_blueman-open_for_obexfs.diff b/patches/source/blueman/blueman-use_blueman-open_for_obexfs.diff
new file mode 100644
index 000000000..542ee6e5d
--- /dev/null
+++ b/patches/source/blueman/blueman-use_blueman-open_for_obexfs.diff
@@ -0,0 +1,12 @@
+diff -Nur blueman-1.21.orig/blueman/Constants.py.in blueman-1.21/blueman/Constants.py.in
+--- blueman-1.21.orig/blueman/Constants.py.in 2009-09-20 05:01:26.000000000 -0500
++++ blueman-1.21/blueman/Constants.py.in 2009-12-13 16:26:29.643850538 -0600
+@@ -10,7 +10,7 @@
+ POLKIT = "@polkit_val@" == "yes"
+ HAL_ENABLED = "@hal_en@" == "yes"
+
+-DEF_BROWSE_COMMAND = "nautilus --browser obex://[%d]"
++DEF_BROWSE_COMMAND = "/usr/libexec/blueman-open %d"
+
+ import os
+ import gettext
diff --git a/patches/source/blueman/blueman.CVE-2015-8612.diff b/patches/source/blueman/blueman.CVE-2015-8612.diff
new file mode 100644
index 000000000..163d66083
--- /dev/null
+++ b/patches/source/blueman/blueman.CVE-2015-8612.diff
@@ -0,0 +1,21 @@
+--- ./blueman/plugins/mechanism/Network.py.orig 2010-02-05 13:16:27.000000000 -0600
++++ ./blueman/plugins/mechanism/Network.py 2015-12-19 16:07:25.509562573 -0600
+@@ -22,6 +22,9 @@
+ import gobject
+ from blueman.main.NetConf import NetConf, DnsMasqHandler, DhcpdHandler
+
++DHCPDHANDLERS = {"DnsMasqHandler": DnsMasqHandler,
++ "DhcpdHandler": DhcpdHandler},
++
+ class Network(MechanismPlugin):
+ def on_load(self):
+ self.add_dbus_method(self.SetGN, in_signature="b", out_signature="", sender_keyword="caller")
+@@ -67,7 +70,7 @@
+ def EnableNetwork(self, ip_address, netmask, dhcp_handler, caller):
+ nc = NetConf.get_default()
+ nc.set_ipv4(ip_address, netmask)
+- eval("nc.set_dhcp_handler(%s)" % dhcp_handler)
++ nc.set_dhcp_handler(DHCPDHANDLERS[dhcp_handler])
+ nc.apply_settings()
+
+ def ReloadNetwork(self, caller):
diff --git a/patches/source/blueman/blueman.SlackBuild b/patches/source/blueman/blueman.SlackBuild
new file mode 100755
index 000000000..6757da5de
--- /dev/null
+++ b/patches/source/blueman/blueman.SlackBuild
@@ -0,0 +1,134 @@
+#!/bin/sh
+
+# Slackware build script for blueman
+
+# Copyright 2009 Robby Workman, Northport, Alabama, USA
+# Copyright 2010 Patrick Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=blueman
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-4_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+cd $PKGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Use blueman-open, a modified version of this, to browse obexfs shares:
+# http://www.kde-apps.org/content/show.php/kde4+bluetooth+files+open?content=108869
+zcat $CWD/blueman-use_blueman-open_for_obexfs.diff.gz | patch -p1 --verbose || exit 1
+
+zcat $CWD/blueman.CVE-2015-8612.diff.gz | patch -p1 --verbose || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./autogen.sh \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --disable-static \
+ --with-dhcp-config=/etc/dhcpd.conf \
+ --disable-hal \
+ --enable-polkit \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Add the blueman-open script to /usr/libexec for browsing obexfs shares
+# I don't want to put this in PATH and have someone accidentally run it
+mkdir -p $PKG/usr/libexec
+cat $CWD/blueman-open > $PKG/usr/libexec/blueman-open
+chmod 0755 $PKG/usr/libexec/blueman-open
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+)
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING* INSTALL NEWS README* \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -p -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/blueman/doinst.sh b/patches/source/blueman/doinst.sh
new file mode 100644
index 000000000..17b18ef35
--- /dev/null
+++ b/patches/source/blueman/doinst.sh
@@ -0,0 +1,23 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
+
diff --git a/patches/source/blueman/slack-desc b/patches/source/blueman/slack-desc
new file mode 100644
index 000000000..d9b80088d
--- /dev/null
+++ b/patches/source/blueman/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+blueman: Blueman (Graphical Bluetooth Manager)
+blueman:
+blueman: Blueman is a GTK+ Bluetooth Manager for tasks such as:
+blueman:
+blueman: - Connecting to 3G/EDGE/GPRS via DUN profile.
+blueman: - Connecting to/Creating bluetooth networks
+blueman: - Connecting to input and audio devices
+blueman: - Sending/Receiving/Browsing files via OBEX
+blueman: - Pairing
+blueman:
+blueman: Homepage: http://blueman-project.org
diff --git a/patches/source/bluez/bluez-4.99.tar.sign b/patches/source/bluez/bluez-4.99.tar.sign
new file mode 100644
index 000000000..a9a039be3
--- /dev/null
+++ b/patches/source/bluez/bluez-4.99.tar.sign
@@ -0,0 +1,17 @@
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.12 (GNU/Linux)
+
+iQIcBAABAgAGBQJPVkejAAoJEAbKn10dzyZZ0rEP/1BvYxUAoYf0cP2pQIqDwzkV
+l9PSVsxKq/n3rNwKEWBufo3heHYxVAG5prlPiY8yHj4Q0tFNiCSPL+zLObG++iDy
+3x+wxmaNaqbYurXQolHOqmH1L4OeMqT3mdzlb7xN48RLHLiS0XwTUMu2VBcM00me
+nd03q+7gV6c1v3bXrDalUJuQQYHeubSLT6YMDKmMj/7PiLfA8hEoOE1uWefcBcas
+B9xi5IBY208Cdq5odL6ae8ybvvG/PTDSFAOZNCzqIjJMYEwBosh1TbPN1AvUu1z2
+bzbgAa3oaRXnGZNDJ07pwa+2A+jAAtDRNO2R6z5lovpT568nwY6bmDIvbcIHuMHj
+xhrhbUvPnhIcn+no+WkAtYjNe8ydcdH8BkeA7o1oauRAYJlGoTIVugobu2a608NN
+7bGChWnhTPaKty8p0NGuE5gFvMwwLeE3W3d50+JH6icNBZbZOYK+88q1OI9hTHSW
+fUm/tydzqRwPDuqgt6CiYxT49AuwQ+MjfED0fwvlfta8A+tYUDkgaOkpUcJvq8v/
+Bnd0mUkT7l2fiymw7hfzJEh9EXBWmXJBs77zkYPBmzv/YDSCpMWZuEHI7gvcBu4j
+BN/+pJfYwo/kPRS0nXc/Xt438H806SUdvD926MmRwmg5jYmBRVJSemYtPHfkC03L
+MO/geWyy5aH5w/+THCgN
+=BIdO
+-----END PGP SIGNATURE-----
diff --git a/patches/source/bluez/bluez-run_udev_helper.patch b/patches/source/bluez/bluez-run_udev_helper.patch
new file mode 100644
index 000000000..a3a71e6df
--- /dev/null
+++ b/patches/source/bluez/bluez-run_udev_helper.patch
@@ -0,0 +1,14 @@
+Instead of automatically starting the bluetooth subsystem when devices
+are added, let's invoke a wrapper script in /lib/udev and have that
+wrapper check whether /etc/rc.d/rc.bluetooth is executable first.
+
+diff -Nur bluez-4.99/scripts/bluetooth.rules.in bluez-4.99.orig/scripts/bluetooth.rules.in
+--- bluez-4.99.orig/scripts/bluetooth.rules.in 2010-10-02 18:25:27.000000000 -0500
++++ bluez-4.99/scripts/bluetooth.rules.in 2013-06-27 22:05:55.572332197 -0500
+@@ -1,4 +1,4 @@
+ # Run helper every time a Bluetooth device appears
+ # On remove actions, bluetoothd should go away by itself
+-ACTION=="add", SUBSYSTEM=="bluetooth", RUN+="@prefix@/sbin/bluetoothd --udev"
+-ACTION=="change", SUBSYSTEM=="bluetooth", RUN+="@prefix@/sbin/bluetoothd --udev"
++ACTION=="add", SUBSYSTEM=="bluetooth", RUN+="/lib/udev/bluetooth.sh"
++ACTION=="change", SUBSYSTEM=="bluetooth", RUN+="/lib/udev/bluetooth.sh"
diff --git a/patches/source/bluez/bluez.CVE-2017-1000251.diff b/patches/source/bluez/bluez.CVE-2017-1000251.diff
new file mode 100644
index 000000000..8f820363d
--- /dev/null
+++ b/patches/source/bluez/bluez.CVE-2017-1000251.diff
@@ -0,0 +1,27 @@
+From 9e009647b14e810e06626dde7f1bb9ea3c375d09 Mon Sep 17 00:00:00 2001
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Date: Wed, 13 Sep 2017 10:01:40 +0300
+Subject: sdp: Fix Out-of-bounds heap read in service_search_attr_req function
+
+Check if there is enough data to continue otherwise return an error.
+---
+ src/sdpd-request.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/sdpd-request.c b/src/sdpd-request.c
+index 1eefdce..318d044 100644
+--- a/src/sdpd-request.c
++++ b/src/sdpd-request.c
+@@ -917,7 +917,7 @@ static int service_search_attr_req(sdp_req_t *req, sdp_buf_t *buf)
+ } else {
+ /* continuation State exists -> get from cache */
+ sdp_buf_t *pCache = sdp_get_cached_rsp(cstate);
+- if (pCache) {
++ if (pCache && cstate->cStateValue.maxBytesSent < pCache->data_size) {
+ uint16_t sent = MIN(max, pCache->data_size - cstate->cStateValue.maxBytesSent);
+ pResponse = pCache->data;
+ memcpy(buf->data, pResponse + cstate->cStateValue.maxBytesSent, sent);
+--
+cgit v1.1
+
+
diff --git a/patches/source/bluez/bluez.SlackBuild b/patches/source/bluez/bluez.SlackBuild
new file mode 100755
index 000000000..4b46c5869
--- /dev/null
+++ b/patches/source/bluez/bluez.SlackBuild
@@ -0,0 +1,196 @@
+#!/bin/sh
+
+# Slackware build script for bluez - http://www.bluez.org
+
+# Copyright 2009, 2010, 2011, 2012, 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=bluez
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-4_slack14.1}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/${PKGNAM}-${VERSION}.tar.xz || exit 1
+cd $PKGNAM-$VERSION
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Start bluetoothd via a wrapper script to check rc.bluetooth's +/-x first
+zcat $CWD/bluez-run_udev_helper.patch.gz | patch -p1 --verbose || exit 1
+
+# Enable the audio socket in audio.conf:
+zcat $CWD/bluez.enable.audio.socket.diff.gz | patch -p1 --verbose || exit 1
+
+# Patch CVE-2017-1000251:
+zcat $CWD/bluez.CVE-2017-1000251.diff.gz | patch -p1 --verbose || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --localstatedir=/var \
+ --enable-datafiles \
+ --enable-audio \
+ --enable-gstreamer \
+ --enable-alsa \
+ --enable-usb \
+ --enable-tools\
+ --enable-input \
+ --enable-bccmd \
+ --enable-hid2hci \
+ --enable-dfutool \
+ --enable-hidd \
+ --enable-pand \
+ --enable-dund \
+ --enable-cups \
+ --enable-service \
+ --enable-network \
+ --enable-serial \
+ --enable-health \
+ --enable-pnat \
+ --enable-maemo6 \
+ --enable-wiimote \
+ --enable-test \
+ --enable-dbusoob \
+ --with-ouifile=/usr/share/hwdata/oui.txt \
+ --disable-silent-rules \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+cp scripts/bluetooth-serial.rules $PKG/lib/udev/rules.d/97-bluetooth-serial.rules || exit 1
+cp -a scripts/bluetooth_serial $PKG/lib/udev/bluetooth_serial || exit 1
+chmod 0755 $PKG/lib/udev/bluetooth_serial
+
+mkdir -p $PKG/etc/bluetooth
+cp -a audio/audio.conf $PKG/etc/bluetooth
+cp -a input/input.conf $PKG/etc/bluetooth
+cp -a network/network.conf $PKG/etc/bluetooth
+cp -a serial/serial.conf $PKG/etc/bluetooth
+chmod 644 $PKG/etc/bluetooth/*.conf
+
+mkdir -p $PKG/etc/alsa
+mv $PKG/usr/share/alsa/bluetooth.conf $PKG/etc/alsa
+( cd $PKG/usr/share/alsa ; ln -s ../../../etc/alsa/bluetooth.conf . )
+
+# Do not overwrite configuration
+# Well, let the dbus file be overwritten, as it is not usually user-edited.
+( cd $PKG
+ for file in \
+ etc/alsa/bluetooth.conf \
+ etc/bluetooth/audio.conf \
+ etc/bluetooth/input.conf \
+ etc/bluetooth/network.conf \
+ etc/bluetooth/serial.conf \
+ etc/bluetooth/rfcomm.conf \
+ etc/bluetooth/main.conf \
+ etc/modprobe.d/bluetooth.conf ; do
+ mv ${file} ${file}.new
+ done
+)
+
+# Add the wrapper script
+cat $CWD/config/bluetooth.sh > $PKG/lib/udev/bluetooth.sh
+chmod 0755 $PKG/lib/udev/bluetooth.sh
+
+# Add an init script
+mkdir -p $PKG/etc/rc.d
+cat $CWD/config/rc.bluetooth > $PKG/etc/rc.d/rc.bluetooth.new
+
+# Compress and if needed symlink the man pages:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING* INSTALL NEWS README* \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/bluez/bluez.enable.audio.socket.diff b/patches/source/bluez/bluez.enable.audio.socket.diff
new file mode 100644
index 000000000..52b9d0c6b
--- /dev/null
+++ b/patches/source/bluez/bluez.enable.audio.socket.diff
@@ -0,0 +1,12 @@
+--- ./audio/audio.conf.orig 2010-08-25 00:10:02.000000000 -0500
++++ ./audio/audio.conf 2012-09-09 12:36:31.766492102 -0500
+@@ -4,6 +4,9 @@
+ # particular interface
+ [General]
+
++# Enable the audio socket
++Enable=Socket
++
+ # Switch to master role for incoming connections (defaults to true)
+ #Master=true
+
diff --git a/patches/source/bluez/config/bluetooth.modprobe b/patches/source/bluez/config/bluetooth.modprobe
new file mode 100644
index 000000000..3072d7885
--- /dev/null
+++ b/patches/source/bluez/config/bluetooth.modprobe
@@ -0,0 +1,3 @@
+# use "reset=1" as default, since it should be safe for recent devices and
+# solves all kind of problems.
+options btusb reset=1
diff --git a/patches/source/bluez/config/bluetooth.sh b/patches/source/bluez/config/bluetooth.sh
new file mode 100644
index 000000000..22034551c
--- /dev/null
+++ b/patches/source/bluez/config/bluetooth.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# Check whether /etc/rc.d/rc.bluetooth is executable before starting
+# the bluetooth subsystem for hotplugged bluetooth devices
+[ -x /etc/rc.d/rc.bluetooth ] && exec /usr/sbin/bluetoothd --udev
+exit 0
+
diff --git a/patches/source/bluez/config/rc.bluetooth b/patches/source/bluez/config/rc.bluetooth
new file mode 100644
index 000000000..296c45422
--- /dev/null
+++ b/patches/source/bluez/config/rc.bluetooth
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+bluez_start() {
+ /usr/sbin/bluetoothd
+}
+
+bluez_stop() {
+ udevadm trigger --subsystem-match=bluetooth --action=remove
+ pkill -TERM bluetoothd 1>/dev/null 2>/dev/null
+}
+
+case "$1" in
+ start)
+ bluez_start
+ ;;
+ stop)
+ bluez_stop
+ ;;
+ restart)
+ bluez_stop
+ sleep 1
+ bluez_start
+ ;;
+ *)
+ printf "Usage: $N {start|stop|restart}\n"
+ exit 1
+ ;;
+esac
+
diff --git a/patches/source/bluez/doinst.sh b/patches/source/bluez/doinst.sh
new file mode 100644
index 000000000..fe68ad7f4
--- /dev/null
+++ b/patches/source/bluez/doinst.sh
@@ -0,0 +1,28 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+# Keep same perms on rc.bluetooth.new:
+if [ -e etc/rc.d/rc.bluetooth ]; then
+ cp -a etc/rc.d/rc.bluetooth etc/rc.d/rc.bluetooth.new.incoming
+ cat etc/rc.d/rc.bluetooth.new > etc/rc.d/rc.bluetooth.new.incoming
+ mv etc/rc.d/rc.bluetooth.new.incoming etc/rc.d/rc.bluetooth.new
+fi
+
+config etc/rc.d/rc.bluetooth.new
+config etc/alsa/bluetooth.conf.new
+config etc/bluetooth/audio.conf.new
+config etc/bluetooth/input.conf.new
+config etc/bluetooth/main.conf.new
+config etc/bluetooth/network.conf.new
+config etc/bluetooth/serial.conf.new
+config etc/bluetooth/rfcomm.conf.new
+
diff --git a/patches/source/bluez/slack-desc b/patches/source/bluez/slack-desc
new file mode 100644
index 000000000..607fa4d96
--- /dev/null
+++ b/patches/source/bluez/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+bluez: bluez (Bluetooth libraries and utilities)
+bluez:
+bluez: Bluez is the Bluetooth stack for Linux, allowing Bluetooth adaptors
+bluez: and devices to be used with Linux. This package contains the Bluez
+bluez: libraries, utilities, and other support files.
+bluez:
+bluez: For more info, visit: http://www.bluez.org
+bluez:
+bluez:
+bluez:
+bluez:
diff --git a/patches/source/btrfs-progs/btrfs-progs.SlackBuild b/patches/source/btrfs-progs/btrfs-progs.SlackBuild
new file mode 100755
index 000000000..f02b75a0f
--- /dev/null
+++ b/patches/source/btrfs-progs/btrfs-progs.SlackBuild
@@ -0,0 +1,127 @@
+#!/bin/sh
+# Copyright 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+CWD=$(pwd)
+
+PKGNAM=btrfs-progs
+BUILD=${BUILD:-1}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Download the btrfs-progs Git head if there's no tarball:
+if ! /bin/ls $CWD/btrfs-progs*tar* 1> /dev/null 2> /dev/null ; then
+ git clone git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git
+ rm -r btrfs-progs/.git
+ tar cf btrfs-progs-$(date +%Y%m%d).tar btrfs-progs
+ xz -9 btrfs-progs-$(date +%Y%m%d).tar
+ rm -r $CWD/btrfs-progs
+fi
+
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | cut -f 3 -d - | cut -f 1 -d .)}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$TMP" = "" ]; then
+ TMP=/tmp
+fi
+PKG=$TMP/package-${PKGNAM}
+rm -rf $PKG
+mkdir -p $PKG
+
+cd $TMP
+rm -rf btrfs-progs
+tar xf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
+cd btrfs-progs
+
+# Make sure ownerships and permissions are sane:
+chown -R root:root .
+find . -perm 666 -exec chmod 644 {} \;
+find . -perm 664 -exec chmod 644 {} \;
+find . -perm 600 -exec chmod 644 {} \;
+find . -perm 444 -exec chmod 644 {} \;
+find . -perm 400 -exec chmod 644 {} \;
+find . -perm 440 -exec chmod 644 {} \;
+find . -perm 777 -exec chmod 755 {} \;
+find . -perm 775 -exec chmod 755 {} \;
+find . -perm 511 -exec chmod 755 {} \;
+find . -perm 711 -exec chmod 755 {} \;
+find . -perm 555 -exec chmod 755 {} \;
+
+# Build:
+make prefix=/usr bindir=/sbin $NUMJOBS || make prefix=/usr bindir=/sbin || exit 1
+
+# Install:
+make install prefix=/usr bindir=/sbin DESTDIR=$PKG || exit 1
+
+# Strip binaries:
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Move manpages:
+mv $PKG/usr/share/man $PKG/usr/man
+rmdir $PKG/share
+
+# Do not ship libraries.
+# If there becomes a use for these outside of btrfs-progs, let me know.
+rm -rf $PKG/usr/lib
+
+# According to https://btrfs.wiki.kernel.org/index.php/FAQ#When_will_Btrfs_have_a_fsck_like_tool.3F
+# it is not recommended to make fsck.btrfs a no-op by linking it to /bin/true:
+ln -sf /bin/true $PKG/sbin/fsck.btrfs
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+cp -a \
+ COPYING* INSTALL README* \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $TMP/package-${PKGNAM}
+makepkg -l y -c n ../${PKGNAM}-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/btrfs-progs/slack-desc b/patches/source/btrfs-progs/slack-desc
new file mode 100644
index 000000000..d53953c80
--- /dev/null
+++ b/patches/source/btrfs-progs/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler-------------------------------------------------------|
+btrfs-progs: btrfs-progs (Btrfs filesystem utilities)
+btrfs-progs:
+btrfs-progs: Btrfs is a new copy on write filesystem for Linux aimed at implementing
+btrfs-progs: advanced features while focusing on fault tolerance, repair and easy
+btrfs-progs: administration. Initially developed by Oracle, Btrfs is licensed under
+btrfs-progs: the GPL and open for contribution from anyone.
+btrfs-progs:
+btrfs-progs:
+btrfs-progs:
+btrfs-progs: Btrfs homepage: http://btrfs.wiki.kernel.org
+btrfs-progs:
diff --git a/patches/source/ca-certificates/ca-certificates.SlackBuild b/patches/source/ca-certificates/ca-certificates.SlackBuild
new file mode 100755
index 000000000..ba1be3e7d
--- /dev/null
+++ b/patches/source/ca-certificates/ca-certificates.SlackBuild
@@ -0,0 +1,91 @@
+#!/bin/sh
+
+# Slackware build script for ca-certificates
+
+# Copyright 2009,2011 Robby Workman Northport, AL, USA
+# Copyright 2012, 2013, 2015, 2016 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=ca-certificates
+VERSION=${VERSION:-20161130}
+ARCH=noarch
+BUILD=${BUILD:-1_slack14.1}
+
+TARVERSION=${VERSION}+nmu1
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG/usr/share/ca-certificates $PKG/usr/sbin
+cd $TMP
+
+# Need both $PKGNAM and $PKGNAM-$VERSION since upstream can't decide how
+# to package their tarball:
+rm -rf $PKGNAM $PKGNAM-$VERSION
+
+# Extract the tarball:
+tar xvf $CWD/${PKGNAM}_$TARVERSION.tar.?z || exit 1
+
+# Again, both $PKGNAM and $PKGNAM-$VERSION are needed here:
+cd $PKGNAM-$VERSION || cd $PKGNAM || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Obsolete?
+#zcat $CWD/patches/fixup_DESTDIR.diff.gz | patch -p1 || exit 1
+
+# Remove incompatible command operators used to call 'run-parts':
+zcat $CWD/patches/fixup_update-ca-certificates.diff.gz | patch -p1 || exit 1
+
+make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+mkdir -p $PKG/etc/ca-certificates/update.d
+printf "# Automatically generated by $PKGNAM-$VERSION \n#\n" \
+ > $PKG/etc/ca-certificates.conf.new
+( cd $PKG/usr/share/ca-certificates
+ find . -name '*.crt' | sort | cut -b3-
+) >> $PKG/etc/ca-certificates.conf.new
+
+mkdir -p $PKG/usr/man/man8
+gzip -9c sbin/update-ca-certificates.8 > \
+ $PKG/usr/man/man8/update-ca-certificates.8.gz
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+mv debian/NEWS debian/NEWS.Debian
+cp -a debian/NEWS.Debian debian/README.Debian $PKG/usr/doc/$PKGNAM-$VERSION
+
+mkdir -p $PKG/var/log/setup
+cat $CWD/setup.11.cacerts > $PKG/var/log/setup/setup.11.cacerts
+chmod 755 $PKG/var/log/setup/setup.11.cacerts
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/patches/source/ca-certificates/doinst.sh b/patches/source/ca-certificates/doinst.sh
new file mode 100644
index 000000000..cfd7d795e
--- /dev/null
+++ b/patches/source/ca-certificates/doinst.sh
@@ -0,0 +1,19 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/ca-certificates.conf.new
+
+if [ -x /usr/sbin/update-ca-certificates ]; then
+ /usr/sbin/update-ca-certificates --fresh 1> /dev/null 2> /dev/null
+fi
+
diff --git a/patches/source/ca-certificates/patches/fixup_DESTDIR.diff b/patches/source/ca-certificates/patches/fixup_DESTDIR.diff
new file mode 100644
index 000000000..964064184
--- /dev/null
+++ b/patches/source/ca-certificates/patches/fixup_DESTDIR.diff
@@ -0,0 +1,49 @@
+--- ./cacert.org/Makefile.orig
++++ ./cacert.org/Makefile
+@@ -7,6 +7,7 @@
+ clean:
+
+ install:
++ mkdir -p $(CERTSDIR)
+ for p in *.crt; do \
+ install -m 644 $$p $(CERTSDIR)/cacert.org_$$p ; \
+ done
+--- ./mozilla/Makefile.orig
++++ ./mozilla/Makefile
+@@ -9,6 +9,7 @@
+ -rm -f *.crt
+
+ install:
++ mkdir -p $(CERTSDIR)
+ for p in *.crt; do \
+ install -m 644 $$p $(CERTSDIR)/$$p ; \
+ done
+--- ./sbin/Makefile.orig
++++ ./sbin/Makefile
+@@ -8,4 +8,5 @@
+ clean:
+
+ install:
++ mkdir -p $(DESTDIR)/usr/sbin
+ install -m755 update-ca-certificates $(DESTDIR)/usr/sbin/
+--- ./Makefile.orig
++++ ./Makefile
+@@ -17,7 +17,7 @@
+
+ install:
+ for dir in $(SUBDIRS); do \
+- mkdir $(DESTDIR)/$(CERTSDIR)/$$dir; \
++ mkdir -p $(DESTDIR)/$(CERTSDIR)/$$dir; \
+ $(MAKE) -C $$dir install CERTSDIR=$(DESTDIR)/$(CERTSDIR)/$$dir; \
+ done
+ for dir in sbin; do \
+--- ./spi-inc.org/Makefile.orig
++++ ./spi-inc.org/Makefile
+@@ -7,6 +7,7 @@
+ clean:
+
+ install:
++ mkdir -p $PKG/$(CERTSDIR)
+ for p in *.crt; do \
+ install -m 644 $$p $(CERTSDIR)/$$p ; \
+ done
diff --git a/patches/source/ca-certificates/patches/fixup_update-ca-certificates.diff b/patches/source/ca-certificates/patches/fixup_update-ca-certificates.diff
new file mode 100644
index 000000000..1c3940585
--- /dev/null
+++ b/patches/source/ca-certificates/patches/fixup_update-ca-certificates.diff
@@ -0,0 +1,12 @@
+diff -urN ca-certificates-20150426.orig/sbin/update-ca-certificates ca-certificates-20150426/sbin/update-ca-certificates
+--- ca-certificates-20150426.orig/sbin/update-ca-certificates 2015-04-01 13:47:25.000000000 +0100
++++ ca-certificates-20150426/sbin/update-ca-certificates 2015-09-14 22:51:39.856021883 +0100
+@@ -193,7 +193,7 @@
+ echo "Running hooks in $HOOKSDIR..."
+ VERBOSE_ARG=
+ [ "$verbose" = 0 ] || VERBOSE_ARG="--verbose"
+- eval run-parts "$VERBOSE_ARG" --test -- "$HOOKSDIR" | while read hook
++ eval run-parts "$HOOKSDIR" | while read hook
+ do
+ ( cat "$ADDED"
+ cat "$REMOVED" ) | "$hook" || echo "E: $hook exited with code $?."
diff --git a/patches/source/ca-certificates/setup.11.cacerts b/patches/source/ca-certificates/setup.11.cacerts
new file mode 100644
index 000000000..328b61c0f
--- /dev/null
+++ b/patches/source/ca-certificates/setup.11.cacerts
@@ -0,0 +1,3 @@
+#!/bin/sh
+#BLURB="Rebuild SSL certificate database."
+chroot . usr/sbin/update-ca-certificates --fresh 1> /dev/null 2> /dev/null
diff --git a/patches/source/ca-certificates/slack-desc b/patches/source/ca-certificates/slack-desc
new file mode 100644
index 000000000..c302e8283
--- /dev/null
+++ b/patches/source/ca-certificates/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler-----------------------------------------------------|
+ca-certificates: ca-certificates (PEM Files of CA Certificates)
+ca-certificates:
+ca-certificates: This package includes PEM files of CA certificates to allow SSL-based
+ca-certificates: applications to check for the authenticity of SSL connections.
+ca-certificates:
+ca-certificates: Homepage: http://packages.qa.debian.org/c/ca-certificates.html
+ca-certificates:
+ca-certificates:
+ca-certificates:
+ca-certificates:
+ca-certificates:
diff --git a/patches/source/cairo/cairo.SlackBuild b/patches/source/cairo/cairo.SlackBuild
new file mode 100755
index 000000000..53aa34655
--- /dev/null
+++ b/patches/source/cairo/cairo.SlackBuild
@@ -0,0 +1,132 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2013, 2014 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=cairo
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+cd $PKGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --sysconfdir=/etc \
+ --disable-gtk-doc \
+ --disable-quartz \
+ --disable-static \
+ --disable-win32 \
+ --disable-trace \
+ --enable-xlib \
+ --enable-xcb \
+ --enable-ps \
+ --enable-pdf \
+ --enable-svg \
+ --enable-tee \
+ --enable-ft \
+ --enable-gl \
+ --enable-gobject \
+ --enable-xml \
+ --build=$ARCH-slackware-linux
+
+# None of these are 'stable' yet...
+# --enable-qt \
+# --enable-drm \
+
+# Not sure if these two are needed / useful yet; --enable-xcb is now default
+# --enable-xcb-shm \
+# ^^ may cause GTK+3 instability
+# --enable-xlib-xcb \
+# ^^ this one caused a GIMP slowdown
+
+# Skipping this, because it causes a dependency on the specific
+# version of binutils installed at compile time:
+# --enable-trace
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS BIBLIOGRAPHY BUGS CODING_STYLE COPYING* HACKING NEWS PORTING_GUIDE README RELEASING \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+( cd $PKG/usr/doc/$PKGNAM-$VERSION ; ln -sf /usr/share/gtk-doc/html/cairo html )
+
+# We do not need the entire NEWS file.
+if [ -r NEWS ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat NEWS | head -n 1000 > $DOCSDIR/NEWS
+ touch -r NEWS $DOCSDIR/NEWS
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/cairo/paredown.sh b/patches/source/cairo/paredown.sh
new file mode 100755
index 000000000..a24369747
--- /dev/null
+++ b/patches/source/cairo/paredown.sh
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+# Copyright 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Remove the reference PNG files from the cairo source tarball.
+# These are used only for build time testing, and cairo always fails
+# a large number of tests, making these files more or less useless to
+# the average end user. If you really need them for some reason, you
+# can fetch the original tarball from cairographics.org.
+#
+# Removing these files reduces the size of the source tarball by 93%.
+
+PKGNAM=cairo
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+
+if [ ! -r $PKGNAM-$VERSION.tar.xz ]; then
+ echo "$PKGNAM-$VERSION.tar.xz is not a cairo tarball. Exiting."
+ exit 1
+fi
+
+touch -r $PKGNAM-$VERSION.tar.xz tmp-timestamp || exit 1
+
+rm -rf $PKGNAM-$VERSION
+tar xvf $PKGNAM-$VERSION.tar.xz || exit 1
+rm -f $PKGNAM-$VERSION/test/reference/*
+rm -f $PKGNAM-$VERSION.tar.xz
+tar cvf $PKGNAM-$VERSION.tar $PKGNAM-$VERSION
+touch -r tmp-timestamp $PKGNAM-$VERSION.tar
+xz -9 -v $PKGNAM-$VERSION.tar
+rm -rf $PKGNAM-$VERSION tmp-timestamp
+
+echo "Repacking of $PKGNAM-$VERSION.tar.xz complete."
+
diff --git a/patches/source/cairo/slack-desc b/patches/source/cairo/slack-desc
new file mode 100644
index 000000000..b70ae035b
--- /dev/null
+++ b/patches/source/cairo/slack-desc
@@ -0,0 +1,20 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+cairo: cairo (graphics library used by GTK+)
+cairo:
+cairo: Cairo is a vector graphics library designed to provide high-quality
+cairo: display and print output. Cairo is designed to produce
+cairo: identical output on all output media while taking advantage of display
+cairo: hardware acceleration when available (eg. through the X Render
+cairo: Extension or OpenGL).
+cairo:
+cairo:
+cairo:
+cairo:
+
diff --git a/patches/source/cups/cups-1.5.4-usb-quirks.diff b/patches/source/cups/cups-1.5.4-usb-quirks.diff
new file mode 100644
index 000000000..dfe1dab8f
--- /dev/null
+++ b/patches/source/cups/cups-1.5.4-usb-quirks.diff
@@ -0,0 +1,319 @@
+From efe932a075744c1cfdf755ce8fea0870fc38a1c8 Mon Sep 17 00:00:00 2001
+From: mancha <mancha1@hush.com>
+Date: Wed, 9 Oct 2013
+Subject: Backport usb fixes to CUPS 1.5.4
+
+ usb-libusb.c | 152 +++++++++++++++++++++++++++++++++++++++++++++++++----------
+ 1 file changed, 127 insertions(+), 25 deletions(-)
+
+--- a/backend/usb-libusb.c 2012-07-16
++++ b/backend/usb-libusb.c 2013-10-09
+@@ -13,7 +13,7 @@
+ *
+ * Contents:
+ *
+- * list_devices() - List the available printers.
++ * list_devices() - List the available printers.
+ * print_device() - Print a file to a USB device.
+ * close_device() - Close the connection to the USB printer.
+ * find_device() - Find or enumerate USB printers.
+@@ -70,7 +70,7 @@ typedef struct usb_printer_s /**** USB
+ read_endp, /* Read endpoint */
+ protocol, /* Protocol: 1 = Uni-di, 2 = Bi-di. */
+ usblp_attached, /* "usblp" kernel module attached? */
+- opened_for_job; /* Set to 1 by print_device() */
++ reset_after_job; /* Set to 1 by print_device() */
+ unsigned int quirks; /* Quirks flags */
+ struct libusb_device_handle *handle; /* Open handle to device */
+ } usb_printer_t;
+@@ -122,6 +122,9 @@ struct quirk_printer_struct {
+ #define USBLP_QUIRK_USB_INIT 0x2 /* needs vendor USB init string */
+ #define USBLP_QUIRK_BAD_CLASS 0x4 /* descriptor uses vendor-specific
+ Class or SubClass */
++#define USBLP_QUIRK_BLACKLIST 0x8 /* these printers do not conform to the USB print spec */
++#define USBLP_QUIRK_RESET 0x4000 /* After printing do a reset
++ for clean-up */
+ #define USBLP_QUIRK_NO_REATTACH 0x8000 /* After printing we cannot re-attach
+ the usblp kernel module */
+
+@@ -139,17 +142,97 @@ static const struct quirk_printer_struct
+ { 0x0409, 0xbef4, USBLP_QUIRK_BIDIR }, /* NEC Picty760 (HP OEM) */
+ { 0x0409, 0xf0be, USBLP_QUIRK_BIDIR }, /* NEC Picty920 (HP OEM) */
+ { 0x0409, 0xf1be, USBLP_QUIRK_BIDIR }, /* NEC Picty800 (HP OEM) */
++ { 0x043d, 0x00f3, USBLP_QUIRK_NO_REATTACH }, /* Lexmark International,
++ Inc. (e250d), https://bugs.launchpad.net/bugs/1084164 */
++ { 0x043d, 0x00d7, USBLP_QUIRK_NO_REATTACH }, /* Lexmark E328 */
+ { 0x0482, 0x0010, USBLP_QUIRK_BIDIR }, /* Kyocera Mita FS 820,
+ by zut <kernel@zut.de> */
++ { 0x04a9, 0x1095, USBLP_QUIRK_BIDIR }, /* Canon, Inc. PIXMA iP6000D
++ Printer, https://bugs.launchpad.net/bugs/1160638 */
++ { 0x04a9, 0x10a2, USBLP_QUIRK_BIDIR }, /* Canon, Inc. PIXMA iP4200
++ Printer, http://www.cups.org/str.php?L4155 */
++ { 0x04a9, 0x10b6, USBLP_QUIRK_BIDIR }, /* Canon, Inc. PIXMA iP4300
++ Printer, https://bugs.launchpad.net/bugs/1032385 */
++ { 0x04a9, 0x1721, USBLP_QUIRK_BIDIR }, /* Canon, Inc. MP210
++ https://bugzilla.redhat.com/show_bug.cgi?id=847923#c53 */
++ { 0x04a9, 0x170c, USBLP_QUIRK_BIDIR }, /* Canon, Inc. MP500
++ Printer, https://bugs.launchpad.net/bugs/1032456 */
++ { 0x04a9, 0x1717, USBLP_QUIRK_BIDIR }, /* Canon, Inc. MP510
++ Printer, https://bugs.launchpad.net/bugs/1050009 */
++ { 0x04a9, 0x173d, USBLP_QUIRK_BIDIR }, /* Canon, Inc. MP550
++ Printer, http://www.cups.org/str.php?L4155 */
++ { 0x04a9, 0x173e, USBLP_QUIRK_BIDIR }, /* Canon, Inc. MP560
++ Printer, http://www.cups.org/str.php?L4155 */
++ { 0x04a9, 0x26a3, USBLP_QUIRK_NO_REATTACH }, /* Canon, Inc. MF4150
++ Printer, https://bugs.launchpad.net/bugs/1160638 */
++ { 0x04f9, 0x001a, USBLP_QUIRK_NO_REATTACH }, /* Brother Industries, Ltd
++ HL-1430 Laser Printer,
++ https://bugs.launchpad.net/bugs/1038695 */
+ { 0x04f9, 0x000d, USBLP_QUIRK_BIDIR |
+ USBLP_QUIRK_NO_REATTACH }, /* Brother Industries, Ltd
+- HL-1440 Laser Printer */
++ HL-1440 Laser Printer,
++ https://bugs.launchpad.net/bugs/1000253 */
++ { 0x04f9, 0x000e, USBLP_QUIRK_BIDIR |
++ USBLP_QUIRK_NO_REATTACH }, /* Brother Industries, Ltd
++ HL-1450 Laser Printer,
++ https://bugs.launchpad.net/bugs/1000253 */
++ { 0x06bc, 0x000b, USBLP_QUIRK_NO_REATTACH }, /* Oki Data Corp.
++ Okipage 14ex Printer,
++ https://bugs.launchpad.net/bugs/872483 */
++ { 0x06bc, 0x01c7, USBLP_QUIRK_NO_REATTACH }, /* Oki Data Corp. B410d,
++ https://bugs.launchpad.net/bugs/872483 */
++ { 0x04b8, 0x0001, USBLP_QUIRK_BIDIR |
++ USBLP_QUIRK_NO_REATTACH }, /* Seiko Epson Corp. Stylus Color 740 / Photo 750,
++ http://bugs.debian.org/697970 */
++ { 0x04b8, 0x0005, USBLP_QUIRK_NO_REATTACH }, /* Seiko Epson Corp. Stylus Color 670,
++ https://bugs.launchpad.net/bugs/872483 */
+ { 0x04b8, 0x0202, USBLP_QUIRK_BAD_CLASS }, /* Seiko Epson Receipt
+ Printer M129C */
+ { 0x067b, 0x2305, USBLP_QUIRK_BIDIR |
+- USBLP_QUIRK_NO_REATTACH },
++ USBLP_QUIRK_NO_REATTACH |
++ USBLP_QUIRK_RESET },
+ /* Prolific Technology, Inc. PL2305 Parallel Port
+- (USB -> Parallel adapter) */
++ (USB -> Parallel adapter), https://bugs.launchpad.net/bugs/987485 */
++ { 0x0924, 0x3ce9, USBLP_QUIRK_NO_REATTACH }, /* Xerox Phaser 3124
++ https://bugzilla.redhat.com/show_bug.cgi?id=867392 */
++ { 0x0924, 0x4293, USBLP_QUIRK_NO_REATTACH }, /* Xerox WorkCentre 3210
++ https://bugs.launchpad.net/bugs/1102470 */
++ { 0x1a86, 0x7584, USBLP_QUIRK_NO_REATTACH }, /* QinHeng Electronics
++ CH340S (USB -> Parallel adapter), https://bugs.launchpad.net/bugs/1000253 */
++ { 0x04e8, 0x0000, USBLP_QUIRK_RESET }, /* All Samsung devices,
++ https://bugs.launchpad.net/bugs/1032456 */
++ { 0x0a5f, 0x0000, USBLP_QUIRK_BIDIR }, /* All Zebra devices,
++ https://bugs.launchpad.net/bugs/1001028 */
++ /* Canon */
++ { 0x04a9, 0x304a, USBLP_QUIRK_BLACKLIST }, /* Canon CP-10 */
++ { 0x04a9, 0x3063, USBLP_QUIRK_BLACKLIST }, /* Canon CP-100 */
++ { 0x04a9, 0x307c, USBLP_QUIRK_BLACKLIST }, /* Canon CP-200 */
++ { 0x04a9, 0x307d, USBLP_QUIRK_BLACKLIST }, /* Canon CP-300 */
++ { 0x04a9, 0x30bd, USBLP_QUIRK_BLACKLIST }, /* Canon CP-220 */
++ { 0x04a9, 0x30be, USBLP_QUIRK_BLACKLIST }, /* Canon CP-330 */
++ { 0x04a9, 0x30f6, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP400 */
++ { 0x04a9, 0x310b, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP600 */
++ { 0x04a9, 0x3127, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP710 */
++ { 0x04a9, 0x3128, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP510 */
++ { 0x04a9, 0x3141, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES1 */
++ { 0x04a9, 0x3142, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP730 */
++ { 0x04a9, 0x3143, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP720 */
++ { 0x04a9, 0x3170, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP750 */
++ { 0x04a9, 0x3171, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP740 */
++ { 0x04a9, 0x3185, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES2 */
++ { 0x04a9, 0x3186, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES20 */
++ { 0x04a9, 0x31aa, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP770 */
++ { 0x04a9, 0x31ab, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP760 */
++ { 0x04a9, 0x31b0, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES30 */
++ { 0x04a9, 0x31dd, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP780 */
++ { 0x04a9, 0x31ee, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES40 */
++ { 0x04a9, 0x3214, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP800 */
++ { 0x04a9, 0x3255, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP900 */
++ { 0x04a9, 0x3256, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP810 */
++ { 0x04a9, 0x30F5, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP500 */
++ { 0x04a9, 0x31AF, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES3 */
++ { 0x04a9, 0x31DD, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP780 */
++ /* MISSING PIDs: CP520, CP530, CP790 */
+ { 0, 0 }
+ };
+
+@@ -256,7 +339,12 @@ print_device(const char *uri, /* I - De
+ }
+
+ g.print_fd = print_fd;
+- g.printer->opened_for_job = 1;
++
++ /*
++ * Some devices need a reset after finishing a job, these devices are
++ * marked with the USBLP_QUIRK_RESET quirk.
++ */
++ g.printer->reset_after_job = (g.printer->quirks & USBLP_QUIRK_RESET ? 1 : 0);
+
+ /*
+ * If we are printing data from a print driver on stdin, ignore SIGTERM
+@@ -639,10 +727,10 @@ print_device(const char *uri, /* I - De
+ * If it didn't exit abort the pending read and wait an additional
+ * second...
+ */
+-
++
+ if (!g.read_thread_done)
+ {
+- fputs("DEBUG: Read thread still active, aborting the pending read...\n",
++ fputs("DEBUG: Read thread still active, aborting the pending read...\n",
+ stderr);
+
+ g.wait_eof = 0;
+@@ -650,7 +738,7 @@ print_device(const char *uri, /* I - De
+ gettimeofday(&tv, NULL);
+ cond_timeout.tv_sec = tv.tv_sec + 1;
+ cond_timeout.tv_nsec = tv.tv_usec * 1000;
+-
++
+ while (!g.read_thread_done)
+ {
+ if (pthread_cond_timedwait(&g.read_thread_cond, &g.read_thread_mutex,
+@@ -663,9 +751,6 @@ print_device(const char *uri, /* I - De
+ pthread_mutex_unlock(&g.read_thread_mutex);
+ }
+
+- if (print_fd)
+- close(print_fd);
+-
+ /*
+ * Close the connection and input file and general clean up...
+ */
+@@ -725,7 +810,7 @@ close_device(usb_printer_t *printer) /*
+ */
+ if (printer->origconf > 0 && printer->origconf != number2)
+ {
+- fprintf(stderr, "DEBUG: Restoring USB device configuration: %d -> %d\n",
++ fprintf(stderr, "DEBUG: Restoring USB device configuration: %d -> %d\n",
+ number2, printer->origconf);
+ if ((errcode = libusb_set_configuration(printer->handle,
+ printer->origconf)) < 0)
+@@ -772,7 +857,7 @@ close_device(usb_printer_t *printer) /*
+ * Reset the device to clean up after the job
+ */
+
+- if (printer->opened_for_job == 1)
++ if (printer->reset_after_job == 1)
+ {
+ if ((errcode = libusb_reset_device(printer->handle)) < 0)
+ fprintf(stderr,
+@@ -815,7 +900,8 @@ find_device(usb_cb_t cb, /* I - Callb
+ /* Pointer to current alternate setting */
+ const struct libusb_endpoint_descriptor *endpptr = NULL;
+ /* Pointer to current endpoint */
+- ssize_t numdevs, /* number of connected devices */
++ ssize_t err = 0, /* Error code */
++ numdevs, /* number of connected devices */
+ i = 0;
+ uint8_t conf, /* Current configuration */
+ iface, /* Current interface */
+@@ -834,7 +920,14 @@ find_device(usb_cb_t cb, /* I - Callb
+ * Initialize libusb...
+ */
+
+- libusb_init(NULL);
++ err = libusb_init(NULL);
++ if (err)
++ {
++ fprintf(stderr, "DEBUG: Unable to initialize USB access via libusb, "
++ "libusb error %i\n", err);
++ return (NULL);
++ }
++
+ numdevs = libusb_get_device_list(NULL, &list);
+ fprintf(stderr, "DEBUG: libusb_get_device_list=%d\n", (int)numdevs);
+
+@@ -859,7 +952,14 @@ find_device(usb_cb_t cb, /* I - Callb
+ !devdesc.idProduct)
+ continue;
+
+- printer.quirks = quirks(devdesc.idVendor, devdesc.idProduct);
++ printer.quirks = quirks(devdesc.idVendor, devdesc.idProduct);
++
++ /*
++ * Ignore blacklisted printers...
++ */
++
++ if (printer.quirks & USBLP_QUIRK_BLACKLIST)
++ continue;
+
+ for (conf = 0; conf < devdesc.bNumConfigurations; conf ++)
+ {
+@@ -886,7 +986,7 @@ find_device(usb_cb_t cb, /* I - Callb
+ */
+
+ if (((altptr->bInterfaceClass != LIBUSB_CLASS_PRINTER ||
+- altptr->bInterfaceSubClass != 1) &&
++ altptr->bInterfaceSubClass != 1) &&
+ ((printer.quirks & USBLP_QUIRK_BAD_CLASS) == 0)) ||
+ (altptr->bInterfaceProtocol != 1 && /* Unidirectional */
+ altptr->bInterfaceProtocol != 2) || /* Bidirectional */
+@@ -964,7 +1064,7 @@ find_device(usb_cb_t cb, /* I - Callb
+ bEndpointAddress;
+ }
+ else
+- fprintf(stderr, "DEBUG: Uni-directional USB communication "
++ fprintf(stderr, "DEBUG: Uni-directional USB communication "
+ "only!\n");
+ printer.write_endp = confptr->interface[printer.iface].
+ altsetting[printer.altset].
+@@ -997,7 +1097,8 @@ find_device(usb_cb_t cb, /* I - Callb
+ * Clean up ....
+ */
+
+- libusb_free_device_list(list, 1);
++ if (numdevs >= 0)
++ libusb_free_device_list(list, 1);
+ libusb_exit(NULL);
+
+ return (NULL);
+@@ -1144,7 +1245,7 @@ make_device_uri(
+ if ((sern = cupsGetOption("SERIALNUMBER", num_values, values)) == NULL)
+ if ((sern = cupsGetOption("SERN", num_values, values)) == NULL)
+ if ((sern = cupsGetOption("SN", num_values, values)) == NULL &&
+- ((libusb_get_device_descriptor (printer->device, &devdesc) >= 0) &&
++ ((libusb_get_device_descriptor(printer->device, &devdesc) >= 0) &&
+ devdesc.iSerialNumber))
+ {
+ /*
+@@ -1288,7 +1389,7 @@ open_device(usb_printer_t *printer, /* I
+ }
+
+ printer->usblp_attached = 0;
+- printer->opened_for_job = 0;
++ printer->reset_after_job = 0;
+
+ if (verbose)
+ fputs("STATE: +connecting-to-device\n", stderr);
+@@ -1343,7 +1444,7 @@ open_device(usb_printer_t *printer, /* I
+
+ printer->origconf = current;
+
+- if ((errcode =
++ if ((errcode =
+ libusb_get_config_descriptor (printer->device, printer->conf, &confptr))
+ < 0)
+ {
+@@ -1355,7 +1456,7 @@ open_device(usb_printer_t *printer, /* I
+
+ if (number1 != current)
+ {
+- fprintf(stderr, "DEBUG: Switching USB device configuration: %d -> %d\n",
++ fprintf(stderr, "DEBUG: Switching USB device configuration: %d -> %d\n",
+ current, number1);
+ if ((errcode = libusb_set_configuration(printer->handle, number1)) < 0)
+ {
+@@ -1586,7 +1687,8 @@ static unsigned int quirks(int vendor, i
+ for (i = 0; quirk_printers[i].vendorId; i++)
+ {
+ if (vendor == quirk_printers[i].vendorId &&
+- product == quirk_printers[i].productId)
++ (quirk_printers[i].productId == 0x0000 ||
++ product == quirk_printers[i].productId))
+ return quirk_printers[i].quirks;
+ }
+ return 0;
diff --git a/patches/source/cups/cups-blacklist-usblp.conf b/patches/source/cups/cups-blacklist-usblp.conf
new file mode 100644
index 000000000..0ebaa9a63
--- /dev/null
+++ b/patches/source/cups/cups-blacklist-usblp.conf
@@ -0,0 +1,10 @@
+##############################################################################
+# Do not edit this file; instead, copy it to /etc/modprobe.d/ and edit that
+##############################################################################
+
+# Blacklist the (obsolete) usblp module. While the CUPS package has been
+# patched to handle if this module is loaded, there are some reports that
+# it doesn't always work. Anyway, there should be no need to have this
+# module loaded, so we'll blacklist it just in case.
+
+blacklist usblp
diff --git a/patches/source/cups/cups.SlackBuild b/patches/source/cups/cups.SlackBuild
new file mode 100755
index 000000000..71caa1087
--- /dev/null
+++ b/patches/source/cups/cups.SlackBuild
@@ -0,0 +1,203 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# CUPS build script by volkerdi@slackware.com.
+
+VERSION=1.5.4
+BUILD=${BUILD:-4_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-cups
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf cups-$VERSION
+tar xvf $CWD/cups-$VERSION-source.tar.?z* || exit 1
+cd cups-$VERSION || exit 1
+
+# Fix for CUPS 1.5.4. Don't reload the obsolete usblp module, as this
+# can cause partial printing with certain printers.
+zcat $CWD/cups-1.5.4-usb-quirks.diff.gz | patch -p1 --verbose || exit 1
+
+zcat $CWD/str4609-1.5.patch.gz | patch -p0 --verbose || exit 1
+
+sed -i.orig -e 's#$exec_prefix/lib/cups#$libdir/cups#g' configure
+./configure \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --enable-ssl \
+ --enable-openssl=yes \
+ --enable-gnutls=no \
+ --enable-cdsassl=no \
+ --docdir=/usr/doc \
+ --without-php \
+ --disable-pam \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || exit 1
+mkdir -p $PKG/etc/cups
+mkdir -p $PKG/var/spool
+make BUILDROOT=$PKG install || exit 1
+
+# Blacklist the usblp module just to make sure that it doesn't cause
+# any problems:
+mkdir -p $PKG/lib/modprobe.d
+cp -a $CWD/cups-blacklist-usblp.conf $PKG/lib/modprobe.d
+chown root:root $PKG/lib/modprobe.d/cups-blacklist-usblp.conf
+chmod 644 $PKG/lib/modprobe.d/cups-blacklist-usblp.conf
+
+# Hey, what's with the gigantic test files? Bloat is bad.
+rm -f $PKG/usr/share/cups/ipptool/*.{pdf,ps,jpg}
+
+# I've added so many things like /etc/init.d/ to Slackware that CUPS
+# is now installing init scripts to the Red Hat locations. We'll move
+# them to the usual locations:
+mkdir -p $PKG/etc/rc.d
+# Handle this as a config file, and non-executable in a default install:
+mv $PKG/etc/init.d/cups $PKG/etc/rc.d/rc.cups.new
+chmod 644 $PKG/etc/rc.d/rc.cups.new
+# Clear out the additions:
+rm -rf $PKG/etc/init.d $PKG/etc/rc{0,2,3,5}.d
+
+# I'm not sure if overwriting this blindly could have ill effects,
+# but it never hurts to play it safe. According to the dbus-daemon
+# manpage, only files ending in .conf will be used, so there won't
+# be any unintended doubling up.
+mv $PKG/etc/dbus-1/system.d/cups.conf $PKG/etc/dbus-1/system.d/cups.conf.new
+
+# For full CUPS SMB support, you'll need to install the cups-samba
+# package from the source in this directory. There's no easy way
+# to add that to a package build, and the requests aren't pouring in,
+# so you'll have to install it yourself. It's easy to do.
+
+# However, this will get you the most useful SMB support for free.
+# Thanks to Boris Kurktchiev for the tip. :-)
+( cd $PKG/usr/lib${LIBDIRSUFFIX}/cups/backend
+ if [ ! -e smb ]; then
+ ln -sf /usr/bin/smbspool smb
+ fi
+)
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Remove preformatted manpages and move the manpages to /usr/man:
+( cd $PKG/usr/share/man
+ find . -type d -name "cat*" | xargs rm -rf
+ cd ..
+ mv man ..
+)
+
+# Adjust/expand docs:
+( mkdir -p $PKG/usr/doc
+ mv $PKG/usr/share/doc/cups $PKG/usr/doc/cups-$VERSION
+ rmdir $PKG/usr/share/doc
+ cd $PKG/usr/doc
+ ln -sf cups-$VERSION cups )
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r CHANGES.txt ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat CHANGES.txt | head -n 1000 > $DOCSDIR/CHANGES.txt
+ touch -r CHANGES.txt $DOCSDIR/CHANGES.txt
+fi
+
+# I'm sorry, but PDF files are almost as bloated and annoying as
+# MS Word documents. We'll retain the HTML files in /usr/doc.
+( cd $PKG/usr/doc
+ find . -name "*.pdf" -exec rm -f {} \; )
+
+# Apply no-clobber fix to conffiles:
+( cd $PKG/etc/cups
+ for file in * ; do
+ if [ -f $file ]; then
+ mv $file $file.new
+ fi
+ done )
+
+# Strip stuff:
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Use symlinks to certain binaries so that CUPS and LPRng can coexist:
+SUFFIX=cups
+for file in \
+usr/bin/cancel \
+usr/bin/lp \
+usr/bin/lpq \
+usr/bin/lpr \
+usr/bin/lprm \
+usr/bin/lpstat \
+usr/sbin/lpc ; do
+ ( cd $PKG
+ mv ${file} ${file}-${SUFFIX}
+ ( cd `dirname ${file}` ; ln -sf `basename ${file}`-${SUFFIX} `basename ${file}` )
+ )
+done
+# Now fix the associated man pages:
+mv $PKG/usr/man/man1/cancel.1.gz $PKG/usr/man/man1/cancel-${SUFFIX}.1.gz
+mv $PKG/usr/man/man1/lp.1.gz $PKG/usr/man/man1/lp-${SUFFIX}.1.gz
+mv $PKG/usr/man/man1/lpq.1.gz $PKG/usr/man/man1/lpq-${SUFFIX}.1.gz
+mv $PKG/usr/man/man1/lpr.1.gz $PKG/usr/man/man1/lpr-${SUFFIX}.1.gz
+mv $PKG/usr/man/man1/lprm.1.gz $PKG/usr/man/man1/lprm-${SUFFIX}.1.gz
+mv $PKG/usr/man/man1/lpstat.1.gz $PKG/usr/man/man1/lpstat-${SUFFIX}.1.gz
+mv $PKG/usr/man/man8/lpc.8.gz $PKG/usr/man/man8/lpc-${SUFFIX}.8.gz
+( cd $PKG/usr/man/man1
+ ln -sf cancel-${SUFFIX}.1.gz cancel.1.gz
+ ln -sf lp-${SUFFIX}.1.gz lp.1.gz
+ ln -sf lpq-${SUFFIX}.1.gz lpq.1.gz
+ ln -sf lpr-${SUFFIX}.1.gz lpr.1.gz
+ ln -sf lprm-${SUFFIX}.1.gz lprm.1.gz
+ ln -sf lpstat-${SUFFIX}.1.gz lpstat.1.gz
+)
+( cd $PKG/usr/man/man8
+ ln -sf lpc-${SUFFIX}.8.gz lpc.8.gz
+)
+
+# Add the doinst.sh that installs the .new conffiles:
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/cups-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/cups/cups.url b/patches/source/cups/cups.url
new file mode 100644
index 000000000..fc83aeb6b
--- /dev/null
+++ b/patches/source/cups/cups.url
@@ -0,0 +1 @@
+http://ftp.easysw.com/pub/cups/1.5.4/cups-1.5.4-source.tar.bz2
diff --git a/patches/source/cups/doinst.sh b/patches/source/cups/doinst.sh
new file mode 100644
index 000000000..6807cc3ac
--- /dev/null
+++ b/patches/source/cups/doinst.sh
@@ -0,0 +1,34 @@
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+for file in etc/cups/*.new ; do
+ config $file
+done
+config etc/dbus-1/system.d/cups.conf.new
+
+# This file will just have to go. It appeared for a while during a -current
+# devel period and has never been part of a stable release.
+#config etc/modprobe.d/cups.blacklist.usblp.conf.new
+rm -f etc/modprobe.d/cups.blacklist.usblp.conf.new
+rm -f etc/modprobe.d/cups.blacklist.usblp.conf
+
+# Leave any new rc.cups with the same permissions as the old one:
+# This is a kludge, but it's because there's no --reference option
+# on busybox's 'chmod':
+if [ -e etc/rc.d/rc.cups ]; then
+ if [ -x etc/rc.d/rc.cups ]; then
+ chmod 755 etc/rc.d/rc.cups.new
+ else
+ chmod 644 etc/rc.d/rc.cups.new
+ fi
+fi
+# Then config() it:
+config etc/rc.d/rc.cups.new
diff --git a/patches/source/cups/slack-desc b/patches/source/cups/slack-desc
new file mode 100644
index 000000000..c2e1643c9
--- /dev/null
+++ b/patches/source/cups/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+cups: CUPS (Common UNIX Printing System)
+cups:
+cups: The Common UNIX Printing System provides a portable printing layer for
+cups: UNIX(R)-like operating systems. It has been developed by Easy Software
+cups: Products to promote a standard printing solution for all UNIX vendors
+cups: and users. CUPS uses the Internet Printing Protocol ("IPP") as the
+cups: basis for managing print jobs and queues. The CUPS package includes
+cups: System V and Berkeley command-line interfaces, a PostScript RIP
+cups: package for supporting non-PostScript printer drivers, and tools for
+cups: creating additional printer drivers and other CUPS services.
+cups:
diff --git a/patches/source/cups/str4609-1.5.patch b/patches/source/cups/str4609-1.5.patch
new file mode 100644
index 000000000..f0d940ead
--- /dev/null
+++ b/patches/source/cups/str4609-1.5.patch
@@ -0,0 +1,341 @@
+Index: cgi-bin/ipp-var.c
+===================================================================
+--- cgi-bin/ipp-var.c (revision 12588)
++++ cgi-bin/ipp-var.c (working copy)
+@@ -1230,21 +1230,7 @@
+ * Rewrite URIs...
+ */
+
+- if (!strcmp(name, "member_uris"))
+- {
+- char url[1024]; /* URL for class member... */
+-
+-
+- cgiRewriteURL(attr->values[i].string.text, url,
+- sizeof(url), NULL);
+-
+- snprintf(valptr, sizeof(value) - (valptr - value),
+- "<A HREF=\"%s\">%s</A>", url,
+- strrchr(attr->values[i].string.text, '/') + 1);
+- }
+- else
+- cgiRewriteURL(attr->values[i].string.text, valptr,
+- sizeof(value) - (valptr - value), NULL);
++ cgiRewriteURL(attr->values[i].string.text, valptr, sizeof(value) - (valptr - value), NULL);
+ break;
+ }
+
+Index: cgi-bin/template.c
+===================================================================
+--- cgi-bin/template.c (revision 12588)
++++ cgi-bin/template.c (working copy)
+@@ -659,39 +659,7 @@
+ while (*s)
+ {
+ if (*s == '<')
+- {
+- /*
+- * Pass <A HREF="url"> and </A>, otherwise quote it...
+- */
+-
+- if (!_cups_strncasecmp(s, "<A HREF=\"", 9))
+- {
+- fputs("<A HREF=\"", out);
+- s += 9;
+-
+- while (*s && *s != '\"')
+- {
+- if (*s == '&')
+- fputs("&amp;", out);
+- else
+- putc(*s, out);
+-
+- s ++;
+- }
+-
+- if (*s)
+- s ++;
+-
+- fputs("\">", out);
+- }
+- else if (!_cups_strncasecmp(s, "</A>", 4))
+- {
+- fputs("</A>", out);
+- s += 3;
+- }
+- else
+- fputs("&lt;", out);
+- }
++ fputs("&lt;", out);
+ else if (*s == '>')
+ fputs("&gt;", out);
+ else if (*s == '\"')
+Index: scheduler/ipp.c
+===================================================================
+--- scheduler/ipp.c (revision 12588)
++++ scheduler/ipp.c (working copy)
+@@ -509,8 +509,8 @@
+ * Remote unauthenticated user masquerading as local root...
+ */
+
+- _cupsStrFree(username->values[0].string.text);
+- username->values[0].string.text = _cupsStrAlloc(RemoteRoot);
++ _cupsStrFree(username->values[0].string.text);
++ username->values[0].string.text = _cupsStrAlloc(RemoteRoot);
+ }
+ }
+
+@@ -1648,7 +1648,10 @@
+ cupsdSetString(&job->username, con->username);
+
+ if (attr)
+- cupsdSetString(&attr->values[0].string.text, con->username);
++ {
++ _cupsStrFree(attr->values[0].string.text);
++ attr->values[0].string.text = _cupsStrAlloc(con->username);
++ }
+ }
+ else if (attr)
+ {
+@@ -1699,48 +1702,11 @@
+ * Also, we can only have 1 value and it must be a name value.
+ */
+
+- switch (attr->value_tag)
+- {
+- case IPP_TAG_STRING :
+- case IPP_TAG_TEXTLANG :
+- case IPP_TAG_NAMELANG :
+- case IPP_TAG_TEXT :
+- case IPP_TAG_NAME :
+- case IPP_TAG_KEYWORD :
+- case IPP_TAG_URI :
+- case IPP_TAG_URISCHEME :
+- case IPP_TAG_CHARSET :
+- case IPP_TAG_LANGUAGE :
+- case IPP_TAG_MIMETYPE :
+- /*
+- * Free old strings...
+- */
+-
+- for (i = 0; i < attr->num_values; i ++)
+- {
+- _cupsStrFree(attr->values[i].string.text);
+- attr->values[i].string.text = NULL;
+- if (attr->values[i].string.charset)
+- {
+- _cupsStrFree(attr->values[i].string.charset);
+- attr->values[i].string.charset = NULL;
+- }
+- }
+-
+- default :
+- break;
+- }
+-
+- /*
+- * Use the default connection hostname instead...
+- */
+-
+- attr->value_tag = IPP_TAG_NAME;
+- attr->num_values = 1;
+- attr->values[0].string.text = _cupsStrAlloc(con->http.hostname);
++ ippDeleteAttribute(job->attrs, attr);
++ ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_NAME, "job-originating-host-name", NULL, con->http.hostname);
+ }
+-
+- attr->group_tag = IPP_TAG_JOB;
++ else
++ attr->group_tag = IPP_TAG_JOB;
+ }
+ else
+ {
+@@ -1832,8 +1798,8 @@
+
+ attr = ippAddStrings(job->attrs, IPP_TAG_JOB, IPP_TAG_NAME, "job-sheets",
+ 2, NULL, NULL);
+- attr->values[0].string.text = _cupsStrRetain(printer->job_sheets[0]);
+- attr->values[1].string.text = _cupsStrRetain(printer->job_sheets[1]);
++ attr->values[0].string.text = _cupsStrAlloc(printer->job_sheets[0]);
++ attr->values[1].string.text = _cupsStrAlloc(printer->job_sheets[1]);
+ }
+
+ job->job_sheets = attr;
+@@ -1859,7 +1825,8 @@
+ * Force the leading banner to have the classification on it...
+ */
+
+- cupsdSetString(&attr->values[0].string.text, Classification);
++ _cupsStrFree(attr->values[0].string.text);
++ attr->values[0].string.text = _cupsStrAlloc(Classification);
+
+ cupsdLogJob(job, CUPSD_LOG_NOTICE, "CLASSIFICATION FORCED "
+ "job-sheets=\"%s,none\", "
+@@ -1876,7 +1843,8 @@
+ * Can't put two different security markings on the same document!
+ */
+
+- cupsdSetString(&attr->values[1].string.text, attr->values[0].string.text);
++ _cupsStrFree(attr->values[1].string.text);
++ attr->values[1].string.text = _cupsStrAlloc(attr->values[0].string.text);
+
+ cupsdLogJob(job, CUPSD_LOG_NOTICE, "CLASSIFICATION FORCED "
+ "job-sheets=\"%s,%s\", "
+@@ -1916,18 +1884,26 @@
+ if (attr->num_values > 1 &&
+ !strcmp(attr->values[0].string.text, attr->values[1].string.text))
+ {
+- cupsdSetString(&(attr->values[0].string.text), Classification);
+- cupsdSetString(&(attr->values[1].string.text), Classification);
++ _cupsStrFree(attr->values[0].string.text);
++ attr->values[0].string.text = _cupsStrAlloc(Classification);
++ _cupsStrFree(attr->values[1].string.text);
++ attr->values[1].string.text = _cupsStrAlloc(Classification);
+ }
+ else
+ {
+ if (attr->num_values == 1 ||
+ strcmp(attr->values[0].string.text, "none"))
+- cupsdSetString(&(attr->values[0].string.text), Classification);
++ {
++ _cupsStrFree(attr->values[0].string.text);
++ attr->values[0].string.text = _cupsStrAlloc(Classification);
++ }
+
+ if (attr->num_values > 1 &&
+ strcmp(attr->values[1].string.text, "none"))
+- cupsdSetString(&(attr->values[1].string.text), Classification);
++ {
++ _cupsStrFree(attr->values[1].string.text);
++ attr->values[1].string.text = _cupsStrAlloc(Classification);
++ }
+ }
+
+ if (attr->num_values > 1)
+@@ -4150,7 +4126,8 @@
+ if (attr)
+ {
+ attr->value_tag = IPP_TAG_KEYWORD;
+- cupsdSetString(&(attr->values[0].string.text), "no-hold");
++ _cupsStrFree(attr->values[0].string.text);
++ attr->values[0].string.text = _cupsStrAlloc("no-hold");
+ }
+
+ /*
+@@ -9491,7 +9468,6 @@
+ if (format)
+ {
+ _cupsStrFree(format->values[0].string.text);
+-
+ format->values[0].string.text = _cupsStrAlloc(mimetype);
+ }
+ else
+@@ -10028,9 +10004,8 @@
+
+ if (attr)
+ {
++ attr->value_tag = IPP_TAG_KEYWORD;
+ _cupsStrFree(attr->values[0].string.text);
+-
+- attr->value_tag = IPP_TAG_KEYWORD;
+ attr->values[0].string.text = _cupsStrAlloc("no-hold");
+
+ cupsdAddEvent(CUPSD_EVENT_JOB_CONFIG_CHANGED, cupsdFindDest(job->dest), job,
+@@ -10719,7 +10694,6 @@
+ IPP_TAG_MIMETYPE)) != NULL)
+ {
+ _cupsStrFree(jformat->values[0].string.text);
+-
+ jformat->values[0].string.text = _cupsStrAlloc(mimetype);
+ }
+ else
+Index: scheduler/job.c
+===================================================================
+--- scheduler/job.c (revision 12588)
++++ scheduler/job.c (working copy)
+@@ -406,7 +406,10 @@
+
+ if ((attr = ippFindAttribute(job->attrs, "job-actual-printer-uri",
+ IPP_TAG_URI)) != NULL)
+- cupsdSetString(&attr->values[0].string.text, printer->uri);
++ {
++ _cupsStrFree(attr->values[0].string.text);
++ attr->values[0].string.text = _cupsStrAlloc(printer->uri);
++ }
+ else
+ ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_URI,
+ "job-actual-printer-uri", NULL, printer->uri);
+@@ -1846,7 +1849,7 @@
+ }
+ else if (i >= (int)(sizeof(job->auth_env) / sizeof(job->auth_env[0])))
+ break;
+-
++
+ if (!strcmp(line, "username"))
+ cupsdSetStringf(job->auth_env + i, "AUTH_USERNAME=%s", data);
+ else if (!strcmp(line, "domain"))
+@@ -1950,7 +1953,10 @@
+
+ if ((attr = ippFindAttribute(job->attrs, "job-printer-uri",
+ IPP_TAG_URI)) != NULL)
+- cupsdSetString(&(attr->values[0].string.text), p->uri);
++ {
++ _cupsStrFree(attr->values[0].string.text);
++ attr->values[0].string.text = _cupsStrAlloc(p->uri);
++ }
+
+ cupsdAddEvent(CUPSD_EVENT_JOB_STOPPED, p, job,
+ "Job #%d moved from %s to %s.", job->id, olddest,
+@@ -2153,7 +2159,10 @@
+ attr = ippFindAttribute(job->attrs, "job-hold-until", IPP_TAG_NAME);
+
+ if (attr)
+- cupsdSetString(&(attr->values[0].string.text), when);
++ {
++ _cupsStrFree(attr->values[0].string.text);
++ attr->values[0].string.text = _cupsStrAlloc(when);
++ }
+ else
+ attr = ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_KEYWORD,
+ "job-hold-until", NULL, when);
+@@ -2399,7 +2408,8 @@
+ if (attr)
+ {
+ attr->value_tag = IPP_TAG_KEYWORD;
+- cupsdSetString(&(attr->values[0].string.text), "no-hold");
++ _cupsStrFree(attr->values[0].string.text);
++ attr->values[0].string.text = _cupsStrAlloc("no-hold");
+ }
+
+ default :
+@@ -4146,7 +4156,10 @@
+ "job-printer-state-message",
+ IPP_TAG_TEXT);
+ if (job->printer_message)
+- cupsdSetString(&(job->printer_message->values[0].string.text), "");
++ {
++ _cupsStrFree(job->printer_message->values[0].string.text);
++ job->printer_message->values[0].string.text = _cupsStrAlloc("");
++ }
+
+ cupsdSetJobState(job, IPP_JOB_PROCESSING, CUPSD_JOB_DEFAULT, NULL);
+ cupsdSetPrinterState(printer, IPP_PRINTER_PROCESSING, 0);
+@@ -4708,10 +4721,15 @@
+
+ if (job->state_value != IPP_JOB_PROCESSING &&
+ job->status_level == CUPSD_LOG_INFO)
+- cupsdSetString(&(job->printer_message->values[0].string.text), "");
++ {
++ _cupsStrFree(job->printer_message->values[0].string.text);
++ job->printer_message->values[0].string.text = _cupsStrAlloc("");
++ }
+ else if (job->printer->state_message[0] && do_message)
+- cupsdSetString(&(job->printer_message->values[0].string.text),
+- job->printer->state_message);
++ {
++ _cupsStrFree(job->printer_message->values[0].string.text);
++ job->printer_message->values[0].string.text = _cupsStrAlloc(job->printer->state_message);
++ }
+
+ /*
+ * ... and the printer-state-reasons value...
diff --git a/patches/source/curl/cacert-fetch.sh b/patches/source/curl/cacert-fetch.sh
new file mode 100755
index 000000000..d0f156e2d
--- /dev/null
+++ b/patches/source/curl/cacert-fetch.sh
@@ -0,0 +1 @@
+lftpget http://curl.haxx.se/ca/cacert.pem && rm cacert.pem.bz2 && bzip2 -9 cacert.pem
diff --git a/patches/source/curl/cacert.pem b/patches/source/curl/cacert.pem
new file mode 100644
index 000000000..45654c0b9
--- /dev/null
+++ b/patches/source/curl/cacert.pem
@@ -0,0 +1,3338 @@
+##
+## Bundle of CA Root Certificates
+##
+## Certificate data from Mozilla as of: Wed Mar 7 04:12:06 2018 GMT
+##
+## This is a bundle of X.509 certificates of public Certificate Authorities
+## (CA). These were automatically extracted from Mozilla's root certificates
+## file (certdata.txt). This file can be found in the mozilla source tree:
+## https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt
+##
+## It contains the certificates in PEM format and therefore
+## can be directly used with curl / libcurl / php_curl, or with
+## an Apache+mod_ssl webserver for SSL client authentication.
+## Just configure this file as the SSLCACertificateFile.
+##
+## Conversion done with mk-ca-bundle.pl version 1.27.
+## SHA256: 704f02707ec6b4c4a7597a8c6039b020def11e64f3ef0605a9c3543d48038a57
+##
+
+
+GlobalSign Root CA
+==================
+-----BEGIN CERTIFICATE-----
+MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkGA1UEBhMCQkUx
+GTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jvb3QgQ0ExGzAZBgNVBAMTEkds
+b2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAwMDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNV
+BAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYD
+VQQDExJHbG9iYWxTaWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDa
+DuaZjc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavpxy0Sy6sc
+THAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp1Wrjsok6Vjk4bwY8iGlb
+Kk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdGsnUOhugZitVtbNV4FpWi6cgKOOvyJBNP
+c1STE4U6G7weNLWLBYy5d4ux2x8gkasJU26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrX
+gzT/LCrBbBlDSgeF59N89iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV
+HRMBAf8EBTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0BAQUF
+AAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOzyj1hTdNGCbM+w6Dj
+Y1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE38NflNUVyRRBnMRddWQVDf9VMOyG
+j/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymPAbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhH
+hm4qxFYxldBniYUr+WymXUadDKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveC
+X4XSQRjbgbMEHMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A==
+-----END CERTIFICATE-----
+
+GlobalSign Root CA - R2
+=======================
+-----BEGIN CERTIFICATE-----
+MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4GA1UECxMXR2xv
+YmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh
+bFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT
+aWduIFJvb3QgQ0EgLSBSMjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln
+bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6
+ErPLv4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8eoLrvozp
+s6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklqtTleiDTsvHgMCJiEbKjN
+S7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzdC9XZzPnqJworc5HGnRusyMvo4KD0L5CL
+TfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pazq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6C
+ygPCm48CAwEAAaOBnDCBmTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4E
+FgQUm+IHV2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5nbG9i
+YWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG3lm0mi3f3BmGLjAN
+BgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4GsJ0/WwbgcQ3izDJr86iw8bmEbTUsp
+9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu
+01yiPqFbQfXf5WRDLenVOavSot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG7
+9G+dwfCMNYxdAfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7
+TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg==
+-----END CERTIFICATE-----
+
+Verisign Class 3 Public Primary Certification Authority - G3
+============================================================
+-----BEGIN CERTIFICATE-----
+MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV
+UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
+cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
+IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh
+dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy
+dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv
+cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkg
+Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBAMu6nFL8eB8aHm8bN3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1
+EUGO+i2tKmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGukxUc
+cLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBmCC+Vk7+qRy+oRpfw
+EuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJXwzw3sJ2zq/3avL6QaaiMxTJ5Xpj
+055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWuimi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA
+ERSWwauSCPc/L8my/uRan2Te2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5f
+j267Cz3qWhMeDGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC
+/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565pF4ErWjfJXir0
+xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGtTxzhT5yvDwyd93gN2PQ1VoDa
+t20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ==
+-----END CERTIFICATE-----
+
+Entrust.net Premium 2048 Secure Server CA
+=========================================
+-----BEGIN CERTIFICATE-----
+MIIEKjCCAxKgAwIBAgIEOGPe+DANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChMLRW50cnVzdC5u
+ZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBpbmNvcnAuIGJ5IHJlZi4gKGxp
+bWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNV
+BAMTKkVudHJ1c3QubmV0IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQx
+NzUwNTFaFw0yOTA3MjQxNDE1MTJaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3
+d3d3LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTEl
+MCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEGA1UEAxMqRW50cnVzdC5u
+ZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgpMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
+MIIBCgKCAQEArU1LqRKGsuqjIAcVFmQqK0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOL
+Gp18EzoOH1u3Hs/lJBQesYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSr
+hRSGlVuXMlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVTXTzW
+nLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/HoZdenoVve8AjhUi
+VBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH4QIDAQABo0IwQDAOBgNVHQ8BAf8E
+BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUVeSB0RGAvtiJuQijMfmhJAkWuXAwDQYJ
+KoZIhvcNAQEFBQADggEBADubj1abMOdTmXx6eadNl9cZlZD7Bh/KM3xGY4+WZiT6QBshJ8rmcnPy
+T/4xmf3IDExoU8aAghOY+rat2l098c5u9hURlIIM7j+VrxGrD9cv3h8Dj1csHsm7mhpElesYT6Yf
+zX1XEC+bBAlahLVu2B064dae0Wx5XnkcFMXj0EyTO2U87d89vqbllRrDtRnDvV5bu/8j72gZyxKT
+J1wDLW8w0B62GqzeWvfRqqgnpv55gcR5mTNXuhKwqeBCbJPKVt7+bYQLCIt+jerXmCHG8+c8eS9e
+nNFMFY3h7CI3zJpDC5fcgJCNs2ebb0gIFVbPv/ErfF6adulZkMV8gzURZVE=
+-----END CERTIFICATE-----
+
+Baltimore CyberTrust Root
+=========================
+-----BEGIN CERTIFICATE-----
+MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJRTESMBAGA1UE
+ChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlCYWx0aW1vcmUgQ3li
+ZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoXDTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMC
+SUUxEjAQBgNVBAoTCUJhbHRpbW9yZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFs
+dGltb3JlIEN5YmVyVHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKME
+uyKrmD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjrIZ3AQSsB
+UnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeKmpYcqWe4PwzV9/lSEy/C
+G9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSuXmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9
+XbIGevOF6uvUA65ehD5f/xXtabz5OTZydc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjpr
+l3RjM71oGDHweI12v/yejl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoI
+VDaGezq1BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEB
+BQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT929hkTI7gQCvlYpNRh
+cL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3WgxjkzSswF07r51XgdIGn9w/xZchMB5
+hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsa
+Y71k5h+3zvDyny67G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9H
+RCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp
+-----END CERTIFICATE-----
+
+AddTrust External Root
+======================
+-----BEGIN CERTIFICATE-----
+MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEUMBIGA1UEChML
+QWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYD
+VQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEw
+NDgzOFowbzELMAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRU
+cnVzdCBFeHRlcm5hbCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0Eg
+Um9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvtH7xsD821
++iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9uMq/NzgtHj6RQa1wVsfw
+Tz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzXmk6vBbOmcZSccbNQYArHE504B4YCqOmo
+aSYYkKtMsE8jqzpPhNjfzp/haW+710LXa0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy
+2xSoRcRdKn23tNbE7qzNE0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv7
+7+ldU9U0WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYDVR0P
+BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0Jvf6xCZU7wO94CTL
+VBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEmMCQGA1UECxMdQWRk
+VHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsxIjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENB
+IFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZl
+j7DYd7usQWxHYINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5
+6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvCNr4TDea9Y355
+e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEXc4g/VhsxOBi0cQ+azcgOno4u
+G+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5amnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=
+-----END CERTIFICATE-----
+
+Entrust Root Certification Authority
+====================================
+-----BEGIN CERTIFICATE-----
+MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMCVVMxFjAUBgNV
+BAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0Lm5ldC9DUFMgaXMgaW5jb3Jw
+b3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMWKGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsG
+A1UEAxMkRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0
+MloXDTI2MTEyNzIwNTM0MlowgbAxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMu
+MTkwNwYDVQQLEzB3d3cuZW50cnVzdC5uZXQvQ1BTIGlzIGluY29ycG9yYXRlZCBieSByZWZlcmVu
+Y2UxHzAdBgNVBAsTFihjKSAyMDA2IEVudHJ1c3QsIEluYy4xLTArBgNVBAMTJEVudHJ1c3QgUm9v
+dCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
+ALaVtkNC+sZtKm9I35RMOVcF7sN5EUFoNu3s/poBj6E4KPz3EEZmLk0eGrEaTsbRwJWIsMn/MYsz
+A9u3g3s+IIRe7bJWKKf44LlAcTfFy0cOlypowCKVYhXbR9n10Cv/gkvJrT7eTNuQgFA/CYqEAOww
+Cj0Yzfv9KlmaI5UXLEWeH25DeW0MXJj+SKfFI0dcXv1u5x609mhF0YaDW6KKjbHjKYD+JXGIrb68
+j6xSlkuqUY3kEzEZ6E5Nn9uss2rVvDlUccp6en+Q3X0dgNmBu1kmwhH+5pPi94DkZfs0Nw4pgHBN
+rziGLp5/V6+eF67rHMsoIV+2HNjnogQi+dPa2MsCAwEAAaOBsDCBrTAOBgNVHQ8BAf8EBAMCAQYw
+DwYDVR0TAQH/BAUwAwEB/zArBgNVHRAEJDAigA8yMDA2MTEyNzIwMjM0MlqBDzIwMjYxMTI3MjA1
+MzQyWjAfBgNVHSMEGDAWgBRokORnpKZTgMeGZqTx90tD+4S9bTAdBgNVHQ4EFgQUaJDkZ6SmU4DH
+hmak8fdLQ/uEvW0wHQYJKoZIhvZ9B0EABBAwDhsIVjcuMTo0LjADAgSQMA0GCSqGSIb3DQEBBQUA
+A4IBAQCT1DCw1wMgKtD5Y+iRDAUgqV8ZyntyTtSx29CW+1RaGSwMCPeyvIWonX9tO1KzKtvn1ISM
+Y/YPyyYBkVBs9F8U4pN0wBOeMDpQ47RgxRzwIkSNcUesyBrJ6ZuaAGAT/3B+XxFNSRuzFVJ7yVTa
+v52Vr2ua2J7p8eRDjeIRRDq/r72DQnNSi6q7pynP9WQcCk3RvKqsnyrQ/39/2n3qse0wJcGE2jTS
+W3iDVuycNsMm4hH2Z0kdkquM++v/eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0
+tHuu2guQOHXvgR1m0vdXcDazv/wor3ElhVsT/h5/WrQ8
+-----END CERTIFICATE-----
+
+GeoTrust Global CA
+==================
+-----BEGIN CERTIFICATE-----
+MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVTMRYwFAYDVQQK
+Ew1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9iYWwgQ0EwHhcNMDIwNTIxMDQw
+MDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5j
+LjEbMBkGA1UEAxMSR2VvVHJ1c3QgR2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
+CgKCAQEA2swYYzD99BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjo
+BbdqfnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDviS2Aelet
+8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU1XupGc1V3sjs0l44U+Vc
+T4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+bw8HHa8sHo9gOeL6NlMTOdReJivbPagU
+vTLrGAMoUgRx5aszPeE4uwc2hGKceeoWMPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTAD
+AQH/MB0GA1UdDgQWBBTAephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVk
+DBF9qn1luMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKInZ57Q
+zxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfStQWVYrmm3ok9Nns4
+d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcFPseKUgzbFbS9bZvlxrFUaKnjaZC2
+mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Unhw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6p
+XE0zX5IJL4hmXXeXxx12E6nV5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvm
+Mw==
+-----END CERTIFICATE-----
+
+GeoTrust Universal CA
+=====================
+-----BEGIN CERTIFICATE-----
+MIIFaDCCA1CgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN
+R2VvVHJ1c3QgSW5jLjEeMBwGA1UEAxMVR2VvVHJ1c3QgVW5pdmVyc2FsIENBMB4XDTA0MDMwNDA1
+MDAwMFoXDTI5MDMwNDA1MDAwMFowRTELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IElu
+Yy4xHjAcBgNVBAMTFUdlb1RydXN0IFVuaXZlcnNhbCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIP
+ADCCAgoCggIBAKYVVaCjxuAfjJ0hUNfBvitbtaSeodlyWL0AG0y/YckUHUWCq8YdgNY96xCcOq9t
+JPi8cQGeBvV8Xx7BDlXKg5pZMK4ZyzBIle0iN430SppyZj6tlcDgFgDgEB8rMQ7XlFTTQjOgNB0e
+RXbdT8oYN+yFFXoZCPzVx5zw8qkuEKmS5j1YPakWaDwvdSEYfyh3peFhF7em6fgemdtzbvQKoiFs
+7tqqhZJmr/Z6a4LauiIINQ/PQvE1+mrufislzDoR5G2vc7J2Ha3QsnhnGqQ5HFELZ1aD/ThdDc7d
+8Lsrlh/eezJS/R27tQahsiFepdaVaH/wmZ7cRQg+59IJDTWU3YBOU5fXtQlEIGQWFwMCTFMNaN7V
+qnJNk22CDtucvc+081xdVHppCZbW2xHBjXWotM85yM48vCR85mLK4b19p71XZQvk/iXttmkQ3Cga
+Rr0BHdCXteGYO8A3ZNY9lO4L4fUorgtWv3GLIylBjobFS1J72HGrH4oVpjuDWtdYAVHGTEHZf9hB
+Z3KiKN9gg6meyHv8U3NyWfWTehd2Ds735VzZC1U0oqpbtWpU5xPKV+yXbfReBi9Fi1jUIxaS5BZu
+KGNZMN9QAZxjiRqf2xeUgnA3wySemkfWWspOqGmJch+RbNt+nhutxx9z3SxPGWX9f5NAEC7S8O08
+ni4oPmkmM8V7AgMBAAGjYzBhMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNq7LqqwDLiIJlF0
+XG0D08DYj3rWMB8GA1UdIwQYMBaAFNq7LqqwDLiIJlF0XG0D08DYj3rWMA4GA1UdDwEB/wQEAwIB
+hjANBgkqhkiG9w0BAQUFAAOCAgEAMXjmx7XfuJRAyXHEqDXsRh3ChfMoWIawC/yOsjmPRFWrZIRc
+aanQmjg8+uUfNeVE44B5lGiku8SfPeE0zTBGi1QrlaXv9z+ZhP015s8xxtxqv6fXIwjhmF7DWgh2
+qaavdy+3YL1ERmrvl/9zlcGO6JP7/TG37FcREUWbMPEaiDnBTzynANXH/KttgCJwpQzgXQQpAvvL
+oJHRfNbDflDVnVi+QTjruXU8FdmbyUqDWcDaU/0zuzYYm4UPFd3uLax2k7nZAY1IEKj79TiG8dsK
+xr2EoyNB3tZ3b4XUhRxQ4K5RirqNPnbiucon8l+f725ZDQbYKxek0nxru18UGkiPGkzns0ccjkxF
+KyDuSN/n3QmOGKjaQI2SJhFTYXNd673nxE0pN2HrrDktZy4W1vUAg4WhzH92xH3kt0tm7wNFYGm2
+DFKWkoRepqO1pD4r2czYG0eq8kTaT/kD6PAUyz/zg97QwVTjt+gKN02LIFkDMBmhLMi9ER/frslK
+xfMnZmaGrGiR/9nmUxwPi1xpZQomyB40w11Re9epnAahNt3ViZS82eQtDF4JbAiXfKM9fJP/P6EU
+p8+1Xevb2xzEdt+Iub1FBZUbrvxGakyvSOPOrg/SfuvmbJxPgWp6ZKy7PtXny3YuxadIwVyQD8vI
+P/rmMuGNG2+k5o7Y+SlIis5z/iw=
+-----END CERTIFICATE-----
+
+GeoTrust Universal CA 2
+=======================
+-----BEGIN CERTIFICATE-----
+MIIFbDCCA1SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBHMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN
+R2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVyc2FsIENBIDIwHhcNMDQwMzA0
+MDUwMDAwWhcNMjkwMzA0MDUwMDAwWjBHMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3Qg
+SW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVyc2FsIENBIDIwggIiMA0GCSqGSIb3DQEBAQUA
+A4ICDwAwggIKAoICAQCzVFLByT7y2dyxUxpZKeexw0Uo5dfR7cXFS6GqdHtXr0om/Nj1XqduGdt0
+DE81WzILAePb63p3NeqqWuDW6KFXlPCQo3RWlEQwAx5cTiuFJnSCegx2oG9NzkEtoBUGFF+3Qs17
+j1hhNNwqCPkuwwGmIkQcTAeC5lvO0Ep8BNMZcyfwqph/Lq9O64ceJHdqXbboW0W63MOhBW9Wjo8Q
+JqVJwy7XQYci4E+GymC16qFjwAGXEHm9ADwSbSsVsaxLse4YuU6W3Nx2/zu+z18DwPw76L5GG//a
+QMJS9/7jOvdqdzXQ2o3rXhhqMcceujwbKNZrVMaqW9eiLBsZzKIC9ptZvTdrhrVtgrrY6slWvKk2
+WP0+GfPtDCapkzj4T8FdIgbQl+rhrcZV4IErKIM6+vR7IVEAvlI4zs1meaj0gVbi0IMJR1FbUGrP
+20gaXT73y/Zl92zxlfgCOzJWgjl6W70viRu/obTo/3+NjN8D8WBOWBFM66M/ECuDmgFz2ZRthAAn
+ZqzwcEAJQpKtT5MNYQlRJNiS1QuUYbKHsu3/mjX/hVTK7URDrBs8FmtISgocQIgfksILAAX/8sgC
+SqSqqcyZlpwvWOB94b67B9xfBHJcMTTD7F8t4D1kkCLm0ey4Lt1ZrtmhN79UNdxzMk+MBB4zsslG
+8dhcyFVQyWi9qLo2CQIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBR281Xh+qQ2
++/CfXGJx7Tz0RzgQKzAfBgNVHSMEGDAWgBR281Xh+qQ2+/CfXGJx7Tz0RzgQKzAOBgNVHQ8BAf8E
+BAMCAYYwDQYJKoZIhvcNAQEFBQADggIBAGbBxiPz2eAubl/oz66wsCVNK/g7WJtAJDday6sWSf+z
+dXkzoS9tcBc0kf5nfo/sm+VegqlVHy/c1FEHEv6sFj4sNcZj/NwQ6w2jqtB8zNHQL1EuxBRa3ugZ
+4T7GzKQp5y6EqgYweHZUcyiYWTjgAA1i00J9IZ+uPTqM1fp3DRgrFg5fNuH8KrUwJM/gYwx7WBr+
+mbpCErGR9Hxo4sjoryzqyX6uuyo9DRXcNJW2GHSoag/HtPQTxORb7QrSpJdMKu0vbBKJPfEncKpq
+A1Ihn0CoZ1Dy81of398j9tx4TuaYT1U6U+Pv8vSfx3zYWK8pIpe44L2RLrB27FcRz+8pRPPphXpg
+Y+RdM4kX2TGq2tbzGDVyz4crL2MjhF2EjD9XoIj8mZEoJmmZ1I+XRL6O1UixpCgp8RW04eWe3fiP
+pm8m1wk8OhwRDqZsN/etRIcsKMfYdIKz0G9KV7s1KSegi+ghp4dkNl3M2Basx7InQJJVOCiNUW7d
+FGdTbHFcJoRNdVq2fmBWqU2t+5sel/MN2dKXVHfaPRK34B7vCAas+YWH6aLcr34YEoP9VhdBLtUp
+gn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwXQMAJKOSLakhT2+zNVVXxxvjpoixMptEm
+X36vWkzaH6byHCx+rgIW0lbQL1dTR+iS
+-----END CERTIFICATE-----
+
+Visa eCommerce Root
+===================
+-----BEGIN CERTIFICATE-----
+MIIDojCCAoqgAwIBAgIQE4Y1TR0/BvLB+WUF1ZAcYjANBgkqhkiG9w0BAQUFADBrMQswCQYDVQQG
+EwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRlcm5hdGlvbmFsIFNlcnZpY2Ug
+QXNzb2NpYXRpb24xHDAaBgNVBAMTE1Zpc2EgZUNvbW1lcmNlIFJvb3QwHhcNMDIwNjI2MDIxODM2
+WhcNMjIwNjI0MDAxNjEyWjBrMQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMm
+VmlzYSBJbnRlcm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xHDAaBgNVBAMTE1Zpc2EgZUNv
+bW1lcmNlIFJvb3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvV95WHm6h2mCxlCfL
+F9sHP4CFT8icttD0b0/Pmdjh28JIXDqsOTPHH2qLJj0rNfVIsZHBAk4ElpF7sDPwsRROEW+1QK8b
+RaVK7362rPKgH1g/EkZgPI2h4H3PVz4zHvtH8aoVlwdVZqW1LS7YgFmypw23RuwhY/81q6UCzyr0
+TP579ZRdhE2o8mCP2w4lPJ9zcc+U30rq299yOIzzlr3xF7zSujtFWsan9sYXiwGd/BmoKoMWuDpI
+/k4+oKsGGelT84ATB+0tvz8KPFUgOSwsAGl0lUq8ILKpeeUYiZGo3BxN77t+Nwtd/jmliFKMAGzs
+GHxBvfaLdXe6YJ2E5/4tAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEG
+MB0GA1UdDgQWBBQVOIMPPyw/cDMezUb+B4wg4NfDtzANBgkqhkiG9w0BAQUFAAOCAQEAX/FBfXxc
+CLkr4NWSR/pnXKUTwwMhmytMiUbPWU3J/qVAtmPN3XEolWcRzCSs00Rsca4BIGsDoo8Ytyk6feUW
+YFN4PMCvFYP3j1IzJL1kk5fui/fbGKhtcbP3LBfQdCVp9/5rPJS+TUtBjE7ic9DjkCJzQ83z7+pz
+zkWKsKZJ/0x9nXGIxHYdkFsd7v3M9+79YKWxehZx0RbQfBI8bGmX265fOZpwLwU8GUYEmSA20GBu
+YQa7FkKMcPcw++DbZqMAAb3mLNqRX6BGi01qnD093QVG/na/oAo85ADmJ7f/hC3euiInlhBx6yLt
+398znM/jra6O1I7mT1GvFpLgXPYHDw==
+-----END CERTIFICATE-----
+
+Comodo AAA Services root
+========================
+-----BEGIN CERTIFICATE-----
+MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS
+R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg
+TGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAw
+MFoXDTI4MTIzMTIzNTk1OVowezELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hl
+c3RlcjEQMA4GA1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNV
+BAMMGEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQuaBtDFcCLNSS1UY8y2bmhG
+C1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe3M/vg4aijJRPn2jymJBGhCfHdr/jzDUs
+i14HZGWCwEiwqJH5YZ92IFCokcdmtet4YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszW
+Y19zjNoFmag4qMsXeDZRrOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjH
+Ypy+g8cmez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQUoBEK
+Iz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wewYDVR0f
+BHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20vQUFBQ2VydGlmaWNhdGVTZXJ2aWNl
+cy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29tb2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2Vz
+LmNybDANBgkqhkiG9w0BAQUFAAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm
+7l3sAg9g1o1QGE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz
+Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2G9w84FoVxp7Z
+8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsil2D4kF501KKaU73yqWjgom7C
+12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg==
+-----END CERTIFICATE-----
+
+QuoVadis Root CA
+================
+-----BEGIN CERTIFICATE-----
+MIIF0DCCBLigAwIBAgIEOrZQizANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJCTTEZMBcGA1UE
+ChMQUXVvVmFkaXMgTGltaXRlZDElMCMGA1UECxMcUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0
+eTEuMCwGA1UEAxMlUXVvVmFkaXMgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wMTAz
+MTkxODMzMzNaFw0yMTAzMTcxODMzMzNaMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRp
+cyBMaW1pdGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MS4wLAYDVQQD
+EyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEF
+AAOCAQ8AMIIBCgKCAQEAv2G1lVO6V/z68mcLOhrfEYBklbTRvM16z/Ypli4kVEAkOPcahdxYTMuk
+J0KX0J+DisPkBgNbAKVRHnAEdOLB1Dqr1607BxgFjv2DrOpm2RgbaIr1VxqYuvXtdj182d6UajtL
+F8HVj71lODqV0D1VNk7feVcxKh7YWWVJWCCYfqtffp/p1k3sg3Spx2zY7ilKhSoGFPlU5tPaZQeL
+YzcS19Dsw3sgQUSj7cugF+FxZc4dZjH3dgEZyH0DWLaVSR2mEiboxgx24ONmy+pdpibu5cxfvWen
+AScOospUxbF6lR1xHkopigPcakXBpBlebzbNw6Kwt/5cOOJSvPhEQ+aQuwIDAQABo4ICUjCCAk4w
+PQYIKwYBBQUHAQEEMTAvMC0GCCsGAQUFBzABhiFodHRwczovL29jc3AucXVvdmFkaXNvZmZzaG9y
+ZS5jb20wDwYDVR0TAQH/BAUwAwEB/zCCARoGA1UdIASCAREwggENMIIBCQYJKwYBBAG+WAABMIH7
+MIHUBggrBgEFBQcCAjCBxxqBxFJlbGlhbmNlIG9uIHRoZSBRdW9WYWRpcyBSb290IENlcnRpZmlj
+YXRlIGJ5IGFueSBwYXJ0eSBhc3N1bWVzIGFjY2VwdGFuY2Ugb2YgdGhlIHRoZW4gYXBwbGljYWJs
+ZSBzdGFuZGFyZCB0ZXJtcyBhbmQgY29uZGl0aW9ucyBvZiB1c2UsIGNlcnRpZmljYXRpb24gcHJh
+Y3RpY2VzLCBhbmQgdGhlIFF1b1ZhZGlzIENlcnRpZmljYXRlIFBvbGljeS4wIgYIKwYBBQUHAgEW
+Fmh0dHA6Ly93d3cucXVvdmFkaXMuYm0wHQYDVR0OBBYEFItLbe3TKbkGGew5Oanwl4Rqy+/fMIGu
+BgNVHSMEgaYwgaOAFItLbe3TKbkGGew5Oanwl4Rqy+/foYGEpIGBMH8xCzAJBgNVBAYTAkJNMRkw
+FwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0
+aG9yaXR5MS4wLAYDVQQDEyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggQ6
+tlCLMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAitQUtf70mpKnGdSkfnIYj9lo
+fFIk3WdvOXrEql494liwTXCYhGHoG+NpGA7O+0dQoE7/8CQfvbLO9Sf87C9TqnN7Az10buYWnuul
+LsS/VidQK2K6vkscPFVcQR0kvoIgR13VRH56FmjffU1RcHhXHTMe/QKZnAzNCgVPx7uOpHX6Sm2x
+gI4JVrmcGmD+XcHXetwReNDWXcG31a0ymQM6isxUJTkxgXsTIlG6Rmyhu576BGxJJnSP0nPrzDCi
+5upZIof4l/UO/erMkqQWxFIY6iHOsfHmhIHluqmGKPJDWl0Snawe2ajlCmqnf6CHKc/yiU3U7MXi
+5nrQNiOKSnQ2+Q==
+-----END CERTIFICATE-----
+
+QuoVadis Root CA 2
+==================
+-----BEGIN CERTIFICATE-----
+MIIFtzCCA5+gAwIBAgICBQkwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT
+EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMjAeFw0wNjExMjQx
+ODI3MDBaFw0zMTExMjQxODIzMzNaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM
+aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4IC
+DwAwggIKAoICAQCaGMpLlA0ALa8DKYrwD4HIrkwZhR0In6spRIXzL4GtMh6QRr+jhiYaHv5+HBg6
+XJxgFyo6dIMzMH1hVBHL7avg5tKifvVrbxi3Cgst/ek+7wrGsxDp3MJGF/hd/aTa/55JWpzmM+Yk
+lvc/ulsrHHo1wtZn/qtmUIttKGAr79dgw8eTvI02kfN/+NsRE8Scd3bBrrcCaoF6qUWD4gXmuVbB
+lDePSHFjIuwXZQeVikvfj8ZaCuWw419eaxGrDPmF60Tp+ARz8un+XJiM9XOva7R+zdRcAitMOeGy
+lZUtQofX1bOQQ7dsE/He3fbE+Ik/0XX1ksOR1YqI0JDs3G3eicJlcZaLDQP9nL9bFqyS2+r+eXyt
+66/3FsvbzSUr5R/7mp/iUcw6UwxI5g69ybR2BlLmEROFcmMDBOAENisgGQLodKcftslWZvB1Jdxn
+wQ5hYIizPtGo/KPaHbDRsSNU30R2be1B2MGyIrZTHN81Hdyhdyox5C315eXbyOD/5YDXC2Og/zOh
+D7osFRXql7PSorW+8oyWHhqPHWykYTe5hnMz15eWniN9gqRMgeKh0bpnX5UHoycR7hYQe7xFSkyy
+BNKr79X9DFHOUGoIMfmR2gyPZFwDwzqLID9ujWc9Otb+fVuIyV77zGHcizN300QyNQliBJIWENie
+J0f7OyHj+OsdWwIDAQABo4GwMIGtMA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1Ud
+DgQWBBQahGK8SEwzJQTU7tD2A8QZRtGUazBuBgNVHSMEZzBlgBQahGK8SEwzJQTU7tD2A8QZRtGU
+a6FJpEcwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMT
+ElF1b1ZhZGlzIFJvb3QgQ0EgMoICBQkwDQYJKoZIhvcNAQEFBQADggIBAD4KFk2fBluornFdLwUv
+Z+YTRYPENvbzwCYMDbVHZF34tHLJRqUDGCdViXh9duqWNIAXINzng/iN/Ae42l9NLmeyhP3ZRPx3
+UIHmfLTJDQtyU/h2BwdBR5YM++CCJpNVjP4iH2BlfF/nJrP3MpCYUNQ3cVX2kiF495V5+vgtJodm
+VjB3pjd4M1IQWK4/YY7yarHvGH5KWWPKjaJW1acvvFYfzznB4vsKqBUsfU16Y8Zsl0Q80m/DShcK
++JDSV6IZUaUtl0HaB0+pUNqQjZRG4T7wlP0QADj1O+hA4bRuVhogzG9Yje0uRY/W6ZM/57Es3zrW
+IozchLsib9D45MY56QSIPMO661V6bYCZJPVsAfv4l7CUW+v90m/xd2gNNWQjrLhVoQPRTUIZ3Ph1
+WVaj+ahJefivDrkRoHy3au000LYmYjgahwz46P0u05B/B5EqHdZ+XIWDmbA4CD/pXvk1B+TJYm5X
+f6dQlfe6yJvmjqIBxdZmv3lh8zwc4bmCXF2gw+nYSL0ZohEUGW6yhhtoPkg3Goi3XZZenMfvJ2II
+4pEZXNLxId26F0KCl3GBUzGpn/Z9Yr9y4aOTHcyKJloJONDO1w2AFrR4pTqHTI2KpdVGl/IsELm8
+VCLAAVBpQ570su9t+Oza8eOx79+Rj1QqCyXBJhnEUhAFZdWCEOrCMc0u
+-----END CERTIFICATE-----
+
+QuoVadis Root CA 3
+==================
+-----BEGIN CERTIFICATE-----
+MIIGnTCCBIWgAwIBAgICBcYwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT
+EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMzAeFw0wNjExMjQx
+OTExMjNaFw0zMTExMjQxOTA2NDRaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM
+aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4IC
+DwAwggIKAoICAQDMV0IWVJzmmNPTTe7+7cefQzlKZbPoFog02w1ZkXTPkrgEQK0CSzGrvI2RaNgg
+DhoB4hp7Thdd4oq3P5kazethq8Jlph+3t723j/z9cI8LoGe+AaJZz3HmDyl2/7FWeUUrH556VOij
+KTVopAFPD6QuN+8bv+OPEKhyq1hX51SGyMnzW9os2l2ObjyjPtr7guXd8lyyBTNvijbO0BNO/79K
+DDRMpsMhvVAEVeuxu537RR5kFd5VAYwCdrXLoT9CabwvvWhDFlaJKjdhkf2mrk7AyxRllDdLkgbv
+BNDInIjbC3uBr7E9KsRlOni27tyAsdLTmZw67mtaa7ONt9XOnMK+pUsvFrGeaDsGb659n/je7Mwp
+p5ijJUMv7/FfJuGITfhebtfZFG4ZM2mnO4SJk8RTVROhUXhA+LjJou57ulJCg54U7QVSWllWp5f8
+nT8KKdjcT5EOE7zelaTfi5m+rJsziO+1ga8bxiJTyPbH7pcUsMV8eFLI8M5ud2CEpukqdiDtWAEX
+MJPpGovgc2PZapKUSU60rUqFxKMiMPwJ7Wgic6aIDFUhWMXhOp8q3crhkODZc6tsgLjoC2SToJyM
+Gf+z0gzskSaHirOi4XCPLArlzW1oUevaPwV/izLmE1xr/l9A4iLItLRkT9a6fUg+qGkM17uGcclz
+uD87nSVL2v9A6wIDAQABo4IBlTCCAZEwDwYDVR0TAQH/BAUwAwEB/zCB4QYDVR0gBIHZMIHWMIHT
+BgkrBgEEAb5YAAMwgcUwgZMGCCsGAQUFBwICMIGGGoGDQW55IHVzZSBvZiB0aGlzIENlcnRpZmlj
+YXRlIGNvbnN0aXR1dGVzIGFjY2VwdGFuY2Ugb2YgdGhlIFF1b1ZhZGlzIFJvb3QgQ0EgMyBDZXJ0
+aWZpY2F0ZSBQb2xpY3kgLyBDZXJ0aWZpY2F0aW9uIFByYWN0aWNlIFN0YXRlbWVudC4wLQYIKwYB
+BQUHAgEWIWh0dHA6Ly93d3cucXVvdmFkaXNnbG9iYWwuY29tL2NwczALBgNVHQ8EBAMCAQYwHQYD
+VR0OBBYEFPLAE+CCQz777i9nMpY1XNu4ywLQMG4GA1UdIwRnMGWAFPLAE+CCQz777i9nMpY1XNu4
+ywLQoUmkRzBFMQswCQYDVQQGEwJCTTEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRlZDEbMBkGA1UE
+AxMSUXVvVmFkaXMgUm9vdCBDQSAzggIFxjANBgkqhkiG9w0BAQUFAAOCAgEAT62gLEz6wPJv92ZV
+qyM07ucp2sNbtrCD2dDQ4iH782CnO11gUyeim/YIIirnv6By5ZwkajGxkHon24QRiSemd1o417+s
+hvzuXYO8BsbRd2sPbSQvS3pspweWyuOEn62Iix2rFo1bZhfZFvSLgNLd+LJ2w/w4E6oM3kJpK27z
+POuAJ9v1pkQNn1pVWQvVDVJIxa6f8i+AxeoyUDUSly7B4f/xI4hROJ/yZlZ25w9Rl6VSDE1JUZU2
+Pb+iSwwQHYaZTKrzchGT5Or2m9qoXadNt54CrnMAyNojA+j56hl0YgCUyyIgvpSnWbWCar6ZeXqp
+8kokUvd0/bpO5qgdAm6xDYBEwa7TIzdfu4V8K5Iu6H6li92Z4b8nby1dqnuH/grdS/yO9SbkbnBC
+bjPsMZ57k8HkyWkaPcBrTiJt7qtYTcbQQcEr6k8Sh17rRdhs9ZgC06DYVYoGmRmioHfRMJ6szHXu
+g/WwYjnPbFfiTNKRCw51KBuav/0aQ/HKd/s7j2G4aSgWQgRecCocIdiP4b0jWy10QJLZYxkNc91p
+vGJHvOB0K7Lrfb5BG7XARsWhIstfTsEokt4YutUqKLsRixeTmJlglFwjz1onl14LBQaTNx47aTbr
+qZ5hHY8y2o4M1nQ+ewkk2gF3R8Q7zTSMmfXK4SVhM7JZG+Ju1zdXtg2pEto=
+-----END CERTIFICATE-----
+
+Security Communication Root CA
+==============================
+-----BEGIN CERTIFICATE-----
+MIIDWjCCAkKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP
+U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw
+HhcNMDMwOTMwMDQyMDQ5WhcNMjMwOTMwMDQyMDQ5WjBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP
+U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw
+ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCzs/5/022x7xZ8V6UMbXaKL0u/ZPtM7orw
+8yl89f/uKuDp6bpbZCKamm8sOiZpUQWZJtzVHGpxxpp9Hp3dfGzGjGdnSj74cbAZJ6kJDKaVv0uM
+DPpVmDvY6CKhS3E4eayXkmmziX7qIWgGmBSWh9JhNrxtJ1aeV+7AwFb9Ms+k2Y7CI9eNqPPYJayX
+5HA49LY6tJ07lyZDo6G8SVlyTCMwhwFY9k6+HGhWZq/NQV3Is00qVUarH9oe4kA92819uZKAnDfd
+DJZkndwi92SL32HeFZRSFaB9UslLqCHJxrHty8OVYNEP8Ktw+N/LTX7s1vqr2b1/VPKl6Xn62dZ2
+JChzAgMBAAGjPzA9MB0GA1UdDgQWBBSgc0mZaNyFW2XjmygvV5+9M7wHSDALBgNVHQ8EBAMCAQYw
+DwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaECpqLvkT115swW1F7NgE+vGkl3g
+0dNq/vu+m22/xwVtWSDEHPC32oRYAmP6SBbvT6UL90qY8j+eG61Ha2POCEfrUj94nK9NrvjVT8+a
+mCoQQTlSxN3Zmw7vkwGusi7KaEIkQmywszo+zenaSMQVy+n5Bw+SUEmK3TGXX8npN6o7WWWXlDLJ
+s58+OmJYxUmtYg5xpTKqL8aJdkNAExNnPaJUJRDL8Try2frbSVa7pv6nQTXD4IhhyYjH3zYQIphZ
+6rBK+1YWc26sTfcioU+tHXotRSflMMFe8toTyyVCUZVHA4xsIcx0Qu1T/zOLjw9XARYvz6buyXAi
+FL39vmwLAw==
+-----END CERTIFICATE-----
+
+Sonera Class 2 Root CA
+======================
+-----BEGIN CERTIFICATE-----
+MIIDIDCCAgigAwIBAgIBHTANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEPMA0GA1UEChMG
+U29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MyIENBMB4XDTAxMDQwNjA3Mjk0MFoXDTIxMDQw
+NjA3Mjk0MFowOTELMAkGA1UEBhMCRkkxDzANBgNVBAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJh
+IENsYXNzMiBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJAXSjWdyvANlsdE+hY3
+/Ei9vX+ALTU74W+oZ6m/AxxNjG8yR9VBaKQTBME1DJqEQ/xcHf+Js+gXGM2RX/uJ4+q/Tl18GybT
+dXnt5oTjV+WtKcT0OijnpXuENmmz/V52vaMtmdOQTiMofRhj8VQ7Jp12W5dCsv+u8E7s3TmVToMG
+f+dJQMjFAbJUWmYdPfz56TwKnoG4cPABi+QjVHzIrviQHgCWctRUz2EjvOr7nQKV0ba5cTppCD8P
+tOFCx4j1P5iop7oc4HFx71hXgVB6XGt0Rg6DA5jDjqhu8nYybieDwnPz3BjotJPqdURrBGAgcVeH
+nfO+oJAjPYok4doh28MCAwEAAaMzMDEwDwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQISqCqWITT
+XjwwCwYDVR0PBAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQBazof5FnIVV0sd2ZvnoiYw7JNn39Yt
+0jSv9zilzqsWuasvfDXLrNAPtEwr/IDva4yRXzZ299uzGxnq9LIR/WFxRL8oszodv7ND6J+/3DEI
+cbCdjdY0RzKQxmUk96BKfARzjzlvF4xytb1LyHr4e4PDKE6cCepnP7JnBBvDFNr450kkkdAdavph
+Oe9r5yF1BgfYErQhIHBCcYHaPJo2vqZbDWpsmh+Re/n570K6Tk6ezAyNlNzZRZxe7EJQY670XcSx
+EtzKO6gunRRaBXW37Ndj4ro1tgQIkejanZz2ZrUYrAqmVCY0M9IbwdR/GjqOC6oybtv8TyWf2TLH
+llpwrN9M
+-----END CERTIFICATE-----
+
+XRamp Global CA Root
+====================
+-----BEGIN CERTIFICATE-----
+MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCBgjELMAkGA1UE
+BhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2Vj
+dXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBB
+dXRob3JpdHkwHhcNMDQxMTAxMTcxNDA0WhcNMzUwMTAxMDUzNzE5WjCBgjELMAkGA1UEBhMCVVMx
+HjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2VjdXJpdHkg
+U2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
+dHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCYJB69FbS638eMpSe2OAtp87ZOqCwu
+IR1cRN8hXX4jdP5efrRKt6atH67gBhbim1vZZ3RrXYCPKZ2GG9mcDZhtdhAoWORlsH9KmHmf4MMx
+foArtYzAQDsRhtDLooY2YKTVMIJt2W7QDxIEM5dfT2Fa8OT5kavnHTu86M/0ay00fOJIYRyO82FE
+zG+gSqmUsE3a56k0enI4qEHMPJQRfevIpoy3hsvKMzvZPTeL+3o+hiznc9cKV6xkmxnr9A8ECIqs
+AxcZZPRaJSKNNCyy9mgdEm3Tih4U2sSPpuIjhdV6Db1q4Ons7Be7QhtnqiXtRYMh/MHJfNViPvry
+xS3T/dRlAgMBAAGjgZ8wgZwwEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud
+EwEB/wQFMAMBAf8wHQYDVR0OBBYEFMZPoj0GY4QJnM5i5ASsjVy16bYbMDYGA1UdHwQvMC0wK6Ap
+oCeGJWh0dHA6Ly9jcmwueHJhbXBzZWN1cml0eS5jb20vWEdDQS5jcmwwEAYJKwYBBAGCNxUBBAMC
+AQEwDQYJKoZIhvcNAQEFBQADggEBAJEVOQMBG2f7Shz5CmBbodpNl2L5JFMn14JkTpAuw0kbK5rc
+/Kh4ZzXxHfARvbdI4xD2Dd8/0sm2qlWkSLoC295ZLhVbO50WfUfXN+pfTXYSNrsf16GBBEYgoyxt
+qZ4Bfj8pzgCT3/3JknOJiWSe5yvkHJEs0rnOfc5vMZnT5r7SHpDwCRR5XCOrTdLaIR9NmXmd4c8n
+nxCbHIgNsIpkQTG4DmyQJKSbXHGPurt+HBvbaoAPIbzp26a3QPSyi6mx5O+aGtA9aZnuqCij4Tyz
+8LIRnM98QObd50N9otg6tamN8jSZxNQQ4Qb9CYQQO+7ETPTsJ3xCwnR8gooJybQDJbw=
+-----END CERTIFICATE-----
+
+Go Daddy Class 2 CA
+===================
+-----BEGIN CERTIFICATE-----
+MIIEADCCAuigAwIBAgIBADANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMY
+VGhlIEdvIERhZGR5IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRp
+ZmljYXRpb24gQXV0aG9yaXR5MB4XDTA0MDYyOTE3MDYyMFoXDTM0MDYyOTE3MDYyMFowYzELMAkG
+A1UEBhMCVVMxITAfBgNVBAoTGFRoZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28g
+RGFkZHkgQ2xhc3MgMiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASAwDQYJKoZIhvcNAQEBBQAD
+ggENADCCAQgCggEBAN6d1+pXGEmhW+vXX0iG6r7d/+TvZxz0ZWizV3GgXne77ZtJ6XCAPVYYYwhv
+2vLM0D9/AlQiVBDYsoHUwHU9S3/Hd8M+eKsaA7Ugay9qK7HFiH7Eux6wwdhFJ2+qN1j3hybX2C32
+qRe3H3I2TqYXP2WYktsqbl2i/ojgC95/5Y0V4evLOtXiEqITLdiOr18SPaAIBQi2XKVlOARFmR6j
+YGB0xUGlcmIbYsUfb18aQr4CUWWoriMYavx4A6lNf4DD+qta/KFApMoZFv6yyO9ecw3ud72a9nmY
+vLEHZ6IVDd2gWMZEewo+YihfukEHU1jPEX44dMX4/7VpkI+EdOqXG68CAQOjgcAwgb0wHQYDVR0O
+BBYEFNLEsNKR1EwRcbNhyz2h/t2oatTjMIGNBgNVHSMEgYUwgYKAFNLEsNKR1EwRcbNhyz2h/t2o
+atTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMu
+MTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwG
+A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wim
+PQoZ+YeAEW5p5JYXMP80kWNyOO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKt
+I3lpjbi2Tc7PTMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ
+HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mERdEr/VxqHD3VI
+Ls9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5CufReYNnyicsbkqWletNw+vHX/b
+vZ8=
+-----END CERTIFICATE-----
+
+Starfield Class 2 CA
+====================
+-----BEGIN CERTIFICATE-----
+MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzElMCMGA1UEChMc
+U3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZpZWxkIENsYXNzIDIg
+Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQwNjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBo
+MQswCQYDVQQGEwJVUzElMCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAG
+A1UECxMpU3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqG
+SIb3DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf8MOh2tTY
+bitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN+lq2cwQlZut3f+dZxkqZ
+JRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVm
+epsZGD3/cVE8MC5fvj13c7JdBmzDI1aaK4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSN
+F4Azbl5KXZnJHoe0nRrA1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HF
+MIHCMB0GA1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fRzt0f
+hvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNo
+bm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBDbGFzcyAyIENlcnRpZmljYXRpb24g
+QXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGs
+afPzWdqbAYcaT1epoXkJKtv3L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLM
+PUxA2IGvd56Deruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl
+xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynpVSJYACPq4xJD
+KVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEYWQPJIrSPnNVeKtelttQKbfi3
+QBFGmh95DmK/D5fs4C8fF5Q=
+-----END CERTIFICATE-----
+
+Taiwan GRCA
+===========
+-----BEGIN CERTIFICATE-----
+MIIFcjCCA1qgAwIBAgIQH51ZWtcvwgZEpYAIaeNe9jANBgkqhkiG9w0BAQUFADA/MQswCQYDVQQG
+EwJUVzEwMC4GA1UECgwnR292ZXJubWVudCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4X
+DTAyMTIwNTEzMjMzM1oXDTMyMTIwNTEzMjMzM1owPzELMAkGA1UEBhMCVFcxMDAuBgNVBAoMJ0dv
+dmVybm1lbnQgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQAD
+ggIPADCCAgoCggIBAJoluOzMonWoe/fOW1mKydGGEghU7Jzy50b2iPN86aXfTEc2pBsBHH8eV4qN
+w8XRIePaJD9IK/ufLqGU5ywck9G/GwGHU5nOp/UKIXZ3/6m3xnOUT0b3EEk3+qhZSV1qgQdW8or5
+BtD3cCJNtLdBuTK4sfCxw5w/cP1T3YGq2GN49thTbqGsaoQkclSGxtKyyhwOeYHWtXBiCAEuTk8O
+1RGvqa/lmr/czIdtJuTJV6L7lvnM4T9TjGxMfptTCAtsF/tnyMKtsc2AtJfcdgEWFelq16TheEfO
+htX7MfP6Mb40qij7cEwdScevLJ1tZqa2jWR+tSBqnTuBto9AAGdLiYa4zGX+FVPpBMHWXx1E1wov
+J5pGfaENda1UhhXcSTvxls4Pm6Dso3pdvtUqdULle96ltqqvKKyskKw4t9VoNSZ63Pc78/1Fm9G7
+Q3hub/FCVGqY8A2tl+lSXunVanLeavcbYBT0peS2cWeqH+riTcFCQP5nRhc4L0c/cZyu5SHKYS1t
+B6iEfC3uUSXxY5Ce/eFXiGvviiNtsea9P63RPZYLhY3Naye7twWb7LuRqQoHEgKXTiCQ8P8NHuJB
+O9NAOueNXdpm5AKwB1KYXA6OM5zCppX7VRluTI6uSw+9wThNXo+EHWbNxWCWtFJaBYmOlXqYwZE8
+lSOyDvR5tMl8wUohAgMBAAGjajBoMB0GA1UdDgQWBBTMzO/MKWCkO7GStjz6MmKPrCUVOzAMBgNV
+HRMEBTADAQH/MDkGBGcqBwAEMTAvMC0CAQAwCQYFKw4DAhoFADAHBgVnKgMAAAQUA5vwIhP/lSg2
+09yewDL7MTqKUWUwDQYJKoZIhvcNAQEFBQADggIBAECASvomyc5eMN1PhnR2WPWus4MzeKR6dBcZ
+TulStbngCnRiqmjKeKBMmo4sIy7VahIkv9Ro04rQ2JyftB8M3jh+Vzj8jeJPXgyfqzvS/3WXy6Tj
+Zwj/5cAWtUgBfen5Cv8b5Wppv3ghqMKnI6mGq3ZW6A4M9hPdKmaKZEk9GhiHkASfQlK3T8v+R0F2
+Ne//AHY2RTKbxkaFXeIksB7jSJaYV0eUVXoPQbFEJPPB/hprv4j9wabak2BegUqZIJxIZhm1AHlU
+D7gsL0u8qV1bYH+Mh6XgUmMqvtg7hUAV/h62ZT/FS9p+tXo1KaMuephgIqP0fSdOLeq0dDzpD6Qz
+DxARvBMB1uUO07+1EqLhRSPAzAhuYbeJq4PjJB7mXQfnHyA+z2fI56wwbSdLaG5LKlwCCDTb+Hbk
+Z6MmnD+iMsJKxYEYMRBWqoTvLQr/uB930r+lWKBi5NdLkXWNiYCYfm3LU05er/ayl4WXudpVBrkk
+7tfGOB5jGxI7leFYrPLfhNVfmS8NVVvmONsuP3LpSIXLuykTjx44VbnzssQwmSNOXfJIoRIM3BKQ
+CZBUkQM8R+XVyWXgt0t97EfTsws+rZ7QdAAO671RrcDeLMDDav7v3Aun+kbfYNucpllQdSNpc5Oy
++fwC00fmcc4QAu4njIT/rEUNE1yDMuAlpYYsfPQS
+-----END CERTIFICATE-----
+
+DigiCert Assured ID Root CA
+===========================
+-----BEGIN CERTIFICATE-----
+MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQG
+EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw
+IgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzEx
+MTEwMDAwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL
+ExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0Ew
+ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtDhXO5EOAXLGH87dg+XESpa7cJpSIqvTO
+9SA5KFhgDPiA2qkVlTJhPLWxKISKityfCgyDF3qPkKyK53lTXDGEKvYPmDI2dsze3Tyoou9q+yHy
+UmHfnyDXH+Kx2f4YZNISW1/5WBg1vEfNoTb5a3/UsDg+wRvDjDPZ2C8Y/igPs6eD1sNuRMBhNZYW
+/lmci3Zt1/GiSw0r/wty2p5g0I6QNcZ4VYcgoc/lbQrISXwxmDNsIumH0DJaoroTghHtORedmTpy
+oeb6pNnVFzF1roV9Iq4/AUaG9ih5yLHa5FcXxH4cDrC0kqZWs72yl+2qp/C3xag/lRbQ/6GW6whf
+GHdPAgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRF
+66Kv9JLLgjEtUYunpyGd823IDzAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYunpyGd823IDzANBgkq
+hkiG9w0BAQUFAAOCAQEAog683+Lt8ONyc3pklL/3cmbYMuRCdWKuh+vy1dneVrOfzM4UKLkNl2Bc
+EkxY5NM9g0lFWJc1aRqoR+pWxnmrEthngYTffwk8lOa4JiwgvT2zKIn3X/8i4peEH+ll74fg38Fn
+SbNd67IJKusm7Xi+fT8r87cmNW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i
+8b5QZ7dsvfPxH2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe
++o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g==
+-----END CERTIFICATE-----
+
+DigiCert Global Root CA
+=======================
+-----BEGIN CERTIFICATE-----
+MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQG
+EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw
+HgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAw
+MDAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3
+dy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkq
+hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsBCSDMAZOn
+TjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97nh6Vfe63SKMI2tavegw5
+BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt43C/dxC//AH2hdmoRBBYMql1GNXRor5H
+4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7PT19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y
+7vrTC0LUq7dBMtoM1O/4gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQAB
+o2MwYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbRTLtm
+8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUwDQYJKoZIhvcNAQEF
+BQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/EsrhMAtudXH/vTBH1jLuG2cenTnmCmr
+EbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIt
+tep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886
+UAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk
+CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=
+-----END CERTIFICATE-----
+
+DigiCert High Assurance EV Root CA
+==================================
+-----BEGIN CERTIFICATE-----
+MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBsMQswCQYDVQQG
+EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSsw
+KQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5jZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAw
+MFoXDTMxMTExMDAwMDAwMFowbDELMAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZ
+MBcGA1UECxMQd3d3LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFu
+Y2UgRVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm+9S75S0t
+Mqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTWPNt0OKRKzE0lgvdKpVMS
+OO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEMxChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3
+MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFBIk5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQ
+NAQTXKFx01p8VdteZOE3hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUe
+h10aUAsgEsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMB
+Af8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaAFLE+w2kD+L9HAdSY
+JhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3NecnzyIZgYIVyHbIUf4KmeqvxgydkAQ
+V8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6zeM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFp
+myPInngiK3BD41VHMWEZ71jFhS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkK
+mNEVX58Svnw2Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe
+vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep+OkuE6N36B9K
+-----END CERTIFICATE-----
+
+Certplus Class 2 Primary CA
+===========================
+-----BEGIN CERTIFICATE-----
+MIIDkjCCAnqgAwIBAgIRAIW9S/PY2uNp9pTXX8OlRCMwDQYJKoZIhvcNAQEFBQAwPTELMAkGA1UE
+BhMCRlIxETAPBgNVBAoTCENlcnRwbHVzMRswGQYDVQQDExJDbGFzcyAyIFByaW1hcnkgQ0EwHhcN
+OTkwNzA3MTcwNTAwWhcNMTkwNzA2MjM1OTU5WjA9MQswCQYDVQQGEwJGUjERMA8GA1UEChMIQ2Vy
+dHBsdXMxGzAZBgNVBAMTEkNsYXNzIDIgUHJpbWFyeSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP
+ADCCAQoCggEBANxQltAS+DXSCHh6tlJw/W/uz7kRy1134ezpfgSN1sxvc0NXYKwzCkTsA18cgCSR
+5aiRVhKC9+Ar9NuuYS6JEI1rbLqzAr3VNsVINyPi8Fo3UjMXEuLRYE2+L0ER4/YXJQyLkcAbmXuZ
+Vg2v7tK8R1fjeUl7NIknJITesezpWE7+Tt9avkGtrAjFGA7v0lPubNCdEgETjdyAYveVqUSISnFO
+YFWe2yMZeVYHDD9jC1yw4r5+FfyUM1hBOHTE4Y+L3yasH7WLO7dDWWuwJKZtkIvEcupdM5i3y95e
+e++U8Rs+yskhwcWYAqqi9lt3m/V+llU0HGdpwPFC40es/CgcZlUCAwEAAaOBjDCBiTAPBgNVHRME
+CDAGAQH/AgEKMAsGA1UdDwQEAwIBBjAdBgNVHQ4EFgQU43Mt38sOKAze3bOkynm4jrvoMIkwEQYJ
+YIZIAYb4QgEBBAQDAgEGMDcGA1UdHwQwMC4wLKAqoCiGJmh0dHA6Ly93d3cuY2VydHBsdXMuY29t
+L0NSTC9jbGFzczIuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQCnVM+IRBnL39R/AN9WM2K191EBkOvD
+P9GIROkkXe/nFL0gt5o8AP5tn9uQ3Nf0YtaLcF3n5QRIqWh8yfFC82x/xXp8HVGIutIKPidd3i1R
+TtMTZGnkLuPT55sJmabglZvOGtd/vjzOUrMRFcEPF80Du5wlFbqidon8BvEY0JNLDnyCt6X09l/+
+7UCmnYR0ObncHoUW2ikbhiMAybuJfm6AiB4vFLQDJKgybwOaRywwvlbGp0ICcBvqQNi6BQNwB6SW
+//1IMwrh3KWBkJtN3X3n57LNXMhqlfil9o3EXXgIvnsG1knPGTZQIy4I5p4FTUcY1Rbpsda2ENW7
+l7+ijrRU
+-----END CERTIFICATE-----
+
+DST Root CA X3
+==============
+-----BEGIN CERTIFICATE-----
+MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/MSQwIgYDVQQK
+ExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMTDkRTVCBSb290IENBIFgzMB4X
+DTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVowPzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1
+cmUgVHJ1c3QgQ28uMRcwFQYDVQQDEw5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQAD
+ggEPADCCAQoCggEBAN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmT
+rE4Orz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEqOLl5CjH9
+UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9bxiqKqy69cK3FCxolkHRy
+xXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40d
+utolucbY38EVAjqr2m7xPi71XAicPNaDaeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0T
+AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQ
+MA0GCSqGSIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69ikug
+dB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXrAvHRAosZy5Q6XkjE
+GB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZzR8srzJmwN0jP41ZL9c8PDHIyh8bw
+RLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubS
+fZGL+T0yjWW06XyxV3bqxbYoOb8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
+-----END CERTIFICATE-----
+
+SwissSign Gold CA - G2
+======================
+-----BEGIN CERTIFICATE-----
+MIIFujCCA6KgAwIBAgIJALtAHEP1Xk+wMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNVBAYTAkNIMRUw
+EwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMTFlN3aXNzU2lnbiBHb2xkIENBIC0gRzIwHhcN
+MDYxMDI1MDgzMDM1WhcNMzYxMDI1MDgzMDM1WjBFMQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dp
+c3NTaWduIEFHMR8wHQYDVQQDExZTd2lzc1NpZ24gR29sZCBDQSAtIEcyMIICIjANBgkqhkiG9w0B
+AQEFAAOCAg8AMIICCgKCAgEAr+TufoskDhJuqVAtFkQ7kpJcyrhdhJJCEyq8ZVeCQD5XJM1QiyUq
+t2/876LQwB8CJEoTlo8jE+YoWACjR8cGp4QjK7u9lit/VcyLwVcfDmJlD909Vopz2q5+bbqBHH5C
+jCA12UNNhPqE21Is8w4ndwtrvxEvcnifLtg+5hg3Wipy+dpikJKVyh+c6bM8K8vzARO/Ws/BtQpg
+vd21mWRTuKCWs2/iJneRjOBiEAKfNA+k1ZIzUd6+jbqEemA8atufK+ze3gE/bk3lUIbLtK/tREDF
+ylqM2tIrfKjuvqblCqoOpd8FUrdVxyJdMmqXl2MT28nbeTZ7hTpKxVKJ+STnnXepgv9VHKVxaSvR
+AiTysybUa9oEVeXBCsdtMDeQKuSeFDNeFhdVxVu1yzSJkvGdJo+hB9TGsnhQ2wwMC3wLjEHXuend
+jIj3o02yMszYF9rNt85mndT9Xv+9lz4pded+p2JYryU0pUHHPbwNUMoDAw8IWh+Vc3hiv69yFGkO
+peUDDniOJihC8AcLYiAQZzlG+qkDzAQ4embvIIO1jEpWjpEA/I5cgt6IoMPiaG59je883WX0XaxR
+7ySArqpWl2/5rX3aYT+YdzylkbYcjCbaZaIJbcHiVOO5ykxMgI93e2CaHt+28kgeDrpOVG2Y4OGi
+GqJ3UM/EY5LsRxmd6+ZrzsECAwEAAaOBrDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUw
+AwEB/zAdBgNVHQ4EFgQUWyV7lqRlUX64OfPAeGZe6Drn8O4wHwYDVR0jBBgwFoAUWyV7lqRlUX64
+OfPAeGZe6Drn8O4wRgYDVR0gBD8wPTA7BglghXQBWQECAQEwLjAsBggrBgEFBQcCARYgaHR0cDov
+L3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBACe645R88a7A3hfm
+5djV9VSwg/S7zV4Fe0+fdWavPOhWfvxyeDgD2StiGwC5+OlgzczOUYrHUDFu4Up+GC9pWbY9ZIEr
+44OE5iKHjn3g7gKZYbge9LgriBIWhMIxkziWMaa5O1M/wySTVltpkuzFwbs4AOPsF6m43Md8AYOf
+Mke6UiI0HTJ6CVanfCU2qT1L2sCCbwq7EsiHSycR+R4tx5M/nttfJmtS2S6K8RTGRI0Vqbe/vd6m
+Gu6uLftIdxf+u+yvGPUqUfA5hJeVbG4bwyvEdGB5JbAKJ9/fXtI5z0V9QkvfsywexcZdylU6oJxp
+mo/a77KwPJ+HbBIrZXAVUjEaJM9vMSNQH4xPjyPDdEFjHFWoFN0+4FFQz/EbMFYOkrCChdiDyyJk
+vC24JdVUorgG6q2SpCSgwYa1ShNqR88uC1aVVMvOmttqtKay20EIhid392qgQmwLOM7XdVAyksLf
+KzAiSNDVQTglXaTpXZ/GlHXQRf0wl0OPkKsKx4ZzYEppLd6leNcG2mqeSz53OiATIgHQv2ieY2Br
+NU0LbbqhPcCT4H8js1WtciVORvnSFu+wZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6Lqj
+viOvrv1vA+ACOzB2+httQc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ
+-----END CERTIFICATE-----
+
+SwissSign Silver CA - G2
+========================
+-----BEGIN CERTIFICATE-----
+MIIFvTCCA6WgAwIBAgIITxvUL1S7L0swDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCQ0gxFTAT
+BgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMB4X
+DTA2MTAyNTA4MzI0NloXDTM2MTAyNTA4MzI0NlowRzELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3
+aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMIICIjANBgkqhkiG
+9w0BAQEFAAOCAg8AMIICCgKCAgEAxPGHf9N4Mfc4yfjDmUO8x/e8N+dOcbpLj6VzHVxumK4DV644
+N0MvFz0fyM5oEMF4rhkDKxD6LHmD9ui5aLlV8gREpzn5/ASLHvGiTSf5YXu6t+WiE7brYT7QbNHm
++/pe7R20nqA1W6GSy/BJkv6FCgU+5tkL4k+73JU3/JHpMjUi0R86TieFnbAVlDLaYQ1HTWBCrpJH
+6INaUFjpiou5XaHc3ZlKHzZnu0jkg7Y360g6rw9njxcH6ATK72oxh9TAtvmUcXtnZLi2kUpCe2Uu
+MGoM9ZDulebyzYLs2aFK7PayS+VFheZteJMELpyCbTapxDFkH4aDCyr0NQp4yVXPQbBH6TCfmb5h
+qAaEuSh6XzjZG6k4sIN/c8HDO0gqgg8hm7jMqDXDhBuDsz6+pJVpATqJAHgE2cn0mRmrVn5bi4Y5
+FZGkECwJMoBgs5PAKrYYC51+jUnyEEp/+dVGLxmSo5mnJqy7jDzmDrxHB9xzUfFwZC8I+bRHHTBs
+ROopN4WSaGa8gzj+ezku01DwH/teYLappvonQfGbGHLy9YR0SslnxFSuSGTfjNFusB3hB48IHpmc
+celM2KX3RxIfdNFRnobzwqIjQAtz20um53MGjMGg6cFZrEb65i/4z3GcRm25xBWNOHkDRUjvxF3X
+CO6HOSKGsg0PWEP3calILv3q1h8CAwEAAaOBrDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/
+BAUwAwEB/zAdBgNVHQ4EFgQUF6DNweRBtjpbO8tFnb0cwpj6hlgwHwYDVR0jBBgwFoAUF6DNweRB
+tjpbO8tFnb0cwpj6hlgwRgYDVR0gBD8wPTA7BglghXQBWQEDAQEwLjAsBggrBgEFBQcCARYgaHR0
+cDovL3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBAHPGgeAn0i0P
+4JUw4ppBf1AsX19iYamGamkYDHRJ1l2E6kFSGG9YrVBWIGrGvShpWJHckRE1qTodvBqlYJ7YH39F
+kWnZfrt4csEGDyrOj4VwYaygzQu4OSlWhDJOhrs9xCrZ1x9y7v5RoSJBsXECYxqCsGKrXlcSH9/L
+3XWgwF15kIwb4FDm3jH+mHtwX6WQ2K34ArZv02DdQEsixT2tOnqfGhpHkXkzuoLcMmkDlm4fS/Bx
+/uNncqCxv1yL5PqZIseEuRuNI5c/7SXgz2W79WEE790eslpBIlqhn10s6FvJbakMDHiqYMZWjwFa
+DGi8aRl5xB9+lwW/xekkUV7U1UtT7dkjWjYDZaPBA61BMPNGG4WQr2W11bHkFlt4dR2Xem1ZqSqP
+e97Dh4kQmUlzeMg9vVE1dCrV8X5pGyq7O70luJpaPXJhkGaH7gzWTdQRdAtq/gsD/KNVV4n+Ssuu
+WxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJ
+DIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ub
+DgEj8Z+7fNzcbBGXJbLytGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u
+-----END CERTIFICATE-----
+
+GeoTrust Primary Certification Authority
+========================================
+-----BEGIN CERTIFICATE-----
+MIIDfDCCAmSgAwIBAgIQGKy1av1pthU6Y2yv2vrEoTANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQG
+EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjExMC8GA1UEAxMoR2VvVHJ1c3QgUHJpbWFyeSBD
+ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjExMjcwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMFgx
+CzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTEwLwYDVQQDEyhHZW9UcnVzdCBQ
+cmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
+CgKCAQEAvrgVe//UfH1nrYNke8hCUy3f9oQIIGHWAVlqnEQRr+92/ZV+zmEwu3qDXwK9AWbK7hWN
+b6EwnL2hhZ6UOvNWiAAxz9juapYC2e0DjPt1befquFUWBRaa9OBesYjAZIVcFU2Ix7e64HXprQU9
+nceJSOC7KMgD4TCTZF5SwFlwIjVXiIrxlQqD17wxcwE07e9GceBrAqg1cmuXm2bgyxx5X9gaBGge
+RwLmnWDiNpcB3841kt++Z8dtd1k7j53WkBWUvEI0EME5+bEnPn7WinXFsq+W06Lem+SYvn3h6YGt
+tm/81w7a4DSwDRp35+MImO9Y+pyEtzavwt+s0vQQBnBxNQIDAQABo0IwQDAPBgNVHRMBAf8EBTAD
+AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQULNVQQZcVi/CPNmFbSvtr2ZnJM5IwDQYJKoZI
+hvcNAQEFBQADggEBAFpwfyzdtzRP9YZRqSa+S7iq8XEN3GHHoOo0Hnp3DwQ16CePbJC/kRYkRj5K
+Ts4rFtULUh38H2eiAkUxT87z+gOneZ1TatnaYzr4gNfTmeGl4b7UVXGYNTq+k+qurUKykG/g/CFN
+NWMziUnWm07Kx+dOCQD32sfvmWKZd7aVIl6KoKv0uHiYyjgZmclynnjNS6yvGaBzEi38wkG6gZHa
+Floxt/m0cYASSJlyc1pZU8FjUjPtp8nSOQJw+uCxQmYpqptR7TBUIhRf2asdweSU8Pj1K/fqynhG
+1riR/aYNKxoUAT6A8EKglQdebc3MS6RFjasS6LPeWuWgfOgPIh1a6Vk=
+-----END CERTIFICATE-----
+
+thawte Primary Root CA
+======================
+-----BEGIN CERTIFICATE-----
+MIIEIDCCAwigAwIBAgIQNE7VVyDV7exJ9C/ON9srbTANBgkqhkiG9w0BAQUFADCBqTELMAkGA1UE
+BhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2
+aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhv
+cml6ZWQgdXNlIG9ubHkxHzAdBgNVBAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwHhcNMDYxMTE3
+MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCBqTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwg
+SW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMv
+KGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxHzAdBgNVBAMT
+FnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCs
+oPD7gFnUnMekz52hWXMJEEUMDSxuaPFsW0hoSVk3/AszGcJ3f8wQLZU0HObrTQmnHNK4yZc2AreJ
+1CRfBsDMRJSUjQJib+ta3RGNKJpchJAQeg29dGYvajig4tVUROsdB58Hum/u6f1OCyn1PoSgAfGc
+q/gcfomk6KHYcWUNo1F77rzSImANuVud37r8UVsLr5iy6S7pBOhih94ryNdOwUxkHt3Ph1i6Sk/K
+aAcdHJ1KxtUvkcx8cXIcxcBn6zL9yZJclNqFwJu/U30rCfSMnZEfl2pSy94JNqR32HuHUETVPm4p
+afs5SSYeCaWAe0At6+gnhcn+Yf1+5nyXHdWdAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYD
+VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR7W0XPr87Lev0xkhpqtvNG61dIUDANBgkqhkiG9w0BAQUF
+AAOCAQEAeRHAS7ORtvzw6WfUDW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeE
+uzLlQRHAd9mzYJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX
+xPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2/qxAeeWsEG89
+jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/LHbTY5xZ3Y+m4Q6gLkH3LpVH
+z7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7jVaMaA==
+-----END CERTIFICATE-----
+
+VeriSign Class 3 Public Primary Certification Authority - G5
+============================================================
+-----BEGIN CERTIFICATE-----
+MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCByjELMAkGA1UE
+BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO
+ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk
+IHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRp
+ZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCB
+yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2ln
+biBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBh
+dXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmlt
+YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
+ggEKAoIBAQCvJAgIKXo1nmAMqudLO07cfLw8RRy7K+D+KQL5VwijZIUVJ/XxrcgxiV0i6CqqpkKz
+j/i5Vbext0uz/o9+B1fs70PbZmIVYc9gDaTY3vjgw2IIPVQT60nKWVSFJuUrjxuf6/WhkcIzSdhD
+Y2pSS9KP6HBRTdGJaXvHcPaz3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQGBO+QueQA5N06tRn/
+Arr0PO7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+rCpSx4/VBEnkjWNHiDxpg8v+R70r
+fk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/NIeWiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/
+BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2Uv
+Z2lmMCEwHzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy
+aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKvMzEzMA0GCSqG
+SIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzEp6B4Eq1iDkVwZMXnl2YtmAl+
+X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKE
+KQsTb47bDN0lAtukixlE0kF6BWlKWE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiC
+Km0oHw0LxOXnGiYZ4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vE
+ZV8NhnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq
+-----END CERTIFICATE-----
+
+SecureTrust CA
+==============
+-----BEGIN CERTIFICATE-----
+MIIDuDCCAqCgAwIBAgIQDPCOXAgWpa1Cf/DrJxhZ0DANBgkqhkiG9w0BAQUFADBIMQswCQYDVQQG
+EwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xFzAVBgNVBAMTDlNlY3VyZVRy
+dXN0IENBMB4XDTA2MTEwNzE5MzExOFoXDTI5MTIzMTE5NDA1NVowSDELMAkGA1UEBhMCVVMxIDAe
+BgNVBAoTF1NlY3VyZVRydXN0IENvcnBvcmF0aW9uMRcwFQYDVQQDEw5TZWN1cmVUcnVzdCBDQTCC
+ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKukgeWVzfX2FI7CT8rU4niVWJxB4Q2ZQCQX
+OZEzZum+4YOvYlyJ0fwkW2Gz4BERQRwdbvC4u/jep4G6pkjGnx29vo6pQT64lO0pGtSO0gMdA+9t
+DWccV9cGrcrI9f4Or2YlSASWC12juhbDCE/RRvgUXPLIXgGZbf2IzIaowW8xQmxSPmjL8xk037uH
+GFaAJsTQ3MBv396gwpEWoGQRS0S8Hvbn+mPeZqx2pHGj7DaUaHp3pLHnDi+BeuK1cobvomuL8A/b
+01k/unK8RCSc43Oz969XL0Imnal0ugBS8kvNU3xHCzaFDmapCJcWNFfBZveA4+1wVMeT4C4oFVmH
+ursCAwEAAaOBnTCBmjATBgkrBgEEAYI3FAIEBh4EAEMAQTALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/
+BAUwAwEB/zAdBgNVHQ4EFgQUQjK2FvoE/f5dS3rD/fdMQB1aQ68wNAYDVR0fBC0wKzApoCegJYYj
+aHR0cDovL2NybC5zZWN1cmV0cnVzdC5jb20vU1RDQS5jcmwwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ
+KoZIhvcNAQEFBQADggEBADDtT0rhWDpSclu1pqNlGKa7UTt36Z3q059c4EVlew3KW+JwULKUBRSu
+SceNQQcSc5R+DCMh/bwQf2AQWnL1mA6s7Ll/3XpvXdMc9P+IBWlCqQVxyLesJugutIxq/3HcuLHf
+mbx8IVQr5Fiiu1cprp6poxkmD5kuCLDv/WnPmRoJjeOnnyvJNjR7JLN4TJUXpAYmHrZkUjZfYGfZ
+nMUFdAvnZyPSCPyI6a6Lf+Ew9Dd+/cYy2i2eRDAwbO4H3tI0/NL/QPZL9GZGBlSm8jIKYyYwa5vR
+3ItHuuG51WLQoqD0ZwV4KWMabwTW+MZMo5qxN7SN5ShLHZ4swrhovO0C7jE=
+-----END CERTIFICATE-----
+
+Secure Global CA
+================
+-----BEGIN CERTIFICATE-----
+MIIDvDCCAqSgAwIBAgIQB1YipOjUiolN9BPI8PjqpTANBgkqhkiG9w0BAQUFADBKMQswCQYDVQQG
+EwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBH
+bG9iYWwgQ0EwHhcNMDYxMTA3MTk0MjI4WhcNMjkxMjMxMTk1MjA2WjBKMQswCQYDVQQGEwJVUzEg
+MB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBHbG9iYWwg
+Q0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvNS7YrGxVaQZx5RNoJLNP2MwhR/jx
+YDiJiQPpvepeRlMJ3Fz1Wuj3RSoC6zFh1ykzTM7HfAo3fg+6MpjhHZevj8fcyTiW89sa/FHtaMbQ
+bqR8JNGuQsiWUGMu4P51/pinX0kuleM5M2SOHqRfkNJnPLLZ/kG5VacJjnIFHovdRIWCQtBJwB1g
+8NEXLJXr9qXBkqPFwqcIYA1gBBCWeZ4WNOaptvolRTnIHmX5k/Wq8VLcmZg9pYYaDDUz+kulBAYV
+HDGA76oYa8J719rO+TMg1fW9ajMtgQT7sFzUnKPiXB3jqUJ1XnvUd+85VLrJChgbEplJL4hL/VBi
+0XPnj3pDAgMBAAGjgZ0wgZowEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud
+EwEB/wQFMAMBAf8wHQYDVR0OBBYEFK9EBMJBfkiD2045AuzshHrmzsmkMDQGA1UdHwQtMCswKaAn
+oCWGI2h0dHA6Ly9jcmwuc2VjdXJldHJ1c3QuY29tL1NHQ0EuY3JsMBAGCSsGAQQBgjcVAQQDAgEA
+MA0GCSqGSIb3DQEBBQUAA4IBAQBjGghAfaReUw132HquHw0LURYD7xh8yOOvaliTFGCRsoTciE6+
+OYo68+aCiV0BN7OrJKQVDpI1WkpEXk5X+nXOH0jOZvQ8QCaSmGwb7iRGDBezUqXbpZGRzzfTb+cn
+CDpOGR86p1hcF895P4vkp9MmI50mD1hp/Ed+stCNi5O/KU9DaXR2Z0vPB4zmAve14bRDtUstFJ/5
+3CYNv6ZHdAbYiNE6KTCEztI5gGIbqMdXSbxqVVFnFUq+NQfk1XWYN3kwFNspnWzFacxHVaIw98xc
+f8LDmBxrThaA63p4ZUWiABqvDA1VZDRIuJK58bRQKfJPIx/abKwfROHdI3hRW8cW
+-----END CERTIFICATE-----
+
+COMODO Certification Authority
+==============================
+-----BEGIN CERTIFICATE-----
+MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCBgTELMAkGA1UE
+BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG
+A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNVBAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1
+dGhvcml0eTAeFw0wNjEyMDEwMDAwMDBaFw0yOTEyMzEyMzU5NTlaMIGBMQswCQYDVQQGEwJHQjEb
+MBkGA1UECBMSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFD
+T01PRE8gQ0EgTGltaXRlZDEnMCUGA1UEAxMeQ09NT0RPIENlcnRpZmljYXRpb24gQXV0aG9yaXR5
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0ECLi3LjkRv3UcEbVASY06m/weaKXTuH
++7uIzg3jLz8GlvCiKVCZrts7oVewdFFxze1CkU1B/qnI2GqGd0S7WWaXUF601CxwRM/aN5VCaTww
+xHGzUvAhTaHYujl8HJ6jJJ3ygxaYqhZ8Q5sVW7euNJH+1GImGEaaP+vB+fGQV+useg2L23IwambV
+4EajcNxo2f8ESIl33rXp+2dtQem8Ob0y2WIC8bGoPW43nOIv4tOiJovGuFVDiOEjPqXSJDlqR6sA
+1KGzqSX+DT+nHbrTUcELpNqsOO9VUCQFZUaTNE8tja3G1CEZ0o7KBWFxB3NH5YoZEr0ETc5OnKVI
+rLsm9wIDAQABo4GOMIGLMB0GA1UdDgQWBBQLWOWLxkwVN6RAqTCpIb5HNlpW/zAOBgNVHQ8BAf8E
+BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zBJBgNVHR8EQjBAMD6gPKA6hjhodHRwOi8vY3JsLmNvbW9k
+b2NhLmNvbS9DT01PRE9DZXJ0aWZpY2F0aW9uQXV0aG9yaXR5LmNybDANBgkqhkiG9w0BAQUFAAOC
+AQEAPpiem/Yb6dc5t3iuHXIYSdOH5EOC6z/JqvWote9VfCFSZfnVDeFs9D6Mk3ORLgLETgdxb8CP
+OGEIqB6BCsAvIC9Bi5HcSEW88cbeunZrM8gALTFGTO3nnc+IlP8zwFboJIYmuNg4ON8qa90SzMc/
+RxdMosIGlgnW2/4/PEZB31jiVg88O8EckzXZOFKs7sjsLjBOlDW0JB9LeGna8gI4zJVSk/BwJVmc
+IGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5ddBA6+C4OmF4O5MBKgxTMVBbkN
++8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IBZQ==
+-----END CERTIFICATE-----
+
+Network Solutions Certificate Authority
+=======================================
+-----BEGIN CERTIFICATE-----
+MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBiMQswCQYDVQQG
+EwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydOZXR3b3Jr
+IFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMx
+MjM1OTU5WjBiMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMu
+MTAwLgYDVQQDEydOZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0G
+CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkvH6SMG3G2I4rC7xGzuAnlt7e+foS0zwzc7MEL7xx
+jOWftiJgPl9dzgn/ggwbmlFQGiaJ3dVhXRncEg8tCqJDXRfQNJIg6nPPOCwGJgl6cvf6UDL4wpPT
+aaIjzkGxzOTVHzbRijr4jGPiFFlp7Q3Tf2vouAPlT2rlmGNpSAW+Lv8ztumXWWn4Zxmuk2GWRBXT
+crA/vGp97Eh/jcOrqnErU2lBUzS1sLnFBgrEsEX1QV1uiUV7PTsmjHTC5dLRfbIR1PtYMiKagMnc
+/Qzpf14Dl847ABSHJ3A4qY5usyd2mFHgBeMhqxrVhSI8KbWaFsWAqPS7azCPL0YCorEMIuDTAgMB
+AAGjgZcwgZQwHQYDVR0OBBYEFCEwyfsA106Y2oeqKtCnLrFAMadMMA4GA1UdDwEB/wQEAwIBBjAP
+BgNVHRMBAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwubmV0c29sc3NsLmNv
+bS9OZXR3b3JrU29sdXRpb25zQ2VydGlmaWNhdGVBdXRob3JpdHkuY3JsMA0GCSqGSIb3DQEBBQUA
+A4IBAQC7rkvnt1frf6ott3NHhWrB5KUd5Oc86fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q
+4LqILPxFzBiwmZVRDuwduIj/h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/
+GGUsyfJj4akH/nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv
+wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHNpGxlaKFJdlxD
+ydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey
+-----END CERTIFICATE-----
+
+COMODO ECC Certification Authority
+==================================
+-----BEGIN CERTIFICATE-----
+MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTELMAkGA1UEBhMC
+R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE
+ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBB
+dXRob3JpdHkwHhcNMDgwMzA2MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0Ix
+GzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR
+Q09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRo
+b3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQDR3svdcmCFYX7deSRFtSrYpn1PlILBs5BAH+X
+4QokPB0BBO490o0JlwzgdeT6+3eKKvUDYEs2ixYjFq0JcfRK9ChQtP6IHG4/bC8vCVlbpVsLM5ni
+wz2J+Wos77LTBumjQjBAMB0GA1UdDgQWBBR1cacZSBm8nZ3qQUfflMRId5nTeTAOBgNVHQ8BAf8E
+BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjEA7wNbeqy3eApyt4jf/7VG
+FAkK+qDmfQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdvGDeA
+U/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY=
+-----END CERTIFICATE-----
+
+OISTE WISeKey Global Root GA CA
+===============================
+-----BEGIN CERTIFICATE-----
+MIID8TCCAtmgAwIBAgIQQT1yx/RrH4FDffHSKFTfmjANBgkqhkiG9w0BAQUFADCBijELMAkGA1UE
+BhMCQ0gxEDAOBgNVBAoTB1dJU2VLZXkxGzAZBgNVBAsTEkNvcHlyaWdodCAoYykgMjAwNTEiMCAG
+A1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBH
+bG9iYWwgUm9vdCBHQSBDQTAeFw0wNTEyMTExNjAzNDRaFw0zNzEyMTExNjA5NTFaMIGKMQswCQYD
+VQQGEwJDSDEQMA4GA1UEChMHV0lTZUtleTEbMBkGA1UECxMSQ29weXJpZ2h0IChjKSAyMDA1MSIw
+IAYDVQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5
+IEdsb2JhbCBSb290IEdBIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy0+zAJs9
+Nt350UlqaxBJH+zYK7LG+DKBKUOVTJoZIyEVRd7jyBxRVVuuk+g3/ytr6dTqvirdqFEr12bDYVxg
+Asj1znJ7O7jyTmUIms2kahnBAbtzptf2w93NvKSLtZlhuAGio9RN1AU9ka34tAhxZK9w8RxrfvbD
+d50kc3vkDIzh2TbhmYsFmQvtRTEJysIA2/dyoJaqlYfQjse2YXMNdmaM3Bu0Y6Kff5MTMPGhJ9vZ
+/yxViJGg4E8HsChWjBgbl0SOid3gF27nKu+POQoxhILYQBRJLnpB5Kf+42TMwVlxSywhp1t94B3R
+LoGbw9ho972WG6xwsRYUC9tguSYBBQIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUw
+AwEB/zAdBgNVHQ4EFgQUswN+rja8sHnR3JQmthG+IbJphpQwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ
+KoZIhvcNAQEFBQADggEBAEuh/wuHbrP5wUOxSPMowB0uyQlB+pQAHKSkq0lPjz0e701vvbyk9vIm
+MMkQyh2I+3QZH4VFvbBsUfk2ftv1TDI6QU9bR8/oCy22xBmddMVHxjtqD6wU2zz0c5ypBd8A3HR4
++vg1YFkCExh8vPtNsCBtQ7tgMHpnM1zFmdH4LTlSc/uMqpclXHLZCB6rTjzjgTGfA6b7wP4piFXa
+hNVQA7bihKOmNqoROgHhGEvWRGizPflTdISzRpFGlgC3gCy24eMQ4tui5yiPAZZiFj4A4xylNoEY
+okxSdsARo27mHbrjWr42U8U+dY+GaSlYU7Wcu2+fXMUY7N0v4ZjJ/L7fCg0=
+-----END CERTIFICATE-----
+
+Certigna
+========
+-----BEGIN CERTIFICATE-----
+MIIDqDCCApCgAwIBAgIJAP7c4wEPyUj/MA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNVBAYTAkZSMRIw
+EAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hMB4XDTA3MDYyOTE1MTMwNVoXDTI3
+MDYyOTE1MTMwNVowNDELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCURoaW15b3RpczERMA8GA1UEAwwI
+Q2VydGlnbmEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDIaPHJ1tazNHUmgh7stL7q
+XOEm7RFHYeGifBZ4QCHkYJ5ayGPhxLGWkv8YbWkj4Sti993iNi+RB7lIzw7sebYs5zRLcAglozyH
+GxnygQcPOJAZ0xH+hrTy0V4eHpbNgGzOOzGTtvKg0KmVEn2lmsxryIRWijOp5yIVUxbwzBfsV1/p
+ogqYCd7jX5xv3EjjhQsVWqa6n6xI4wmy9/Qy3l40vhx4XUJbzg4ij02Q130yGLMLLGq/jj8UEYkg
+DncUtT2UCIf3JR7VsmAA7G8qKCVuKj4YYxclPz5EIBb2JsglrgVKtOdjLPOMFlN+XPsRGgjBRmKf
+Irjxwo1p3Po6WAbfAgMBAAGjgbwwgbkwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUGu3+QTmQ
+tCRZvgHyUtVF9lo53BEwZAYDVR0jBF0wW4AUGu3+QTmQtCRZvgHyUtVF9lo53BGhOKQ2MDQxCzAJ
+BgNVBAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hggkA/tzjAQ/J
+SP8wDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQUFAAOCAQEA
+hQMeknH2Qq/ho2Ge6/PAD/Kl1NqV5ta+aDY9fm4fTIrv0Q8hbV6lUmPOEvjvKtpv6zf+EwLHyzs+
+ImvaYS5/1HI93TDhHkxAGYwP15zRgzB7mFncfca5DClMoTOi62c6ZYTTluLtdkVwj7Ur3vkj1klu
+PBS1xp81HlDQwY9qcEQCYsuuHWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY
+1gkIl2PlwS6wt0QmwCbAr1UwnjvVNioZBPRcHv/PLLf/0P2HQBHVESO7SMAhqaQoLf0V+LBOK/Qw
+WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg==
+-----END CERTIFICATE-----
+
+Deutsche Telekom Root CA 2
+==========================
+-----BEGIN CERTIFICATE-----
+MIIDnzCCAoegAwIBAgIBJjANBgkqhkiG9w0BAQUFADBxMQswCQYDVQQGEwJERTEcMBoGA1UEChMT
+RGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0GA1UECxMWVC1UZWxlU2VjIFRydXN0IENlbnRlcjEjMCEG
+A1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBSb290IENBIDIwHhcNOTkwNzA5MTIxMTAwWhcNMTkwNzA5
+MjM1OTAwWjBxMQswCQYDVQQGEwJERTEcMBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0G
+A1UECxMWVC1UZWxlU2VjIFRydXN0IENlbnRlcjEjMCEGA1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBS
+b290IENBIDIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCrC6M14IspFLEUha88EOQ5
+bzVdSq7d6mGNlUn0b2SjGmBmpKlAIoTZ1KXleJMOaAGtuU1cOs7TuKhCQN/Po7qCWWqSG6wcmtoI
+KyUn+WkjR/Hg6yx6m/UTAtB+NHzCnjwAWav12gz1MjwrrFDa1sPeg5TKqAyZMg4ISFZbavva4VhY
+AUlfckE8FQYBjl2tqriTtM2e66foai1SNNs671x1Udrb8zH57nGYMsRUFUQM+ZtV7a3fGAigo4aK
+Se5TBY8ZTNXeWHmb0mocQqvF1afPaA+W5OFhmHZhyJF81j4A4pFQh+GdCuatl9Idxjp9y7zaAzTV
+jlsB9WoHtxa2bkp/AgMBAAGjQjBAMB0GA1UdDgQWBBQxw3kbuvVT1xfgiXotF2wKsyudMzAPBgNV
+HRMECDAGAQH/AgEFMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAlGRZrTlk5ynr
+E/5aw4sTV8gEJPB0d8Bg42f76Ymmg7+Wgnxu1MM9756AbrsptJh6sTtU6zkXR34ajgv8HzFZMQSy
+zhfzLMdiNlXiItiJVbSYSKpk+tYcNthEeFpaIzpXl/V6ME+un2pMSyuOoAPjPuCp1NJ70rOo4nI8
+rZ7/gFnkm0W09juwzTkZmDLl6iFhkOQxIY40sfcvNUqFENrnijchvllj4PKFiDFT1FQUhXB59C4G
+dyd1Lx+4ivn+xbrYNuSD7Odlt79jWvNGr4GUN9RBjNYj1h7P9WgbRGOiWrqnNVmh5XAFmw4jV5mU
+Cm26OWMohpLzGITY+9HPBVZkVw==
+-----END CERTIFICATE-----
+
+Cybertrust Global Root
+======================
+-----BEGIN CERTIFICATE-----
+MIIDoTCCAomgAwIBAgILBAAAAAABD4WqLUgwDQYJKoZIhvcNAQEFBQAwOzEYMBYGA1UEChMPQ3li
+ZXJ0cnVzdCwgSW5jMR8wHQYDVQQDExZDeWJlcnRydXN0IEdsb2JhbCBSb290MB4XDTA2MTIxNTA4
+MDAwMFoXDTIxMTIxNTA4MDAwMFowOzEYMBYGA1UEChMPQ3liZXJ0cnVzdCwgSW5jMR8wHQYDVQQD
+ExZDeWJlcnRydXN0IEdsb2JhbCBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
++Mi8vRRQZhP/8NN57CPytxrHjoXxEnOmGaoQ25yiZXRadz5RfVb23CO21O1fWLE3TdVJDm71aofW
+0ozSJ8bi/zafmGWgE07GKmSb1ZASzxQG9Dvj1Ci+6A74q05IlG2OlTEQXO2iLb3VOm2yHLtgwEZL
+AfVJrn5GitB0jaEMAs7u/OePuGtm839EAL9mJRQr3RAwHQeWP032a7iPt3sMpTjr3kfb1V05/Iin
+89cqdPHoWqI7n1C6poxFNcJQZZXcY4Lv3b93TZxiyWNzFtApD0mpSPCzqrdsxacwOUBdrsTiXSZT
+8M4cIwhhqJQZugRiQOwfOHB3EgZxpzAYXSUnpQIDAQABo4GlMIGiMA4GA1UdDwEB/wQEAwIBBjAP
+BgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBS2CHsNesysIEyGVjJez6tuhS1wVzA/BgNVHR8EODA2
+MDSgMqAwhi5odHRwOi8vd3d3Mi5wdWJsaWMtdHJ1c3QuY29tL2NybC9jdC9jdHJvb3QuY3JsMB8G
+A1UdIwQYMBaAFLYIew16zKwgTIZWMl7Pq26FLXBXMA0GCSqGSIb3DQEBBQUAA4IBAQBW7wojoFRO
+lZfJ+InaRcHUowAl9B8Tq7ejhVhpwjCt2BWKLePJzYFa+HMjWqd8BfP9IjsO0QbE2zZMcwSO5bAi
+5MXzLqXZI+O4Tkogp24CJJ8iYGd7ix1yCcUxXOl5n4BHPa2hCwcUPUf/A2kaDAtE52Mlp3+yybh2
+hO0j9n0Hq0V+09+zv+mKts2oomcrUtW3ZfA5TGOgkXmTUg9U3YO7n9GPp1Nzw8v/MOx8BLjYRB+T
+X3EJIrduPuocA06dGiBh+4E37F78CkWr1+cXVdCg6mCbpvbjjFspwgZgFJ0tl0ypkxWdYcQBX0jW
+WL1WMRJOEcgh4LMRkWXbtKaIOM5V
+-----END CERTIFICATE-----
+
+ePKI Root Certification Authority
+=================================
+-----BEGIN CERTIFICATE-----
+MIIFsDCCA5igAwIBAgIQFci9ZUdcr7iXAF7kBtK8nTANBgkqhkiG9w0BAQUFADBeMQswCQYDVQQG
+EwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0ZC4xKjAoBgNVBAsMIWVQS0kg
+Um9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNDEyMjAwMjMxMjdaFw0zNDEyMjAwMjMx
+MjdaMF4xCzAJBgNVBAYTAlRXMSMwIQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEq
+MCgGA1UECwwhZVBLSSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0B
+AQEFAAOCAg8AMIICCgKCAgEA4SUP7o3biDN1Z82tH306Tm2d0y8U82N0ywEhajfqhFAHSyZbCUNs
+IZ5qyNUD9WBpj8zwIuQf5/dqIjG3LBXy4P4AakP/h2XGtRrBp0xtInAhijHyl3SJCRImHJ7K2RKi
+lTza6We/CKBk49ZCt0Xvl/T29de1ShUCWH2YWEtgvM3XDZoTM1PRYfl61dd4s5oz9wCGzh1NlDiv
+qOx4UXCKXBCDUSH3ET00hl7lSM2XgYI1TBnsZfZrxQWh7kcT1rMhJ5QQCtkkO7q+RBNGMD+XPNjX
+12ruOzjjK9SXDrkb5wdJfzcq+Xd4z1TtW0ado4AOkUPB1ltfFLqfpo0kR0BZv3I4sjZsN/+Z0V0O
+WQqraffAsgRFelQArr5T9rXn4fg8ozHSqf4hUmTFpmfwdQcGlBSBVcYn5AGPF8Fqcde+S/uUWH1+
+ETOxQvdibBjWzwloPn9s9h6PYq2lY9sJpx8iQkEeb5mKPtf5P0B6ebClAZLSnT0IFaUQAS2zMnao
+lQ2zepr7BxB4EW/hj8e6DyUadCrlHJhBmd8hh+iVBmoKs2pHdmX2Os+PYhcZewoozRrSgx4hxyy/
+vv9haLdnG7t4TY3OZ+XkwY63I2binZB1NJipNiuKmpS5nezMirH4JYlcWrYvjB9teSSnUmjDhDXi
+Zo1jDiVN1Rmy5nk3pyKdVDECAwEAAaNqMGgwHQYDVR0OBBYEFB4M97Zn8uGSJglFwFU5Lnc/Qkqi
+MAwGA1UdEwQFMAMBAf8wOQYEZyoHAAQxMC8wLQIBADAJBgUrDgMCGgUAMAcGBWcqAwAABBRFsMLH
+ClZ87lt4DJX5GFPBphzYEDANBgkqhkiG9w0BAQUFAAOCAgEACbODU1kBPpVJufGBuvl2ICO1J2B0
+1GqZNF5sAFPZn/KmsSQHRGoqxqWOeBLoR9lYGxMqXnmbnwoqZ6YlPwZpVnPDimZI+ymBV3QGypzq
+KOg4ZyYr8dW1P2WT+DZdjo2NQCCHGervJ8A9tDkPJXtoUHRVnAxZfVo9QZQlUgjgRywVMRnVvwdV
+xrsStZf0X4OFunHB2WyBEXYKCrC/gpf36j36+uwtqSiUO1bd0lEursC9CBWMd1I0ltabrNMdjmEP
+NXubrjlpC2JgQCA2j6/7Nu4tCEoduL+bXPjqpRugc6bY+G7gMwRfaKonh+3ZwZCc7b3jajWvY9+r
+GNm65ulK6lCKD2GTHuItGeIwlDWSXQ62B68ZgI9HkFFLLk3dheLSClIKF5r8GrBQAuUBo2M3IUxE
+xJtRmREOc5wGj1QupyheRDmHVi03vYVElOEMSyycw5KFNGHLD7ibSkNS/jQ6fbjpKdx2qcgw+BRx
+gMYeNkh0IkFch4LoGHGLQYlE535YW6i4jRPpp2zDR+2zGp1iro2C6pSe3VkQw63d4k3jMdXH7Ojy
+sP6SHhYKGvzZ8/gntsm+HbRsZJB/9OTEW9c3rkIO3aQab3yIVMUWbuF6aC74Or8NpDyJO3inTmOD
+BCEIZ43ygknQW/2xzQ+DhNQ+IIX3Sj0rnP0qCglN6oH4EZw=
+-----END CERTIFICATE-----
+
+certSIGN ROOT CA
+================
+-----BEGIN CERTIFICATE-----
+MIIDODCCAiCgAwIBAgIGIAYFFnACMA0GCSqGSIb3DQEBBQUAMDsxCzAJBgNVBAYTAlJPMREwDwYD
+VQQKEwhjZXJ0U0lHTjEZMBcGA1UECxMQY2VydFNJR04gUk9PVCBDQTAeFw0wNjA3MDQxNzIwMDRa
+Fw0zMTA3MDQxNzIwMDRaMDsxCzAJBgNVBAYTAlJPMREwDwYDVQQKEwhjZXJ0U0lHTjEZMBcGA1UE
+CxMQY2VydFNJR04gUk9PVCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALczuX7I
+JUqOtdu0KBuqV5Do0SLTZLrTk+jUrIZhQGpgV2hUhE28alQCBf/fm5oqrl0Hj0rDKH/v+yv6efHH
+rfAQUySQi2bJqIirr1qjAOm+ukbuW3N7LBeCgV5iLKECZbO9xSsAfsT8AzNXDe3i+s5dRdY4zTW2
+ssHQnIFKquSyAVwdj1+ZxLGt24gh65AIgoDzMKND5pCCrlUoSe1b16kQOA7+j0xbm0bqQfWwCHTD
+0IgztnzXdN/chNFDDnU5oSVAKOp4yw4sLjmdjItuFhwvJoIQ4uNllAoEwF73XVv4EOLQunpL+943
+AAAaWyjj0pxzPjKHmKHJUS/X3qwzs08CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8B
+Af8EBAMCAcYwHQYDVR0OBBYEFOCMm9slSbPxfIbWskKHC9BroNnkMA0GCSqGSIb3DQEBBQUAA4IB
+AQA+0hyJLjX8+HXd5n9liPRyTMks1zJO890ZeUe9jjtbkw9QSSQTaxQGcu8J06Gh40CEyecYMnQ8
+SG4Pn0vU9x7Tk4ZkVJdjclDVVc/6IJMCopvDI5NOFlV2oHB5bc0hH88vLbwZ44gx+FkagQnIl6Z0
+x2DEW8xXjrJ1/RsCCdtZb3KTafcxQdaIOL+Hsr0Wefmq5L6IJd1hJyMctTEHBDa0GpC9oHRxUIlt
+vBTjD4au8as+x6AJzKNI0eDbZOeStc+vckNwi/nDhDwTqn6Sm1dTk/pwwpEOMfmbZ13pljheX7Nz
+TogVZ96edhBiIL5VaZVDADlN9u6wWk5JRFRYX0KD
+-----END CERTIFICATE-----
+
+GeoTrust Primary Certification Authority - G3
+=============================================
+-----BEGIN CERTIFICATE-----
+MIID/jCCAuagAwIBAgIQFaxulBmyeUtB9iepwxgPHzANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UE
+BhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA4IEdlb1RydXN0
+IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFy
+eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEczMB4XDTA4MDQwMjAwMDAwMFoXDTM3MTIwMTIz
+NTk1OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAo
+YykgMjAwOCBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMT
+LUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZI
+hvcNAQEBBQADggEPADCCAQoCggEBANziXmJYHTNXOTIz+uvLh4yn1ErdBojqZI4xmKU4kB6Yzy5j
+K/BGvESyiaHAKAxJcCGVn2TAppMSAmUmhsalifD614SgcK9PGpc/BkTVyetyEH3kMSj7HGHmKAdE
+c5IiaacDiGydY8hS2pgn5whMcD60yRLBxWeDXTPzAxHsatBT4tG6NmCUgLthY2xbF37fQJQeqw3C
+IShwiP/WJmxsYAQlTlV+fe+/lEjetx3dcI0FX4ilm/LC7urRQEFtYjgdVgbFA0dRIBn8exALDmKu
+dlW/X3e+PkkBUz2YJQN2JFodtNuJ6nnltrM7P7pMKEF/BqxqjsHQ9gUdfeZChuOl1UcCAwEAAaNC
+MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMR5yo6hTgMdHNxr
+2zFblD4/MH8tMA0GCSqGSIb3DQEBCwUAA4IBAQAtxRPPVoB7eni9n64smefv2t+UXglpp+duaIy9
+cr5HqQ6XErhK8WTTOd8lNNTBzU6B8A8ExCSzNJbGpqow32hhc9f5joWJ7w5elShKKiePEI4ufIbE
+Ap7aDHdlDkQNkv39sxY2+hENHYwOB4lqKVb3cvTdFZx3NWZXqxNT2I7BQMXXExZacse3aQHEerGD
+AWh9jUGhlBjBJVz88P6DAod8DQ3PLghcSkANPuyBYeYk28rgDi0Hsj5W3I31QYUHSJsMC8tJP33s
+t/3LjWeJGqvtux6jAAgIFyqCXDFdRootD4abdNlF+9RAsXqqaC2Gspki4cErx5z481+oghLrGREt
+-----END CERTIFICATE-----
+
+thawte Primary Root CA - G2
+===========================
+-----BEGIN CERTIFICATE-----
+MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBggqhkjOPQQDAzCBhDELMAkGA1UEBhMC
+VVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjE4MDYGA1UECxMvKGMpIDIwMDcgdGhhd3RlLCBJbmMu
+IC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3Qg
+Q0EgLSBHMjAeFw0wNzExMDUwMDAwMDBaFw0zODAxMTgyMzU5NTlaMIGEMQswCQYDVQQGEwJVUzEV
+MBMGA1UEChMMdGhhd3RlLCBJbmMuMTgwNgYDVQQLEy8oYykgMjAwNyB0aGF3dGUsIEluYy4gLSBG
+b3IgYXV0aG9yaXplZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAt
+IEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEotWcgnuVnfFSeIf+iha/BebfowJPDQfGAFG6DAJS
+LSKkQjnE/o/qycG+1E3/n3qe4rF8mq2nhglzh9HnmuN6papu+7qzcMBniKI11KOasf2twu8x+qi5
+8/sIxpHR+ymVo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU
+mtgAMADna3+FGO6Lts6KDPgR4bswCgYIKoZIzj0EAwMDaQAwZgIxAN344FdHW6fmCsO99YCKlzUN
+G4k8VIZ3KMqh9HneteY4sPBlcIx/AlTCv//YoT7ZzwIxAMSNlPzcU9LcnXgWHxUzI1NS41oxXZ3K
+rr0TKUQNJ1uo52icEvdYPy5yAlejj6EULg==
+-----END CERTIFICATE-----
+
+thawte Primary Root CA - G3
+===========================
+-----BEGIN CERTIFICATE-----
+MIIEKjCCAxKgAwIBAgIQYAGXt0an6rS0mtZLL/eQ+zANBgkqhkiG9w0BAQsFADCBrjELMAkGA1UE
+BhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2
+aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIwMDggdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhv
+cml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMzAeFw0w
+ODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIGuMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhh
+d3RlLCBJbmMuMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNlcnZpY2VzIERpdmlzaW9uMTgwNgYD
+VQQLEy8oYykgMjAwOCB0aGF3dGUsIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTEkMCIG
+A1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAtIEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
+MIIBCgKCAQEAsr8nLPvb2FvdeHsbnndmgcs+vHyu86YnmjSjaDFxODNi5PNxZnmxqWWjpYvVj2At
+P0LMqmsywCPLLEHd5N/8YZzic7IilRFDGF/Eth9XbAoFWCLINkw6fKXRz4aviKdEAhN0cXMKQlkC
++BsUa0Lfb1+6a4KinVvnSr0eAXLbS3ToO39/fR8EtCab4LRarEc9VbjXsCZSKAExQGbY2SS99irY
+7CFJXJv2eul/VTV+lmuNk5Mny5K76qxAwJ/C+IDPXfRa3M50hqY+bAtTyr2SzhkGcuYMXDhpxwTW
+vGzOW/b3aJzcJRVIiKHpqfiYnODz1TEoYRFsZ5aNOZnLwkUkOQIDAQABo0IwQDAPBgNVHRMBAf8E
+BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUrWyqlGCc7eT/+j4KdCtjA/e2Wb8wDQYJ
+KoZIhvcNAQELBQADggEBABpA2JVlrAmSicY59BDlqQ5mU1143vokkbvnRFHfxhY0Cu9qRFHqKweK
+A3rD6z8KLFIWoCtDuSWQP3CpMyVtRRooOyfPqsMpQhvfO0zAMzRbQYi/aytlryjvsvXDqmbOe1bu
+t8jLZ8HJnBoYuMTDSQPxYA5QzUbF83d597YV4Djbxy8ooAw/dyZ02SUS2jHaGh7cKUGRIjxpp7sC
+8rZcJwOJ9Abqm+RyguOhCcHpABnTPtRwa7pxpqpYrvS76Wy274fMm7v/OeZWYdMKp8RcTGB7BXcm
+er/YB1IsYvdwY9k5vG8cwnncdimvzsUsZAReiDZuMdRAGmI0Nj81Aa6sY6A=
+-----END CERTIFICATE-----
+
+GeoTrust Primary Certification Authority - G2
+=============================================
+-----BEGIN CERTIFICATE-----
+MIICrjCCAjWgAwIBAgIQPLL0SAoA4v7rJDteYD7DazAKBggqhkjOPQQDAzCBmDELMAkGA1UEBhMC
+VVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA3IEdlb1RydXN0IElu
+Yy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBD
+ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMB4XDTA3MTEwNTAwMDAwMFoXDTM4MDExODIzNTk1
+OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykg
+MjAwNyBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMTLUdl
+b1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjB2MBAGByqGSM49AgEG
+BSuBBAAiA2IABBWx6P0DFUPlrOuHNxFi79KDNlJ9RVcLSo17VDs6bl8VAsBQps8lL33KSLjHUGMc
+KiEIfJo22Av+0SbFWDEwKCXzXV2juLaltJLtbCyf691DiaI8S0iRHVDsJt/WYC69IaNCMEAwDwYD
+VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBVfNVdRVfslsq0DafwBo/q+
+EVXVMAoGCCqGSM49BAMDA2cAMGQCMGSWWaboCd6LuvpaiIjwH5HTRqjySkwCY/tsXzjbLkGTqQ7m
+ndwxHLKgpxgceeHHNgIwOlavmnRs9vuD4DPTCF+hnMJbn0bWtsuRBmOiBuczrD6ogRLQy7rQkgu2
+npaqBA+K
+-----END CERTIFICATE-----
+
+VeriSign Universal Root Certification Authority
+===============================================
+-----BEGIN CERTIFICATE-----
+MIIEuTCCA6GgAwIBAgIQQBrEZCGzEyEDDrvkEhrFHTANBgkqhkiG9w0BAQsFADCBvTELMAkGA1UE
+BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO
+ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwOCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk
+IHVzZSBvbmx5MTgwNgYDVQQDEy9WZXJpU2lnbiBVbml2ZXJzYWwgUm9vdCBDZXJ0aWZpY2F0aW9u
+IEF1dGhvcml0eTAeFw0wODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIG9MQswCQYDVQQGEwJV
+UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
+cmsxOjA4BgNVBAsTMShjKSAyMDA4IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
+IG9ubHkxODA2BgNVBAMTL1ZlcmlTaWduIFVuaXZlcnNhbCBSb290IENlcnRpZmljYXRpb24gQXV0
+aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx2E3XrEBNNti1xWb/1hajCMj
+1mCOkdeQmIN65lgZOIzF9uVkhbSicfvtvbnazU0AtMgtc6XHaXGVHzk8skQHnOgO+k1KxCHfKWGP
+MiJhgsWHH26MfF8WIFFE0XBPV+rjHOPMee5Y2A7Cs0WTwCznmhcrewA3ekEzeOEz4vMQGn+HLL72
+9fdC4uW/h2KJXwBL38Xd5HVEMkE6HnFuacsLdUYI0crSK5XQz/u5QGtkjFdN/BMReYTtXlT2NJ8I
+AfMQJQYXStrxHXpma5hgZqTZ79IugvHw7wnqRMkVauIDbjPTrJ9VAMf2CGqUuV/c4DPxhGD5WycR
+tPwW8rtWaoAljQIDAQABo4GyMIGvMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMG0G
+CCsGAQUFBwEMBGEwX6FdoFswWTBXMFUWCWltYWdlL2dpZjAhMB8wBwYFKw4DAhoEFI/l0xqGrI2O
+a8PPgGrUSBgsexkuMCUWI2h0dHA6Ly9sb2dvLnZlcmlzaWduLmNvbS92c2xvZ28uZ2lmMB0GA1Ud
+DgQWBBS2d/ppSEefUxLVwuoHMnYH0ZcHGTANBgkqhkiG9w0BAQsFAAOCAQEASvj4sAPmLGd75JR3
+Y8xuTPl9Dg3cyLk1uXBPY/ok+myDjEedO2Pzmvl2MpWRsXe8rJq+seQxIcaBlVZaDrHC1LGmWazx
+Y8u4TB1ZkErvkBYoH1quEPuBUDgMbMzxPcP1Y+Oz4yHJJDnp/RVmRvQbEdBNc6N9Rvk97ahfYtTx
+P/jgdFcrGJ2BtMQo2pSXpXDrrB2+BxHw1dvd5Yzw1TKwg+ZX4o+/vqGqvz0dtdQ46tewXDpPaj+P
+wGZsY6rp2aQW9IHRlRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4
+mJO37M2CYfE45k+XmCpajQ==
+-----END CERTIFICATE-----
+
+VeriSign Class 3 Public Primary Certification Authority - G4
+============================================================
+-----BEGIN CERTIFICATE-----
+MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjELMAkGA1UEBhMC
+VVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3
+b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVz
+ZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmlj
+YXRpb24gQXV0aG9yaXR5IC0gRzQwHhcNMDcxMTA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCByjEL
+MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBU
+cnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRo
+b3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5
+IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASnVnp8
+Utpkmw4tXNherJI9/gHmGUo9FANL+mAnINmDiWn6VMaaGF5VKmTeBvaNSjutEDxlPZCIBIngMGGz
+rl0Bp3vefLK+ymVhAIau2o970ImtTR1ZmkGxvEeA3J5iw/mjgbIwga8wDwYDVR0TAQH/BAUwAwEB
+/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEw
+HzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVyaXNpZ24u
+Y29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFLMWkf3upm7ktS5Jj4d4gYDs5bG1MAoGCCqGSM49BAMD
+A2gAMGUCMGYhDBgmYFo4e1ZC4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIx
+AJw9SDkjOVgaFRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA==
+-----END CERTIFICATE-----
+
+NetLock Arany (Class Gold) Főtanúsítvány
+========================================
+-----BEGIN CERTIFICATE-----
+MIIEFTCCAv2gAwIBAgIGSUEs5AAQMA0GCSqGSIb3DQEBCwUAMIGnMQswCQYDVQQGEwJIVTERMA8G
+A1UEBwwIQnVkYXBlc3QxFTATBgNVBAoMDE5ldExvY2sgS2Z0LjE3MDUGA1UECwwuVGFuw7pzw610
+dsOhbnlraWFkw7NrIChDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzKTE1MDMGA1UEAwwsTmV0TG9jayBB
+cmFueSAoQ2xhc3MgR29sZCkgRsWRdGFuw7pzw610dsOhbnkwHhcNMDgxMjExMTUwODIxWhcNMjgx
+MjA2MTUwODIxWjCBpzELMAkGA1UEBhMCSFUxETAPBgNVBAcMCEJ1ZGFwZXN0MRUwEwYDVQQKDAxO
+ZXRMb2NrIEtmdC4xNzA1BgNVBAsMLlRhbsO6c8OtdHbDoW55a2lhZMOzayAoQ2VydGlmaWNhdGlv
+biBTZXJ2aWNlcykxNTAzBgNVBAMMLE5ldExvY2sgQXJhbnkgKENsYXNzIEdvbGQpIEbFkXRhbsO6
+c8OtdHbDoW55MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxCRec75LbRTDofTjl5Bu
+0jBFHjzuZ9lk4BqKf8owyoPjIMHj9DrTlF8afFttvzBPhCf2nx9JvMaZCpDyD/V/Q4Q3Y1GLeqVw
+/HpYzY6b7cNGbIRwXdrzAZAj/E4wqX7hJ2Pn7WQ8oLjJM2P+FpD/sLj916jAwJRDC7bVWaaeVtAk
+H3B5r9s5VA1lddkVQZQBr17s9o3x/61k/iCa11zr/qYfCGSji3ZVrR47KGAuhyXoqq8fxmRGILdw
+fzzeSNuWU7c5d+Qa4scWhHaXWy+7GRWF+GmF9ZmnqfI0p6m2pgP8b4Y9VHx2BJtr+UBdADTHLpl1
+neWIA6pN+APSQnbAGwIDAKiLo0UwQzASBgNVHRMBAf8ECDAGAQH/AgEEMA4GA1UdDwEB/wQEAwIB
+BjAdBgNVHQ4EFgQUzPpnk/C2uNClwB7zU/2MU9+D15YwDQYJKoZIhvcNAQELBQADggEBAKt/7hwW
+qZw8UQCgwBEIBaeZ5m8BiFRhbvG5GK1Krf6BQCOUL/t1fC8oS2IkgYIL9WHxHG64YTjrgfpioTta
+YtOUZcTh5m2C+C8lcLIhJsFyUR+MLMOEkMNaj7rP9KdlpeuY0fsFskZ1FSNqb4VjMIDw1Z4fKRzC
+bLBQWV2QWzuoDTDPv31/zvGdg73JRm4gpvlhUbohL3u+pRVjodSVh/GeufOJ8z2FuLjbvrW5Kfna
+NwUASZQDhETnv0Mxz3WLJdH0pmT1kvarBes96aULNmLazAZfNou2XjG4Kvte9nHfRCaexOYNkbQu
+dZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E=
+-----END CERTIFICATE-----
+
+Staat der Nederlanden Root CA - G2
+==================================
+-----BEGIN CERTIFICATE-----
+MIIFyjCCA7KgAwIBAgIEAJiWjDANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJOTDEeMBwGA1UE
+CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFhdCBkZXIgTmVkZXJsYW5kZW4g
+Um9vdCBDQSAtIEcyMB4XDTA4MDMyNjExMTgxN1oXDTIwMDMyNTExMDMxMFowWjELMAkGA1UEBhMC
+TkwxHjAcBgNVBAoMFVN0YWF0IGRlciBOZWRlcmxhbmRlbjErMCkGA1UEAwwiU3RhYXQgZGVyIE5l
+ZGVybGFuZGVuIFJvb3QgQ0EgLSBHMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMVZ
+5291qj5LnLW4rJ4L5PnZyqtdj7U5EILXr1HgO+EASGrP2uEGQxGZqhQlEq0i6ABtQ8SpuOUfiUtn
+vWFI7/3S4GCI5bkYYCjDdyutsDeqN95kWSpGV+RLufg3fNU254DBtvPUZ5uW6M7XxgpT0GtJlvOj
+CwV3SPcl5XCsMBQgJeN/dVrlSPhOewMHBPqCYYdu8DvEpMfQ9XQ+pV0aCPKbJdL2rAQmPlU6Yiil
+e7Iwr/g3wtG61jj99O9JMDeZJiFIhQGp5Rbn3JBV3w/oOM2ZNyFPXfUib2rFEhZgF1XyZWampzCR
+OME4HYYEhLoaJXhena/MUGDWE4dS7WMfbWV9whUYdMrhfmQpjHLYFhN9C0lK8SgbIHRrxT3dsKpI
+CT0ugpTNGmXZK4iambwYfp/ufWZ8Pr2UuIHOzZgweMFvZ9C+X+Bo7d7iscksWXiSqt8rYGPy5V65
+48r6f1CGPqI0GAwJaCgRHOThuVw+R7oyPxjMW4T182t0xHJ04eOLoEq9jWYv6q012iDTiIJh8BIi
+trzQ1aTsr1SIJSQ8p22xcik/Plemf1WvbibG/ufMQFxRRIEKeN5KzlW/HdXZt1bv8Hb/C3m1r737
+qWmRRpdogBQ2HbN/uymYNqUg+oJgYjOk7Na6B6duxc8UpufWkjTYgfX8HV2qXB72o007uPc5AgMB
+AAGjgZcwgZQwDwYDVR0TAQH/BAUwAwEB/zBSBgNVHSAESzBJMEcGBFUdIAAwPzA9BggrBgEFBQcC
+ARYxaHR0cDovL3d3dy5wa2lvdmVyaGVpZC5ubC9wb2xpY2llcy9yb290LXBvbGljeS1HMjAOBgNV
+HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJFoMocVHYnitfGsNig0jQt8YojrMA0GCSqGSIb3DQEBCwUA
+A4ICAQCoQUpnKpKBglBu4dfYszk78wIVCVBR7y29JHuIhjv5tLySCZa59sCrI2AGeYwRTlHSeYAz
++51IvuxBQ4EffkdAHOV6CMqqi3WtFMTC6GY8ggen5ieCWxjmD27ZUD6KQhgpxrRW/FYQoAUXvQwj
+f/ST7ZwaUb7dRUG/kSS0H4zpX897IZmflZ85OkYcbPnNe5yQzSipx6lVu6xiNGI1E0sUOlWDuYaN
+kqbG9AclVMwWVxJKgnjIFNkXgiYtXSAfea7+1HAWFpWD2DU5/1JddRwWxRNVz0fMdWVSSt7wsKfk
+CpYL+63C4iWEst3kvX5ZbJvw8NjnyvLplzh+ib7M+zkXYT9y2zqR2GUBGR2tUKRXCnxLvJxxcypF
+URmFzI79R6d0lR2o0a9OF7FpJsKqeFdbxU2n5Z4FF5TKsl+gSRiNNOkmbEgeqmiSBeGCc1qb3Adb
+CG19ndeNIdn8FCCqwkXfP+cAslHkwvgFuXkajDTznlvkN1trSt8sV4pAWja63XVECDdCcAz+3F4h
+oKOKwJCcaNpQ5kUQR3i2TtJlycM33+FCY7BXN0Ute4qcvwXqZVUz9zkQxSgqIXobisQk+T8VyJoV
+IPVVYpbtbZNQvOSqeK3Zywplh6ZmwcSBo3c6WB4L7oOLnR7SUqTMHW+wmG2UMbX4cQrcufx9MmDm
+66+KAQ==
+-----END CERTIFICATE-----
+
+Hongkong Post Root CA 1
+=======================
+-----BEGIN CERTIFICATE-----
+MIIDMDCCAhigAwIBAgICA+gwDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoT
+DUhvbmdrb25nIFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMB4XDTAzMDUx
+NTA1MTMxNFoXDTIzMDUxNTA0NTIyOVowRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoTDUhvbmdrb25n
+IFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMIIBIjANBgkqhkiG9w0BAQEF
+AAOCAQ8AMIIBCgKCAQEArP84tulmAknjorThkPlAj3n54r15/gK97iSSHSL22oVyaf7XPwnU3ZG1
+ApzQjVrhVcNQhrkpJsLj2aDxaQMoIIBFIi1WpztUlVYiWR8o3x8gPW2iNr4joLFutbEnPzlTCeqr
+auh0ssJlXI6/fMN4hM2eFvz1Lk8gKgifd/PFHsSaUmYeSF7jEAaPIpjhZY4bXSNmO7ilMlHIhqqh
+qZ5/dpTCpmy3QfDVyAY45tQM4vM7TG1QjMSDJ8EThFk9nnV0ttgCXjqQesBCNnLsak3c78QA3xMY
+V18meMjWCnl3v/evt3a5pQuEF10Q6m/hq5URX208o1xNg1vysxmKgIsLhwIDAQABoyYwJDASBgNV
+HRMBAf8ECDAGAQH/AgEDMA4GA1UdDwEB/wQEAwIBxjANBgkqhkiG9w0BAQUFAAOCAQEADkbVPK7i
+h9legYsCmEEIjEy82tvuJxuC52pF7BaLT4Wg87JwvVqWuspube5Gi27nKi6Wsxkz67SfqLI37pio
+l7Yutmcn1KZJ/RyTZXaeQi/cImyaT/JaFTmxcdcrUehtHJjA2Sr0oYJ71clBoiMBdDhViw+5Lmei
+IAQ32pwL0xch4I+XeTRvhEgCIDMb5jREn5Fw9IBehEPCKdJsEhTkYY2sEJCehFC78JZvRZ+K88ps
+T/oROhUVRsPNH4NbLUES7VBnQRM9IauUiqpOfMGx+6fWtScvl6tu4B3i0RwsH0Ti/L6RoZz71ilT
+c4afU9hDDl3WY4JxHYB0yvbiAmvZWg==
+-----END CERTIFICATE-----
+
+SecureSign RootCA11
+===================
+-----BEGIN CERTIFICATE-----
+MIIDbTCCAlWgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQGEwJKUDErMCkGA1UEChMi
+SmFwYW4gQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcywgSW5jLjEcMBoGA1UEAxMTU2VjdXJlU2lnbiBS
+b290Q0ExMTAeFw0wOTA0MDgwNDU2NDdaFw0yOTA0MDgwNDU2NDdaMFgxCzAJBgNVBAYTAkpQMSsw
+KQYDVQQKEyJKYXBhbiBDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzLCBJbmMuMRwwGgYDVQQDExNTZWN1
+cmVTaWduIFJvb3RDQTExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA/XeqpRyQBTvL
+TJszi1oURaTnkBbR31fSIRCkF/3frNYfp+TbfPfs37gD2pRY/V1yfIw/XwFndBWW4wI8h9uuywGO
+wvNmxoVF9ALGOrVisq/6nL+k5tSAMJjzDbaTj6nU2DbysPyKyiyhFTOVMdrAG/LuYpmGYz+/3ZMq
+g6h2uRMft85OQoWPIucuGvKVCbIFtUROd6EgvanyTgp9UK31BQ1FT0Zx/Sg+U/sE2C3XZR1KG/rP
+O7AxmjVuyIsG0wCR8pQIZUyxNAYAeoni8McDWc/V1uinMrPmmECGxc0nEovMe863ETxiYAcjPitA
+bpSACW22s293bzUIUPsCh8U+iQIDAQABo0IwQDAdBgNVHQ4EFgQUW/hNT7KlhtQ60vFjmqC+CfZX
+t94wDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAKCh
+OBZmLqdWHyGcBvod7bkixTgm2E5P7KN/ed5GIaGHd48HCJqypMWvDzKYC3xmKbabfSVSSUOrTC4r
+bnpwrxYO4wJs+0LmGJ1F2FXI6Dvd5+H0LgscNFxsWEr7jIhQX5Ucv+2rIrVls4W6ng+4reV6G4pQ
+Oh29Dbx7VFALuUKvVaAYga1lme++5Jy/xIWrQbJUb9wlze144o4MjQlJ3WN7WmmWAiGovVJZ6X01
+y8hSyn+B/tlr0/cR7SXf+Of5pPpyl4RTDaXQMhhRdlkUbA/r7F+AjHVDg8OFmP9Mni0N5HeDk061
+lgeLKBObjBmNQSdJQO7e5iNEOdyhIta6A/I=
+-----END CERTIFICATE-----
+
+Microsec e-Szigno Root CA 2009
+==============================
+-----BEGIN CERTIFICATE-----
+MIIECjCCAvKgAwIBAgIJAMJ+QwRORz8ZMA0GCSqGSIb3DQEBCwUAMIGCMQswCQYDVQQGEwJIVTER
+MA8GA1UEBwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jv
+c2VjIGUtU3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5o
+dTAeFw0wOTA2MTYxMTMwMThaFw0yOTEyMzAxMTMwMThaMIGCMQswCQYDVQQGEwJIVTERMA8GA1UE
+BwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jvc2VjIGUt
+U3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5odTCCASIw
+DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOn4j/NjrdqG2KfgQvvPkd6mJviZpWNwrZuuyjNA
+fW2WbqEORO7hE52UQlKavXWFdCyoDh2Tthi3jCyoz/tccbna7P7ofo/kLx2yqHWH2Leh5TvPmUpG
+0IMZfcChEhyVbUr02MelTTMuhTlAdX4UfIASmFDHQWe4oIBhVKZsTh/gnQ4H6cm6M+f+wFUoLAKA
+pxn1ntxVUwOXewdI/5n7N4okxFnMUBBjjqqpGrCEGob5X7uxUG6k0QrM1XF+H6cbfPVTbiJfyyvm
+1HxdrtbCxkzlBQHZ7Vf8wSN5/PrIJIOV87VqUQHQd9bpEqH5GoP7ghu5sJf0dgYzQ0mg/wu1+rUC
+AwEAAaOBgDB+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTLD8bf
+QkPMPcu1SCOhGnqmKrs0aDAfBgNVHSMEGDAWgBTLD8bfQkPMPcu1SCOhGnqmKrs0aDAbBgNVHREE
+FDASgRBpbmZvQGUtc3ppZ25vLmh1MA0GCSqGSIb3DQEBCwUAA4IBAQDJ0Q5eLtXMs3w+y/w9/w0o
+lZMEyL/azXm4Q5DwpL7v8u8hmLzU1F0G9u5C7DBsoKqpyvGvivo/C3NqPuouQH4frlRheesuCDfX
+I/OMn74dseGkddug4lQUsbocKaQY9hK6ohQU4zE1yED/t+AFdlfBHFny+L/k7SViXITwfn4fs775
+tyERzAMBVnCnEJIeGzSBHq2cGsMEPO0CYdYeBvNfOofyK/FFh+U9rNHHV4S9a67c2Pm2G2JwCz02
+yULyMtd6YebS2z3PyKnJm9zbWETXbzivf3jTo60adbocwTZ8jx5tHMN1Rq41Bab2XD0h7lbwyYIi
+LXpUq3DDfSJlgnCW
+-----END CERTIFICATE-----
+
+GlobalSign Root CA - R3
+=======================
+-----BEGIN CERTIFICATE-----
+MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4GA1UECxMXR2xv
+YmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh
+bFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT
+aWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln
+bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWt
+iHL8RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsTgHeMCOFJ
+0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmmKPZpO/bLyCiR5Z2KYVc3
+rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zdQQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjl
+OCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZXriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2
+xmmFghcCAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE
+FI/wS3+oLkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZURUm7
+lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMpjjM5RcOO5LlXbKr8
+EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK6fBdRoyV3XpYKBovHd7NADdBj+1E
+bddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQXmcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18
+YIvDQVETI53O9zJrlAGomecsMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7r
+kpeDMdmztcpHWD9f
+-----END CERTIFICATE-----
+
+Autoridad de Certificacion Firmaprofesional CIF A62634068
+=========================================================
+-----BEGIN CERTIFICATE-----
+MIIGFDCCA/ygAwIBAgIIU+w77vuySF8wDQYJKoZIhvcNAQEFBQAwUTELMAkGA1UEBhMCRVMxQjBA
+BgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2
+MjYzNDA2ODAeFw0wOTA1MjAwODM4MTVaFw0zMDEyMzEwODM4MTVaMFExCzAJBgNVBAYTAkVTMUIw
+QAYDVQQDDDlBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBB
+NjI2MzQwNjgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKlmuO6vj78aI14H9M2uDD
+Utd9thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOSL/UR5GLXMnE42QQMcas9UX4P
+B99jBVzpv5RvwSmCwLTaUbDBPLutN0pcyvFLNg4kq7/DhHf9qFD0sefGL9ItWY16Ck6WaVICqjaY
+7Pz6FIMMNx/Jkjd/14Et5cS54D40/mf0PmbR0/RAz15iNA9wBj4gGFrO93IbJWyTdBSTo3OxDqqH
+ECNZXyAFGUftaI6SEspd/NYrspI8IM/hX68gvqB2f3bl7BqGYTM+53u0P6APjqK5am+5hyZvQWyI
+plD9amML9ZMWGxmPsu2bm8mQ9QEM3xk9Dz44I8kvjwzRAv4bVdZO0I08r0+k8/6vKtMFnXkIoctX
+MbScyJCyZ/QYFpM6/EfY0XiWMR+6KwxfXZmtY4laJCB22N/9q06mIqqdXuYnin1oKaPnirjaEbsX
+LZmdEyRG98Xi2J+Of8ePdG1asuhy9azuJBCtLxTa/y2aRnFHvkLfuwHb9H/TKI8xWVvTyQKmtFLK
+bpf7Q8UIJm+K9Lv9nyiqDdVF8xM6HdjAeI9BZzwelGSuewvF6NkBiDkal4ZkQdU7hwxu+g/GvUgU
+vzlN1J5Bto+WHWOWk9mVBngxaJ43BjuAiUVhOSPHG0SjFeUc+JIwuwIDAQABo4HvMIHsMBIGA1Ud
+EwEB/wQIMAYBAf8CAQEwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRlzeurNR4APn7VdMActHNH
+DhpkLzCBpgYDVR0gBIGeMIGbMIGYBgRVHSAAMIGPMC8GCCsGAQUFBwIBFiNodHRwOi8vd3d3LmZp
+cm1hcHJvZmVzaW9uYWwuY29tL2NwczBcBggrBgEFBQcCAjBQHk4AUABhAHMAZQBvACAAZABlACAA
+bABhACAAQgBvAG4AYQBuAG8AdgBhACAANAA3ACAAQgBhAHIAYwBlAGwAbwBuAGEAIAAwADgAMAAx
+ADcwDQYJKoZIhvcNAQEFBQADggIBABd9oPm03cXF661LJLWhAqvdpYhKsg9VSytXjDvlMd3+xDLx
+51tkljYyGOylMnfX40S2wBEqgLk9am58m9Ot/MPWo+ZkKXzR4Tgegiv/J2Wv+xYVxC5xhOW1//qk
+R71kMrv2JYSiJ0L1ILDCExARzRAVukKQKtJE4ZYm6zFIEv0q2skGz3QeqUvVhyj5eTSSPi5E6PaP
+T481PyWzOdxjKpBrIF/EUhJOlywqrJ2X3kjyo2bbwtKDlaZmp54lD+kLM5FlClrD2VQS3a/DTg4f
+Jl4N3LON7NWBcN7STyQF82xO9UxJZo3R/9ILJUFI/lGExkKvgATP0H5kSeTy36LssUzAKh3ntLFl
+osS88Zj0qnAHY7S42jtM+kAiMFsRpvAFDsYCA0irhpuF3dvd6qJ2gHN99ZwExEWN57kci57q13XR
+crHedUTnQn3iV2t93Jm8PYMo6oCTjcVMZcFwgbg4/EMxsvYDNEeyrPsiBsse3RdHHF9mudMaotoR
+saS8I8nkvof/uZS2+F0gStRf571oe2XyFR7SOqkt6dhrJKyXWERHrVkY8SFlcN7ONGCoQPHzPKTD
+KCOM/iczQ0CgFzzr6juwcqajuUpLXhZI9LK8yIySxZ2frHI2vDSANGupi5LAuBft7HZT9SQBjLMi
+6Et8Vcad+qMUu2WFbm5PEn4KPJ2V
+-----END CERTIFICATE-----
+
+Izenpe.com
+==========
+-----BEGIN CERTIFICATE-----
+MIIF8TCCA9mgAwIBAgIQALC3WhZIX7/hy/WL1xnmfTANBgkqhkiG9w0BAQsFADA4MQswCQYDVQQG
+EwJFUzEUMBIGA1UECgwLSVpFTlBFIFMuQS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wHhcNMDcxMjEz
+MTMwODI4WhcNMzcxMjEzMDgyNzI1WjA4MQswCQYDVQQGEwJFUzEUMBIGA1UECgwLSVpFTlBFIFMu
+QS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDJ
+03rKDx6sp4boFmVqscIbRTJxldn+EFvMr+eleQGPicPK8lVx93e+d5TzcqQsRNiekpsUOqHnJJAK
+ClaOxdgmlOHZSOEtPtoKct2jmRXagaKH9HtuJneJWK3W6wyyQXpzbm3benhB6QiIEn6HLmYRY2xU
++zydcsC8Lv/Ct90NduM61/e0aL6i9eOBbsFGb12N4E3GVFWJGjMxCrFXuaOKmMPsOzTFlUFpfnXC
+PCDFYbpRR6AgkJOhkEvzTnyFRVSa0QUmQbC1TR0zvsQDyCV8wXDbO/QJLVQnSKwv4cSsPsjLkkxT
+OTcj7NMB+eAJRE1NZMDhDVqHIrytG6P+JrUV86f8hBnp7KGItERphIPzidF0BqnMC9bC3ieFUCbK
+F7jJeodWLBoBHmy+E60QrLUk9TiRodZL2vG70t5HtfG8gfZZa88ZU+mNFctKy6lvROUbQc/hhqfK
+0GqfvEyNBjNaooXlkDWgYlwWTvDjovoDGrQscbNYLN57C9saD+veIR8GdwYDsMnvmfzAuU8Lhij+
+0rnq49qlw0dpEuDb8PYZi+17cNcC1u2HGCgsBCRMd+RIihrGO5rUD8r6ddIBQFqNeb+Lz0vPqhbB
+leStTIo+F5HUsWLlguWABKQDfo2/2n+iD5dPDNMN+9fR5XJ+HMh3/1uaD7euBUbl8agW7EekFwID
+AQABo4H2MIHzMIGwBgNVHREEgagwgaWBD2luZm9AaXplbnBlLmNvbaSBkTCBjjFHMEUGA1UECgw+
+SVpFTlBFIFMuQS4gLSBDSUYgQTAxMzM3MjYwLVJNZXJjLlZpdG9yaWEtR2FzdGVpeiBUMTA1NSBG
+NjIgUzgxQzBBBgNVBAkMOkF2ZGEgZGVsIE1lZGl0ZXJyYW5lbyBFdG9yYmlkZWEgMTQgLSAwMTAx
+MCBWaXRvcmlhLUdhc3RlaXowDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0O
+BBYEFB0cZQ6o8iV7tJHP5LGx5r1VdGwFMA0GCSqGSIb3DQEBCwUAA4ICAQB4pgwWSp9MiDrAyw6l
+Fn2fuUhfGI8NYjb2zRlrrKvV9pF9rnHzP7MOeIWblaQnIUdCSnxIOvVFfLMMjlF4rJUT3sb9fbga
+kEyrkgPH7UIBzg/YsfqikuFgba56awmqxinuaElnMIAkejEWOVt+8Rwu3WwJrfIxwYJOubv5vr8q
+hT/AQKM6WfxZSzwoJNu0FXWuDYi6LnPAvViH5ULy617uHjAimcs30cQhbIHsvm0m5hzkQiCeR7Cs
+g1lwLDXWrzY0tM07+DKo7+N4ifuNRSzanLh+QBxh5z6ikixL8s36mLYp//Pye6kfLqCTVyvehQP5
+aTfLnnhqBbTFMXiJ7HqnheG5ezzevh55hM6fcA5ZwjUukCox2eRFekGkLhObNA5me0mrZJfQRsN5
+nXJQY6aYWwa9SG3YOYNw6DXwBdGqvOPbyALqfP2C2sJbUjWumDqtujWTI6cfSN01RpiyEGjkpTHC
+ClguGYEQyVB1/OpaFs4R1+7vUIgtYf8/QnMFlEPVjjxOAToZpR9GTnfQXeWBIiGH/pR9hNiTrdZo
+Q0iy2+tzJOeRf1SktoA+naM8THLCV8Sg1Mw4J87VBp6iSNnpn86CcDaTmjvfliHjWbcM2pE38P1Z
+WrOZyGlsQyYBNWNgVYkDOnXYukrZVP/u3oDYLdE41V4tC5h9Pmzb/CaIxw==
+-----END CERTIFICATE-----
+
+Chambers of Commerce Root - 2008
+================================
+-----BEGIN CERTIFICATE-----
+MIIHTzCCBTegAwIBAgIJAKPaQn6ksa7aMA0GCSqGSIb3DQEBBQUAMIGuMQswCQYDVQQGEwJFVTFD
+MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv
+bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu
+QS4xKTAnBgNVBAMTIENoYW1iZXJzIG9mIENvbW1lcmNlIFJvb3QgLSAyMDA4MB4XDTA4MDgwMTEy
+Mjk1MFoXDTM4MDczMTEyMjk1MFowga4xCzAJBgNVBAYTAkVVMUMwQQYDVQQHEzpNYWRyaWQgKHNl
+ZSBjdXJyZW50IGFkZHJlc3MgYXQgd3d3LmNhbWVyZmlybWEuY29tL2FkZHJlc3MpMRIwEAYDVQQF
+EwlBODI3NDMyODcxGzAZBgNVBAoTEkFDIENhbWVyZmlybWEgUy5BLjEpMCcGA1UEAxMgQ2hhbWJl
+cnMgb2YgQ29tbWVyY2UgUm9vdCAtIDIwMDgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC
+AQCvAMtwNyuAWko6bHiUfaN/Gh/2NdW928sNRHI+JrKQUrpjOyhYb6WzbZSm891kDFX29ufyIiKA
+XuFixrYp4YFs8r/lfTJqVKAyGVn+H4vXPWCGhSRv4xGzdz4gljUha7MI2XAuZPeEklPWDrCQiorj
+h40G072QDuKZoRuGDtqaCrsLYVAGUvGef3bsyw/QHg3PmTA9HMRFEFis1tPo1+XqxQEHd9ZR5gN/
+ikilTWh1uem8nk4ZcfUyS5xtYBkL+8ydddy/Js2Pk3g5eXNeJQ7KXOt3EgfLZEFHcpOrUMPrCXZk
+NNI5t3YRCQ12RcSprj1qr7V9ZS+UWBDsXHyvfuK2GNnQm05aSd+pZgvMPMZ4fKecHePOjlO+Bd5g
+D2vlGts/4+EhySnB8esHnFIbAURRPHsl18TlUlRdJQfKFiC4reRB7noI/plvg6aRArBsNlVq5331
+lubKgdaX8ZSD6e2wsWsSaR6s+12pxZjptFtYer49okQ6Y1nUCyXeG0+95QGezdIp1Z8XGQpvvwyQ
+0wlf2eOKNcx5Wk0ZN5K3xMGtr/R5JJqyAQuxr1yW84Ay+1w9mPGgP0revq+ULtlVmhduYJ1jbLhj
+ya6BXBg14JC7vjxPNyK5fuvPnnchpj04gftI2jE9K+OJ9dC1vX7gUMQSibMjmhAxhduub+84Mxh2
+EQIDAQABo4IBbDCCAWgwEgYDVR0TAQH/BAgwBgEB/wIBDDAdBgNVHQ4EFgQU+SSsD7K1+HnA+mCI
+G8TZTQKeFxkwgeMGA1UdIwSB2zCB2IAU+SSsD7K1+HnA+mCIG8TZTQKeFxmhgbSkgbEwga4xCzAJ
+BgNVBAYTAkVVMUMwQQYDVQQHEzpNYWRyaWQgKHNlZSBjdXJyZW50IGFkZHJlc3MgYXQgd3d3LmNh
+bWVyZmlybWEuY29tL2FkZHJlc3MpMRIwEAYDVQQFEwlBODI3NDMyODcxGzAZBgNVBAoTEkFDIENh
+bWVyZmlybWEgUy5BLjEpMCcGA1UEAxMgQ2hhbWJlcnMgb2YgQ29tbWVyY2UgUm9vdCAtIDIwMDiC
+CQCj2kJ+pLGu2jAOBgNVHQ8BAf8EBAMCAQYwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYIKwYBBQUH
+AgEWHGh0dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20wDQYJKoZIhvcNAQEFBQADggIBAJASryI1
+wqM58C7e6bXpeHxIvj99RZJe6dqxGfwWPJ+0W2aeaufDuV2I6A+tzyMP3iU6XsxPpcG1Lawk0lgH
+3qLPaYRgM+gQDROpI9CF5Y57pp49chNyM/WqfcZjHwj0/gF/JM8rLFQJ3uIrbZLGOU8W6jx+ekbU
+RWpGqOt1glanq6B8aBMz9p0w8G8nOSQjKpD9kCk18pPfNKXG9/jvjA9iSnyu0/VU+I22mlaHFoI6
+M6taIgj3grrqLuBHmrS1RaMFO9ncLkVAO+rcf+g769HsJtg1pDDFOqxXnrN2pSB7+R5KBWIBpih1
+YJeSDW4+TTdDDZIVnBgizVGZoCkaPF+KMjNbMMeJL0eYD6MDxvbxrN8y8NmBGuScvfaAFPDRLLmF
+9dijscilIeUcE5fuDr3fKanvNFNb0+RqE4QGtjICxFKuItLcsiFCGtpA8CnJ7AoMXOLQusxI0zcK
+zBIKinmwPQN/aUv0NCB9szTqjktk9T79syNnFQ0EuPAtwQlRPLJsFfClI9eDdOTlLsn+mCdCxqvG
+nrDQWzilm1DefhiYtUU79nm06PcaewaD+9CL2rvHvRirCG88gGtAPxkZumWK5r7VXNM21+9AUiRg
+OGcEMeyP84LG3rlV8zsxkVrctQgVrXYlCg17LofiDKYGvCYQbTed7N14jHyAxfDZd0jQ
+-----END CERTIFICATE-----
+
+Global Chambersign Root - 2008
+==============================
+-----BEGIN CERTIFICATE-----
+MIIHSTCCBTGgAwIBAgIJAMnN0+nVfSPOMA0GCSqGSIb3DQEBBQUAMIGsMQswCQYDVQQGEwJFVTFD
+MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv
+bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu
+QS4xJzAlBgNVBAMTHkdsb2JhbCBDaGFtYmVyc2lnbiBSb290IC0gMjAwODAeFw0wODA4MDExMjMx
+NDBaFw0zODA3MzExMjMxNDBaMIGsMQswCQYDVQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUg
+Y3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAGA1UEBRMJ
+QTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xJzAlBgNVBAMTHkdsb2JhbCBD
+aGFtYmVyc2lnbiBSb290IC0gMjAwODCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMDf
+VtPkOpt2RbQT2//BthmLN0EYlVJH6xedKYiONWwGMi5HYvNJBL99RDaxccy9Wglz1dmFRP+RVyXf
+XjaOcNFccUMd2drvXNL7G706tcuto8xEpw2uIRU/uXpbknXYpBI4iRmKt4DS4jJvVpyR1ogQC7N0
+ZJJ0YPP2zxhPYLIj0Mc7zmFLmY/CDNBAspjcDahOo7kKrmCgrUVSY7pmvWjg+b4aqIG7HkF4ddPB
+/gBVsIdU6CeQNR1MM62X/JcumIS/LMmjv9GYERTtY/jKmIhYF5ntRQOXfjyGHoiMvvKRhI9lNNgA
+TH23MRdaKXoKGCQwoze1eqkBfSbW+Q6OWfH9GzO1KTsXO0G2Id3UwD2ln58fQ1DJu7xsepeY7s2M
+H/ucUa6LcL0nn3HAa6x9kGbo1106DbDVwo3VyJ2dwW3Q0L9R5OP4wzg2rtandeavhENdk5IMagfe
+Ox2YItaswTXbo6Al/3K1dh3ebeksZixShNBFks4c5eUzHdwHU1SjqoI7mjcv3N2gZOnm3b2u/GSF
+HTynyQbehP9r6GsaPMWis0L7iwk+XwhSx2LE1AVxv8Rk5Pihg+g+EpuoHtQ2TS9x9o0o9oOpE9Jh
+wZG7SMA0j0GMS0zbaRL/UJScIINZc+18ofLx/d33SdNDWKBWY8o9PeU1VlnpDsogzCtLkykPAgMB
+AAGjggFqMIIBZjASBgNVHRMBAf8ECDAGAQH/AgEMMB0GA1UdDgQWBBS5CcqcHtvTbDprru1U8VuT
+BjUuXjCB4QYDVR0jBIHZMIHWgBS5CcqcHtvTbDprru1U8VuTBjUuXqGBsqSBrzCBrDELMAkGA1UE
+BhMCRVUxQzBBBgNVBAcTOk1hZHJpZCAoc2VlIGN1cnJlbnQgYWRkcmVzcyBhdCB3d3cuY2FtZXJm
+aXJtYS5jb20vYWRkcmVzcykxEjAQBgNVBAUTCUE4Mjc0MzI4NzEbMBkGA1UEChMSQUMgQ2FtZXJm
+aXJtYSBTLkEuMScwJQYDVQQDEx5HbG9iYWwgQ2hhbWJlcnNpZ24gUm9vdCAtIDIwMDiCCQDJzdPp
+1X0jzjAOBgNVHQ8BAf8EBAMCAQYwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYIKwYBBQUHAgEWHGh0
+dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20wDQYJKoZIhvcNAQEFBQADggIBAICIf3DekijZBZRG
+/5BXqfEv3xoNa/p8DhxJJHkn2EaqbylZUohwEurdPfWbU1Rv4WCiqAm57OtZfMY18dwY6fFn5a+6
+ReAJ3spED8IXDneRRXozX1+WLGiLwUePmJs9wOzL9dWCkoQ10b42OFZyMVtHLaoXpGNR6woBrX/s
+dZ7LoR/xfxKxueRkf2fWIyr0uDldmOghp+G9PUIadJpwr2hsUF1Jz//7Dl3mLEfXgTpZALVza2Mg
+9jFFCDkO9HB+QHBaP9BrQql0PSgvAm11cpUJjUhjxsYjV5KTXjXBjfkK9yydYhz2rXzdpjEetrHH
+foUm+qRqtdpjMNHvkzeyZi99Bffnt0uYlDXA2TopwZ2yUDMdSqlapskD7+3056huirRXhOukP9Du
+qqqHW2Pok+JrqNS4cnhrG+055F3Lm6qH1U9OAP7Zap88MQ8oAgF9mOinsKJknnn4SPIVqczmyETr
+P3iZ8ntxPjzxmKfFGBI/5rsoM0LpRQp8bfKGeS/Fghl9CYl8slR2iK7ewfPM4W7bMdaTrpmg7yVq
+c5iJWzouE4gev8CSlDQb4ye3ix5vQv/n6TebUB0tovkC7stYWDpxvGjjqsGvHCgfotwjZT+B6q6Z
+09gwzxMNTxXJhLynSC34MCN32EZLeW32jO06f2ARePTpm67VVMB0gNELQp/B
+-----END CERTIFICATE-----
+
+Go Daddy Root Certificate Authority - G2
+========================================
+-----BEGIN CERTIFICATE-----
+MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT
+B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoTEUdvRGFkZHkuY29tLCBJbmMu
+MTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5
+MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6
+b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8G
+A1UEAxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI
+hvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKDE6bFIEMBO4Tx5oVJnyfq
+9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH/PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD
++qK+ihVqf94Lw7YZFAXK6sOoBJQ7RnwyDfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutd
+fMh8+7ArU6SSYmlRJQVhGkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMl
+NAJWJwGRtDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEAAaNC
+MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFDqahQcQZyi27/a9
+BUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmXWWcDYfF+OwYxdS2hII5PZYe096ac
+vNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r
+5N9ss4UXnT3ZJE95kTXWXwTrgIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYV
+N8Gb5DKj7Tjo2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO
+LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI4uJEvlz36hz1
+-----END CERTIFICATE-----
+
+Starfield Root Certificate Authority - G2
+=========================================
+-----BEGIN CERTIFICATE-----
+MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT
+B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s
+b2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVsZCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0
+eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgY8xCzAJBgNVBAYTAlVTMRAw
+DgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFyZmllbGQg
+VGVjaG5vbG9naWVzLCBJbmMuMTIwMAYDVQQDEylTdGFyZmllbGQgUm9vdCBDZXJ0aWZpY2F0ZSBB
+dXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3twQP89o/8ArFv
+W59I2Z154qK3A2FWGMNHttfKPTUuiUP3oWmb3ooa/RMgnLRJdzIpVv257IzdIvpy3Cdhl+72WoTs
+bhm5iSzchFvVdPtrX8WJpRBSiUZV9Lh1HOZ/5FSuS/hVclcCGfgXcVnrHigHdMWdSL5stPSksPNk
+N3mSwOxGXn/hbVNMYq/NHwtjuzqd+/x5AJhhdM8mgkBj87JyahkNmcrUDnXMN/uLicFZ8WJ/X7Nf
+ZTD4p7dNdloedl40wOiWVpmKs/B/pM293DIxfJHP4F8R+GuqSVzRmZTRouNjWwl2tVZi4Ut0HZbU
+JtQIBFnQmA4O5t78w+wfkPECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
+AQYwHQYDVR0OBBYEFHwMMh+n2TB/xH1oo2Kooc6rB1snMA0GCSqGSIb3DQEBCwUAA4IBAQARWfol
+TwNvlJk7mh+ChTnUdgWUXuEok21iXQnCoKjUsHU48TRqneSfioYmUeYs0cYtbpUgSpIB7LiKZ3sx
+4mcujJUDJi5DnUox9g61DLu34jd/IroAow57UvtruzvE03lRTs2Q9GcHGcg8RnoNAX3FWOdt5oUw
+F5okxBDgBPfg8n/Uqgr/Qh037ZTlZFkSIHc40zI+OIF1lnP6aI+xy84fxez6nH7PfrHxBy22/L/K
+pL/QlwVKvOoYKAKQvVR4CSFx09F9HdkWsKlhPdAKACL8x3vLCWRFCztAgfd9fDL1mMpYjn0q7pBZ
+c2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0
+-----END CERTIFICATE-----
+
+Starfield Services Root Certificate Authority - G2
+==================================================
+-----BEGIN CERTIFICATE-----
+MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMxEDAOBgNVBAgT
+B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s
+b2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVsZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRl
+IEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNV
+BAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxT
+dGFyZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTswOQYDVQQDEzJTdGFyZmllbGQgU2VydmljZXMg
+Um9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
+AQoCggEBANUMOsQq+U7i9b4Zl1+OiFOxHz/Lz58gE20pOsgPfTz3a3Y4Y9k2YKibXlwAgLIvWX/2
+h/klQ4bnaRtSmpDhcePYLQ1Ob/bISdm28xpWriu2dBTrz/sm4xq6HZYuajtYlIlHVv8loJNwU4Pa
+hHQUw2eeBGg6345AWh1KTs9DkTvnVtYAcMtS7nt9rjrnvDH5RfbCYM8TWQIrgMw0R9+53pBlbQLP
+LJGmpufehRhJfGZOozptqbXuNC66DQO4M99H67FrjSXZm86B0UVGMpZwh94CDklDhbZsc7tk6mFB
+rMnUVN+HL8cisibMn1lUaJ/8viovxFUcdUBgF4UCVTmLfwUCAwEAAaNCMEAwDwYDVR0TAQH/BAUw
+AwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJxfAN+qAdcwKziIorhtSpzyEZGDMA0GCSqG
+SIb3DQEBCwUAA4IBAQBLNqaEd2ndOxmfZyMIbw5hyf2E3F/YNoHN2BtBLZ9g3ccaaNnRbobhiCPP
+E95Dz+I0swSdHynVv/heyNXBve6SbzJ08pGCL72CQnqtKrcgfU28elUSwhXqvfdqlS5sdJ/PHLTy
+xQGjhdByPq1zqwubdQxtRbeOlKyWN7Wg0I8VRw7j6IPdj/3vQQF3zCepYoUz8jcI73HPdwbeyBkd
+iEDPfUYd/x7H4c7/I9vG+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn0q23KXB56jza
+YyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCNsSi6
+-----END CERTIFICATE-----
+
+AffirmTrust Commercial
+======================
+-----BEGIN CERTIFICATE-----
+MIIDTDCCAjSgAwIBAgIId3cGJyapsXwwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCVVMxFDAS
+BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMB4XDTEw
+MDEyOTE0MDYwNloXDTMwMTIzMTE0MDYwNlowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly
+bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMIIBIjANBgkqhkiG9w0BAQEF
+AAOCAQ8AMIIBCgKCAQEA9htPZwcroRX1BiLLHwGy43NFBkRJLLtJJRTWzsO3qyxPxkEylFf6Eqdb
+DuKPHx6GGaeqtS25Xw2Kwq+FNXkyLbscYjfysVtKPcrNcV/pQr6U6Mje+SJIZMblq8Yrba0F8PrV
+C8+a5fBQpIs7R6UjW3p6+DM/uO+Zl+MgwdYoic+U+7lF7eNAFxHUdPALMeIrJmqbTFeurCA+ukV6
+BfO9m2kVrn1OIGPENXY6BwLJN/3HR+7o8XYdcxXyl6S1yHp52UKqK39c/s4mT6NmgTWvRLpUHhww
+MmWd5jyTXlBOeuM61G7MGvv50jeuJCqrVwMiKA1JdX+3KNp1v47j3A55MQIDAQABo0IwQDAdBgNV
+HQ4EFgQUnZPGU4teyq8/nx4P5ZmVvCT2lI8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
+AQYwDQYJKoZIhvcNAQELBQADggEBAFis9AQOzcAN/wr91LoWXym9e2iZWEnStB03TX8nfUYGXUPG
+hi4+c7ImfU+TqbbEKpqrIZcUsd6M06uJFdhrJNTxFq7YpFzUf1GO7RgBsZNjvbz4YYCanrHOQnDi
+qX0GJX0nof5v7LMeJNrjS1UaADs1tDvZ110w/YETifLCBivtZ8SOyUOyXGsViQK8YvxO8rUzqrJv
+0wqiUOP2O+guRMLbZjipM1ZI8W0bM40NjD9gN53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0kh
+sUlHRUe072o0EclNmsxZt9YCnlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8=
+-----END CERTIFICATE-----
+
+AffirmTrust Networking
+======================
+-----BEGIN CERTIFICATE-----
+MIIDTDCCAjSgAwIBAgIIfE8EORzUmS0wDQYJKoZIhvcNAQEFBQAwRDELMAkGA1UEBhMCVVMxFDAS
+BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMB4XDTEw
+MDEyOTE0MDgyNFoXDTMwMTIzMTE0MDgyNFowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly
+bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMIIBIjANBgkqhkiG9w0BAQEF
+AAOCAQ8AMIIBCgKCAQEAtITMMxcua5Rsa2FSoOujz3mUTOWUgJnLVWREZY9nZOIG41w3SfYvm4SE
+Hi3yYJ0wTsyEheIszx6e/jarM3c1RNg1lho9Nuh6DtjVR6FqaYvZ/Ls6rnla1fTWcbuakCNrmreI
+dIcMHl+5ni36q1Mr3Lt2PpNMCAiMHqIjHNRqrSK6mQEubWXLviRmVSRLQESxG9fhwoXA3hA/Pe24
+/PHxI1Pcv2WXb9n5QHGNfb2V1M6+oF4nI979ptAmDgAp6zxG8D1gvz9Q0twmQVGeFDdCBKNwV6gb
+h+0t+nvujArjqWaJGctB+d1ENmHP4ndGyH329JKBNv3bNPFyfvMMFr20FQIDAQABo0IwQDAdBgNV
+HQ4EFgQUBx/S55zawm6iQLSwelAQUHTEyL0wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
+AQYwDQYJKoZIhvcNAQEFBQADggEBAIlXshZ6qML91tmbmzTCnLQyFE2npN/svqe++EPbkTfOtDIu
+UFUaNU52Q3Eg75N3ThVwLofDwR1t3Mu1J9QsVtFSUzpE0nPIxBsFZVpikpzuQY0x2+c06lkh1QF6
+12S4ZDnNye2v7UsDSKegmQGA3GWjNq5lWUhPgkvIZfFXHeVZLgo/bNjR9eUJtGxUAArgFU2HdW23
+WJZa3W3SAKD0m0i+wzekujbgfIeFlxoVot4uolu9rxj5kFDNcFn4J2dHy8egBzp90SxdbBk6ZrV9
+/ZFvgrG+CJPbFEfxojfHRZ48x3evZKiT3/Zpg4Jg8klCNO1aAFSFHBY2kgxc+qatv9s=
+-----END CERTIFICATE-----
+
+AffirmTrust Premium
+===================
+-----BEGIN CERTIFICATE-----
+MIIFRjCCAy6gAwIBAgIIbYwURrGmCu4wDQYJKoZIhvcNAQEMBQAwQTELMAkGA1UEBhMCVVMxFDAS
+BgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVzdCBQcmVtaXVtMB4XDTEwMDEy
+OTE0MTAzNloXDTQwMTIzMTE0MTAzNlowQTELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRy
+dXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVzdCBQcmVtaXVtMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
+MIICCgKCAgEAxBLfqV/+Qd3d9Z+K4/as4Tx4mrzY8H96oDMq3I0gW64tb+eT2TZwamjPjlGjhVtn
+BKAQJG9dKILBl1fYSCkTtuG+kU3fhQxTGJoeJKJPj/CihQvL9Cl/0qRY7iZNyaqoe5rZ+jjeRFcV
+5fiMyNlI4g0WJx0eyIOFJbe6qlVBzAMiSy2RjYvmia9mx+n/K+k8rNrSs8PhaJyJ+HoAVt70VZVs
++7pk3WKL3wt3MutizCaam7uqYoNMtAZ6MMgpv+0GTZe5HMQxK9VfvFMSF5yZVylmd2EhMQcuJUmd
+GPLu8ytxjLW6OQdJd/zvLpKQBY0tL3d770O/Nbua2Plzpyzy0FfuKE4mX4+QaAkvuPjcBukumj5R
+p9EixAqnOEhss/n/fauGV+O61oV4d7pD6kh/9ti+I20ev9E2bFhc8e6kGVQa9QPSdubhjL08s9NI
+S+LI+H+SqHZGnEJlPqQewQcDWkYtuJfzt9WyVSHvutxMAJf7FJUnM7/oQ0dG0giZFmA7mn7S5u04
+6uwBHjxIVkkJx0w3AJ6IDsBz4W9m6XJHMD4Q5QsDyZpCAGzFlH5hxIrff4IaC1nEWTJ3s7xgaVY5
+/bQGeyzWZDbZvUjthB9+pSKPKrhC9IK31FOQeE4tGv2Bb0TXOwF0lkLgAOIua+rF7nKsu7/+6qqo
++Nz2snmKtmcCAwEAAaNCMEAwHQYDVR0OBBYEFJ3AZ6YMItkm9UWrpmVSESfYRaxjMA8GA1UdEwEB
+/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBDAUAA4ICAQCzV00QYk465KzquByv
+MiPIs0laUZx2KI15qldGF9X1Uva3ROgIRL8YhNILgM3FEv0AVQVhh0HctSSePMTYyPtwni94loMg
+Nt58D2kTiKV1NpgIpsbfrM7jWNa3Pt668+s0QNiigfV4Py/VpfzZotReBA4Xrf5B8OWycvpEgjNC
+6C1Y91aMYj+6QrCcDFx+LmUmXFNPALJ4fqENmS2NuB2OosSw/WDQMKSOyARiqcTtNd56l+0OOF6S
+L5Nwpamcb6d9Ex1+xghIsV5n61EIJenmJWtSKZGc0jlzCFfemQa0W50QBuHCAKi4HEoCChTQwUHK
++4w1IX2COPKpVJEZNZOUbWo6xbLQu4mGk+ibyQ86p3q4ofB4Rvr8Ny/lioTz3/4E2aFooC8k4gmV
+BtWVyuEklut89pMFu+1z6S3RdTnX5yTb2E5fQ4+e0BQ5v1VwSJlXMbSc7kqYA5YwH2AG7hsj/oFg
+IxpHYoWlzBk0gG+zrBrjn/B7SK3VAdlntqlyk+otZrWyuOQ9PLLvTIzq6we/qzWaVYa8GKa1qF60
+g2xraUDTn9zxw2lrueFtCfTxqlB2Cnp9ehehVZZCmTEJ3WARjQUwfuaORtGdFNrHF+QFlozEJLUb
+zxQHskD4o55BhrwE0GuWyCqANP2/7waj3VjFhT0+j/6eKeC2uAloGRwYQw==
+-----END CERTIFICATE-----
+
+AffirmTrust Premium ECC
+=======================
+-----BEGIN CERTIFICATE-----
+MIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMCVVMxFDASBgNV
+BAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQcmVtaXVtIEVDQzAeFw0xMDAx
+MjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJBgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1U
+cnVzdDEgMB4GA1UEAwwXQWZmaXJtVHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQA
+IgNiAAQNMF4bFZ0D0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQ
+N8O9ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0GA1UdDgQW
+BBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAK
+BggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/VsaobgxCd05DhT1wV/GzTjxi+zygk8N53X
+57hG8f2h4nECMEJZh0PUUd+60wkyWs6Iflc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKM
+eQ==
+-----END CERTIFICATE-----
+
+Certum Trusted Network CA
+=========================
+-----BEGIN CERTIFICATE-----
+MIIDuzCCAqOgAwIBAgIDBETAMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNVBAYTAlBMMSIwIAYDVQQK
+ExlVbml6ZXRvIFRlY2hub2xvZ2llcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlv
+biBBdXRob3JpdHkxIjAgBgNVBAMTGUNlcnR1bSBUcnVzdGVkIE5ldHdvcmsgQ0EwHhcNMDgxMDIy
+MTIwNzM3WhcNMjkxMjMxMTIwNzM3WjB+MQswCQYDVQQGEwJQTDEiMCAGA1UEChMZVW5pemV0byBU
+ZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENlcnRpZmljYXRpb24gQXV0aG9yaXR5
+MSIwIAYDVQQDExlDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC
+AQ8AMIIBCgKCAQEA4/t9o3K6wvDJFIf1awFO4W5AB7ptJ11/91sts1rHUV+rpDKmYYe2bg+G0jAC
+l/jXaVehGDldamR5xgFZrDwxSjh80gTSSyjoIF87B6LMTXPb865Px1bVWqeWifrzq2jUI4ZZJ88J
+J7ysbnKDHDBy3+Ci6dLhdHUZvSqeexVUBBvXQzmtVSjF4hq79MDkrjhJM8x2hZ85RdKknvISjFH4
+fOQtf/WsX+sWn7Et0brMkUJ3TCXJkDhv2/DM+44el1k+1WBO5gUo7Ul5E0u6SNsv+XLTOcr+H9g0
+cvW0QM8xAcPs3hEtF10fuFDRXhmnad4HMyjKUJX5p1TLVIZQRan5SQIDAQABo0IwQDAPBgNVHRMB
+Af8EBTADAQH/MB0GA1UdDgQWBBQIds3LB/8k9sXN7buQvOKEN0Z19zAOBgNVHQ8BAf8EBAMCAQYw
+DQYJKoZIhvcNAQEFBQADggEBAKaorSLOAT2mo/9i0Eidi15ysHhE49wcrwn9I0j6vSrEuVUEtRCj
+jSfeC4Jj0O7eDDd5QVsisrCaQVymcODU0HfLI9MA4GxWL+FpDQ3Zqr8hgVDZBqWo/5U30Kr+4rP1
+mS1FhIrlQgnXdAIv94nYmem8J9RHjboNRhx3zxSkHLmkMcScKHQDNP8zGSal6Q10tz6XxnboJ5aj
+Zt3hrvJBW8qYVoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI
+03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw=
+-----END CERTIFICATE-----
+
+TWCA Root Certification Authority
+=================================
+-----BEGIN CERTIFICATE-----
+MIIDezCCAmOgAwIBAgIBATANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJUVzESMBAGA1UECgwJ
+VEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NBIFJvb3QgQ2VydGlmaWNh
+dGlvbiBBdXRob3JpdHkwHhcNMDgwODI4MDcyNDMzWhcNMzAxMjMxMTU1OTU5WjBfMQswCQYDVQQG
+EwJUVzESMBAGA1UECgwJVEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NB
+IFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
+AoIBAQCwfnK4pAOU5qfeCTiRShFAh6d8WWQUe7UREN3+v9XAu1bihSX0NXIP+FPQQeFEAcK0HMMx
+QhZHhTMidrIKbw/lJVBPhYa+v5guEGcevhEFhgWQxFnQfHgQsIBct+HHK3XLfJ+utdGdIzdjp9xC
+oi2SBBtQwXu4PhvJVgSLL1KbralW6cH/ralYhzC2gfeXRfwZVzsrb+RH9JlF/h3x+JejiB03HFyP
+4HYlmlD4oFT/RJB2I9IyxsOrBr/8+7/zrX2SYgJbKdM1o5OaQ2RgXbL6Mv87BK9NQGr5x+PvI/1r
+y+UPizgN7gr8/g+YnzAx3WxSZfmLgb4i4RxYA7qRG4kHAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIB
+BjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqOFsmjd6LWvJPelSDGRjjCDWmujANBgkqhkiG
+9w0BAQUFAAOCAQEAPNV3PdrfibqHDAhUaiBQkr6wQT25JmSDCi/oQMCXKCeCMErJk/9q56YAf4lC
+mtYR5VPOL8zy2gXE/uJQxDqGfczafhAJO5I1KlOy/usrBdlsXebQ79NqZp4VKIV66IIArB6nCWlW
+QtNoURi+VJq/REG6Sb4gumlc7rh3zc5sH62Dlhh9DrUUOYTxKOkto557HnpyWoOzeW/vtPzQCqVY
+T0bf+215WfKEIlKuD8z7fDvnaspHYcN6+NOSBB+4IIThNlQWx0DeO4pz3N/GCUzf7Nr/1FNCocny
+Yh0igzyXxfkZYiesZSLX0zzG5Y6yU8xJzrww/nsOM5D77dIUkR8Hrw==
+-----END CERTIFICATE-----
+
+Security Communication RootCA2
+==============================
+-----BEGIN CERTIFICATE-----
+MIIDdzCCAl+gAwIBAgIBADANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJKUDElMCMGA1UEChMc
+U0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UECxMeU2VjdXJpdHkgQ29tbXVuaWNh
+dGlvbiBSb290Q0EyMB4XDTA5MDUyOTA1MDAzOVoXDTI5MDUyOTA1MDAzOVowXTELMAkGA1UEBhMC
+SlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xJzAlBgNVBAsTHlNlY3Vy
+aXR5IENvbW11bmljYXRpb24gUm9vdENBMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
+ANAVOVKxUrO6xVmCxF1SrjpDZYBLx/KWvNs2l9amZIyoXvDjChz335c9S672XewhtUGrzbl+dp++
++T42NKA7wfYxEUV0kz1XgMX5iZnK5atq1LXaQZAQwdbWQonCv/Q4EpVMVAX3NuRFg3sUZdbcDE3R
+3n4MqzvEFb46VqZab3ZpUql6ucjrappdUtAtCms1FgkQhNBqyjoGADdH5H5XTz+L62e4iKrFvlNV
+spHEfbmwhRkGeC7bYRr6hfVKkaHnFtWOojnflLhwHyg/i/xAXmODPIMqGplrz95Zajv8bxbXH/1K
+EOtOghY6rCcMU/Gt1SSwawNQwS08Ft1ENCcadfsCAwEAAaNCMEAwHQYDVR0OBBYEFAqFqXdlBZh8
+QIH4D5csOPEK7DzPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEB
+CwUAA4IBAQBMOqNErLlFsceTfsgLCkLfZOoc7llsCLqJX2rKSpWeeo8HxdpFcoJxDjrSzG+ntKEj
+u/Ykn8sX/oymzsLS28yN/HH8AynBbF0zX2S2ZTuJbxh2ePXcokgfGT+Ok+vx+hfuzU7jBBJV1uXk
+3fs+BXziHV7Gp7yXT2g69ekuCkO2r1dcYmh8t/2jioSgrGK+KwmHNPBqAbubKVY8/gA3zyNs8U6q
+tnRGEmyR7jTV7JqR50S+kDFy1UkC9gLl9B/rfNmWVan/7Ir5mUf/NVoCqgTLiluHcSmRvaS0eg29
+mvVXIwAHIRc/SjnRBUkLp7Y3gaVdjKozXoEofKd9J+sAro03
+-----END CERTIFICATE-----
+
+EC-ACC
+======
+-----BEGIN CERTIFICATE-----
+MIIFVjCCBD6gAwIBAgIQ7is969Qh3hSoYqwE893EATANBgkqhkiG9w0BAQUFADCB8zELMAkGA1UE
+BhMCRVMxOzA5BgNVBAoTMkFnZW5jaWEgQ2F0YWxhbmEgZGUgQ2VydGlmaWNhY2lvIChOSUYgUS0w
+ODAxMTc2LUkpMSgwJgYDVQQLEx9TZXJ2ZWlzIFB1YmxpY3MgZGUgQ2VydGlmaWNhY2lvMTUwMwYD
+VQQLEyxWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5ldC92ZXJhcnJlbCAoYykwMzE1MDMGA1UE
+CxMsSmVyYXJxdWlhIEVudGl0YXRzIGRlIENlcnRpZmljYWNpbyBDYXRhbGFuZXMxDzANBgNVBAMT
+BkVDLUFDQzAeFw0wMzAxMDcyMzAwMDBaFw0zMTAxMDcyMjU5NTlaMIHzMQswCQYDVQQGEwJFUzE7
+MDkGA1UEChMyQWdlbmNpYSBDYXRhbGFuYSBkZSBDZXJ0aWZpY2FjaW8gKE5JRiBRLTA4MDExNzYt
+SSkxKDAmBgNVBAsTH1NlcnZlaXMgUHVibGljcyBkZSBDZXJ0aWZpY2FjaW8xNTAzBgNVBAsTLFZl
+Z2V1IGh0dHBzOi8vd3d3LmNhdGNlcnQubmV0L3ZlcmFycmVsIChjKTAzMTUwMwYDVQQLEyxKZXJh
+cnF1aWEgRW50aXRhdHMgZGUgQ2VydGlmaWNhY2lvIENhdGFsYW5lczEPMA0GA1UEAxMGRUMtQUND
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsyLHT+KXQpWIR4NA9h0X84NzJB5R85iK
+w5K4/0CQBXCHYMkAqbWUZRkiFRfCQ2xmRJoNBD45b6VLeqpjt4pEndljkYRm4CgPukLjbo73FCeT
+ae6RDqNfDrHrZqJyTxIThmV6PttPB/SnCWDaOkKZx7J/sxaVHMf5NLWUhdWZXqBIoH7nF2W4onW4
+HvPlQn2v7fOKSGRdghST2MDk/7NQcvJ29rNdQlB50JQ+awwAvthrDk4q7D7SzIKiGGUzE3eeml0a
+E9jD2z3Il3rucO2n5nzbcc8tlGLfbdb1OL4/pYUKGbio2Al1QnDE6u/LDsg0qBIimAy4E5S2S+zw
+0JDnJwIDAQABo4HjMIHgMB0GA1UdEQQWMBSBEmVjX2FjY0BjYXRjZXJ0Lm5ldDAPBgNVHRMBAf8E
+BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUoMOLRKo3pUW/l4Ba0fF4opvpXY0wfwYD
+VR0gBHgwdjB0BgsrBgEEAfV4AQMBCjBlMCwGCCsGAQUFBwIBFiBodHRwczovL3d3dy5jYXRjZXJ0
+Lm5ldC92ZXJhcnJlbDA1BggrBgEFBQcCAjApGidWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5l
+dC92ZXJhcnJlbCAwDQYJKoZIhvcNAQEFBQADggEBAKBIW4IB9k1IuDlVNZyAelOZ1Vr/sXE7zDkJ
+lF7W2u++AVtd0x7Y/X1PzaBB4DSTv8vihpw3kpBWHNzrKQXlxJ7HNd+KDM3FIUPpqojlNcAZQmNa
+Al6kSBg6hW/cnbw/nZzBh7h6YQjpdwt/cKt63dmXLGQehb+8dJahw3oS7AwaboMMPOhyRp/7SNVe
+l+axofjk70YllJyJ22k4vuxcDlbHZVHlUIiIv0LVKz3l+bqeLrPK9HOSAgu+TGbrIP65y7WZf+a2
+E/rKS03Z7lNGBjvGTq2TWoF+bCpLagVFjPIhpDGQh2xlnJ2lYJU6Un/10asIbvPuW/mIPX64b24D
+5EI=
+-----END CERTIFICATE-----
+
+Hellenic Academic and Research Institutions RootCA 2011
+=======================================================
+-----BEGIN CERTIFICATE-----
+MIIEMTCCAxmgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBlTELMAkGA1UEBhMCR1IxRDBCBgNVBAoT
+O0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ2VydC4gQXV0aG9y
+aXR5MUAwPgYDVQQDEzdIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25z
+IFJvb3RDQSAyMDExMB4XDTExMTIwNjEzNDk1MloXDTMxMTIwMTEzNDk1MlowgZUxCzAJBgNVBAYT
+AkdSMUQwQgYDVQQKEztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25z
+IENlcnQuIEF1dGhvcml0eTFAMD4GA1UEAxM3SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNo
+IEluc3RpdHV0aW9ucyBSb290Q0EgMjAxMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
+AKlTAOMupvaO+mDYLZU++CwqVE7NuYRhlFhPjz2L5EPzdYmNUeTDN9KKiE15HrcS3UN4SoqS5tdI
+1Q+kOilENbgH9mgdVc04UfCMJDGFr4PJfel3r+0ae50X+bOdOFAPplp5kYCvN66m0zH7tSYJnTxa
+71HFK9+WXesyHgLacEnsbgzImjeN9/E2YEsmLIKe0HjzDQ9jpFEw4fkrJxIH2Oq9GGKYsFk3fb7u
+8yBRQlqD75O6aRXxYp2fmTmCobd0LovUxQt7L/DICto9eQqakxylKHJzkUOap9FNhYS5qXSPFEDH
+3N6sQWRstBmbAmNtJGSPRLIl6s5ddAxjMlyNh+UCAwEAAaOBiTCBhjAPBgNVHRMBAf8EBTADAQH/
+MAsGA1UdDwQEAwIBBjAdBgNVHQ4EFgQUppFC/RNhSiOeCKQp5dgTBCPuQSUwRwYDVR0eBEAwPqA8
+MAWCAy5ncjAFggMuZXUwBoIELmVkdTAGggQub3JnMAWBAy5ncjAFgQMuZXUwBoEELmVkdTAGgQQu
+b3JnMA0GCSqGSIb3DQEBBQUAA4IBAQAf73lB4XtuP7KMhjdCSk4cNx6NZrokgclPEg8hwAOXhiVt
+XdMiKahsog2p6z0GW5k6x8zDmjR/qw7IThzh+uTczQ2+vyT+bOdrwg3IBp5OjWEopmr95fZi6hg8
+TqBTnbI6nOulnJEWtk2C4AwFSKls9cz4y51JtPACpf1wA+2KIaWuE4ZJwzNzvoc7dIsXRSZMFpGD
+/md9zU1jZ/rzAxKWeAaNsWftjj++n08C9bMJL/NMh98qy5V8AcysNnq/onN694/BtZqhFLKPM58N
+7yLcZnuEvUUXBj08yrl3NI/K6s8/MT7jiOOASSXIl7WdmplNsDz4SgCbZN2fOUvRJ9e4
+-----END CERTIFICATE-----
+
+Actalis Authentication Root CA
+==============================
+-----BEGIN CERTIFICATE-----
+MIIFuzCCA6OgAwIBAgIIVwoRl0LE48wwDQYJKoZIhvcNAQELBQAwazELMAkGA1UEBhMCSVQxDjAM
+BgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlzIFMucC5BLi8wMzM1ODUyMDk2NzEnMCUGA1UE
+AwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290IENBMB4XDTExMDkyMjExMjIwMloXDTMwMDky
+MjExMjIwMlowazELMAkGA1UEBhMCSVQxDjAMBgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlz
+IFMucC5BLi8wMzM1ODUyMDk2NzEnMCUGA1UEAwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290
+IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAp8bEpSmkLO/lGMWwUKNvUTufClrJ
+wkg4CsIcoBh/kbWHuUA/3R1oHwiD1S0eiKD4j1aPbZkCkpAW1V8IbInX4ay8IMKx4INRimlNAJZa
+by/ARH6jDuSRzVju3PvHHkVH3Se5CAGfpiEd9UEtL0z9KK3giq0itFZljoZUj5NDKd45RnijMCO6
+zfB9E1fAXdKDa0hMxKufgFpbOr3JpyI/gCczWw63igxdBzcIy2zSekciRDXFzMwujt0q7bd9Zg1f
+YVEiVRvjRuPjPdA1YprbrxTIW6HMiRvhMCb8oJsfgadHHwTrozmSBp+Z07/T6k9QnBn+locePGX2
+oxgkg4YQ51Q+qDp2JE+BIcXjDwL4k5RHILv+1A7TaLndxHqEguNTVHnd25zS8gebLra8Pu2Fbe8l
+EfKXGkJh90qX6IuxEAf6ZYGyojnP9zz/GPvG8VqLWeICrHuS0E4UT1lF9gxeKF+w6D9Fz8+vm2/7
+hNN3WpVvrJSEnu68wEqPSpP4RCHiMUVhUE4Q2OM1fEwZtN4Fv6MGn8i1zeQf1xcGDXqVdFUNaBr8
+EBtiZJ1t4JWgw5QHVw0U5r0F+7if5t+L4sbnfpb2U8WANFAoWPASUHEXMLrmeGO89LKtmyuy/uE5
+jF66CyCU3nuDuP/jVo23Eek7jPKxwV2dpAtMK9myGPW1n0sCAwEAAaNjMGEwHQYDVR0OBBYEFFLY
+iDrIn3hm7YnzezhwlMkCAjbQMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUUtiIOsifeGbt
+ifN7OHCUyQICNtAwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBCwUAA4ICAQALe3KHwGCmSUyI
+WOYdiPcUZEim2FgKDk8TNd81HdTtBjHIgT5q1d07GjLukD0R0i70jsNjLiNmsGe+b7bAEzlgqqI0
+JZN1Ut6nna0Oh4lScWoWPBkdg/iaKWW+9D+a2fDzWochcYBNy+A4mz+7+uAwTc+G02UQGRjRlwKx
+K3JCaKygvU5a2hi/a5iB0P2avl4VSM0RFbnAKVy06Ij3Pjaut2L9HmLecHgQHEhb2rykOLpn7VU+
+Xlff1ANATIGk0k9jpwlCCRT8AKnCgHNPLsBA2RF7SOp6AsDT6ygBJlh0wcBzIm2Tlf05fbsq4/aC
+4yyXX04fkZT6/iyj2HYauE2yOE+b+h1IYHkm4vP9qdCa6HCPSXrW5b0KDtst842/6+OkfcvHlXHo
+2qN8xcL4dJIEG4aspCJTQLas/kx2z/uUMsA1n3Y/buWQbqCmJqK4LL7RK4X9p2jIugErsWx0Hbhz
+lefut8cl8ABMALJ+tguLHPPAUJ4lueAI3jZm/zel0btUZCzJJ7VLkn5l/9Mt4blOvH+kQSGQQXem
+OR/qnuOf0GZvBeyqdn6/axag67XH/JJULysRJyU3eExRarDzzFhdFPFqSBX/wge2sY0PjlxQRrM9
+vwGYT7JZVEc+NHt4bVaTLnPqZih4zR0Uv6CPLy64Lo7yFIrM6bV8+2ydDKXhlg==
+-----END CERTIFICATE-----
+
+Trustis FPS Root CA
+===================
+-----BEGIN CERTIFICATE-----
+MIIDZzCCAk+gAwIBAgIQGx+ttiD5JNM2a/fH8YygWTANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQG
+EwJHQjEYMBYGA1UEChMPVHJ1c3RpcyBMaW1pdGVkMRwwGgYDVQQLExNUcnVzdGlzIEZQUyBSb290
+IENBMB4XDTAzMTIyMzEyMTQwNloXDTI0MDEyMTExMzY1NFowRTELMAkGA1UEBhMCR0IxGDAWBgNV
+BAoTD1RydXN0aXMgTGltaXRlZDEcMBoGA1UECxMTVHJ1c3RpcyBGUFMgUm9vdCBDQTCCASIwDQYJ
+KoZIhvcNAQEBBQADggEPADCCAQoCggEBAMVQe547NdDfxIzNjpvto8A2mfRC6qc+gIMPpqdZh8mQ
+RUN+AOqGeSoDvT03mYlmt+WKVoaTnGhLaASMk5MCPjDSNzoiYYkchU59j9WvezX2fihHiTHcDnlk
+H5nSW7r+f2C/revnPDgpai/lkQtV/+xvWNUtyd5MZnGPDNcE2gfmHhjjvSkCqPoc4Vu5g6hBSLwa
+cY3nYuUtsuvffM/bq1rKMfFMIvMFE/eC+XN5DL7XSxzA0RU8k0Fk0ea+IxciAIleH2ulrG6nS4zt
+o3Lmr2NNL4XSFDWaLk6M6jKYKIahkQlBOrTh4/L68MkKokHdqeMDx4gVOxzUGpTXn2RZEm0CAwEA
+AaNTMFEwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBS6+nEleYtXQSUhhgtx67JkDoshZzAd
+BgNVHQ4EFgQUuvpxJXmLV0ElIYYLceuyZA6LIWcwDQYJKoZIhvcNAQEFBQADggEBAH5Y//01GX2c
+GE+esCu8jowU/yyg2kdbw++BLa8F6nRIW/M+TgfHbcWzk88iNVy2P3UnXwmWzaD+vkAMXBJV+JOC
+yinpXj9WV4s4NvdFGkwozZ5BuO1WTISkQMi4sKUraXAEasP41BIy+Q7DsdwyhEQsb8tGD+pmQQ9P
+8Vilpg0ND2HepZ5dfWWhPBfnqFVO76DH7cZEf1T1o+CP8HxVIo8ptoGj4W1OLBuAZ+ytIJ8MYmHV
+l/9D7S3B2l0pKoU/rGXuhg8FjZBf3+6f9L/uHfuY5H+QK4R4EA5sSVPvFVtlRkpdr7r7OnIdzfYl
+iB6XzCGcKQENZetX2fNXlrtIzYE=
+-----END CERTIFICATE-----
+
+Buypass Class 2 Root CA
+=======================
+-----BEGIN CERTIFICATE-----
+MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU
+QnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMiBSb290IENBMB4X
+DTEwMTAyNjA4MzgwM1oXDTQwMTAyNjA4MzgwM1owTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1
+eXBhc3MgQVMtOTgzMTYzMzI3MSAwHgYDVQQDDBdCdXlwYXNzIENsYXNzIDIgUm9vdCBDQTCCAiIw
+DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANfHXvfBB9R3+0Mh9PT1aeTuMgHbo4Yf5FkNuud1
+g1Lr6hxhFUi7HQfKjK6w3Jad6sNgkoaCKHOcVgb/S2TwDCo3SbXlzwx87vFKu3MwZfPVL4O2fuPn
+9Z6rYPnT8Z2SdIrkHJasW4DptfQxh6NR/Md+oW+OU3fUl8FVM5I+GC911K2GScuVr1QGbNgGE41b
+/+EmGVnAJLqBcXmQRFBoJJRfuLMR8SlBYaNByyM21cHxMlAQTn/0hpPshNOOvEu/XAFOBz3cFIqU
+CqTqc/sLUegTBxj6DvEr0VQVfTzh97QZQmdiXnfgolXsttlpF9U6r0TtSsWe5HonfOV116rLJeff
+awrbD02TTqigzXsu8lkBarcNuAeBfos4GzjmCleZPe4h6KP1DBbdi+w0jpwqHAAVF41og9JwnxgI
+zRFo1clrUs3ERo/ctfPYV3Me6ZQ5BL/T3jjetFPsaRyifsSP5BtwrfKi+fv3FmRmaZ9JUaLiFRhn
+Bkp/1Wy1TbMz4GHrXb7pmA8y1x1LPC5aAVKRCfLf6o3YBkBjqhHk/sM3nhRSP/TizPJhk9H9Z2vX
+Uq6/aKtAQ6BXNVN48FP4YUIHZMbXb5tMOA1jrGKvNouicwoN9SG9dKpN6nIDSdvHXx1iY8f93ZHs
+M+71bbRuMGjeyNYmsHVee7QHIJihdjK4TWxPAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD
+VR0OBBYEFMmAd+BikoL1RpzzuvdMw964o605MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsF
+AAOCAgEAU18h9bqwOlI5LJKwbADJ784g7wbylp7ppHR/ehb8t/W2+xUbP6umwHJdELFx7rxP462s
+A20ucS6vxOOto70MEae0/0qyexAQH6dXQbLArvQsWdZHEIjzIVEpMMpghq9Gqx3tOluwlN5E40EI
+osHsHdb9T7bWR9AUC8rmyrV7d35BH16Dx7aMOZawP5aBQW9gkOLo+fsicdl9sz1Gv7SEr5AcD48S
+aq/v7h56rgJKihcrdv6sVIkkLE8/trKnToyokZf7KcZ7XC25y2a2t6hbElGFtQl+Ynhw/qlqYLYd
+DnkM/crqJIByw5c/8nerQyIKx+u2DISCLIBrQYoIwOula9+ZEsuK1V6ADJHgJgg2SMX6OBE1/yWD
+LfJ6v9r9jv6ly0UsH8SIU653DtmadsWOLB2jutXsMq7Aqqz30XpN69QH4kj3Io6wpJ9qzo6ysmD0
+oyLQI+uUWnpp3Q+/QFesa1lQ2aOZ4W7+jQF5JyMV3pKdewlNWudLSDBaGOYKbeaP4NK75t98biGC
+wWg5TbSYWGZizEqQXsP6JwSxeRV0mcy+rSDeJmAc61ZRpqPq5KM/p/9h3PFaTWwyI0PurKju7koS
+CTxdccK+efrCh2gdC/1cacwG0Jp9VJkqyTkaGa9LKkPzY11aWOIv4x3kqdbQCtCev9eBCfHJxyYN
+rJgWVqA=
+-----END CERTIFICATE-----
+
+Buypass Class 3 Root CA
+=======================
+-----BEGIN CERTIFICATE-----
+MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU
+QnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMyBSb290IENBMB4X
+DTEwMTAyNjA4Mjg1OFoXDTQwMTAyNjA4Mjg1OFowTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1
+eXBhc3MgQVMtOTgzMTYzMzI3MSAwHgYDVQQDDBdCdXlwYXNzIENsYXNzIDMgUm9vdCBDQTCCAiIw
+DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKXaCpUWUOOV8l6ddjEGMnqb8RB2uACatVI2zSRH
+sJ8YZLya9vrVediQYkwiL944PdbgqOkcLNt4EemOaFEVcsfzM4fkoF0LXOBXByow9c3EN3coTRiR
+5r/VUv1xLXA+58bEiuPwKAv0dpihi4dVsjoT/Lc+JzeOIuOoTyrvYLs9tznDDgFHmV0ST9tD+leh
+7fmdvhFHJlsTmKtdFoqwNxxXnUX/iJY2v7vKB3tvh2PX0DJq1l1sDPGzbjniazEuOQAnFN44wOwZ
+ZoYS6J1yFhNkUsepNxz9gjDthBgd9K5c/3ATAOux9TN6S9ZV+AWNS2mw9bMoNlwUxFFzTWsL8TQH
+2xc519woe2v1n/MuwU8XKhDzzMro6/1rqy6any2CbgTUUgGTLT2G/H783+9CHaZr77kgxve9oKeV
+/afmiSTYzIw0bOIjL9kSGiG5VZFvC5F5GQytQIgLcOJ60g7YaEi7ghM5EFjp2CoHxhLbWNvSO1UQ
+RwUVZ2J+GGOmRj8JDlQyXr8NYnon74Do29lLBlo3WiXQCBJ31G8JUJc9yB3D34xFMFbG02SrZvPA
+Xpacw8Tvw3xrizp5f7NJzz3iiZ+gMEuFuZyUJHmPfWupRWgPK9Dx2hzLabjKSWJtyNBjYt1gD1iq
+j6G8BaVmos8bdrKEZLFMOVLAMLrwjEsCsLa3AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD
+VR0OBBYEFEe4zf/lb+74suwvTg75JbCOPGvDMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsF
+AAOCAgEAACAjQTUEkMJAYmDv4jVM1z+s4jSQuKFvdvoWFqRINyzpkMLyPPgKn9iB5btb2iUspKdV
+cSQy9sgL8rxq+JOssgfCX5/bzMiKqr5qb+FJEMwx14C7u8jYog5kV+qi9cKpMRXSIGrs/CIBKM+G
+uIAeqcwRpTzyFrNHnfzSgCHEy9BHcEGhyoMZCCxt8l13nIoUE9Q2HJLw5QY33KbmkJs4j1xrG0aG
+Q0JfPgEHU1RdZX33inOhmlRaHylDFCfChQ+1iHsaO5S3HWCntZznKWlXWpuTekMwGwPXYshApqr8
+ZORK15FTAaggiG6cX0S5y2CBNOxv033aSF/rtJC8LakcC6wc1aJoIIAE1vyxjy+7SjENSoYc6+I2
+KSb12tjE8nVhz36udmNKekBlk4f4HoCMhuWG1o8O/FMsYOgWYRqiPkN7zTlgVGr18okmAWiDSKIz
+6MkEkbIRNBE+6tBDGR8Dk5AM/1E9V/RBbuHLoL7ryWPNbczk+DaqaJ3tvV2XcEQNtg413OEMXbug
+UZTLfhbrES+jkkXITHHZvMmZUldGL1DPvTVp9D0VzgalLA8+9oG6lLvDu79leNKGef9JOxqDDPDe
+eOzI8k1MGt6CKfjBWtrt7uYnXuhF0J0cUahoq0Tj0Itq4/g7u9xN12TyUb7mqqta6THuBrxzvxNi
+Cp/HuZc=
+-----END CERTIFICATE-----
+
+T-TeleSec GlobalRoot Class 3
+============================
+-----BEGIN CERTIFICATE-----
+MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoM
+IlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBU
+cnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwHhcNMDgx
+MDAxMTAyOTU2WhcNMzMxMDAxMjM1OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lz
+dGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBD
+ZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwggEiMA0GCSqGSIb3
+DQEBAQUAA4IBDwAwggEKAoIBAQC9dZPwYiJvJK7genasfb3ZJNW4t/zN8ELg63iIVl6bmlQdTQyK
+9tPPcPRStdiTBONGhnFBSivwKixVA9ZIw+A5OO3yXDw/RLyTPWGrTs0NvvAgJ1gORH8EGoel15YU
+NpDQSXuhdfsaa3Ox+M6pCSzyU9XDFES4hqX2iys52qMzVNn6chr3IhUciJFrf2blw2qAsCTz34ZF
+iP0Zf3WHHx+xGwpzJFu5ZeAsVMhg02YXP+HMVDNzkQI6pn97djmiH5a2OK61yJN0HZ65tOVgnS9W
+0eDrXltMEnAMbEQgqxHY9Bn20pxSN+f6tsIxO0rUFJmtxxr1XV/6B7h8DR/Wgx6zAgMBAAGjQjBA
+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS1A/d2O2GCahKqGFPr
+AyGUv/7OyjANBgkqhkiG9w0BAQsFAAOCAQEAVj3vlNW92nOyWL6ukK2YJ5f+AbGwUgC4TeQbIXQb
+fsDuXmkqJa9c1h3a0nnJ85cp4IaH3gRZD/FZ1GSFS5mvJQQeyUapl96Cshtwn5z2r3Ex3XsFpSzT
+ucpH9sry9uetuUg/vBa3wW306gmv7PO15wWeph6KU1HWk4HMdJP2udqmJQV0eVp+QD6CSyYRMG7h
+P0HHRwA11fXT91Q+gT3aSWqas+8QPebrb9HIIkfLzM8BMZLZGOMivgkeGj5asuRrDFR6fUNOuIml
+e9eiPZaGzPImNC1qkp2aGtAw4l1OBLBfiyB+d8E9lYLRRpo7PHi4b6HQDWSieB4pTpPDpFQUWw==
+-----END CERTIFICATE-----
+
+EE Certification Centre Root CA
+===============================
+-----BEGIN CERTIFICATE-----
+MIIEAzCCAuugAwIBAgIQVID5oHPtPwBMyonY43HmSjANBgkqhkiG9w0BAQUFADB1MQswCQYDVQQG
+EwJFRTEiMCAGA1UECgwZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1czEoMCYGA1UEAwwfRUUgQ2Vy
+dGlmaWNhdGlvbiBDZW50cmUgUm9vdCBDQTEYMBYGCSqGSIb3DQEJARYJcGtpQHNrLmVlMCIYDzIw
+MTAxMDMwMTAxMDMwWhgPMjAzMDEyMTcyMzU5NTlaMHUxCzAJBgNVBAYTAkVFMSIwIAYDVQQKDBlB
+UyBTZXJ0aWZpdHNlZXJpbWlza2Vza3VzMSgwJgYDVQQDDB9FRSBDZXJ0aWZpY2F0aW9uIENlbnRy
+ZSBSb290IENBMRgwFgYJKoZIhvcNAQkBFglwa2lAc2suZWUwggEiMA0GCSqGSIb3DQEBAQUAA4IB
+DwAwggEKAoIBAQDIIMDs4MVLqwd4lfNE7vsLDP90jmG7sWLqI9iroWUyeuuOF0+W2Ap7kaJjbMeM
+TC55v6kF/GlclY1i+blw7cNRfdCT5mzrMEvhvH2/UpvObntl8jixwKIy72KyaOBhU8E2lf/slLo2
+rpwcpzIP5Xy0xm90/XsY6KxX7QYgSzIwWFv9zajmofxwvI6Sc9uXp3whrj3B9UiHbCe9nyV0gVWw
+93X2PaRka9ZP585ArQ/dMtO8ihJTmMmJ+xAdTX7Nfh9WDSFwhfYggx/2uh8Ej+p3iDXE/+pOoYtN
+P2MbRMNE1CV2yreN1x5KZmTNXMWcg+HCCIia7E6j8T4cLNlsHaFLAgMBAAGjgYowgYcwDwYDVR0T
+AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBLyWj7qVhy/zQas8fElyalL1BSZ
+MEUGA1UdJQQ+MDwGCCsGAQUFBwMCBggrBgEFBQcDAQYIKwYBBQUHAwMGCCsGAQUFBwMEBggrBgEF
+BQcDCAYIKwYBBQUHAwkwDQYJKoZIhvcNAQEFBQADggEBAHv25MANqhlHt01Xo/6tu7Fq1Q+e2+Rj
+xY6hUFaTlrg4wCQiZrxTFGGVv9DHKpY5P30osxBAIWrEr7BSdxjhlthWXePdNl4dp1BUoMUq5KqM
+lIpPnTX/dqQGE5Gion0ARD9V04I8GtVbvFZMIi5GQ4okQC3zErg7cBqklrkar4dBGmoYDQZPxz5u
+uSlNDUmJEYcyW+ZLBMjkXOZ0c5RdFpgTlf7727FE5TpwrDdr5rMzcijJs1eg9gIWiAYLtqZLICjU
+3j2LrTcFU3T+bsy8QxdxXvnFzBqpYe73dgzzcvRyrc9yAjYHR8/vGVCJYMzpJJUPwssd8m92kMfM
+dcGWxZ0=
+-----END CERTIFICATE-----
+
+D-TRUST Root Class 3 CA 2 2009
+==============================
+-----BEGIN CERTIFICATE-----
+MIIEMzCCAxugAwIBAgIDCYPzMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQK
+DAxELVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTAe
+Fw0wOTExMDUwODM1NThaFw0yOTExMDUwODM1NThaME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQKDAxE
+LVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTCCASIw
+DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANOySs96R+91myP6Oi/WUEWJNTrGa9v+2wBoqOAD
+ER03UAifTUpolDWzU9GUY6cgVq/eUXjsKj3zSEhQPgrfRlWLJ23DEE0NkVJD2IfgXU42tSHKXzlA
+BF9bfsyjxiupQB7ZNoTWSPOSHjRGICTBpFGOShrvUD9pXRl/RcPHAY9RySPocq60vFYJfxLLHLGv
+KZAKyVXMD9O0Gu1HNVpK7ZxzBCHQqr0ME7UAyiZsxGsMlFqVlNpQmvH/pStmMaTJOKDfHR+4CS7z
+p+hnUquVH+BGPtikw8paxTGA6Eian5Rp/hnd2HN8gcqW3o7tszIFZYQ05ub9VxC1X3a/L7AQDcUC
+AwEAAaOCARowggEWMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFP3aFMSfMN4hvR5COfyrYyNJ
+4PGEMA4GA1UdDwEB/wQEAwIBBjCB0wYDVR0fBIHLMIHIMIGAoH6gfIZ6bGRhcDovL2RpcmVjdG9y
+eS5kLXRydXN0Lm5ldC9DTj1ELVRSVVNUJTIwUm9vdCUyMENsYXNzJTIwMyUyMENBJTIwMiUyMDIw
+MDksTz1ELVRydXN0JTIwR21iSCxDPURFP2NlcnRpZmljYXRlcmV2b2NhdGlvbmxpc3QwQ6BBoD+G
+PWh0dHA6Ly93d3cuZC10cnVzdC5uZXQvY3JsL2QtdHJ1c3Rfcm9vdF9jbGFzc18zX2NhXzJfMjAw
+OS5jcmwwDQYJKoZIhvcNAQELBQADggEBAH+X2zDI36ScfSF6gHDOFBJpiBSVYEQBrLLpME+bUMJm
+2H6NMLVwMeniacfzcNsgFYbQDfC+rAF1hM5+n02/t2A7nPPKHeJeaNijnZflQGDSNiH+0LS4F9p0
+o3/U37CYAqxva2ssJSRyoWXuJVrl5jLn8t+rSfrzkGkj2wTZ51xY/GXUl77M/C4KzCUqNQT4YJEV
+dT1B/yMfGchs64JTBKbkTCJNjYy6zltz7GRUUG3RnFX7acM2w4y8PIWmawomDeCTmGCufsYkl4ph
+X5GOZpIJhzbNi5stPvZR1FDUWSi9g/LMKHtThm3YJohw1+qRzT65ysCQblrGXnRl11z+o+I=
+-----END CERTIFICATE-----
+
+D-TRUST Root Class 3 CA 2 EV 2009
+=================================
+-----BEGIN CERTIFICATE-----
+MIIEQzCCAyugAwIBAgIDCYP0MA0GCSqGSIb3DQEBCwUAMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK
+DAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw
+OTAeFw0wOTExMDUwODUwNDZaFw0yOTExMDUwODUwNDZaMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK
+DAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw
+OTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJnxhDRwui+3MKCOvXwEz75ivJn9gpfS
+egpnljgJ9hBOlSJzmY3aFS3nBfwZcyK3jpgAvDw9rKFs+9Z5JUut8Mxk2og+KbgPCdM03TP1YtHh
+zRnp7hhPTFiu4h7WDFsVWtg6uMQYZB7jM7K1iXdODL/ZlGsTl28So/6ZqQTMFexgaDbtCHu39b+T
+7WYxg4zGcTSHThfqr4uRjRxWQa4iN1438h3Z0S0NL2lRp75mpoo6Kr3HGrHhFPC+Oh25z1uxav60
+sUYgovseO3Dvk5h9jHOW8sXvhXCtKSb8HgQ+HKDYD8tSg2J87otTlZCpV6LqYQXY+U3EJ/pure35
+11H3a6UCAwEAAaOCASQwggEgMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNOUikxiEyoZLsyv
+cop9NteaHNxnMA4GA1UdDwEB/wQEAwIBBjCB3QYDVR0fBIHVMIHSMIGHoIGEoIGBhn9sZGFwOi8v
+ZGlyZWN0b3J5LmQtdHJ1c3QubmV0L0NOPUQtVFJVU1QlMjBSb290JTIwQ2xhc3MlMjAzJTIwQ0El
+MjAyJTIwRVYlMjAyMDA5LE89RC1UcnVzdCUyMEdtYkgsQz1ERT9jZXJ0aWZpY2F0ZXJldm9jYXRp
+b25saXN0MEagRKBChkBodHRwOi8vd3d3LmQtdHJ1c3QubmV0L2NybC9kLXRydXN0X3Jvb3RfY2xh
+c3NfM19jYV8yX2V2XzIwMDkuY3JsMA0GCSqGSIb3DQEBCwUAA4IBAQA07XtaPKSUiO8aEXUHL7P+
+PPoeUSbrh/Yp3uDx1MYkCenBz1UbtDDZzhr+BlGmFaQt77JLvyAoJUnRpjZ3NOhk31KxEcdzes05
+nsKtjHEh8lprr988TlWvsoRlFIm5d8sqMb7Po23Pb0iUMkZv53GMoKaEGTcH8gNFCSuGdXzfX2lX
+ANtu2KZyIktQ1HWYVt+3GP9DQ1CuekR78HlR10M9p9OB0/DJT7naxpeG0ILD5EJt/rDiZE4OJudA
+NCa1CInXCGNjOCd1HjPqbqjdn5lPdE2BiYBL3ZqXKVwvvoFBuYz/6n1gBp7N1z3TLqMVvKjmJuVv
+w9y4AyHqnxbxLFS1
+-----END CERTIFICATE-----
+
+CA Disig Root R2
+================
+-----BEGIN CERTIFICATE-----
+MIIFaTCCA1GgAwIBAgIJAJK4iNuwisFjMA0GCSqGSIb3DQEBCwUAMFIxCzAJBgNVBAYTAlNLMRMw
+EQYDVQQHEwpCcmF0aXNsYXZhMRMwEQYDVQQKEwpEaXNpZyBhLnMuMRkwFwYDVQQDExBDQSBEaXNp
+ZyBSb290IFIyMB4XDTEyMDcxOTA5MTUzMFoXDTQyMDcxOTA5MTUzMFowUjELMAkGA1UEBhMCU0sx
+EzARBgNVBAcTCkJyYXRpc2xhdmExEzARBgNVBAoTCkRpc2lnIGEucy4xGTAXBgNVBAMTEENBIERp
+c2lnIFJvb3QgUjIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCio8QACdaFXS1tFPbC
+w3OeNcJxVX6B+6tGUODBfEl45qt5WDza/3wcn9iXAng+a0EE6UG9vgMsRfYvZNSrXaNHPWSb6Wia
+xswbP7q+sos0Ai6YVRn8jG+qX9pMzk0DIaPY0jSTVpbLTAwAFjxfGs3Ix2ymrdMxp7zo5eFm1tL7
+A7RBZckQrg4FY8aAamkw/dLukO8NJ9+flXP04SXabBbeQTg06ov80egEFGEtQX6sx3dOy1FU+16S
+GBsEWmjGycT6txOgmLcRK7fWV8x8nhfRyyX+hk4kLlYMeE2eARKmK6cBZW58Yh2EhN/qwGu1pSqV
+g8NTEQxzHQuyRpDRQjrOQG6Vrf/GlK1ul4SOfW+eioANSW1z4nuSHsPzwfPrLgVv2RvPN3YEyLRa
+5Beny912H9AZdugsBbPWnDTYltxhh5EF5EQIM8HauQhl1K6yNg3ruji6DOWbnuuNZt2Zz9aJQfYE
+koopKW1rOhzndX0CcQ7zwOe9yxndnWCywmZgtrEE7snmhrmaZkCo5xHtgUUDi/ZnWejBBhG93c+A
+Ak9lQHhcR1DIm+YfgXvkRKhbhZri3lrVx/k6RGZL5DJUfORsnLMOPReisjQS1n6yqEm70XooQL6i
+Fh/f5DcfEXP7kAplQ6INfPgGAVUzfbANuPT1rqVCV3w2EYx7XsQDnYx5nQIDAQABo0IwQDAPBgNV
+HRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUtZn4r7CU9eMg1gqtzk5WpC5u
+Qu0wDQYJKoZIhvcNAQELBQADggIBACYGXnDnZTPIgm7ZnBc6G3pmsgH2eDtpXi/q/075KMOYKmFM
+tCQSin1tERT3nLXK5ryeJ45MGcipvXrA1zYObYVybqjGom32+nNjf7xueQgcnYqfGopTpti72TVV
+sRHFqQOzVju5hJMiXn7B9hJSi+osZ7z+Nkz1uM/Rs0mSO9MpDpkblvdhuDvEK7Z4bLQjb/D907Je
+dR+Zlais9trhxTF7+9FGs9K8Z7RiVLoJ92Owk6Ka+elSLotgEqv89WBW7xBci8QaQtyDW2QOy7W8
+1k/BfDxujRNt+3vrMNDcTa/F1balTFtxyegxvug4BkihGuLq0t4SOVga/4AOgnXmt8kHbA7v/zjx
+mHHEt38OFdAlab0inSvtBfZGR6ztwPDUO+Ls7pZbkBNOHlY667DvlruWIxG68kOGdGSVyCh13x01
+utI3gzhTODY7z2zp+WsO0PsE6E9312UBeIYMej4hYvF/Y3EMyZ9E26gnonW+boE+18DrG5gPcFw0
+sorMwIUY6256s/daoQe/qUKS82Ail+QUoQebTnbAjn39pCXHR+3/H3OszMOl6W8KjptlwlCFtaOg
+UxLMVYdh84GuEEZhvUQhuMI9dM9+JDX6HAcOmz0iyu8xL4ysEr3vQCj8KWefshNPZiTEUxnpHikV
+7+ZtsH8tZ/3zbBt1RqPlShfppNcL
+-----END CERTIFICATE-----
+
+ACCVRAIZ1
+=========
+-----BEGIN CERTIFICATE-----
+MIIH0zCCBbugAwIBAgIIXsO3pkN/pOAwDQYJKoZIhvcNAQEFBQAwQjESMBAGA1UEAwwJQUNDVlJB
+SVoxMRAwDgYDVQQLDAdQS0lBQ0NWMQ0wCwYDVQQKDARBQ0NWMQswCQYDVQQGEwJFUzAeFw0xMTA1
+MDUwOTM3MzdaFw0zMDEyMzEwOTM3MzdaMEIxEjAQBgNVBAMMCUFDQ1ZSQUlaMTEQMA4GA1UECwwH
+UEtJQUNDVjENMAsGA1UECgwEQUNDVjELMAkGA1UEBhMCRVMwggIiMA0GCSqGSIb3DQEBAQUAA4IC
+DwAwggIKAoICAQCbqau/YUqXry+XZpp0X9DZlv3P4uRm7x8fRzPCRKPfmt4ftVTdFXxpNRFvu8gM
+jmoYHtiP2Ra8EEg2XPBjs5BaXCQ316PWywlxufEBcoSwfdtNgM3802/J+Nq2DoLSRYWoG2ioPej0
+RGy9ocLLA76MPhMAhN9KSMDjIgro6TenGEyxCQ0jVn8ETdkXhBilyNpAlHPrzg5XPAOBOp0KoVdD
+aaxXbXmQeOW1tDvYvEyNKKGno6e6Ak4l0Squ7a4DIrhrIA8wKFSVf+DuzgpmndFALW4ir50awQUZ
+0m/A8p/4e7MCQvtQqR0tkw8jq8bBD5L/0KIV9VMJcRz/RROE5iZe+OCIHAr8Fraocwa48GOEAqDG
+WuzndN9wrqODJerWx5eHk6fGioozl2A3ED6XPm4pFdahD9GILBKfb6qkxkLrQaLjlUPTAYVtjrs7
+8yM2x/474KElB0iryYl0/wiPgL/AlmXz7uxLaL2diMMxs0Dx6M/2OLuc5NF/1OVYm3z61PMOm3WR
+5LpSLhl+0fXNWhn8ugb2+1KoS5kE3fj5tItQo05iifCHJPqDQsGH+tUtKSpacXpkatcnYGMN285J
+9Y0fkIkyF/hzQ7jSWpOGYdbhdQrqeWZ2iE9x6wQl1gpaepPluUsXQA+xtrn13k/c4LOsOxFwYIRK
+Q26ZIMApcQrAZQIDAQABo4ICyzCCAscwfQYIKwYBBQUHAQEEcTBvMEwGCCsGAQUFBzAChkBodHRw
+Oi8vd3d3LmFjY3YuZXMvZmlsZWFkbWluL0FyY2hpdm9zL2NlcnRpZmljYWRvcy9yYWl6YWNjdjEu
+Y3J0MB8GCCsGAQUFBzABhhNodHRwOi8vb2NzcC5hY2N2LmVzMB0GA1UdDgQWBBTSh7Tj3zcnk1X2
+VuqB5TbMjB4/vTAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFNKHtOPfNyeTVfZW6oHlNsyM
+Hj+9MIIBcwYDVR0gBIIBajCCAWYwggFiBgRVHSAAMIIBWDCCASIGCCsGAQUFBwICMIIBFB6CARAA
+QQB1AHQAbwByAGkAZABhAGQAIABkAGUAIABDAGUAcgB0AGkAZgBpAGMAYQBjAGkA8wBuACAAUgBh
+AO0AegAgAGQAZQAgAGwAYQAgAEEAQwBDAFYAIAAoAEEAZwBlAG4AYwBpAGEAIABkAGUAIABUAGUA
+YwBuAG8AbABvAGcA7QBhACAAeQAgAEMAZQByAHQAaQBmAGkAYwBhAGMAaQDzAG4AIABFAGwAZQBj
+AHQAcgDzAG4AaQBjAGEALAAgAEMASQBGACAAUQA0ADYAMAAxADEANQA2AEUAKQAuACAAQwBQAFMA
+IABlAG4AIABoAHQAdABwADoALwAvAHcAdwB3AC4AYQBjAGMAdgAuAGUAczAwBggrBgEFBQcCARYk
+aHR0cDovL3d3dy5hY2N2LmVzL2xlZ2lzbGFjaW9uX2MuaHRtMFUGA1UdHwROMEwwSqBIoEaGRGh0
+dHA6Ly93d3cuYWNjdi5lcy9maWxlYWRtaW4vQXJjaGl2b3MvY2VydGlmaWNhZG9zL3JhaXphY2N2
+MV9kZXIuY3JsMA4GA1UdDwEB/wQEAwIBBjAXBgNVHREEEDAOgQxhY2N2QGFjY3YuZXMwDQYJKoZI
+hvcNAQEFBQADggIBAJcxAp/n/UNnSEQU5CmH7UwoZtCPNdpNYbdKl02125DgBS4OxnnQ8pdpD70E
+R9m+27Up2pvZrqmZ1dM8MJP1jaGo/AaNRPTKFpV8M9xii6g3+CfYCS0b78gUJyCpZET/LtZ1qmxN
+YEAZSUNUY9rizLpm5U9EelvZaoErQNV/+QEnWCzI7UiRfD+mAM/EKXMRNt6GGT6d7hmKG9Ww7Y49
+nCrADdg9ZuM8Db3VlFzi4qc1GwQA9j9ajepDvV+JHanBsMyZ4k0ACtrJJ1vnE5Bc5PUzolVt3OAJ
+TS+xJlsndQAJxGJ3KQhfnlmstn6tn1QwIgPBHnFk/vk4CpYY3QIUrCPLBhwepH2NDd4nQeit2hW3
+sCPdK6jT2iWH7ehVRE2I9DZ+hJp4rPcOVkkO1jMl1oRQQmwgEh0q1b688nCBpHBgvgW1m54ERL5h
+I6zppSSMEYCUWqKiuUnSwdzRp+0xESyeGabu4VXhwOrPDYTkF7eifKXeVSUG7szAh1xA2syVP1Xg
+Nce4hL60Xc16gwFy7ofmXx2utYXGJt/mwZrpHgJHnyqobalbz+xFd3+YJ5oyXSrjhO7FmGYvliAd
+3djDJ9ew+f7Zfc3Qn48LFFhRny+Lwzgt3uiP1o2HpPVWQxaZLPSkVrQ0uGE3ycJYgBugl6H8WY3p
+EfbRD0tVNEYqi4Y7
+-----END CERTIFICATE-----
+
+TWCA Global Root CA
+===================
+-----BEGIN CERTIFICATE-----
+MIIFQTCCAymgAwIBAgICDL4wDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCVFcxEjAQBgNVBAoT
+CVRBSVdBTi1DQTEQMA4GA1UECxMHUm9vdCBDQTEcMBoGA1UEAxMTVFdDQSBHbG9iYWwgUm9vdCBD
+QTAeFw0xMjA2MjcwNjI4MzNaFw0zMDEyMzExNTU5NTlaMFExCzAJBgNVBAYTAlRXMRIwEAYDVQQK
+EwlUQUlXQU4tQ0ExEDAOBgNVBAsTB1Jvb3QgQ0ExHDAaBgNVBAMTE1RXQ0EgR2xvYmFsIFJvb3Qg
+Q0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCwBdvI64zEbooh745NnHEKH1Jw7W2C
+nJfF10xORUnLQEK1EjRsGcJ0pDFfhQKX7EMzClPSnIyOt7h52yvVavKOZsTuKwEHktSz0ALfUPZV
+r2YOy+BHYC8rMjk1Ujoog/h7FsYYuGLWRyWRzvAZEk2tY/XTP3VfKfChMBwqoJimFb3u/Rk28OKR
+Q4/6ytYQJ0lM793B8YVwm8rqqFpD/G2Gb3PpN0Wp8DbHzIh1HrtsBv+baz4X7GGqcXzGHaL3SekV
+tTzWoWH1EfcFbx39Eb7QMAfCKbAJTibc46KokWofwpFFiFzlmLhxpRUZyXx1EcxwdE8tmx2RRP1W
+KKD+u4ZqyPpcC1jcxkt2yKsi2XMPpfRaAok/T54igu6idFMqPVMnaR1sjjIsZAAmY2E2TqNGtz99
+sy2sbZCilaLOz9qC5wc0GZbpuCGqKX6mOL6OKUohZnkfs8O1CWfe1tQHRvMq2uYiN2DLgbYPoA/p
+yJV/v1WRBXrPPRXAb94JlAGD1zQbzECl8LibZ9WYkTunhHiVJqRaCPgrdLQABDzfuBSO6N+pjWxn
+kjMdwLfS7JLIvgm/LCkFbwJrnu+8vyq8W8BQj0FwcYeyTbcEqYSjMq+u7msXi7Kx/mzhkIyIqJdI
+zshNy/MGz19qCkKxHh53L46g5pIOBvwFItIm4TFRfTLcDwIDAQABoyMwITAOBgNVHQ8BAf8EBAMC
+AQYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEAXzSBdu+WHdXltdkCY4QWwa6g
+cFGn90xHNcgL1yg9iXHZqjNB6hQbbCEAwGxCGX6faVsgQt+i0trEfJdLjbDorMjupWkEmQqSpqsn
+LhpNgb+E1HAerUf+/UqdM+DyucRFCCEK2mlpc3INvjT+lIutwx4116KD7+U4x6WFH6vPNOw/KP4M
+8VeGTslV9xzU2KV9Bnpv1d8Q34FOIWWxtuEXeZVFBs5fzNxGiWNoRI2T9GRwoD2dKAXDOXC4Ynsg
+/eTb6QihuJ49CcdP+yz4k3ZB3lLg4VfSnQO8d57+nile98FRYB/e2guyLXW3Q0iT5/Z5xoRdgFlg
+lPx4mI88k1HtQJAH32RjJMtOcQWh15QaiDLxInQirqWm2BJpTGCjAu4r7NRjkgtevi92a6O2JryP
+A9gK8kxkRr05YuWW6zRjESjMlfGt7+/cgFhI6Uu46mWs6fyAtbXIRfmswZ/ZuepiiI7E8UuDEq3m
+i4TWnsLrgxifarsbJGAzcMzs9zLzXNl5fe+epP7JI8Mk7hWSsT2RTyaGvWZzJBPqpK5jwa19hAM8
+EHiGG3njxPPyBJUgriOCxLM6AGK/5jYk4Ve6xx6QddVfP5VhK8E7zeWzaGHQRiapIVJpLesux+t3
+zqY6tQMzT3bR51xUAV3LePTJDL/PEo4XLSNolOer/qmyKwbQBM0=
+-----END CERTIFICATE-----
+
+TeliaSonera Root CA v1
+======================
+-----BEGIN CERTIFICATE-----
+MIIFODCCAyCgAwIBAgIRAJW+FqD3LkbxezmCcvqLzZYwDQYJKoZIhvcNAQEFBQAwNzEUMBIGA1UE
+CgwLVGVsaWFTb25lcmExHzAdBgNVBAMMFlRlbGlhU29uZXJhIFJvb3QgQ0EgdjEwHhcNMDcxMDE4
+MTIwMDUwWhcNMzIxMDE4MTIwMDUwWjA3MRQwEgYDVQQKDAtUZWxpYVNvbmVyYTEfMB0GA1UEAwwW
+VGVsaWFTb25lcmEgUm9vdCBDQSB2MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMK+
+6yfwIaPzaSZVfp3FVRaRXP3vIb9TgHot0pGMYzHw7CTww6XScnwQbfQ3t+XmfHnqjLWCi65ItqwA
+3GV17CpNX8GH9SBlK4GoRz6JI5UwFpB/6FcHSOcZrr9FZ7E3GwYq/t75rH2D+1665I+XZ75Ljo1k
+B1c4VWk0Nj0TSO9P4tNmHqTPGrdeNjPUtAa9GAH9d4RQAEX1jF3oI7x+/jXh7VB7qTCNGdMJjmhn
+Xb88lxhTuylixcpecsHHltTbLaC0H2kD7OriUPEMPPCs81Mt8Bz17Ww5OXOAFshSsCPN4D7c3TxH
+oLs1iuKYaIu+5b9y7tL6pe0S7fyYGKkmdtwoSxAgHNN/Fnct7W+A90m7UwW7XWjH1Mh1Fj+JWov3
+F0fUTPHSiXk+TT2YqGHeOh7S+F4D4MHJHIzTjU3TlTazN19jY5szFPAtJmtTfImMMsJu7D0hADnJ
+oWjiUIMusDor8zagrC/kb2HCUQk5PotTubtn2txTuXZZNp1D5SDgPTJghSJRt8czu90VL6R4pgd7
+gUY2BIbdeTXHlSw7sKMXNeVzH7RcWe/a6hBle3rQf5+ztCo3O3CLm1u5K7fsslESl1MpWtTwEhDc
+TwK7EpIvYtQ/aUN8Ddb8WHUBiJ1YFkveupD/RwGJBmr2X7KQarMCpgKIv7NHfirZ1fpoeDVNAgMB
+AAGjPzA9MA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1UdDgQWBBTwj1k4ALP1j5qW
+DNXr+nuqF+gTEjANBgkqhkiG9w0BAQUFAAOCAgEAvuRcYk4k9AwI//DTDGjkk0kiP0Qnb7tt3oNm
+zqjMDfz1mgbldxSR651Be5kqhOX//CHBXfDkH1e3damhXwIm/9fH907eT/j3HEbAek9ALCI18Bmx
+0GtnLLCo4MBANzX2hFxc469CeP6nyQ1Q6g2EdvZR74NTxnr/DlZJLo961gzmJ1TjTQpgcmLNkQfW
+pb/ImWvtxBnmq0wROMVvMeJuScg/doAmAyYp4Db29iBT4xdwNBedY2gea+zDTYa4EzAvXUYNR0PV
+G6pZDrlcjQZIrXSHX8f8MVRBE+LHIQ6e4B4N4cB7Q4WQxYpYxmUKeFfyxiMPAdkgS94P+5KFdSpc
+c41teyWRyu5FrgZLAMzTsVlQ2jqIOylDRl6XK1TOU2+NSueW+r9xDkKLfP0ooNBIytrEgUy7onOT
+JsjrDNYmiLbAJM+7vVvrdX3pCI6GMyx5dwlppYn8s3CQh3aP0yK7Qs69cwsgJirQmz1wHiRszYd2
+qReWt88NkvuOGKmYSdGe/mBEciG5Ge3C9THxOUiIkCR1VBatzvT4aRRkOfujuLpwQMcnHL/EVlP6
+Y2XQ8xwOFvVrhlhNGNTkDY6lnVuR3HYkUD/GKvvZt5y11ubQ2egZixVxSK236thZiNSQvxaz2ems
+WWFUyBy6ysHK4bkgTI86k4mloMy/0/Z1pHWWbVY=
+-----END CERTIFICATE-----
+
+E-Tugra Certification Authority
+===============================
+-----BEGIN CERTIFICATE-----
+MIIGSzCCBDOgAwIBAgIIamg+nFGby1MwDQYJKoZIhvcNAQELBQAwgbIxCzAJBgNVBAYTAlRSMQ8w
+DQYDVQQHDAZBbmthcmExQDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamls
+ZXJpIHZlIEhpem1ldGxlcmkgQS7Fni4xJjAkBgNVBAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBN
+ZXJrZXppMSgwJgYDVQQDDB9FLVR1Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTEzMDMw
+NTEyMDk0OFoXDTIzMDMwMzEyMDk0OFowgbIxCzAJBgNVBAYTAlRSMQ8wDQYDVQQHDAZBbmthcmEx
+QDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamlsZXJpIHZlIEhpem1ldGxl
+cmkgQS7Fni4xJjAkBgNVBAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBNZXJrZXppMSgwJgYDVQQD
+DB9FLVR1Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
+MIICCgKCAgEA4vU/kwVRHoViVF56C/UYB4Oufq9899SKa6VjQzm5S/fDxmSJPZQuVIBSOTkHS0vd
+hQd2h8y/L5VMzH2nPbxHD5hw+IyFHnSOkm0bQNGZDbt1bsipa5rAhDGvykPL6ys06I+XawGb1Q5K
+CKpbknSFQ9OArqGIW66z6l7LFpp3RMih9lRozt6Plyu6W0ACDGQXwLWTzeHxE2bODHnv0ZEoq1+g
+ElIwcxmOj+GMB6LDu0rw6h8VqO4lzKRG+Bsi77MOQ7osJLjFLFzUHPhdZL3Dk14opz8n8Y4e0ypQ
+BaNV2cvnOVPAmJ6MVGKLJrD3fY185MaeZkJVgkfnsliNZvcHfC425lAcP9tDJMW/hkd5s3kc91r0
+E+xs+D/iWR+V7kI+ua2oMoVJl0b+SzGPWsutdEcf6ZG33ygEIqDUD13ieU/qbIWGvaimzuT6w+Gz
+rt48Ue7LE3wBf4QOXVGUnhMMti6lTPk5cDZvlsouDERVxcr6XQKj39ZkjFqzAQqptQpHF//vkUAq
+jqFGOjGY5RH8zLtJVor8udBhmm9lbObDyz51Sf6Pp+KJxWfXnUYTTjF2OySznhFlhqt/7x3U+Lzn
+rFpct1pHXFXOVbQicVtbC/DP3KBhZOqp12gKY6fgDT+gr9Oq0n7vUaDmUStVkhUXU8u3Zg5mTPj5
+dUyQ5xJwx0UCAwEAAaNjMGEwHQYDVR0OBBYEFC7j27JJ0JxUeVz6Jyr+zE7S6E5UMA8GA1UdEwEB
+/wQFMAMBAf8wHwYDVR0jBBgwFoAULuPbsknQnFR5XPonKv7MTtLoTlQwDgYDVR0PAQH/BAQDAgEG
+MA0GCSqGSIb3DQEBCwUAA4ICAQAFNzr0TbdF4kV1JI+2d1LoHNgQk2Xz8lkGpD4eKexd0dCrfOAK
+kEh47U6YA5n+KGCRHTAduGN8qOY1tfrTYXbm1gdLymmasoR6d5NFFxWfJNCYExL/u6Au/U5Mh/jO
+XKqYGwXgAEZKgoClM4so3O0409/lPun++1ndYYRP0lSWE2ETPo+Aab6TR7U1Q9Jauz1c77NCR807
+VRMGsAnb/WP2OogKmW9+4c4bU2pEZiNRCHu8W1Ki/QY3OEBhj0qWuJA3+GbHeJAAFS6LrVE1Uweo
+a2iu+U48BybNCAVwzDk/dr2l02cmAYamU9JgO3xDf1WKvJUawSg5TB9D0pH0clmKuVb8P7Sd2nCc
+dlqMQ1DujjByTd//SffGqWfZbawCEeI6FiWnWAjLb1NBnEg4R2gz0dfHj9R0IdTDBZB6/86WiLEV
+KV0jq9BgoRJP3vQXzTLlyb/IQ639Lo7xr+L0mPoSHyDYwKcMhcWQ9DstliaxLL5Mq+ux0orJ23gT
+Dx4JnW2PAJ8C2sH6H3p6CcRK5ogql5+Ji/03X186zjhZhkuvcQu02PJwT58yE+Owp1fl2tpDy4Q0
+8ijE6m30Ku/Ba3ba+367hTzSU8JNvnHhRdH9I2cNE3X7z2VnIp2usAnRCf8dNL/+I5c30jn6PQ0G
+C7TbO6Orb1wdtn7os4I07QZcJA==
+-----END CERTIFICATE-----
+
+T-TeleSec GlobalRoot Class 2
+============================
+-----BEGIN CERTIFICATE-----
+MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoM
+IlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBU
+cnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDIwHhcNMDgx
+MDAxMTA0MDE0WhcNMzMxMDAxMjM1OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lz
+dGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBD
+ZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDIwggEiMA0GCSqGSIb3
+DQEBAQUAA4IBDwAwggEKAoIBAQCqX9obX+hzkeXaXPSi5kfl82hVYAUdAqSzm1nzHoqvNK38DcLZ
+SBnuaY/JIPwhqgcZ7bBcrGXHX+0CfHt8LRvWurmAwhiCFoT6ZrAIxlQjgeTNuUk/9k9uN0goOA/F
+vudocP05l03Sx5iRUKrERLMjfTlH6VJi1hKTXrcxlkIF+3anHqP1wvzpesVsqXFP6st4vGCvx970
+2cu+fjOlbpSD8DT6IavqjnKgP6TeMFvvhk1qlVtDRKgQFRzlAVfFmPHmBiiRqiDFt1MmUUOyCxGV
+WOHAD3bZwI18gfNycJ5v/hqO2V81xrJvNHy+SE/iWjnX2J14np+GPgNeGYtEotXHAgMBAAGjQjBA
+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS/WSA2AHmgoCJrjNXy
+YdK4LMuCSjANBgkqhkiG9w0BAQsFAAOCAQEAMQOiYQsfdOhyNsZt+U2e+iKo4YFWz827n+qrkRk4
+r6p8FU3ztqONpfSO9kSpp+ghla0+AGIWiPACuvxhI+YzmzB6azZie60EI4RYZeLbK4rnJVM3YlNf
+vNoBYimipidx5joifsFvHZVwIEoHNN/q/xWA5brXethbdXwFeilHfkCoMRN3zUA7tFFHei4R40cR
+3p1m0IvVVGb6g1XqfMIpiRvpb7PO4gWEyS8+eIVibslfwXhjdFjASBgMmTnrpMwatXlajRWc2BQN
+9noHV8cigwUtPJslJj0Ys6lDfMjIq2SPDqO/nBudMNva0Bkuqjzx+zOAduTNrRlPBSeOE6Fuwg==
+-----END CERTIFICATE-----
+
+Atos TrustedRoot 2011
+=====================
+-----BEGIN CERTIFICATE-----
+MIIDdzCCAl+gAwIBAgIIXDPLYixfszIwDQYJKoZIhvcNAQELBQAwPDEeMBwGA1UEAwwVQXRvcyBU
+cnVzdGVkUm9vdCAyMDExMQ0wCwYDVQQKDARBdG9zMQswCQYDVQQGEwJERTAeFw0xMTA3MDcxNDU4
+MzBaFw0zMDEyMzEyMzU5NTlaMDwxHjAcBgNVBAMMFUF0b3MgVHJ1c3RlZFJvb3QgMjAxMTENMAsG
+A1UECgwEQXRvczELMAkGA1UEBhMCREUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCV
+hTuXbyo7LjvPpvMpNb7PGKw+qtn4TaA+Gke5vJrf8v7MPkfoepbCJI419KkM/IL9bcFyYie96mvr
+54rMVD6QUM+A1JX76LWC1BTFtqlVJVfbsVD2sGBkWXppzwO3bw2+yj5vdHLqqjAqc2K+SZFhyBH+
+DgMq92og3AIVDV4VavzjgsG1xZ1kCWyjWZgHJ8cblithdHFsQ/H3NYkQ4J7sVaE3IqKHBAUsR320
+HLliKWYoyrfhk/WklAOZuXCFteZI6o1Q/NnezG8HDt0Lcp2AMBYHlT8oDv3FdU9T1nSatCQujgKR
+z3bFmx5VdJx4IbHwLfELn8LVlhgf8FQieowHAgMBAAGjfTB7MB0GA1UdDgQWBBSnpQaxLKYJYO7R
+l+lwrrw7GWzbITAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFKelBrEspglg7tGX6XCuvDsZ
+bNshMBgGA1UdIAQRMA8wDQYLKwYBBAGwLQMEAQEwDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEB
+CwUAA4IBAQAmdzTblEiGKkGdLD4GkGDEjKwLVLgfuXvTBznk+j57sj1O7Z8jvZfza1zv7v1Apt+h
+k6EKhqzvINB5Ab149xnYJDE0BAGmuhWawyfc2E8PzBhj/5kPDpFrdRbhIfzYJsdHt6bPWHJxfrrh
+TZVHO8mvbaG0weyJ9rQPOLXiZNwlz6bb65pcmaHFCN795trV1lpFDMS3wrUU77QR/w4VtfX128a9
+61qn8FYiqTxlVMYVqL2Gns2Dlmh6cYGJ4Qvh6hEbaAjMaZ7snkGeRDImeuKHCnE96+RapNLbxc3G
+3mB/ufNPRJLvKrcYPqcZ2Qt9sTdBQrC6YB3y/gkRsPCHe6ed
+-----END CERTIFICATE-----
+
+QuoVadis Root CA 1 G3
+=====================
+-----BEGIN CERTIFICATE-----
+MIIFYDCCA0igAwIBAgIUeFhfLq0sGUvjNwc1NBMotZbUZZMwDQYJKoZIhvcNAQELBQAwSDELMAkG
+A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv
+b3QgQ0EgMSBHMzAeFw0xMjAxMTIxNzI3NDRaFw00MjAxMTIxNzI3NDRaMEgxCzAJBgNVBAYTAkJN
+MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDEg
+RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCgvlAQjunybEC0BJyFuTHK3C3kEakE
+PBtVwedYMB0ktMPvhd6MLOHBPd+C5k+tR4ds7FtJwUrVu4/sh6x/gpqG7D0DmVIB0jWerNrwU8lm
+PNSsAgHaJNM7qAJGr6Qc4/hzWHa39g6QDbXwz8z6+cZM5cOGMAqNF34168Xfuw6cwI2H44g4hWf6
+Pser4BOcBRiYz5P1sZK0/CPTz9XEJ0ngnjybCKOLXSoh4Pw5qlPafX7PGglTvF0FBM+hSo+LdoIN
+ofjSxxR3W5A2B4GbPgb6Ul5jxaYA/qXpUhtStZI5cgMJYr2wYBZupt0lwgNm3fME0UDiTouG9G/l
+g6AnhF4EwfWQvTA9xO+oabw4m6SkltFi2mnAAZauy8RRNOoMqv8hjlmPSlzkYZqn0ukqeI1RPToV
+7qJZjqlc3sX5kCLliEVx3ZGZbHqfPT2YfF72vhZooF6uCyP8Wg+qInYtyaEQHeTTRCOQiJ/GKubX
+9ZqzWB4vMIkIG1SitZgj7Ah3HJVdYdHLiZxfokqRmu8hqkkWCKi9YSgxyXSthfbZxbGL0eUQMk1f
+iyA6PEkfM4VZDdvLCXVDaXP7a3F98N/ETH3Goy7IlXnLc6KOTk0k+17kBL5yG6YnLUlamXrXXAkg
+t3+UuU/xDRxeiEIbEbfnkduebPRq34wGmAOtzCjvpUfzUwIDAQABo0IwQDAPBgNVHRMBAf8EBTAD
+AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUo5fW816iEOGrRZ88F2Q87gFwnMwwDQYJKoZI
+hvcNAQELBQADggIBABj6W3X8PnrHX3fHyt/PX8MSxEBd1DKquGrX1RUVRpgjpeaQWxiZTOOtQqOC
+MTaIzen7xASWSIsBx40Bz1szBpZGZnQdT+3Btrm0DWHMY37XLneMlhwqI2hrhVd2cDMT/uFPpiN3
+GPoajOi9ZcnPP/TJF9zrx7zABC4tRi9pZsMbj/7sPtPKlL92CiUNqXsCHKnQO18LwIE6PWThv6ct
+Tr1NxNgpxiIY0MWscgKCP6o6ojoilzHdCGPDdRS5YCgtW2jgFqlmgiNR9etT2DGbe+m3nUvriBbP
++V04ikkwj+3x6xn0dxoxGE1nVGwvb2X52z3sIexe9PSLymBlVNFxZPT5pqOBMzYzcfCkeF9OrYMh
+3jRJjehZrJ3ydlo28hP0r+AJx2EqbPfgna67hkooby7utHnNkDPDs3b69fBsnQGQ+p6Q9pxyz0fa
+wx/kNSBT8lTR32GDpgLiJTjehTItXnOQUl1CxM49S+H5GYQd1aJQzEH7QRTDvdbJWqNjZgKAvQU6
+O0ec7AAmTPWIUb+oI38YB7AL7YsmoWTTYUrrXJ/es69nA7Mf3W1daWhpq1467HxpvMc7hU6eFbm0
+FU/DlXpY18ls6Wy58yljXrQs8C097Vpl4KlbQMJImYFtnh8GKjwStIsPm6Ik8KaN1nrgS7ZklmOV
+hMJKzRwuJIczYOXD
+-----END CERTIFICATE-----
+
+QuoVadis Root CA 2 G3
+=====================
+-----BEGIN CERTIFICATE-----
+MIIFYDCCA0igAwIBAgIURFc0JFuBiZs18s64KztbpybwdSgwDQYJKoZIhvcNAQELBQAwSDELMAkG
+A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv
+b3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00MjAxMTIxODU5MzJaMEgxCzAJBgNVBAYTAkJN
+MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDIg
+RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQChriWyARjcV4g/Ruv5r+LrI3HimtFh
+ZiFfqq8nUeVuGxbULX1QsFN3vXg6YOJkApt8hpvWGo6t/x8Vf9WVHhLL5hSEBMHfNrMWn4rjyduY
+NM7YMxcoRvynyfDStNVNCXJJ+fKH46nafaF9a7I6JaltUkSs+L5u+9ymc5GQYaYDFCDy54ejiK2t
+oIz/pgslUiXnFgHVy7g1gQyjO/Dh4fxaXc6AcW34Sas+O7q414AB+6XrW7PFXmAqMaCvN+ggOp+o
+MiwMzAkd056OXbxMmO7FGmh77FOm6RQ1o9/NgJ8MSPsc9PG/Srj61YxxSscfrf5BmrODXfKEVu+l
+V0POKa2Mq1W/xPtbAd0jIaFYAI7D0GoT7RPjEiuA3GfmlbLNHiJuKvhB1PLKFAeNilUSxmn1uIZo
+L1NesNKqIcGY5jDjZ1XHm26sGahVpkUG0CM62+tlXSoREfA7T8pt9DTEceT/AFr2XK4jYIVz8eQQ
+sSWu1ZK7E8EM4DnatDlXtas1qnIhO4M15zHfeiFuuDIIfR0ykRVKYnLP43ehvNURG3YBZwjgQQvD
+6xVu+KQZ2aKrr+InUlYrAoosFCT5v0ICvybIxo/gbjh9Uy3l7ZizlWNof/k19N+IxWA1ksB8aRxh
+lRbQ694Lrz4EEEVlWFA4r0jyWbYW8jwNkALGcC4BrTwV1wIDAQABo0IwQDAPBgNVHRMBAf8EBTAD
+AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU7edvdlq/YOxJW8ald7tyFnGbxD0wDQYJKoZI
+hvcNAQELBQADggIBAJHfgD9DCX5xwvfrs4iP4VGyvD11+ShdyLyZm3tdquXK4Qr36LLTn91nMX66
+AarHakE7kNQIXLJgapDwyM4DYvmL7ftuKtwGTTwpD4kWilhMSA/ohGHqPHKmd+RCroijQ1h5fq7K
+pVMNqT1wvSAZYaRsOPxDMuHBR//47PERIjKWnML2W2mWeyAMQ0GaW/ZZGYjeVYg3UQt4XAoeo0L9
+x52ID8DyeAIkVJOviYeIyUqAHerQbj5hLja7NQ4nlv1mNDthcnPxFlxHBlRJAHpYErAK74X9sbgz
+dWqTHBLmYF5vHX/JHyPLhGGfHoJE+V+tYlUkmlKY7VHnoX6XOuYvHxHaU4AshZ6rNRDbIl9qxV6X
+U/IyAgkwo1jwDQHVcsaxfGl7w/U2Rcxhbl5MlMVerugOXou/983g7aEOGzPuVBj+D77vfoRrQ+Nw
+mNtddbINWQeFFSM51vHfqSYP1kjHs6Yi9TM3WpVHn3u6GBVv/9YUZINJ0gpnIdsPNWNgKCLjsZWD
+zYWm3S8P52dSbrsvhXz1SnPnxT7AvSESBT/8twNJAlvIJebiVDj1eYeMHVOyToV7BjjHLPj4sHKN
+JeV3UvQDHEimUF+IIDBu8oJDqz2XhOdT+yHBTw8imoa4WSr2Rz0ZiC3oheGe7IUIarFsNMkd7Egr
+O3jtZsSOeWmD3n+M
+-----END CERTIFICATE-----
+
+QuoVadis Root CA 3 G3
+=====================
+-----BEGIN CERTIFICATE-----
+MIIFYDCCA0igAwIBAgIULvWbAiin23r/1aOp7r0DoM8Sah0wDQYJKoZIhvcNAQELBQAwSDELMAkG
+A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv
+b3QgQ0EgMyBHMzAeFw0xMjAxMTIyMDI2MzJaFw00MjAxMTIyMDI2MzJaMEgxCzAJBgNVBAYTAkJN
+MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDMg
+RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCzyw4QZ47qFJenMioKVjZ/aEzHs286
+IxSR/xl/pcqs7rN2nXrpixurazHb+gtTTK/FpRp5PIpM/6zfJd5O2YIyC0TeytuMrKNuFoM7pmRL
+Mon7FhY4futD4tN0SsJiCnMK3UmzV9KwCoWdcTzeo8vAMvMBOSBDGzXRU7Ox7sWTaYI+FrUoRqHe
+6okJ7UO4BUaKhvVZR74bbwEhELn9qdIoyhA5CcoTNs+cra1AdHkrAj80//ogaX3T7mH1urPnMNA3
+I4ZyYUUpSFlob3emLoG+B01vr87ERRORFHAGjx+f+IdpsQ7vw4kZ6+ocYfx6bIrc1gMLnia6Et3U
+VDmrJqMz6nWB2i3ND0/kA9HvFZcba5DFApCTZgIhsUfei5pKgLlVj7WiL8DWM2fafsSntARE60f7
+5li59wzweyuxwHApw0BiLTtIadwjPEjrewl5qW3aqDCYz4ByA4imW0aucnl8CAMhZa634RylsSqi
+Md5mBPfAdOhx3v89WcyWJhKLhZVXGqtrdQtEPREoPHtht+KPZ0/l7DxMYIBpVzgeAVuNVejH38DM
+dyM0SXV89pgR6y3e7UEuFAUCf+D+IOs15xGsIs5XPd7JMG0QA4XN8f+MFrXBsj6IbGB/kE+V9/Yt
+rQE5BwT6dYB9v0lQ7e/JxHwc64B+27bQ3RP+ydOc17KXqQIDAQABo0IwQDAPBgNVHRMBAf8EBTAD
+AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUxhfQvKjqAkPyGwaZXSuQILnXnOQwDQYJKoZI
+hvcNAQELBQADggIBADRh2Va1EodVTd2jNTFGu6QHcrxfYWLopfsLN7E8trP6KZ1/AvWkyaiTt3px
+KGmPc+FSkNrVvjrlt3ZqVoAh313m6Tqe5T72omnHKgqwGEfcIHB9UqM+WXzBusnIFUBhynLWcKzS
+t/Ac5IYp8M7vaGPQtSCKFWGafoaYtMnCdvvMujAWzKNhxnQT5WvvoxXqA/4Ti2Tk08HS6IT7SdEQ
+TXlm66r99I0xHnAUrdzeZxNMgRVhvLfZkXdxGYFgu/BYpbWcC/ePIlUnwEsBbTuZDdQdm2NnL9Du
+DcpmvJRPpq3t/O5jrFc/ZSXPsoaP0Aj/uHYUbt7lJ+yreLVTubY/6CD50qi+YUbKh4yE8/nxoGib
+Ih6BJpsQBJFxwAYf3KDTuVan45gtf4Od34wrnDKOMpTwATwiKp9Dwi7DmDkHOHv8XgBCH/MyJnmD
+hPbl8MFREsALHgQjDFSlTC9JxUrRtm5gDWv8a4uFJGS3iQ6rJUdbPM9+Sb3H6QrG2vd+DhcI00iX
+0HGS8A85PjRqHH3Y8iKuu2n0M7SmSFXRDw4m6Oy2Cy2nhTXN/VnIn9HNPlopNLk9hM6xZdRZkZFW
+dSHBd575euFgndOtBBj0fOtek49TSiIp+EgrPk2GrFt/ywaZWWDYWGWVjUTR939+J399roD1B0y2
+PpxxVJkES/1Y+Zj0
+-----END CERTIFICATE-----
+
+DigiCert Assured ID Root G2
+===========================
+-----BEGIN CERTIFICATE-----
+MIIDljCCAn6gAwIBAgIQC5McOtY5Z+pnI7/Dr5r0SzANBgkqhkiG9w0BAQsFADBlMQswCQYDVQQG
+EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw
+IgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIwHhcNMTMwODAxMTIwMDAwWhcNMzgw
+MTE1MTIwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL
+ExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIw
+ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDZ5ygvUj82ckmIkzTz+GoeMVSAn61UQbVH
+35ao1K+ALbkKz3X9iaV9JPrjIgwrvJUXCzO/GU1BBpAAvQxNEP4HteccbiJVMWWXvdMX0h5i89vq
+bFCMP4QMls+3ywPgym2hFEwbid3tALBSfK+RbLE4E9HpEgjAALAcKxHad3A2m67OeYfcgnDmCXRw
+VWmvo2ifv922ebPynXApVfSr/5Vh88lAbx3RvpO704gqu52/clpWcTs/1PPRCv4o76Pu2ZmvA9OP
+YLfykqGxvYmJHzDNw6YuYjOuFgJ3RFrngQo8p0Quebg/BLxcoIfhG69Rjs3sLPr4/m3wOnyqi+Rn
+lTGNAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTO
+w0q5mVXyuNtgv6l+vVa1lzan1jANBgkqhkiG9w0BAQsFAAOCAQEAyqVVjOPIQW5pJ6d1Ee88hjZv
+0p3GeDgdaZaikmkuOGybfQTUiaWxMTeKySHMq2zNixya1r9I0jJmwYrA8y8678Dj1JGG0VDjA9tz
+d29KOVPt3ibHtX2vK0LRdWLjSisCx1BL4GnilmwORGYQRI+tBev4eaymG+g3NJ1TyWGqolKvSnAW
+hsI6yLETcDbYz+70CjTVW0z9B5yiutkBclzzTcHdDrEcDcRjvq30FPuJ7KJBDkzMyFdA0G4Dqs0M
+jomZmWzwPDCvON9vvKO+KSAnq3T/EyJ43pdSVR6DtVQgA+6uwE9W3jfMw3+qBCe703e4YtsXfJwo
+IhNzbM8m9Yop5w==
+-----END CERTIFICATE-----
+
+DigiCert Assured ID Root G3
+===========================
+-----BEGIN CERTIFICATE-----
+MIICRjCCAc2gAwIBAgIQC6Fa+h3foLVJRK/NJKBs7DAKBggqhkjOPQQDAzBlMQswCQYDVQQGEwJV
+UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQwIgYD
+VQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1
+MTIwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
+d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwdjAQ
+BgcqhkjOPQIBBgUrgQQAIgNiAAQZ57ysRGXtzbg/WPuNsVepRC0FFfLvC/8QdJ+1YlJfZn4f5dwb
+RXkLzMZTCp2NXQLZqVneAlr2lSoOjThKiknGvMYDOAdfVdp+CW7if17QRSAPWXYQ1qAk8C3eNvJs
+KTmjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTL0L2p4ZgF
+UaFNN6KDec6NHSrkhDAKBggqhkjOPQQDAwNnADBkAjAlpIFFAmsSS3V0T8gj43DydXLefInwz5Fy
+YZ5eEJJZVrmDxxDnOOlYJjZ91eQ0hjkCMHw2U/Aw5WJjOpnitqM7mzT6HtoQknFekROn3aRukswy
+1vUhZscv6pZjamVFkpUBtA==
+-----END CERTIFICATE-----
+
+DigiCert Global Root G2
+=======================
+-----BEGIN CERTIFICATE-----
+MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG
+EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw
+HgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUx
+MjAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3
+dy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkq
+hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI2/Ou8jqJ
+kTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx1x7e/dfgy5SDN67sH0NO
+3Xss0r0upS/kqbitOtSZpLYl6ZtrAGCSYP9PIUkY92eQq2EGnI/yuum06ZIya7XzV+hdG82MHauV
+BJVJ8zUtluNJbd134/tJS7SsVQepj5WztCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS0xZKBgyM
+UNGPHgm+F6HmIcr9g+UQvIOlCsRnKPZzFBQ9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQAB
+o0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV5uNu
+5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY1Yl9PMWLSn/pvtsr
+F9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4NeF22d+mQrvHRAiGfzZ0JFrabA0U
+WTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NGFdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBH
+QRFXGU7Aj64GxJUTFy8bJZ918rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/
+iyK5S9kJRaTepLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl
+MrY=
+-----END CERTIFICATE-----
+
+DigiCert Global Root G3
+=======================
+-----BEGIN CERTIFICATE-----
+MIICPzCCAcWgAwIBAgIQBVVWvPJepDU1w6QP1atFcjAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV
+UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD
+VQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAw
+MDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5k
+aWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEczMHYwEAYHKoZIzj0C
+AQYFK4EEACIDYgAE3afZu4q4C/sLfyHS8L6+c/MzXRq8NOrexpu80JX28MzQC7phW1FGfp4tn+6O
+YwwX7Adw9c+ELkCDnOg/QW07rdOkFFk2eJ0DQ+4QE2xy3q6Ip6FrtUPOZ9wj/wMco+I+o0IwQDAP
+BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUs9tIpPmhxdiuNkHMEWNp
+Yim8S8YwCgYIKoZIzj0EAwMDaAAwZQIxAK288mw/EkrRLTnDCgmXc/SINoyIJ7vmiI1Qhadj+Z4y
+3maTD/HMsQmP3Wyr+mt/oAIwOWZbwmSNuJ5Q3KjVSaLtx9zRSX8XAbjIho9OjIgrqJqpisXRAL34
+VOKa5Vt8sycX
+-----END CERTIFICATE-----
+
+DigiCert Trusted Root G4
+========================
+-----BEGIN CERTIFICATE-----
+MIIFkDCCA3igAwIBAgIQBZsbV56OITLiOQe9p3d1XDANBgkqhkiG9w0BAQwFADBiMQswCQYDVQQG
+EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEw
+HwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1
+MTIwMDAwWjBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
+d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwggIiMA0G
+CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC/5pBzaN675F1KPDAiMGkz7MKnJS7JIT3yithZwuEp
+pz1Yq3aaza57G4QNxDAf8xukOBbrVsaXbR2rsnnyyhHS5F/WBTxSD1Ifxp4VpX6+n6lXFllVcq9o
+k3DCsrp1mWpzMpTREEQQLt+C8weE5nQ7bXHiLQwb7iDVySAdYyktzuxeTsiT+CFhmzTrBcZe7Fsa
+vOvJz82sNEBfsXpm7nfISKhmV1efVFiODCu3T6cw2Vbuyntd463JT17lNecxy9qTXtyOj4DatpGY
+QJB5w3jHtrHEtWoYOAMQjdjUN6QuBX2I9YI+EJFwq1WCQTLX2wRzKm6RAXwhTNS8rhsDdV14Ztk6
+MUSaM0C/CNdaSaTC5qmgZ92kJ7yhTzm1EVgX9yRcRo9k98FpiHaYdj1ZXUJ2h4mXaXpI8OCiEhtm
+mnTK3kse5w5jrubU75KSOp493ADkRSWJtppEGSt+wJS00mFt6zPZxd9LBADMfRyVw4/3IbKyEbe7
+f/LVjHAsQWCqsWMYRJUadmJ+9oCw++hkpjPRiQfhvbfmQ6QYuKZ3AeEPlAwhHbJUKSWJbOUOUlFH
+dL4mrLZBdd56rF+NP8m800ERElvlEFDrMcXKchYiCd98THU/Y+whX8QgUWtvsauGi0/C1kVfnSD8
+oR7FwI+isX4KJpn15GkvmB0t9dmpsh3lGwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1Ud
+DwEB/wQEAwIBhjAdBgNVHQ4EFgQU7NfjgtJxXWRM3y5nP+e6mK4cD08wDQYJKoZIhvcNAQEMBQAD
+ggIBALth2X2pbL4XxJEbw6GiAI3jZGgPVs93rnD5/ZpKmbnJeFwMDF/k5hQpVgs2SV1EY+CtnJYY
+ZhsjDT156W1r1lT40jzBQ0CuHVD1UvyQO7uYmWlrx8GnqGikJ9yd+SeuMIW59mdNOj6PWTkiU0Tr
+yF0Dyu1Qen1iIQqAyHNm0aAFYF/opbSnr6j3bTWcfFqK1qI4mfN4i/RN0iAL3gTujJtHgXINwBQy
+7zBZLq7gcfJW5GqXb5JQbZaNaHqasjYUegbyJLkJEVDXCLG4iXqEI2FCKeWjzaIgQdfRnGTZ6iah
+ixTXTBmyUEFxPT9NcCOGDErcgdLMMpSEDQgJlxxPwO5rIHQw0uA5NBCFIRUBCOhVMt5xSdkoF1BN
+5r5N0XWs0Mr7QbhDparTwwVETyw2m+L64kW4I1NsBm9nVX9GtUw/bihaeSbSpKhil9Ie4u1Ki7wb
+/UdKDd9nZn6yW0HQO+T0O/QEY+nvwlQAUaCKKsnOeMzV6ocEGLPOr0mIr/OSmbaz5mEP0oUA51Aa
+5BuVnRmhuZyxm7EAHu/QD09CbMkKvO5D+jpxpchNJqU1/YldvIViHTLSoCtU7ZpXwdv6EM8Zt4tK
+G48BtieVU+i2iW1bvGjUI+iLUaJW+fCmgKDWHrO8Dw9TdSmq6hN35N6MgSGtBxBHEa2HPQfRdbzP
+82Z+
+-----END CERTIFICATE-----
+
+COMODO RSA Certification Authority
+==================================
+-----BEGIN CERTIFICATE-----
+MIIF2DCCA8CgAwIBAgIQTKr5yttjb+Af907YWwOGnTANBgkqhkiG9w0BAQwFADCBhTELMAkGA1UE
+BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG
+A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlv
+biBBdXRob3JpdHkwHhcNMTAwMTE5MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMC
+R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE
+ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBB
+dXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCR6FSS0gpWsawNJN3Fz0Rn
+dJkrN6N9I3AAcbxT38T6KhKPS38QVr2fcHK3YX/JSw8Xpz3jsARh7v8Rl8f0hj4K+j5c+ZPmNHrZ
+FGvnnLOFoIJ6dq9xkNfs/Q36nGz637CC9BR++b7Epi9Pf5l/tfxnQ3K9DADWietrLNPtj5gcFKt+
+5eNu/Nio5JIk2kNrYrhV/erBvGy2i/MOjZrkm2xpmfh4SDBF1a3hDTxFYPwyllEnvGfDyi62a+pG
+x8cgoLEfZd5ICLqkTqnyg0Y3hOvozIFIQ2dOciqbXL1MGyiKXCJ7tKuY2e7gUYPDCUZObT6Z+pUX
+2nwzV0E8jVHtC7ZcryxjGt9XyD+86V3Em69FmeKjWiS0uqlWPc9vqv9JWL7wqP/0uK3pN/u6uPQL
+OvnoQ0IeidiEyxPx2bvhiWC4jChWrBQdnArncevPDt09qZahSL0896+1DSJMwBGB7FY79tOi4lu3
+sgQiUpWAk2nojkxl8ZEDLXB0AuqLZxUpaVICu9ffUGpVRr+goyhhf3DQw6KqLCGqR84onAZFdr+C
+GCe01a60y1Dma/RMhnEw6abfFobg2P9A3fvQQoh/ozM6LlweQRGBY84YcWsr7KaKtzFcOmpH4MN5
+WdYgGq/yapiqcrxXStJLnbsQ/LBMQeXtHT1eKJ2czL+zUdqnR+WEUwIDAQABo0IwQDAdBgNVHQ4E
+FgQUu69+Aj36pvE8hI6t7jiY7NkyMtQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8w
+DQYJKoZIhvcNAQEMBQADggIBAArx1UaEt65Ru2yyTUEUAJNMnMvlwFTPoCWOAvn9sKIN9SCYPBMt
+rFaisNZ+EZLpLrqeLppysb0ZRGxhNaKatBYSaVqM4dc+pBroLwP0rmEdEBsqpIt6xf4FpuHA1sj+
+nq6PK7o9mfjYcwlYRm6mnPTXJ9OV2jeDchzTc+CiR5kDOF3VSXkAKRzH7JsgHAckaVd4sjn8OoSg
+tZx8jb8uk2IntznaFxiuvTwJaP+EmzzV1gsD41eeFPfR60/IvYcjt7ZJQ3mFXLrrkguhxuhoqEwW
+sRqZCuhTLJK7oQkYdQxlqHvLI7cawiiFwxv/0Cti76R7CZGYZ4wUAc1oBmpjIXUDgIiKboHGhfKp
+pC3n9KUkEEeDys30jXlYsQab5xoq2Z0B15R97QNKyvDb6KkBPvVWmckejkk9u+UJueBPSZI9FoJA
+zMxZxuY67RIuaTxslbH9qh17f4a+Hg4yRvv7E491f0yLS0Zj/gA0QHDBw7mh3aZw4gSzQbzpgJHq
+ZJx64SIDqZxubw5lT2yHh17zbqD5daWbQOhTsiedSrnAdyGN/4fy3ryM7xfft0kL0fJuMAsaDk52
+7RH89elWsn2/x20Kk4yl0MC2Hb46TpSi125sC8KKfPog88Tk5c0NqMuRkrF8hey1FGlmDoLnzc7I
+LaZRfyHBNVOFBkpdn627G190
+-----END CERTIFICATE-----
+
+USERTrust RSA Certification Authority
+=====================================
+-----BEGIN CERTIFICATE-----
+MIIF3jCCA8agAwIBAgIQAf1tMPyjylGoG7xkDjUDLTANBgkqhkiG9w0BAQwFADCBiDELMAkGA1UE
+BhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK
+ExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh
+dGlvbiBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UE
+BhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK
+ExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh
+dGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCAEmUXNg7D2wiz
+0KxXDXbtzSfTTK1Qg2HiqiBNCS1kCdzOiZ/MPans9s/B3PHTsdZ7NygRK0faOca8Ohm0X6a9fZ2j
+Y0K2dvKpOyuR+OJv0OwWIJAJPuLodMkYtJHUYmTbf6MG8YgYapAiPLz+E/CHFHv25B+O1ORRxhFn
+RghRy4YUVD+8M/5+bJz/Fp0YvVGONaanZshyZ9shZrHUm3gDwFA66Mzw3LyeTP6vBZY1H1dat//O
++T23LLb2VN3I5xI6Ta5MirdcmrS3ID3KfyI0rn47aGYBROcBTkZTmzNg95S+UzeQc0PzMsNT79uq
+/nROacdrjGCT3sTHDN/hMq7MkztReJVni+49Vv4M0GkPGw/zJSZrM233bkf6c0Plfg6lZrEpfDKE
+Y1WJxA3Bk1QwGROs0303p+tdOmw1XNtB1xLaqUkL39iAigmTYo61Zs8liM2EuLE/pDkP2QKe6xJM
+lXzzawWpXhaDzLhn4ugTncxbgtNMs+1b/97lc6wjOy0AvzVVdAlJ2ElYGn+SNuZRkg7zJn0cTRe8
+yexDJtC/QV9AqURE9JnnV4eeUB9XVKg+/XRjL7FQZQnmWEIuQxpMtPAlR1n6BB6T1CZGSlCBst6+
+eLf8ZxXhyVeEHg9j1uliutZfVS7qXMYoCAQlObgOK6nyTJccBz8NUvXt7y+CDwIDAQABo0IwQDAd
+BgNVHQ4EFgQUU3m/WqorSs9UgOHYm8Cd8rIDZsswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF
+MAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAFzUfA3P9wF9QZllDHPFUp/L+M+ZBn8b2kMVn54CVVeW
+FPFSPCeHlCjtHzoBN6J2/FNQwISbxmtOuowhT6KOVWKR82kV2LyI48SqC/3vqOlLVSoGIG1VeCkZ
+7l8wXEskEVX/JJpuXior7gtNn3/3ATiUFJVDBwn7YKnuHKsSjKCaXqeYalltiz8I+8jRRa8YFWSQ
+Eg9zKC7F4iRO/Fjs8PRF/iKz6y+O0tlFYQXBl2+odnKPi4w2r78NBc5xjeambx9spnFixdjQg3IM
+8WcRiQycE0xyNN+81XHfqnHd4blsjDwSXWXavVcStkNr/+XeTWYRUc+ZruwXtuhxkYzeSf7dNXGi
+FSeUHM9h4ya7b6NnJSFd5t0dCy5oGzuCr+yDZ4XUmFF0sbmZgIn/f3gZXHlKYC6SQK5MNyosycdi
+yA5d9zZbyuAlJQG03RoHnHcAP9Dc1ew91Pq7P8yF1m9/qS3fuQL39ZeatTXaw2ewh0qpKJ4jjv9c
+J2vhsE/zB+4ALtRZh8tSQZXq9EfX7mRBVXyNWQKV3WKdwrnuWih0hKWbt5DHDAff9Yk2dDLWKMGw
+sAvgnEzDHNb842m1R0aBL6KCq9NjRHDEjf8tM7qtj3u1cIiuPhnPQCjY/MiQu12ZIvVS5ljFH4gx
+Q+6IHdfGjjxDah2nGN59PRbxYvnKkKj9
+-----END CERTIFICATE-----
+
+USERTrust ECC Certification Authority
+=====================================
+-----BEGIN CERTIFICATE-----
+MIICjzCCAhWgAwIBAgIQXIuZxVqUxdJxVt7NiYDMJjAKBggqhkjOPQQDAzCBiDELMAkGA1UEBhMC
+VVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU
+aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv
+biBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UEBhMC
+VVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU
+aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv
+biBBdXRob3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQarFRaqfloI+d61SRvU8Za2EurxtW2
+0eZzca7dnNYMYf3boIkDuAUU7FfO7l0/4iGzzvfUinngo4N+LZfQYcTxmdwlkWOrfzCjtHDix6Ez
+nPO/LlxTsV+zfTJ/ijTjeXmjQjBAMB0GA1UdDgQWBBQ64QmG1M8ZwpZ2dEl23OA1xmNjmjAOBgNV
+HQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjA2Z6EWCNzklwBB
+HU6+4WMBzzuqQhFkoJ2UOQIReVx7Hfpkue4WQrO/isIJxOzksU0CMQDpKmFHjFJKS04YcPbWRNZu
+9YO6bVi9JNlWSOrvxKJGgYhqOkbRqZtNyWHa0V1Xahg=
+-----END CERTIFICATE-----
+
+GlobalSign ECC Root CA - R4
+===========================
+-----BEGIN CERTIFICATE-----
+MIIB4TCCAYegAwIBAgIRKjikHJYKBN5CsiilC+g0mAIwCgYIKoZIzj0EAwIwUDEkMCIGA1UECxMb
+R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI0MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD
+EwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoXDTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMb
+R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI0MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD
+EwpHbG9iYWxTaWduMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEuMZ5049sJQ6fLjkZHAOkrprl
+OQcJFspjsbmG+IpXwVfOQvpzofdlQv8ewQCybnMO/8ch5RikqtlxP6jUuc6MHaNCMEAwDgYDVR0P
+AQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFFSwe61FuOJAf/sKbvu+M8k8o4TV
+MAoGCCqGSM49BAMCA0gAMEUCIQDckqGgE6bPA7DmxCGXkPoUVy0D7O48027KqGx2vKLeuwIgJ6iF
+JzWbVsaj8kfSt24bAgAXqmemFZHe+pTsewv4n4Q=
+-----END CERTIFICATE-----
+
+GlobalSign ECC Root CA - R5
+===========================
+-----BEGIN CERTIFICATE-----
+MIICHjCCAaSgAwIBAgIRYFlJ4CYuu1X5CneKcflK2GwwCgYIKoZIzj0EAwMwUDEkMCIGA1UECxMb
+R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD
+EwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoXDTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMb
+R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD
+EwpHbG9iYWxTaWduMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAER0UOlvt9Xb/pOdEh+J8LttV7HpI6
+SFkc8GIxLcB6KP4ap1yztsyX50XUWPrRd21DosCHZTQKH3rd6zwzocWdTaRvQZU4f8kehOvRnkmS
+h5SHDDqFSmafnVmTTZdhBoZKo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAd
+BgNVHQ4EFgQUPeYpSJvqB8ohREom3m7e0oPQn1kwCgYIKoZIzj0EAwMDaAAwZQIxAOVpEslu28Yx
+uglB4Zf4+/2a4n0Sye18ZNPLBSWLVtmg515dTguDnFt2KaAJJiFqYgIwcdK1j1zqO+F4CYWodZI7
+yFz9SO8NdCKoCOJuxUnOxwy8p2Fp8fc74SrL+SvzZpA3
+-----END CERTIFICATE-----
+
+Staat der Nederlanden Root CA - G3
+==================================
+-----BEGIN CERTIFICATE-----
+MIIFdDCCA1ygAwIBAgIEAJiiOTANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJOTDEeMBwGA1UE
+CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFhdCBkZXIgTmVkZXJsYW5kZW4g
+Um9vdCBDQSAtIEczMB4XDTEzMTExNDExMjg0MloXDTI4MTExMzIzMDAwMFowWjELMAkGA1UEBhMC
+TkwxHjAcBgNVBAoMFVN0YWF0IGRlciBOZWRlcmxhbmRlbjErMCkGA1UEAwwiU3RhYXQgZGVyIE5l
+ZGVybGFuZGVuIFJvb3QgQ0EgLSBHMzCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAL4y
+olQPcPssXFnrbMSkUeiFKrPMSjTysF/zDsccPVMeiAho2G89rcKezIJnByeHaHE6n3WWIkYFsO2t
+x1ueKt6c/DrGlaf1F2cY5y9JCAxcz+bMNO14+1Cx3Gsy8KL+tjzk7FqXxz8ecAgwoNzFs21v0IJy
+EavSgWhZghe3eJJg+szeP4TrjTgzkApyI/o1zCZxMdFyKJLZWyNtZrVtB0LrpjPOktvA9mxjeM3K
+Tj215VKb8b475lRgsGYeCasH/lSJEULR9yS6YHgamPfJEf0WwTUaVHXvQ9Plrk7O53vDxk5hUUur
+mkVLoR9BvUhTFXFkC4az5S6+zqQbwSmEorXLCCN2QyIkHxcE1G6cxvx/K2Ya7Irl1s9N9WMJtxU5
+1nus6+N86U78dULI7ViVDAZCopz35HCz33JvWjdAidiFpNfxC95DGdRKWCyMijmev4SH8RY7Ngzp
+07TKbBlBUgmhHbBqv4LvcFEhMtwFdozL92TkA1CvjJFnq8Xy7ljY3r735zHPbMk7ccHViLVlvMDo
+FxcHErVc0qsgk7TmgoNwNsXNo42ti+yjwUOH5kPiNL6VizXtBznaqB16nzaeErAMZRKQFWDZJkBE
+41ZgpRDUajz9QdwOWke275dhdU/Z/seyHdTtXUmzqWrLZoQT1Vyg3N9udwbRcXXIV2+vD3dbAgMB
+AAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRUrfrHkleu
+yjWcLhL75LpdINyUVzANBgkqhkiG9w0BAQsFAAOCAgEAMJmdBTLIXg47mAE6iqTnB/d6+Oea31BD
+U5cqPco8R5gu4RV78ZLzYdqQJRZlwJ9UXQ4DO1t3ApyEtg2YXzTdO2PCwyiBwpwpLiniyMMB8jPq
+KqrMCQj3ZWfGzd/TtiunvczRDnBfuCPRy5FOCvTIeuXZYzbB1N/8Ipf3YF3qKS9Ysr1YvY2WTxB1
+v0h7PVGHoTx0IsL8B3+A3MSs/mrBcDCw6Y5p4ixpgZQJut3+TcCDjJRYwEYgr5wfAvg1VUkvRtTA
+8KCWAg8zxXHzniN9lLf9OtMJgwYh/WA9rjLA0u6NpvDntIJ8CsxwyXmA+P5M9zWEGYox+wrZ13+b
+8KKaa8MFSu1BYBQw0aoRQm7TIwIEC8Zl3d1Sd9qBa7Ko+gE4uZbqKmxnl4mUnrzhVNXkanjvSr0r
+mj1AfsbAddJu+2gw7OyLnflJNZoaLNmzlTnVHpL3prllL+U9bTpITAjc5CgSKL59NVzq4BZ+Extq
+1z7XnvwtdbLBFNUjA9tbbws+eC8N3jONFrdI54OagQ97wUNNVQQXOEpR1VmiiXTTn74eS9fGbbeI
+JG9gkaSChVtWQbzQRKtqE77RLFi3EjNYsjdj3BP1lB0/QFH1T/U67cjF68IeHRaVesd+QnGTbksV
+tzDfqu1XhUisHWrdOWnk4Xl4vs4Fv6EM94B7IWcnMFk=
+-----END CERTIFICATE-----
+
+Staat der Nederlanden EV Root CA
+================================
+-----BEGIN CERTIFICATE-----
+MIIFcDCCA1igAwIBAgIEAJiWjTANBgkqhkiG9w0BAQsFADBYMQswCQYDVQQGEwJOTDEeMBwGA1UE
+CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSkwJwYDVQQDDCBTdGFhdCBkZXIgTmVkZXJsYW5kZW4g
+RVYgUm9vdCBDQTAeFw0xMDEyMDgxMTE5MjlaFw0yMjEyMDgxMTEwMjhaMFgxCzAJBgNVBAYTAk5M
+MR4wHAYDVQQKDBVTdGFhdCBkZXIgTmVkZXJsYW5kZW4xKTAnBgNVBAMMIFN0YWF0IGRlciBOZWRl
+cmxhbmRlbiBFViBSb290IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA48d+ifkk
+SzrSM4M1LGns3Amk41GoJSt5uAg94JG6hIXGhaTK5skuU6TJJB79VWZxXSzFYGgEt9nCUiY4iKTW
+O0Cmws0/zZiTs1QUWJZV1VD+hq2kY39ch/aO5ieSZxeSAgMs3NZmdO3dZ//BYY1jTw+bbRcwJu+r
+0h8QoPnFfxZpgQNH7R5ojXKhTbImxrpsX23Wr9GxE46prfNeaXUmGD5BKyF/7otdBwadQ8QpCiv8
+Kj6GyzyDOvnJDdrFmeK8eEEzduG/L13lpJhQDBXd4Pqcfzho0LKmeqfRMb1+ilgnQ7O6M5HTp5gV
+XJrm0w912fxBmJc+qiXbj5IusHsMX/FjqTf5m3VpTCgmJdrV8hJwRVXj33NeN/UhbJCONVrJ0yPr
+08C+eKxCKFhmpUZtcALXEPlLVPxdhkqHz3/KRawRWrUgUY0viEeXOcDPusBCAUCZSCELa6fS/ZbV
+0b5GnUngC6agIk440ME8MLxwjyx1zNDFjFE7PZQIZCZhfbnDZY8UnCHQqv0XcgOPvZuM5l5Tnrmd
+74K74bzickFbIZTTRTeU0d8JOV3nI6qaHcptqAqGhYqCvkIH1vI4gnPah1vlPNOePqc7nvQDs/nx
+fRN0Av+7oeX6AHkcpmZBiFxgV6YuCcS6/ZrPpx9Aw7vMWgpVSzs4dlG4Y4uElBbmVvMCAwEAAaNC
+MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFP6rAJCYniT8qcwa
+ivsnuL8wbqg7MA0GCSqGSIb3DQEBCwUAA4ICAQDPdyxuVr5Os7aEAJSrR8kN0nbHhp8dB9O2tLsI
+eK9p0gtJ3jPFrK3CiAJ9Brc1AsFgyb/E6JTe1NOpEyVa/m6irn0F3H3zbPB+po3u2dfOWBfoqSmu
+c0iH55vKbimhZF8ZE/euBhD/UcabTVUlT5OZEAFTdfETzsemQUHSv4ilf0X8rLiltTMMgsT7B/Zq
+5SWEXwbKwYY5EdtYzXc7LMJMD16a4/CrPmEbUCTCwPTxGfARKbalGAKb12NMcIxHowNDXLldRqAN
+b/9Zjr7dn3LDWyvfjFvO5QxGbJKyCqNMVEIYFRIYvdr8unRu/8G2oGTYqV9Vrp9canaW2HNnh/tN
+f1zuacpzEPuKqf2evTY4SUmH9A4U8OmHuD+nT3pajnnUk+S7aFKErGzp85hwVXIy+TSrK0m1zSBi
+5Dp6Z2Orltxtrpfs/J92VoguZs9btsmksNcFuuEnL5O7Jiqik7Ab846+HUCjuTaPPoIaGl6I6lD4
+WeKDRikL40Rc4ZW2aZCaFG+XroHPaO+Zmr615+F/+PoTRxZMzG0IQOeLeG9QgkRQP2YGiqtDhFZK
+DyAthg710tvSeopLzaXoTvFeJiUBWSOgftL2fiFX1ye8FVdMpEbB4IMeDExNH08GGeL5qPQ6gqGy
+eUN51q1veieQA6TqJIc/2b3Z6fJfUEkc7uzXLg==
+-----END CERTIFICATE-----
+
+IdenTrust Commercial Root CA 1
+==============================
+-----BEGIN CERTIFICATE-----
+MIIFYDCCA0igAwIBAgIQCgFCgAAAAUUjyES1AAAAAjANBgkqhkiG9w0BAQsFADBKMQswCQYDVQQG
+EwJVUzESMBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBS
+b290IENBIDEwHhcNMTQwMTE2MTgxMjIzWhcNMzQwMTE2MTgxMjIzWjBKMQswCQYDVQQGEwJVUzES
+MBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBSb290IENB
+IDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCnUBneP5k91DNG8W9RYYKyqU+PZ4ld
+hNlT3Qwo2dfw/66VQ3KZ+bVdfIrBQuExUHTRgQ18zZshq0PirK1ehm7zCYofWjK9ouuU+ehcCuz/
+mNKvcbO0U59Oh++SvL3sTzIwiEsXXlfEU8L2ApeN2WIrvyQfYo3fw7gpS0l4PJNgiCL8mdo2yMKi
+1CxUAGc1bnO/AljwpN3lsKImesrgNqUZFvX9t++uP0D1bVoE/c40yiTcdCMbXTMTEl3EASX2MN0C
+XZ/g1Ue9tOsbobtJSdifWwLziuQkkORiT0/Br4sOdBeo0XKIanoBScy0RnnGF7HamB4HWfp1IYVl
+3ZBWzvurpWCdxJ35UrCLvYf5jysjCiN2O/cz4ckA82n5S6LgTrx+kzmEB/dEcH7+B1rlsazRGMzy
+NeVJSQjKVsk9+w8YfYs7wRPCTY/JTw436R+hDmrfYi7LNQZReSzIJTj0+kuniVyc0uMNOYZKdHzV
+WYfCP04MXFL0PfdSgvHqo6z9STQaKPNBiDoT7uje/5kdX7rL6B7yuVBgwDHTc+XvvqDtMwt0viAg
+xGds8AgDelWAf0ZOlqf0Hj7h9tgJ4TNkK2PXMl6f+cB7D3hvl7yTmvmcEpB4eoCHFddydJxVdHix
+uuFucAS6T6C6aMN7/zHwcz09lCqxC0EOoP5NiGVreTO01wIDAQABo0IwQDAOBgNVHQ8BAf8EBAMC
+AQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU7UQZwNPwBovupHu+QucmVMiONnYwDQYJKoZI
+hvcNAQELBQADggIBAA2ukDL2pkt8RHYZYR4nKM1eVO8lvOMIkPkp165oCOGUAFjvLi5+U1KMtlwH
+6oi6mYtQlNeCgN9hCQCTrQ0U5s7B8jeUeLBfnLOic7iPBZM4zY0+sLj7wM+x8uwtLRvM7Kqas6pg
+ghstO8OEPVeKlh6cdbjTMM1gCIOQ045U8U1mwF10A0Cj7oV+wh93nAbowacYXVKV7cndJZ5t+qnt
+ozo00Fl72u1Q8zW/7esUTTHHYPTa8Yec4kjixsU3+wYQ+nVZZjFHKdp2mhzpgq7vmrlR94gjmmmV
+YjzlVYA211QC//G5Xc7UI2/YRYRKW2XviQzdFKcgyxilJbQN+QHwotL0AMh0jqEqSI5l2xPE4iUX
+feu+h1sXIFRRk0pTAwvsXcoz7WL9RccvW9xYoIA55vrX/hMUpu09lEpCdNTDd1lzzY9GvlU47/ro
+kTLql1gEIt44w8y8bckzOmoKaT+gyOpyj4xjhiO9bTyWnpXgSUyqorkqG5w2gXjtw+hG4iZZRHUe
+2XWJUc0QhJ1hYMtd+ZciTY6Y5uN/9lu7rs3KSoFrXgvzUeF0K+l+J6fZmUlO+KWA2yUPHGNiiskz
+Z2s8EIPGrd6ozRaOjfAHN3Gf8qv8QfXBi+wAN10J5U6A7/qxXDgGpRtK4dw4LTzcqx+QGtVKnO7R
+cGzM7vRX+Bi6hG6H
+-----END CERTIFICATE-----
+
+IdenTrust Public Sector Root CA 1
+=================================
+-----BEGIN CERTIFICATE-----
+MIIFZjCCA06gAwIBAgIQCgFCgAAAAUUjz0Z8AAAAAjANBgkqhkiG9w0BAQsFADBNMQswCQYDVQQG
+EwJVUzESMBAGA1UEChMJSWRlblRydXN0MSowKAYDVQQDEyFJZGVuVHJ1c3QgUHVibGljIFNlY3Rv
+ciBSb290IENBIDEwHhcNMTQwMTE2MTc1MzMyWhcNMzQwMTE2MTc1MzMyWjBNMQswCQYDVQQGEwJV
+UzESMBAGA1UEChMJSWRlblRydXN0MSowKAYDVQQDEyFJZGVuVHJ1c3QgUHVibGljIFNlY3RvciBS
+b290IENBIDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2IpT8pEiv6EdrCvsnduTy
+P4o7ekosMSqMjbCpwzFrqHd2hCa2rIFCDQjrVVi7evi8ZX3yoG2LqEfpYnYeEe4IFNGyRBb06tD6
+Hi9e28tzQa68ALBKK0CyrOE7S8ItneShm+waOh7wCLPQ5CQ1B5+ctMlSbdsHyo+1W/CD80/HLaXI
+rcuVIKQxKFdYWuSNG5qrng0M8gozOSI5Cpcu81N3uURF/YTLNiCBWS2ab21ISGHKTN9T0a9SvESf
+qy9rg3LvdYDaBjMbXcjaY8ZNzaxmMc3R3j6HEDbhuaR672BQssvKplbgN6+rNBM5Jeg5ZuSYeqoS
+mJxZZoY+rfGwyj4GD3vwEUs3oERte8uojHH01bWRNszwFcYr3lEXsZdMUD2xlVl8BX0tIdUAvwFn
+ol57plzy9yLxkA2T26pEUWbMfXYD62qoKjgZl3YNa4ph+bz27nb9cCvdKTz4Ch5bQhyLVi9VGxyh
+LrXHFub4qjySjmm2AcG1hp2JDws4lFTo6tyePSW8Uybt1as5qsVATFSrsrTZ2fjXctscvG29ZV/v
+iDUqZi/u9rNl8DONfJhBaUYPQxxp+pu10GFqzcpL2UyQRqsVWaFHVCkugyhfHMKiq3IXAAaOReyL
+4jM9f9oZRORicsPfIsbyVtTdX5Vy7W1f90gDW/3FKqD2cyOEEBsB5wIDAQABo0IwQDAOBgNVHQ8B
+Af8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU43HgntinQtnbcZFrlJPrw6PRFKMw
+DQYJKoZIhvcNAQELBQADggIBAEf63QqwEZE4rU1d9+UOl1QZgkiHVIyqZJnYWv6IAcVYpZmxI1Qj
+t2odIFflAWJBF9MJ23XLblSQdf4an4EKwt3X9wnQW3IV5B4Jaj0z8yGa5hV+rVHVDRDtfULAj+7A
+mgjVQdZcDiFpboBhDhXAuM/FSRJSzL46zNQuOAXeNf0fb7iAaJg9TaDKQGXSc3z1i9kKlT/YPyNt
+GtEqJBnZhbMX73huqVjRI9PHE+1yJX9dsXNw0H8GlwmEKYBhHfpe/3OsoOOJuBxxFcbeMX8S3OFt
+m6/n6J91eEyrRjuazr8FGF1NFTwWmhlQBJqymm9li1JfPFgEKCXAZmExfrngdbkaqIHWchezxQMx
+NRF4eKLg6TCMf4DfWN88uieW4oA0beOY02QnrEh+KHdcxiVhJfiFDGX6xDIvpZgF5PgLZxYWxoK4
+Mhn5+bl53B/N66+rDt0b20XkeucC4pVd/GnwU2lhlXV5C15V5jgclKlZM57IcXR5f1GJtshquDDI
+ajjDbp7hNxbqBWJMWxJH7ae0s1hWx0nzfxJoCTFx8G34Tkf71oXuxVhAGaQdp/lLQzfcaFpPz+vC
+ZHTetBXZ9FRUGi8c15dxVJCO2SCdUyt/q4/i6jC8UDfv8Ue1fXwsBOxonbRJRBD0ckscZOf85muQ
+3Wl9af0AVqW3rLatt8o+Ae+c
+-----END CERTIFICATE-----
+
+Entrust Root Certification Authority - G2
+=========================================
+-----BEGIN CERTIFICATE-----
+MIIEPjCCAyagAwIBAgIESlOMKDANBgkqhkiG9w0BAQsFADCBvjELMAkGA1UEBhMCVVMxFjAUBgNV
+BAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVy
+bXMxOTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ug
+b25seTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIw
+HhcNMDkwNzA3MTcyNTU0WhcNMzAxMjA3MTc1NTU0WjCBvjELMAkGA1UEBhMCVVMxFjAUBgNVBAoT
+DUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVybXMx
+OTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ugb25s
+eTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIwggEi
+MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6hLZy254Ma+KZ6TABp3bqMriVQRrJ2mFOWHLP
+/vaCeb9zYQYKpSfYs1/TRU4cctZOMvJyig/3gxnQaoCAAEUesMfnmr8SVycco2gvCoe9amsOXmXz
+HHfV1IWNcCG0szLni6LVhjkCsbjSR87kyUnEO6fe+1R9V77w6G7CebI6C1XiUJgWMhNcL3hWwcKU
+s/Ja5CeanyTXxuzQmyWC48zCxEXFjJd6BmsqEZ+pCm5IO2/b1BEZQvePB7/1U1+cPvQXLOZprE4y
+TGJ36rfo5bs0vBmLrpxR57d+tVOxMyLlbc9wPBr64ptntoP0jaWvYkxN4FisZDQSA/i2jZRjJKRx
+AgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqciZ6
+0B7vfec7aVHUbI2fkBJmqzANBgkqhkiG9w0BAQsFAAOCAQEAeZ8dlsa2eT8ijYfThwMEYGprmi5Z
+iXMRrEPR9RP/jTkrwPK9T3CMqS/qF8QLVJ7UG5aYMzyorWKiAHarWWluBh1+xLlEjZivEtRh2woZ
+Rkfz6/djwUAFQKXSt/S1mja/qYh2iARVBCuch38aNzx+LaUa2NSJXsq9rD1s2G2v1fN2D807iDgi
+nWyTmsQ9v4IbZT+mD12q/OWyFcq1rca8PdCE6OoGcrBNOTJ4vz4RnAuknZoh8/CbCzB428Hch0P+
+vGOaysXCHMnHjf87ElgI5rY97HosTvuDls4MPGmHVHOkc8KT/1EQrBVUAdj8BbGJoX90g5pJ19xO
+e4pIb4tF9g==
+-----END CERTIFICATE-----
+
+Entrust Root Certification Authority - EC1
+==========================================
+-----BEGIN CERTIFICATE-----
+MIIC+TCCAoCgAwIBAgINAKaLeSkAAAAAUNCR+TAKBggqhkjOPQQDAzCBvzELMAkGA1UEBhMCVVMx
+FjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVn
+YWwtdGVybXMxOTA3BgNVBAsTMChjKSAyMDEyIEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXpl
+ZCB1c2Ugb25seTEzMDEGA1UEAxMqRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5
+IC0gRUMxMB4XDTEyMTIxODE1MjUzNloXDTM3MTIxODE1NTUzNlowgb8xCzAJBgNVBAYTAlVTMRYw
+FAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3QubmV0L2xlZ2Fs
+LXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxMiBFbnRydXN0LCBJbmMuIC0gZm9yIGF1dGhvcml6ZWQg
+dXNlIG9ubHkxMzAxBgNVBAMTKkVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAt
+IEVDMTB2MBAGByqGSM49AgEGBSuBBAAiA2IABIQTydC6bUF74mzQ61VfZgIaJPRbiWlH47jCffHy
+AsWfoPZb1YsGGYZPUxBtByQnoaD41UcZYUx9ypMn6nQM72+WCf5j7HBdNq1nd67JnXxVRDqiY1Ef
+9eNi1KlHBz7MIKNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE
+FLdj5xrdjekIplWDpOBqUEFlEUJJMAoGCCqGSM49BAMDA2cAMGQCMGF52OVCR98crlOZF7ZvHH3h
+vxGU0QOIdeSNiaSKd0bebWHvAvX7td/M/k7//qnmpwIwW5nXhTcGtXsI/esni0qU+eH6p44mCOh8
+kmhtc9hvJqwhAriZtyZBWyVgrtBIGu4G
+-----END CERTIFICATE-----
+
+CFCA EV ROOT
+============
+-----BEGIN CERTIFICATE-----
+MIIFjTCCA3WgAwIBAgIEGErM1jANBgkqhkiG9w0BAQsFADBWMQswCQYDVQQGEwJDTjEwMC4GA1UE
+CgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRUwEwYDVQQDDAxDRkNB
+IEVWIFJPT1QwHhcNMTIwODA4MDMwNzAxWhcNMjkxMjMxMDMwNzAxWjBWMQswCQYDVQQGEwJDTjEw
+MC4GA1UECgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRUwEwYDVQQD
+DAxDRkNBIEVWIFJPT1QwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDXXWvNED8fBVnV
+BU03sQ7smCuOFR36k0sXgiFxEFLXUWRwFsJVaU2OFW2fvwwbwuCjZ9YMrM8irq93VCpLTIpTUnrD
+7i7es3ElweldPe6hL6P3KjzJIx1qqx2hp/Hz7KDVRM8Vz3IvHWOX6Jn5/ZOkVIBMUtRSqy5J35DN
+uF++P96hyk0g1CXohClTt7GIH//62pCfCqktQT+x8Rgp7hZZLDRJGqgG16iI0gNyejLi6mhNbiyW
+ZXvKWfry4t3uMCz7zEasxGPrb382KzRzEpR/38wmnvFyXVBlWY9ps4deMm/DGIq1lY+wejfeWkU7
+xzbh72fROdOXW3NiGUgthxwG+3SYIElz8AXSG7Ggo7cbcNOIabla1jj0Ytwli3i/+Oh+uFzJlU9f
+py25IGvPa931DfSCt/SyZi4QKPaXWnuWFo8BGS1sbn85WAZkgwGDg8NNkt0yxoekN+kWzqotaK8K
+gWU6cMGbrU1tVMoqLUuFG7OA5nBFDWteNfB/O7ic5ARwiRIlk9oKmSJgamNgTnYGmE69g60dWIol
+hdLHZR4tjsbftsbhf4oEIRUpdPA+nJCdDC7xij5aqgwJHsfVPKPtl8MeNPo4+QgO48BdK4PRVmrJ
+tqhUUy54Mmc9gn900PvhtgVguXDbjgv5E1hvcWAQUhC5wUEJ73IfZzF4/5YFjQIDAQABo2MwYTAf
+BgNVHSMEGDAWgBTj/i39KNALtbq2osS/BqoFjJP7LzAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB
+/wQEAwIBBjAdBgNVHQ4EFgQU4/4t/SjQC7W6tqLEvwaqBYyT+y8wDQYJKoZIhvcNAQELBQADggIB
+ACXGumvrh8vegjmWPfBEp2uEcwPenStPuiB/vHiyz5ewG5zz13ku9Ui20vsXiObTej/tUxPQ4i9q
+ecsAIyjmHjdXNYmEwnZPNDatZ8POQQaIxffu2Bq41gt/UP+TqhdLjOztUmCypAbqTuv0axn96/Ua
+4CUqmtzHQTb3yHQFhDmVOdYLO6Qn+gjYXB74BGBSESgoA//vU2YApUo0FmZ8/Qmkrp5nGm9BC2sG
+E5uPhnEFtC+NiWYzKXZUmhH4J/qyP5Hgzg0b8zAarb8iXRvTvyUFTeGSGn+ZnzxEk8rUQElsgIfX
+BDrDMlI1Dlb4pd19xIsNER9Tyx6yF7Zod1rg1MvIB671Oi6ON7fQAUtDKXeMOZePglr4UeWJoBjn
+aH9dCi77o0cOPaYjesYBx4/IXr9tgFa+iiS6M+qf4TIRnvHST4D2G0CvOJ4RUHlzEhLN5mydLIhy
+PDCBBpEi6lmt2hkuIsKNuYyH4Ga8cyNfIWRjgEj1oDwYPZTISEEdQLpe/v5WOaHIz16eGWRGENoX
+kbcFgKyLmZJ956LYBws2J+dIeWCKw9cTXPhyQN9Ky8+ZAAoACxGV2lZFA4gKn2fQ1XmxqI1AbQ3C
+ekD6819kR5LLU7m7Wc5P/dAVUwHY3+vZ5nbv0CO7O6l5s9UCKc2Jo5YPSjXnTkLAdc0Hz+Ys63su
+-----END CERTIFICATE-----
+
+TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı H5
+====================================================
+-----BEGIN CERTIFICATE-----
+MIIEJzCCAw+gAwIBAgIHAI4X/iQggTANBgkqhkiG9w0BAQsFADCBsTELMAkGA1UEBhMCVFIxDzAN
+BgNVBAcMBkFua2FyYTFNMEsGA1UECgxEVMOcUktUUlVTVCBCaWxnaSDEsGxldGnFn2ltIHZlIEJp
+bGnFn2ltIEfDvHZlbmxpxJ9pIEhpem1ldGxlcmkgQS7Fni4xQjBABgNVBAMMOVTDnFJLVFJVU1Qg
+RWxla3Ryb25payBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsSBINTAeFw0xMzA0MzAw
+ODA3MDFaFw0yMzA0MjgwODA3MDFaMIGxMQswCQYDVQQGEwJUUjEPMA0GA1UEBwwGQW5rYXJhMU0w
+SwYDVQQKDERUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnE
+n2kgSGl6bWV0bGVyaSBBLsWeLjFCMEAGA1UEAww5VMOcUktUUlVTVCBFbGVrdHJvbmlrIFNlcnRp
+ZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxIEg1MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
+CgKCAQEApCUZ4WWe60ghUEoI5RHwWrom/4NZzkQqL/7hzmAD/I0Dpe3/a6i6zDQGn1k19uwsu537
+jVJp45wnEFPzpALFp/kRGml1bsMdi9GYjZOHp3GXDSHHmflS0yxjXVW86B8BSLlg/kJK9siArs1m
+ep5Fimh34khon6La8eHBEJ/rPCmBp+EyCNSgBbGM+42WAA4+Jd9ThiI7/PS98wl+d+yG6w8z5UNP
+9FR1bSmZLmZaQ9/LXMrI5Tjxfjs1nQ/0xVqhzPMggCTTV+wVunUlm+hkS7M0hO8EuPbJbKoCPrZV
+4jI3X/xml1/N1p7HIL9Nxqw/dV8c7TKcfGkAaZHjIxhT6QIDAQABo0IwQDAdBgNVHQ4EFgQUVpkH
+HtOsDGlktAxQR95DLL4gwPswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZI
+hvcNAQELBQADggEBAJ5FdnsXSDLyOIspve6WSk6BGLFRRyDN0GSxDsnZAdkJzsiZ3GglE9Rc8qPo
+BP5yCccLqh0lVX6Wmle3usURehnmp349hQ71+S4pL+f5bFgWV1Al9j4uPqrtd3GqqpmWRgqujuwq
+URawXs3qZwQcWDD1YIq9pr1N5Za0/EKJAWv2cMhQOQwt1WbZyNKzMrcbGW3LM/nfpeYVhDfwwvJl
+lpKQd/Ct9JDpEXjXk4nAPQu6KfTomZ1yju2dL+6SfaHx/126M2CFYv4HAqGEVka+lgqaE9chTLd8
+B59OTj+RdPsnnRHM3eaxynFNExc5JsUpISuTKWqW+qtB4Uu2NQvAmxU=
+-----END CERTIFICATE-----
+
+Certinomis - Root CA
+====================
+-----BEGIN CERTIFICATE-----
+MIIFkjCCA3qgAwIBAgIBATANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJGUjETMBEGA1UEChMK
+Q2VydGlub21pczEXMBUGA1UECxMOMDAwMiA0MzM5OTg5MDMxHTAbBgNVBAMTFENlcnRpbm9taXMg
+LSBSb290IENBMB4XDTEzMTAyMTA5MTcxOFoXDTMzMTAyMTA5MTcxOFowWjELMAkGA1UEBhMCRlIx
+EzARBgNVBAoTCkNlcnRpbm9taXMxFzAVBgNVBAsTDjAwMDIgNDMzOTk4OTAzMR0wGwYDVQQDExRD
+ZXJ0aW5vbWlzIC0gUm9vdCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANTMCQos
+P5L2fxSeC5yaah1AMGT9qt8OHgZbn1CF6s2Nq0Nn3rD6foCWnoR4kkjW4znuzuRZWJflLieY6pOo
+d5tK8O90gC3rMB+12ceAnGInkYjwSond3IjmFPnVAy//ldu9n+ws+hQVWZUKxkd8aRi5pwP5ynap
+z8dvtF4F/u7BUrJ1Mofs7SlmO/NKFoL21prbcpjp3vDFTKWrteoB4owuZH9kb/2jJZOLyKIOSY00
+8B/sWEUuNKqEUL3nskoTuLAPrjhdsKkb5nPJWqHZZkCqqU2mNAKthH6yI8H7KsZn9DS2sJVqM09x
+RLWtwHkziOC/7aOgFLScCbAK42C++PhmiM1b8XcF4LVzbsF9Ri6OSyemzTUK/eVNfaoqoynHWmgE
+6OXWk6RiwsXm9E/G+Z8ajYJJGYrKWUM66A0ywfRMEwNvbqY/kXPLynNvEiCL7sCCeN5LLsJJwx3t
+FvYk9CcbXFcx3FXuqB5vbKziRcxXV4p1VxngtViZSTYxPDMBbRZKzbgqg4SGm/lg0h9tkQPTYKbV
+PZrdd5A9NaSfD171UkRpucC63M9933zZxKyGIjK8e2uR73r4F2iw4lNVYC2vPsKD2NkJK/DAZNuH
+i5HMkesE/Xa0lZrmFAYb1TQdvtj/dBxThZngWVJKYe2InmtJiUZ+IFrZ50rlau7SZRFDAgMBAAGj
+YzBhMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTvkUz1pcMw6C8I
+6tNxIqSSaHh02TAfBgNVHSMEGDAWgBTvkUz1pcMw6C8I6tNxIqSSaHh02TANBgkqhkiG9w0BAQsF
+AAOCAgEAfj1U2iJdGlg+O1QnurrMyOMaauo++RLrVl89UM7g6kgmJs95Vn6RHJk/0KGRHCwPT5iV
+WVO90CLYiF2cN/z7ZMF4jIuaYAnq1fohX9B0ZedQxb8uuQsLrbWwF6YSjNRieOpWauwK0kDDPAUw
+Pk2Ut59KA9N9J0u2/kTO+hkzGm2kQtHdzMjI1xZSg081lLMSVX3l4kLr5JyTCcBMWwerx20RoFAX
+lCOotQqSD7J6wWAsOMwaplv/8gzjqh8c3LigkyfeY+N/IZ865Z764BNqdeuWXGKRlI5nU7aJ+BIJ
+y29SWwNyhlCVCNSNh4YVH5Uk2KRvms6knZtt0rJ2BobGVgjF6wnaNsIbW0G+YSrjcOa4pvi2WsS9
+Iff/ql+hbHY5ZtbqTFXhADObE5hjyW/QASAJN1LnDE8+zbz1X5YnpyACleAu6AdBBR8Vbtaw5Bng
+DwKTACdyxYvRVB9dSsNAl35VpnzBMwQUAR1JIGkLGZOdblgi90AMRgwjY/M50n92Uaf0yKHxDHYi
+I0ZSKS3io0EHVmmY0gUJvGnHWmHNj4FgFU2A3ZDifcRQ8ow7bkrHxuaAKzyBvBGAFhAn1/DNP3nM
+cyrDflOR1m749fPH0FFNjkulW+YZFzvWgQncItzujrnEj1PhZ7szuIgVRs/taTX/dQ1G885x4cVr
+hkIGuUE=
+-----END CERTIFICATE-----
+
+OISTE WISeKey Global Root GB CA
+===============================
+-----BEGIN CERTIFICATE-----
+MIIDtTCCAp2gAwIBAgIQdrEgUnTwhYdGs/gjGvbCwDANBgkqhkiG9w0BAQsFADBtMQswCQYDVQQG
+EwJDSDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNl
+ZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQiBDQTAeFw0xNDEyMDExNTAw
+MzJaFw0zOTEyMDExNTEwMzFaMG0xCzAJBgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYD
+VQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEds
+b2JhbCBSb290IEdCIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2Be3HEokKtaX
+scriHvt9OO+Y9bI5mE4nuBFde9IllIiCFSZqGzG7qFshISvYD06fWvGxWuR51jIjK+FTzJlFXHtP
+rby/h0oLS5daqPZI7H17Dc0hBt+eFf1Biki3IPShehtX1F1Q/7pn2COZH8g/497/b1t3sWtuuMlk
+9+HKQUYOKXHQuSP8yYFfTvdv37+ErXNku7dCjmn21HYdfp2nuFeKUWdy19SouJVUQHMD9ur06/4o
+Qnc/nSMbsrY9gBQHTC5P99UKFg29ZkM3fiNDecNAhvVMKdqOmq0NpQSHiB6F4+lT1ZvIiwNjeOvg
+GUpuuy9rM2RYk61pv48b74JIxwIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB
+/zAdBgNVHQ4EFgQUNQ/INmNe4qPs+TtmFc5RUuORmj0wEAYJKwYBBAGCNxUBBAMCAQAwDQYJKoZI
+hvcNAQELBQADggEBAEBM+4eymYGQfp3FsLAmzYh7KzKNbrghcViXfa43FK8+5/ea4n32cZiZBKpD
+dHij40lhPnOMTZTg+XHEthYOU3gf1qKHLwI5gSk8rxWYITD+KJAAjNHhy/peyP34EEY7onhCkRd0
+VQreUGdNZtGn//3ZwLWoo4rOZvUPQ82nK1d7Y0Zqqi5S2PTt4W2tKZB4SLrhI6qjiey1q5bAtEui
+HZeeevJuQHHfaPFlTc58Bd9TZaml8LGXBHAVRgOY1NK/VLSgWH1Sb9pWJmLU2NuJMW8c8CLC02Ic
+Nc1MaRVUGpCY3useX8p3x8uOPUNpnJpY0CQ73xtAln41rYHHTnG6iBM=
+-----END CERTIFICATE-----
+
+SZAFIR ROOT CA2
+===============
+-----BEGIN CERTIFICATE-----
+MIIDcjCCAlqgAwIBAgIUPopdB+xV0jLVt+O2XwHrLdzk1uQwDQYJKoZIhvcNAQELBQAwUTELMAkG
+A1UEBhMCUEwxKDAmBgNVBAoMH0tyYWpvd2EgSXpiYSBSb3psaWN6ZW5pb3dhIFMuQS4xGDAWBgNV
+BAMMD1NaQUZJUiBST09UIENBMjAeFw0xNTEwMTkwNzQzMzBaFw0zNTEwMTkwNzQzMzBaMFExCzAJ
+BgNVBAYTAlBMMSgwJgYDVQQKDB9LcmFqb3dhIEl6YmEgUm96bGljemVuaW93YSBTLkEuMRgwFgYD
+VQQDDA9TWkFGSVIgUk9PVCBDQTIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC3vD5Q
+qEvNQLXOYeeWyrSh2gwisPq1e3YAd4wLz32ohswmUeQgPYUM1ljj5/QqGJ3a0a4m7utT3PSQ1hNK
+DJA8w/Ta0o4NkjrcsbH/ON7Dui1fgLkCvUqdGw+0w8LBZwPd3BucPbOw3gAeqDRHu5rr/gsUvTaE
+2g0gv/pby6kWIK05YO4vdbbnl5z5Pv1+TW9NL++IDWr63fE9biCloBK0TXC5ztdyO4mTp4CEHCdJ
+ckm1/zuVnsHMyAHs6A6KCpbns6aH5db5BSsNl0BwPLqsdVqc1U2dAgrSS5tmS0YHF2Wtn2yIANwi
+ieDhZNRnvDF5YTy7ykHNXGoAyDw4jlivAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0P
+AQH/BAQDAgEGMB0GA1UdDgQWBBQuFqlKGLXLzPVvUPMjX/hd56zwyDANBgkqhkiG9w0BAQsFAAOC
+AQEAtXP4A9xZWx126aMqe5Aosk3AM0+qmrHUuOQn/6mWmc5G4G18TKI4pAZw8PRBEew/R40/cof5
+O/2kbytTAOD/OblqBw7rHRz2onKQy4I9EYKL0rufKq8h5mOGnXkZ7/e7DDWQw4rtTw/1zBLZpD67
+oPwglV9PJi8RI4NOdQcPv5vRtB3pEAT+ymCPoky4rc/hkA/NrgrHXXu3UNLUYfrVFdvXn4dRVOul
+4+vJhaAlIDf7js4MNIThPIGyd05DpYhfhmehPea0XGG2Ptv+tyjFogeutcrKjSoS75ftwjCkySp6
++/NNIxuZMzSgLvWpCz/UXeHPhJ/iGcJfitYgHuNztw==
+-----END CERTIFICATE-----
+
+Certum Trusted Network CA 2
+===========================
+-----BEGIN CERTIFICATE-----
+MIIF0jCCA7qgAwIBAgIQIdbQSk8lD8kyN/yqXhKN6TANBgkqhkiG9w0BAQ0FADCBgDELMAkGA1UE
+BhMCUEwxIjAgBgNVBAoTGVVuaXpldG8gVGVjaG5vbG9naWVzIFMuQS4xJzAlBgNVBAsTHkNlcnR1
+bSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEkMCIGA1UEAxMbQ2VydHVtIFRydXN0ZWQgTmV0d29y
+ayBDQSAyMCIYDzIwMTExMDA2MDgzOTU2WhgPMjA0NjEwMDYwODM5NTZaMIGAMQswCQYDVQQGEwJQ
+TDEiMCAGA1UEChMZVW5pemV0byBUZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENl
+cnRpZmljYXRpb24gQXV0aG9yaXR5MSQwIgYDVQQDExtDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENB
+IDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC9+Xj45tWADGSdhhuWZGc/IjoedQF9
+7/tcZ4zJzFxrqZHmuULlIEub2pt7uZld2ZuAS9eEQCsn0+i6MLs+CRqnSZXvK0AkwpfHp+6bJe+o
+CgCXhVqqndwpyeI1B+twTUrWwbNWuKFBOJvR+zF/j+Bf4bE/D44WSWDXBo0Y+aomEKsq09DRZ40b
+Rr5HMNUuctHFY9rnY3lEfktjJImGLjQ/KUxSiyqnwOKRKIm5wFv5HdnnJ63/mgKXwcZQkpsCLL2p
+uTRZCr+ESv/f/rOf69me4Jgj7KZrdxYq28ytOxykh9xGc14ZYmhFV+SQgkK7QtbwYeDBoz1mo130
+GO6IyY0XRSmZMnUCMe4pJshrAua1YkV/NxVaI2iJ1D7eTiew8EAMvE0Xy02isx7QBlrd9pPPV3WZ
+9fqGGmd4s7+W/jTcvedSVuWz5XV710GRBdxdaeOVDUO5/IOWOZV7bIBaTxNyxtd9KXpEulKkKtVB
+Rgkg/iKgtlswjbyJDNXXcPiHUv3a76xRLgezTv7QCdpw75j6VuZt27VXS9zlLCUVyJ4ueE742pye
+hizKV/Ma5ciSixqClnrDvFASadgOWkaLOusm+iPJtrCBvkIApPjW/jAux9JG9uWOdf3yzLnQh1vM
+BhBgu4M1t15n3kfsmUjxpKEV/q2MYo45VU85FrmxY53/twIDAQABo0IwQDAPBgNVHRMBAf8EBTAD
+AQH/MB0GA1UdDgQWBBS2oVQ5AsOgP46KvPrU+Bym0ToO/TAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZI
+hvcNAQENBQADggIBAHGlDs7k6b8/ONWJWsQCYftMxRQXLYtPU2sQF/xlhMcQSZDe28cmk4gmb3DW
+Al45oPePq5a1pRNcgRRtDoGCERuKTsZPpd1iHkTfCVn0W3cLN+mLIMb4Ck4uWBzrM9DPhmDJ2vuA
+L55MYIR4PSFk1vtBHxgP58l1cb29XN40hz5BsA72udY/CROWFC/emh1auVbONTqwX3BNXuMp8SMo
+clm2q8KMZiYcdywmdjWLKKdpoPk79SPdhRB0yZADVpHnr7pH1BKXESLjokmUbOe3lEu6LaTaM4tM
+pkT/WjzGHWTYtTHkpjx6qFcL2+1hGsvxznN3Y6SHb0xRONbkX8eftoEq5IVIeVheO/jbAoJnwTnb
+w3RLPTYe+SmTiGhbqEQZIfCn6IENLOiTNrQ3ssqwGyZ6miUfmpqAnksqP/ujmv5zMnHCnsZy4Ypo
+J/HkD7TETKVhk/iXEAcqMCWpuchxuO9ozC1+9eB+D4Kob7a6bINDd82Kkhehnlt4Fj1F4jNy3eFm
+ypnTycUm/Q1oBEauttmbjL4ZvrHG8hnjXALKLNhvSgfZyTXaQHXyxKcZb55CEJh15pWLYLztxRLX
+is7VmFxWlgPF7ncGNf/P5O4/E2Hu29othfDNrp2yGAlFw5Khchf8R7agCyzxxN5DaAhqXzvwdmP7
+zAYspsbiDrW5viSP
+-----END CERTIFICATE-----
+
+Hellenic Academic and Research Institutions RootCA 2015
+=======================================================
+-----BEGIN CERTIFICATE-----
+MIIGCzCCA/OgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBpjELMAkGA1UEBhMCR1IxDzANBgNVBAcT
+BkF0aGVuczFEMEIGA1UEChM7SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0
+aW9ucyBDZXJ0LiBBdXRob3JpdHkxQDA+BgNVBAMTN0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNl
+YXJjaCBJbnN0aXR1dGlvbnMgUm9vdENBIDIwMTUwHhcNMTUwNzA3MTAxMTIxWhcNNDAwNjMwMTAx
+MTIxWjCBpjELMAkGA1UEBhMCR1IxDzANBgNVBAcTBkF0aGVuczFEMEIGA1UEChM7SGVsbGVuaWMg
+QWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9ucyBDZXJ0LiBBdXRob3JpdHkxQDA+BgNV
+BAMTN0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgUm9vdENBIDIw
+MTUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDC+Kk/G4n8PDwEXT2QNrCROnk8Zlrv
+bTkBSRq0t89/TSNTt5AA4xMqKKYx8ZEA4yjsriFBzh/a/X0SWwGDD7mwX5nh8hKDgE0GPt+sr+eh
+iGsxr/CL0BgzuNtFajT0AoAkKAoCFZVedioNmToUW/bLy1O8E00BiDeUJRtCvCLYjqOWXjrZMts+
+6PAQZe104S+nfK8nNLspfZu2zwnI5dMK/IhlZXQK3HMcXM1AsRzUtoSMTFDPaI6oWa7CJ06CojXd
+FPQf/7J31Ycvqm59JCfnxssm5uX+Zwdj2EUN3TpZZTlYepKZcj2chF6IIbjV9Cz82XBST3i4vTwr
+i5WY9bPRaM8gFH5MXF/ni+X1NYEZN9cRCLdmvtNKzoNXADrDgfgXy5I2XdGj2HUb4Ysn6npIQf1F
+GQatJ5lOwXBH3bWfgVMS5bGMSF0xQxfjjMZ6Y5ZLKTBOhE5iGV48zpeQpX8B653g+IuJ3SWYPZK2
+fu/Z8VFRfS0myGlZYeCsargqNhEEelC9MoS+L9xy1dcdFkfkR2YgP/SWxa+OAXqlD3pk9Q0Yh9mu
+iNX6hME6wGkoLfINaFGq46V3xqSQDqE3izEjR8EJCOtu93ib14L8hCCZSRm2Ekax+0VVFqmjZayc
+Bw/qa9wfLgZy7IaIEuQt218FL+TwA9MmM+eAws1CoRc0CwIDAQABo0IwQDAPBgNVHRMBAf8EBTAD
+AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUcRVnyMjJvXVdctA4GGqd83EkVAswDQYJKoZI
+hvcNAQELBQADggIBAHW7bVRLqhBYRjTyYtcWNl0IXtVsyIe9tC5G8jH4fOpCtZMWVdyhDBKg2mF+
+D1hYc2Ryx+hFjtyp8iY/xnmMsVMIM4GwVhO+5lFc2JsKT0ucVlMC6U/2DWDqTUJV6HwbISHTGzrM
+d/K4kPFox/la/vot9L/J9UUbzjgQKjeKeaO04wlshYaT/4mWJ3iBj2fjRnRUjtkNaeJK9E10A/+y
+d+2VZ5fkscWrv2oj6NSU4kQoYsRL4vDY4ilrGnB+JGGTe08DMiUNRSQrlrRGar9KC/eaj8GsGsVn
+82800vpzY4zvFrCopEYq+OsS7HK07/grfoxSwIuEVPkvPuNVqNxmsdnhX9izjFk0WaSrT2y7Hxjb
+davYy5LNlDhhDgcGH0tGEPEVvo2FXDtKK4F5D7Rpn0lQl033DlZdwJVqwjbDG2jJ9SrcR5q+ss7F
+Jej6A7na+RZukYT1HCjI/CbM1xyQVqdfbzoEvM14iQuODy+jqk+iGxI9FghAD/FGTNeqewjBCvVt
+J94Cj8rDtSvK6evIIVM4pcw72Hc3MKJP2W/R8kCtQXoXxdZKNYm3QdV8hn9VTYNKpXMgwDqvkPGa
+JI7ZjnHKe7iG2rKPmT4dEw0SEe7Uq/DpFXYC5ODfqiAeW2GFZECpkJcNrVPSWh2HagCXZWK0vm9q
+p/UsQu0yrbYhnr68
+-----END CERTIFICATE-----
+
+Hellenic Academic and Research Institutions ECC RootCA 2015
+===========================================================
+-----BEGIN CERTIFICATE-----
+MIICwzCCAkqgAwIBAgIBADAKBggqhkjOPQQDAjCBqjELMAkGA1UEBhMCR1IxDzANBgNVBAcTBkF0
+aGVuczFEMEIGA1UEChM7SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9u
+cyBDZXJ0LiBBdXRob3JpdHkxRDBCBgNVBAMTO0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJj
+aCBJbnN0aXR1dGlvbnMgRUNDIFJvb3RDQSAyMDE1MB4XDTE1MDcwNzEwMzcxMloXDTQwMDYzMDEw
+MzcxMlowgaoxCzAJBgNVBAYTAkdSMQ8wDQYDVQQHEwZBdGhlbnMxRDBCBgNVBAoTO0hlbGxlbmlj
+IEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ2VydC4gQXV0aG9yaXR5MUQwQgYD
+VQQDEztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25zIEVDQyBSb290
+Q0EgMjAxNTB2MBAGByqGSM49AgEGBSuBBAAiA2IABJKgQehLgoRc4vgxEZmGZE4JJS+dQS8KrjVP
+dJWyUWRrjWvmP3CV8AVER6ZyOFB2lQJajq4onvktTpnvLEhvTCUp6NFxW98dwXU3tNf6e3pCnGoK
+Vlp8aQuqgAkkbH7BRqNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0O
+BBYEFLQiC4KZJAEOnLvkDv2/+5cgk5kqMAoGCCqGSM49BAMCA2cAMGQCMGfOFmI4oqxiRaeplSTA
+GiecMjvAwNW6qef4BENThe5SId6d9SWDPp5YSy/XZxMOIQIwBeF1Ad5o7SofTUwJCA3sS61kFyjn
+dc5FZXIhF8siQQ6ME5g4mlRtm8rifOoCWCKR
+-----END CERTIFICATE-----
+
+Certplus Root CA G1
+===================
+-----BEGIN CERTIFICATE-----
+MIIFazCCA1OgAwIBAgISESBVg+QtPlRWhS2DN7cs3EYRMA0GCSqGSIb3DQEBDQUAMD4xCzAJBgNV
+BAYTAkZSMREwDwYDVQQKDAhDZXJ0cGx1czEcMBoGA1UEAwwTQ2VydHBsdXMgUm9vdCBDQSBHMTAe
+Fw0xNDA1MjYwMDAwMDBaFw0zODAxMTUwMDAwMDBaMD4xCzAJBgNVBAYTAkZSMREwDwYDVQQKDAhD
+ZXJ0cGx1czEcMBoGA1UEAwwTQ2VydHBsdXMgUm9vdCBDQSBHMTCCAiIwDQYJKoZIhvcNAQEBBQAD
+ggIPADCCAgoCggIBANpQh7bauKk+nWT6VjOaVj0W5QOVsjQcmm1iBdTYj+eJZJ+622SLZOZ5KmHN
+r49aiZFluVj8tANfkT8tEBXgfs+8/H9DZ6itXjYj2JizTfNDnjl8KvzsiNWI7nC9hRYt6kuJPKNx
+Qv4c/dMcLRC4hlTqQ7jbxofaqK6AJc96Jh2qkbBIb6613p7Y1/oA/caP0FG7Yn2ksYyy/yARujVj
+BYZHYEMzkPZHogNPlk2dT8Hq6pyi/jQu3rfKG3akt62f6ajUeD94/vI4CTYd0hYCyOwqaK/1jpTv
+LRN6HkJKHRUxrgwEV/xhc/MxVoYxgKDEEW4wduOU8F8ExKyHcomYxZ3MVwia9Az8fXoFOvpHgDm2
+z4QTd28n6v+WZxcIbekN1iNQMLAVdBM+5S//Ds3EC0pd8NgAM0lm66EYfFkuPSi5YXHLtaW6uOrc
+4nBvCGrch2c0798wct3zyT8j/zXhviEpIDCB5BmlIOklynMxdCm+4kLV87ImZsdo/Rmz5yCTmehd
+4F6H50boJZwKKSTUzViGUkAksnsPmBIgJPaQbEfIDbsYIC7Z/fyL8inqh3SV4EJQeIQEQWGw9CEj
+jy3LKCHyamz0GqbFFLQ3ZU+V/YDI+HLlJWvEYLF7bY5KinPOWftwenMGE9nTdDckQQoRb5fc5+R+
+ob0V8rqHDz1oihYHAgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0G
+A1UdDgQWBBSowcCbkahDFXxdBie0KlHYlwuBsTAfBgNVHSMEGDAWgBSowcCbkahDFXxdBie0KlHY
+lwuBsTANBgkqhkiG9w0BAQ0FAAOCAgEAnFZvAX7RvUz1isbwJh/k4DgYzDLDKTudQSk0YcbX8ACh
+66Ryj5QXvBMsdbRX7gp8CXrc1cqh0DQT+Hern+X+2B50ioUHj3/MeXrKls3N/U/7/SMNkPX0XtPG
+YX2eEeAC7gkE2Qfdpoq3DIMku4NQkv5gdRE+2J2winq14J2by5BSS7CTKtQ+FjPlnsZlFT5kOwQ/
+2wyPX1wdaR+v8+khjPPvl/aatxm2hHSco1S1cE5j2FddUyGbQJJD+tZ3VTNPZNX70Cxqjm0lpu+F
+6ALEUz65noe8zDUa3qHpimOHZR4RKttjd5cUvpoUmRGywO6wT/gUITJDT5+rosuoD6o7BlXGEilX
+CNQ314cnrUlZp5GrRHpejXDbl85IULFzk/bwg2D5zfHhMf1bfHEhYxQUqq/F3pN+aLHsIqKqkHWe
+tUNy6mSjhEv9DKgma3GX7lZjZuhCVPnHHd/Qj1vfyDBviP4NxDMcU6ij/UgQ8uQKTuEVV/xuZDDC
+VRHc6qnNSlSsKWNEz0pAoNZoWRsz+e86i9sgktxChL8Bq4fA1SCC28a5g4VCXA9DO2pJNdWY9BW/
++mGBDAkgGNLQFwzLSABQ6XaCjGTXOqAHVcweMcDvOrRl++O/QmueD6i9a5jc2NvLi6Td11n0bt3+
+qsOR0C5CB8AMTVPNJLFMWx5R9N/pkvo=
+-----END CERTIFICATE-----
+
+Certplus Root CA G2
+===================
+-----BEGIN CERTIFICATE-----
+MIICHDCCAaKgAwIBAgISESDZkc6uo+jF5//pAq/Pc7xVMAoGCCqGSM49BAMDMD4xCzAJBgNVBAYT
+AkZSMREwDwYDVQQKDAhDZXJ0cGx1czEcMBoGA1UEAwwTQ2VydHBsdXMgUm9vdCBDQSBHMjAeFw0x
+NDA1MjYwMDAwMDBaFw0zODAxMTUwMDAwMDBaMD4xCzAJBgNVBAYTAkZSMREwDwYDVQQKDAhDZXJ0
+cGx1czEcMBoGA1UEAwwTQ2VydHBsdXMgUm9vdCBDQSBHMjB2MBAGByqGSM49AgEGBSuBBAAiA2IA
+BM0PW1aC3/BFGtat93nwHcmsltaeTpwftEIRyoa/bfuFo8XlGVzX7qY/aWfYeOKmycTbLXku54uN
+Am8xIk0G42ByRZ0OQneezs/lf4WbGOT8zC5y0xaTTsqZY1yhBSpsBqNjMGEwDgYDVR0PAQH/BAQD
+AgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNqDYwJ5jtpMxjwjFNiPwyCrKGBZMB8GA1Ud
+IwQYMBaAFNqDYwJ5jtpMxjwjFNiPwyCrKGBZMAoGCCqGSM49BAMDA2gAMGUCMHD+sAvZ94OX7PNV
+HdTcswYO/jOYnYs5kGuUIe22113WTNchp+e/IQ8rzfcq3IUHnQIxAIYUFuXcsGXCwI4Un78kFmjl
+vPl5adytRSv3tjFzzAalU5ORGpOucGpnutee5WEaXw==
+-----END CERTIFICATE-----
+
+OpenTrust Root CA G1
+====================
+-----BEGIN CERTIFICATE-----
+MIIFbzCCA1egAwIBAgISESCzkFU5fX82bWTCp59rY45nMA0GCSqGSIb3DQEBCwUAMEAxCzAJBgNV
+BAYTAkZSMRIwEAYDVQQKDAlPcGVuVHJ1c3QxHTAbBgNVBAMMFE9wZW5UcnVzdCBSb290IENBIEcx
+MB4XDTE0MDUyNjA4NDU1MFoXDTM4MDExNTAwMDAwMFowQDELMAkGA1UEBhMCRlIxEjAQBgNVBAoM
+CU9wZW5UcnVzdDEdMBsGA1UEAwwUT3BlblRydXN0IFJvb3QgQ0EgRzEwggIiMA0GCSqGSIb3DQEB
+AQUAA4ICDwAwggIKAoICAQD4eUbalsUwXopxAy1wpLuwxQjczeY1wICkES3d5oeuXT2R0odsN7fa
+Yp6bwiTXj/HbpqbfRm9RpnHLPhsxZ2L3EVs0J9V5ToybWL0iEA1cJwzdMOWo010hOHQX/uMftk87
+ay3bfWAfjH1MBcLrARYVmBSO0ZB3Ij/swjm4eTrwSSTilZHcYTSSjFR077F9jAHiOH3BX2pfJLKO
+YheteSCtqx234LSWSE9mQxAGFiQD4eCcjsZGT44ameGPuY4zbGneWK2gDqdkVBFpRGZPTBKnjix9
+xNRbxQA0MMHZmf4yzgeEtE7NCv82TWLxp2NX5Ntqp66/K7nJ5rInieV+mhxNaMbBGN4zK1FGSxyO
+9z0M+Yo0FMT7MzUj8czxKselu7Cizv5Ta01BG2Yospb6p64KTrk5M0ScdMGTHPjgniQlQ/GbI4Kq
+3ywgsNw2TgOzfALU5nsaqocTvz6hdLubDuHAk5/XpGbKuxs74zD0M1mKB3IDVedzagMxbm+WG+Oi
+n6+Sx+31QrclTDsTBM8clq8cIqPQqwWyTBIjUtz9GVsnnB47ev1CI9sjgBPwvFEVVJSmdz7QdFG9
+URQIOTfLHzSpMJ1ShC5VkLG631UAC9hWLbFJSXKAqWLXwPYYEQRVzXR7z2FwefR7LFxckvzluFqr
+TJOVoSfupb7PcSNCupt2LQIDAQABo2MwYTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB
+/zAdBgNVHQ4EFgQUl0YhVyE12jZVx/PxN3DlCPaTKbYwHwYDVR0jBBgwFoAUl0YhVyE12jZVx/Px
+N3DlCPaTKbYwDQYJKoZIhvcNAQELBQADggIBAB3dAmB84DWn5ph76kTOZ0BP8pNuZtQ5iSas000E
+PLuHIT839HEl2ku6q5aCgZG27dmxpGWX4m9kWaSW7mDKHyP7Rbr/jyTwyqkxf3kfgLMtMrpkZ2Cv
+uVnN35pJ06iCsfmYlIrM4LvgBBuZYLFGZdwIorJGnkSI6pN+VxbSFXJfLkur1J1juONI5f6ELlgK
+n0Md/rcYkoZDSw6cMoYsYPXpSOqV7XAp8dUv/TW0V8/bhUiZucJvbI/NeJWsZCj9VrDDb8O+WVLh
+X4SPgPL0DTatdrOjteFkdjpY3H1PXlZs5VVZV6Xf8YpmMIzUUmI4d7S+KNfKNsSbBfD4Fdvb8e80
+nR14SohWZ25g/4/Ii+GOvUKpMwpZQhISKvqxnUOOBZuZ2mKtVzazHbYNeS2WuOvyDEsMpZTGMKcm
+GS3tTAZQMPH9WD25SxdfGbRqhFS0OE85og2WaMMolP3tLR9Ka0OWLpABEPs4poEL0L9109S5zvE/
+bw4cHjdx5RiHdRk/ULlepEU0rbDK5uUTdg8xFKmOLZTW1YVNcxVPS/KyPu1svf0OnWZzsD2097+o
+4BGkxK51CUpjAEggpsadCwmKtODmzj7HPiY46SvepghJAwSQiumPv+i2tCqjI40cHLI5kqiPAlxA
+OXXUc0ECd97N4EOH1uS6SsNsEn/+KuYj1oxx
+-----END CERTIFICATE-----
+
+OpenTrust Root CA G2
+====================
+-----BEGIN CERTIFICATE-----
+MIIFbzCCA1egAwIBAgISESChaRu/vbm9UpaPI+hIvyYRMA0GCSqGSIb3DQEBDQUAMEAxCzAJBgNV
+BAYTAkZSMRIwEAYDVQQKDAlPcGVuVHJ1c3QxHTAbBgNVBAMMFE9wZW5UcnVzdCBSb290IENBIEcy
+MB4XDTE0MDUyNjAwMDAwMFoXDTM4MDExNTAwMDAwMFowQDELMAkGA1UEBhMCRlIxEjAQBgNVBAoM
+CU9wZW5UcnVzdDEdMBsGA1UEAwwUT3BlblRydXN0IFJvb3QgQ0EgRzIwggIiMA0GCSqGSIb3DQEB
+AQUAA4ICDwAwggIKAoICAQDMtlelM5QQgTJT32F+D3Y5z1zCU3UdSXqWON2ic2rxb95eolq5cSG+
+Ntmh/LzubKh8NBpxGuga2F8ORAbtp+Dz0mEL4DKiltE48MLaARf85KxP6O6JHnSrT78eCbY2albz
+4e6WiWYkBuTNQjpK3eCasMSCRbP+yatcfD7J6xcvDH1urqWPyKwlCm/61UWY0jUJ9gNDlP7ZvyCV
+eYCYitmJNbtRG6Q3ffyZO6v/v6wNj0OxmXsWEH4db0fEFY8ElggGQgT4hNYdvJGmQr5J1WqIP7wt
+UdGejeBSzFfdNTVY27SPJIjki9/ca1TSgSuyzpJLHB9G+h3Ykst2Z7UJmQnlrBcUVXDGPKBWCgOz
+3GIZ38i1MH/1PCZ1Eb3XG7OHngevZXHloM8apwkQHZOJZlvoPGIytbU6bumFAYueQ4xncyhZW+vj
+3CzMpSZyYhK05pyDRPZRpOLAeiRXyg6lPzq1O4vldu5w5pLeFlwoW5cZJ5L+epJUzpM5ChaHvGOz
+9bGTXOBut9Dq+WIyiET7vycotjCVXRIouZW+j1MY5aIYFuJWpLIsEPUdN6b4t/bQWVyJ98LVtZR0
+0dX+G7bw5tYee9I8y6jj9RjzIR9u701oBnstXW5DiabA+aC/gh7PU3+06yzbXfZqfUAkBXKJOAGT
+y3HCOV0GEfZvePg3DTmEJwIDAQABo2MwYTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB
+/zAdBgNVHQ4EFgQUajn6QiL35okATV59M4PLuG53hq8wHwYDVR0jBBgwFoAUajn6QiL35okATV59
+M4PLuG53hq8wDQYJKoZIhvcNAQENBQADggIBAJjLq0A85TMCl38th6aP1F5Kr7ge57tx+4BkJamz
+Gj5oXScmp7oq4fBXgwpkTx4idBvpkF/wrM//T2h6OKQQbA2xx6R3gBi2oihEdqc0nXGEL8pZ0keI
+mUEiyTCYYW49qKgFbdEfwFFEVn8nNQLdXpgKQuswv42hm1GqO+qTRmTFAHneIWv2V6CG1wZy7HBG
+S4tz3aAhdT7cHcCP009zHIXZ/n9iyJVvttN7jLpTwm+bREx50B1ws9efAvSyB7DH5fitIw6mVskp
+EndI2S9G/Tvw/HRwkqWOOAgfZDC2t0v7NqwQjqBSM2OdAzVWxWm9xiNaJ5T2pBL4LTM8oValX9YZ
+6e18CL13zSdkzJTaTkZQh+D5wVOAHrut+0dSixv9ovneDiK3PTNZbNTe9ZUGMg1RGUFcPk8G97kr
+gCf2o6p6fAbhQ8MTOWIaNr3gKC6UAuQpLmBVrkA9sHSSXvAgZJY/X0VdiLWK2gKgW0VU3jg9CcCo
+SmVGFvyqv1ROTVu+OEO3KMqLM6oaJbolXCkvW0pujOotnCr2BXbgd5eAiN1nE28daCSLT7d0geX0
+YJ96Vdc+N9oWaz53rK4YcJUIeSkDiv7BO7M/Gg+kO14fWKGVyasvc0rQLW6aWQ9VGHgtPFGml4vm
+u7JwqkwR3v98KzfUetF3NI/n+UL3PIEMS1IK
+-----END CERTIFICATE-----
+
+OpenTrust Root CA G3
+====================
+-----BEGIN CERTIFICATE-----
+MIICITCCAaagAwIBAgISESDm+Ez8JLC+BUCs2oMbNGA/MAoGCCqGSM49BAMDMEAxCzAJBgNVBAYT
+AkZSMRIwEAYDVQQKDAlPcGVuVHJ1c3QxHTAbBgNVBAMMFE9wZW5UcnVzdCBSb290IENBIEczMB4X
+DTE0MDUyNjAwMDAwMFoXDTM4MDExNTAwMDAwMFowQDELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCU9w
+ZW5UcnVzdDEdMBsGA1UEAwwUT3BlblRydXN0IFJvb3QgQ0EgRzMwdjAQBgcqhkjOPQIBBgUrgQQA
+IgNiAARK7liuTcpm3gY6oxH84Bjwbhy6LTAMidnW7ptzg6kjFYwvWYpa3RTqnVkrQ7cG7DK2uu5B
+ta1doYXM6h0UZqNnfkbilPPntlahFVmhTzeXuSIevRHr9LIfXsMUmuXZl5mjYzBhMA4GA1UdDwEB
+/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRHd8MUi2I5DMlv4VBN0BBY3JWIbTAf
+BgNVHSMEGDAWgBRHd8MUi2I5DMlv4VBN0BBY3JWIbTAKBggqhkjOPQQDAwNpADBmAjEAj6jcnboM
+BBf6Fek9LykBl7+BFjNAk2z8+e2AcG+qj9uEwov1NcoG3GRvaBbhj5G5AjEA2Euly8LQCGzpGPta
+3U1fJAuwACEl74+nBCZx4nxp5V2a+EEfOzmTk51V6s2N8fvB
+-----END CERTIFICATE-----
+
+ISRG Root X1
+============
+-----BEGIN CERTIFICATE-----
+MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAwTzELMAkGA1UE
+BhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2VhcmNoIEdyb3VwMRUwEwYDVQQD
+EwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4WhcNMzUwNjA0MTEwNDM4WjBPMQswCQYDVQQG
+EwJVUzEpMCcGA1UEChMgSW50ZXJuZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMT
+DElTUkcgUm9vdCBYMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3oJHP0FDfzm54r
+Vygch77ct984kIxuPOZXoHj3dcKi/vVqbvYATyjb3miGbESTtrFj/RQSa78f0uoxmyF+0TM8ukj1
+3Xnfs7j/EvEhmkvBioZxaUpmZmyPfjxwv60pIgbz5MDmgK7iS4+3mX6UA5/TR5d8mUgjU+g4rk8K
+b4Mu0UlXjIB0ttov0DiNewNwIRt18jA8+o+u3dpjq+sWT8KOEUt+zwvo/7V3LvSye0rgTBIlDHCN
+Aymg4VMk7BPZ7hm/ELNKjD+Jo2FR3qyHB5T0Y3HsLuJvW5iB4YlcNHlsdu87kGJ55tukmi8mxdAQ
+4Q7e2RCOFvu396j3x+UCB5iPNgiV5+I3lg02dZ77DnKxHZu8A/lJBdiB3QW0KtZB6awBdpUKD9jf
+1b0SHzUvKBds0pjBqAlkd25HN7rOrFleaJ1/ctaJxQZBKT5ZPt0m9STJEadao0xAH0ahmbWnOlFu
+hjuefXKnEgV4We0+UXgVCwOPjdAvBbI+e0ocS3MFEvzG6uBQE3xDk3SzynTnjh8BCNAw1FtxNrQH
+usEwMFxIt4I7mKZ9YIqioymCzLq9gwQbooMDQaHWBfEbwrbwqHyGO0aoSCqI3Haadr8faqU9GY/r
+OPNk3sgrDQoo//fb4hVC1CLQJ13hef4Y53CIrU7m2Ys6xt0nUW7/vGT1M0NPAgMBAAGjQjBAMA4G
+A1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBR5tFnme7bl5AFzgAiIyBpY
+9umbbjANBgkqhkiG9w0BAQsFAAOCAgEAVR9YqbyyqFDQDLHYGmkgJykIrGF1XIpu+ILlaS/V9lZL
+ubhzEFnTIZd+50xx+7LSYK05qAvqFyFWhfFQDlnrzuBZ6brJFe+GnY+EgPbk6ZGQ3BebYhtF8GaV
+0nxvwuo77x/Py9auJ/GpsMiu/X1+mvoiBOv/2X/qkSsisRcOj/KKNFtY2PwByVS5uCbMiogziUwt
+hDyC3+6WVwW6LLv3xLfHTjuCvjHIInNzktHCgKQ5ORAzI4JMPJ+GslWYHb4phowim57iaztXOoJw
+TdwJx4nLCgdNbOhdjsnvzqvHu7UrTkXWStAmzOVyyghqpZXjFaH3pO3JLF+l+/+sKAIuvtd7u+Nx
+e5AW0wdeRlN8NwdCjNPElpzVmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1NbdWhscdCb+ZA
+JzVcoyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq4RgqsahD
+YVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPAmRGunUHBcnWEvgJBQl9n
+JEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57demyPxgcYxn/eR44/KJ4EBs+lVDR3veyJ
+m+kXQ99b21/+jh5Xos1AnX5iItreGCc=
+-----END CERTIFICATE-----
+
+AC RAIZ FNMT-RCM
+================
+-----BEGIN CERTIFICATE-----
+MIIFgzCCA2ugAwIBAgIPXZONMGc2yAYdGsdUhGkHMA0GCSqGSIb3DQEBCwUAMDsxCzAJBgNVBAYT
+AkVTMREwDwYDVQQKDAhGTk1ULVJDTTEZMBcGA1UECwwQQUMgUkFJWiBGTk1ULVJDTTAeFw0wODEw
+MjkxNTU5NTZaFw0zMDAxMDEwMDAwMDBaMDsxCzAJBgNVBAYTAkVTMREwDwYDVQQKDAhGTk1ULVJD
+TTEZMBcGA1UECwwQQUMgUkFJWiBGTk1ULVJDTTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC
+ggIBALpxgHpMhm5/yBNtwMZ9HACXjywMI7sQmkCpGreHiPibVmr75nuOi5KOpyVdWRHbNi63URcf
+qQgfBBckWKo3Shjf5TnUV/3XwSyRAZHiItQDwFj8d0fsjz50Q7qsNI1NOHZnjrDIbzAzWHFctPVr
+btQBULgTfmxKo0nRIBnuvMApGGWn3v7v3QqQIecaZ5JCEJhfTzC8PhxFtBDXaEAUwED653cXeuYL
+j2VbPNmaUtu1vZ5Gzz3rkQUCwJaydkxNEJY7kvqcfw+Z374jNUUeAlz+taibmSXaXvMiwzn15Cou
+08YfxGyqxRxqAQVKL9LFwag0Jl1mpdICIfkYtwb1TplvqKtMUejPUBjFd8g5CSxJkjKZqLsXF3mw
+WsXmo8RZZUc1g16p6DULmbvkzSDGm0oGObVo/CK67lWMK07q87Hj/LaZmtVC+nFNCM+HHmpxffnT
+tOmlcYF7wk5HlqX2doWjKI/pgG6BU6VtX7hI+cL5NqYuSf+4lsKMB7ObiFj86xsc3i1w4peSMKGJ
+47xVqCfWS+2QrYv6YyVZLag13cqXM7zlzced0ezvXg5KkAYmY6252TUtB7p2ZSysV4999AeU14EC
+ll2jB0nVetBX+RvnU0Z1qrB5QstocQjpYL05ac70r8NWQMetUqIJ5G+GR4of6ygnXYMgrwTJbFaa
+i0b1AgMBAAGjgYMwgYAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE
+FPd9xf3E6Jobd2Sn9R2gzL+HYJptMD4GA1UdIAQ3MDUwMwYEVR0gADArMCkGCCsGAQUFBwIBFh1o
+dHRwOi8vd3d3LmNlcnQuZm5tdC5lcy9kcGNzLzANBgkqhkiG9w0BAQsFAAOCAgEAB5BK3/MjTvDD
+nFFlm5wioooMhfNzKWtN/gHiqQxjAb8EZ6WdmF/9ARP67Jpi6Yb+tmLSbkyU+8B1RXxlDPiyN8+s
+D8+Nb/kZ94/sHvJwnvDKuO+3/3Y3dlv2bojzr2IyIpMNOmqOFGYMLVN0V2Ue1bLdI4E7pWYjJ2cJ
+j+F3qkPNZVEI7VFY/uY5+ctHhKQV8Xa7pO6kO8Rf77IzlhEYt8llvhjho6Tc+hj507wTmzl6NLrT
+Qfv6MooqtyuGC2mDOL7Nii4LcK2NJpLuHvUBKwrZ1pebbuCoGRw6IYsMHkCtA+fdZn71uSANA+iW
++YJF1DngoABd15jmfZ5nc8OaKveri6E6FO80vFIOiZiaBECEHX5FaZNXzuvO+FB8TxxuBEOb+dY7
+Ixjp6o7RTUaN8Tvkasq6+yO3m/qZASlaWFot4/nUbQ4mrcFuNLwy+AwF+mWj2zs3gyLp1txyM/1d
+8iC9djwj2ij3+RvrWWTV3F9yfiD8zYm1kGdNYno/Tq0dwzn+evQoFt9B9kiABdcPUXmsEKvU7ANm
+5mqwujGSQkBqvjrTcuFqN1W8rB2Vt2lh8kORdOag0wokRqEIr9baRRmW1FMdW4R58MD3R++Lj8UG
+rp1MYp3/RgT408m2ECVAdf4WqslKYIYvuu8wd+RU4riEmViAqhOLUTpPSPaLtrM=
+-----END CERTIFICATE-----
+
+Amazon Root CA 1
+================
+-----BEGIN CERTIFICATE-----
+MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsFADA5MQswCQYD
+VQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAxMB4XDTE1
+MDUyNjAwMDAwMFoXDTM4MDExNzAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpv
+bjEZMBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBALJ4gHHKeNXjca9HgFB0fW7Y14h29Jlo91ghYPl0hAEvrAIthtOgQ3pOsqTQNroBvo3bSMgH
+FzZM9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qwIFAGbHrQ
+gLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6VOujw5H5SNz/0egwLX0t
+dHA114gk957EWW67c4cX8jJGKLhD+rcdqsq08p8kDi1L93FcXmn/6pUCyziKrlA4b9v7LWIbxcce
+VOF34GfID5yHI9Y/QCB/IIDEgEw+OyQmjgSubJrIqg0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB
+/zAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFIQYzIU07LwMlJQuCFmcx7IQTgoIMA0GCSqGSIb3
+DQEBCwUAA4IBAQCY8jdaQZChGsV2USggNiMOruYou6r4lK5IpDB/G/wkjUu0yKGX9rbxenDIU5PM
+CCjjmCXPI6T53iHTfIUJrU6adTrCC2qJeHZERxhlbI1Bjjt/msv0tadQ1wUsN+gDS63pYaACbvXy
+8MWy7Vu33PqUXHeeE6V/Uq2V8viTO96LXFvKWlJbYK8U90vvo/ufQJVtMVT8QtPHRh8jrdkPSHCa
+2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2
+xJNDd2ZhwLnoQdeXeGADbkpyrqXRfboQnoZsG4q5WTP468SQvvG5
+-----END CERTIFICATE-----
+
+Amazon Root CA 2
+================
+-----BEGIN CERTIFICATE-----
+MIIFQTCCAymgAwIBAgITBmyf0pY1hp8KD+WGePhbJruKNzANBgkqhkiG9w0BAQwFADA5MQswCQYD
+VQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAyMB4XDTE1
+MDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpv
+bjEZMBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC
+ggIBAK2Wny2cSkxKgXlRmeyKy2tgURO8TW0G/LAIjd0ZEGrHJgw12MBvIITplLGbhQPDW9tK6Mj4
+kHbZW0/jTOgGNk3Mmqw9DJArktQGGWCsN0R5hYGCrVo34A3MnaZMUnbqQ523BNFQ9lXg1dKmSYXp
+N+nKfq5clU1Imj+uIFptiJXZNLhSGkOQsL9sBbm2eLfq0OQ6PBJTYv9K8nu+NQWpEjTj82R0Yiw9
+AElaKP4yRLuH3WUnAnE72kr3H9rN9yFVkE8P7K6C4Z9r2UXTu/Bfh+08LDmG2j/e7HJV63mjrdvd
+fLC6HM783k81ds8P+HgfajZRRidhW+mez/CiVX18JYpvL7TFz4QuK/0NURBs+18bvBt+xa47mAEx
+kv8LV/SasrlX6avvDXbR8O70zoan4G7ptGmh32n2M8ZpLpcTnqWHsFcQgTfJU7O7f/aS0ZzQGPSS
+btqDT6ZjmUyl+17vIWR6IF9sZIUVyzfpYgwLKhbcAS4y2j5L9Z469hdAlO+ekQiG+r5jqFoz7Mt0
+Q5X5bGlSNscpb/xVA1wf+5+9R+vnSUeVC06JIglJ4PVhHvG/LopyboBZ/1c6+XUyo05f7O0oYtlN
+c/LMgRdg7c3r3NunysV+Ar3yVAhU/bQtCSwXVEqY0VThUWcI0u1ufm8/0i2BWSlmy5A5lREedCf+
+3euvAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSw
+DPBMMPQFWAJI/TPlUq9LhONmUjANBgkqhkiG9w0BAQwFAAOCAgEAqqiAjw54o+Ci1M3m9Zh6O+oA
+A7CXDpO8Wqj2LIxyh6mx/H9z/WNxeKWHWc8w4Q0QshNabYL1auaAn6AFC2jkR2vHat+2/XcycuUY
++gn0oJMsXdKMdYV2ZZAMA3m3MSNjrXiDCYZohMr/+c8mmpJ5581LxedhpxfL86kSk5Nrp+gvU5LE
+YFiwzAJRGFuFjWJZY7attN6a+yb3ACfAXVU3dJnJUH/jWS5E4ywl7uxMMne0nxrpS10gxdr9HIcW
+xkPo1LsmmkVwXqkLN1PiRnsn/eBG8om3zEK2yygmbtmlyTrIQRNg91CMFa6ybRoVGld45pIq2WWQ
+gj9sAq+uEjonljYE1x2igGOpm/HlurR8FLBOybEfdF849lHqm/osohHUqS0nGkWxr7JOcQ3AWEbW
+aQbLU8uz/mtBzUF+fUwPfHJ5elnNXkoOrJupmHN5fLT0zLm4BwyydFy4x2+IoZCn9Kr5v2c69BoV
+Yh63n749sSmvZ6ES8lgQGVMDMBu4Gon2nL2XA46jCfMdiyHxtN/kHNGfZQIG6lzWE7OE76KlXIx3
+KadowGuuQNKotOrN8I1LOJwZmhsoVLiJkO/KdYE+HvJkJMcYr07/R54H9jVlpNMKVv/1F2Rs76gi
+JUmTtt8AF9pYfl3uxRuw0dFfIRDH+fO6AgonB8Xx1sfT4PsJYGw=
+-----END CERTIFICATE-----
+
+Amazon Root CA 3
+================
+-----BEGIN CERTIFICATE-----
+MIIBtjCCAVugAwIBAgITBmyf1XSXNmY/Owua2eiedgPySjAKBggqhkjOPQQDAjA5MQswCQYDVQQG
+EwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAzMB4XDTE1MDUy
+NjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZ
+MBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABCmXp8ZB
+f8ANm+gBG1bG8lKlui2yEujSLtf6ycXYqm0fc4E7O5hrOXwzpcVOho6AF2hiRVd9RFgdszflZwjr
+Zt6jQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSrttvXBp43
+rDCGB5Fwx5zEGbF4wDAKBggqhkjOPQQDAgNJADBGAiEA4IWSoxe3jfkrBqWTrBqYaGFy+uGh0Psc
+eGCmQ5nFuMQCIQCcAu/xlJyzlvnrxir4tiz+OpAUFteMYyRIHN8wfdVoOw==
+-----END CERTIFICATE-----
+
+Amazon Root CA 4
+================
+-----BEGIN CERTIFICATE-----
+MIIB8jCCAXigAwIBAgITBmyf18G7EEwpQ+Vxe3ssyBrBDjAKBggqhkjOPQQDAzA5MQswCQYDVQQG
+EwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSA0MB4XDTE1MDUy
+NjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZ
+MBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgNDB2MBAGByqGSM49AgEGBSuBBAAiA2IABNKrijdPo1MN
+/sGKe0uoe0ZLY7Bi9i0b2whxIdIA6GO9mif78DluXeo9pcmBqqNbIJhFXRbb/egQbeOc4OO9X4Ri
+83BkM6DLJC9wuoihKqB1+IGuYgbEgds5bimwHvouXKNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV
+HQ8BAf8EBAMCAYYwHQYDVR0OBBYEFNPsxzplbszh2naaVvuc84ZtV+WBMAoGCCqGSM49BAMDA2gA
+MGUCMDqLIfG9fhGt0O9Yli/W651+kI0rz2ZVwyzjKKlwCkcO8DdZEv8tmZQoTipPNU0zWgIxAOp1
+AE47xDqUEpHJWEadIRNyp4iciuRMStuW1KyLa2tJElMzrdfkviT8tQp21KW8EA==
+-----END CERTIFICATE-----
+
+LuxTrust Global Root 2
+======================
+-----BEGIN CERTIFICATE-----
+MIIFwzCCA6ugAwIBAgIUCn6m30tEntpqJIWe5rgV0xZ/u7EwDQYJKoZIhvcNAQELBQAwRjELMAkG
+A1UEBhMCTFUxFjAUBgNVBAoMDUx1eFRydXN0IFMuQS4xHzAdBgNVBAMMFkx1eFRydXN0IEdsb2Jh
+bCBSb290IDIwHhcNMTUwMzA1MTMyMTU3WhcNMzUwMzA1MTMyMTU3WjBGMQswCQYDVQQGEwJMVTEW
+MBQGA1UECgwNTHV4VHJ1c3QgUy5BLjEfMB0GA1UEAwwWTHV4VHJ1c3QgR2xvYmFsIFJvb3QgMjCC
+AiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANeFl78RmOnwYoNMPIf5U2o3C/IPPIfOb9wm
+Kb3FibrJgz337spbxm1Jc7TJRqMbNBM/wYlFV/TZsfs2ZUv7COJIcRHIbjuend+JZTemhfY7RBi2
+xjcwYkSSl2l9QjAk5A0MiWtj3sXh306pFGxT4GHO9hcvHTy95iJMHZP1EMShduxq3sVs35a0VkBC
+wGKSMKEtFZSg0iAGCW5qbeXrt77U8PEVfIvmTroTzEsnXpk8F12PgX8zPU/TPxvsXD/wPEx1bvKm
+1Z3aLQdjAsZy6ZS8TEmVT4hSyNvoaYL4zDRbIvCGp4m9SAptZoFtyMhk+wHh9OHe2Z7d21vUKpkm
+FRseTJIpgp7VkoGSQXAZ96Tlk0u8d2cx3Rz9MXANF5kM+Qw5GSoXtTBxVdUPrljhPS80m8+f9niF
+wpN6cj5mj5wWEWCPnolvZ77gR1o7DJpni89Gxq44o/KnvObWhWszJHAiS8sIm7vI+AIpHb4gDEa/
+a4ebsypmQjVGbKq6rfmYe+lQVRQxv7HaLe2ArWgk+2mr2HETMOZns4dA/Yl+8kPREd8vZS9kzl8U
+ubG/Mb2HeFpZZYiq/FkySIbWTLkpS5XTdvN3JW1CHDiDTf2jX5t/Lax5Gw5CMZdjpPuKadUiDTSQ
+MC6otOBttpSsvItO13D8xTiOZCXhTTmQzsmHhFhxAgMBAAGjgagwgaUwDwYDVR0TAQH/BAUwAwEB
+/zBCBgNVHSAEOzA5MDcGByuBKwEBAQowLDAqBggrBgEFBQcCARYeaHR0cHM6Ly9yZXBvc2l0b3J5
+Lmx1eHRydXN0Lmx1MA4GA1UdDwEB/wQEAwIBBjAfBgNVHSMEGDAWgBT/GCh2+UgFLKGu8SsbK7JT
++Et8szAdBgNVHQ4EFgQU/xgodvlIBSyhrvErGyuyU/hLfLMwDQYJKoZIhvcNAQELBQADggIBAGoZ
+FO1uecEsh9QNcH7X9njJCwROxLHOk3D+sFTAMs2ZMGQXvw/l4jP9BzZAcg4atmpZ1gDlaCDdLnIN
+H2pkMSCEfUmmWjfrRcmF9dTHF5kH5ptV5AzoqbTOjFu1EVzPig4N1qx3gf4ynCSecs5U89BvolbW
+7MM3LGVYvlcAGvI1+ut7MV3CwRI9loGIlonBWVx65n9wNOeD4rHh4bhY79SV5GCc8JaXcozrhAIu
+ZY+kt9J/Z93I055cqqmkoCUUBpvsT34tC38ddfEz2O3OuHVtPlu5mB0xDVbYQw8wkbIEa91WvpWA
+VWe+2M2D2RjuLg+GLZKecBPs3lHJQ3gCpU3I+V/EkVhGFndadKpAvAefMLmx9xIX3eP/JEAdemrR
+TxgKqpAd60Ae36EeRJIQmvKN4dFLRp7oRUKX6kWZ8+xm1QL68qZKJKrezrnK+T+Tb/mjuuqlPpmt
+/f97mfVl7vBZKGfXkJWkE4SphMHozs51k2MavDzq1WQfLSoSOcbDWjLtR5EWDrw4wVDej8oqkDQc
+7kGUnF4ZLvhFSZl0kbAEb+MEWrGrKqv+x9CWttrhSmQGbmBNvUJO/3jaJMobtNeWOWyu8Q6qp31I
+iyBMz2TWuJdGsE7RKlY6oJO9r4Ak4Ap+58rVyuiFVdw2KuGUaJPHZnJED4AhMmwlxyOAgwrr
+-----END CERTIFICATE-----
+
+TUBITAK Kamu SM SSL Kok Sertifikasi - Surum 1
+=============================================
+-----BEGIN CERTIFICATE-----
+MIIEYzCCA0ugAwIBAgIBATANBgkqhkiG9w0BAQsFADCB0jELMAkGA1UEBhMCVFIxGDAWBgNVBAcT
+D0dlYnplIC0gS29jYWVsaTFCMEAGA1UEChM5VHVya2l5ZSBCaWxpbXNlbCB2ZSBUZWtub2xvamlr
+IEFyYXN0aXJtYSBLdXJ1bXUgLSBUVUJJVEFLMS0wKwYDVQQLEyRLYW11IFNlcnRpZmlrYXN5b24g
+TWVya2V6aSAtIEthbXUgU00xNjA0BgNVBAMTLVRVQklUQUsgS2FtdSBTTSBTU0wgS29rIFNlcnRp
+ZmlrYXNpIC0gU3VydW0gMTAeFw0xMzExMjUwODI1NTVaFw00MzEwMjUwODI1NTVaMIHSMQswCQYD
+VQQGEwJUUjEYMBYGA1UEBxMPR2ViemUgLSBLb2NhZWxpMUIwQAYDVQQKEzlUdXJraXllIEJpbGlt
+c2VsIHZlIFRla25vbG9qaWsgQXJhc3Rpcm1hIEt1cnVtdSAtIFRVQklUQUsxLTArBgNVBAsTJEth
+bXUgU2VydGlmaWthc3lvbiBNZXJrZXppIC0gS2FtdSBTTTE2MDQGA1UEAxMtVFVCSVRBSyBLYW11
+IFNNIFNTTCBLb2sgU2VydGlmaWthc2kgLSBTdXJ1bSAxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
+MIIBCgKCAQEAr3UwM6q7a9OZLBI3hNmNe5eA027n/5tQlT6QlVZC1xl8JoSNkvoBHToP4mQ4t4y8
+6Ij5iySrLqP1N+RAjhgleYN1Hzv/bKjFxlb4tO2KRKOrbEz8HdDc72i9z+SqzvBV96I01INrN3wc
+wv61A+xXzry0tcXtAA9TNypN9E8Mg/uGz8v+jE69h/mniyFXnHrfA2eJLJ2XYacQuFWQfw4tJzh0
+3+f92k4S400VIgLI4OD8D62K18lUUMw7D8oWgITQUVbDjlZ/iSIzL+aFCr2lqBs23tPcLG07xxO9
+WSMs5uWk99gL7eqQQESolbuT1dCANLZGeA4fAJNG4e7p+exPFwIDAQABo0IwQDAdBgNVHQ4EFgQU
+ZT/HiobGPN08VFw1+DrtUgxHV8gwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJ
+KoZIhvcNAQELBQADggEBACo/4fEyjq7hmFxLXs9rHmoJ0iKpEsdeV31zVmSAhHqT5Am5EM2fKifh
+AHe+SMg1qIGf5LgsyX8OsNJLN13qudULXjS99HMpw+0mFZx+CFOKWI3QSyjfwbPfIPP54+M638yc
+lNhOT8NrF7f3cuitZjO1JVOr4PhMqZ398g26rrnZqsZr+ZO7rqu4lzwDGrpDxpa5RXI4s6ehlj2R
+e37AIVNMh+3yC1SVUZPVIqUNivGTDj5UDrDYyU7c8jEyVupk+eq1nRZmQnLzf9OxMUP8pI4X8W0j
+q5Rm+K37DwhuJi1/FwcJsoz7UMCflo3Ptv0AnVoUmr8CRPXBwp8iXqIPoeM=
+-----END CERTIFICATE-----
+
+GDCA TrustAUTH R5 ROOT
+======================
+-----BEGIN CERTIFICATE-----
+MIIFiDCCA3CgAwIBAgIIfQmX/vBH6nowDQYJKoZIhvcNAQELBQAwYjELMAkGA1UEBhMCQ04xMjAw
+BgNVBAoMKUdVQU5HIERPTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZIENPLixMVEQuMR8wHQYDVQQD
+DBZHRENBIFRydXN0QVVUSCBSNSBST09UMB4XDTE0MTEyNjA1MTMxNVoXDTQwMTIzMTE1NTk1OVow
+YjELMAkGA1UEBhMCQ04xMjAwBgNVBAoMKUdVQU5HIERPTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZ
+IENPLixMVEQuMR8wHQYDVQQDDBZHRENBIFRydXN0QVVUSCBSNSBST09UMIICIjANBgkqhkiG9w0B
+AQEFAAOCAg8AMIICCgKCAgEA2aMW8Mh0dHeb7zMNOwZ+Vfy1YI92hhJCfVZmPoiC7XJjDp6L3TQs
+AlFRwxn9WVSEyfFrs0yw6ehGXTjGoqcuEVe6ghWinI9tsJlKCvLriXBjTnnEt1u9ol2x8kECK62p
+OqPseQrsXzrj/e+APK00mxqriCZ7VqKChh/rNYmDf1+uKU49tm7srsHwJ5uu4/Ts765/94Y9cnrr
+pftZTqfrlYwiOXnhLQiPzLyRuEH3FMEjqcOtmkVEs7LXLM3GKeJQEK5cy4KOFxg2fZfmiJqwTTQJ
+9Cy5WmYqsBebnh52nUpmMUHfP/vFBu8btn4aRjb3ZGM74zkYI+dndRTVdVeSN72+ahsmUPI2JgaQ
+xXABZG12ZuGR224HwGGALrIuL4xwp9E7PLOR5G62xDtw8mySlwnNR30YwPO7ng/Wi64HtloPzgsM
+R6flPri9fcebNaBhlzpBdRfMK5Z3KpIhHtmVdiBnaM8Nvd/WHwlqmuLMc3GkL30SgLdTMEZeS1SZ
+D2fJpcjyIMGC7J0R38IC+xo70e0gmu9lZJIQDSri3nDxGGeCjGHeuLzRL5z7D9Ar7Rt2ueQ5Vfj4
+oR24qoAATILnsn8JuLwwoC8N9VKejveSswoAHQBUlwbgsQfZxw9cZX08bVlX5O2ljelAU58VS6Bx
+9hoh49pwBiFYFIeFd3mqgnkCAwEAAaNCMEAwHQYDVR0OBBYEFOLJQJ9NzuiaoXzPDj9lxSmIahlR
+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQDRSVfg
+p8xoWLoBDysZzY2wYUWsEe1jUGn4H3++Fo/9nesLqjJHdtJnJO29fDMylyrHBYZmDRd9FBUb1Ov9
+H5r2XpdptxolpAqzkT9fNqyL7FeoPueBihhXOYV0GkLH6VsTX4/5COmSdI31R9KrO9b7eGZONn35
+6ZLpBN79SWP8bfsUcZNnL0dKt7n/HipzcEYwv1ryL3ml4Y0M2fmyYzeMN2WFcGpcWwlyua1jPLHd
++PwyvzeG5LuOmCd+uh8W4XAR8gPfJWIyJyYYMoSf/wA6E7qaTfRPuBRwIrHKK5DOKcFw9C+df/KQ
+HtZa37dG/OaG+svgIHZ6uqbL9XzeYqWxi+7egmaKTjowHz+Ay60nugxe19CxVsp3cbK1daFQqUBD
+F8Io2c9Si1vIY9RCPqAzekYu9wogRlR+ak8x8YF+QnQ4ZXMn7sZ8uI7XpTrXmKGcjBBV09tL7ECQ
+8s1uV9JiDnxXk7Gnbc2dg7sq5+W2O3FYrf3RRbxake5TFW/TRQl1brqQXR4EzzffHqhmsYzmIGrv
+/EhOdJhCrylvLmrH+33RZjEizIYAfmaDDEL0vTSSwxrqT8p+ck0LcIymSLumoRT2+1hEmRSuqguT
+aaApJUqlyyvdimYHFngVV3Eb7PVHhPOeMTd61X8kreS8/f3MboPoDKi3QWwH3b08hpcv0g==
+-----END CERTIFICATE-----
+
+TrustCor RootCert CA-1
+======================
+-----BEGIN CERTIFICATE-----
+MIIEMDCCAxigAwIBAgIJANqb7HHzA7AZMA0GCSqGSIb3DQEBCwUAMIGkMQswCQYDVQQGEwJQQTEP
+MA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5hbWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3Ig
+U3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5UcnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3Jp
+dHkxHzAdBgNVBAMMFlRydXN0Q29yIFJvb3RDZXJ0IENBLTEwHhcNMTYwMjA0MTIzMjE2WhcNMjkx
+MjMxMTcyMzE2WjCBpDELMAkGA1UEBhMCUEExDzANBgNVBAgMBlBhbmFtYTEUMBIGA1UEBwwLUGFu
+YW1hIENpdHkxJDAiBgNVBAoMG1RydXN0Q29yIFN5c3RlbXMgUy4gZGUgUi5MLjEnMCUGA1UECwwe
+VHJ1c3RDb3IgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MR8wHQYDVQQDDBZUcnVzdENvciBSb290Q2Vy
+dCBDQS0xMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv463leLCJhJrMxnHQFgKq1mq
+jQCj/IDHUHuO1CAmujIS2CNUSSUQIpidRtLByZ5OGy4sDjjzGiVoHKZaBeYei0i/mJZ0PmnK6bV4
+pQa81QBeCQryJ3pS/C3Vseq0iWEk8xoT26nPUu0MJLq5nux+AHT6k61sKZKuUbS701e/s/OojZz0
+JEsq1pme9J7+wH5COucLlVPat2gOkEz7cD+PSiyU8ybdY2mplNgQTsVHCJCZGxdNuWxu72CVEY4h
+gLW9oHPY0LJ3xEXqWib7ZnZ2+AYfYW0PVcWDtxBWcgYHpfOxGgMFZA6dWorWhnAbJN7+KIor0Gqw
+/Hqi3LJ5DotlDwIDAQABo2MwYTAdBgNVHQ4EFgQU7mtJPHo/DeOxCbeKyKsZn3MzUOcwHwYDVR0j
+BBgwFoAU7mtJPHo/DeOxCbeKyKsZn3MzUOcwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
+AYYwDQYJKoZIhvcNAQELBQADggEBACUY1JGPE+6PHh0RU9otRCkZoB5rMZ5NDp6tPVxBb5UrJKF5
+mDo4Nvu7Zp5I/5CQ7z3UuJu0h3U/IJvOcs+hVcFNZKIZBqEHMwwLKeXx6quj7LUKdJDHfXLy11yf
+ke+Ri7fc7Waiz45mO7yfOgLgJ90WmMCV1Aqk5IGadZQ1nJBfiDcGrVmVCrDRZ9MZyonnMlo2HD6C
+qFqTvsbQZJG2z9m2GM/bftJlo6bEjhcxwft+dtvTheNYsnd6djtsL1Ac59v2Z3kf9YKVmgenFK+P
+3CghZwnS1k1aHBkcjndcw5QkPTJrS37UeJSDvjdNzl/HHk484IkzlQsPpTLWPFp5LBk=
+-----END CERTIFICATE-----
+
+TrustCor RootCert CA-2
+======================
+-----BEGIN CERTIFICATE-----
+MIIGLzCCBBegAwIBAgIIJaHfyjPLWQIwDQYJKoZIhvcNAQELBQAwgaQxCzAJBgNVBAYTAlBBMQ8w
+DQYDVQQIDAZQYW5hbWExFDASBgNVBAcMC1BhbmFtYSBDaXR5MSQwIgYDVQQKDBtUcnVzdENvciBT
+eXN0ZW1zIFMuIGRlIFIuTC4xJzAlBgNVBAsMHlRydXN0Q29yIENlcnRpZmljYXRlIEF1dGhvcml0
+eTEfMB0GA1UEAwwWVHJ1c3RDb3IgUm9vdENlcnQgQ0EtMjAeFw0xNjAyMDQxMjMyMjNaFw0zNDEy
+MzExNzI2MzlaMIGkMQswCQYDVQQGEwJQQTEPMA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5h
+bWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3IgU3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5U
+cnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxHzAdBgNVBAMMFlRydXN0Q29yIFJvb3RDZXJ0
+IENBLTIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCnIG7CKqJiJJWQdsg4foDSq8Gb
+ZQWU9MEKENUCrO2fk8eHyLAnK0IMPQo+QVqedd2NyuCb7GgypGmSaIwLgQ5WoD4a3SwlFIIvl9Nk
+RvRUqdw6VC0xK5mC8tkq1+9xALgxpL56JAfDQiDyitSSBBtlVkxs1Pu2YVpHI7TYabS3OtB0PAx1
+oYxOdqHp2yqlO/rOsP9+aij9JxzIsekp8VduZLTQwRVtDr4uDkbIXvRR/u8OYzo7cbrPb1nKDOOb
+XUm4TOJXsZiKQlecdu/vvdFoqNL0Cbt3Nb4lggjEFixEIFapRBF37120Hapeaz6LMvYHL1cEksr1
+/p3C6eizjkxLAjHZ5DxIgif3GIJ2SDpxsROhOdUuxTTCHWKF3wP+TfSvPd9cW436cOGlfifHhi5q
+jxLGhF5DUVCcGZt45vz27Ud+ez1m7xMTiF88oWP7+ayHNZ/zgp6kPwqcMWmLmaSISo5uZk3vFsQP
+eSghYA2FFn3XVDjxklb9tTNMg9zXEJ9L/cb4Qr26fHMC4P99zVvh1Kxhe1fVSntb1IVYJ12/+Ctg
+rKAmrhQhJ8Z3mjOAPF5GP/fDsaOGM8boXg25NSyqRsGFAnWAoOsk+xWq5Gd/bnc/9ASKL3x74xdh
+8N0JqSDIvgmk0H5Ew7IwSjiqqewYmgeCK9u4nBit2uBGF6zPXQIDAQABo2MwYTAdBgNVHQ4EFgQU
+2f4hQG6UnrybPZx9mCAZ5YwwYrIwHwYDVR0jBBgwFoAU2f4hQG6UnrybPZx9mCAZ5YwwYrIwDwYD
+VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQADggIBAJ5Fngw7tu/h
+Osh80QA9z+LqBrWyOrsGS2h60COXdKcs8AjYeVrXWoSK2BKaG9l9XE1wxaX5q+WjiYndAfrs3fnp
+kpfbsEZC89NiqpX+MWcUaViQCqoL7jcjx1BRtPV+nuN79+TMQjItSQzL/0kMmx40/W5ulop5A7Zv
+2wnL/V9lFDfhOPXzYRZY5LVtDQsEGz9QLX+zx3oaFoBg+Iof6Rsqxvm6ARppv9JYx1RXCI/hOWB3
+S6xZhBqI8d3LT3jX5+EzLfzuQfogsL7L9ziUwOHQhQ+77Sxzq+3+knYaZH9bDTMJBzN7Bj8RpFxw
+PIXAz+OQqIN3+tvmxYxoZxBnpVIt8MSZj3+/0WvitUfW2dCFmU2Umw9Lje4AWkcdEQOsQRivh7dv
+DDqPys/cA8GiCcjl/YBeyGBCARsaU1q7N6a3vLqE6R5sGtRk2tRD/pOLS/IseRYQ1JMLiI+h2IYU
+RpFHmygk71dSTlxCnKr3Sewn6EAes6aJInKc9Q0ztFijMDvd1GpUk74aTfOTlPf8hAs/hCBcNANE
+xdqtvArBAs8e5ZTZ845b2EzwnexhF7sUMlQMAimTHpKG9n/v55IFDlndmQguLvqcAFLTxWYp5KeX
+RKQOKIETNcX2b2TmQcTVL8w0RSXPQQCWPUouwpaYT05KnJe32x+SMsj/D1Fu1uwJ
+-----END CERTIFICATE-----
+
+TrustCor ECA-1
+==============
+-----BEGIN CERTIFICATE-----
+MIIEIDCCAwigAwIBAgIJAISCLF8cYtBAMA0GCSqGSIb3DQEBCwUAMIGcMQswCQYDVQQGEwJQQTEP
+MA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5hbWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3Ig
+U3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5UcnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3Jp
+dHkxFzAVBgNVBAMMDlRydXN0Q29yIEVDQS0xMB4XDTE2MDIwNDEyMzIzM1oXDTI5MTIzMTE3Mjgw
+N1owgZwxCzAJBgNVBAYTAlBBMQ8wDQYDVQQIDAZQYW5hbWExFDASBgNVBAcMC1BhbmFtYSBDaXR5
+MSQwIgYDVQQKDBtUcnVzdENvciBTeXN0ZW1zIFMuIGRlIFIuTC4xJzAlBgNVBAsMHlRydXN0Q29y
+IENlcnRpZmljYXRlIEF1dGhvcml0eTEXMBUGA1UEAwwOVHJ1c3RDb3IgRUNBLTEwggEiMA0GCSqG
+SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDPj+ARtZ+odnbb3w9U73NjKYKtR8aja+3+XzP4Q1HpGjOR
+MRegdMTUpwHmspI+ap3tDvl0mEDTPwOABoJA6LHip1GnHYMma6ve+heRK9jGrB6xnhkB1Zem6g23
+xFUfJ3zSCNV2HykVh0A53ThFEXXQmqc04L/NyFIduUd+Dbi7xgz2c1cWWn5DkR9VOsZtRASqnKmc
+p0yJF4OuowReUoCLHhIlERnXDH19MURB6tuvsBzvgdAsxZohmz3tQjtQJvLsznFhBmIhVE5/wZ0+
+fyCMgMsq2JdiyIMzkX2woloPV+g7zPIlstR8L+xNxqE6FXrntl019fZISjZFZtS6mFjBAgMBAAGj
+YzBhMB0GA1UdDgQWBBREnkj1zG1I1KBLf/5ZJC+Dl5mahjAfBgNVHSMEGDAWgBREnkj1zG1I1KBL
+f/5ZJC+Dl5mahjAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsF
+AAOCAQEABT41XBVwm8nHc2FvcivUwo/yQ10CzsSUuZQRg2dd4mdsdXa/uwyqNsatR5Nj3B5+1t4u
+/ukZMjgDfxT2AHMsWbEhBuH7rBiVDKP/mZb3Kyeb1STMHd3BOuCYRLDE5D53sXOpZCz2HAF8P11F
+hcCF5yWPldwX8zyfGm6wyuMdKulMY/okYWLW2n62HGz1Ah3UKt1VkOsqEUc8Ll50soIipX1TH0Xs
+J5F95yIW6MBoNtjG8U+ARDL54dHRHareqKucBK+tIA5kmE2la8BIWJZpTdwHjFGTot+fDz2LYLSC
+jaoITmJF4PkL0uDgPFveXHEnJcLmA4GLEFPjx1WitJ/X5g==
+-----END CERTIFICATE-----
+
+SSL.com Root Certification Authority RSA
+========================================
+-----BEGIN CERTIFICATE-----
+MIIF3TCCA8WgAwIBAgIIeyyb0xaAMpkwDQYJKoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVVMxDjAM
+BgNVBAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24x
+MTAvBgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBSU0EwHhcNMTYw
+MjEyMTczOTM5WhcNNDEwMjEyMTczOTM5WjB8MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMx
+EDAOBgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NM
+LmNvbSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IFJTQTCCAiIwDQYJKoZIhvcNAQEBBQAD
+ggIPADCCAgoCggIBAPkP3aMrfcvQKv7sZ4Wm5y4bunfh4/WvpOz6Sl2RxFdHaxh3a3by/ZPkPQ/C
+Fp4LZsNWlJ4Xg4XOVu/yFv0AYvUiCVToZRdOQbngT0aXqhvIuG5iXmmxX9sqAn78bMrzQdjt0Oj8
+P2FI7bADFB0QDksZ4LtO7IZl/zbzXmcCC52GVWH9ejjt/uIZALdvoVBidXQ8oPrIJZK0bnoix/ge
+oeOy3ZExqysdBP+lSgQ36YWkMyv94tZVNHwZpEpox7Ko07fKoZOI68GXvIz5HdkihCR0xwQ9aqkp
+k8zruFvh/l8lqjRYyMEjVJ0bmBHDOJx+PYZspQ9AhnwC9FwCTyjLrnGfDzrIM/4RJTXq/LrFYD3Z
+fBjVsqnTdXgDciLKOsMf7yzlLqn6niy2UUb9rwPW6mBo6oUWNmuF6R7As93EJNyAKoFBbZQ+yODJ
+gUEAnl6/f8UImKIYLEJAs/lvOCdLToD0PYFH4Ih86hzOtXVcUS4cK38acijnALXRdMbX5J+tB5O2
+UzU1/Dfkw/ZdFr4hc96SCvigY2q8lpJqPvi8ZVWb3vUNiSYE/CUapiVpy8JtynziWV+XrOvvLsi8
+1xtZPCvM8hnIk2snYxnP/Okm+Mpxm3+T/jRnhE6Z6/yzeAkzcLpmpnbtG3PrGqUNxCITIJRWCk4s
+bE6x/c+cCbqiM+2HAgMBAAGjYzBhMB0GA1UdDgQWBBTdBAkHovV6fVJTEpKV7jiAJQ2mWTAPBgNV
+HRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFN0ECQei9Xp9UlMSkpXuOIAlDaZZMA4GA1UdDwEB/wQE
+AwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAIBgRlCn7Jp0cHh5wYfGVcpNxJK1ok1iOMq8bs3AD/CUr
+dIWQPXhq9LmLpZc7tRiRux6n+UBbkflVma8eEdBcHadm47GUBwwyOabqG7B52B2ccETjit3E+ZUf
+ijhDPwGFpUenPUayvOUiaPd7nNgsPgohyC0zrL/FgZkxdMF1ccW+sfAjRfSda/wZY52jvATGGAsl
+u1OJD7OAUN5F7kR/q5R4ZJjT9ijdh9hwZXT7DrkT66cPYakylszeu+1jTBi7qUD3oFRuIIhxdRjq
+erQ0cuAjJ3dctpDqhiVAq+8zD8ufgr6iIPv2tS0a5sKFsXQP+8hlAqRSAUfdSSLBv9jra6x+3uxj
+MxW3IwiPxg+NQVrdjsW5j+VFP3jbutIbQLH+cU0/4IGiul607BXgk90IH37hVZkLId6Tngr75qNJ
+vTYw/ud3sqB1l7UtgYgXZSD32pAAn8lSzDLKNXz1PQ/YK9f1JmzJBjSWFupwWRoyeXkLtoh/D1JI
+Pb9s2KJELtFOt3JY04kTlf5Eq/jXixtunLwsoFvVagCvXzfh1foQC5ichucmj87w7G6KVwuA406y
+wKBjYZC6VWg3dGq2ktufoYYitmUnDuy2n0Jg5GfCtdpBC8TTi2EbvPofkSvXRAdeuims2cXp71NI
+WuuA8ShYIc2wBlX7Jz9TkHCpBB5XJ7k=
+-----END CERTIFICATE-----
+
+SSL.com Root Certification Authority ECC
+========================================
+-----BEGIN CERTIFICATE-----
+MIICjTCCAhSgAwIBAgIIdebfy8FoW6gwCgYIKoZIzj0EAwIwfDELMAkGA1UEBhMCVVMxDjAMBgNV
+BAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xMTAv
+BgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYwMjEy
+MTgxNDAzWhcNNDEwMjEyMTgxNDAzWjB8MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMxEDAO
+BgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NMLmNv
+bSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzB2MBAGByqGSM49AgEGBSuBBAAiA2IA
+BEVuqVDEpiM2nl8ojRfLliJkP9x6jh3MCLOicSS6jkm5BBtHllirLZXI7Z4INcgn64mMU1jrYor+
+8FsPazFSY0E7ic3s7LaNGdM0B9y7xgZ/wkWV7Mt/qCPgCemB+vNH06NjMGEwHQYDVR0OBBYEFILR
+hXMw5zUE044CkvvlpNHEIejNMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUgtGFczDnNQTT
+jgKS++Wk0cQh6M0wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2cAMGQCMG/n61kRpGDPYbCW
+e+0F+S8Tkdzt5fxQaxFGRrMcIQBiu77D5+jNB5n5DQtdcj7EqgIwH7y6C+IwJPt8bYBVCpk+gA0z
+5Wajs6O7pdWLjwkspl1+4vAHCGht0nxpbl/f5Wpl
+-----END CERTIFICATE-----
+
+SSL.com EV Root Certification Authority RSA R2
+==============================================
+-----BEGIN CERTIFICATE-----
+MIIF6zCCA9OgAwIBAgIIVrYpzTS8ePYwDQYJKoZIhvcNAQELBQAwgYIxCzAJBgNVBAYTAlVTMQ4w
+DAYDVQQIDAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9u
+MTcwNQYDVQQDDC5TU0wuY29tIEVWIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIy
+MB4XDTE3MDUzMTE4MTQzN1oXDTQyMDUzMDE4MTQzN1owgYIxCzAJBgNVBAYTAlVTMQ4wDAYDVQQI
+DAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9uMTcwNQYD
+VQQDDC5TU0wuY29tIEVWIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIyMIICIjAN
+BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAjzZlQOHWTcDXtOlG2mvqM0fNTPl9fb69LT3w23jh
+hqXZuglXaO1XPqDQCEGD5yhBJB/jchXQARr7XnAjssufOePPxU7Gkm0mxnu7s9onnQqG6YE3Bf7w
+cXHswxzpY6IXFJ3vG2fThVUCAtZJycxa4bH3bzKfydQ7iEGonL3Lq9ttewkfokxykNorCPzPPFTO
+Zw+oz12WGQvE43LrrdF9HSfvkusQv1vrO6/PgN3B0pYEW3p+pKk8OHakYo6gOV7qd89dAFmPZiw+
+B6KjBSYRaZfqhbcPlgtLyEDhULouisv3D5oi53+aNxPN8k0TayHRwMwi8qFG9kRpnMphNQcAb9Zh
+CBHqurj26bNg5U257J8UZslXWNvNh2n4ioYSA0e/ZhN2rHd9NCSFg83XqpyQGp8hLH94t2S42Oim
+9HizVcuE0jLEeK6jj2HdzghTreyI/BXkmg3mnxp3zkyPuBQVPWKchjgGAGYS5Fl2WlPAApiiECto
+RHuOec4zSnaqW4EWG7WK2NAAe15itAnWhmMOpgWVSbooi4iTsjQc2KRVbrcc0N6ZVTsj9CLg+Slm
+JuwgUHfbSguPvuUCYHBBXtSuUDkiFCbLsjtzdFVHB3mBOagwE0TlBIqulhMlQg+5U8Sb/M3kHN48
++qvWBkofZ6aYMBzdLNvcGJVXZsb/XItW9XcCAwEAAaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAfBgNV
+HSMEGDAWgBT5YLvU49U09rj1BoAlp3PbRmmonjAdBgNVHQ4EFgQU+WC71OPVNPa49QaAJadz20Zp
+qJ4wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQBWs47LCp1Jjr+kxJG7ZhcFUZh1
+++VQLHqe8RT6q9OKPv+RKY9ji9i0qVQBDb6Thi/5Sm3HXvVX+cpVHBK+Rw82xd9qt9t1wkclf7nx
+Y/hoLVUE0fKNsKTPvDxeH3jnpaAgcLAExbf3cqfeIg29MyVGjGSSJuM+LmOW2puMPfgYCdcDzH2G
+guDKBAdRUNf/ktUM79qGn5nX67evaOI5JpS6aLe/g9Pqemc9YmeuJeVy6OLk7K4S9ksrPJ/psEDz
+OFSz/bdoyNrGj1E8svuR3Bznm53htw1yj+KkxKl4+esUrMZDBcJlOSgYAsOCsp0FvmXtll9ldDz7
+CTUue5wT/RsPXcdtgTpWD8w74a8CLyKsRspGPKAcTNZEtF4uXBVmCeEmKf7GUmG6sXP/wwyc5Wxq
+lD8UykAWlYTzWamsX0xhk23RO8yilQwipmdnRC652dKKQbNmC1r7fSOl8hqw/96bg5Qu0T/fkreR
+rwU7ZcegbLHNYhLDkBvjJc40vG93drEQw/cFGsDWr3RiSBd3kmmQYRzelYB0VI8YHMPzA9C/pEN1
+hlMYegouCRw2n5H9gooiS9EOUCXdywMMF8mDAAhONU2Ki+3wApRmLER/y5UnlhetCTCstnEXbosX
+9hwJ1C07mKVx01QT2WDz9UtmT/rx7iASjbSsV7FFY6GsdqnC+w==
+-----END CERTIFICATE-----
+
+SSL.com EV Root Certification Authority ECC
+===========================================
+-----BEGIN CERTIFICATE-----
+MIIClDCCAhqgAwIBAgIILCmcWxbtBZUwCgYIKoZIzj0EAwIwfzELMAkGA1UEBhMCVVMxDjAMBgNV
+BAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xNDAy
+BgNVBAMMK1NTTC5jb20gRVYgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYw
+MjEyMTgxNTIzWhcNNDEwMjEyMTgxNTIzWjB/MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMx
+EDAOBgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjE0MDIGA1UEAwwrU1NM
+LmNvbSBFViBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzB2MBAGByqGSM49AgEGBSuB
+BAAiA2IABKoSR5CYG/vvw0AHgyBO8TCCogbR8pKGYfL2IWjKAMTH6kMAVIbc/R/fALhBYlzccBYy
+3h+Z1MzFB8gIH2EWB1E9fVwHU+M1OIzfzZ/ZLg1KthkuWnBaBu2+8KGwytAJKaNjMGEwHQYDVR0O
+BBYEFFvKXuXe0oGqzagtZFG22XKbl+ZPMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUW8pe
+5d7SgarNqC1kUbbZcpuX5k8wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2gAMGUCMQCK5kCJ
+N+vp1RPZytRrJPOwPYdGWBrssd9v+1a6cGvHOMzosYxPD/fxZ3YOg9AeUY8CMD32IygmTMZgh5Mm
+m7I1HrrW9zzRHM76JTymGoEVW/MSD2zuZYrJh6j5B+BimoxcSg==
+-----END CERTIFICATE-----
diff --git a/patches/source/curl/curl.SlackBuild b/patches/source/curl/curl.SlackBuild
new file mode 100755
index 000000000..a7cb1f6e1
--- /dev/null
+++ b/patches/source/curl/curl.SlackBuild
@@ -0,0 +1,152 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2013, 2014, 2016, 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=curl
+VERSION=${VERSION:-$(echo curl-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-curl
+
+# Uncomment to build a no-SSL version:
+#SSLOPT=--without-ssl
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $PKG
+cd $TMP
+rm -rf curl-$VERSION
+tar xvf $CWD/curl-$VERSION.tar.xz || exit 1
+cd curl-$VERSION
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --with-ca-bundle=/usr/share/curl/ca-bundle.crt \
+ --enable-static=no \
+ $SSLOPT || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# We have always installed the man3 documentation, so we'll keep doing it
+# even though these are no longer installed by default. No || exit 1, if
+# it works, it works, and if it doesn't, we tried.
+( cd docs/libcurl
+ make install-man3 DESTDIR=$PKG
+ cd opts
+ make install-man3 DESTDIR=$PKG
+)
+
+mkdir -p $PKG/usr/share/curl
+cp -a $CWD/cacert.pem.bz2 $PKG/usr/share/curl
+( cd $PKG/usr/share/curl
+ bzip2 -d cacert.pem.bz2
+ mv cacert.pem ca-bundle.crt
+ chown root:root ca-bundle.crt
+ chmod 644 ca-bundle.crt
+)
+
+# We don't ship the related perl script (yet):
+rm -f $PKG/usr/man/man1/mk-ca-bundle.1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+strip -g $PKG/usr/lib${LIBDIRSUFFIX}/libcurl.a
+
+mkdir -p $PKG/usr/doc/curl-$VERSION
+cp -a \
+ COPYING* README* UPGRADE \
+ $PKG/usr/doc/curl-$VERSION
+( cd docs
+ cp -a \
+ BUGS CONTRIBUTE FAQ FEATURES INSTALL INTERNALS MANUAL README* RESOURCES THANKS TODO examples \
+ $PKG/usr/doc/curl-$VERSION )
+# Get rid of .deps cruft:
+rm -rf $PKG/usr/doc/curl-$VERSION/examples/.deps
+
+# If there's a CHANGES file, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r CHANGES ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat CHANGES | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r CHANGES $DOCSDIR/ChangeLog
+fi
+
+# Compress and if needed symlink the man pages:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/curl-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/curl/slack-desc b/patches/source/curl/slack-desc
new file mode 100644
index 000000000..0fe5c532c
--- /dev/null
+++ b/patches/source/curl/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+curl: curl (command line URL data transfer tool)
+curl:
+curl: Curl is a command line tool for transferring data specified with URL
+curl: syntax. The command is designed to work without user interaction or
+curl: any kind of interactivity. Curl offers a busload of useful tricks
+curl: like proxy support, user authentication, ftp upload, HTTP post, SSL
+curl: (https:) connections, cookies, file transfer resume and more.
+curl:
+curl: libcurl is a library that Curl uses to do its job. It is readily
+curl: available to be used by your software, too.
+curl:
diff --git a/patches/source/dhcp/dhclient-script.PATH.diff b/patches/source/dhcp/dhclient-script.PATH.diff
new file mode 100644
index 000000000..567ed2a4f
--- /dev/null
+++ b/patches/source/dhcp/dhclient-script.PATH.diff
@@ -0,0 +1,13 @@
+--- ./client/scripts/linux.orig 2017-07-25 08:39:54.000000000 -0500
++++ ./client/scripts/linux 2017-08-03 15:31:41.067873392 -0500
+@@ -22,6 +22,10 @@
+ # 4. TIMEOUT not tested. ping has a flag I don't know, and I'm suspicious
+ # of the $1 in its args.
+
++# Set a reasonable default path for Linux:
++PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
++export PATH
++
+ # 5. Script refresh in 2017. The aliasing code was too convoluted and needs
+ # to go away. Migrated DHCPv4 script to ip command from iproute2 suite.
+ # This is based on Debian script with some tweaks. ifconfig is no longer
diff --git a/patches/source/dhcp/dhcp-remove-bind-tarball.sh b/patches/source/dhcp/dhcp-remove-bind-tarball.sh
new file mode 100755
index 000000000..5249f9679
--- /dev/null
+++ b/patches/source/dhcp/dhcp-remove-bind-tarball.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+# Copyright 2011 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=dhcp
+VERSION=${VERSION:-4.2.1-P1}
+BUILD=${BUILD:-1}
+
+# This is not yet used, but eventually we would like to be able to purge
+# the bundled BIND and use the system's instead. Maybe wishful thinking.
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+cd $TMP
+rm -rf dhcp-$VERSION
+tar xvf $CWD/dhcp-$VERSION.tar.?z* || exit 1
+cd dhcp-$VERSION || exit 1
+
+# good "bob" why? ...
+rm -rf bind/*
+
+# Generate a new .xz compressed tarball in /tmp:
+cd $TMP
+rm -f dhcp-$VERSION.tar*
+tar cf dhcp-$VERSION.tar dhcp-$VERSION
+xz -9 dhcp-$VERSION.tar
+
+echo "$TMP/dhcp-$VERSION.tar.xz created"
+
diff --git a/patches/source/dhcp/dhcp.SlackBuild b/patches/source/dhcp/dhcp.SlackBuild
new file mode 100755
index 000000000..efe22168f
--- /dev/null
+++ b/patches/source/dhcp/dhcp.SlackBuild
@@ -0,0 +1,179 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=dhcp
+# Leave this one .gz as other compressors do not help much and we can keep
+# the original upstream .asc
+VERSION=${VERSION:-$(basename $(echo $PKGNAM-*.tar.gz | cut -f 2- -d -) .tar.gz)}
+BUILD=${BUILD:-1_slack14.1}
+
+PKG_VERSION=$(echo $VERSION | tr - _)
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-dhcp
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf dhcp-$VERSION
+tar xvf $CWD/dhcp-$VERSION.tar.gz || exit 1
+cd dhcp-$VERSION || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Add PATH setting to /sbin/dhclient-script
+zcat $CWD/dhclient-script.PATH.diff.gz | patch -p1 || exit 1
+
+# Fix paths in manual pages
+sed -i \
+ -e "s,ETCDIR,/etc,g" \
+ -e "s,DBDIR,/var/state/dhcp,g" \
+ -e "s,RUNDIR,/var/run,g" \
+ client/*.{5,8} \
+ server/*.{5,8} \
+ doc/*/*.{5,8}
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --docdir=/usr/doc/dhcp-$VERSION \
+ --build=$ARCH-slackware-linux \
+ --with-srv-lease-file=/var/state/dhcp/dhcpd.leases \
+ --with-srv6-lease-file=/var/state/dhcp/dhcpd6.leases \
+ --with-cli-lease-file=/var/state/dhcp/dhclient.leases \
+ --with-cli6-lease-file=/var/state/dhcp/dhclient6.leases
+# Default pid dir is still /var/run, so no need to declare it
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# DHCP libraries need not be included, yet.
+rm -rf $PKG/usr/{include,lib${LIBDIRSUFFIX}}
+
+# We need this in /sbin
+mkdir -p $PKG/sbin
+mv $PKG/usr/sbin/dhclient $PKG/sbin
+
+# Install the dhclient-script for linux
+cat client/scripts/linux > $PKG/sbin/dhclient-script
+chmod 700 $PKG/sbin/dhclient-script
+
+# Create the initial *.leases files:
+mkdir -p $PKG/var/state/dhcp
+touch $PKG/var/state/dhcp/dhcpd.leases.new
+touch $PKG/var/state/dhcp/dhcpd6.leases.new
+touch $PKG/var/state/dhcp/dhclient.leases.new
+touch $PKG/var/state/dhcp/dhclient6.leases.new
+
+cat << EOF > $PKG/etc/dhcpd.conf.new
+# dhcpd.conf
+#
+# Configuration file for ISC dhcpd (see 'man dhcpd.conf')
+#
+EOF
+
+cat << EOF > $PKG/etc/dhclient.conf.new
+# dhclient.conf
+#
+# Configuration file for ISC dhclient (see 'man dhclient.conf')
+#
+EOF
+
+# Compress and if needed symlink the man pages:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/usr/doc/dhcp-$VERSION/examples
+cp -a \
+ LICENSE README RELNOTES \
+ $PKG/usr/doc/dhcp-$VERSION
+mv $PKG/etc/dhcpd.conf $PKG/etc/dhclient.conf \
+ $PKG/usr/doc/dhcp-$VERSION/examples
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/dhcp-$PKG_VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/dhcp/doinst.sh b/patches/source/dhcp/doinst.sh
new file mode 100644
index 000000000..a376034a5
--- /dev/null
+++ b/patches/source/dhcp/doinst.sh
@@ -0,0 +1,21 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/dhcpd.conf.new
+config etc/dhclient.conf.new
+config var/state/dhcp/dhcpd.leases.new
+config var/state/dhcp/dhcpd6.leases.new
+config var/state/dhcp/dhclient.leases.new
+config var/state/dhcp/dhclient6.leases.new
+rm -f var/state/dhcp/*.leases.new
+
diff --git a/patches/source/dhcp/slack-desc b/patches/source/dhcp/slack-desc
new file mode 100644
index 000000000..f586e4e1b
--- /dev/null
+++ b/patches/source/dhcp/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+dhcp: dhcp (DHCP server and client utilities)
+dhcp:
+dhcp: This package provides the ISC's DHCP utilities, including both a
+dhcp: server and client. The DHCP protocol allows a host to contact a
+dhcp: central server which maintains a list of IP addresses which may be
+dhcp: assigned on one or more subnets. A DHCP client may request an
+dhcp: address from this pool, and then use it temporarily for communication
+dhcp: on the network. The DHCP protocol also provides a mechanism whereby
+dhcp: a client can learn important details about the network to which it is
+dhcp: attached, such as the location of a default router or name server.
+dhcp:
diff --git a/patches/source/dhcpcd/COPYRIGHT b/patches/source/dhcpcd/COPYRIGHT
new file mode 100644
index 000000000..a75c8ce10
--- /dev/null
+++ b/patches/source/dhcpcd/COPYRIGHT
@@ -0,0 +1,26 @@
+/*
+ * dhcpcd - DHCP client daemon
+ * Copyright (c) 2006-2012 Roy Marples <roy@marples.name>
+ * All rights reserved
+
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
diff --git a/patches/source/dhcpcd/dhcpcd.SlackBuild b/patches/source/dhcpcd/dhcpcd.SlackBuild
new file mode 100755
index 000000000..9dd01a04c
--- /dev/null
+++ b/patches/source/dhcpcd/dhcpcd.SlackBuild
@@ -0,0 +1,133 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2013, 2014 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+VERSION=${VERSION:-$(echo dhcpcd-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-3_slack14.1}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-dhcpcd
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf dhcpcd-$VERSION
+tar xvf $CWD/dhcpcd-$VERSION.tar.?z* || exit 1
+cd dhcpcd-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+patch -p1 < $CWD/patches/Actually-validate-the-search-list.patch || exit 1
+patch -p1 < $CWD/patches/dhcpcd.conf-Don-t-invoke-wpa_supplicant-by-default.patch || exit 1
+patch -p1 < $CWD/patches/dhcpcd.dho_optionsoverloaded.dos.patch || exit 1
+
+# At this point, it should be safe to assume that /var will be mounted by the
+# time dhcpcd is called, as all non-root local filesystems are mounted from
+# /etc/rc.d/rc.S, and /var should not be on a network filesystem. As such,
+# we'll use the FHS layout instead of putting things in /etc/dhcpc
+
+# Yes, /lib/dhcpcd is correct, even on x86_64.
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sbindir=/sbin \
+ --sysconfdir=/etc \
+ --dbdir=/var/lib/dhcpcd \
+ --libexecdir=/lib/dhcpcd \
+ --mandir=/usr/man \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG HOOKSCRIPTS="50-ntp.conf 50-yp.conf" || exit 1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Let's not clobber the config file
+mv $PKG/etc/dhcpcd.conf $PKG/etc/dhcpcd.conf.new
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+mkdir -p $PKG/usr/doc/dhcpcd-$VERSION
+cp -a README* $PKG/usr/doc/dhcpcd-$VERSION
+zcat $CWD/COPYRIGHT.gz > $PKG/usr/doc/dhcpcd-$VERSION/COPYRIGHT
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/dhcpcd-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/dhcpcd/doinst.sh b/patches/source/dhcpcd/doinst.sh
new file mode 100644
index 000000000..a1a93b209
--- /dev/null
+++ b/patches/source/dhcpcd/doinst.sh
@@ -0,0 +1,15 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/dhcpcd.conf.new
+
diff --git a/patches/source/dhcpcd/patches/Actually-validate-the-search-list.patch b/patches/source/dhcpcd/patches/Actually-validate-the-search-list.patch
new file mode 100644
index 000000000..3d84a6d61
--- /dev/null
+++ b/patches/source/dhcpcd/patches/Actually-validate-the-search-list.patch
@@ -0,0 +1,25 @@
+From 118b94bdffca7e33a5e0d6b596eb7e51e7109e68 Mon Sep 17 00:00:00 2001
+From: Roy Marples <roy@marples.name>
+Date: Tue, 6 Aug 2013 12:34:08 +0100
+Subject: [PATCH 1/2] Actually validate the search list. Fixes #280
+
+---
+ dhcpcd-hooks/20-resolv.conf | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dhcpcd-hooks/20-resolv.conf b/dhcpcd-hooks/20-resolv.conf
+index d0dce41..05316c9 100644
+--- a/dhcpcd-hooks/20-resolv.conf
++++ b/dhcpcd-hooks/20-resolv.conf
+@@ -115,7 +115,7 @@ add_resolv_conf()
+ if [ -n "$new_domain_search" -a \
+ "$new_domain_search" != "$new_domain_name" ]
+ then
+- if valid_domainname_list; then
++ if valid_domainname_list $new_domain_search; then
+ conf="${conf}search $new_domain_search$NL"
+ else
+ syslog err "Invalid domain name in list: $new_domain_search"
+--
+1.8.3.2
+
diff --git a/patches/source/dhcpcd/patches/dhcpcd.conf-Don-t-invoke-wpa_supplicant-by-default.patch b/patches/source/dhcpcd/patches/dhcpcd.conf-Don-t-invoke-wpa_supplicant-by-default.patch
new file mode 100644
index 000000000..464d54bd9
--- /dev/null
+++ b/patches/source/dhcpcd/patches/dhcpcd.conf-Don-t-invoke-wpa_supplicant-by-default.patch
@@ -0,0 +1,26 @@
+From d968ff96e1e4354c591e49fe79b4f4ce0e553f61 Mon Sep 17 00:00:00 2001
+From: Robby Workman <rworkman@slackware.com>
+Date: Sun, 11 Aug 2013 23:12:57 -0500
+Subject: [PATCH 2/2] dhcpcd.conf: Don't invoke wpa_supplicant by default
+
+Slackware's network init script (rc.inet1) and/or
+NetworkManager itself handles this just fine.
+---
+ dhcpcd.conf | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/dhcpcd.conf b/dhcpcd.conf
+index 349c6f2..30aacca 100644
+--- a/dhcpcd.conf
++++ b/dhcpcd.conf
+@@ -30,3 +30,7 @@ require dhcp_server_identifier
+ # A hook script is provided to lookup the hostname if not set by the DHCP
+ # server, but it should not be run by default.
+ nohook lookup-hostname
++
++# We run wpa_supplicant from rc.inet1 and/or NM handles it on its own
++nohook wpa_supplicant
++
+--
+1.8.3.2
+
diff --git a/patches/source/dhcpcd/patches/dhcpcd.dho_optionsoverloaded.dos.patch b/patches/source/dhcpcd/patches/dhcpcd.dho_optionsoverloaded.dos.patch
new file mode 100644
index 000000000..77007cf90
--- /dev/null
+++ b/patches/source/dhcpcd/patches/dhcpcd.dho_optionsoverloaded.dos.patch
@@ -0,0 +1,11 @@
+--- ./dhcp.c.orig 2013-08-02 15:12:22.000000000 -0500
++++ ./dhcp.c 2014-08-01 15:34:23.681955373 -0500
+@@ -345,7 +345,7 @@
+ case DHO_OPTIONSOVERLOADED:
+ /* Ensure we only get this option once */
+ if (!overl)
+- overl = p[1];
++ overl = 0x80 | p[1];
+ break;
+ }
+ l = *p++;
diff --git a/patches/source/dhcpcd/slack-desc b/patches/source/dhcpcd/slack-desc
new file mode 100644
index 000000000..04859d7cb
--- /dev/null
+++ b/patches/source/dhcpcd/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+dhcpcd: dhcpcd (DHCP client daemon)
+dhcpcd:
+dhcpcd: The DHCP client program dhcpcd is used to connect to a network by
+dhcpcd: contacting a DHCP server. dhcpcd gets an IP address and other
+dhcpcd: information from a corresponding DHCP server, configures the network
+dhcpcd: interface automatically, and tries to renew the lease time according
+dhcpcd: to RFC2131 or RFC1541 depending on the command line option.
+dhcpcd:
+dhcpcd:
+dhcpcd:
+dhcpcd:
diff --git a/patches/source/dnsmasq/dnsmasq.SlackBuild b/patches/source/dnsmasq/dnsmasq.SlackBuild
new file mode 100755
index 000000000..a18ae168a
--- /dev/null
+++ b/patches/source/dnsmasq/dnsmasq.SlackBuild
@@ -0,0 +1,107 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2015, 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+VERSION=${VERSION:-$(echo dnsmasq-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-dnsmasq
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf dnsmasq-$VERSION
+tar xvf $CWD/dnsmasq-$VERSION.tar.xz || exit 1
+cd dnsmasq-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+zcat $CWD/dnsmasq.leasedir.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+
+make $NUMJOBS all-i18n PREFIX=/usr MANDIR=/usr/man || exit 1
+make install-i18n PREFIX=/usr DESTDIR=$PKG MANDIR=/usr/man || exit 1
+chmod 0755 $PKG/usr/sbin/dnsmasq
+
+mkdir -p $PKG/etc/dnsmasq.d
+
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+mkdir -p $PKG/var/state/dnsmasq
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/etc
+cat dnsmasq.conf.example > $PKG/etc/dnsmasq.conf.new
+mkdir -p $PKG/etc/rc.d
+zcat $CWD/rc.dnsmasq.gz > $PKG/etc/rc.d/rc.dnsmasq.new
+
+mkdir -p $PKG/usr/doc/dnsmasq-$VERSION
+cp -a \
+ COPYING FAQ doc.html setup.html \
+ $PKG/usr/doc/dnsmasq-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r CHANGELOG ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat CHANGELOG | head -n 1000 > $DOCSDIR/CHANGELOG
+ touch -r CHANGELOG $DOCSDIR/CHANGELOG
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/dnsmasq-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/dnsmasq/dnsmasq.leasedir.diff b/patches/source/dnsmasq/dnsmasq.leasedir.diff
new file mode 100644
index 000000000..9fec6b439
--- /dev/null
+++ b/patches/source/dnsmasq/dnsmasq.leasedir.diff
@@ -0,0 +1,24 @@
+diff -Nur dnsmasq-2.52.orig/dnsmasq.conf.example dnsmasq-2.52/dnsmasq.conf.example
+--- dnsmasq-2.52.orig/dnsmasq.conf.example 2009-11-25 06:55:16.000000000 -0600
++++ dnsmasq-2.52/dnsmasq.conf.example 2010-01-22 15:32:41.137807274 -0600
+@@ -415,7 +415,7 @@
+ # The DHCP server needs somewhere on disk to keep its lease database.
+ # This defaults to a sane location, but if you want to change it, use
+ # the line below.
+-#dhcp-leasefile=/var/lib/misc/dnsmasq.leases
++#dhcp-leasefile=/var/state/dnsmasq/dnsmasq.leases
+
+ # Set the DHCP server to authoritative mode. In this mode it will barge in
+ # and take over the lease for any client which broadcasts on the network,
+diff -Nur dnsmasq-2.52.orig/src/config.h dnsmasq-2.52/src/config.h
+--- dnsmasq-2.52.orig/src/config.h 2010-01-21 08:22:06.000000000 -0600
++++ dnsmasq-2.52/src/config.h 2010-01-22 15:32:41.136833058 -0600
+@@ -47,7 +47,7 @@
+ # elif defined(__sun__) || defined (__sun)
+ # define LEASEFILE "/var/cache/dnsmasq.leases"
+ # else
+-# define LEASEFILE "/var/lib/misc/dnsmasq.leases"
++# define LEASEFILE "/var/state/dnsmasq/dnsmasq.leases"
+ # endif
+ #endif
+
diff --git a/patches/source/dnsmasq/doinst.sh b/patches/source/dnsmasq/doinst.sh
new file mode 100644
index 000000000..9aadc3e55
--- /dev/null
+++ b/patches/source/dnsmasq/doinst.sh
@@ -0,0 +1,26 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname ${NEW})/$(basename ${NEW} .new)"
+ if [ -e ${OLD} ]; then
+ cp -a ${OLD} ${NEW}.incoming
+ cat ${NEW} > ${NEW}.incoming
+ mv ${NEW}.incoming ${NEW}
+ fi
+ config ${NEW}
+}
+config etc/dnsmasq.conf.new
+preserve_perms etc/rc.d/rc.dnsmasq.new
+
+# This should be mostly useless...
+rm -f etc/rc.d/rc.dnsmasq.new
diff --git a/patches/source/dnsmasq/rc.dnsmasq b/patches/source/dnsmasq/rc.dnsmasq
new file mode 100644
index 000000000..ce584cbd2
--- /dev/null
+++ b/patches/source/dnsmasq/rc.dnsmasq
@@ -0,0 +1,36 @@
+#!/bin/sh
+# Start/stop/restart dnsmasq (a small DNS/DHCP server):
+
+# Start dnsmasq:
+dnsmasq_start() {
+ if [ -x /usr/sbin/dnsmasq ]; then
+ echo "Starting dnsmasq: /usr/sbin/dnsmasq"
+ /usr/sbin/dnsmasq
+ fi
+}
+
+# Stop dnsmasq:
+dnsmasq_stop() {
+ killall dnsmasq
+}
+
+# Restart dnsmasq:
+dnsmasq_restart() {
+ dnsmasq_stop
+ sleep 1
+ dnsmasq_start
+}
+
+case "$1" in
+'start')
+ dnsmasq_start
+ ;;
+'stop')
+ dnsmasq_stop
+ ;;
+'restart')
+ dnsmasq_restart
+ ;;
+*)
+ echo "usage rc.dnsmasq: start|stop|restart"
+esac
diff --git a/patches/source/dnsmasq/slack-desc b/patches/source/dnsmasq/slack-desc
new file mode 100644
index 000000000..3db2c42e3
--- /dev/null
+++ b/patches/source/dnsmasq/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+dnsmasq: dnsmasq (small DNS and DHCP server)
+dnsmasq:
+dnsmasq: Dnsmasq is a lightweight, easy to configure DNS forwarder and DHCP
+dnsmasq: server. It is designed to provide DNS (and optionally DHCP) to a
+dnsmasq: small network, and can serve the names of local machines which are not
+dnsmasq: in the global DNS.
+dnsmasq:
+dnsmasq: Dnsmasq was written by Simon Kelley.
+dnsmasq:
+dnsmasq: Homepage: http://www.thekelleys.org.uk/dnsmasq/
+dnsmasq:
diff --git a/patches/source/emacs/doinst.sh b/patches/source/emacs/doinst.sh
new file mode 100644
index 000000000..64a3adff1
--- /dev/null
+++ b/patches/source/emacs/doinst.sh
@@ -0,0 +1,10 @@
+# Vim ships a better (IMHO) version of ctags, and we don't want
+# to overwrite it with this one. If you really want emacs' ctags
+# either copy or link it into place yourself, or remove the vim
+# packages and reinstall emacs. Besides, does anyone know/use
+# *both* emacs and vi? I'd think that would bring the universe
+# to an end. ;-)
+if [ ! -e usr/bin/ctags ]; then
+ cp -a usr/bin/ctags-emacs usr/bin/ctags
+ cp -a usr/man/man1/ctags-emacs.1.gz usr/man/man1/ctags.1.gz
+fi
diff --git a/patches/source/emacs/emacs.SlackBuild b/patches/source/emacs/emacs.SlackBuild
new file mode 100755
index 000000000..7e6717fdd
--- /dev/null
+++ b/patches/source/emacs/emacs.SlackBuild
@@ -0,0 +1,190 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 2014, 2015, 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Slackware build script for emacs-22
+
+# Written by Dušan Stefanović (stefanovic.dusan@gmail.com)
+# Modified by Robby Workman <rworkman@slackbuilds.org>
+# Modified by Patrick Volkerding <volkerdi@slackware.com>
+
+PKGNAM=emacs
+BUILD=${BUILD:-1_slack14.1}
+# Determine version number the tarball is labeled with:
+TARBALLVER=${TARBALLVER:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+# OK, now what's being used as the source directory version number... account
+# for subversions a, b, c, and d in the $TARBALLVER:
+SRCDIRVER=$(echo $TARBALLVER | tr -d a | tr -d b | tr -d c | tr -d d)
+# I guess this is the main "version"... we don't use this variable anywhere below, but
+# defining it is traditional:
+VERSION=$SRCDIRVER
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i486 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+else
+ SLKCFLAGS="-O2"
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$TARBALLVER
+tar xvf $CWD/$PKGNAM-$TARBALLVER.tar.xz || exit 1
+cd $PKGNAM-$SRCDIRVER || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --program-prefix="" \
+ --program-suffix="" \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --without-gconf \
+ --without-gsettings \
+ --with-x \
+ --with-x-toolkit=gtk2 \
+ --build=${ARCH}-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+( cd $PKG/usr/bin
+ rm emacs
+ mv emacs-${SRCDIRVER} emacs-${TARBALLVER}-with-x11
+ ln -sf emacs-${TARBALLVER}-with-x11 emacs
+)
+
+# Also add a version of the binary that is not linked to X11:
+cd $TMP
+rm -rf $PKGNAM-$TARBALLVER
+tar xvf $CWD/$PKGNAM-$TARBALLVER.tar.xz || exit 1
+cd $PKGNAM-$SRCDIRVER || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --program-prefix="" \
+ --program-suffix="" \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --without-gconf \
+ --without-gsettings \
+ --with-x=no \
+ --build=${ARCH}-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+
+# Install the non-x version:
+cat src/emacs > $PKG/usr/bin/emacs-${TARBALLVER}-no-x11
+chown root:root $PKG/usr/bin/emacs-${TARBALLVER}-no-x11
+chmod 1755 $PKG/usr/bin/emacs-${TARBALLVER}-no-x11
+
+# I don't care for broken permissions.
+chmod 755 $PKG/var/games/emacs
+chown -R root:games $PKG/var/games/emacs
+chmod 664 $PKG/var/games/emacs/*
+
+# This avoids a collision with Exuberant Ctags...
+mv $PKG/usr/bin/ctags $PKG/usr/bin/ctags-emacs
+if [ -r $PKG/usr/man/man1/ctags.1 ]; then
+ mv $PKG/usr/man/man1/ctags.1 $PKG/usr/man/man1/ctags-emacs.1
+elif [ -r $PKG/usr/man/man1/ctags.1.gz ]; then
+ mv $PKG/usr/man/man1/ctags.1.gz $PKG/usr/man/man1/ctags-emacs.1.gz
+fi
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $(find . -type l) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
+
+( cd $PKG/usr/info
+ rm -f dir
+ gzip -9 *
+)
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$TARBALLVER
+cp -a \
+ AUTHORS COPYING* INSTALL README* \
+ $PKG/usr/doc/$PKGNAM-$TARBALLVER
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$TARBALLVER)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$TARBALLVER-$ARCH-$BUILD.txz
+
diff --git a/patches/source/emacs/slack-desc b/patches/source/emacs/slack-desc
new file mode 100644
index 000000000..94ba8e13e
--- /dev/null
+++ b/patches/source/emacs/slack-desc
@@ -0,0 +1,12 @@
+ |-----handy-ruler------------------------------------------------------|
+emacs: emacs (GNU Emacs)
+emacs:
+emacs: Emacs is the extensible, customizable, self-documenting real-time
+emacs: display editor. If this seems to be a bit of a mouthful, an
+emacs: easier explanation is that Emacs is a text editor and more. At
+emacs: its core is an interpreter for Emacs Lisp, a dialect of the Lisp
+emacs: programming language with extensions to support text editing.
+emacs: This version supports X.
+emacs:
+emacs: http://www.gnu.org/software/emacs/
+emacs:
diff --git a/patches/source/expat/expat.SlackBuild b/patches/source/expat/expat.SlackBuild
new file mode 100755
index 000000000..abab1d211
--- /dev/null
+++ b/patches/source/expat/expat.SlackBuild
@@ -0,0 +1,101 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2013, 2017 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=expat
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# Choose an entropy source:
+if [ "$ENTROPY" = "" ]; then
+ #ENTROPY="-DHAVE_GETRANDOM"
+ #ENTROPY="-DHAVE_SYSCALL_GETRANDOM"
+ #ENTROPY="-DHAVE_ARC4RANDOM_BUF"
+ ENTROPY="-DXML_POOR_ENTROPY"
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686 $ENTROPY"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2 $ENTROPY"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC $ENTROPY"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2 $ENTROPY"
+ LIBDIRSUFFIX=""
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-expat
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf expat-$VERSION
+tar xvf $CWD/expat-$VERSION.tar.?z* || exit 1
+cd expat-$VERSION
+
+chown -R root:root .
+find . -perm 777 -exec chmod 755 {} \;
+find . -perm 664 -exec chmod 644 {} \;
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --disable-static \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || exit 1
+make install DESTDIR=$PKG || exit 1
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+mkdir -p $PKG/usr/doc/expat-$VERSION
+cp -a \
+ COPYING* Changes README* doc/reference.html \
+ $PKG/usr/doc/expat-$VERSION
+gzip -9 $PKG/usr/man/man?/*.?
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+makepkg -l y -c n $TMP/expat-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/expat/slack-desc b/patches/source/expat/slack-desc
new file mode 100644
index 000000000..348df3c3b
--- /dev/null
+++ b/patches/source/expat/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+expat: expat (C library for parsing XML)
+expat:
+expat: This is Expat, a C library for parsing XML, written by James Clark.
+expat: Expat is a stream-oriented XML parser used by Python, GNOME, Xft2,
+expat: and other things.
+expat:
+expat:
+expat:
+expat:
+expat:
+expat:
diff --git a/patches/source/flac/flac.SlackBuild b/patches/source/flac/flac.SlackBuild
new file mode 100755
index 000000000..f8980a503
--- /dev/null
+++ b/patches/source/flac/flac.SlackBuild
@@ -0,0 +1,124 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=flac
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-flac
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf flac-$VERSION
+tar xvf $CWD/flac-$VERSION.tar.?z* || exit 1
+cd flac-$VERSION
+zcat $CWD/flac.man.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+if [ "$ARCH" != "x86_64" ]; then
+ # We disable assembly optimizations to ensure compatibility with older
+ # hardware, but you're welcome to comment this out and give it a try.
+ # I've heard it gives a noticable speedup.
+ DISABLE_ASM_OPTIMIZATIONS=${DISABLE_ASM_OPTIMIZATIONS:-"--disable-asm-optimizations"}
+else
+ DISABLE_ASM_OPTIMIZATIONS=${DISABLE_ASM_OPTIMIZATIONS:-""}
+fi
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --disable-silent-rules \
+ $DISABLE_ASM_OPTIMIZATIONS \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Adjust docs to traditional Slackware location:
+mv $PKG/usr/share/doc $PKG/usr
+rm $PKG/usr/doc/flac-$VERSION/FLAC.tag
+mv $PKG/usr/doc/flac-$VERSION/html/* $PKG/usr/doc/flac-$VERSION
+rmdir $PKG/usr/doc/flac-$VERSION/html
+# we're not putting 3MB of API docs in the binary package...
+( cd $PKG/usr/doc/flac-$VERSION/api && rm -r * )
+cat << EOF > $PKG/usr/doc/flac-$VERSION/api/README
+Full HTML based API documentation may be found in the FLAC
+source package. It is not included in the binary package due
+to size.
+EOF
+# Add a few more docs:
+cp -a \
+ AUTHORS COPYING* README \
+ $PKG/usr/doc/flac-$VERSION
+
+# Strip files
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+gzip -9 $PKG/usr/man/man?/*.?
+
+mkdir $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/flac-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/flac/flac.man.diff b/patches/source/flac/flac.man.diff
new file mode 100644
index 000000000..2f31e9590
--- /dev/null
+++ b/patches/source/flac/flac.man.diff
@@ -0,0 +1,12 @@
+--- ./man/flac.1.orig 2007-09-14 10:08:05.000000000 -0500
++++ ./man/flac.1 2008-03-08 15:48:37.000000000 -0600
+@@ -325,7 +325,8 @@
+ .PP
+ metaflac(1).
+ .PP
+-The programs are documented fully by HTML format documentation, available in \fI/usr/share/doc/libflac-doc/html\fR on Debian GNU/Linux systems.
++The programs are documented fully by HTML format documentation, available in \fI/usr/doc/flac-*.*.*/html\fR on Slackware GNU/Linux systems.
+ .SH "AUTHOR"
+ .PP
++The flac program was developed by Josh Coalson.
+ This manual page was initially written by Matt Zimmerman <mdz@debian.org> for the Debian GNU/Linux system (but may be used by others). It has been kept up-to-date by the Xiph.org Foundation.
diff --git a/patches/source/flac/slack-desc b/patches/source/flac/slack-desc
new file mode 100644
index 000000000..9fde39d4e
--- /dev/null
+++ b/patches/source/flac/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+flac: flac (Free Lossless Audio Codec)
+flac:
+flac: FLAC stands for Free Lossless Audio Codec. Grossly oversimplified,
+flac: FLAC is similar to MP3, but lossless. "Free" means that the
+flac: specification of the stream format is in the public domain, and that
+flac: neither the FLAC format nor any of the implemented encoding/decoding
+flac: methods are covered by any patent. It also means that the sources for
+flac: libFLAC and libFLAC++ are available under the LGPL and the sources for
+flac: flac, metaflac, and the plugins are available under the GPL.
+flac:
+flac: FLAC was developed by Josh Coalson.
diff --git a/patches/source/freetype/freetype.CVE-2017-8287.diff b/patches/source/freetype/freetype.CVE-2017-8287.diff
new file mode 100644
index 000000000..4f4b67b1d
--- /dev/null
+++ b/patches/source/freetype/freetype.CVE-2017-8287.diff
@@ -0,0 +1,31 @@
+From 3774fc08b502c3e685afca098b6e8a195aded6a0 Mon Sep 17 00:00:00 2001
+From: Werner Lemberg <wl@gnu.org>
+Date: Sun, 26 Mar 2017 08:32:09 +0200
+Subject: * src/psaux/psobjs.c (t1_builder_close_contour): Add safety guard.
+
+Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=941
+
+diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
+index d18e821..0baf836 100644
+--- a/src/psaux/psobjs.c
++++ b/src/psaux/psobjs.c
+@@ -1718,6 +1718,14 @@
+ first = outline->n_contours <= 1
+ ? 0 : outline->contours[outline->n_contours - 2] + 1;
+
++ /* in malformed fonts it can happen that a contour was started */
++ /* but no points were added */
++ if ( outline->n_contours && first == outline->n_points )
++ {
++ outline->n_contours--;
++ return;
++ }
++
+ /* We must not include the last point in the path if it */
+ /* is located on the first point. */
+ if ( outline->n_points > 1 )
+--
+cgit v1.0-41-gc330
+
diff --git a/patches/source/freetype/freetype.SlackBuild b/patches/source/freetype/freetype.SlackBuild
new file mode 100755
index 000000000..b11595535
--- /dev/null
+++ b/patches/source/freetype/freetype.SlackBuild
@@ -0,0 +1,123 @@
+#!/bin/sh
+
+# Copyright 2005-2012 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=freetype
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | cut -d - -f 2 | rev | cut -f 3- -d . | rev)}
+BUILD=${BUILD:-2_slack14.1}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-freetype
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf freetype-$VERSION
+tar xvf $CWD/freetype-$VERSION.tar.xz || exit 1
+cd freetype-$VERSION
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# This breaks far too many things. Freetype2 developers will have to get their
+# punishment on someone else's distribution.
+zcat $CWD/freetype.illadvisederror.diff.gz | patch -p1 --verbose || exit 1
+
+# The line below enables code patented by Microsoft, so don't uncomment it
+# unless you have a license to use the code and take all legal responsibility
+# for doing so.
+# Please see this web site for more details:
+# http://www.freetype.org/patents.html
+#zcat $CWD/freetype.subpixel.rendering.diff.gz | patch -p1 --verbose || exit 1
+
+# Security fix:
+zcat $CWD/freetype.CVE-2017-8287.diff.gz | patch -p1 --verbose || exit 1
+
+chown -R root:root .
+CFLAGS="$SLKCFLAGS" make setup CFG="--prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} --build=$ARCH-slackware-linux"
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG
+
+# This shouldn't be needed (apps should pick up -I/usr/include/freetype2 from
+# `freetype-config --cflags` while compiling), but it's so often reported as
+# a bug that I'll give in to the point. Now that Freetype1 is pretty much gone
+# having this link shouldn't hurt anything. Try not to rely on it, though.
+mkdir -p $PKG/usr/include
+( cd $PKG/usr/include
+ rm -rf freetype
+ ln -sf freetype2 freetype
+)
+
+# Can't imagine a lot of use for this:
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.a
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mv $PKG/usr/share/man $PKG/usr/man
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+
+mkdir -p $PKG/usr/doc/freetype-$VERSION
+cp -a \
+ docs \
+ README \
+ $PKG/usr/doc/freetype-$VERSION
+# too much
+rm -rf $PKG/usr/doc/freetype-$VERSION/docs/reference
+
+mkdir $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/freetype-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/freetype/freetype.illadvisederror.diff b/patches/source/freetype/freetype.illadvisederror.diff
new file mode 100644
index 000000000..b0a33694a
--- /dev/null
+++ b/patches/source/freetype/freetype.illadvisederror.diff
@@ -0,0 +1,31 @@
+diff -Nur freetype-2.5.3.orig/include/freetype.h freetype-2.5.3/include/freetype.h
+--- freetype-2.5.3.orig/include/freetype.h 2014-03-06 12:10:31.661681917 -0600
++++ freetype-2.5.3/include/freetype.h 2014-05-12 01:41:42.002526416 -0500
+@@ -20,13 +20,20 @@
+ #define __FREETYPE_H__
+
+
+-#ifndef FT_FREETYPE_H
+-#error "`ft2build.h' hasn't been included yet!"
+-#error "Please always use macros to include FreeType header files."
+-#error "Example:"
+-#error " #include <ft2build.h>"
+-#error " #include FT_FREETYPE_H"
+-#endif
++/***************************************************************************/
++/* */
++/* If you think breaking almost 100% of all source that links with */
++/* freetype (anything using a configure file for sure) is a good idea, */
++/* then feel free to uncomment this block. */
++/* */
++/* #ifndef FT_FREETYPE_H */
++/* #error "`ft2build.h' hasn't been included yet!" */
++/* #error "Please always use macros to include FreeType header files." */
++/* #error "Example:" */
++/* #error " #include <ft2build.h>" */
++/* #error " #include FT_FREETYPE_H" */
++/* #endif */
++/***************************************************************************/
+
+
+ #include <ft2build.h>
diff --git a/patches/source/freetype/freetype.subpixel.rendering.diff b/patches/source/freetype/freetype.subpixel.rendering.diff
new file mode 100644
index 000000000..ab3d479e4
--- /dev/null
+++ b/patches/source/freetype/freetype.subpixel.rendering.diff
@@ -0,0 +1,11 @@
+--- ./include/config/ftoption.h.orig 2014-03-01 05:27:34.842960857 -0600
++++ ./include/config/ftoption.h 2014-08-27 13:43:07.351974078 -0500
+@@ -92,7 +92,7 @@
+ /* This is done to allow FreeType clients to run unmodified, forcing */
+ /* them to display normal gray-level anti-aliased glyphs. */
+ /* */
+-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
++#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+
+
+ /*************************************************************************/
diff --git a/patches/source/freetype/slack-desc b/patches/source/freetype/slack-desc
new file mode 100644
index 000000000..0d179401f
--- /dev/null
+++ b/patches/source/freetype/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+freetype: freetype (A Free, High-Quality, and Portable Font Engine)
+freetype:
+freetype: The FreeType engine is a free and portable TrueType font rendering
+freetype: engine. It has been developed to provide TrueType support to a
+freetype: great variety of platforms and environments.
+freetype:
+freetype:
+freetype:
+freetype:
+freetype:
+freetype:
diff --git a/patches/source/gdk-pixbuf2/doinst.sh b/patches/source/gdk-pixbuf2/doinst.sh
new file mode 100644
index 000000000..57c9b7f0d
--- /dev/null
+++ b/patches/source/gdk-pixbuf2/doinst.sh
@@ -0,0 +1 @@
+chroot . /usr/bin/update-gdk-pixbuf-loaders 1> /dev/null 2> /dev/null
diff --git a/patches/source/gdk-pixbuf2/gdk-pixbuf.CVE-2015-4491.diff b/patches/source/gdk-pixbuf2/gdk-pixbuf.CVE-2015-4491.diff
new file mode 100644
index 000000000..8d1b680e5
--- /dev/null
+++ b/patches/source/gdk-pixbuf2/gdk-pixbuf.CVE-2015-4491.diff
@@ -0,0 +1,64 @@
+@@ -, +, @@
+ gdk-pixbuf/pixops/pixops.c | 22 +++++++++++++++++-----
+ 1 file changed, 17 insertions(+), 5 deletions(-)
+--- a/gdk-pixbuf/pixops/pixops.c
++++ a/gdk-pixbuf/pixops/pixops.c
+@@ -1272,7 +1272,16 @@ make_filter_table (PixopsFilter *filter)
+ int i_offset, j_offset;
+ int n_x = filter->x.n;
+ int n_y = filter->y.n;
+- int *weights = g_new (int, SUBSAMPLE * SUBSAMPLE * n_x * n_y);
++ gsize n_weights;
++ int *weights;
++
++ n_weights = SUBSAMPLE * SUBSAMPLE * n_x * n_y;
++ if (n_weights / (SUBSAMPLE * SUBSAMPLE) != n_x * n_y)
++ return NULL; /* overflow, bail */
++
++ weights = g_new (int, n_weights);
++ if (!weights)
++ return NULL; /* overflow, bail */
+
+ for (i_offset=0; i_offset < SUBSAMPLE; i_offset++)
+ for (j_offset=0; j_offset < SUBSAMPLE; j_offset++)
+@@ -1347,8 +1356,11 @@ pixops_process (guchar *dest_buf,
+ if (x_step == 0 || y_step == 0)
+ return; /* overflow, bail out */
+
+- line_bufs = g_new (guchar *, filter->y.n);
+ filter_weights = make_filter_table (filter);
++ if (!filter_weights)
++ return; /* overflow, bail out */
++
++ line_bufs = g_new (guchar *, filter->y.n);
+
+ check_shift = check_size ? get_check_shift (check_size) : 0;
+
+@@ -1468,7 +1480,7 @@ tile_make_weights (PixopsFilterDimension *dim,
+ double scale)
+ {
+ int n = ceil (1 / scale + 1);
+- double *pixel_weights = g_new (double, SUBSAMPLE * n);
++ double *pixel_weights = g_malloc_n (sizeof (double) * SUBSAMPLE, n);
+ int offset;
+ int i;
+
+@@ -1526,7 +1538,7 @@ bilinear_magnify_make_weights (PixopsFilterDimension *dim,
+ }
+
+ dim->n = n;
+- dim->weights = g_new (double, SUBSAMPLE * n);
++ dim->weights = g_malloc_n (sizeof (double) * SUBSAMPLE, n);
+
+ pixel_weights = dim->weights;
+
+@@ -1617,7 +1629,7 @@ bilinear_box_make_weights (PixopsFilterDimension *dim,
+ double scale)
+ {
+ int n = ceil (1/scale + 3.0);
+- double *pixel_weights = g_new (double, SUBSAMPLE * n);
++ double *pixel_weights = g_malloc_n (sizeof (double) * SUBSAMPLE, n);
+ double w;
+ int offset, i;
+
+
diff --git a/patches/source/gdk-pixbuf2/gdk-pixbuf.pnglz.diff b/patches/source/gdk-pixbuf2/gdk-pixbuf.pnglz.diff
new file mode 100644
index 000000000..b8ca9928f
--- /dev/null
+++ b/patches/source/gdk-pixbuf2/gdk-pixbuf.pnglz.diff
@@ -0,0 +1,12 @@
+diff -Nur gdk-pixbuf-2.22.0.orig/gdk-pixbuf/Makefile.in gdk-pixbuf-2.22.0/gdk-pixbuf/Makefile.in
+--- gdk-pixbuf-2.22.0.orig/gdk-pixbuf/Makefile.in 2010-09-21 13:28:57.000000000 -0500
++++ gdk-pixbuf-2.22.0/gdk-pixbuf/Makefile.in 2010-10-09 10:24:16.917235308 -0500
+@@ -795,7 +795,7 @@
+ LIBJASPER = @LIBJASPER@
+ LIBJPEG = @LIBJPEG@
+ LIBOBJS = @LIBOBJS@
+-LIBPNG = @LIBPNG@
++LIBPNG = @LIBPNG@ -lz
+ LIBS = @LIBS@
+ LIBTIFF = @LIBTIFF@
+ LIBTOOL = @LIBTOOL@
diff --git a/patches/source/gdk-pixbuf2/gdk-pixbuf2.SlackBuild b/patches/source/gdk-pixbuf2/gdk-pixbuf2.SlackBuild
new file mode 100755
index 000000000..16de2f6a2
--- /dev/null
+++ b/patches/source/gdk-pixbuf2/gdk-pixbuf2.SlackBuild
@@ -0,0 +1,153 @@
+#!/bin/sh
+
+# Copyright 2010, 2011 Robby Workman, Northport, Alabama, USA
+# Copyright 2010, 2011 Patrick Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=gdk-pixbuf
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-2_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
+cd $PKGNAM-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# There's been this long standing debate about PNG and -lz
+# and this patch is the workaround. ;-)
+zcat $CWD/gdk-pixbuf.pnglz.diff.gz | patch -p1 || exit 1
+
+zcat $CWD/gdk-pixbuf.CVE-2015-4491.diff.gz | patch -p1 || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --enable-introspection \
+ --with-x11 \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# We need to have separate 32-bit and 64-bit binaries
+# for places where we have two copies of the GTK+ package installed.
+# (we might have x86_64 and i486 packages on the same system, for example.)
+host="$ARCH-slackware-linux"
+case "$host" in
+ s390x*|x86_64*)
+ mv $PKG/usr/bin/gdk-pixbuf-query-loaders{,-64}
+ ( cd $PKG/usr/bin
+ ln -sf gdk-pixbuf-query-loaders-64 gdk-pixbuf-query-loaders
+ )
+ ;;
+ *)
+ mv $PKG/usr/bin/gdk-pixbuf-query-loaders{,-32}
+ ( cd $PKG/usr/bin
+ ln -sf gdk-pixbuf-query-loaders-32 gdk-pixbuf-query-loaders
+ )
+ ;;
+esac
+
+# Install wrappers for the binaries:
+cp $CWD/update-gdk-pixbuf-loaders $PKG/usr/bin/update-gdk-pixbuf-loaders
+chmod 0755 $PKG/usr/bin/update-gdk-pixbuf-loaders
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING* INSTALL NEWS README* \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/${PKGNAM}2-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/gdk-pixbuf2/slack-desc b/patches/source/gdk-pixbuf2/slack-desc
new file mode 100644
index 000000000..2fed0a6af
--- /dev/null
+++ b/patches/source/gdk-pixbuf2/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+gdk-pixbuf2: gdk-pixbuf2 (image library used by GTK+ v2)
+gdk-pixbuf2:
+gdk-pixbuf2: The gdk-pixbuf library provides a number of features:
+gdk-pixbuf2: - GdkPixbuf structure for representing images.
+gdk-pixbuf2: - Image loading facilities, both synchronous and progressive.
+gdk-pixbuf2: - Rendering of a GdkPixbuf into various formats:
+gdk-pixbuf2: drawables (windows, pixmaps), GdkRGB buffers.
+gdk-pixbuf2: - Fast scaling and compositing of pixbufs.
+gdk-pixbuf2: - Simple animation loading (ie. animated gifs).
+gdk-pixbuf2:
+gdk-pixbuf2:
diff --git a/patches/source/gdk-pixbuf2/update-gdk-pixbuf-loaders b/patches/source/gdk-pixbuf2/update-gdk-pixbuf-loaders
new file mode 100644
index 000000000..5848db838
--- /dev/null
+++ b/patches/source/gdk-pixbuf2/update-gdk-pixbuf-loaders
@@ -0,0 +1,60 @@
+#! /bin/sh
+# Updates $(libdir)/gdk-pixbuf-2.0/2.10.0/loaders
+
+umask 022
+
+# Get the machine type from uname:
+host=$(uname -m)-slackware-linux
+
+# Fix $host for arm arch:
+case "$host" in
+ arm*) host=arm-slackware-linux-gnueabi ;;
+esac
+
+case "$host" in
+ s390x*|x86_64*)
+ if [ -x /usr/bin/gdk-pixbuf-query-loaders-64 ]; then
+ if [ "$1" = "--verbose" ]; then
+ echo "Updating gdk-pixbuf.loaders for ${host}:"
+ echo " /usr/bin/gdk-pixbuf-query-loaders-64 --update-cache"
+ fi
+ /usr/bin/gdk-pixbuf-query-loaders-64 --update-cache
+ # Check for x86_64 multilib:
+ if ls -d /etc/gtk-2.0/i?86* 1> /dev/null 2> /dev/null ; then
+ for d in $(ls -d /etc/pango/i?86*); do
+ mlhost=$(basename $d)
+ break
+ done
+ if [ -x /usr/bin/gdk-pixbuf-query-loaders-32 ]; then
+ if [ "$1" = "--verbose" ]; then
+ echo "Updating gdk-pixbuf.loaders for ${mlhost}:"
+ echo " /usr/bin/gdk-pixbuf-query-loaders-32 --update-cache"
+ fi
+ /usr/bin/gdk-pixbuf-query-loaders-32 --update-cache
+ fi
+ fi
+ else
+ if [ "$1" = "--verbose" ]; then
+ echo "Updating gdk-pixbuf.loaders for ${host}:"
+ echo " /usr/bin/gdk-pixbuf-query-loaders --update-cache"
+ fi
+ /usr/bin/gdk-pixbuf-query-loaders --update-cache
+ fi
+ ;;
+ *)
+ if [ -x /usr/bin/gdk-pixbuf-query-loaders-32 ]; then
+ if [ "$1" = "--verbose" ]; then
+ echo "Updating gdk-pixbuf.loaders for ${host}:"
+ echo " /usr/bin/gdk-pixbuf-query-loaders-32 --update-cache"
+ fi
+ /usr/bin/gdk-pixbuf-query-loaders-32 --update-cache
+ else
+ if [ "$1" = "--verbose" ]; then
+ echo "Updating gdk-pixbuf.loaders for ${host}:"
+ echo " /usr/bin/gdk-pixbuf-query-loaders --update-cache"
+ fi
+ /usr/bin/gdk-pixbuf-query-loaders --update-cache
+ fi
+ ;;
+esac
+
diff --git a/patches/source/gegl/0001-matting-levin-Fix-the-build-with-recent-suitesparse-.patch b/patches/source/gegl/0001-matting-levin-Fix-the-build-with-recent-suitesparse-.patch
new file mode 100644
index 000000000..53d7328e8
--- /dev/null
+++ b/patches/source/gegl/0001-matting-levin-Fix-the-build-with-recent-suitesparse-.patch
@@ -0,0 +1,68 @@
+From 012b0b019ede3cfa7df20bf60c7915a771ecff78 Mon Sep 17 00:00:00 2001
+From: Kalev Lember <kalevlember@gmail.com>
+Date: Thu, 4 Dec 2014 11:22:04 +0100
+Subject: [PATCH] matting-levin: Fix the build with recent suitesparse versions
+
+Stop using the UF_long define that was deprecated previously and has
+completely disappeared in suitesparse 4.3.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=741105
+---
+ operations/external/matting-levin.c | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/operations/external/matting-levin.c b/operations/external/matting-levin.c
+index 63e85d1..cf84699 100644
+--- a/operations/external/matting-levin.c
++++ b/operations/external/matting-levin.c
+@@ -850,8 +850,8 @@ matting_sparse_new (guint cols, guint rows, guint elems)
+ sparse_t *s = g_new (sparse_t, 1);
+ s->columns = cols;
+ s->rows = rows;
+- s->col_idx = g_new (UF_long, cols + 1);
+- s->row_idx = g_new (UF_long, elems);
++ s->col_idx = g_new (SuiteSparse_long, cols + 1);
++ s->row_idx = g_new (SuiteSparse_long, elems);
+ s->values = g_new0 (gdouble, elems);
+
+ return s;
+@@ -964,8 +964,8 @@ matting_get_laplacian (const gdouble *restrict image,
+ image_elems = roi->width * roi->height,
+ i, j, k, x, y,
+ status;
+- UF_long *trip_col,
+- *trip_row;
++ SuiteSparse_long *trip_col,
++ *trip_row;
+ glong trip_nz = 0,
+ trip_cursor = 0,
+ trip_masked = 0;
+@@ -995,8 +995,8 @@ matting_get_laplacian (const gdouble *restrict image,
+ trip_nz = trip_masked * window_elems * window_elems;
+ trip_nz += image_elems; // Sparse diagonal and row summing at conclusion
+
+- trip_col = g_new (UF_long, trip_nz);
+- trip_row = g_new (UF_long, trip_nz);
++ trip_col = g_new (SuiteSparse_long, trip_nz);
++ trip_row = g_new (SuiteSparse_long, trip_nz);
+ trip_val = g_new0 (gdouble, trip_nz);
+
+ /* Compute the contribution of each pixel in the image to the laplacian */
+@@ -1082,10 +1082,10 @@ matting_get_laplacian (const gdouble *restrict image,
+ for (y = 0; y < window_elems; ++y)
+ for (x = 0; x < window_elems; ++x)
+ {
+- UF_long yx = y % diameter,
+- yy = y / diameter,
+- xx = x % diameter,
+- xy = x / diameter;
++ SuiteSparse_long yx = y % diameter,
++ yy = y / diameter,
++ xx = x % diameter,
++ xy = x / diameter;
+
+ g_return_val_if_fail (trip_cursor < trip_nz, FALSE);
+ trip_col[trip_cursor] = (i - radius + yx) + (j - radius + yy) * roi->width,
+--
+2.1.0
+
diff --git a/patches/source/gegl/gegl-0.2.0-CVE-2012-4433.patch b/patches/source/gegl/gegl-0.2.0-CVE-2012-4433.patch
new file mode 100644
index 000000000..965c6fc20
--- /dev/null
+++ b/patches/source/gegl/gegl-0.2.0-CVE-2012-4433.patch
@@ -0,0 +1,159 @@
+From ffa77a246652c7e706d690682fe659f50fbe5656 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Mon, 1 Jul 2013 12:03:51 +0200
+Subject: [PATCH] patch: CVE-2012-4433
+
+Squashed commit of the following:
+
+commit 2a9071e2dc4cfe1aaa7a726805985281936f9874
+Author: Nils Philippsen <nils@redhat.com>
+Date: Tue Oct 16 16:57:37 2012 +0200
+
+ ppm-load: bring comment in line with reality
+
+ (cherry picked from commit 6975a9cfeaf0698b42ac81b1c2f00d13c8755453)
+
+commit 8bb88ebf78e54837322d3be74688f98800e9f33a
+Author: Nils Philippsen <nils@redhat.com>
+Date: Tue Oct 16 16:56:40 2012 +0200
+
+ ppm-load: CVE-2012-4433: add plausibility checks for header fields
+
+ Refuse values that are non-decimal, negative or overflow the target
+ type.
+
+ (cherry picked from commit 4757cdf73d3675478d645a3ec8250ba02168a230)
+
+commit 2b099886969bf055a8635d06a4d89f20fed1ee42
+Author: Nils Philippsen <nils@redhat.com>
+Date: Tue Oct 16 16:58:27 2012 +0200
+
+ ppm-load: CVE-2012-4433: don't overflow memory allocation
+
+ Carefully selected width/height values could cause the size of a later
+ allocation to overflow, resulting in a buffer much too small to store
+ the data which would then written beyond its end.
+
+ (cherry picked from commit 1e92e5235ded0415d555aa86066b8e4041ee5a53)
+---
+ operations/external/ppm-load.c | 64 +++++++++++++++++++++++++++++++++++-------
+ 1 file changed, 54 insertions(+), 10 deletions(-)
+
+diff --git a/operations/external/ppm-load.c b/operations/external/ppm-load.c
+index efe6d56..e22521c 100644
+--- a/operations/external/ppm-load.c
++++ b/operations/external/ppm-load.c
+@@ -36,6 +36,7 @@ gegl_chant_file_path (path, _("File"), "", _("Path of file to load."))
+ #include "gegl-chant.h"
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <errno.h>
+
+ typedef enum {
+ PIXMAP_ASCII = 51,
+@@ -44,8 +45,8 @@ typedef enum {
+
+ typedef struct {
+ map_type type;
+- gint width;
+- gint height;
++ glong width;
++ glong height;
+ gsize numsamples; /* width * height * channels */
+ gsize bpc; /* bytes per channel */
+ guchar *data;
+@@ -61,7 +62,7 @@ ppm_load_read_header(FILE *fp,
+ gchar header[MAX_CHARS_IN_ROW];
+ gint maxval;
+
+- /* Check the PPM file Type P2 or P5 */
++ /* Check the PPM file Type P3 or P6 */
+ fgets (header,MAX_CHARS_IN_ROW,fp);
+
+ if (header[0] != ASCII_P ||
+@@ -82,12 +83,33 @@ ppm_load_read_header(FILE *fp,
+ }
+
+ /* Get Width and Height */
+- img->width = strtol (header,&ptr,0);
+- img->height = atoi (ptr);
+- img->numsamples = img->width * img->height * CHANNEL_COUNT;
++ errno = 0;
++ img->width = strtol (header,&ptr,10);
++ if (errno)
++ {
++ g_warning ("Error reading width: %s", strerror(errno));
++ return FALSE;
++ }
++ else if (img->width < 0)
++ {
++ g_warning ("Error: width is negative");
++ return FALSE;
++ }
++
++ img->height = strtol (ptr,&ptr,10);
++ if (errno)
++ {
++ g_warning ("Error reading height: %s", strerror(errno));
++ return FALSE;
++ }
++ else if (img->width < 0)
++ {
++ g_warning ("Error: height is negative");
++ return FALSE;
++ }
+
+ fgets (header,MAX_CHARS_IN_ROW,fp);
+- maxval = strtol (header,&ptr,0);
++ maxval = strtol (header,&ptr,10);
+
+ if ((maxval != 255) && (maxval != 65535))
+ {
+@@ -109,6 +131,16 @@ ppm_load_read_header(FILE *fp,
+ g_warning ("%s: Programmer stupidity error", G_STRLOC);
+ }
+
++ /* Later on, img->numsamples is multiplied with img->bpc to allocate
++ * memory. Ensure it doesn't overflow. */
++ if (!img->width || !img->height ||
++ G_MAXSIZE / img->width / img->height / CHANNEL_COUNT < img->bpc)
++ {
++ g_warning ("Illegal width/height: %ld/%ld", img->width, img->height);
++ return FALSE;
++ }
++ img->numsamples = img->width * img->height * CHANNEL_COUNT;
++
+ return TRUE;
+ }
+
+@@ -229,12 +261,24 @@ process (GeglOperation *operation,
+ if (!ppm_load_read_header (fp, &img))
+ goto out;
+
+- rect.height = img.height;
+- rect.width = img.width;
+-
+ /* Allocating Array Size */
++
++ /* Should use g_try_malloc(), but this causes crashes elsewhere because the
++ * error signalled by returning FALSE isn't properly acted upon. Therefore
++ * g_malloc() is used here which aborts if the requested memory size can't be
++ * allocated causing a controlled crash. */
+ img.data = (guchar*) g_malloc (img.numsamples * img.bpc);
+
++ /* No-op without g_try_malloc(), see above. */
++ if (! img.data)
++ {
++ g_warning ("Couldn't allocate %" G_GSIZE_FORMAT " bytes, giving up.", ((gsize)img.numsamples * img.bpc));
++ goto out;
++ }
++
++ rect.height = img.height;
++ rect.width = img.width;
++
+ switch (img.bpc)
+ {
+ case 1:
+--
+1.8.3.1
+
diff --git a/patches/source/gegl/gegl-0.2.0-libopenraw.patch b/patches/source/gegl/gegl-0.2.0-libopenraw.patch
new file mode 100644
index 000000000..c5738d6ce
--- /dev/null
+++ b/patches/source/gegl/gegl-0.2.0-libopenraw.patch
@@ -0,0 +1,71 @@
+diff -up gegl-0.2.0/configure.ac.libopenraw gegl-0.2.0/configure.ac
+--- gegl-0.2.0/configure.ac.libopenraw 2016-12-03 08:11:31.968387802 +0100
++++ gegl-0.2.0/configure.ac 2016-12-03 08:12:19.398987931 +0100
+@@ -790,7 +790,7 @@ AC_ARG_WITH(libopenraw, [ --without-lib
+
+ have_libopenraw="no"
+ if test "x$with_libopenraw" != "xno"; then
+- PKG_CHECK_MODULES(OPENRAW, libopenraw-1.0 >= openraw_required_version,
++ PKG_CHECK_MODULES(OPENRAW, libopenraw-0.1 >= openraw_required_version,
+ have_libopenraw="yes",
+ have_libopenraw="no (openraw library not found)")
+ fi
+diff -up gegl-0.2.0/configure.libopenraw gegl-0.2.0/configure
+--- gegl-0.2.0/configure.libopenraw 2016-12-03 08:11:33.954412931 +0100
++++ gegl-0.2.0/configure 2016-12-03 08:12:15.506938686 +0100
+@@ -20760,12 +20760,12 @@ if test -n "$OPENRAW_CFLAGS"; then
+ pkg_cv_OPENRAW_CFLAGS="$OPENRAW_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libopenraw-1.0 >= 0.0.5\""; } >&5
+- ($PKG_CONFIG --exists --print-errors "libopenraw-1.0 >= 0.0.5") 2>&5
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libopenraw-0.1 >= 0.0.5\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "libopenraw-0.1 >= 0.0.5") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+- pkg_cv_OPENRAW_CFLAGS=`$PKG_CONFIG --cflags "libopenraw-1.0 >= 0.0.5" 2>/dev/null`
++ pkg_cv_OPENRAW_CFLAGS=`$PKG_CONFIG --cflags "libopenraw-0.1 >= 0.0.5" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+ else
+ pkg_failed=yes
+@@ -20777,12 +20777,12 @@ if test -n "$OPENRAW_LIBS"; then
+ pkg_cv_OPENRAW_LIBS="$OPENRAW_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libopenraw-1.0 >= 0.0.5\""; } >&5
+- ($PKG_CONFIG --exists --print-errors "libopenraw-1.0 >= 0.0.5") 2>&5
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libopenraw-0.1 >= 0.0.5\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "libopenraw-0.1 >= 0.0.5") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+- pkg_cv_OPENRAW_LIBS=`$PKG_CONFIG --libs "libopenraw-1.0 >= 0.0.5" 2>/dev/null`
++ pkg_cv_OPENRAW_LIBS=`$PKG_CONFIG --libs "libopenraw-0.1 >= 0.0.5" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+ else
+ pkg_failed=yes
+@@ -20803,9 +20803,9 @@ else
+ _pkg_short_errors_supported=no
+ fi
+ if test $_pkg_short_errors_supported = yes; then
+- OPENRAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libopenraw-1.0 >= 0.0.5" 2>&1`
++ OPENRAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libopenraw-0.1 >= 0.0.5" 2>&1`
+ else
+- OPENRAW_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libopenraw-1.0 >= 0.0.5" 2>&1`
++ OPENRAW_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libopenraw-0.1 >= 0.0.5" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$OPENRAW_PKG_ERRORS" >&5
+diff -up gegl-0.2.0/operations/external/openraw.c.libopenraw gegl-0.2.0/operations/external/openraw.c
+--- gegl-0.2.0/operations/external/openraw.c.libopenraw 2016-12-03 08:28:14.284333843 +0100
++++ gegl-0.2.0/operations/external/openraw.c 2016-12-03 08:29:01.495751180 +0100
+@@ -116,7 +116,7 @@ load_buffer (GeglOperation *operation)
+ goto clean_file;
+ }
+
+- if(or_rawdata_format (rawdata) != OR_DATA_TYPE_CFA)
++ if(or_rawdata_format (rawdata) != OR_DATA_TYPE_RAW)
+ {
+ goto clean_file;
+ }
diff --git a/patches/source/gegl/gegl-0.2.0-linker-flags.patch b/patches/source/gegl/gegl-0.2.0-linker-flags.patch
new file mode 100644
index 000000000..0006ba249
--- /dev/null
+++ b/patches/source/gegl/gegl-0.2.0-linker-flags.patch
@@ -0,0 +1,36 @@
+diff -urNp gegl-0.2.0.orig/bin/Makefile.in gegl-0.2.0/bin/Makefile.in
+--- gegl-0.2.0.orig/bin/Makefile.in 2015-05-07 15:06:23.716649233 +0200
++++ gegl-0.2.0/bin/Makefile.in 2015-05-07 15:08:38.104260506 +0200
+@@ -363,7 +363,7 @@ AM_CFLAGS = \
+
+ AM_LDFLAGS = \
+ $(no_undefined) ../gegl/libgegl-$(GEGL_API_VERSION).la \
+- $(DEP_LIBS) $(BABL_LIBS) $(PNG_LIBS) $(LIBSPIRO)
++ $(DEP_LIBS) $(BABL_LIBS) $(PNG_LIBS) $(LIBSPIRO) -lm
+
+ gegl_SOURCES = gegl.c gegl-options.c gegl-options.h gegl-path-smooth.c \
+ gegl-path-smooth.h $(am__append_1)
+diff -urNp gegl-0.2.0.orig/examples/Makefile.in gegl-0.2.0/examples/Makefile.in
+--- gegl-0.2.0.orig/examples/Makefile.in 2015-05-07 15:06:23.674649046 +0200
++++ gegl-0.2.0/examples/Makefile.in 2015-05-07 16:13:36.057203261 +0200
+@@ -376,7 +376,7 @@ AM_CPPFLAGS = \
+ AM_CFLAGS = $(DEP_CFLAGS) $(GTK_CFLAGS) $(BABL_CFLAGS) $(PNG_CFLAGS)
+ AM_LDFLAGS = \
+ $(top_builddir)/gegl/libgegl-$(GEGL_API_VERSION).la \
+- $(DEP_LIBS) $(GTK_LIBS) $(BABL_LIBS) $(PNG_LIBS)
++ $(DEP_LIBS) $(GTK_LIBS) $(BABL_LIBS) $(PNG_LIBS) -lm
+
+ all: all-recursive
+
+diff -urNp gegl-0.2.0.orig/tools/Makefile.in gegl-0.2.0/tools/Makefile.in
+--- gegl-0.2.0.orig/tools/Makefile.in 2015-05-07 15:06:23.716649233 +0200
++++ gegl-0.2.0/tools/Makefile.in 2015-05-07 15:31:43.643298848 +0200
+@@ -394,7 +394,7 @@ AM_CPPFLAGS = \
+ AM_CFLAGS = $(DEP_CFLAGS) $(BABL_CFLAGS)
+ AM_LDFLAGS = \
+ $(top_builddir)/gegl/libgegl-$(GEGL_API_VERSION).la \
+- $(DEP_LIBS) $(BABL_LIBS)
++ $(DEP_LIBS) $(BABL_LIBS) -lm
+
+ @HAVE_EXIV2_TRUE@exp_combine_SOURCES = exp_combine.cpp
+ @HAVE_EXIV2_TRUE@exp_combine_LDADD = $(EXIV2_LIBS)
diff --git a/patches/source/gegl/gegl-0.2.0-lua-5.2.patch b/patches/source/gegl/gegl-0.2.0-lua-5.2.patch
new file mode 100644
index 000000000..e5a60bb9f
--- /dev/null
+++ b/patches/source/gegl/gegl-0.2.0-lua-5.2.patch
@@ -0,0 +1,53 @@
+From 1e12a153d9a82a771c3bfd95c0265b810a424b3c Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Mon, 1 Jul 2013 14:41:33 +0200
+Subject: [PATCH] patch: lua-5.2
+
+Squashed commit of the following:
+
+commit 96f65d260c6e40940f2818b721c19565c1b40607
+Author: Vincent Untz <vuntz@gnome.org>
+Date: Wed Jan 11 09:52:25 2012 +0100
+
+ Fix build with lua 5.2 by not using API deprecated in 5.1 already
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=667675
+ (cherry picked from commit a14a29c39352c60f003a65b721c9af8a1d8d20df)
+---
+ operations/workshop/external/gluas.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/operations/workshop/external/gluas.c b/operations/workshop/external/gluas.c
+index 8ba1101..63e82a2 100644
+--- a/operations/workshop/external/gluas.c
++++ b/operations/workshop/external/gluas.c
+@@ -97,7 +97,7 @@ static int l_progress (lua_State * lua);
+ static int l_flush (lua_State * lua);
+ static int l_print (lua_State * lua);
+
+-static const luaL_reg gluas_functions[] =
++static const luaL_Reg gluas_functions[] =
+ {
+ {"set_rgba", l_set_rgba},
+ {"get_rgba", l_get_rgba},
+@@ -122,7 +122,7 @@ static const luaL_reg gluas_functions[] =
+ };
+ static void
+ register_functions (lua_State *L,
+- const luaL_reg *l)
++ const luaL_Reg *l)
+ {
+ for (;l->name; l++)
+ lua_register (L, l->name, l->func);
+@@ -146,7 +146,7 @@ drawable_lua_process (GeglOperation *op,
+ lua_State *L;
+ Priv p;
+
+- L = lua_open ();
++ L = luaL_newstate ();
+ luaL_openlibs (L);
+
+ register_functions (L, gluas_functions);
+--
+1.8.3.1
+
diff --git a/patches/source/gegl/gegl-0.2.0-remove-src-over-op.patch b/patches/source/gegl/gegl-0.2.0-remove-src-over-op.patch
new file mode 100644
index 000000000..a823580fd
--- /dev/null
+++ b/patches/source/gegl/gegl-0.2.0-remove-src-over-op.patch
@@ -0,0 +1,195 @@
+From 72168aba34445e4cd99aaed32d8e6a80e89ce729 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Mon, 1 Jul 2013 13:53:18 +0200
+Subject: [PATCH] patch: remove-src-over-op
+
+Squashed commit of the following:
+
+commit b766094d951bf1515a75408ee85d4e1af432e6bd
+Author: Daniel Sabo <DanielSabo@gmail.com>
+Date: Tue Jun 4 20:57:03 2013 -0700
+
+ Remove auto-generated svg:src-over
+
+ It was already shadowed by gegl:over, which declares
+ svg:src-over as a compat-name.
+
+ (cherry picked from commit c1caf2401271e8a17fd1937bf84279c250bd8e2a)
+
+ Conflicts:
+ po/POTFILES.in
+---
+ operations/generated/src-over.c | 122 -----------------------------
+ operations/generated/svg-12-porter-duff.rb | 5 +-
+ po/POTFILES.in | 3 +-
+ 3 files changed, 4 insertions(+), 126 deletions(-)
+ delete mode 100644 operations/generated/src-over.c
+
+diff --git a/operations/generated/src-over.c b/operations/generated/src-over.c
+deleted file mode 100644
+index e586087..0000000
+--- a/operations/generated/src-over.c
++++ /dev/null
+@@ -1,122 +0,0 @@
+-
+-/* !!!! AUTOGENERATED FILE generated by svg-12-porter-duff.rb !!!!!
+- *
+- * This file is an image processing operation for GEGL
+- *
+- * GEGL is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU Lesser General Public
+- * License as published by the Free Software Foundation; either
+- * version 3 of the License, or (at your option) any later version.
+- *
+- * GEGL 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
+- * Lesser General Public License for more details.
+- *
+- * You should have received a copy of the GNU Lesser General Public
+- * License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
+- *
+- * Copyright 2006, 2007 Øyvind Kolås <pippin@gimp.org>
+- * 2007 John Marshall
+- *
+- * SVG rendering modes; see:
+- * http://www.w3.org/TR/SVG12/rendering.html
+- * http://www.w3.org/TR/2004/WD-SVG12-20041027/rendering.html#comp-op-prop
+- *
+- * aA = aux(src) alpha aB = in(dst) alpha aD = out alpha
+- * cA = aux(src) colour cB = in(dst) colour cD = out colour
+- *
+- * !!!! AUTOGENERATED FILE !!!!!
+- */
+-#include "config.h"
+-#include <glib/gi18n-lib.h>
+-
+-
+-#ifdef GEGL_CHANT_PROPERTIES
+-
+-/* no properties */
+-
+-#else
+-
+-#define GEGL_CHANT_TYPE_POINT_COMPOSER
+-#define GEGL_CHANT_C_FILE "src-over.c"
+-
+-#include "gegl-chant.h"
+-
+-static void prepare (GeglOperation *operation)
+-{
+- const Babl *format = babl_format ("RaGaBaA float");
+-
+- gegl_operation_set_format (operation, "input", format);
+- gegl_operation_set_format (operation, "aux", format);
+- gegl_operation_set_format (operation, "output", format);
+-}
+-
+-static gboolean
+-process (GeglOperation *op,
+- void *in_buf,
+- void *aux_buf,
+- void *out_buf,
+- glong n_pixels,
+- const GeglRectangle *roi,
+- gint level)
+-{
+- gint i;
+- gfloat * GEGL_ALIGNED in = in_buf;
+- gfloat * GEGL_ALIGNED aux = aux_buf;
+- gfloat * GEGL_ALIGNED out = out_buf;
+-
+- if (aux==NULL)
+- return TRUE;
+-
+- for (i = 0; i < n_pixels; i++)
+- {
+- gint j;
+- gfloat aA G_GNUC_UNUSED, aB G_GNUC_UNUSED, aD G_GNUC_UNUSED;
+-
+- aB = in[3];
+- aA = aux[3];
+- aD = aA + aB - aA * aB;
+-
+- for (j = 0; j < 3; j++)
+- {
+- gfloat cA G_GNUC_UNUSED, cB G_GNUC_UNUSED;
+-
+- cB = in[j];
+- cA = aux[j];
+- out[j] = cA + cB * (1.0f - aA);
+- }
+- out[3] = aD;
+- in += 4;
+- aux += 4;
+- out += 4;
+- }
+- return TRUE;
+-}
+-
+-
+-static void
+-gegl_chant_class_init (GeglChantClass *klass)
+-{
+- GeglOperationClass *operation_class;
+- GeglOperationPointComposerClass *point_composer_class;
+-
+- operation_class = GEGL_OPERATION_CLASS (klass);
+- point_composer_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+-
+- point_composer_class->process = process;
+- operation_class->prepare = prepare;
+-
+-
+- operation_class->compat_name = "gegl:src-over";
+- gegl_operation_class_set_keys (operation_class,
+- "name" , "svg:src-over",
+- "categories", "compositors:porter-duff",
+- "description",
+- _("Porter Duff operation src-over (d = cA + cB * (1.0f - aA))"),
+- NULL);
+-
+-
+-}
+-
+-#endif
+diff --git a/operations/generated/svg-12-porter-duff.rb b/operations/generated/svg-12-porter-duff.rb
+index 5516802..dab5d2f 100755
+--- a/operations/generated/svg-12-porter-duff.rb
++++ b/operations/generated/svg-12-porter-duff.rb
+@@ -1,4 +1,5 @@
+ #!/usr/bin/env ruby
++# encoding: utf-8
+
+ copyright = '
+ /* !!!! AUTOGENERATED FILE generated by svg-12-porter-duff.rb !!!!!
+@@ -38,8 +39,8 @@ a = [
+ 'aA'],
+ ['dst', 'cB',
+ 'aB'],
+- ['src_over', 'cA + cB * (1.0f - aA)',
+- 'aA + aB - aA * aB'],
++# ['src_over', 'cA + cB * (1.0f - aA)',
++# 'aA + aB - aA * aB'],
+ ['dst_over', 'cB + cA * (1.0f - aB)',
+ 'aA + aB - aA * aB'],
+ ['dst_in', 'cB * aA', # <- XXX: typo?
+diff --git a/po/POTFILES.in b/po/POTFILES.in
+index e309594..d36cbc2 100644
+--- a/po/POTFILES.in
++++ b/po/POTFILES.in
+@@ -115,10 +115,9 @@ operations/generated/plus.c
+ operations/generated/screen.c
+ operations/generated/soft-light.c
+ operations/generated/src-atop.c
++operations/generated/src.c
+ operations/generated/src-in.c
+ operations/generated/src-out.c
+-operations/generated/src-over.c
+-operations/generated/src.c
+ operations/generated/subtract.c
+ operations/generated/svg-multiply.c
+ operations/generated/xor.c
+--
+1.8.3.1
+
diff --git a/patches/source/gegl/gegl.SlackBuild b/patches/source/gegl/gegl.SlackBuild
new file mode 100755
index 000000000..ce301c73f
--- /dev/null
+++ b/patches/source/gegl/gegl.SlackBuild
@@ -0,0 +1,116 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009 Robby Workman, Northport, Alabama, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+VERSION=${VERSION:-$(echo gegl-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-3_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-gegl
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf gegl-$VERSION
+tar xvf $CWD/gegl-$VERSION.tar.?z* || exit 1
+cd gegl-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+zcat $CWD/gegl-0.2.0-lua-5.2.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/gegl-0.2.0-CVE-2012-4433.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/gegl-0.2.0-remove-src-over-op.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/0001-matting-levin-Fix-the-build-with-recent-suitesparse-.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/gegl-0.2.0-linker-flags.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/gegl-0.2.0-libopenraw.patch.gz | patch -p1 --verbose || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --docdir=/usr/doc/gegl-$VERSION \
+ --enable-gtk-doc \
+ --disable-docs \
+ --build=$ARCH-slackware-linux || exit 1
+
+# Trust defaults:
+# --enable-mmx \
+# --disable-sse \
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/usr/doc/gegl-$VERSION
+cp -a \
+ AUTHORS COPYING* INSTALL NEWS README* TODO \
+ $PKG/usr/doc/gegl-$VERSION
+#( cd $PKG/usr/doc/gegl-$VERSION ; ln -s /usr/share/gtk-doc/html/gegl/ html )
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/gegl-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/gegl/slack-desc b/patches/source/gegl/slack-desc
new file mode 100644
index 000000000..75eea8ad7
--- /dev/null
+++ b/patches/source/gegl/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler--------------------------------------------------------|
+gegl: GEGL (Generic Graphics Library)
+gegl:
+gegl: GEGL (Generic Graphics Library) is a graph based image processing
+gegl: framework.
+gegl:
+gegl: GEGL provides infrastructure to do demand based cached non destructive
+gegl: image editing on larger than RAM buffers. Through babl it provides
+gegl: support for a wide range of color models and pixel storage formats for
+gegl: input and output.
+gegl:
+gegl:
diff --git a/patches/source/gimp/gimp.SlackBuild b/patches/source/gimp/gimp.SlackBuild
new file mode 100755
index 000000000..9d1c196ab
--- /dev/null
+++ b/patches/source/gimp/gimp.SlackBuild
@@ -0,0 +1,135 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2015 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=gimp
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-gimp
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+cd $TMP
+rm -rf gimp-$VERSION
+tar xvf $CWD/gimp-$VERSION.tar.?z* || exit 1
+cd gimp-$VERSION || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var/lib \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --docdir=/usr/doc/gimp-$VERSION \
+ --disable-static \
+ --with-libcurl \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+mkdir -p $PKG/usr/share/applications $PKG/usr/share/application-registry
+make install DESTDIR=$PKG || exit 1
+
+# Add a manpage symlink for POLA-compliance
+( cd $PKG/usr/man/man1 ; ln -sf gimptool-2.?.1 gimptool.1 )
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+mkdir -p $PKG/usr/doc/gimp-$VERSION
+cp -a \
+ AUTHORS COPYING* HACKING INSTALL LICENSE NEWS README* docs/Wilber* \
+ $PKG/usr/doc/gimp-$VERSION
+( cd $PKG/usr/doc/gimp-$VERSION
+ for i in \
+ libgimp libgimpbase libgimpcolor libgimpconfig libgimpmath \
+ libgimpmodule libgimpthumb libgimpwidgets ; do \
+ ln -s /usr/share/gtk-doc/html/$i $i-html ;
+ done
+)
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/gimp-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/gimp/slack-desc b/patches/source/gimp/slack-desc
new file mode 100644
index 000000000..9f9aca385
--- /dev/null
+++ b/patches/source/gimp/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+gimp: gimp (The GNU Image Manipulation Program)
+gimp:
+gimp: The GIMP is a powerful tool for the preparation and manipulation of
+gimp: digital images. The GIMP provides the user with a wide variety of
+gimp: image manipulation, painting, processing, and rendering tools. The
+gimp: GIMP's open design and extensible architecture make for a very
+gimp: powerful end product for photo and image retouching, web graphics
+gimp: design, or digital illustration.
+gimp:
+gimp:
+gimp:
diff --git a/patches/source/git/git-2.14.1.tar.sign b/patches/source/git/git-2.14.1.tar.sign
new file mode 100644
index 000000000..2dffd4d31
--- /dev/null
+++ b/patches/source/git/git-2.14.1.tar.sign
Binary files differ
diff --git a/patches/source/git/git.SlackBuild b/patches/source/git/git.SlackBuild
new file mode 100755
index 000000000..d94a5881e
--- /dev/null
+++ b/patches/source/git/git.SlackBuild
@@ -0,0 +1,170 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2016 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+BUILD=${BUILD:-1_slack14.1}
+
+PKGNAM=git
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | cut -d - -f 2 | rev | cut -f 3- -d . | rev)}
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+eval $(perl '-V:installvendorlib')
+PERLDIR=$installvendorlib/$ARCH-linux-thread-multi/auto
+
+if ls /var/log/packages/git-* 1> /dev/null 2> /dev/null ; then
+ echo "The git package needs to be removed before building to ensure that"
+ echo "the perl modules are included in the new package."
+ echo
+ echo "Removing the git package in 15 seconds, and then continuing with the build."
+ sleep 15
+ removepkg git
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-git
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf git-$VERSION
+tar xvf $CWD/git-$VERSION.tar.?z* || exit 1
+cd git-$VERSION
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+mkdir -p $PKG/usr/doc/git-$VERSION
+cp -a \
+ COPYING* INSTALL README \
+ Documentation \
+ contrib \
+ $PKG/usr/doc/git-$VERSION
+( cd $PKG/usr/doc/git-$VERSION/Documentation ; rm *.1 *.3 *.7 )
+( cd $PKG/usr/doc/git-$VERSION && find . -name ".git*" -exec rm -r "{}" \; )
+
+make $NUMJOBS \
+ prefix=/usr \
+ mandir=/usr/man \
+ CFLAGS="$SLKCFLAGS" \
+ INSTALLDIRS=vendor \
+ ASCIIDOC8=YesPlease \
+ all doc || exit 1
+
+make \
+ prefix=/usr \
+ mandir=/usr/man \
+ "CFLAGS=$SLKCFLAGS" \
+ INSTALLDIRS=vendor \
+ ASCIIDOC8=YesPlease \
+ install \
+ install-doc \
+ DESTDIR=$PKG || exit 1
+
+mv $PKG/usr/share/man/man3 $PKG/usr/man
+rmdir $PKG/usr/share/man
+
+# Don't stomp on perl's file:
+rm -f $PKG/usr/lib*/perl5/perllocal.pod
+
+# Compress and if needed symlink the man pages:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Since Stuart Winter hates hard links. ;-)
+#
+# Switch a hard link with a soft link:
+( cd $PKG/usr/bin
+ find . -links +1 -not -name git | while read gitfile ; do
+ if [ git -ef $gitfile ]; then
+ rm -vf $gitfile
+ ln -vfs git $gitfile
+ fi
+ done
+)
+
+# This removes our DESTDIR from the packlist filenames, to keep perl's
+# internal inventories consistent and correct.
+find $PKG -name .packlist | while read plist ; do
+ sed -e "s%/share/man%/man%g" \
+ -e "s%$PKG%%g" \
+ -e "s%\.1$%\.1\.gz%g" \
+ -e "s%\.2$%\.2\.gz%g" \
+ -e "s%\.3$%\.3\.gz%g" \
+ -e "s%\.3pm$%\.3pm\.gz%g" \
+ -e "s%\.4$%\.4\.gz%g" \
+ -e "s%\.5$%\.5\.gz%g" \
+ -e "s%\.6$%\.6\.gz%g" \
+ -e "s%\.7$%\.7\.gz%g" \
+ -e "s%\.8$%\.8\.gz%g" \
+ ${plist} > ${plist}.new
+ mv -f ${plist}.new ${plist}
+done
+
+# This is junk:
+eval $(perl '-V:privlib')
+( cd $PKG$(dirname $privlib) && rm -rf 5.* )
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/git-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/git/git.url b/patches/source/git/git.url
new file mode 100644
index 000000000..a4c15db38
--- /dev/null
+++ b/patches/source/git/git.url
@@ -0,0 +1 @@
+https://www.kernel.org/pub/software/scm/git/
diff --git a/patches/source/git/slack-desc b/patches/source/git/slack-desc
new file mode 100644
index 000000000..271b863a2
--- /dev/null
+++ b/patches/source/git/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+git: git (the stupid content tracker)
+git:
+git: Git is a fast, scalable, distributed revision control system with an
+git: unusually rich command set that provides both high-level operations
+git: and full access to internals.
+git:
+git: "git" can mean anything, depending on your mood.
+git:
+git: Git was originally written by Linus Torvalds and is currently
+git: maintained by Junio C. Hamano.
+git:
diff --git a/patches/source/glibc-zoneinfo/doinst.sh b/patches/source/glibc-zoneinfo/doinst.sh
new file mode 100644
index 000000000..3c86f65e4
--- /dev/null
+++ b/patches/source/glibc-zoneinfo/doinst.sh
@@ -0,0 +1,57 @@
+# In order to properly handle time before /usr is mounted (in
+# the event that /usr is a separate partition, which for a number
+# of reasons isn't really a great idea), the /etc/localtime file
+# should be a copy of the desired zoneinfo file and not a symlink
+# to a file in /usr/share/zoneinfo. But if we find a symlink here
+# we should defer to the admin's wishes and leave it alone.
+#
+# Note that setting the timezone with timeconfig will wipe both
+# /etc/localtime and /etc/localtime-copied from.
+# /etc/localtime-copied-from will be a symlink to a file under
+# /usr/share/zoneinfo, and /etc/localtime will be a copy of that file.
+
+# In a special case, we will handle the removal of the US/Pacific-New
+# timezone. A bit of background information on this:
+#
+# "US/Pacific-New' stands for 'Pacific Presidential Election Time',
+# which was passed by the House in April 1989 but never signed into law.
+# In presidential election years, this rule would have delayed the
+# PDT-to-PST switchover until after the election, to lessen the effect
+# of broadcast news election projections on last-minute west-coast
+# voters. "
+#
+# In nearly all cases, a machine that uses the US/Pacific-New timezone
+# has chosen it by mistake. In 2016, having this as the system timezone
+# actually led to clock errors, and after that it was decided that the
+# timezone (only of historical interest anyway) should be removed from
+# the timezone database.
+#
+# If we see that the machine's localtime-copied-from symlink is pointing
+# to US/Pacific-New, change it to point to US/Pacific instead.
+if [ "$(/bin/ls -l etc/localtime-copied-from | rev | cut -f 1,2 -d / | rev)" = "US/Pacific-New" ]; then
+ ( cd etc ; rm -rf localtime-copied-from )
+ ( cd etc ; ln -sf /usr/share/zoneinfo/US/Pacific localtime-copied-from )
+fi
+
+# If we have no /etc/localtime, but we do have a localtime-copied-from
+# symlink to locate what we would want there, then add a copy now:
+if [ ! -r etc/localtime -a -L etc/localtime-copied-from ]; then
+ chroot . /bin/cp etc/localtime-copied-from etc/localtime
+fi
+
+# Add the default timezone in /etc, if none exists:
+if [ ! -r etc/localtime -a ! -L etc/localtime-copied-from ]; then
+ ( cd etc ; rm -rf localtime localtime-copied-from )
+ ( cd etc ; ln -sf /usr/share/zoneinfo/Factory localtime-copied-from )
+fi
+
+# Make sure /etc/localtime is updated, unless it is a symlink (in which
+# case leave it alone):
+if [ ! -L etc/localtime ]; then
+ chroot . /bin/cp etc/localtime-copied-from etc/localtime
+fi
+
+# Add a link to the timeconfig script in /usr/share/zoneinfo:
+( cd usr/share/zoneinfo ; rm -rf timeconfig )
+( cd usr/share/zoneinfo ; ln -sf /usr/sbin/timeconfig timeconfig )
+### Make the rest of the symbolic links in the zoneinfo database:
diff --git a/patches/source/glibc-zoneinfo/glibc-zoneinfo.SlackBuild b/patches/source/glibc-zoneinfo/glibc-zoneinfo.SlackBuild
new file mode 100755
index 000000000..a1a346daa
--- /dev/null
+++ b/patches/source/glibc-zoneinfo/glibc-zoneinfo.SlackBuild
@@ -0,0 +1,147 @@
+#!/bin/sh
+
+# Copyright 2015, 2016, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=glibc-zoneinfo
+ZONE_VERSIONS="$(echo tzdata* | cut -f1 -d . | cut -b7-11)"
+BUILD=${BUILD:-2_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i486 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-DHAVE_SNPRINTF=1 -O2 -march=i386 -mcpu=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-DHAVE_SNPRINTF=1 -O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-DHAVE_SNPRINTF=1 -O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-DHAVE_SNPRINTF=1 -O2 -march=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-DHAVE_SNPRINTF=1 -O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-DHAVE_SNPRINTF=1 -O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-DHAVE_SNPRINTF=1 -O3 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-DHAVE_SNPRINTF=1 -O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG/etc
+
+# Build and install the zoneinfo database:
+cd $TMP
+rm -rf tzcodedata-build
+mkdir tzcodedata-build
+cd tzcodedata-build
+tar xzf $CWD/tzdata?????.tar.gz
+tar xzf $CWD/tzcode?????.tar.gz
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+sed -i "s,/usr/local,$(pwd),g" Makefile
+sed -i "s,/etc/zoneinfo,/zoneinfo,g" Makefile
+sed -i "s,^CFLAGS=,CFLAGS= $SLKCFLAGS,g" Makefile
+make
+make install DESTDIR=$PKG/stage
+
+# Install the primary zone files:
+mkdir -p $PKG/usr/share
+mv $PKG/stage/usr/share/zoneinfo $PKG/usr/share
+
+# These are all identical to the normal zoneinfo files, so let's hard link
+# them to save space:
+cp -al $PKG/usr/share/zoneinfo $PKG/usr/share/posix
+mv $PKG/usr/share/posix $PKG/usr/share/zoneinfo
+
+# Install the "right" files:
+mkdir -p $PKG/usr/share/zoneinfo/right
+cp -a $PKG/stage/usr/share/zoneinfo-leaps/* $PKG/usr/share/zoneinfo/right
+
+# Clean up staged file residue:
+rm -rf $PKG/stage
+
+# Remove $PKG/usr/share/zoneinfo/localtime -- the install script will
+# create it as a link to /etc/localtime.
+rm -f $PKG/usr/share/zoneinfo/localtime
+
+# Install some scripts to help select a timezone:
+mkdir -p $PKG/var/log/setup
+cp -a $CWD/timezone-scripts/setup.timeconfig $PKG/var/log/setup
+chown root:root $PKG/var/log/setup/setup.timeconfig
+chmod 755 $PKG/var/log/setup/setup.timeconfig
+mkdir -p $PKG/usr/sbin
+cp -a $CWD/timezone-scripts/timeconfig $PKG/usr/sbin
+chown root:root $PKG/usr/sbin/timeconfig
+chmod 755 $PKG/usr/sbin/timeconfig
+( cd $CWD/timezone-scripts
+ # Try to rebuild this:
+ sh output-updated-timeconfig.sh $PKG/usr/share/zoneinfo > $PKG/usr/sbin/timeconfig 2> /dev/null
+)
+# Note in timeconfig which zoneinfo database was used:
+sed -i "s/# ChangeLog:/# ChangeLog:\n# $(date '+%Y-%m-%d'): Updated timezones from tzdata${ZONE_VERSIONS}./g" $PKG/usr/sbin/timeconfig
+
+# Don't forget to add the /usr/share/zoneinfo/localtime -> /etc/localtime symlink! :)
+if [ ! -r $PKG/usr/share/zoneinfo/localtime ]; then
+ ( cd $PKG/usr/share/zoneinfo ; ln -sf /etc/localtime . )
+fi
+
+mkdir -p $PKG/usr/doc/glibc-zoneinfo-$ZONE_VERSIONS
+cp -a \
+ CONTRIBUTING NEWS README Theory \
+ $PKG/usr/doc/glibc-zoneinfo-$ZONE_VERSIONS
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+makepkg -l y -c n $TMP/glibc-zoneinfo-$ZONE_VERSIONS-noarch-$BUILD.txz
+
diff --git a/patches/source/glibc-zoneinfo/slack-desc b/patches/source/glibc-zoneinfo/slack-desc
new file mode 100644
index 000000000..69420f78d
--- /dev/null
+++ b/patches/source/glibc-zoneinfo/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+glibc-zoneinfo: glibc-zoneinfo (timezone database)
+glibc-zoneinfo:
+glibc-zoneinfo: This package allows you to configure your time zone.
+glibc-zoneinfo:
+glibc-zoneinfo: This timezone database comes from the tzdata and tzcode packages by
+glibc-zoneinfo: Arthur David Olson et.al. The latest version and more information
+glibc-zoneinfo: may be found at: http://www.iana.org/time-zones
+glibc-zoneinfo:
+glibc-zoneinfo: Use the timeconfig utility to set your local time zone.
+glibc-zoneinfo:
+glibc-zoneinfo:
diff --git a/patches/source/glibc-zoneinfo/timezone-scripts/output-updated-timeconfig.sh b/patches/source/glibc-zoneinfo/timezone-scripts/output-updated-timeconfig.sh
new file mode 100755
index 000000000..268e4c6cc
--- /dev/null
+++ b/patches/source/glibc-zoneinfo/timezone-scripts/output-updated-timeconfig.sh
@@ -0,0 +1,60 @@
+#!/bin/sh
+# Copyright 2000, 2001, 2006, 2007, 2008, 2012 Patrick J. Volkerding, Sebeka, MN, USA.
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+if [ ! "$(basename "$1")" = "zoneinfo" -o ! -d "$1" ]; then
+ echo " Usage: output-updated-timeconfig.sh <zoneinfo directory>"
+ exit 1
+fi
+
+CWD=$(pwd)
+cat $CWD/parts/00
+# Sorry, I'd rather not be US-centric but some people here have a hard
+# time finding things. ;-)
+( cd $1
+ find . -type f | xargs file | grep "timezone data" | cut -f 1 -d : | cut -f 2- -d / | sort | grep "^US/" | while read zone ; do
+ echo "\"${zone}\" \" \" \\"
+ done
+)
+# Don't list right/ and posix/ zones, as these are wrong choices for most
+# people. posix/ is just a duplicate of the normal zones, while right/ do
+# not include leap seconds. Anyone actually needing something from one of
+# those trees will have no problem selecting it by manually adjusting
+# /etc/localtime.
+( cd $1
+ find . -type f | xargs file | grep "timezone data" | cut -f 1 -d : | cut -f 2- -d / | sort | grep -v "^US/" | grep -v "^posix/" | grep -v "^right/" | while read zone ; do
+ echo "\"${zone}\" \" \" \\"
+ done
+)
+cat $CWD/parts/02
+# US/ first:
+( cd $1
+ find . -type f | xargs file | grep "timezone data" | cut -f 1 -d : | cut -f 2- -d / | sort | grep "^US/" | while read zone ; do
+ echo "${zone}"
+ done
+)
+# Don't list right/ and posix/ zones:
+( cd $1
+ find . -type f | xargs file | grep "timezone data" | cut -f 1 -d : | cut -f 2- -d / | sort | grep -v "^US/" | grep -v "^posix/" | grep -v "^right/" | while read zone ; do
+ echo "${zone}"
+ done
+)
+cat $CWD/parts/04
diff --git a/patches/source/glibc-zoneinfo/timezone-scripts/parts/00 b/patches/source/glibc-zoneinfo/timezone-scripts/parts/00
new file mode 100644
index 000000000..678094e16
--- /dev/null
+++ b/patches/source/glibc-zoneinfo/timezone-scripts/parts/00
@@ -0,0 +1,132 @@
+#!/bin/sh
+#
+# timeconfig Slackware Linux timezone configuration utility.
+#
+# Author: Patrick Volkerding <volkerdi@slackware.com>
+# Modified by: David Cantrell <david@slackware.com>, 06-Oct-2000
+#
+# ChangeLog:
+# 2014-10-22: Updated timezones from tzdata2014i. <pjv>
+# 2012-12-12: Updated timezones from tzdata2012j. <pjv>
+# 2008-03-10: Updated timezones from tzdata2008a. <pjv>
+# 2007-12-21: Updated timezones from tzdata2007j. <pjv>
+# 2006-12-03: Updated timezones from tzdata2006p. <pjv>
+# 2006-09-14: Updated timezones from tzdata2006k. <pjv>
+# 2006-08-22: Updated timezones from tzdata2006j.
+# 2006-08-13: Updated timezones from tzdata2006g.
+# 2006-03-13: Updated timezones from tzdata2006c.
+# 19-Feb-2001 Add new timezones from glibc-2.2.2.
+# 06-Oct-2000 Fixed a problem with selecting UTC time. It was writing
+# the hardwareclock file to the root disk and not your dest
+# partition. Changed the HWCLOCK_CONF variable to be
+# $T_PX/etc/hardwareclock to fix this. Thanks to David L.
+# Dickman <softbear@optonline.net> for finding this and
+# submitting a patch.
+#
+# 15-Mar-2000 Added the writeconf function to write out the
+# /etc/hardwareclock file which tells what the hardware clock
+# is set to (UTC or localtime).
+#
+# 03-Mar-2000 Reorganized script. Made one timezone set block, added
+# stage that asks the user if the hardware clock is set to
+# UTC.
+
+# setup our temp locations and variables
+TMP=/var/log/setup/tmp
+if [ -r $TMP/SeTT_PX ]; then
+ T_PX="`cat $TMP/SeTT_PX`"
+elif [ ! "$!" = "" ]; then
+ T_PX=$1
+else
+ T_PX=/
+fi
+
+# the hardware clock configuration file
+HWCLOCK_CONF=$T_PX/etc/hardwareclock
+
+# setzone( $TIMEZONE )
+#
+# This function accepts a time zone as the only parameter and sets it as
+# the default system time zone.
+setzone()
+{
+ TZ=$1
+
+ cd $T_PX/etc
+ if [ -r $T_PX/usr/share/zoneinfo/$TZ -o \
+ -r /var/log/mount/usr/share/zoneinfo/$TZ -o \
+ -L $T_PX/usr/share/zoneinfo/$TZ -o \
+ -L /var/log/mount/usr/share/zoneinfo/$TZ ]; then
+ rm -f localtime-copied-from
+ ln -sf /usr/share/zoneinfo/$TZ localtime-copied-from
+ rm -f localtime
+ cd ..
+ chroot . cp etc/localtime-copied-from etc/localtime
+ fi
+}
+
+# writeconf( $CLOCK_SET_TO )
+#
+# Writes out $HWCLOCK_CONF that tells rc.S how the hardware clock
+# value is stored.
+writeconf()
+{
+ echo "# /etc/hardwareclock" > $HWCLOCK_CONF
+ echo "#" >> $HWCLOCK_CONF
+ echo "# Tells how the hardware clock time is stored." >> $HWCLOCK_CONF
+ echo "# You should run timeconfig to edit this file." >> $HWCLOCK_CONF
+ echo >> $HWCLOCK_CONF
+ echo $1 >> $HWCLOCK_CONF
+}
+
+# ask the user if the hardware clock is set for UTC/GMT
+if [ "$COLOR" = "on" -o -r $TMP/SeTcolor -o "$T_PX" = "/" ]; then
+ ###
+ ### use color menus here
+ ###
+ dialog --title "HARDWARE CLOCK SET TO UTC?" --menu "Is the hardware clock set \
+to Coordinated Universal Time (UTC/GMT)? If it is, select YES here. If the \
+hardware clock is set to the current local time (this is how most PCs are set \
+up), then say NO here. If you are not sure what this is, you should answer NO \
+here." 13 60 2 \
+ "NO" "Hardware clock is set to local time" \
+ "YES" "Hardware clock is set to UTC" \
+ 2> $TMP/utc
+ if [ $? = 1 -o $? = 255 ]; then
+ rm -f $TMP/utc
+ exit
+ fi
+ if [ "`cat $TMP/utc`" = "YES" ]; then
+ # yes, the hardware clock is UTC
+ writeconf "UTC"
+ else # must be NO
+ writeconf "localtime"
+ fi
+ rm -f $TMP/utc
+else
+ ###
+ ### use text prompts
+ ###
+ echo "Is the hardware clock set to Coordinated Universal Time (UTC/GMT)?"
+ echo "If it is, select 'y' here. If the hardware clock is set to the"
+ echo "current local time (this is how most PCs are set up), then say 'n'"
+ echo "here. If you are not sure what this is, you should answer 'n' here."
+ echo
+ echo -n "Is your hardware clock set to UTC ([y]es, [n]o)? "
+ read HEJAZ
+
+ if [ "$HEJAZ" = "y" -o "$HEJAZ" = "Y" -o "$HEJAZ" = "YES" -o "$HEJAZ" = "yes" ]; then
+ # yes, the hardware clock is UTC
+ writeconf "UTC"
+ else
+ # default to localtime
+ writeconf "localtime"
+ fi
+fi
+
+# Now set the correct timezone link:
+if [ "$COLOR" = "on" -o -r $TMP/SeTcolor -o "$T_PX" = "/" ]; then
+ ###
+ ### use color menus here
+ ###
+ dialog --title "TIMEZONE CONFIGURATION" --menu "Please select one of the following timezones for your machine:" 21 50 13 \
diff --git a/patches/source/glibc-zoneinfo/timezone-scripts/parts/01 b/patches/source/glibc-zoneinfo/timezone-scripts/parts/01
new file mode 100644
index 000000000..999f67d77
--- /dev/null
+++ b/patches/source/glibc-zoneinfo/timezone-scripts/parts/01
@@ -0,0 +1,585 @@
+"US/Alaska" " " \
+"US/Aleutian" " " \
+"US/Arizona" " " \
+"US/Central" " " \
+"US/East-Indiana" " " \
+"US/Eastern" " " \
+"US/Hawaii" " " \
+"US/Indiana-Starke" " " \
+"US/Michigan" " " \
+"US/Mountain" " " \
+"US/Pacific" " " \
+"US/Pacific-New" " " \
+"US/Samoa" " " \
+"Africa/Abidjan" " " \
+"Africa/Accra" " " \
+"Africa/Addis_Ababa" " " \
+"Africa/Algiers" " " \
+"Africa/Asmara" " " \
+"Africa/Asmera" " " \
+"Africa/Bamako" " " \
+"Africa/Bangui" " " \
+"Africa/Banjul" " " \
+"Africa/Bissau" " " \
+"Africa/Blantyre" " " \
+"Africa/Brazzaville" " " \
+"Africa/Bujumbura" " " \
+"Africa/Cairo" " " \
+"Africa/Casablanca" " " \
+"Africa/Ceuta" " " \
+"Africa/Conakry" " " \
+"Africa/Dakar" " " \
+"Africa/Dar_es_Salaam" " " \
+"Africa/Djibouti" " " \
+"Africa/Douala" " " \
+"Africa/El_Aaiun" " " \
+"Africa/Freetown" " " \
+"Africa/Gaborone" " " \
+"Africa/Harare" " " \
+"Africa/Johannesburg" " " \
+"Africa/Juba" " " \
+"Africa/Kampala" " " \
+"Africa/Khartoum" " " \
+"Africa/Kigali" " " \
+"Africa/Kinshasa" " " \
+"Africa/Lagos" " " \
+"Africa/Libreville" " " \
+"Africa/Lome" " " \
+"Africa/Luanda" " " \
+"Africa/Lubumbashi" " " \
+"Africa/Lusaka" " " \
+"Africa/Malabo" " " \
+"Africa/Maputo" " " \
+"Africa/Maseru" " " \
+"Africa/Mbabane" " " \
+"Africa/Mogadishu" " " \
+"Africa/Monrovia" " " \
+"Africa/Nairobi" " " \
+"Africa/Ndjamena" " " \
+"Africa/Niamey" " " \
+"Africa/Nouakchott" " " \
+"Africa/Ouagadougou" " " \
+"Africa/Porto-Novo" " " \
+"Africa/Sao_Tome" " " \
+"Africa/Timbuktu" " " \
+"Africa/Tripoli" " " \
+"Africa/Tunis" " " \
+"Africa/Windhoek" " " \
+"America/Adak" " " \
+"America/Anchorage" " " \
+"America/Anguilla" " " \
+"America/Antigua" " " \
+"America/Araguaina" " " \
+"America/Argentina/Buenos_Aires" " " \
+"America/Argentina/Catamarca" " " \
+"America/Argentina/ComodRivadavia" " " \
+"America/Argentina/Cordoba" " " \
+"America/Argentina/Jujuy" " " \
+"America/Argentina/La_Rioja" " " \
+"America/Argentina/Mendoza" " " \
+"America/Argentina/Rio_Gallegos" " " \
+"America/Argentina/Salta" " " \
+"America/Argentina/San_Juan" " " \
+"America/Argentina/San_Luis" " " \
+"America/Argentina/Tucuman" " " \
+"America/Argentina/Ushuaia" " " \
+"America/Aruba" " " \
+"America/Asuncion" " " \
+"America/Atikokan" " " \
+"America/Atka" " " \
+"America/Bahia" " " \
+"America/Bahia_Banderas" " " \
+"America/Barbados" " " \
+"America/Belem" " " \
+"America/Belize" " " \
+"America/Blanc-Sablon" " " \
+"America/Boa_Vista" " " \
+"America/Bogota" " " \
+"America/Boise" " " \
+"America/Buenos_Aires" " " \
+"America/Cambridge_Bay" " " \
+"America/Campo_Grande" " " \
+"America/Cancun" " " \
+"America/Caracas" " " \
+"America/Catamarca" " " \
+"America/Cayenne" " " \
+"America/Cayman" " " \
+"America/Chicago" " " \
+"America/Chihuahua" " " \
+"America/Coral_Harbour" " " \
+"America/Cordoba" " " \
+"America/Costa_Rica" " " \
+"America/Creston" " " \
+"America/Cuiaba" " " \
+"America/Curacao" " " \
+"America/Danmarkshavn" " " \
+"America/Dawson" " " \
+"America/Dawson_Creek" " " \
+"America/Denver" " " \
+"America/Detroit" " " \
+"America/Dominica" " " \
+"America/Edmonton" " " \
+"America/Eirunepe" " " \
+"America/El_Salvador" " " \
+"America/Ensenada" " " \
+"America/Fort_Nelson" " " \
+"America/Fort_Wayne" " " \
+"America/Fortaleza" " " \
+"America/Glace_Bay" " " \
+"America/Godthab" " " \
+"America/Goose_Bay" " " \
+"America/Grand_Turk" " " \
+"America/Grenada" " " \
+"America/Guadeloupe" " " \
+"America/Guatemala" " " \
+"America/Guayaquil" " " \
+"America/Guyana" " " \
+"America/Halifax" " " \
+"America/Havana" " " \
+"America/Hermosillo" " " \
+"America/Indiana/Indianapolis" " " \
+"America/Indiana/Knox" " " \
+"America/Indiana/Marengo" " " \
+"America/Indiana/Petersburg" " " \
+"America/Indiana/Tell_City" " " \
+"America/Indiana/Vevay" " " \
+"America/Indiana/Vincennes" " " \
+"America/Indiana/Winamac" " " \
+"America/Indianapolis" " " \
+"America/Inuvik" " " \
+"America/Iqaluit" " " \
+"America/Jamaica" " " \
+"America/Jujuy" " " \
+"America/Juneau" " " \
+"America/Kentucky/Louisville" " " \
+"America/Kentucky/Monticello" " " \
+"America/Knox_IN" " " \
+"America/Kralendijk" " " \
+"America/La_Paz" " " \
+"America/Lima" " " \
+"America/Los_Angeles" " " \
+"America/Louisville" " " \
+"America/Lower_Princes" " " \
+"America/Maceio" " " \
+"America/Managua" " " \
+"America/Manaus" " " \
+"America/Marigot" " " \
+"America/Martinique" " " \
+"America/Matamoros" " " \
+"America/Mazatlan" " " \
+"America/Mendoza" " " \
+"America/Menominee" " " \
+"America/Merida" " " \
+"America/Metlakatla" " " \
+"America/Mexico_City" " " \
+"America/Miquelon" " " \
+"America/Moncton" " " \
+"America/Monterrey" " " \
+"America/Montevideo" " " \
+"America/Montreal" " " \
+"America/Montserrat" " " \
+"America/Nassau" " " \
+"America/New_York" " " \
+"America/Nipigon" " " \
+"America/Nome" " " \
+"America/Noronha" " " \
+"America/North_Dakota/Beulah" " " \
+"America/North_Dakota/Center" " " \
+"America/North_Dakota/New_Salem" " " \
+"America/Ojinaga" " " \
+"America/Panama" " " \
+"America/Pangnirtung" " " \
+"America/Paramaribo" " " \
+"America/Phoenix" " " \
+"America/Port-au-Prince" " " \
+"America/Port_of_Spain" " " \
+"America/Porto_Acre" " " \
+"America/Porto_Velho" " " \
+"America/Puerto_Rico" " " \
+"America/Rainy_River" " " \
+"America/Rankin_Inlet" " " \
+"America/Recife" " " \
+"America/Regina" " " \
+"America/Resolute" " " \
+"America/Rio_Branco" " " \
+"America/Rosario" " " \
+"America/Santa_Isabel" " " \
+"America/Santarem" " " \
+"America/Santiago" " " \
+"America/Santo_Domingo" " " \
+"America/Sao_Paulo" " " \
+"America/Scoresbysund" " " \
+"America/Shiprock" " " \
+"America/Sitka" " " \
+"America/St_Barthelemy" " " \
+"America/St_Johns" " " \
+"America/St_Kitts" " " \
+"America/St_Lucia" " " \
+"America/St_Thomas" " " \
+"America/St_Vincent" " " \
+"America/Swift_Current" " " \
+"America/Tegucigalpa" " " \
+"America/Thule" " " \
+"America/Thunder_Bay" " " \
+"America/Tijuana" " " \
+"America/Toronto" " " \
+"America/Tortola" " " \
+"America/Vancouver" " " \
+"America/Virgin" " " \
+"America/Whitehorse" " " \
+"America/Winnipeg" " " \
+"America/Yakutat" " " \
+"America/Yellowknife" " " \
+"Antarctica/Casey" " " \
+"Antarctica/Davis" " " \
+"Antarctica/DumontDUrville" " " \
+"Antarctica/Macquarie" " " \
+"Antarctica/Mawson" " " \
+"Antarctica/McMurdo" " " \
+"Antarctica/Palmer" " " \
+"Antarctica/Rothera" " " \
+"Antarctica/South_Pole" " " \
+"Antarctica/Syowa" " " \
+"Antarctica/Troll" " " \
+"Antarctica/Vostok" " " \
+"Arctic/Longyearbyen" " " \
+"Asia/Aden" " " \
+"Asia/Almaty" " " \
+"Asia/Amman" " " \
+"Asia/Anadyr" " " \
+"Asia/Aqtau" " " \
+"Asia/Aqtobe" " " \
+"Asia/Ashgabat" " " \
+"Asia/Ashkhabad" " " \
+"Asia/Baghdad" " " \
+"Asia/Bahrain" " " \
+"Asia/Baku" " " \
+"Asia/Bangkok" " " \
+"Asia/Beirut" " " \
+"Asia/Bishkek" " " \
+"Asia/Brunei" " " \
+"Asia/Calcutta" " " \
+"Asia/Chita" " " \
+"Asia/Choibalsan" " " \
+"Asia/Chongqing" " " \
+"Asia/Chungking" " " \
+"Asia/Colombo" " " \
+"Asia/Dacca" " " \
+"Asia/Damascus" " " \
+"Asia/Dhaka" " " \
+"Asia/Dili" " " \
+"Asia/Dubai" " " \
+"Asia/Dushanbe" " " \
+"Asia/Gaza" " " \
+"Asia/Harbin" " " \
+"Asia/Hebron" " " \
+"Asia/Ho_Chi_Minh" " " \
+"Asia/Hong_Kong" " " \
+"Asia/Hovd" " " \
+"Asia/Irkutsk" " " \
+"Asia/Istanbul" " " \
+"Asia/Jakarta" " " \
+"Asia/Jayapura" " " \
+"Asia/Jerusalem" " " \
+"Asia/Kabul" " " \
+"Asia/Kamchatka" " " \
+"Asia/Karachi" " " \
+"Asia/Kashgar" " " \
+"Asia/Kathmandu" " " \
+"Asia/Katmandu" " " \
+"Asia/Khandyga" " " \
+"Asia/Kolkata" " " \
+"Asia/Krasnoyarsk" " " \
+"Asia/Kuala_Lumpur" " " \
+"Asia/Kuching" " " \
+"Asia/Kuwait" " " \
+"Asia/Macao" " " \
+"Asia/Macau" " " \
+"Asia/Magadan" " " \
+"Asia/Makassar" " " \
+"Asia/Manila" " " \
+"Asia/Muscat" " " \
+"Asia/Nicosia" " " \
+"Asia/Novokuznetsk" " " \
+"Asia/Novosibirsk" " " \
+"Asia/Omsk" " " \
+"Asia/Oral" " " \
+"Asia/Phnom_Penh" " " \
+"Asia/Pontianak" " " \
+"Asia/Pyongyang" " " \
+"Asia/Qatar" " " \
+"Asia/Qyzylorda" " " \
+"Asia/Rangoon" " " \
+"Asia/Riyadh" " " \
+"Asia/Saigon" " " \
+"Asia/Sakhalin" " " \
+"Asia/Samarkand" " " \
+"Asia/Seoul" " " \
+"Asia/Shanghai" " " \
+"Asia/Singapore" " " \
+"Asia/Srednekolymsk" " " \
+"Asia/Taipei" " " \
+"Asia/Tashkent" " " \
+"Asia/Tbilisi" " " \
+"Asia/Tehran" " " \
+"Asia/Tel_Aviv" " " \
+"Asia/Thimbu" " " \
+"Asia/Thimphu" " " \
+"Asia/Tokyo" " " \
+"Asia/Ujung_Pandang" " " \
+"Asia/Ulaanbaatar" " " \
+"Asia/Ulan_Bator" " " \
+"Asia/Urumqi" " " \
+"Asia/Ust-Nera" " " \
+"Asia/Vientiane" " " \
+"Asia/Vladivostok" " " \
+"Asia/Yakutsk" " " \
+"Asia/Yekaterinburg" " " \
+"Asia/Yerevan" " " \
+"Atlantic/Azores" " " \
+"Atlantic/Bermuda" " " \
+"Atlantic/Canary" " " \
+"Atlantic/Cape_Verde" " " \
+"Atlantic/Faeroe" " " \
+"Atlantic/Faroe" " " \
+"Atlantic/Jan_Mayen" " " \
+"Atlantic/Madeira" " " \
+"Atlantic/Reykjavik" " " \
+"Atlantic/South_Georgia" " " \
+"Atlantic/St_Helena" " " \
+"Atlantic/Stanley" " " \
+"Australia/ACT" " " \
+"Australia/Adelaide" " " \
+"Australia/Brisbane" " " \
+"Australia/Broken_Hill" " " \
+"Australia/Canberra" " " \
+"Australia/Currie" " " \
+"Australia/Darwin" " " \
+"Australia/Eucla" " " \
+"Australia/Hobart" " " \
+"Australia/LHI" " " \
+"Australia/Lindeman" " " \
+"Australia/Lord_Howe" " " \
+"Australia/Melbourne" " " \
+"Australia/NSW" " " \
+"Australia/North" " " \
+"Australia/Perth" " " \
+"Australia/Queensland" " " \
+"Australia/South" " " \
+"Australia/Sydney" " " \
+"Australia/Tasmania" " " \
+"Australia/Victoria" " " \
+"Australia/West" " " \
+"Australia/Yancowinna" " " \
+"Brazil/Acre" " " \
+"Brazil/DeNoronha" " " \
+"Brazil/East" " " \
+"Brazil/West" " " \
+"CET" " " \
+"CST6CDT" " " \
+"Canada/Atlantic" " " \
+"Canada/Central" " " \
+"Canada/East-Saskatchewan" " " \
+"Canada/Eastern" " " \
+"Canada/Mountain" " " \
+"Canada/Newfoundland" " " \
+"Canada/Pacific" " " \
+"Canada/Saskatchewan" " " \
+"Canada/Yukon" " " \
+"Chile/Continental" " " \
+"Chile/EasterIsland" " " \
+"Cuba" " " \
+"EET" " " \
+"EST" " " \
+"EST5EDT" " " \
+"Egypt" " " \
+"Eire" " " \
+"Etc/GMT" " " \
+"Etc/GMT+0" " " \
+"Etc/GMT+1" " " \
+"Etc/GMT+10" " " \
+"Etc/GMT+11" " " \
+"Etc/GMT+12" " " \
+"Etc/GMT+2" " " \
+"Etc/GMT+3" " " \
+"Etc/GMT+4" " " \
+"Etc/GMT+5" " " \
+"Etc/GMT+6" " " \
+"Etc/GMT+7" " " \
+"Etc/GMT+8" " " \
+"Etc/GMT+9" " " \
+"Etc/GMT-0" " " \
+"Etc/GMT-1" " " \
+"Etc/GMT-10" " " \
+"Etc/GMT-11" " " \
+"Etc/GMT-12" " " \
+"Etc/GMT-13" " " \
+"Etc/GMT-14" " " \
+"Etc/GMT-2" " " \
+"Etc/GMT-3" " " \
+"Etc/GMT-4" " " \
+"Etc/GMT-5" " " \
+"Etc/GMT-6" " " \
+"Etc/GMT-7" " " \
+"Etc/GMT-8" " " \
+"Etc/GMT-9" " " \
+"Etc/GMT0" " " \
+"Etc/Greenwich" " " \
+"Etc/UCT" " " \
+"Etc/UTC" " " \
+"Etc/Universal" " " \
+"Etc/Zulu" " " \
+"Europe/Amsterdam" " " \
+"Europe/Andorra" " " \
+"Europe/Athens" " " \
+"Europe/Belfast" " " \
+"Europe/Belgrade" " " \
+"Europe/Berlin" " " \
+"Europe/Bratislava" " " \
+"Europe/Brussels" " " \
+"Europe/Bucharest" " " \
+"Europe/Budapest" " " \
+"Europe/Busingen" " " \
+"Europe/Chisinau" " " \
+"Europe/Copenhagen" " " \
+"Europe/Dublin" " " \
+"Europe/Gibraltar" " " \
+"Europe/Guernsey" " " \
+"Europe/Helsinki" " " \
+"Europe/Isle_of_Man" " " \
+"Europe/Istanbul" " " \
+"Europe/Jersey" " " \
+"Europe/Kaliningrad" " " \
+"Europe/Kiev" " " \
+"Europe/Lisbon" " " \
+"Europe/Ljubljana" " " \
+"Europe/London" " " \
+"Europe/Luxembourg" " " \
+"Europe/Madrid" " " \
+"Europe/Malta" " " \
+"Europe/Mariehamn" " " \
+"Europe/Minsk" " " \
+"Europe/Monaco" " " \
+"Europe/Moscow" " " \
+"Europe/Nicosia" " " \
+"Europe/Oslo" " " \
+"Europe/Paris" " " \
+"Europe/Podgorica" " " \
+"Europe/Prague" " " \
+"Europe/Riga" " " \
+"Europe/Rome" " " \
+"Europe/Samara" " " \
+"Europe/San_Marino" " " \
+"Europe/Sarajevo" " " \
+"Europe/Simferopol" " " \
+"Europe/Skopje" " " \
+"Europe/Sofia" " " \
+"Europe/Stockholm" " " \
+"Europe/Tallinn" " " \
+"Europe/Tirane" " " \
+"Europe/Tiraspol" " " \
+"Europe/Uzhgorod" " " \
+"Europe/Vaduz" " " \
+"Europe/Vatican" " " \
+"Europe/Vienna" " " \
+"Europe/Vilnius" " " \
+"Europe/Volgograd" " " \
+"Europe/Warsaw" " " \
+"Europe/Zagreb" " " \
+"Europe/Zaporozhye" " " \
+"Europe/Zurich" " " \
+"Factory" " " \
+"GB" " " \
+"GB-Eire" " " \
+"GMT" " " \
+"GMT+0" " " \
+"GMT-0" " " \
+"GMT0" " " \
+"Greenwich" " " \
+"HST" " " \
+"Hongkong" " " \
+"Iceland" " " \
+"Indian/Antananarivo" " " \
+"Indian/Chagos" " " \
+"Indian/Christmas" " " \
+"Indian/Cocos" " " \
+"Indian/Comoro" " " \
+"Indian/Kerguelen" " " \
+"Indian/Mahe" " " \
+"Indian/Maldives" " " \
+"Indian/Mauritius" " " \
+"Indian/Mayotte" " " \
+"Indian/Reunion" " " \
+"Iran" " " \
+"Israel" " " \
+"Jamaica" " " \
+"Japan" " " \
+"Kwajalein" " " \
+"Libya" " " \
+"MET" " " \
+"MST" " " \
+"MST7MDT" " " \
+"Mexico/BajaNorte" " " \
+"Mexico/BajaSur" " " \
+"Mexico/General" " " \
+"NZ" " " \
+"NZ-CHAT" " " \
+"Navajo" " " \
+"PRC" " " \
+"PST8PDT" " " \
+"Pacific/Apia" " " \
+"Pacific/Auckland" " " \
+"Pacific/Bougainville" " " \
+"Pacific/Chatham" " " \
+"Pacific/Chuuk" " " \
+"Pacific/Easter" " " \
+"Pacific/Efate" " " \
+"Pacific/Enderbury" " " \
+"Pacific/Fakaofo" " " \
+"Pacific/Fiji" " " \
+"Pacific/Funafuti" " " \
+"Pacific/Galapagos" " " \
+"Pacific/Gambier" " " \
+"Pacific/Guadalcanal" " " \
+"Pacific/Guam" " " \
+"Pacific/Honolulu" " " \
+"Pacific/Johnston" " " \
+"Pacific/Kiritimati" " " \
+"Pacific/Kosrae" " " \
+"Pacific/Kwajalein" " " \
+"Pacific/Majuro" " " \
+"Pacific/Marquesas" " " \
+"Pacific/Midway" " " \
+"Pacific/Nauru" " " \
+"Pacific/Niue" " " \
+"Pacific/Norfolk" " " \
+"Pacific/Noumea" " " \
+"Pacific/Pago_Pago" " " \
+"Pacific/Palau" " " \
+"Pacific/Pitcairn" " " \
+"Pacific/Pohnpei" " " \
+"Pacific/Ponape" " " \
+"Pacific/Port_Moresby" " " \
+"Pacific/Rarotonga" " " \
+"Pacific/Saipan" " " \
+"Pacific/Samoa" " " \
+"Pacific/Tahiti" " " \
+"Pacific/Tarawa" " " \
+"Pacific/Tongatapu" " " \
+"Pacific/Truk" " " \
+"Pacific/Wake" " " \
+"Pacific/Wallis" " " \
+"Pacific/Yap" " " \
+"Poland" " " \
+"Portugal" " " \
+"ROC" " " \
+"ROK" " " \
+"Singapore" " " \
+"Turkey" " " \
+"UCT" " " \
+"UTC" " " \
+"Universal" " " \
+"W-SU" " " \
+"WET" " " \
+"Zulu" " " \
+"posixrules" " " \
diff --git a/patches/source/glibc-zoneinfo/timezone-scripts/parts/02 b/patches/source/glibc-zoneinfo/timezone-scripts/parts/02
new file mode 100644
index 000000000..bd5a50bb0
--- /dev/null
+++ b/patches/source/glibc-zoneinfo/timezone-scripts/parts/02
@@ -0,0 +1,28 @@
+ 2> $TMP/tz
+
+ if [ $? = 1 -o $? = 255 ]; then
+ rm -f $TMP/tz
+ exit
+ fi
+
+ TIMEZONE="`cat $TMP/tz`"
+ rm -f $TMP/tz
+
+ setzone $TIMEZONE
+ exit
+else
+ ###
+ ### use text prompts
+ ###
+ while [ 0 ]; do
+ echo -n "Would you like to configure your timezone ([y]es, [n]o)? "
+ read TIMECONF;
+ echo
+
+ if [ "$TIMECONF" = "n" ]; then
+ break
+ fi
+
+ cat << EOF
+Select one of these timezones:
+
diff --git a/patches/source/glibc-zoneinfo/timezone-scripts/parts/03 b/patches/source/glibc-zoneinfo/timezone-scripts/parts/03
new file mode 100644
index 000000000..f595dfab0
--- /dev/null
+++ b/patches/source/glibc-zoneinfo/timezone-scripts/parts/03
@@ -0,0 +1,585 @@
+US/Alaska
+US/Aleutian
+US/Arizona
+US/Central
+US/East-Indiana
+US/Eastern
+US/Hawaii
+US/Indiana-Starke
+US/Michigan
+US/Mountain
+US/Pacific
+US/Pacific-New
+US/Samoa
+Africa/Abidjan
+Africa/Accra
+Africa/Addis_Ababa
+Africa/Algiers
+Africa/Asmara
+Africa/Asmera
+Africa/Bamako
+Africa/Bangui
+Africa/Banjul
+Africa/Bissau
+Africa/Blantyre
+Africa/Brazzaville
+Africa/Bujumbura
+Africa/Cairo
+Africa/Casablanca
+Africa/Ceuta
+Africa/Conakry
+Africa/Dakar
+Africa/Dar_es_Salaam
+Africa/Djibouti
+Africa/Douala
+Africa/El_Aaiun
+Africa/Freetown
+Africa/Gaborone
+Africa/Harare
+Africa/Johannesburg
+Africa/Juba
+Africa/Kampala
+Africa/Khartoum
+Africa/Kigali
+Africa/Kinshasa
+Africa/Lagos
+Africa/Libreville
+Africa/Lome
+Africa/Luanda
+Africa/Lubumbashi
+Africa/Lusaka
+Africa/Malabo
+Africa/Maputo
+Africa/Maseru
+Africa/Mbabane
+Africa/Mogadishu
+Africa/Monrovia
+Africa/Nairobi
+Africa/Ndjamena
+Africa/Niamey
+Africa/Nouakchott
+Africa/Ouagadougou
+Africa/Porto-Novo
+Africa/Sao_Tome
+Africa/Timbuktu
+Africa/Tripoli
+Africa/Tunis
+Africa/Windhoek
+America/Adak
+America/Anchorage
+America/Anguilla
+America/Antigua
+America/Araguaina
+America/Argentina/Buenos_Aires
+America/Argentina/Catamarca
+America/Argentina/ComodRivadavia
+America/Argentina/Cordoba
+America/Argentina/Jujuy
+America/Argentina/La_Rioja
+America/Argentina/Mendoza
+America/Argentina/Rio_Gallegos
+America/Argentina/Salta
+America/Argentina/San_Juan
+America/Argentina/San_Luis
+America/Argentina/Tucuman
+America/Argentina/Ushuaia
+America/Aruba
+America/Asuncion
+America/Atikokan
+America/Atka
+America/Bahia
+America/Bahia_Banderas
+America/Barbados
+America/Belem
+America/Belize
+America/Blanc-Sablon
+America/Boa_Vista
+America/Bogota
+America/Boise
+America/Buenos_Aires
+America/Cambridge_Bay
+America/Campo_Grande
+America/Cancun
+America/Caracas
+America/Catamarca
+America/Cayenne
+America/Cayman
+America/Chicago
+America/Chihuahua
+America/Coral_Harbour
+America/Cordoba
+America/Costa_Rica
+America/Creston
+America/Cuiaba
+America/Curacao
+America/Danmarkshavn
+America/Dawson
+America/Dawson_Creek
+America/Denver
+America/Detroit
+America/Dominica
+America/Edmonton
+America/Eirunepe
+America/El_Salvador
+America/Ensenada
+America/Fort_Nelson
+America/Fort_Wayne
+America/Fortaleza
+America/Glace_Bay
+America/Godthab
+America/Goose_Bay
+America/Grand_Turk
+America/Grenada
+America/Guadeloupe
+America/Guatemala
+America/Guayaquil
+America/Guyana
+America/Halifax
+America/Havana
+America/Hermosillo
+America/Indiana/Indianapolis
+America/Indiana/Knox
+America/Indiana/Marengo
+America/Indiana/Petersburg
+America/Indiana/Tell_City
+America/Indiana/Vevay
+America/Indiana/Vincennes
+America/Indiana/Winamac
+America/Indianapolis
+America/Inuvik
+America/Iqaluit
+America/Jamaica
+America/Jujuy
+America/Juneau
+America/Kentucky/Louisville
+America/Kentucky/Monticello
+America/Knox_IN
+America/Kralendijk
+America/La_Paz
+America/Lima
+America/Los_Angeles
+America/Louisville
+America/Lower_Princes
+America/Maceio
+America/Managua
+America/Manaus
+America/Marigot
+America/Martinique
+America/Matamoros
+America/Mazatlan
+America/Mendoza
+America/Menominee
+America/Merida
+America/Metlakatla
+America/Mexico_City
+America/Miquelon
+America/Moncton
+America/Monterrey
+America/Montevideo
+America/Montreal
+America/Montserrat
+America/Nassau
+America/New_York
+America/Nipigon
+America/Nome
+America/Noronha
+America/North_Dakota/Beulah
+America/North_Dakota/Center
+America/North_Dakota/New_Salem
+America/Ojinaga
+America/Panama
+America/Pangnirtung
+America/Paramaribo
+America/Phoenix
+America/Port-au-Prince
+America/Port_of_Spain
+America/Porto_Acre
+America/Porto_Velho
+America/Puerto_Rico
+America/Rainy_River
+America/Rankin_Inlet
+America/Recife
+America/Regina
+America/Resolute
+America/Rio_Branco
+America/Rosario
+America/Santa_Isabel
+America/Santarem
+America/Santiago
+America/Santo_Domingo
+America/Sao_Paulo
+America/Scoresbysund
+America/Shiprock
+America/Sitka
+America/St_Barthelemy
+America/St_Johns
+America/St_Kitts
+America/St_Lucia
+America/St_Thomas
+America/St_Vincent
+America/Swift_Current
+America/Tegucigalpa
+America/Thule
+America/Thunder_Bay
+America/Tijuana
+America/Toronto
+America/Tortola
+America/Vancouver
+America/Virgin
+America/Whitehorse
+America/Winnipeg
+America/Yakutat
+America/Yellowknife
+Antarctica/Casey
+Antarctica/Davis
+Antarctica/DumontDUrville
+Antarctica/Macquarie
+Antarctica/Mawson
+Antarctica/McMurdo
+Antarctica/Palmer
+Antarctica/Rothera
+Antarctica/South_Pole
+Antarctica/Syowa
+Antarctica/Troll
+Antarctica/Vostok
+Arctic/Longyearbyen
+Asia/Aden
+Asia/Almaty
+Asia/Amman
+Asia/Anadyr
+Asia/Aqtau
+Asia/Aqtobe
+Asia/Ashgabat
+Asia/Ashkhabad
+Asia/Baghdad
+Asia/Bahrain
+Asia/Baku
+Asia/Bangkok
+Asia/Beirut
+Asia/Bishkek
+Asia/Brunei
+Asia/Calcutta
+Asia/Chita
+Asia/Choibalsan
+Asia/Chongqing
+Asia/Chungking
+Asia/Colombo
+Asia/Dacca
+Asia/Damascus
+Asia/Dhaka
+Asia/Dili
+Asia/Dubai
+Asia/Dushanbe
+Asia/Gaza
+Asia/Harbin
+Asia/Hebron
+Asia/Ho_Chi_Minh
+Asia/Hong_Kong
+Asia/Hovd
+Asia/Irkutsk
+Asia/Istanbul
+Asia/Jakarta
+Asia/Jayapura
+Asia/Jerusalem
+Asia/Kabul
+Asia/Kamchatka
+Asia/Karachi
+Asia/Kashgar
+Asia/Kathmandu
+Asia/Katmandu
+Asia/Khandyga
+Asia/Kolkata
+Asia/Krasnoyarsk
+Asia/Kuala_Lumpur
+Asia/Kuching
+Asia/Kuwait
+Asia/Macao
+Asia/Macau
+Asia/Magadan
+Asia/Makassar
+Asia/Manila
+Asia/Muscat
+Asia/Nicosia
+Asia/Novokuznetsk
+Asia/Novosibirsk
+Asia/Omsk
+Asia/Oral
+Asia/Phnom_Penh
+Asia/Pontianak
+Asia/Pyongyang
+Asia/Qatar
+Asia/Qyzylorda
+Asia/Rangoon
+Asia/Riyadh
+Asia/Saigon
+Asia/Sakhalin
+Asia/Samarkand
+Asia/Seoul
+Asia/Shanghai
+Asia/Singapore
+Asia/Srednekolymsk
+Asia/Taipei
+Asia/Tashkent
+Asia/Tbilisi
+Asia/Tehran
+Asia/Tel_Aviv
+Asia/Thimbu
+Asia/Thimphu
+Asia/Tokyo
+Asia/Ujung_Pandang
+Asia/Ulaanbaatar
+Asia/Ulan_Bator
+Asia/Urumqi
+Asia/Ust-Nera
+Asia/Vientiane
+Asia/Vladivostok
+Asia/Yakutsk
+Asia/Yekaterinburg
+Asia/Yerevan
+Atlantic/Azores
+Atlantic/Bermuda
+Atlantic/Canary
+Atlantic/Cape_Verde
+Atlantic/Faeroe
+Atlantic/Faroe
+Atlantic/Jan_Mayen
+Atlantic/Madeira
+Atlantic/Reykjavik
+Atlantic/South_Georgia
+Atlantic/St_Helena
+Atlantic/Stanley
+Australia/ACT
+Australia/Adelaide
+Australia/Brisbane
+Australia/Broken_Hill
+Australia/Canberra
+Australia/Currie
+Australia/Darwin
+Australia/Eucla
+Australia/Hobart
+Australia/LHI
+Australia/Lindeman
+Australia/Lord_Howe
+Australia/Melbourne
+Australia/NSW
+Australia/North
+Australia/Perth
+Australia/Queensland
+Australia/South
+Australia/Sydney
+Australia/Tasmania
+Australia/Victoria
+Australia/West
+Australia/Yancowinna
+Brazil/Acre
+Brazil/DeNoronha
+Brazil/East
+Brazil/West
+CET
+CST6CDT
+Canada/Atlantic
+Canada/Central
+Canada/East-Saskatchewan
+Canada/Eastern
+Canada/Mountain
+Canada/Newfoundland
+Canada/Pacific
+Canada/Saskatchewan
+Canada/Yukon
+Chile/Continental
+Chile/EasterIsland
+Cuba
+EET
+EST
+EST5EDT
+Egypt
+Eire
+Etc/GMT
+Etc/GMT+0
+Etc/GMT+1
+Etc/GMT+10
+Etc/GMT+11
+Etc/GMT+12
+Etc/GMT+2
+Etc/GMT+3
+Etc/GMT+4
+Etc/GMT+5
+Etc/GMT+6
+Etc/GMT+7
+Etc/GMT+8
+Etc/GMT+9
+Etc/GMT-0
+Etc/GMT-1
+Etc/GMT-10
+Etc/GMT-11
+Etc/GMT-12
+Etc/GMT-13
+Etc/GMT-14
+Etc/GMT-2
+Etc/GMT-3
+Etc/GMT-4
+Etc/GMT-5
+Etc/GMT-6
+Etc/GMT-7
+Etc/GMT-8
+Etc/GMT-9
+Etc/GMT0
+Etc/Greenwich
+Etc/UCT
+Etc/UTC
+Etc/Universal
+Etc/Zulu
+Europe/Amsterdam
+Europe/Andorra
+Europe/Athens
+Europe/Belfast
+Europe/Belgrade
+Europe/Berlin
+Europe/Bratislava
+Europe/Brussels
+Europe/Bucharest
+Europe/Budapest
+Europe/Busingen
+Europe/Chisinau
+Europe/Copenhagen
+Europe/Dublin
+Europe/Gibraltar
+Europe/Guernsey
+Europe/Helsinki
+Europe/Isle_of_Man
+Europe/Istanbul
+Europe/Jersey
+Europe/Kaliningrad
+Europe/Kiev
+Europe/Lisbon
+Europe/Ljubljana
+Europe/London
+Europe/Luxembourg
+Europe/Madrid
+Europe/Malta
+Europe/Mariehamn
+Europe/Minsk
+Europe/Monaco
+Europe/Moscow
+Europe/Nicosia
+Europe/Oslo
+Europe/Paris
+Europe/Podgorica
+Europe/Prague
+Europe/Riga
+Europe/Rome
+Europe/Samara
+Europe/San_Marino
+Europe/Sarajevo
+Europe/Simferopol
+Europe/Skopje
+Europe/Sofia
+Europe/Stockholm
+Europe/Tallinn
+Europe/Tirane
+Europe/Tiraspol
+Europe/Uzhgorod
+Europe/Vaduz
+Europe/Vatican
+Europe/Vienna
+Europe/Vilnius
+Europe/Volgograd
+Europe/Warsaw
+Europe/Zagreb
+Europe/Zaporozhye
+Europe/Zurich
+Factory
+GB
+GB-Eire
+GMT
+GMT+0
+GMT-0
+GMT0
+Greenwich
+HST
+Hongkong
+Iceland
+Indian/Antananarivo
+Indian/Chagos
+Indian/Christmas
+Indian/Cocos
+Indian/Comoro
+Indian/Kerguelen
+Indian/Mahe
+Indian/Maldives
+Indian/Mauritius
+Indian/Mayotte
+Indian/Reunion
+Iran
+Israel
+Jamaica
+Japan
+Kwajalein
+Libya
+MET
+MST
+MST7MDT
+Mexico/BajaNorte
+Mexico/BajaSur
+Mexico/General
+NZ
+NZ-CHAT
+Navajo
+PRC
+PST8PDT
+Pacific/Apia
+Pacific/Auckland
+Pacific/Bougainville
+Pacific/Chatham
+Pacific/Chuuk
+Pacific/Easter
+Pacific/Efate
+Pacific/Enderbury
+Pacific/Fakaofo
+Pacific/Fiji
+Pacific/Funafuti
+Pacific/Galapagos
+Pacific/Gambier
+Pacific/Guadalcanal
+Pacific/Guam
+Pacific/Honolulu
+Pacific/Johnston
+Pacific/Kiritimati
+Pacific/Kosrae
+Pacific/Kwajalein
+Pacific/Majuro
+Pacific/Marquesas
+Pacific/Midway
+Pacific/Nauru
+Pacific/Niue
+Pacific/Norfolk
+Pacific/Noumea
+Pacific/Pago_Pago
+Pacific/Palau
+Pacific/Pitcairn
+Pacific/Pohnpei
+Pacific/Ponape
+Pacific/Port_Moresby
+Pacific/Rarotonga
+Pacific/Saipan
+Pacific/Samoa
+Pacific/Tahiti
+Pacific/Tarawa
+Pacific/Tongatapu
+Pacific/Truk
+Pacific/Wake
+Pacific/Wallis
+Pacific/Yap
+Poland
+Portugal
+ROC
+ROK
+Singapore
+Turkey
+UCT
+UTC
+Universal
+W-SU
+WET
+Zulu
+posixrules
diff --git a/patches/source/glibc-zoneinfo/timezone-scripts/parts/04 b/patches/source/glibc-zoneinfo/timezone-scripts/parts/04
new file mode 100644
index 000000000..5b0da0e83
--- /dev/null
+++ b/patches/source/glibc-zoneinfo/timezone-scripts/parts/04
@@ -0,0 +1,33 @@
+
+Type it at the prompt below exactly as it appears above. (NOTE: If you don't
+see your timezone, use "timeconfig" again after booting for the verbose list)
+
+EOF
+ echo -n "Timezone? "
+ read TIMEZONE;
+ echo
+
+ if [ -n "$TIMEZONE" -a \
+ -r $T_PX/usr/share/zoneinfo/$TIMEZONE -o \
+ -r /var/log/mount/usr/share/zoneinfo/$TIMEZONE -o \
+ -L $T_PX/usr/share/zoneinfo/$TIMEZONE -o \
+ -L /var/log/mount/usr/share/zoneinfo/$TIMEZONE ]; then
+ echo "Creating link from $TIMEZONE to localtime in /etc..."
+ echo
+ setzone $TIMEZONE
+ exit
+ else
+ cat << EOF
+
+Timezone $TIMEZONE could not be found. You may try again if you wish.
+Make sure you type the name exactly as it appears - this configuration script
+is case sensitive.
+
+Press [enter] to continue.
+
+EOF
+ read JUNK;
+ fi
+ done
+fi
+
diff --git a/patches/source/glibc-zoneinfo/timezone-scripts/parts/README b/patches/source/glibc-zoneinfo/timezone-scripts/parts/README
new file mode 100644
index 000000000..80d5cf5b4
--- /dev/null
+++ b/patches/source/glibc-zoneinfo/timezone-scripts/parts/README
@@ -0,0 +1,2 @@
+Files 01 and 03 are samples, showing the format, and are
+not necessarily up to date...
diff --git a/patches/source/glibc-zoneinfo/timezone-scripts/setup.timeconfig b/patches/source/glibc-zoneinfo/timezone-scripts/setup.timeconfig
new file mode 100644
index 000000000..81ff7055f
--- /dev/null
+++ b/patches/source/glibc-zoneinfo/timezone-scripts/setup.timeconfig
@@ -0,0 +1,3 @@
+#!/bin/sh
+#BLURB="Select your timezone"
+sh usr/sbin/timeconfig $*
diff --git a/patches/source/glibc-zoneinfo/timezone-scripts/timeconfig b/patches/source/glibc-zoneinfo/timezone-scripts/timeconfig
new file mode 100644
index 000000000..0fa59ac02
--- /dev/null
+++ b/patches/source/glibc-zoneinfo/timezone-scripts/timeconfig
@@ -0,0 +1,1363 @@
+#!/bin/sh
+#
+# timeconfig Slackware Linux timezone configuration utility.
+#
+# Author: Patrick Volkerding <volkerdi@slackware.com>
+# Modified by: David Cantrell <david@slackware.com>, 06-Oct-2000
+#
+# ChangeLog:
+# 2014-10-22: Updated timezones from tzdata2014i. <pjv>
+# 2012-12-12: Updated timezones from tzdata2012j. <pjv>
+# 2008-03-10: Updated timezones from tzdata2008a. <pjv>
+# 2007-12-21: Updated timezones from tzdata2007j. <pjv>
+# 2006-12-03: Updated timezones from tzdata2006p. <pjv>
+# 2006-09-14: Updated timezones from tzdata2006k. <pjv>
+# 2006-08-22: Updated timezones from tzdata2006j.
+# 2006-08-13: Updated timezones from tzdata2006g.
+# 2006-03-13: Updated timezones from tzdata2006c.
+# 19-Feb-2001 Add new timezones from glibc-2.2.2.
+# 06-Oct-2000 Fixed a problem with selecting UTC time. It was writing
+# the hardwareclock file to the root disk and not your dest
+# partition. Changed the HWCLOCK_CONF variable to be
+# $T_PX/etc/hardwareclock to fix this. Thanks to David L.
+# Dickman <softbear@optonline.net> for finding this and
+# submitting a patch.
+#
+# 15-Mar-2000 Added the writeconf function to write out the
+# /etc/hardwareclock file which tells what the hardware clock
+# is set to (UTC or localtime).
+#
+# 03-Mar-2000 Reorganized script. Made one timezone set block, added
+# stage that asks the user if the hardware clock is set to
+# UTC.
+
+# setup our temp locations and variables
+TMP=/var/log/setup/tmp
+if [ -r $TMP/SeTT_PX ]; then
+ T_PX="`cat $TMP/SeTT_PX`"
+elif [ ! "$!" = "" ]; then
+ T_PX=$1
+else
+ T_PX=/
+fi
+
+# the hardware clock configuration file
+HWCLOCK_CONF=$T_PX/etc/hardwareclock
+
+# setzone( $TIMEZONE )
+#
+# This function accepts a time zone as the only parameter and sets it as
+# the default system time zone.
+setzone()
+{
+ TZ=$1
+
+ cd $T_PX/etc
+ if [ -r $T_PX/usr/share/zoneinfo/$TZ -o \
+ -r /var/log/mount/usr/share/zoneinfo/$TZ -o \
+ -L $T_PX/usr/share/zoneinfo/$TZ -o \
+ -L /var/log/mount/usr/share/zoneinfo/$TZ ]; then
+ rm -f localtime-copied-from
+ ln -sf /usr/share/zoneinfo/$TZ localtime-copied-from
+ rm -f localtime
+ cd ..
+ chroot . cp etc/localtime-copied-from etc/localtime
+ fi
+}
+
+# writeconf( $CLOCK_SET_TO )
+#
+# Writes out $HWCLOCK_CONF that tells rc.S how the hardware clock
+# value is stored.
+writeconf()
+{
+ echo "# /etc/hardwareclock" > $HWCLOCK_CONF
+ echo "#" >> $HWCLOCK_CONF
+ echo "# Tells how the hardware clock time is stored." >> $HWCLOCK_CONF
+ echo "# You should run timeconfig to edit this file." >> $HWCLOCK_CONF
+ echo >> $HWCLOCK_CONF
+ echo $1 >> $HWCLOCK_CONF
+}
+
+# ask the user if the hardware clock is set for UTC/GMT
+if [ "$COLOR" = "on" -o -r $TMP/SeTcolor -o "$T_PX" = "/" ]; then
+ ###
+ ### use color menus here
+ ###
+ dialog --title "HARDWARE CLOCK SET TO UTC?" --menu "Is the hardware clock set \
+to Coordinated Universal Time (UTC/GMT)? If it is, select YES here. If the \
+hardware clock is set to the current local time (this is how most PCs are set \
+up), then say NO here. If you are not sure what this is, you should answer NO \
+here." 13 60 2 \
+ "NO" "Hardware clock is set to local time" \
+ "YES" "Hardware clock is set to UTC" \
+ 2> $TMP/utc
+ if [ $? = 1 -o $? = 255 ]; then
+ rm -f $TMP/utc
+ exit
+ fi
+ if [ "`cat $TMP/utc`" = "YES" ]; then
+ # yes, the hardware clock is UTC
+ writeconf "UTC"
+ else # must be NO
+ writeconf "localtime"
+ fi
+ rm -f $TMP/utc
+else
+ ###
+ ### use text prompts
+ ###
+ echo "Is the hardware clock set to Coordinated Universal Time (UTC/GMT)?"
+ echo "If it is, select 'y' here. If the hardware clock is set to the"
+ echo "current local time (this is how most PCs are set up), then say 'n'"
+ echo "here. If you are not sure what this is, you should answer 'n' here."
+ echo
+ echo -n "Is your hardware clock set to UTC ([y]es, [n]o)? "
+ read HEJAZ
+
+ if [ "$HEJAZ" = "y" -o "$HEJAZ" = "Y" -o "$HEJAZ" = "YES" -o "$HEJAZ" = "yes" ]; then
+ # yes, the hardware clock is UTC
+ writeconf "UTC"
+ else
+ # default to localtime
+ writeconf "localtime"
+ fi
+fi
+
+# Now set the correct timezone link:
+if [ "$COLOR" = "on" -o -r $TMP/SeTcolor -o "$T_PX" = "/" ]; then
+ ###
+ ### use color menus here
+ ###
+ dialog --title "TIMEZONE CONFIGURATION" --menu "Please select one of the following timezones for your machine:" 21 50 13 \
+"US/Alaska" " " \
+"US/Aleutian" " " \
+"US/Arizona" " " \
+"US/Central" " " \
+"US/East-Indiana" " " \
+"US/Eastern" " " \
+"US/Hawaii" " " \
+"US/Indiana-Starke" " " \
+"US/Michigan" " " \
+"US/Mountain" " " \
+"US/Pacific" " " \
+"US/Pacific-New" " " \
+"US/Samoa" " " \
+"Africa/Abidjan" " " \
+"Africa/Accra" " " \
+"Africa/Addis_Ababa" " " \
+"Africa/Algiers" " " \
+"Africa/Asmara" " " \
+"Africa/Asmera" " " \
+"Africa/Bamako" " " \
+"Africa/Bangui" " " \
+"Africa/Banjul" " " \
+"Africa/Bissau" " " \
+"Africa/Blantyre" " " \
+"Africa/Brazzaville" " " \
+"Africa/Bujumbura" " " \
+"Africa/Cairo" " " \
+"Africa/Casablanca" " " \
+"Africa/Ceuta" " " \
+"Africa/Conakry" " " \
+"Africa/Dakar" " " \
+"Africa/Dar_es_Salaam" " " \
+"Africa/Djibouti" " " \
+"Africa/Douala" " " \
+"Africa/El_Aaiun" " " \
+"Africa/Freetown" " " \
+"Africa/Gaborone" " " \
+"Africa/Harare" " " \
+"Africa/Johannesburg" " " \
+"Africa/Juba" " " \
+"Africa/Kampala" " " \
+"Africa/Khartoum" " " \
+"Africa/Kigali" " " \
+"Africa/Kinshasa" " " \
+"Africa/Lagos" " " \
+"Africa/Libreville" " " \
+"Africa/Lome" " " \
+"Africa/Luanda" " " \
+"Africa/Lubumbashi" " " \
+"Africa/Lusaka" " " \
+"Africa/Malabo" " " \
+"Africa/Maputo" " " \
+"Africa/Maseru" " " \
+"Africa/Mbabane" " " \
+"Africa/Mogadishu" " " \
+"Africa/Monrovia" " " \
+"Africa/Nairobi" " " \
+"Africa/Ndjamena" " " \
+"Africa/Niamey" " " \
+"Africa/Nouakchott" " " \
+"Africa/Ouagadougou" " " \
+"Africa/Porto-Novo" " " \
+"Africa/Sao_Tome" " " \
+"Africa/Timbuktu" " " \
+"Africa/Tripoli" " " \
+"Africa/Tunis" " " \
+"Africa/Windhoek" " " \
+"America/Adak" " " \
+"America/Anchorage" " " \
+"America/Anguilla" " " \
+"America/Antigua" " " \
+"America/Araguaina" " " \
+"America/Argentina/Buenos_Aires" " " \
+"America/Argentina/Catamarca" " " \
+"America/Argentina/ComodRivadavia" " " \
+"America/Argentina/Cordoba" " " \
+"America/Argentina/Jujuy" " " \
+"America/Argentina/La_Rioja" " " \
+"America/Argentina/Mendoza" " " \
+"America/Argentina/Rio_Gallegos" " " \
+"America/Argentina/Salta" " " \
+"America/Argentina/San_Juan" " " \
+"America/Argentina/San_Luis" " " \
+"America/Argentina/Tucuman" " " \
+"America/Argentina/Ushuaia" " " \
+"America/Aruba" " " \
+"America/Asuncion" " " \
+"America/Atikokan" " " \
+"America/Atka" " " \
+"America/Bahia" " " \
+"America/Bahia_Banderas" " " \
+"America/Barbados" " " \
+"America/Belem" " " \
+"America/Belize" " " \
+"America/Blanc-Sablon" " " \
+"America/Boa_Vista" " " \
+"America/Bogota" " " \
+"America/Boise" " " \
+"America/Buenos_Aires" " " \
+"America/Cambridge_Bay" " " \
+"America/Campo_Grande" " " \
+"America/Cancun" " " \
+"America/Caracas" " " \
+"America/Catamarca" " " \
+"America/Cayenne" " " \
+"America/Cayman" " " \
+"America/Chicago" " " \
+"America/Chihuahua" " " \
+"America/Coral_Harbour" " " \
+"America/Cordoba" " " \
+"America/Costa_Rica" " " \
+"America/Creston" " " \
+"America/Cuiaba" " " \
+"America/Curacao" " " \
+"America/Danmarkshavn" " " \
+"America/Dawson" " " \
+"America/Dawson_Creek" " " \
+"America/Denver" " " \
+"America/Detroit" " " \
+"America/Dominica" " " \
+"America/Edmonton" " " \
+"America/Eirunepe" " " \
+"America/El_Salvador" " " \
+"America/Ensenada" " " \
+"America/Fort_Nelson" " " \
+"America/Fort_Wayne" " " \
+"America/Fortaleza" " " \
+"America/Glace_Bay" " " \
+"America/Godthab" " " \
+"America/Goose_Bay" " " \
+"America/Grand_Turk" " " \
+"America/Grenada" " " \
+"America/Guadeloupe" " " \
+"America/Guatemala" " " \
+"America/Guayaquil" " " \
+"America/Guyana" " " \
+"America/Halifax" " " \
+"America/Havana" " " \
+"America/Hermosillo" " " \
+"America/Indiana/Indianapolis" " " \
+"America/Indiana/Knox" " " \
+"America/Indiana/Marengo" " " \
+"America/Indiana/Petersburg" " " \
+"America/Indiana/Tell_City" " " \
+"America/Indiana/Vevay" " " \
+"America/Indiana/Vincennes" " " \
+"America/Indiana/Winamac" " " \
+"America/Indianapolis" " " \
+"America/Inuvik" " " \
+"America/Iqaluit" " " \
+"America/Jamaica" " " \
+"America/Jujuy" " " \
+"America/Juneau" " " \
+"America/Kentucky/Louisville" " " \
+"America/Kentucky/Monticello" " " \
+"America/Knox_IN" " " \
+"America/Kralendijk" " " \
+"America/La_Paz" " " \
+"America/Lima" " " \
+"America/Los_Angeles" " " \
+"America/Louisville" " " \
+"America/Lower_Princes" " " \
+"America/Maceio" " " \
+"America/Managua" " " \
+"America/Manaus" " " \
+"America/Marigot" " " \
+"America/Martinique" " " \
+"America/Matamoros" " " \
+"America/Mazatlan" " " \
+"America/Mendoza" " " \
+"America/Menominee" " " \
+"America/Merida" " " \
+"America/Metlakatla" " " \
+"America/Mexico_City" " " \
+"America/Miquelon" " " \
+"America/Moncton" " " \
+"America/Monterrey" " " \
+"America/Montevideo" " " \
+"America/Montreal" " " \
+"America/Montserrat" " " \
+"America/Nassau" " " \
+"America/New_York" " " \
+"America/Nipigon" " " \
+"America/Nome" " " \
+"America/Noronha" " " \
+"America/North_Dakota/Beulah" " " \
+"America/North_Dakota/Center" " " \
+"America/North_Dakota/New_Salem" " " \
+"America/Ojinaga" " " \
+"America/Panama" " " \
+"America/Pangnirtung" " " \
+"America/Paramaribo" " " \
+"America/Phoenix" " " \
+"America/Port-au-Prince" " " \
+"America/Port_of_Spain" " " \
+"America/Porto_Acre" " " \
+"America/Porto_Velho" " " \
+"America/Puerto_Rico" " " \
+"America/Rainy_River" " " \
+"America/Rankin_Inlet" " " \
+"America/Recife" " " \
+"America/Regina" " " \
+"America/Resolute" " " \
+"America/Rio_Branco" " " \
+"America/Rosario" " " \
+"America/Santa_Isabel" " " \
+"America/Santarem" " " \
+"America/Santiago" " " \
+"America/Santo_Domingo" " " \
+"America/Sao_Paulo" " " \
+"America/Scoresbysund" " " \
+"America/Shiprock" " " \
+"America/Sitka" " " \
+"America/St_Barthelemy" " " \
+"America/St_Johns" " " \
+"America/St_Kitts" " " \
+"America/St_Lucia" " " \
+"America/St_Thomas" " " \
+"America/St_Vincent" " " \
+"America/Swift_Current" " " \
+"America/Tegucigalpa" " " \
+"America/Thule" " " \
+"America/Thunder_Bay" " " \
+"America/Tijuana" " " \
+"America/Toronto" " " \
+"America/Tortola" " " \
+"America/Vancouver" " " \
+"America/Virgin" " " \
+"America/Whitehorse" " " \
+"America/Winnipeg" " " \
+"America/Yakutat" " " \
+"America/Yellowknife" " " \
+"Antarctica/Casey" " " \
+"Antarctica/Davis" " " \
+"Antarctica/DumontDUrville" " " \
+"Antarctica/Macquarie" " " \
+"Antarctica/Mawson" " " \
+"Antarctica/McMurdo" " " \
+"Antarctica/Palmer" " " \
+"Antarctica/Rothera" " " \
+"Antarctica/South_Pole" " " \
+"Antarctica/Syowa" " " \
+"Antarctica/Troll" " " \
+"Antarctica/Vostok" " " \
+"Arctic/Longyearbyen" " " \
+"Asia/Aden" " " \
+"Asia/Almaty" " " \
+"Asia/Amman" " " \
+"Asia/Anadyr" " " \
+"Asia/Aqtau" " " \
+"Asia/Aqtobe" " " \
+"Asia/Ashgabat" " " \
+"Asia/Ashkhabad" " " \
+"Asia/Baghdad" " " \
+"Asia/Bahrain" " " \
+"Asia/Baku" " " \
+"Asia/Bangkok" " " \
+"Asia/Beirut" " " \
+"Asia/Bishkek" " " \
+"Asia/Brunei" " " \
+"Asia/Calcutta" " " \
+"Asia/Chita" " " \
+"Asia/Choibalsan" " " \
+"Asia/Chongqing" " " \
+"Asia/Chungking" " " \
+"Asia/Colombo" " " \
+"Asia/Dacca" " " \
+"Asia/Damascus" " " \
+"Asia/Dhaka" " " \
+"Asia/Dili" " " \
+"Asia/Dubai" " " \
+"Asia/Dushanbe" " " \
+"Asia/Gaza" " " \
+"Asia/Harbin" " " \
+"Asia/Hebron" " " \
+"Asia/Ho_Chi_Minh" " " \
+"Asia/Hong_Kong" " " \
+"Asia/Hovd" " " \
+"Asia/Irkutsk" " " \
+"Asia/Istanbul" " " \
+"Asia/Jakarta" " " \
+"Asia/Jayapura" " " \
+"Asia/Jerusalem" " " \
+"Asia/Kabul" " " \
+"Asia/Kamchatka" " " \
+"Asia/Karachi" " " \
+"Asia/Kashgar" " " \
+"Asia/Kathmandu" " " \
+"Asia/Katmandu" " " \
+"Asia/Khandyga" " " \
+"Asia/Kolkata" " " \
+"Asia/Krasnoyarsk" " " \
+"Asia/Kuala_Lumpur" " " \
+"Asia/Kuching" " " \
+"Asia/Kuwait" " " \
+"Asia/Macao" " " \
+"Asia/Macau" " " \
+"Asia/Magadan" " " \
+"Asia/Makassar" " " \
+"Asia/Manila" " " \
+"Asia/Muscat" " " \
+"Asia/Nicosia" " " \
+"Asia/Novokuznetsk" " " \
+"Asia/Novosibirsk" " " \
+"Asia/Omsk" " " \
+"Asia/Oral" " " \
+"Asia/Phnom_Penh" " " \
+"Asia/Pontianak" " " \
+"Asia/Pyongyang" " " \
+"Asia/Qatar" " " \
+"Asia/Qyzylorda" " " \
+"Asia/Rangoon" " " \
+"Asia/Riyadh" " " \
+"Asia/Saigon" " " \
+"Asia/Sakhalin" " " \
+"Asia/Samarkand" " " \
+"Asia/Seoul" " " \
+"Asia/Shanghai" " " \
+"Asia/Singapore" " " \
+"Asia/Srednekolymsk" " " \
+"Asia/Taipei" " " \
+"Asia/Tashkent" " " \
+"Asia/Tbilisi" " " \
+"Asia/Tehran" " " \
+"Asia/Tel_Aviv" " " \
+"Asia/Thimbu" " " \
+"Asia/Thimphu" " " \
+"Asia/Tokyo" " " \
+"Asia/Ujung_Pandang" " " \
+"Asia/Ulaanbaatar" " " \
+"Asia/Ulan_Bator" " " \
+"Asia/Urumqi" " " \
+"Asia/Ust-Nera" " " \
+"Asia/Vientiane" " " \
+"Asia/Vladivostok" " " \
+"Asia/Yakutsk" " " \
+"Asia/Yekaterinburg" " " \
+"Asia/Yerevan" " " \
+"Atlantic/Azores" " " \
+"Atlantic/Bermuda" " " \
+"Atlantic/Canary" " " \
+"Atlantic/Cape_Verde" " " \
+"Atlantic/Faeroe" " " \
+"Atlantic/Faroe" " " \
+"Atlantic/Jan_Mayen" " " \
+"Atlantic/Madeira" " " \
+"Atlantic/Reykjavik" " " \
+"Atlantic/South_Georgia" " " \
+"Atlantic/St_Helena" " " \
+"Atlantic/Stanley" " " \
+"Australia/ACT" " " \
+"Australia/Adelaide" " " \
+"Australia/Brisbane" " " \
+"Australia/Broken_Hill" " " \
+"Australia/Canberra" " " \
+"Australia/Currie" " " \
+"Australia/Darwin" " " \
+"Australia/Eucla" " " \
+"Australia/Hobart" " " \
+"Australia/LHI" " " \
+"Australia/Lindeman" " " \
+"Australia/Lord_Howe" " " \
+"Australia/Melbourne" " " \
+"Australia/NSW" " " \
+"Australia/North" " " \
+"Australia/Perth" " " \
+"Australia/Queensland" " " \
+"Australia/South" " " \
+"Australia/Sydney" " " \
+"Australia/Tasmania" " " \
+"Australia/Victoria" " " \
+"Australia/West" " " \
+"Australia/Yancowinna" " " \
+"Brazil/Acre" " " \
+"Brazil/DeNoronha" " " \
+"Brazil/East" " " \
+"Brazil/West" " " \
+"CET" " " \
+"CST6CDT" " " \
+"Canada/Atlantic" " " \
+"Canada/Central" " " \
+"Canada/East-Saskatchewan" " " \
+"Canada/Eastern" " " \
+"Canada/Mountain" " " \
+"Canada/Newfoundland" " " \
+"Canada/Pacific" " " \
+"Canada/Saskatchewan" " " \
+"Canada/Yukon" " " \
+"Chile/Continental" " " \
+"Chile/EasterIsland" " " \
+"Cuba" " " \
+"EET" " " \
+"EST" " " \
+"EST5EDT" " " \
+"Egypt" " " \
+"Eire" " " \
+"Etc/GMT" " " \
+"Etc/GMT+0" " " \
+"Etc/GMT+1" " " \
+"Etc/GMT+10" " " \
+"Etc/GMT+11" " " \
+"Etc/GMT+12" " " \
+"Etc/GMT+2" " " \
+"Etc/GMT+3" " " \
+"Etc/GMT+4" " " \
+"Etc/GMT+5" " " \
+"Etc/GMT+6" " " \
+"Etc/GMT+7" " " \
+"Etc/GMT+8" " " \
+"Etc/GMT+9" " " \
+"Etc/GMT-0" " " \
+"Etc/GMT-1" " " \
+"Etc/GMT-10" " " \
+"Etc/GMT-11" " " \
+"Etc/GMT-12" " " \
+"Etc/GMT-13" " " \
+"Etc/GMT-14" " " \
+"Etc/GMT-2" " " \
+"Etc/GMT-3" " " \
+"Etc/GMT-4" " " \
+"Etc/GMT-5" " " \
+"Etc/GMT-6" " " \
+"Etc/GMT-7" " " \
+"Etc/GMT-8" " " \
+"Etc/GMT-9" " " \
+"Etc/GMT0" " " \
+"Etc/Greenwich" " " \
+"Etc/UCT" " " \
+"Etc/UTC" " " \
+"Etc/Universal" " " \
+"Etc/Zulu" " " \
+"Europe/Amsterdam" " " \
+"Europe/Andorra" " " \
+"Europe/Athens" " " \
+"Europe/Belfast" " " \
+"Europe/Belgrade" " " \
+"Europe/Berlin" " " \
+"Europe/Bratislava" " " \
+"Europe/Brussels" " " \
+"Europe/Bucharest" " " \
+"Europe/Budapest" " " \
+"Europe/Busingen" " " \
+"Europe/Chisinau" " " \
+"Europe/Copenhagen" " " \
+"Europe/Dublin" " " \
+"Europe/Gibraltar" " " \
+"Europe/Guernsey" " " \
+"Europe/Helsinki" " " \
+"Europe/Isle_of_Man" " " \
+"Europe/Istanbul" " " \
+"Europe/Jersey" " " \
+"Europe/Kaliningrad" " " \
+"Europe/Kiev" " " \
+"Europe/Lisbon" " " \
+"Europe/Ljubljana" " " \
+"Europe/London" " " \
+"Europe/Luxembourg" " " \
+"Europe/Madrid" " " \
+"Europe/Malta" " " \
+"Europe/Mariehamn" " " \
+"Europe/Minsk" " " \
+"Europe/Monaco" " " \
+"Europe/Moscow" " " \
+"Europe/Nicosia" " " \
+"Europe/Oslo" " " \
+"Europe/Paris" " " \
+"Europe/Podgorica" " " \
+"Europe/Prague" " " \
+"Europe/Riga" " " \
+"Europe/Rome" " " \
+"Europe/Samara" " " \
+"Europe/San_Marino" " " \
+"Europe/Sarajevo" " " \
+"Europe/Simferopol" " " \
+"Europe/Skopje" " " \
+"Europe/Sofia" " " \
+"Europe/Stockholm" " " \
+"Europe/Tallinn" " " \
+"Europe/Tirane" " " \
+"Europe/Tiraspol" " " \
+"Europe/Uzhgorod" " " \
+"Europe/Vaduz" " " \
+"Europe/Vatican" " " \
+"Europe/Vienna" " " \
+"Europe/Vilnius" " " \
+"Europe/Volgograd" " " \
+"Europe/Warsaw" " " \
+"Europe/Zagreb" " " \
+"Europe/Zaporozhye" " " \
+"Europe/Zurich" " " \
+"Factory" " " \
+"GB" " " \
+"GB-Eire" " " \
+"GMT" " " \
+"GMT+0" " " \
+"GMT-0" " " \
+"GMT0" " " \
+"Greenwich" " " \
+"HST" " " \
+"Hongkong" " " \
+"Iceland" " " \
+"Indian/Antananarivo" " " \
+"Indian/Chagos" " " \
+"Indian/Christmas" " " \
+"Indian/Cocos" " " \
+"Indian/Comoro" " " \
+"Indian/Kerguelen" " " \
+"Indian/Mahe" " " \
+"Indian/Maldives" " " \
+"Indian/Mauritius" " " \
+"Indian/Mayotte" " " \
+"Indian/Reunion" " " \
+"Iran" " " \
+"Israel" " " \
+"Jamaica" " " \
+"Japan" " " \
+"Kwajalein" " " \
+"Libya" " " \
+"MET" " " \
+"MST" " " \
+"MST7MDT" " " \
+"Mexico/BajaNorte" " " \
+"Mexico/BajaSur" " " \
+"Mexico/General" " " \
+"NZ" " " \
+"NZ-CHAT" " " \
+"Navajo" " " \
+"PRC" " " \
+"PST8PDT" " " \
+"Pacific/Apia" " " \
+"Pacific/Auckland" " " \
+"Pacific/Bougainville" " " \
+"Pacific/Chatham" " " \
+"Pacific/Chuuk" " " \
+"Pacific/Easter" " " \
+"Pacific/Efate" " " \
+"Pacific/Enderbury" " " \
+"Pacific/Fakaofo" " " \
+"Pacific/Fiji" " " \
+"Pacific/Funafuti" " " \
+"Pacific/Galapagos" " " \
+"Pacific/Gambier" " " \
+"Pacific/Guadalcanal" " " \
+"Pacific/Guam" " " \
+"Pacific/Honolulu" " " \
+"Pacific/Johnston" " " \
+"Pacific/Kiritimati" " " \
+"Pacific/Kosrae" " " \
+"Pacific/Kwajalein" " " \
+"Pacific/Majuro" " " \
+"Pacific/Marquesas" " " \
+"Pacific/Midway" " " \
+"Pacific/Nauru" " " \
+"Pacific/Niue" " " \
+"Pacific/Norfolk" " " \
+"Pacific/Noumea" " " \
+"Pacific/Pago_Pago" " " \
+"Pacific/Palau" " " \
+"Pacific/Pitcairn" " " \
+"Pacific/Pohnpei" " " \
+"Pacific/Ponape" " " \
+"Pacific/Port_Moresby" " " \
+"Pacific/Rarotonga" " " \
+"Pacific/Saipan" " " \
+"Pacific/Samoa" " " \
+"Pacific/Tahiti" " " \
+"Pacific/Tarawa" " " \
+"Pacific/Tongatapu" " " \
+"Pacific/Truk" " " \
+"Pacific/Wake" " " \
+"Pacific/Wallis" " " \
+"Pacific/Yap" " " \
+"Poland" " " \
+"Portugal" " " \
+"ROC" " " \
+"ROK" " " \
+"Singapore" " " \
+"Turkey" " " \
+"UCT" " " \
+"UTC" " " \
+"Universal" " " \
+"W-SU" " " \
+"WET" " " \
+"Zulu" " " \
+"posixrules" " " \
+ 2> $TMP/tz
+
+ if [ $? = 1 -o $? = 255 ]; then
+ rm -f $TMP/tz
+ exit
+ fi
+
+ TIMEZONE="`cat $TMP/tz`"
+ rm -f $TMP/tz
+
+ setzone $TIMEZONE
+ exit
+else
+ ###
+ ### use text prompts
+ ###
+ while [ 0 ]; do
+ echo -n "Would you like to configure your timezone ([y]es, [n]o)? "
+ read TIMECONF;
+ echo
+
+ if [ "$TIMECONF" = "n" ]; then
+ break
+ fi
+
+ cat << EOF
+Select one of these timezones:
+
+US/Alaska
+US/Aleutian
+US/Arizona
+US/Central
+US/East-Indiana
+US/Eastern
+US/Hawaii
+US/Indiana-Starke
+US/Michigan
+US/Mountain
+US/Pacific
+US/Pacific-New
+US/Samoa
+Africa/Abidjan
+Africa/Accra
+Africa/Addis_Ababa
+Africa/Algiers
+Africa/Asmara
+Africa/Asmera
+Africa/Bamako
+Africa/Bangui
+Africa/Banjul
+Africa/Bissau
+Africa/Blantyre
+Africa/Brazzaville
+Africa/Bujumbura
+Africa/Cairo
+Africa/Casablanca
+Africa/Ceuta
+Africa/Conakry
+Africa/Dakar
+Africa/Dar_es_Salaam
+Africa/Djibouti
+Africa/Douala
+Africa/El_Aaiun
+Africa/Freetown
+Africa/Gaborone
+Africa/Harare
+Africa/Johannesburg
+Africa/Juba
+Africa/Kampala
+Africa/Khartoum
+Africa/Kigali
+Africa/Kinshasa
+Africa/Lagos
+Africa/Libreville
+Africa/Lome
+Africa/Luanda
+Africa/Lubumbashi
+Africa/Lusaka
+Africa/Malabo
+Africa/Maputo
+Africa/Maseru
+Africa/Mbabane
+Africa/Mogadishu
+Africa/Monrovia
+Africa/Nairobi
+Africa/Ndjamena
+Africa/Niamey
+Africa/Nouakchott
+Africa/Ouagadougou
+Africa/Porto-Novo
+Africa/Sao_Tome
+Africa/Timbuktu
+Africa/Tripoli
+Africa/Tunis
+Africa/Windhoek
+America/Adak
+America/Anchorage
+America/Anguilla
+America/Antigua
+America/Araguaina
+America/Argentina/Buenos_Aires
+America/Argentina/Catamarca
+America/Argentina/ComodRivadavia
+America/Argentina/Cordoba
+America/Argentina/Jujuy
+America/Argentina/La_Rioja
+America/Argentina/Mendoza
+America/Argentina/Rio_Gallegos
+America/Argentina/Salta
+America/Argentina/San_Juan
+America/Argentina/San_Luis
+America/Argentina/Tucuman
+America/Argentina/Ushuaia
+America/Aruba
+America/Asuncion
+America/Atikokan
+America/Atka
+America/Bahia
+America/Bahia_Banderas
+America/Barbados
+America/Belem
+America/Belize
+America/Blanc-Sablon
+America/Boa_Vista
+America/Bogota
+America/Boise
+America/Buenos_Aires
+America/Cambridge_Bay
+America/Campo_Grande
+America/Cancun
+America/Caracas
+America/Catamarca
+America/Cayenne
+America/Cayman
+America/Chicago
+America/Chihuahua
+America/Coral_Harbour
+America/Cordoba
+America/Costa_Rica
+America/Creston
+America/Cuiaba
+America/Curacao
+America/Danmarkshavn
+America/Dawson
+America/Dawson_Creek
+America/Denver
+America/Detroit
+America/Dominica
+America/Edmonton
+America/Eirunepe
+America/El_Salvador
+America/Ensenada
+America/Fort_Nelson
+America/Fort_Wayne
+America/Fortaleza
+America/Glace_Bay
+America/Godthab
+America/Goose_Bay
+America/Grand_Turk
+America/Grenada
+America/Guadeloupe
+America/Guatemala
+America/Guayaquil
+America/Guyana
+America/Halifax
+America/Havana
+America/Hermosillo
+America/Indiana/Indianapolis
+America/Indiana/Knox
+America/Indiana/Marengo
+America/Indiana/Petersburg
+America/Indiana/Tell_City
+America/Indiana/Vevay
+America/Indiana/Vincennes
+America/Indiana/Winamac
+America/Indianapolis
+America/Inuvik
+America/Iqaluit
+America/Jamaica
+America/Jujuy
+America/Juneau
+America/Kentucky/Louisville
+America/Kentucky/Monticello
+America/Knox_IN
+America/Kralendijk
+America/La_Paz
+America/Lima
+America/Los_Angeles
+America/Louisville
+America/Lower_Princes
+America/Maceio
+America/Managua
+America/Manaus
+America/Marigot
+America/Martinique
+America/Matamoros
+America/Mazatlan
+America/Mendoza
+America/Menominee
+America/Merida
+America/Metlakatla
+America/Mexico_City
+America/Miquelon
+America/Moncton
+America/Monterrey
+America/Montevideo
+America/Montreal
+America/Montserrat
+America/Nassau
+America/New_York
+America/Nipigon
+America/Nome
+America/Noronha
+America/North_Dakota/Beulah
+America/North_Dakota/Center
+America/North_Dakota/New_Salem
+America/Ojinaga
+America/Panama
+America/Pangnirtung
+America/Paramaribo
+America/Phoenix
+America/Port-au-Prince
+America/Port_of_Spain
+America/Porto_Acre
+America/Porto_Velho
+America/Puerto_Rico
+America/Rainy_River
+America/Rankin_Inlet
+America/Recife
+America/Regina
+America/Resolute
+America/Rio_Branco
+America/Rosario
+America/Santa_Isabel
+America/Santarem
+America/Santiago
+America/Santo_Domingo
+America/Sao_Paulo
+America/Scoresbysund
+America/Shiprock
+America/Sitka
+America/St_Barthelemy
+America/St_Johns
+America/St_Kitts
+America/St_Lucia
+America/St_Thomas
+America/St_Vincent
+America/Swift_Current
+America/Tegucigalpa
+America/Thule
+America/Thunder_Bay
+America/Tijuana
+America/Toronto
+America/Tortola
+America/Vancouver
+America/Virgin
+America/Whitehorse
+America/Winnipeg
+America/Yakutat
+America/Yellowknife
+Antarctica/Casey
+Antarctica/Davis
+Antarctica/DumontDUrville
+Antarctica/Macquarie
+Antarctica/Mawson
+Antarctica/McMurdo
+Antarctica/Palmer
+Antarctica/Rothera
+Antarctica/South_Pole
+Antarctica/Syowa
+Antarctica/Troll
+Antarctica/Vostok
+Arctic/Longyearbyen
+Asia/Aden
+Asia/Almaty
+Asia/Amman
+Asia/Anadyr
+Asia/Aqtau
+Asia/Aqtobe
+Asia/Ashgabat
+Asia/Ashkhabad
+Asia/Baghdad
+Asia/Bahrain
+Asia/Baku
+Asia/Bangkok
+Asia/Beirut
+Asia/Bishkek
+Asia/Brunei
+Asia/Calcutta
+Asia/Chita
+Asia/Choibalsan
+Asia/Chongqing
+Asia/Chungking
+Asia/Colombo
+Asia/Dacca
+Asia/Damascus
+Asia/Dhaka
+Asia/Dili
+Asia/Dubai
+Asia/Dushanbe
+Asia/Gaza
+Asia/Harbin
+Asia/Hebron
+Asia/Ho_Chi_Minh
+Asia/Hong_Kong
+Asia/Hovd
+Asia/Irkutsk
+Asia/Istanbul
+Asia/Jakarta
+Asia/Jayapura
+Asia/Jerusalem
+Asia/Kabul
+Asia/Kamchatka
+Asia/Karachi
+Asia/Kashgar
+Asia/Kathmandu
+Asia/Katmandu
+Asia/Khandyga
+Asia/Kolkata
+Asia/Krasnoyarsk
+Asia/Kuala_Lumpur
+Asia/Kuching
+Asia/Kuwait
+Asia/Macao
+Asia/Macau
+Asia/Magadan
+Asia/Makassar
+Asia/Manila
+Asia/Muscat
+Asia/Nicosia
+Asia/Novokuznetsk
+Asia/Novosibirsk
+Asia/Omsk
+Asia/Oral
+Asia/Phnom_Penh
+Asia/Pontianak
+Asia/Pyongyang
+Asia/Qatar
+Asia/Qyzylorda
+Asia/Rangoon
+Asia/Riyadh
+Asia/Saigon
+Asia/Sakhalin
+Asia/Samarkand
+Asia/Seoul
+Asia/Shanghai
+Asia/Singapore
+Asia/Srednekolymsk
+Asia/Taipei
+Asia/Tashkent
+Asia/Tbilisi
+Asia/Tehran
+Asia/Tel_Aviv
+Asia/Thimbu
+Asia/Thimphu
+Asia/Tokyo
+Asia/Ujung_Pandang
+Asia/Ulaanbaatar
+Asia/Ulan_Bator
+Asia/Urumqi
+Asia/Ust-Nera
+Asia/Vientiane
+Asia/Vladivostok
+Asia/Yakutsk
+Asia/Yekaterinburg
+Asia/Yerevan
+Atlantic/Azores
+Atlantic/Bermuda
+Atlantic/Canary
+Atlantic/Cape_Verde
+Atlantic/Faeroe
+Atlantic/Faroe
+Atlantic/Jan_Mayen
+Atlantic/Madeira
+Atlantic/Reykjavik
+Atlantic/South_Georgia
+Atlantic/St_Helena
+Atlantic/Stanley
+Australia/ACT
+Australia/Adelaide
+Australia/Brisbane
+Australia/Broken_Hill
+Australia/Canberra
+Australia/Currie
+Australia/Darwin
+Australia/Eucla
+Australia/Hobart
+Australia/LHI
+Australia/Lindeman
+Australia/Lord_Howe
+Australia/Melbourne
+Australia/NSW
+Australia/North
+Australia/Perth
+Australia/Queensland
+Australia/South
+Australia/Sydney
+Australia/Tasmania
+Australia/Victoria
+Australia/West
+Australia/Yancowinna
+Brazil/Acre
+Brazil/DeNoronha
+Brazil/East
+Brazil/West
+CET
+CST6CDT
+Canada/Atlantic
+Canada/Central
+Canada/East-Saskatchewan
+Canada/Eastern
+Canada/Mountain
+Canada/Newfoundland
+Canada/Pacific
+Canada/Saskatchewan
+Canada/Yukon
+Chile/Continental
+Chile/EasterIsland
+Cuba
+EET
+EST
+EST5EDT
+Egypt
+Eire
+Etc/GMT
+Etc/GMT+0
+Etc/GMT+1
+Etc/GMT+10
+Etc/GMT+11
+Etc/GMT+12
+Etc/GMT+2
+Etc/GMT+3
+Etc/GMT+4
+Etc/GMT+5
+Etc/GMT+6
+Etc/GMT+7
+Etc/GMT+8
+Etc/GMT+9
+Etc/GMT-0
+Etc/GMT-1
+Etc/GMT-10
+Etc/GMT-11
+Etc/GMT-12
+Etc/GMT-13
+Etc/GMT-14
+Etc/GMT-2
+Etc/GMT-3
+Etc/GMT-4
+Etc/GMT-5
+Etc/GMT-6
+Etc/GMT-7
+Etc/GMT-8
+Etc/GMT-9
+Etc/GMT0
+Etc/Greenwich
+Etc/UCT
+Etc/UTC
+Etc/Universal
+Etc/Zulu
+Europe/Amsterdam
+Europe/Andorra
+Europe/Athens
+Europe/Belfast
+Europe/Belgrade
+Europe/Berlin
+Europe/Bratislava
+Europe/Brussels
+Europe/Bucharest
+Europe/Budapest
+Europe/Busingen
+Europe/Chisinau
+Europe/Copenhagen
+Europe/Dublin
+Europe/Gibraltar
+Europe/Guernsey
+Europe/Helsinki
+Europe/Isle_of_Man
+Europe/Istanbul
+Europe/Jersey
+Europe/Kaliningrad
+Europe/Kiev
+Europe/Lisbon
+Europe/Ljubljana
+Europe/London
+Europe/Luxembourg
+Europe/Madrid
+Europe/Malta
+Europe/Mariehamn
+Europe/Minsk
+Europe/Monaco
+Europe/Moscow
+Europe/Nicosia
+Europe/Oslo
+Europe/Paris
+Europe/Podgorica
+Europe/Prague
+Europe/Riga
+Europe/Rome
+Europe/Samara
+Europe/San_Marino
+Europe/Sarajevo
+Europe/Simferopol
+Europe/Skopje
+Europe/Sofia
+Europe/Stockholm
+Europe/Tallinn
+Europe/Tirane
+Europe/Tiraspol
+Europe/Uzhgorod
+Europe/Vaduz
+Europe/Vatican
+Europe/Vienna
+Europe/Vilnius
+Europe/Volgograd
+Europe/Warsaw
+Europe/Zagreb
+Europe/Zaporozhye
+Europe/Zurich
+Factory
+GB
+GB-Eire
+GMT
+GMT+0
+GMT-0
+GMT0
+Greenwich
+HST
+Hongkong
+Iceland
+Indian/Antananarivo
+Indian/Chagos
+Indian/Christmas
+Indian/Cocos
+Indian/Comoro
+Indian/Kerguelen
+Indian/Mahe
+Indian/Maldives
+Indian/Mauritius
+Indian/Mayotte
+Indian/Reunion
+Iran
+Israel
+Jamaica
+Japan
+Kwajalein
+Libya
+MET
+MST
+MST7MDT
+Mexico/BajaNorte
+Mexico/BajaSur
+Mexico/General
+NZ
+NZ-CHAT
+Navajo
+PRC
+PST8PDT
+Pacific/Apia
+Pacific/Auckland
+Pacific/Bougainville
+Pacific/Chatham
+Pacific/Chuuk
+Pacific/Easter
+Pacific/Efate
+Pacific/Enderbury
+Pacific/Fakaofo
+Pacific/Fiji
+Pacific/Funafuti
+Pacific/Galapagos
+Pacific/Gambier
+Pacific/Guadalcanal
+Pacific/Guam
+Pacific/Honolulu
+Pacific/Johnston
+Pacific/Kiritimati
+Pacific/Kosrae
+Pacific/Kwajalein
+Pacific/Majuro
+Pacific/Marquesas
+Pacific/Midway
+Pacific/Nauru
+Pacific/Niue
+Pacific/Norfolk
+Pacific/Noumea
+Pacific/Pago_Pago
+Pacific/Palau
+Pacific/Pitcairn
+Pacific/Pohnpei
+Pacific/Ponape
+Pacific/Port_Moresby
+Pacific/Rarotonga
+Pacific/Saipan
+Pacific/Samoa
+Pacific/Tahiti
+Pacific/Tarawa
+Pacific/Tongatapu
+Pacific/Truk
+Pacific/Wake
+Pacific/Wallis
+Pacific/Yap
+Poland
+Portugal
+ROC
+ROK
+Singapore
+Turkey
+UCT
+UTC
+Universal
+W-SU
+WET
+Zulu
+posixrules
+
+Type it at the prompt below exactly as it appears above. (NOTE: If you don't
+see your timezone, use "timeconfig" again after booting for the verbose list)
+
+EOF
+ echo -n "Timezone? "
+ read TIMEZONE;
+ echo
+
+ if [ -n "$TIMEZONE" -a \
+ -r $T_PX/usr/share/zoneinfo/$TIMEZONE -o \
+ -r /var/log/mount/usr/share/zoneinfo/$TIMEZONE -o \
+ -L $T_PX/usr/share/zoneinfo/$TIMEZONE -o \
+ -L /var/log/mount/usr/share/zoneinfo/$TIMEZONE ]; then
+ echo "Creating link from $TIMEZONE to localtime in /etc..."
+ echo
+ setzone $TIMEZONE
+ exit
+ else
+ cat << EOF
+
+Timezone $TIMEZONE could not be found. You may try again if you wish.
+Make sure you type the name exactly as it appears - this configuration script
+is case sensitive.
+
+Press [enter] to continue.
+
+EOF
+ read JUNK;
+ fi
+ done
+fi
+
diff --git a/patches/source/glibc/doinst.sh-glibc b/patches/source/glibc/doinst.sh-glibc
new file mode 100644
index 000000000..5904dc751
--- /dev/null
+++ b/patches/source/glibc/doinst.sh-glibc
@@ -0,0 +1,197 @@
+#!/bin/sh
+# Copyright (C) 2002, 2005 Slackware Linux, Inc.
+# Copyright 2005, 2006, 2007, 2011, 2012 Patrick J. Volkerding, Sebeka, Minnesota, USA
+#
+# 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
+# of the License, 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.
+#
+# Swap glibc on the fly.
+#
+# If we're on a running system we have to handle this _very_ carefully. :-)
+# The tricks involved here get trickier every time...
+
+# OK, now we have to be sure of a few things. First, you do have a 2.6
+# kernel running, right?
+
+if [ -r /proc/ksyms ]; then
+ echo "FATAL: you need to be running a 2.6.x kernel in order to upgrade"
+ echo "to this version of glibc."
+ echo
+ sleep 999
+ exit 1
+fi
+
+# Next, stop using the /lib/ntpl libraries. These are now obsolete and
+# will break the installation if present:
+if [ -d lib/tls ]; then
+ mkdir -p lib/obsolete
+ mv lib/tls lib/obsolete
+fi
+if [ -x sbin/ldconfig ]; then
+ sbin/ldconfig -r .
+fi
+
+# Install NPTL glibc libraries:
+if [ -x /sbin/ldconfig -a -d lib/incoming ]; then # swap on the fly
+ # First create copies of the incoming libraries:
+ ( cd lib/incoming
+ for file in * ; do
+ if [ ! -r ../${file}.incoming ]; then
+ cp -a $file ../${file}.incoming
+ fi
+ done
+ )
+ # Then switch to them all at once:
+ /sbin/ldconfig -l lib/*.incoming 2> /dev/null
+ # Finally, rename them and clean up:
+ ( cd lib
+ for file in *.incoming ; do
+ rm -f `basename $file .incoming`
+ cp -a $file `basename $file .incoming`
+ /sbin/ldconfig -l `basename $file .incoming`
+ rm -f $file
+ done
+ )
+else # no ldconfig? Good, it's safe to just jam it on home (and make links below):
+ ( cd lib/incoming
+ for file in * ; do
+ cp -a $file ..
+ done
+ )
+fi
+# Now, get rid of the temporary directory:
+rm -rf lib/incoming
+# Done installing NPTL glibc libraries.
+
+# Timezone stuff:
+if [ -L etc/localtime -a ! -r etc/localtime-copied-from ]; then
+ mv etc/localtime etc/localtime-copied-from
+ chroot . /bin/cp etc/localtime-copied-from etc/localtime
+fi
+# Add the default timezone in /etc, if none exists:
+if [ ! -r etc/localtime ]; then
+ ( cd etc ; rm -rf localtime localtime-copied-from )
+ ( cd etc ; ln -sf /usr/share/zoneinfo/Factory localtime-copied-from )
+ chroot . /bin/cp etc/localtime-copied-from etc/localtime
+fi
+# Add the default link in /usr/share/zoneinfo, if none exists:
+if [ ! -L usr/share/zoneinfo/localtime ]; then
+ ( cd usr/share/zoneinfo ; rm -rf localtime )
+ ( cd usr/share/zoneinfo ; ln -sf /etc/localtime localtime )
+fi
+( cd usr/share/zoneinfo ; rm -rf timeconfig )
+( cd usr/share/zoneinfo ; ln -sf /usr/sbin/timeconfig timeconfig )
+
+# Handle config files:
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+config etc/nscd.conf.new
+config etc/profile.d/glibc.csh.new
+config etc/profile.d/glibc.sh.new
+# Clearly you already decided this issue. :-)
+rm -f etc/profile.d/glibc.csh.new
+rm -f etc/profile.d/glibc.sh.new
+
+# In case there's no ldconfig, make the links manually:
+if [ ! -x /sbin/ldconfig ]; then
+( cd lib ; rm -rf libnss_nis.so.2 )
+( cd lib ; ln -sf libnss_nis-2.17.so libnss_nis.so.2 )
+( cd lib ; rm -rf libm.so.6 )
+( cd lib ; ln -sf libm-2.17.so libm.so.6 )
+( cd lib ; rm -rf libnss_files.so.2 )
+( cd lib ; ln -sf libnss_files-2.17.so libnss_files.so.2 )
+( cd lib ; rm -rf libresolv.so.2 )
+( cd lib ; ln -sf libresolv-2.17.so libresolv.so.2 )
+( cd lib ; rm -rf libnsl.so.1 )
+( cd lib ; ln -sf libnsl-2.17.so libnsl.so.1 )
+( cd lib ; rm -rf libutil.so.1 )
+( cd lib ; ln -sf libutil-2.17.so libutil.so.1 )
+( cd lib ; rm -rf libnss_compat.so.2 )
+( cd lib ; ln -sf libnss_compat-2.17.so libnss_compat.so.2 )
+( cd lib ; rm -rf libthread_db.so.1 )
+( cd lib ; ln -sf libthread_db-1.0.so libthread_db.so.1 )
+( cd lib ; rm -rf libnss_hesiod.so.2 )
+( cd lib ; ln -sf libnss_hesiod-2.17.so libnss_hesiod.so.2 )
+( cd lib ; rm -rf libanl.so.1 )
+( cd lib ; ln -sf libanl-2.17.so libanl.so.1 )
+( cd lib ; rm -rf libcrypt.so.1 )
+( cd lib ; ln -sf libcrypt-2.17.so libcrypt.so.1 )
+( cd lib ; rm -rf libBrokenLocale.so.1 )
+( cd lib ; ln -sf libBrokenLocale-2.17.so libBrokenLocale.so.1 )
+( cd lib ; rm -rf ld-linux.so.2 )
+( cd lib ; ln -sf ld-2.17.so ld-linux.so.2 )
+( cd lib ; rm -rf libdl.so.2 )
+( cd lib ; ln -sf libdl-2.17.so libdl.so.2 )
+( cd lib ; rm -rf libnss_dns.so.2 )
+( cd lib ; ln -sf libnss_dns-2.17.so libnss_dns.so.2 )
+( cd lib ; rm -rf libpthread.so.0 )
+( cd lib ; ln -sf libpthread-2.17.so libpthread.so.0 )
+( cd lib ; rm -rf libnss_nisplus.so.2 )
+( cd lib ; ln -sf libnss_nisplus-2.17.so libnss_nisplus.so.2 )
+( cd lib ; rm -rf libc.so.6 )
+( cd lib ; ln -sf libc-2.17.so libc.so.6 )
+( cd lib ; rm -rf librt.so.1 )
+( cd lib ; ln -sf librt-2.17.so librt.so.1 )
+fi
+
+# More links:
+( cd usr/lib ; rm -rf libnss_nisplus.so )
+( cd usr/lib ; ln -sf ../../lib/libnss_nisplus.so.2 libnss_nisplus.so )
+# This is now a linker script:
+#( cd usr/lib ; rm -rf libpthread.so )
+#( cd usr/lib ; ln -sf ../../lib/libpthread.so.0 libpthread.so )
+( cd usr/lib ; rm -rf libresolv.so )
+( cd usr/lib ; ln -sf ../../lib/libresolv.so.2 libresolv.so )
+( cd usr/lib ; rm -rf libnsl.so )
+( cd usr/lib ; ln -sf ../../lib/libnsl.so.1 libnsl.so )
+( cd usr/lib ; rm -rf libnss_hesiod.so )
+( cd usr/lib ; ln -sf ../../lib/libnss_hesiod.so.2 libnss_hesiod.so )
+( cd usr/lib ; rm -rf libnss_files.so )
+( cd usr/lib ; ln -sf ../../lib/libnss_files.so.2 libnss_files.so )
+( cd usr/lib ; rm -rf libm.so )
+( cd usr/lib ; ln -sf ../../lib/libm.so.6 libm.so )
+( cd usr/lib ; rm -rf libutil.so )
+( cd usr/lib ; ln -sf ../../lib/libutil.so.1 libutil.so )
+( cd usr/lib ; rm -rf libnss_compat.so )
+( cd usr/lib ; ln -sf ../../lib/libnss_compat.so.2 libnss_compat.so )
+( cd usr/lib ; rm -rf libthread_db.so )
+( cd usr/lib ; ln -sf ../../lib/libthread_db.so.1 libthread_db.so )
+( cd usr/lib ; rm -rf libcrypt.so )
+( cd usr/lib ; ln -sf ../../lib/libcrypt.so.1 libcrypt.so )
+( cd usr/lib ; rm -rf libBrokenLocale.so )
+( cd usr/lib ; ln -sf ../../lib/libBrokenLocale.so.1 libBrokenLocale.so )
+( cd usr/lib ; rm -rf libdl.so )
+( cd usr/lib ; ln -sf ../../lib/libdl.so.2 libdl.so )
+( cd usr/lib ; rm -rf libnss_dns.so )
+( cd usr/lib ; ln -sf ../../lib/libnss_dns.so.2 libnss_dns.so )
+( cd usr/lib ; rm -rf librt.so )
+( cd usr/lib ; ln -sf ../../lib/librt.so.1 librt.so )
+( cd usr/lib ; rm -rf libanl.so )
+( cd usr/lib ; ln -sf ../../lib/libanl.so.1 libanl.so )
+( cd usr/lib ; rm -rf libnss_nis.so )
+( cd usr/lib ; ln -sf ../../lib/libnss_nis.so.2 libnss_nis.so )
+( cd usr/share/zoneinfo ; rm -rf localtime )
+( cd usr/share/zoneinfo ; ln -sf /etc/localtime localtime )
+( cd bin ; rm -rf sln )
+( cd bin ; ln -sf /sbin/sln sln )
+
+# Reload to prevent init from holding a stale handle to glibc on shutdown:
+if [ -x /sbin/telinit ]; then
+ /sbin/telinit u
+fi
diff --git a/patches/source/glibc/doinst.sh-glibc-solibs b/patches/source/glibc/doinst.sh-glibc-solibs
new file mode 100644
index 000000000..f721926cf
--- /dev/null
+++ b/patches/source/glibc/doinst.sh-glibc-solibs
@@ -0,0 +1,137 @@
+#!/bin/sh
+# Copyright (C) 2002, 2005 Slackware Linux, Inc.
+# Copyright 2005, 2006, 2011, 2012 Patrick J. Volkerding, Sebeka, Minnesota, USA
+#
+# 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
+# of the License, 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.
+#
+# Swap glibc on the fly.
+#
+# If we're on a running system we have to handle this _very_ carefully. :-)
+# The tricks involved here get trickier every time...
+
+# OK, now we have to be sure of a few things. First, you do have a 2.6
+# kernel running, right?
+
+if [ -r /proc/ksyms ]; then
+ echo "FATAL: you need to be running a 2.6.x kernel in order to upgrade"
+ echo "to this version of glibc."
+ echo
+ sleep 999
+ exit 1
+fi
+
+# Next, stop using the /lib/ntpl libraries. These are now obsolete and
+# will break the installation if present:
+if [ -d lib/tls ]; then
+ mkdir -p lib/obsolete
+ mv lib/tls lib/obsolete
+fi
+if [ -x sbin/ldconfig ]; then
+ sbin/ldconfig -r .
+fi
+
+# Install NPTL glibc libraries:
+if [ -x /sbin/ldconfig -a -d lib/incoming ]; then # swap on the fly
+ # First create copies of the incoming libraries:
+ ( cd lib/incoming
+ for file in * ; do
+ if [ ! -r ../${file}.incoming ]; then
+ cp -a $file ../${file}.incoming
+ fi
+ done
+ )
+ # Then switch to them all at once:
+ /sbin/ldconfig -l lib/*.incoming 2> /dev/null
+ # Finally, rename them and clean up:
+ ( cd lib
+ for file in *.incoming ; do
+ rm -f `basename $file .incoming`
+ cp -a $file `basename $file .incoming`
+ /sbin/ldconfig -l `basename $file .incoming`
+ rm -f $file
+ done
+ )
+else # no ldconfig? Good, it's safe to just jam it on home (and make links below):
+ ( cd lib/incoming
+ for file in * ; do
+ cp -a $file ..
+ done
+ )
+fi
+# Now, get rid of the temporary directory:
+rm -rf lib/incoming
+# Done installing NPTL glibc libraries.
+
+# Handle config files:
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+config etc/profile.d/glibc.csh.new
+config etc/profile.d/glibc.sh.new
+# Clearly you already decided this issue. :-)
+rm -f etc/profile.d/glibc.csh.new
+rm -f etc/profile.d/glibc.sh.new
+
+# In case there's no ldconfig, make the links manually:
+if [ ! -x /sbin/ldconfig ]; then
+( cd lib ; rm -rf libnss_nis.so.2 )
+( cd lib ; ln -sf libnss_nis-2.17.so libnss_nis.so.2 )
+( cd lib ; rm -rf libm.so.6 )
+( cd lib ; ln -sf libm-2.17.so libm.so.6 )
+( cd lib ; rm -rf libnss_files.so.2 )
+( cd lib ; ln -sf libnss_files-2.17.so libnss_files.so.2 )
+( cd lib ; rm -rf libresolv.so.2 )
+( cd lib ; ln -sf libresolv-2.17.so libresolv.so.2 )
+( cd lib ; rm -rf libnsl.so.1 )
+( cd lib ; ln -sf libnsl-2.17.so libnsl.so.1 )
+( cd lib ; rm -rf libutil.so.1 )
+( cd lib ; ln -sf libutil-2.17.so libutil.so.1 )
+( cd lib ; rm -rf libnss_compat.so.2 )
+( cd lib ; ln -sf libnss_compat-2.17.so libnss_compat.so.2 )
+( cd lib ; rm -rf libthread_db.so.1 )
+( cd lib ; ln -sf libthread_db-1.0.so libthread_db.so.1 )
+( cd lib ; rm -rf libnss_hesiod.so.2 )
+( cd lib ; ln -sf libnss_hesiod-2.17.so libnss_hesiod.so.2 )
+( cd lib ; rm -rf libanl.so.1 )
+( cd lib ; ln -sf libanl-2.17.so libanl.so.1 )
+( cd lib ; rm -rf libcrypt.so.1 )
+( cd lib ; ln -sf libcrypt-2.17.so libcrypt.so.1 )
+( cd lib ; rm -rf libBrokenLocale.so.1 )
+( cd lib ; ln -sf libBrokenLocale-2.17.so libBrokenLocale.so.1 )
+( cd lib ; rm -rf ld-linux.so.2 )
+( cd lib ; ln -sf ld-2.17.so ld-linux.so.2 )
+( cd lib ; rm -rf libdl.so.2 )
+( cd lib ; ln -sf libdl-2.17.so libdl.so.2 )
+( cd lib ; rm -rf libnss_dns.so.2 )
+( cd lib ; ln -sf libnss_dns-2.17.so libnss_dns.so.2 )
+( cd lib ; rm -rf libpthread.so.0 )
+( cd lib ; ln -sf libpthread-2.17.so libpthread.so.0 )
+( cd lib ; rm -rf libnss_nisplus.so.2 )
+( cd lib ; ln -sf libnss_nisplus-2.17.so libnss_nisplus.so.2 )
+( cd lib ; rm -rf libc.so.6 )
+( cd lib ; ln -sf libc-2.17.so libc.so.6 )
+( cd lib ; rm -rf librt.so.1 )
+( cd lib ; ln -sf librt-2.17.so librt.so.1 )
+fi
+
+# Reload to prevent init from holding a stale handle to glibc on shutdown:
+if [ -x /sbin/telinit ]; then
+ /sbin/telinit u
+fi
+
diff --git a/patches/source/glibc/doinst.sh-glibc-zoneinfo b/patches/source/glibc/doinst.sh-glibc-zoneinfo
new file mode 100644
index 000000000..04bfe8eff
--- /dev/null
+++ b/patches/source/glibc/doinst.sh-glibc-zoneinfo
@@ -0,0 +1,17 @@
+# Prep the library links:
+ldconfig -r .
+# Fix existing old style /etc/localtime symlink:
+if [ -L etc/localtime -a ! -r etc/localtime-copied-from ]; then
+ mv etc/localtime etc/localtime-copied-from
+fi
+# Add the default timezone in /etc, if none exists:
+if [ ! -r etc/localtime ]; then
+ ( cd etc ; rm -rf localtime localtime-copied-from )
+ ( cd etc ; ln -sf /usr/share/zoneinfo/Factory localtime-copied-from )
+fi
+# Make sure /etc/localtime is updated:
+chroot . /bin/cp etc/localtime-copied-from etc/localtime
+# Add the default link in /usr/share/zoneinfo:
+( cd usr/share/zoneinfo ; rm -rf timeconfig )
+( cd usr/share/zoneinfo ; ln -sf /usr/sbin/timeconfig timeconfig )
+### Make the rest of the symbolic links in the zoneinfo database:
diff --git a/patches/source/glibc/glibc-2.10-dns-no-gethostbyname4.diff b/patches/source/glibc/glibc-2.10-dns-no-gethostbyname4.diff
new file mode 100644
index 000000000..3fa365afa
--- /dev/null
+++ b/patches/source/glibc/glibc-2.10-dns-no-gethostbyname4.diff
@@ -0,0 +1,26 @@
+The gethostbyname4() lookup method is problematic since it fires out both
+the A and AAAA DNS queries in parallel and over the same socket. This
+should work in theory, but it turns out that many cheap DSL modems and
+similar devices have buggy DNS servers - if the AAAA query arrives too
+quickly after the A query, the server will generate only a single reply
+with the A query id but returning an error for the AAAA query; we get
+stuck waiting for the second reply.
+
+For gethostbyname4() users affected, disabling IPv6 in the system might
+work around the issue, unfortunately it only helps with applications
+using AI_ADDRCONFIG (e.g. Firefox); some (notably e.g. Pidgin) neglect
+to do that.
+
+Real fix should be using separate ports for the A and AAAA queries.
+
+--- resolv/Versions 2008-08-02 10:26:09.000000000 +0200
++++ resolv/Versions 2008-12-08 12:51:53.000000000 +0100
+@@ -102,7 +102,7 @@ libnss_dns {
+ _nss_dns_gethostbyname_r; _nss_dns_getnetbyaddr_r;
+ _nss_dns_getnetbyname_r; _nss_dns_getcanonname_r;
+ _nss_dns_gethostbyaddr2_r;
+- _nss_dns_gethostbyname4_r;
++# _nss_dns_gethostbyname4_r;
+ }
+ }
+
diff --git a/patches/source/glibc/glibc-2.17_CVE-2012-4412.diff b/patches/source/glibc/glibc-2.17_CVE-2012-4412.diff
new file mode 100644
index 000000000..107302c78
--- /dev/null
+++ b/patches/source/glibc/glibc-2.17_CVE-2012-4412.diff
@@ -0,0 +1,116 @@
+From 40790558474490d9d1aee5502cccb92e1c45e196 Mon Sep 17 00:00:00 2001
+From: mancha <mancha1@hush.com>
+Date: Wed, 23 Oct 2013
+Subject: CVE-2012-4412
+
+strcoll is implemented using a cache for indices and weights of
+collation sequences in the strings so that subsequent passes do not
+have to search through collation data again. For very large string
+inputs, the cache size computation could overflow. In such a case,
+use the fallback function that does not cache indices and weights of
+collation sequences.
+
+---
+This patch was adapted for glibc 2.17 based on:
+https://sourceware.org/git/?p=glibc.git;a=commit;h=303e567a8062
+---
+
+ Makefile | 2 +
+ strcoll_l.c | 10 +++++++-
+ tst-strcoll-overflow.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 72 insertions(+), 1 deletion(-)
+
+--- a/string/Makefile
++++ b/string/Makefile
+@@ -61,6 +61,8 @@ tests := tester inl-tester noinl-tester testcopy test-ffs \
+ tests-ifunc := $(strop-tests:%=test-%-ifunc)
+ tests += $(tests-ifunc)
+
++xtests = tst-strcoll-overflow
++
+ include ../Rules
+
+ tester-ENV = LANGUAGE=C
+--- a/string/strcoll_l.c
++++ b/string/strcoll_l.c
+@@ -524,7 +524,15 @@ STRCOLL (const STRING_TYPE *s1, const STRING_TYPE *s2, __locale_t l)
+ memset (&seq1, 0, sizeof (seq1));
+ seq2 = seq1;
+
+- if (! __libc_use_alloca ((s1len + s2len) * (sizeof (int32_t) + 1)))
++ size_t size_max = SIZE_MAX / (sizeof (int32_t) + 1);
++
++ if (MIN (s1len, s2len) > size_max
++ || MAX (s1len, s2len) > size_max - MIN (s1len, s2len))
++ {
++ /* If the strings are long enough to cause overflow in the size request,
++ then skip the allocation and proceed with the non-cached routines. */
++ }
++ else if (! __libc_use_alloca ((s1len + s2len) * (sizeof (int32_t) + 1)))
+ {
+ seq1.idxarr = (int32_t *) malloc ((s1len + s2len) * (sizeof (int32_t) + 1));
+
+--- /dev/null
++++ b/string/tst-strcoll-overflow.c
+@@ -0,0 +1,61 @@
++/* Copyright (C) 2013 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, see
++ <http://www.gnu.org/licenses/>. */
++
++#include <locale.h>
++#include <stdio.h>
++#include <stdint.h>
++#include <stdlib.h>
++#include <string.h>
++
++/* Verify that strcoll does not crash for large strings for which it cannot
++ cache weight lookup results. The size is large enough to cause integer
++ overflows on 32-bit as well as buffer overflows on 64-bit. The test should
++ work reasonably reliably when overcommit is disabled, but it obviously
++ depends on how much memory the system has. There's a limitation to this
++ test in that it does not run to completion. Actually collating such a
++ large string can take days and we can't have xcheck running that long. For
++ that reason, we run the test for about 5 minutes and then assume that
++ everything is fine if there are no crashes. */
++#define SIZE 0x40000000ul
++
++int
++do_test (void)
++{
++ if (setlocale (LC_COLLATE, "en_GB.UTF-8") == NULL)
++ {
++ puts ("setlocale failed, cannot test for overflow");
++ return 0;
++ }
++
++ char *p = malloc (SIZE);
++
++ if (p == NULL)
++ {
++ puts ("could not allocate memory");
++ return 1;
++ }
++
++ memset (p, 'x', SIZE - 1);
++ p[SIZE - 1] = 0;
++ printf ("%d\n", strcoll (p, p));
++ return 0;
++}
++
++#define TIMEOUT 300
++#define EXPECTED_SIGNAL SIGALRM
++#define TEST_FUNCTION do_test ()
++#include "../test-skeleton.c"
diff --git a/patches/source/glibc/glibc-2.17_CVE-2012-4424.diff b/patches/source/glibc/glibc-2.17_CVE-2012-4424.diff
new file mode 100644
index 000000000..681fe312b
--- /dev/null
+++ b/patches/source/glibc/glibc-2.17_CVE-2012-4424.diff
@@ -0,0 +1,400 @@
+From b538eb33a3ac26cbd7b4a4fbf87cbcf75e37b01e Mon Sep 17 00:00:00 2001
+From: mancha <mancha1@hush.com>
+Date: Wed, 23 Oct 2013
+Subject: CVE-2012-4424
+
+strcoll currently falls back to alloca if malloc fails, resulting in a
+possible stack overflow. This patch implements sequence traversal and
+comparison without caching indices and rules.
+
+---
+This patch was adapted for glibc 2.17 based on:
+https://sourceware.org/git/?p=glibc.git;a=commit;h=91998e449e0c
+https://sourceware.org/git/?p=glibc.git;a=commit;h=141f3a77fe4f
+---
+
+ misc/sys/cdefs.h | 2
+ string/strcoll_l.c | 265 ++++++++++++++++++++++++++++++++++++++++++++++-------
+ 2 files changed, 236 insertions(+), 31 deletions(-)
+
+--- a/misc/sys/cdefs.h
++++ b/misc/sys/cdefs.h
+@@ -378,8 +378,10 @@
+
+ #if __GNUC__ >= 3
+ # define __glibc_unlikely(cond) __builtin_expect((cond), 0)
++# define __glibc_likely(cond) __builtin_expect((cond), 1)
+ #else
+ # define __glibc_unlikely(cond) (cond)
++# define __glibc_likely(cond) (cond)
+ #endif
+
+ #include <bits/wordsize.h>
+--- a/string/strcoll_l.c
++++ b/string/strcoll_l.c
+@@ -45,7 +45,7 @@
+ typedef struct
+ {
+ int len; /* Length of the current sequence. */
+- int val; /* Position of the sequence relative to the
++ size_t val; /* Position of the sequence relative to the
+ previous non-ignored sequence. */
+ size_t idxnow; /* Current index in sequences. */
+ size_t idxmax; /* Maximum index in sequences. */
+@@ -55,6 +55,12 @@ typedef struct
+ const USTRING_TYPE *us; /* The string. */
+ int32_t *idxarr; /* Array to cache weight indices. */
+ unsigned char *rulearr; /* Array to cache rules. */
++ unsigned char rule; /* Saved rule for the first sequence. */
++ int32_t idx; /* Index to weight of the current sequence. */
++ int32_t save_idx; /* Save looked up index of a forward
++ sequence after the last backward
++ sequence. */
++ const USTRING_TYPE *back_us; /* Beginning of the backward sequence. */
+ } coll_seq;
+
+ /* Get next sequence. The weight indices are cached, so we don't need to
+@@ -64,7 +70,7 @@ get_next_seq_cached (coll_seq *seq, int nrules, int pass,
+ const unsigned char *rulesets,
+ const USTRING_TYPE *weights)
+ {
+- int val = seq->val = 0;
++ size_t val = seq->val = 0;
+ int len = seq->len;
+ size_t backw_stop = seq->backw_stop;
+ size_t backw = seq->backw;
+@@ -146,7 +152,7 @@ get_next_seq (coll_seq *seq, int nrules, const unsigned char *rulesets,
+ const USTRING_TYPE *extra, const int32_t *indirect)
+ {
+ #include WEIGHT_H
+- int val = seq->val = 0;
++ size_t val = seq->val = 0;
+ int len = seq->len;
+ size_t backw_stop = seq->backw_stop;
+ size_t backw = seq->backw;
+@@ -162,7 +168,7 @@ get_next_seq (coll_seq *seq, int nrules, const unsigned char *rulesets,
+ ++val;
+ if (backw_stop != ~0ul)
+ {
+- /* The is something pushed. */
++ /* There is something pushed. */
+ if (backw == backw_stop)
+ {
+ /* The last pushed character was handled. Continue
+@@ -227,15 +233,199 @@ get_next_seq (coll_seq *seq, int nrules, const unsigned char *rulesets,
+ seq->us = us;
+ }
+
+-/* Compare two sequences. */
++/* Get next sequence. Traverse the string as required. This function does not
++ set or use any index or rule cache. */
++static void
++get_next_seq_nocache (coll_seq *seq, int nrules, const unsigned char *rulesets,
++ const USTRING_TYPE *weights, const int32_t *table,
++ const USTRING_TYPE *extra, const int32_t *indirect,
++ int pass)
++{
++#include WEIGHT_H
++ size_t val = seq->val = 0;
++ int len = seq->len;
++ size_t backw_stop = seq->backw_stop;
++ size_t backw = seq->backw;
++ size_t idxcnt = seq->idxcnt;
++ size_t idxmax = seq->idxmax;
++ int32_t idx = seq->idx;
++ const USTRING_TYPE *us = seq->us;
++
++ while (len == 0)
++ {
++ ++val;
++ if (backw_stop != ~0ul)
++ {
++ /* There is something pushed. */
++ if (backw == backw_stop)
++ {
++ /* The last pushed character was handled. Continue
++ with forward characters. */
++ if (idxcnt < idxmax)
++ {
++ idx = seq->save_idx;
++ backw_stop = ~0ul;
++ }
++ else
++ {
++ /* Nothing anymore. The backward sequence ended with
++ the last sequence in the string. Note that len is
++ still zero. */
++ idx = 0;
++ break;
++ }
++ }
++ else
++ {
++ /* XXX Traverse BACKW sequences from the beginning of
++ BACKW_STOP to get the next sequence. Is ther a quicker way
++ to do this? */
++ size_t i = backw_stop;
++ us = seq->back_us;
++ while (i < backw)
++ {
++ int32_t tmp = findidx (&us, -1);
++ idx = tmp & 0xffffff;
++ i++;
++ }
++ --backw;
++ us = seq->us;
++ }
++ }
++ else
++ {
++ backw_stop = idxmax;
++ int32_t prev_idx = idx;
++
++ while (*us != L('\0'))
++ {
++ int32_t tmp = findidx (&us, -1);
++ unsigned char rule = tmp >> 24;
++ prev_idx = idx;
++ idx = tmp & 0xffffff;
++ idxcnt = idxmax++;
++
++ /* Save the rule for the first sequence. */
++ if (__glibc_unlikely (idxcnt == 0))
++ seq->rule = rule;
++
++ if ((rulesets[rule * nrules + pass]
++ & sort_backward) == 0)
++ /* No more backward characters to push. */
++ break;
++ ++idxcnt;
++ }
++
++ if (backw_stop >= idxcnt)
++ {
++ /* No sequence at all or just one. */
++ if (idxcnt == idxmax || backw_stop > idxcnt)
++ /* Note that len is still zero. */
++ break;
++
++ backw_stop = ~0ul;
++ }
++ else
++ {
++ /* We pushed backward sequences. If the stream ended with the
++ backward sequence, then we process the last sequence we
++ found. Otherwise we process the sequence before the last
++ one since the last one was a forward sequence. */
++ seq->back_us = seq->us;
++ seq->us = us;
++ backw = idxcnt;
++ if (idxmax > idxcnt)
++ {
++ backw--;
++ seq->save_idx = idx;
++ idx = prev_idx;
++ }
++ if (backw > backw_stop)
++ backw--;
++ }
++ }
++
++ len = weights[idx++];
++ /* Skip over indices of previous levels. */
++ for (int i = 0; i < pass; i++)
++ {
++ idx += len;
++ len = weights[idx];
++ idx++;
++ }
++ }
++
++ /* Update the structure. */
++ seq->val = val;
++ seq->len = len;
++ seq->backw_stop = backw_stop;
++ seq->backw = backw;
++ seq->idxcnt = idxcnt;
++ seq->idxmax = idxmax;
++ seq->us = us;
++ seq->idx = idx;
++}
++
++/* Compare two sequences. This version does not use the index and rules
++ cache. */
++static int
++do_compare_nocache (coll_seq *seq1, coll_seq *seq2, int position,
++ const USTRING_TYPE *weights)
++{
++ int seq1len = seq1->len;
++ int seq2len = seq2->len;
++ size_t val1 = seq1->val;
++ size_t val2 = seq2->val;
++ int idx1 = seq1->idx;
++ int idx2 = seq2->idx;
++ int result = 0;
++
++ /* Test for position if necessary. */
++ if (position && val1 != val2)
++ {
++ result = val1 > val2 ? 1 : -1;
++ goto out;
++ }
++
++ /* Compare the two sequences. */
++ do
++ {
++ if (weights[idx1] != weights[idx2])
++ {
++ /* The sequences differ. */
++ result = weights[idx1] - weights[idx2];
++ goto out;
++ }
++
++ /* Increment the offsets. */
++ ++idx1;
++ ++idx2;
++
++ --seq1len;
++ --seq2len;
++ }
++ while (seq1len > 0 && seq2len > 0);
++
++ if (position && seq1len != seq2len)
++ result = seq1len - seq2len;
++
++out:
++ seq1->len = seq1len;
++ seq2->len = seq2len;
++ seq1->idx = idx1;
++ seq2->idx = idx2;
++ return result;
++}
++
++/* Compare two sequences using the index cache. */
+ static int
+ do_compare (coll_seq *seq1, coll_seq *seq2, int position,
+ const USTRING_TYPE *weights)
+ {
+ int seq1len = seq1->len;
+ int seq2len = seq2->len;
+- int val1 = seq1->val;
+- int val2 = seq2->val;
++ size_t val1 = seq1->val;
++ size_t val2 = seq2->val;
+ int32_t *idx1arr = seq1->idxarr;
+ int32_t *idx2arr = seq2->idxarr;
+ int idx1now = seq1->idxnow;
+@@ -245,7 +435,7 @@ do_compare (coll_seq *seq1, coll_seq *seq2, int position,
+ /* Test for position if necessary. */
+ if (position && val1 != val2)
+ {
+- result = val1 - val2;
++ result = val1 > val2 ? 1 : -1;
+ goto out;
+ }
+
+@@ -334,57 +524,62 @@ STRCOLL (const STRING_TYPE *s1, const STRING_TYPE *s2, __locale_t l)
+ memset (&seq1, 0, sizeof (seq1));
+ seq2 = seq1;
+
+- /* We need the elements of the strings as unsigned values since they
+- are used as indices. */
+- seq1.us = (const USTRING_TYPE *) s1;
+- seq2.us = (const USTRING_TYPE *) s2;
+-
+ if (! __libc_use_alloca ((s1len + s2len) * (sizeof (int32_t) + 1)))
+ {
+ seq1.idxarr = (int32_t *) malloc ((s1len + s2len) * (sizeof (int32_t) + 1));
+- seq2.idxarr = &seq1.idxarr[s1len];
+- seq1.rulearr = (unsigned char *) &seq2.idxarr[s2len];
+- seq2.rulearr = &seq1.rulearr[s1len];
+-
+- if (seq1.idxarr == NULL)
+- /* No memory. Well, go with the stack then.
+-
+- XXX Once this implementation is stable we will handle this
+- differently. Instead of precomputing the indices we will
+- do this in time. This means, though, that this happens for
+- every pass again. */
+- goto try_stack;
+- use_malloc = true;
++
++ /* If we failed to allocate memory, we leave everything as NULL so that
++ we use the nocache version of traversal and comparison functions. */
++ if (seq1.idxarr != NULL)
++ {
++ seq2.idxarr = &seq1.idxarr[s1len];
++ seq1.rulearr = (unsigned char *) &seq2.idxarr[s2len];
++ seq2.rulearr = &seq1.rulearr[s1len];
++ use_malloc = true;
++ }
+ }
+ else
+ {
+- try_stack:
+ seq1.idxarr = (int32_t *) alloca (s1len * sizeof (int32_t));
+ seq2.idxarr = (int32_t *) alloca (s2len * sizeof (int32_t));
+ seq1.rulearr = (unsigned char *) alloca (s1len);
+ seq2.rulearr = (unsigned char *) alloca (s2len);
+ }
+
+- seq1.rulearr[0] = 0;
++ int rule = 0;
+
+ /* Cache values in the first pass and if needed, use them in subsequent
+ passes. */
+ for (int pass = 0; pass < nrules; ++pass)
+ {
+ seq1.idxcnt = 0;
++ seq1.idx = 0;
++ seq2.idx = 0;
+ seq1.backw_stop = ~0ul;
+ seq1.backw = ~0ul;
+ seq2.idxcnt = 0;
+ seq2.backw_stop = ~0ul;
+ seq2.backw = ~0ul;
+
++ /* We need the elements of the strings as unsigned values since they
++ are used as indices. */
++ seq1.us = (const USTRING_TYPE *) s1;
++ seq2.us = (const USTRING_TYPE *) s2;
++
+ /* We assume that if a rule has defined `position' in one section
+ this is true for all of them. */
+- int position = rulesets[seq1.rulearr[0] * nrules + pass] & sort_position;
++ int position = rulesets[rule * nrules + pass] & sort_position;
+
+ while (1)
+ {
+- if (pass == 0)
++ if (__glibc_unlikely (seq1.idxarr == NULL))
++ {
++ get_next_seq_nocache (&seq1, nrules, rulesets, weights, table,
++ extra, indirect, pass);
++ get_next_seq_nocache (&seq2, nrules, rulesets, weights, table,
++ extra, indirect, pass);
++ }
++ else if (pass == 0)
+ {
+ get_next_seq (&seq1, nrules, rulesets, weights, table, extra,
+ indirect);
+@@ -411,10 +606,18 @@ STRCOLL (const STRING_TYPE *s1, const STRING_TYPE *s2, __locale_t l)
+ goto free_and_return;
+ }
+
+- result = do_compare (&seq1, &seq2, position, weights);
++ if (__glibc_unlikely (seq1.idxarr == NULL))
++ result = do_compare_nocache (&seq1, &seq2, position, weights);
++ else
++ result = do_compare (&seq1, &seq2, position, weights);
+ if (result != 0)
+ goto free_and_return;
+ }
++
++ if (__glibc_likely (seq1.rulearr != NULL))
++ rule = seq1.rulearr[0];
++ else
++ rule = seq1.rule;
+ }
+
+ /* Free the memory if needed. */
diff --git a/patches/source/glibc/glibc-2.17_CVE-2013-2207.diff b/patches/source/glibc/glibc-2.17_CVE-2013-2207.diff
new file mode 100644
index 000000000..c43ccf5cd
--- /dev/null
+++ b/patches/source/glibc/glibc-2.17_CVE-2013-2207.diff
@@ -0,0 +1,241 @@
+From 5d96012d9978efe4bad88a38e2efcbeada9f7585 Mon Sep 17 00:00:00 2001
+From: mancha <mancha1@hush.com>
+Date: Thu, 22 Aug 2013
+Subject: CVE-2013-2207, BZ #15755: Disable pt_chown.
+
+Using the setuid installed pt_chown and a weak check on whether a file
+descriptor is a tty, an attacker could fake a pty check using FUSE and
+trick pt_chown to grant ownership of a pty descriptor that the current
+user does not own. It cannot access /dev/pts/ptmx however.
+
+Pre-conditions for the attack:
+
+ * Attacker with local user account
+ * Kernel with FUSE support
+ * "user_allow_other" in /etc/fuse.conf
+ * Victim with allocated slave in /dev/pts
+
+In most modern distributions pt_chown is not needed because devpts
+is enabled by default. The fix for this CVE is to disable building
+and using pt_chown by default. We still provide a configure option
+to enable the use of pt_chown but distributions do so at their own
+risk.
+
+---
+This patch was adapted for glibc 2.17 point release from:
+http://sourceware.org/git/?p=glibc.git;a=commit;h=e4608715e6e1
+---
+
+ INSTALL | 12 ++++++++++++
+ config.h.in | 3 +++
+ config.make.in | 1 +
+ configure | 15 +++++++++++++++
+ configure.in | 10 ++++++++++
+ login/Makefile | 8 +++++++-
+ manual/install.texi | 14 ++++++++++++++
+ sysdeps/unix/grantpt.c | 8 +++++---
+ sysdeps/unix/sysv/linux/grantpt.c | 5 +++--
+ 9 files changed, 70 insertions(+), 6 deletions(-)
+---
+
+--- a/INSTALL
++++ b/INSTALL
+@@ -128,6 +128,18 @@ will be used, and CFLAGS sets optimizati
+ this can be prevented though there generally is no reason since it
+ creates compatibility problems.
+
++`--enable-pt_chown'
++ The file `pt_chown' is a helper binary for `grantpt' (*note
++ Pseudo-Terminals: Allocation.) that is installed setuid root to
++ fix up pseudo-terminal ownership. It is not built by default
++ because systems using the Linux kernel are commonly built with the
++ `devpts' filesystem enabled and mounted at `/dev/pts', which
++ manages pseudo-terminal ownership automatically. By using
++ `--enable-pt_chown', you may build `pt_chown' and install it
++ setuid and owned by `root'. The use of `pt_chown' introduces
++ additional security risks to the system and you should enable it
++ only if you understand and accept those risks.
++
+ `--build=BUILD-SYSTEM'
+ `--host=HOST-SYSTEM'
+ These options are for cross-compiling. If you specify both
+--- a/config.h.in
++++ b/config.h.in
+@@ -232,4 +232,7 @@
+ /* The ARM hard-float ABI is being used. */
+ #undef HAVE_ARM_PCS_VFP
+
++/* The pt_chown binary is being built and used by grantpt. */
++#undef HAVE_PT_CHOWN
++
+ #endif
+--- a/config.make.in
++++ b/config.make.in
+@@ -101,6 +101,7 @@ force-install = @force_install@
+ link-obsolete-rpc = @link_obsolete_rpc@
+ build-nscd = @build_nscd@
+ use-nscd = @use_nscd@
++build-pt-chown = @build_pt_chown@
+
+ # Build tools.
+ CC = @CC@
+--- a/configure
++++ b/configure
+@@ -653,6 +653,7 @@ multi_arch
+ base_machine
+ add_on_subdirs
+ add_ons
++build_pt_chown
+ build_nscd
+ link_obsolete_rpc
+ libc_cv_nss_crypt
+@@ -759,6 +760,7 @@ enable_obsolete_rpc
+ enable_systemtap
+ enable_build_nscd
+ enable_nscd
++enable_pt_chown
+ with_cpu
+ '
+ ac_precious_vars='build_alias
+@@ -1419,6 +1421,7 @@ Optional Features:
+ --enable-systemtap enable systemtap static probe points [default=no]
+ --disable-build-nscd disable building and installing the nscd daemon
+ --disable-nscd library functions will not contact the nscd daemon
++ --enable-pt_chown Enable building and installing pt_chown
+
+ Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+@@ -3933,6 +3936,18 @@ else
+ use_nscd=yes
+ fi
+
++# Check whether --enable-pt_chown was given.
++if test "${enable_pt_chown+set}" = set; then :
++ enableval=$enable_pt_chown; build_pt_chown=$enableval
++else
++ build_pt_chown=no
++fi
++
++
++if test $build_pt_chown = yes; then
++ $as_echo "#define HAVE_PT_CHOWN 1" >>confdefs.h
++
++fi
+
+ # The way shlib-versions is used to generate soversions.mk uses a
+ # fairly simplistic model for name recognition that can't distinguish
+--- a/configure.in
++++ b/configure.in
+@@ -315,6 +315,16 @@ AC_ARG_ENABLE([nscd],
+ [use_nscd=$enableval],
+ [use_nscd=yes])
+
++AC_ARG_ENABLE([pt_chown],
++ [AS_HELP_STRING([--enable-pt_chown],
++ [Enable building and installing pt_chown])],
++ [build_pt_chown=$enableval],
++ [build_pt_chown=no])
++AC_SUBST(build_pt_chown)
++if test $build_pt_chown = yes; then
++ AC_DEFINE(HAVE_PT_CHOWN)
++fi
++
+ # The way shlib-versions is used to generate soversions.mk uses a
+ # fairly simplistic model for name recognition that can't distinguish
+ # i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os
+--- a/login/Makefile
++++ b/login/Makefile
+@@ -29,9 +29,15 @@ routines := getutent getutent_r getutid
+
+ CFLAGS-grantpt.c = -DLIBEXECDIR='"$(libexecdir)"'
+
+-others = utmpdump pt_chown
++others = utmpdump
++
++include ../Makeconfig
++
++ifeq (yes,$(build-pt-chown))
++others += pt_chown
+ others-pie = pt_chown
+ install-others-programs = $(inst_libexecdir)/pt_chown
++endif
+
+ subdir-dirs = programs
+ vpath %.c programs
+--- a/manual/install.texi
++++ b/manual/install.texi
+@@ -155,6 +155,20 @@ if the used tools support it. By using
+ prevented though there generally is no reason since it creates
+ compatibility problems.
+
++@pindex pt_chown
++@findex grantpt
++@item --enable-pt_chown
++The file @file{pt_chown} is a helper binary for @code{grantpt}
++(@pxref{Allocation, Pseudo-Terminals}) that is installed setuid root to
++fix up pseudo-terminal ownership. It is not built by default because
++systems using the Linux kernel are commonly built with the @code{devpts}
++filesystem enabled and mounted at @file{/dev/pts}, which manages
++pseudo-terminal ownership automatically. By using
++@samp{--enable-pt_chown}, you may build @file{pt_chown} and install it
++setuid and owned by @code{root}. The use of @file{pt_chown} introduces
++additional security risks to the system and you should enable it only if
++you understand and accept those risks.
++
+ @item --build=@var{build-system}
+ @itemx --host=@var{host-system}
+ These options are for cross-compiling. If you specify both options and
+--- a/sysdeps/unix/grantpt.c
++++ b/sysdeps/unix/grantpt.c
+@@ -173,9 +173,10 @@ grantpt (int fd)
+ retval = 0;
+ goto cleanup;
+
+- /* We have to use the helper program. */
++ /* We have to use the helper program if it is available.. */
+ helper:;
+
++#ifdef HAVE_PT_CHOWN
+ pid_t pid = __fork ();
+ if (pid == -1)
+ goto cleanup;
+@@ -190,9 +191,9 @@ grantpt (int fd)
+ if (__dup2 (fd, PTY_FILENO) < 0)
+ _exit (FAIL_EBADF);
+
+-#ifdef CLOSE_ALL_FDS
++# ifdef CLOSE_ALL_FDS
+ CLOSE_ALL_FDS ();
+-#endif
++# endif
+
+ execle (_PATH_PT_CHOWN, basename (_PATH_PT_CHOWN), NULL, NULL);
+ _exit (FAIL_EXEC);
+@@ -231,6 +232,7 @@ grantpt (int fd)
+ assert(! "getpt: internal error: invalid exit code from pt_chown");
+ }
+ }
++#endif
+
+ cleanup:
+ if (buf != _buf)
+--- a/sysdeps/unix/sysv/linux/grantpt.c
++++ b/sysdeps/unix/sysv/linux/grantpt.c
+@@ -11,7 +11,7 @@
+
+ #include "pty-private.h"
+
+-
++#if HAVE_PT_CHOWN
+ /* Close all file descriptors except the one specified. */
+ static void
+ close_all_fds (void)
+@@ -38,6 +38,7 @@ close_all_fds (void)
+ __dup2 (STDOUT_FILENO, STDERR_FILENO);
+ }
+ }
+-#define CLOSE_ALL_FDS() close_all_fds()
++# define CLOSE_ALL_FDS() close_all_fds()
++#endif
+
+ #include <sysdeps/unix/grantpt.c>
diff --git a/patches/source/glibc/glibc-2.17_CVE-2013-4237.diff b/patches/source/glibc/glibc-2.17_CVE-2013-4237.diff
new file mode 100644
index 000000000..4ac35f991
--- /dev/null
+++ b/patches/source/glibc/glibc-2.17_CVE-2013-4237.diff
@@ -0,0 +1,286 @@
+From 7fdc7f99b0b6ca222200ab5d99c500447c6b1cfc Mon Sep 17 00:00:00 2001
+From: mancha <mancha1@hush.com>
+Date: Wed, 23 Oct 2013
+Subject: CVE-2013-4237
+
+The readdir_r function could write more than NAME_MAX bytes
+to the d_name member of struct dirent, or omit the terminating NUL
+character.
+
+---
+This patch was adapted for glibc 2.17 based on:
+https://sourceware.org/git/?p=glibc.git;a=commit;h=91ce40854d0b
+---
+
+ manual/conf.texi | 9 ++
+ manual/filesys.texi | 73 +++++++++++++++++-------
+ sysdeps/posix/dirstream.h | 2
+ sysdeps/posix/opendir.c | 1
+ sysdeps/posix/readdir_r.c | 42 +++++++++----
+ sysdeps/posix/rewinddir.c | 1
+ sysdeps/unix/sysv/linux/i386/readdir64_r.c | 1
+ sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c | 1
+ 8 files changed, 96 insertions(+), 34 deletions(-)
+
+--- a/manual/conf.texi
++++ b/manual/conf.texi
+@@ -1149,6 +1149,9 @@ typed ahead as input. @xref{I/O Queues}.
+ @deftypevr Macro int NAME_MAX
+ The uniform system limit (if any) for the length of a file name component, not
+ including the terminating null character.
++
++@strong{Portability Note:} On some systems, @theglibc{} defines
++@code{NAME_MAX}, but does not actually enforce this limit.
+ @end deftypevr
+
+ @comment limits.h
+@@ -1157,6 +1160,9 @@ including the terminating null character.
+ The uniform system limit (if any) for the length of an entire file name (that
+ is, the argument given to system calls such as @code{open}), including the
+ terminating null character.
++
++@strong{Portability Note:} @Theglibc{} does not enforce this limit
++even if @code{PATH_MAX} is defined.
+ @end deftypevr
+
+ @cindex limits, pipe buffer size
+@@ -1476,6 +1482,9 @@ Inquire about the value of @code{POSIX_REC_MIN_XFER_SIZE}.
+ Inquire about the value of @code{POSIX_REC_XFER_ALIGN}.
+ @end table
+
++@strong{Portability Note:} On some systems, @theglibc{} does not
++enforce @code{_PC_NAME_MAX} or @code{_PC_PATH_MAX} limits.
++
+ @node Utility Limits
+ @section Utility Program Capacity Limits
+
+--- a/manual/filesys.texi
++++ b/manual/filesys.texi
+@@ -444,9 +444,9 @@ symbols are declared in the header file @file{dirent.h}.
+ @comment POSIX.1
+ @deftypefun {struct dirent *} readdir (DIR *@var{dirstream})
+ This function reads the next entry from the directory. It normally
+-returns a pointer to a structure containing information about the file.
+-This structure is statically allocated and can be rewritten by a
+-subsequent call.
++returns a pointer to a structure containing information about the
++file. This structure is associated with the @var{dirstream} handle
++and can be rewritten by a subsequent call.
+
+ @strong{Portability Note:} On some systems @code{readdir} may not
+ return entries for @file{.} and @file{..}, even though these are always
+@@ -461,19 +461,61 @@ conditions are defined for this function:
+ The @var{dirstream} argument is not valid.
+ @end table
+
+-@code{readdir} is not thread safe. Multiple threads using
+-@code{readdir} on the same @var{dirstream} may overwrite the return
+-value. Use @code{readdir_r} when this is critical.
++To distinguish between an end-of-directory condition or an error, you
++must set @code{errno} to zero before calling @code{readdir}. To avoid
++entering an infinite loop, you should stop reading from the directory
++after the first error.
++
++In POSIX.1-2008, @code{readdir} is not thread-safe. In @theglibc{}
++implementation, it is safe to call @code{readdir} concurrently on
++different @var{dirstream}s, but multiple threads accessing the same
++@var{dirstream} result in undefined behavior. @code{readdir_r} is a
++fully thread-safe alternative, but suffers from poor portability (see
++below). It is recommended that you use @code{readdir}, with external
++locking if multiple threads access the same @var{dirstream}.
+ @end deftypefun
+
+ @comment dirent.h
+ @comment GNU
+ @deftypefun int readdir_r (DIR *@var{dirstream}, struct dirent *@var{entry}, struct dirent **@var{result})
+-This function is the reentrant version of @code{readdir}. Like
+-@code{readdir} it returns the next entry from the directory. But to
+-prevent conflicts between simultaneously running threads the result is
+-not stored in statically allocated memory. Instead the argument
+-@var{entry} points to a place to store the result.
++This function is a version of @code{readdir} which performs internal
++locking. Like @code{readdir} it returns the next entry from the
++directory. To prevent conflicts between simultaneously running
++threads the result is stored inside the @var{entry} object.
++
++@strong{Portability Note:} It is recommended to use @code{readdir}
++instead of @code{readdir_r} for the following reasons:
++
++@itemize @bullet
++@item
++On systems which do not define @code{NAME_MAX}, it may not be possible
++to use @code{readdir_r} safely because the caller does not specify the
++length of the buffer for the directory entry.
++
++@item
++On some systems, @code{readdir_r} cannot read directory entries with
++very long names. If such a name is encountered, @theglibc{}
++implementation of @code{readdir_r} returns with an error code of
++@code{ENAMETOOLONG} after the final directory entry has been read. On
++other systems, @code{readdir_r} may return successfully, but the
++@code{d_name} member may not be NUL-terminated or may be truncated.
++
++@item
++POSIX-1.2008 does not guarantee that @code{readdir} is thread-safe,
++even when access to the same @var{dirstream} is serialized. But in
++current implementations (including @theglibc{}), it is safe to call
++@code{readdir} concurrently on different @var{dirstream}s, so there is
++no need to use @code{readdir_r} in most multi-threaded programs. In
++the rare case that multiple threads need to read from the same
++@var{dirstream}, it is still better to use @code{readdir} and external
++synchronization.
++
++@item
++It is expected that future versions of POSIX will obsolete
++@code{readdir_r} and mandate the level of thread safety for
++@code{readdir} which is provided by @theglibc{} and other
++implementations today.
++@end itemize
+
+ Normally @code{readdir_r} returns zero and sets @code{*@var{result}}
+ to @var{entry}. If there are no more entries in the directory or an
+@@ -481,15 +523,6 @@ error is detected, @code{readdir_r} sets @code{*@var{result}} to a
+ null pointer and returns a nonzero error code, also stored in
+ @code{errno}, as described for @code{readdir}.
+
+-@strong{Portability Note:} On some systems @code{readdir_r} may not
+-return a NUL terminated string for the file name, even when there is no
+-@code{d_reclen} field in @code{struct dirent} and the file
+-name is the maximum allowed size. Modern systems all have the
+-@code{d_reclen} field, and on old systems multi-threading is not
+-critical. In any case there is no such problem with the @code{readdir}
+-function, so that even on systems without the @code{d_reclen} member one
+-could use multiple threads by using external locking.
+-
+ It is also important to look at the definition of the @code{struct
+ dirent} type. Simply passing a pointer to an object of this type for
+ the second parameter of @code{readdir_r} might not be enough. Some
+--- a/sysdeps/posix/dirstream.h
++++ b/sysdeps/posix/dirstream.h
+@@ -39,6 +39,8 @@ struct __dirstream
+
+ off_t filepos; /* Position of next entry to read. */
+
++ int errcode; /* Delayed error code. */
++
+ /* Directory block. */
+ char data[0] __attribute__ ((aligned (__alignof__ (void*))));
+ };
+--- a/sysdeps/posix/opendir.c
++++ b/sysdeps/posix/opendir.c
+@@ -230,6 +230,7 @@ __alloc_dir (int fd, bool close_fd, int flags, const struct stat64 *statp)
+ dirp->size = 0;
+ dirp->offset = 0;
+ dirp->filepos = 0;
++ dirp->errcode = 0;
+
+ return dirp;
+ }
+--- a/sysdeps/posix/readdir_r.c
++++ b/sysdeps/posix/readdir_r.c
+@@ -41,6 +41,7 @@ __READDIR_R (DIR *dirp, DIRENT_TYPE *entry, DIRENT_TYPE **result)
+ DIRENT_TYPE *dp;
+ size_t reclen;
+ const int saved_errno = errno;
++ int ret;
+
+ __libc_lock_lock (dirp->lock);
+
+@@ -71,10 +72,10 @@ __READDIR_R (DIR *dirp, DIRENT_TYPE *entry, DIRENT_TYPE **result)
+ bytes = 0;
+ __set_errno (saved_errno);
+ }
++ if (bytes < 0)
++ dirp->errcode = errno;
+
+ dp = NULL;
+- /* Reclen != 0 signals that an error occurred. */
+- reclen = bytes != 0;
+ break;
+ }
+ dirp->size = (size_t) bytes;
+@@ -107,29 +108,46 @@ __READDIR_R (DIR *dirp, DIRENT_TYPE *entry, DIRENT_TYPE **result)
+ dirp->filepos += reclen;
+ #endif
+
+- /* Skip deleted files. */
++#ifdef NAME_MAX
++ if (reclen > offsetof (DIRENT_TYPE, d_name) + NAME_MAX + 1)
++ {
++ /* The record is very long. It could still fit into the
++ caller-supplied buffer if we can skip padding at the
++ end. */
++ size_t namelen = _D_EXACT_NAMLEN (dp);
++ if (namelen <= NAME_MAX)
++ reclen = offsetof (DIRENT_TYPE, d_name) + namelen + 1;
++ else
++ {
++ /* The name is too long. Ignore this file. */
++ dirp->errcode = ENAMETOOLONG;
++ dp->d_ino = 0;
++ continue;
++ }
++ }
++#endif
++
++ /* Skip deleted and ignored files. */
+ }
+ while (dp->d_ino == 0);
+
+ if (dp != NULL)
+ {
+-#ifdef GETDENTS_64BIT_ALIGNED
+- /* The d_reclen value might include padding which is not part of
+- the DIRENT_TYPE data structure. */
+- reclen = MIN (reclen,
+- offsetof (DIRENT_TYPE, d_name) + sizeof (dp->d_name));
+-#endif
+ *result = memcpy (entry, dp, reclen);
+-#ifdef GETDENTS_64BIT_ALIGNED
++#ifdef _DIRENT_HAVE_D_RECLEN
+ entry->d_reclen = reclen;
+ #endif
++ ret = 0;
+ }
+ else
+- *result = NULL;
++ {
++ *result = NULL;
++ ret = dirp->errcode;
++ }
+
+ __libc_lock_unlock (dirp->lock);
+
+- return dp != NULL ? 0 : reclen ? errno : 0;
++ return ret;
+ }
+
+ #ifdef __READDIR_R_ALIAS
+--- a/sysdeps/posix/rewinddir.c
++++ b/sysdeps/posix/rewinddir.c
+@@ -33,6 +33,7 @@ rewinddir (dirp)
+ dirp->filepos = 0;
+ dirp->offset = 0;
+ dirp->size = 0;
++ dirp->errcode = 0;
+ #ifndef NOT_IN_libc
+ __libc_lock_unlock (dirp->lock);
+ #endif
+--- a/sysdeps/unix/sysv/linux/i386/readdir64_r.c
++++ b/sysdeps/unix/sysv/linux/i386/readdir64_r.c
+@@ -18,7 +18,6 @@
+ #define __READDIR_R __readdir64_r
+ #define __GETDENTS __getdents64
+ #define DIRENT_TYPE struct dirent64
+-#define GETDENTS_64BIT_ALIGNED 1
+
+ #include <sysdeps/posix/readdir_r.c>
+
+--- a/sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c
++++ b/sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c
+@@ -1,5 +1,4 @@
+ #define readdir64_r __no_readdir64_r_decl
+-#define GETDENTS_64BIT_ALIGNED 1
+ #include <sysdeps/posix/readdir_r.c>
+ #undef readdir64_r
+ weak_alias (__readdir_r, readdir64_r)
diff --git a/patches/source/glibc/glibc-2.17_CVE-2013-4332.diff b/patches/source/glibc/glibc-2.17_CVE-2013-4332.diff
new file mode 100644
index 000000000..9f7f5886c
--- /dev/null
+++ b/patches/source/glibc/glibc-2.17_CVE-2013-4332.diff
@@ -0,0 +1,64 @@
+From 0d6085cb1b4330b835ad08a3ec8f80b30f0cadb4 Mon Sep 17 00:00:00 2001
+From: mancha <mancha1@hush.com>
+Date: Wed, 11 Sep 2013
+Subject: CVE-2013-4332
+
+malloc: Check for integer overflow in pvalloc, valloc, and memalign.
+
+A large bytes parameter to pvalloc, valloc, or memalign could cause
+an integer overflow and corrupt allocator internals. Check the
+overflow does not occur before continuing with the allocation.
+
+Note: This is a backport to glibc 2.17 of the following three commits:
+ * https://sourceware.org/git/?p=glibc.git;a=commit;h=1159a193696a
+ * https://sourceware.org/git/?p=glibc.git;a=commit;h=55e17aadc1ef
+ * https://sourceware.org/git/?p=glibc.git;a=commit;h=b73ed247781d
+---
+
+malloc.c | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+
+--- a/malloc/malloc.c
++++ b/malloc/malloc.c
+@@ -3020,6 +3020,13 @@ __libc_memalign(size_t alignment, size_t
+ /* Otherwise, ensure that it is at least a minimum chunk size */
+ if (alignment < MINSIZE) alignment = MINSIZE;
+
++ /* Check for overflow. */
++ if (bytes > SIZE_MAX - alignment - MINSIZE)
++ {
++ __set_errno (ENOMEM);
++ return 0;
++ }
++
+ arena_get(ar_ptr, bytes + alignment + MINSIZE);
+ if(!ar_ptr)
+ return 0;
+@@ -3051,6 +3058,13 @@ __libc_valloc(size_t bytes)
+
+ size_t pagesz = GLRO(dl_pagesize);
+
++ /* Check for overflow. */
++ if (bytes > SIZE_MAX - pagesz - MINSIZE)
++ {
++ __set_errno (ENOMEM);
++ return 0;
++ }
++
+ __malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, size_t,
+ const __malloc_ptr_t)) =
+ force_reg (__memalign_hook);
+@@ -3088,6 +3102,13 @@ __libc_pvalloc(size_t bytes)
+ size_t page_mask = GLRO(dl_pagesize) - 1;
+ size_t rounded_bytes = (bytes + page_mask) & ~(page_mask);
+
++ /* Check for overflow. */
++ if (bytes > SIZE_MAX - 2*pagesz - MINSIZE)
++ {
++ __set_errno (ENOMEM);
++ return 0;
++ }
++
+ __malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, size_t,
+ const __malloc_ptr_t)) =
+ force_reg (__memalign_hook);
diff --git a/patches/source/glibc/glibc-2.17_CVE-2013-4458.diff b/patches/source/glibc/glibc-2.17_CVE-2013-4458.diff
new file mode 100644
index 000000000..7ed5789f2
--- /dev/null
+++ b/patches/source/glibc/glibc-2.17_CVE-2013-4458.diff
@@ -0,0 +1,52 @@
+From f17988489a32f6c1308474bd7b408299646e0777 Mon Sep 17 00:00:00 2001
+From: mancha <mancha1@hush.com>
+Date: Fri, 25 Oct 2013
+Subject: CVE-2013-4458
+
+Stack overflow in getaddrinfo (AF_INET6 case) with many
+results has been fixed. Different from CVE-2013-1914.
+
+---
+This patch was adapted for glibc 2.17 based on:
+https://sourceware.org/git/?p=glibc.git;a=commit;h=7cbcdb369958
+---
+
+ getaddrinfo.c | 20 ++++++++++++++++++--
+ 1 file changed, 18 insertions(+), 2 deletions(-)
+
+--- a/sysdeps/posix/getaddrinfo.c
++++ b/sysdeps/posix/getaddrinfo.c
+@@ -196,7 +196,22 @@ gaih_inet_serv (const char *servicename, const struct gaih_typeproto *tp,
+ &rc, &herrno, NULL, &localcanon)); \
+ if (rc != ERANGE || herrno != NETDB_INTERNAL) \
+ break; \
+- tmpbuf = extend_alloca (tmpbuf, tmpbuflen, 2 * tmpbuflen); \
++ if (!malloc_tmpbuf && __libc_use_alloca (alloca_used + 2 * tmpbuflen)) \
++ tmpbuf = extend_alloca_account (tmpbuf, tmpbuflen, 2 * tmpbuflen, \
++ alloca_used); \
++ else \
++ { \
++ char *newp = realloc (malloc_tmpbuf ? tmpbuf : NULL, \
++ 2 * tmpbuflen); \
++ if (newp == NULL) \
++ { \
++ result = -EAI_MEMORY; \
++ goto free_and_return; \
++ } \
++ tmpbuf = newp; \
++ malloc_tmpbuf = true; \
++ tmpbuflen = 2 * tmpbuflen; \
++ } \
+ } \
+ if (status == NSS_STATUS_SUCCESS && rc == 0) \
+ h = &th; \
+@@ -208,7 +223,8 @@ gaih_inet_serv (const char *servicename, const struct gaih_typeproto *tp,
+ { \
+ __set_h_errno (herrno); \
+ _res.options |= old_res_options & RES_USE_INET6; \
+- return -EAI_SYSTEM; \
++ result = -EAI_SYSTEM; \
++ goto free_and_return; \
+ } \
+ if (herrno == TRY_AGAIN) \
+ no_data = EAI_AGAIN; \
diff --git a/patches/source/glibc/glibc-2.17_CVE-2013-4788.diff b/patches/source/glibc/glibc-2.17_CVE-2013-4788.diff
new file mode 100644
index 000000000..4bb20e396
--- /dev/null
+++ b/patches/source/glibc/glibc-2.17_CVE-2013-4788.diff
@@ -0,0 +1,460 @@
+From 866b96a005c53195ca649049b7e6ebef63ee3fe6 Mon Sep 17 00:00:00 2001
+From: mancha <mancha1@hush.com>
+Date: Wed, 23 Oct 2013
+Subject: CVE-2013-4788
+
+The pointer guard used for pointer mangling was not initialized for
+static applications resulting in the security feature being disabled.
+The pointer guard is now correctly initialized to a random value for
+static applications. Existing static applications need to be
+recompiled to take advantage of the fix.
+
+The test tst-ptrguard1-static and tst-ptrguard1 add regression
+coverage to ensure the pointer guards are sufficiently random
+and initialized to a default value.
+
+---
+This patch was adapted for glibc 2.17 based on:
+https://sourceware.org/git/?p=glibc.git;a=commit;h=c61b4d41c964
+---
+
+ csu/libc-start.c | 16 ++
+ elf/Makefile | 9 -
+ elf/tst-ptrguard1-static.c | 1
+ elf/tst-ptrguard1.c | 202 ++++++++++++++++++++++++++
+ ports/sysdeps/ia64/stackguard-macros.h | 3
+ ports/sysdeps/tile/stackguard-macros.h | 6
+ sysdeps/generic/stackguard-macros.h | 3
+ sysdeps/i386/stackguard-macros.h | 8 +
+ sysdeps/powerpc/powerpc32/stackguard-macros.h | 10 +
+ sysdeps/powerpc/powerpc64/stackguard-macros.h | 10 +
+ sysdeps/s390/s390-32/stackguard-macros.h | 11 +
+ sysdeps/s390/s390-64/stackguard-macros.h | 14 +
+ sysdeps/sparc/sparc32/stackguard-macros.h | 3
+ sysdeps/sparc/sparc64/stackguard-macros.h | 3
+ sysdeps/x86_64/stackguard-macros.h | 5
+ 15 files changed, 302 insertions(+), 2 deletions(-)
+
+--- a/csu/libc-start.c
++++ b/csu/libc-start.c
+@@ -38,6 +38,12 @@ extern void __pthread_initialize_minimal (void);
+ in thread local area. */
+ uintptr_t __stack_chk_guard attribute_relro;
+ # endif
++# ifndef THREAD_SET_POINTER_GUARD
++/* Only exported for architectures that don't store the pointer guard
++ value in thread local area. */
++uintptr_t __pointer_chk_guard_local
++ attribute_relro attribute_hidden __attribute__ ((nocommon));
++# endif
+ #endif
+
+ #ifdef HAVE_PTR_NTHREADS
+@@ -184,6 +190,16 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL),
+ # else
+ __stack_chk_guard = stack_chk_guard;
+ # endif
++
++ /* Set up the pointer guard value. */
++ uintptr_t pointer_chk_guard = _dl_setup_pointer_guard (_dl_random,
++ stack_chk_guard);
++# ifdef THREAD_SET_POINTER_GUARD
++ THREAD_SET_POINTER_GUARD (pointer_chk_guard);
++# else
++ __pointer_chk_guard_local = pointer_chk_guard;
++# endif
++
+ #endif
+
+ /* Register the destructor of the dynamic linker if there is any. */
+--- a/elf/Makefile
++++ b/elf/Makefile
+@@ -121,7 +121,8 @@ endif
+ tests = tst-tls1 tst-tls2 tst-tls9 tst-leaks1 \
+ tst-array1 tst-array2 tst-array3 tst-array4 tst-array5
+ tests-static = tst-tls1-static tst-tls2-static tst-stackguard1-static \
+- tst-leaks1-static tst-array1-static tst-array5-static
++ tst-leaks1-static tst-array1-static tst-array5-static \
++ tst-ptrguard1-static
+ ifeq (yes,$(build-shared))
+ tests-static += tst-tls9-static
+ tst-tls9-static-ENV = \
+@@ -145,7 +146,8 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
+ tst-audit1 tst-audit2 tst-audit8 \
+ tst-stackguard1 tst-addr1 tst-thrlock \
+ tst-unique1 tst-unique2 tst-unique3 tst-unique4 \
+- tst-initorder tst-initorder2 tst-relsort1
++ tst-initorder tst-initorder2 tst-relsort1 \
++ tst-ptrguard1
+ # reldep9
+ test-srcs = tst-pathopt
+ selinux-enabled := $(shell cat /selinux/enforce 2> /dev/null)
+@@ -1045,6 +1047,9 @@ LDFLAGS-order2mod2.so = $(no-as-needed)
+ tst-stackguard1-ARGS = --command "$(host-built-program-cmd) --child"
+ tst-stackguard1-static-ARGS = --command "$(objpfx)tst-stackguard1-static --child"
+
++tst-ptrguard1-ARGS = --command "$(host-built-program-cmd) --child"
++tst-ptrguard1-static-ARGS = --command "$(objpfx)tst-ptrguard1-static --child"
++
+ $(objpfx)tst-leaks1: $(libdl)
+ $(objpfx)tst-leaks1-mem: $(objpfx)tst-leaks1.out
+ $(common-objpfx)malloc/mtrace $(objpfx)tst-leaks1.mtrace > $@
+--- /dev/null
++++ b/elf/tst-ptrguard1-static.c
+@@ -0,0 +1 @@
++#include "tst-ptrguard1.c"
+--- /dev/null
++++ b/elf/tst-ptrguard1.c
+@@ -0,0 +1,202 @@
++/* Copyright (C) 2013 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, see
++ <http://www.gnu.org/licenses/>. */
++
++#include <errno.h>
++#include <stdbool.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sys/wait.h>
++#include <stackguard-macros.h>
++#include <tls.h>
++#include <unistd.h>
++
++#ifndef POINTER_CHK_GUARD
++extern uintptr_t __pointer_chk_guard;
++# define POINTER_CHK_GUARD __pointer_chk_guard
++#endif
++
++static const char *command;
++static bool child;
++static uintptr_t ptr_chk_guard_copy;
++static bool ptr_chk_guard_copy_set;
++static int fds[2];
++
++static void __attribute__ ((constructor))
++con (void)
++{
++ ptr_chk_guard_copy = POINTER_CHK_GUARD;
++ ptr_chk_guard_copy_set = true;
++}
++
++static int
++uintptr_t_cmp (const void *a, const void *b)
++{
++ if (*(uintptr_t *) a < *(uintptr_t *) b)
++ return 1;
++ if (*(uintptr_t *) a > *(uintptr_t *) b)
++ return -1;
++ return 0;
++}
++
++static int
++do_test (void)
++{
++ if (!ptr_chk_guard_copy_set)
++ {
++ puts ("constructor has not been run");
++ return 1;
++ }
++
++ if (ptr_chk_guard_copy != POINTER_CHK_GUARD)
++ {
++ puts ("POINTER_CHK_GUARD changed between constructor and do_test");
++ return 1;
++ }
++
++ if (child)
++ {
++ write (2, &ptr_chk_guard_copy, sizeof (ptr_chk_guard_copy));
++ return 0;
++ }
++
++ if (command == NULL)
++ {
++ puts ("missing --command or --child argument");
++ return 1;
++ }
++
++#define N 16
++ uintptr_t child_ptr_chk_guards[N + 1];
++ child_ptr_chk_guards[N] = ptr_chk_guard_copy;
++ int i;
++ for (i = 0; i < N; ++i)
++ {
++ if (pipe (fds) < 0)
++ {
++ printf ("couldn't create pipe: %m\n");
++ return 1;
++ }
++
++ pid_t pid = fork ();
++ if (pid < 0)
++ {
++ printf ("fork failed: %m\n");
++ return 1;
++ }
++
++ if (!pid)
++ {
++ if (ptr_chk_guard_copy != POINTER_CHK_GUARD)
++ {
++ puts ("POINTER_CHK_GUARD changed after fork");
++ exit (1);
++ }
++
++ close (fds[0]);
++ close (2);
++ dup2 (fds[1], 2);
++ close (fds[1]);
++
++ system (command);
++ exit (0);
++ }
++
++ close (fds[1]);
++
++ if (TEMP_FAILURE_RETRY (read (fds[0], &child_ptr_chk_guards[i],
++ sizeof (uintptr_t))) != sizeof (uintptr_t))
++ {
++ puts ("could not read ptr_chk_guard value from child");
++ return 1;
++ }
++
++ close (fds[0]);
++
++ pid_t termpid;
++ int status;
++ termpid = TEMP_FAILURE_RETRY (waitpid (pid, &status, 0));
++ if (termpid == -1)
++ {
++ printf ("waitpid failed: %m\n");
++ return 1;
++ }
++ else if (termpid != pid)
++ {
++ printf ("waitpid returned %ld != %ld\n",
++ (long int) termpid, (long int) pid);
++ return 1;
++ }
++ else if (!WIFEXITED (status) || WEXITSTATUS (status))
++ {
++ puts ("child hasn't exited with exit status 0");
++ return 1;
++ }
++ }
++
++ qsort (child_ptr_chk_guards, N + 1, sizeof (uintptr_t), uintptr_t_cmp);
++
++ /* The default pointer guard is the same as the default stack guard.
++ They are only set to default if dl_random is NULL. */
++ uintptr_t default_guard = 0;
++ unsigned char *p = (unsigned char *) &default_guard;
++ p[sizeof (uintptr_t) - 1] = 255;
++ p[sizeof (uintptr_t) - 2] = '\n';
++ p[0] = 0;
++
++ /* Test if the pointer guard canaries are either randomized,
++ or equal to the default pointer guard value.
++ Even with randomized pointer guards it might happen
++ that the random number generator generates the same
++ values, but if that happens in more than half from
++ the 16 runs, something is very wrong. */
++ int ndifferences = 0;
++ int ndefaults = 0;
++ for (i = 0; i < N; ++i)
++ {
++ if (child_ptr_chk_guards[i] != child_ptr_chk_guards[i+1])
++ ndifferences++;
++ else if (child_ptr_chk_guards[i] == default_guard)
++ ndefaults++;
++ }
++
++ printf ("differences %d defaults %d\n", ndifferences, ndefaults);
++
++ if (ndifferences < N / 2 && ndefaults < N / 2)
++ {
++ puts ("pointer guard values are not randomized enough");
++ puts ("nor equal to the default value");
++ return 1;
++ }
++
++ return 0;
++}
++
++#define OPT_COMMAND 10000
++#define OPT_CHILD 10001
++#define CMDLINE_OPTIONS \
++ { "command", required_argument, NULL, OPT_COMMAND }, \
++ { "child", no_argument, NULL, OPT_CHILD },
++#define CMDLINE_PROCESS \
++ case OPT_COMMAND: \
++ command = optarg; \
++ break; \
++ case OPT_CHILD: \
++ child = true; \
++ break;
++#define TEST_FUNCTION do_test ()
++#include "../test-skeleton.c"
+--- a/ports/sysdeps/ia64/stackguard-macros.h
++++ b/ports/sysdeps/ia64/stackguard-macros.h
+@@ -2,3 +2,6 @@
+
+ #define STACK_CHK_GUARD \
+ ({ uintptr_t x; asm ("adds %0 = -8, r13;; ld8 %0 = [%0]" : "=r" (x)); x; })
++
++#define POINTER_CHK_GUARD \
++ ({ uintptr_t x; asm ("adds %0 = -16, r13;; ld8 %0 = [%0]" : "=r" (x)); x; })
+--- a/ports/sysdeps/tile/stackguard-macros.h
++++ b/ports/sysdeps/tile/stackguard-macros.h
+@@ -4,11 +4,17 @@
+ # if __WORDSIZE == 64
+ # define STACK_CHK_GUARD \
+ ({ uintptr_t x; asm ("addi %0, tp, -16; ld %0, %0" : "=r" (x)); x; })
++# define POINTER_CHK_GUARD \
++ ({ uintptr_t x; asm ("addi %0, tp, -24; ld %0, %0" : "=r" (x)); x; })
+ # else
+ # define STACK_CHK_GUARD \
+ ({ uintptr_t x; asm ("addi %0, tp, -8; ld4s %0, %0" : "=r" (x)); x; })
++# define POINTER_CHK_GUARD \
++ ({ uintptr_t x; asm ("addi %0, tp, -12; ld4s %0, %0" : "=r" (x)); x; })
+ # endif
+ #else
+ # define STACK_CHK_GUARD \
+ ({ uintptr_t x; asm ("addi %0, tp, -8; lw %0, %0" : "=r" (x)); x; })
++# define POINTER_CHK_GUARD \
++ ({ uintptr_t x; asm ("addi %0, tp, -12; lw %0, %0" : "=r" (x)); x; })
+ #endif
+--- a/sysdeps/generic/stackguard-macros.h
++++ b/sysdeps/generic/stackguard-macros.h
+@@ -2,3 +2,6 @@
+
+ extern uintptr_t __stack_chk_guard;
+ #define STACK_CHK_GUARD __stack_chk_guard
++
++extern uintptr_t __pointer_chk_guard_local;
++#define POINTER_CHK_GUARD __pointer_chk_guard_local
+--- a/sysdeps/i386/stackguard-macros.h
++++ b/sysdeps/i386/stackguard-macros.h
+@@ -2,3 +2,11 @@
+
+ #define STACK_CHK_GUARD \
+ ({ uintptr_t x; asm ("movl %%gs:0x14, %0" : "=r" (x)); x; })
++
++#define POINTER_CHK_GUARD \
++ ({ \
++ uintptr_t x; \
++ asm ("movl %%gs:%c1, %0" : "=r" (x) \
++ : "i" (offsetof (tcbhead_t, pointer_guard))); \
++ x; \
++ })
+--- a/sysdeps/powerpc/powerpc32/stackguard-macros.h
++++ b/sysdeps/powerpc/powerpc32/stackguard-macros.h
+@@ -2,3 +2,13 @@
+
+ #define STACK_CHK_GUARD \
+ ({ uintptr_t x; asm ("lwz %0,-28680(2)" : "=r" (x)); x; })
++
++#define POINTER_CHK_GUARD \
++ ({ \
++ uintptr_t x; \
++ asm ("lwz %0,%1(2)" \
++ : "=r" (x) \
++ : "i" (offsetof (tcbhead_t, pointer_guard) - TLS_TCB_OFFSET - sizeof (tcbhead_t)) \
++ ); \
++ x; \
++ })
+--- a/sysdeps/powerpc/powerpc64/stackguard-macros.h
++++ b/sysdeps/powerpc/powerpc64/stackguard-macros.h
+@@ -2,3 +2,13 @@
+
+ #define STACK_CHK_GUARD \
+ ({ uintptr_t x; asm ("ld %0,-28688(13)" : "=r" (x)); x; })
++
++#define POINTER_CHK_GUARD \
++ ({ \
++ uintptr_t x; \
++ asm ("ld %0,%1(2)" \
++ : "=r" (x) \
++ : "i" (offsetof (tcbhead_t, pointer_guard) - TLS_TCB_OFFSET - sizeof (tcbhead_t)) \
++ ); \
++ x; \
++ })
+--- a/sysdeps/s390/s390-32/stackguard-macros.h
++++ b/sysdeps/s390/s390-32/stackguard-macros.h
+@@ -2,3 +2,14 @@
+
+ #define STACK_CHK_GUARD \
+ ({ uintptr_t x; asm ("ear %0,%%a0; l %0,0x14(%0)" : "=a" (x)); x; })
++
++/* On s390/s390x there is no unique pointer guard, instead we use the
++ same value as the stack guard. */
++#define POINTER_CHK_GUARD \
++ ({ \
++ uintptr_t x; \
++ asm ("ear %0,%%a0; l %0,%1(%0)" \
++ : "=a" (x) \
++ : "i" (offsetof (tcbhead_t, stack_guard))); \
++ x; \
++ })
+--- a/sysdeps/s390/s390-64/stackguard-macros.h
++++ b/sysdeps/s390/s390-64/stackguard-macros.h
+@@ -2,3 +2,17 @@
+
+ #define STACK_CHK_GUARD \
+ ({ uintptr_t x; asm ("ear %0,%%a0; sllg %0,%0,32; ear %0,%%a1; lg %0,0x28(%0)" : "=a" (x)); x; })
++
++/* On s390/s390x there is no unique pointer guard, instead we use the
++ same value as the stack guard. */
++#define POINTER_CHK_GUARD \
++ ({ \
++ uintptr_t x; \
++ asm ("ear %0,%%a0;" \
++ "sllg %0,%0,32;" \
++ "ear %0,%%a1;" \
++ "lg %0,%1(%0)" \
++ : "=a" (x) \
++ : "i" (offsetof (tcbhead_t, stack_guard))); \
++ x; \
++ })
+--- a/sysdeps/sparc/sparc32/stackguard-macros.h
++++ b/sysdeps/sparc/sparc32/stackguard-macros.h
+@@ -2,3 +2,6 @@
+
+ #define STACK_CHK_GUARD \
+ ({ uintptr_t x; asm ("ld [%%g7+0x14], %0" : "=r" (x)); x; })
++
++#define POINTER_CHK_GUARD \
++ ({ uintptr_t x; asm ("ld [%%g7+0x18], %0" : "=r" (x)); x; })
+--- a/sysdeps/sparc/sparc64/stackguard-macros.h
++++ b/sysdeps/sparc/sparc64/stackguard-macros.h
+@@ -2,3 +2,6 @@
+
+ #define STACK_CHK_GUARD \
+ ({ uintptr_t x; asm ("ldx [%%g7+0x28], %0" : "=r" (x)); x; })
++
++#define POINTER_CHK_GUARD \
++ ({ uintptr_t x; asm ("ldx [%%g7+0x30], %0" : "=r" (x)); x; })
+--- a/sysdeps/x86_64/stackguard-macros.h
++++ b/sysdeps/x86_64/stackguard-macros.h
+@@ -4,3 +4,8 @@
+ ({ uintptr_t x; \
+ asm ("mov %%fs:%c1, %0" : "=r" (x) \
+ : "i" (offsetof (tcbhead_t, stack_guard))); x; })
++
++#define POINTER_CHK_GUARD \
++ ({ uintptr_t x; \
++ asm ("mov %%fs:%c1, %0" : "=r" (x) \
++ : "i" (offsetof (tcbhead_t, pointer_guard))); x; })
diff --git a/patches/source/glibc/glibc-2.17_CVE-2014-0475.diff b/patches/source/glibc/glibc-2.17_CVE-2014-0475.diff
new file mode 100644
index 000000000..b28b8c5a3
--- /dev/null
+++ b/patches/source/glibc/glibc-2.17_CVE-2014-0475.diff
@@ -0,0 +1,404 @@
+From a1a7089da053642f09f84715dfe06cd3938de8da Mon Sep 17 00:00:00 2001
+From: mancha <mancha1 AT zoho DOT com>
+Date: Fri, 5 Sep 2014
+Subject: CVE-2014-0475
+
+This fixes a potential for directory traversal via crafted
+locale-related environment variables. This is particularly
+worrisome in the case suid/sgid programs inherit these
+variables potentially resulting in arbitrary code execution
+with elevated privileges.
+
+This fix for use with glibc 2.17 is based on the following
+upstream commits:
+
+https://sourceware.org/git/?p=glibc.git;h=4e8f95a0df7c
+https://sourceware.org/git/?p=glibc.git;h=d183645616b0
+
+---
+ locale/findlocale.c | 74 +++++++++++--
+ locale/setlocale.c | 14 ++
+ localedata/Makefile | 3 +
+ localedata/tst-setlocale3.c | 203 ++++++++++++++++++++++++++++++++++++
+ 4 files changed, 278 insertions(+), 16 deletions(-)
+
+--- a/locale/findlocale.c
++++ b/locale/findlocale.c
+@@ -17,6 +17,7 @@
+ <http://www.gnu.org/licenses/>. */
+
+ #include <assert.h>
++#include <errno.h>
+ #include <locale.h>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -57,6 +58,45 @@ struct loaded_l10nfile *_nl_locale_file_list[__LC_LAST];
+
+ const char _nl_default_locale_path[] attribute_hidden = LOCALEDIR;
+
++/* Checks if the name is actually present, that is, not NULL and not
++ empty. */
++static inline int
++name_present (const char *name)
++{
++ return name != NULL && name[0] != '\0';
++}
++
++/* Checks that the locale name neither extremely long, nor contains a
++ ".." path component (to prevent directory traversal). */
++static inline int
++valid_locale_name (const char *name)
++{
++ /* Not set. */
++ size_t namelen = strlen (name);
++ /* Name too long. The limit is arbitrary and prevents stack overflow
++ issues later. */
++ if (__glibc_unlikely (namelen > 255))
++ return 0;
++ /* Directory traversal attempt. */
++ static const char slashdot[4] = {'/', '.', '.', '/'};
++ if (__glibc_unlikely (memmem (name, namelen,
++ slashdot, sizeof (slashdot)) != NULL))
++ return 0;
++ if (namelen == 2 && __glibc_unlikely (name[0] == '.' && name [1] == '.'))
++ return 0;
++ if (namelen >= 3
++ && __glibc_unlikely (((name[0] == '.'
++ && name[1] == '.'
++ && name[2] == '/')
++ || (name[namelen - 3] == '/'
++ && name[namelen - 2] == '.'
++ && name[namelen - 1] == '.'))))
++ return 0;
++ /* If there is a slash in the name, it must start with one. */
++ if (__glibc_unlikely (memchr (name, '/', namelen) != NULL) && name[0] != '/')
++ return 0;
++ return 1;
++}
+
+ struct __locale_data *
+ internal_function
+@@ -65,7 +105,7 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len,
+ {
+ int mask;
+ /* Name of the locale for this category. */
+- char *loc_name;
++ char *loc_name = (char *) *name;
+ const char *language;
+ const char *modifier;
+ const char *territory;
+@@ -73,31 +113,39 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len,
+ const char *normalized_codeset;
+ struct loaded_l10nfile *locale_file;
+
+- if ((*name)[0] == '\0')
++ if (loc_name[0] == '\0')
+ {
+ /* The user decides which locale to use by setting environment
+ variables. */
+- *name = getenv ("LC_ALL");
+- if (*name == NULL || (*name)[0] == '\0')
+- *name = getenv (_nl_category_names.str
++ loc_name = getenv ("LC_ALL");
++ if (!name_present (loc_name))
++ loc_name = getenv (_nl_category_names.str
+ + _nl_category_name_idxs[category]);
+- if (*name == NULL || (*name)[0] == '\0')
+- *name = getenv ("LANG");
++ if (!name_present (loc_name))
++ loc_name = getenv ("LANG");
++ if (!name_present (loc_name))
++ loc_name = (char *) _nl_C_name;
+ }
+
+- if (*name == NULL || (*name)[0] == '\0'
+- || (__builtin_expect (__libc_enable_secure, 0)
+- && strchr (*name, '/') != NULL))
+- *name = (char *) _nl_C_name;
++ /* We used to fall back to the C locale if the name contains a slash
++ character '/', but we now check for directory traversal in
++ valid_locale_name, so this is no longer necessary. */
+
+- if (__builtin_expect (strcmp (*name, _nl_C_name), 1) == 0
+- || __builtin_expect (strcmp (*name, _nl_POSIX_name), 1) == 0)
++ if (__builtin_expect (strcmp (loc_name, _nl_C_name), 1) == 0
++ || __builtin_expect (strcmp (loc_name, _nl_POSIX_name), 1) == 0)
+ {
+ /* We need not load anything. The needed data is contained in
+ the library itself. */
+ *name = (char *) _nl_C_name;
+ return _nl_C[category];
+ }
++ else if (!valid_locale_name (loc_name))
++ {
++ __set_errno (EINVAL);
++ return NULL;
++ }
++
++ *name = loc_name;
+
+ /* We really have to load some data. First we try the archive,
+ but only if there was no LOCPATH environment variable specified. */
+--- a/localedata/Makefile
++++ b/localedata/Makefile
+@@ -77,7 +77,8 @@ locale_test_suite := tst_iswalnum tst_is
+
+ tests = $(locale_test_suite) tst-digits tst-setlocale bug-iconv-trans \
+ tst-leaks tst-mbswcs6 tst-xlocale1 tst-xlocale2 bug-usesetlocale \
+- tst-strfmon1 tst-sscanf bug-setlocale1 tst-setlocale2
++ tst-strfmon1 tst-sscanf bug-setlocale1 tst-setlocale2 \
++ tst-setlocale3
+ ifeq (yes,$(build-shared))
+ ifneq (no,$(PERL))
+ tests: $(objpfx)mtrace-tst-leaks
+--- /dev/null
++++ b/localedata/tst-setlocale3.c
+@@ -0,0 +1,203 @@
++/* Regression test for setlocale invalid environment variable handling.
++ Copyright (C) 2014 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, see
++ <http://www.gnu.org/licenses/>. */
++
++#include <locale.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++
++/* The result of setlocale may be overwritten by subsequent calls, so
++ this wrapper makes a copy. */
++static char *
++setlocale_copy (int category, const char *locale)
++{
++ const char *result = setlocale (category, locale);
++ if (result == NULL)
++ return NULL;
++ return strdup (result);
++}
++
++static char *de_locale;
++
++static void
++setlocale_fail (const char *envstring)
++{
++ setenv ("LC_CTYPE", envstring, 1);
++ if (setlocale (LC_CTYPE, "") != NULL)
++ {
++ printf ("unexpected setlocale success for \"%s\" locale\n", envstring);
++ exit (1);
++ }
++ const char *newloc = setlocale (LC_CTYPE, NULL);
++ if (strcmp (newloc, de_locale) != 0)
++ {
++ printf ("failed setlocale call \"%s\" changed locale to \"%s\"\n",
++ envstring, newloc);
++ exit (1);
++ }
++}
++
++static void
++setlocale_success (const char *envstring)
++{
++ setenv ("LC_CTYPE", envstring, 1);
++ char *newloc = setlocale_copy (LC_CTYPE, "");
++ if (newloc == NULL)
++ {
++ printf ("setlocale for \"%s\": %m\n", envstring);
++ exit (1);
++ }
++ if (strcmp (newloc, de_locale) == 0)
++ {
++ printf ("setlocale with LC_CTYPE=\"%s\" left locale at \"%s\"\n",
++ envstring, de_locale);
++ exit (1);
++ }
++ if (setlocale (LC_CTYPE, de_locale) == NULL)
++ {
++ printf ("restoring locale \"%s\" with LC_CTYPE=\"%s\": %m\n",
++ de_locale, envstring);
++ exit (1);
++ }
++ char *newloc2 = setlocale_copy (LC_CTYPE, newloc);
++ if (newloc2 == NULL)
++ {
++ printf ("restoring locale \"%s\" following \"%s\": %m\n",
++ newloc, envstring);
++ exit (1);
++ }
++ if (strcmp (newloc, newloc2) != 0)
++ {
++ printf ("representation of locale \"%s\" changed from \"%s\" to \"%s\"",
++ envstring, newloc, newloc2);
++ exit (1);
++ }
++ free (newloc);
++ free (newloc2);
++
++ if (setlocale (LC_CTYPE, de_locale) == NULL)
++ {
++ printf ("restoring locale \"%s\" with LC_CTYPE=\"%s\": %m\n",
++ de_locale, envstring);
++ exit (1);
++ }
++}
++
++/* Checks that a known-good locale still works if LC_ALL contains a
++ value which should be ignored. */
++static void
++setlocale_ignore (const char *to_ignore)
++{
++ const char *fr_locale = "fr_FR.UTF-8";
++ setenv ("LC_CTYPE", fr_locale, 1);
++ char *expected_locale = setlocale_copy (LC_CTYPE, "");
++ if (expected_locale == NULL)
++ {
++ printf ("setlocale with LC_CTYPE=\"%s\" failed: %m\n", fr_locale);
++ exit (1);
++ }
++ if (setlocale (LC_CTYPE, de_locale) == NULL)
++ {
++ printf ("failed to restore locale: %m\n");
++ exit (1);
++ }
++ unsetenv ("LC_CTYPE");
++
++ setenv ("LC_ALL", to_ignore, 1);
++ setenv ("LC_CTYPE", fr_locale, 1);
++ const char *actual_locale = setlocale (LC_CTYPE, "");
++ if (actual_locale == NULL)
++ {
++ printf ("setlocale with LC_ALL, LC_CTYPE=\"%s\" failed: %m\n",
++ fr_locale);
++ exit (1);
++ }
++ if (strcmp (actual_locale, expected_locale) != 0)
++ {
++ printf ("setlocale under LC_ALL failed: got \"%s\", expected \"%s\"\n",
++ actual_locale, expected_locale);
++ exit (1);
++ }
++ unsetenv ("LC_CTYPE");
++ setlocale_success (fr_locale);
++ unsetenv ("LC_ALL");
++ free (expected_locale);
++}
++
++static int
++do_test (void)
++{
++ /* The glibc test harness sets this environment variable
++ uncondionally. */
++ unsetenv ("LC_ALL");
++
++ de_locale = setlocale_copy (LC_CTYPE, "de_DE.UTF-8");
++ if (de_locale == NULL)
++ {
++ printf ("setlocale (LC_CTYPE, \"de_DE.UTF-8\"): %m\n");
++ return 1;
++ }
++ setlocale_success ("C");
++ setlocale_success ("en_US.UTF-8");
++ setlocale_success ("/en_US.UTF-8");
++ setlocale_success ("//en_US.UTF-8");
++ setlocale_ignore ("");
++
++ setlocale_fail ("does-not-exist");
++ setlocale_fail ("/");
++ setlocale_fail ("/../localedata/en_US.UTF-8");
++ setlocale_fail ("en_US.UTF-8/");
++ setlocale_fail ("en_US.UTF-8/..");
++ setlocale_fail ("en_US.UTF-8/../en_US.UTF-8");
++ setlocale_fail ("../localedata/en_US.UTF-8");
++ {
++ size_t large_length = 1024;
++ char *large_name = malloc (large_length + 1);
++ if (large_name == NULL)
++ {
++ puts ("malloc failure");
++ return 1;
++ }
++ memset (large_name, '/', large_length);
++ const char *suffix = "en_US.UTF-8";
++ strcpy (large_name + large_length - strlen (suffix), suffix);
++ setlocale_fail (large_name);
++ free (large_name);
++ }
++ {
++ size_t huge_length = 64 * 1024 * 1024;
++ char *huge_name = malloc (huge_length + 1);
++ if (huge_name == NULL)
++ {
++ puts ("malloc failure");
++ return 1;
++ }
++ memset (huge_name, 'X', huge_length);
++ huge_name[huge_length] = '\0';
++ /* Construct a composite locale specification. */
++ const char *prefix = "LC_CTYPE=de_DE.UTF-8;LC_TIME=";
++ memcpy (huge_name, prefix, strlen (prefix));
++ setlocale_fail (huge_name);
++ free (huge_name);
++ }
++
++ return 0;
++}
++
++#define TEST_FUNCTION do_test ()
++#include "../test-skeleton.c"
+--- a/locale/setlocale.c
++++ b/locale/setlocale.c
+@@ -273,6 +273,8 @@ setlocale (int category, const char *locale)
+ of entries of the form `CATEGORY=VALUE'. */
+ const char *newnames[__LC_LAST];
+ struct __locale_data *newdata[__LC_LAST];
++ /* Copy of the locale argument, for in-place splitting. */
++ char *locale_copy = NULL;
+
+ /* Set all name pointers to the argument name. */
+ for (category = 0; category < __LC_LAST; ++category)
+@@ -282,7 +284,13 @@ setlocale (int category, const char *locale)
+ if (__builtin_expect (strchr (locale, ';') != NULL, 0))
+ {
+ /* This is a composite name. Make a copy and split it up. */
+- char *np = strdupa (locale);
++ locale_copy = strdup (locale);
++ if (__glibc_unlikely (locale_copy == NULL))
++ {
++ __libc_rwlock_unlock (__libc_setlocale_lock);
++ return NULL;
++ }
++ char *np = locale_copy;
+ char *cp;
+ int cnt;
+
+@@ -300,6 +308,7 @@ setlocale (int category, const char *locale)
+ {
+ error_return:
+ __libc_rwlock_unlock (__libc_setlocale_lock);
++ free (locale_copy);
+
+ /* Bogus category name. */
+ ERROR_RETURN;
+@@ -392,8 +401,9 @@ setlocale (int category, const char *locale)
+ /* Critical section left. */
+ __libc_rwlock_unlock (__libc_setlocale_lock);
+
+- /* Free the resources (the locale path variable). */
++ /* Free the resources. */
+ free (locale_path);
++ free (locale_copy);
+
+ return composite;
+ }
diff --git a/patches/source/glibc/glibc-2.17_CVE-2014-4043.diff b/patches/source/glibc/glibc-2.17_CVE-2014-4043.diff
new file mode 100644
index 000000000..399f22eed
--- /dev/null
+++ b/patches/source/glibc/glibc-2.17_CVE-2014-4043.diff
@@ -0,0 +1,142 @@
+From 9ec14ba8436e795b5573fee6685240721d7ca727 Mon Sep 17 00:00:00 2001
+From: mancha <mancha1@zoho.com>
+Date: Fri, 13 Jun 2014
+Subject: CVE-2014-4043
+
+POSIX requires that we make a copy, so we allocate a new string
+and free it in posix_spawn_file_actions_destroy.
+
+Reported by David Reid, Alex Gaynor, and Glyph Lefkowitz. This bug
+may have security implications.
+
+This backported fix for use on glibc 2.17 is based on the following
+upstream commits:
+
+https://sourceware.org/git/?p=glibc.git;h=89e435f3559c
+https://sourceware.org/git/?p=glibc.git;h=35a5e3e338ae
+
+---
+ posix/spawn_faction_addopen.c | 14 +++++++++++---
+ posix/spawn_faction_destroy.c | 22 ++++++++++++++++++++--
+ posix/spawn_int.h | 2 +-
+ posix/tst-spawn.c | 10 +++++++++-
+ 4 files changed, 41 insertions(+), 7 deletions(-)
+
+--- a/posix/spawn_faction_addopen.c
++++ b/posix/spawn_faction_addopen.c
+@@ -18,6 +18,7 @@
+ #include <errno.h>
+ #include <spawn.h>
+ #include <unistd.h>
++#include <string.h>
+
+ #include "spawn_int.h"
+
+@@ -35,17 +35,24 @@ posix_spawn_file_actions_addopen (posix_spawn_file_actions_t *file_actions,
+ if (fd < 0 || fd >= maxfd)
+ return EBADF;
+
++ char *path_copy = strdup (path);
++ if (path_copy == NULL)
++ return ENOMEM;
++
+ /* Allocate more memory if needed. */
+ if (file_actions->__used == file_actions->__allocated
+ && __posix_spawn_file_actions_realloc (file_actions) != 0)
+- /* This can only mean we ran out of memory. */
+- return ENOMEM;
++ {
++ /* This can only mean we ran out of memory. */
++ free (path_copy);
++ return ENOMEM;
++ }
+
+ /* Add the new value. */
+ rec = &file_actions->__actions[file_actions->__used];
+ rec->tag = spawn_do_open;
+ rec->action.open_action.fd = fd;
+- rec->action.open_action.path = path;
++ rec->action.open_action.path = path_copy;
+ rec->action.open_action.oflag = oflag;
+ rec->action.open_action.mode = mode;
+
+--- a/posix/spawn_faction_destroy.c
++++ b/posix/spawn_faction_destroy.c
+@@ -18,11 +18,29 @@
+ #include <spawn.h>
+ #include <stdlib.h>
+
+-/* Initialize data structure for file attribute for `spawn' call. */
++#include "spawn_int.h"
++
++/* Deallocate the file actions. */
+ int
+ posix_spawn_file_actions_destroy (posix_spawn_file_actions_t *file_actions)
+ {
+- /* Free the memory allocated. */
++ /* Free the paths in the open actions. */
++ for (int i = 0; i < file_actions->__used; ++i)
++ {
++ struct __spawn_action *sa = &file_actions->__actions[i];
++ switch (sa->tag)
++ {
++ case spawn_do_open:
++ free (sa->action.open_action.path);
++ break;
++ case spawn_do_close:
++ case spawn_do_dup2:
++ /* No cleanup required. */
++ break;
++ }
++ }
++
++ /* Free the array of actions. */
+ free (file_actions->__actions);
+ return 0;
+ }
+--- a/posix/spawn_int.h
++++ b/posix/spawn_int.h
+@@ -22,7 +22,7 @@ struct __spawn_action
+ struct
+ {
+ int fd;
+- const char *path;
++ char *path;
+ int oflag;
+ mode_t mode;
+ } open_action;
+--- a/posix/tst-spawn.c
++++ b/posix/tst-spawn.c
+@@ -168,6 +168,7 @@ do_test (int argc, char *argv[])
+ char fd2name[18];
+ char fd3name[18];
+ char fd4name[18];
++ char *name3_copy;
+ char *spargv[12];
+
+ /* We must have
+@@ -221,9 +222,15 @@ do_test (int argc, char *argv[])
+ if (posix_spawn_file_actions_addclose (&actions, fd1) != 0)
+ error (EXIT_FAILURE, errno, "posix_spawn_file_actions_addclose");
+ /* We want to open the third file. */
+- if (posix_spawn_file_actions_addopen (&actions, fd3, name3,
++ name3_copy = strdup (name3);
++ if (name3_copy == NULL)
++ error (EXIT_FAILURE, errno, "strdup");
++ if (posix_spawn_file_actions_addopen (&actions, fd3, name3_copy,
+ O_RDONLY, 0666) != 0)
+ error (EXIT_FAILURE, errno, "posix_spawn_file_actions_addopen");
++ /* Overwrite the name to check that a copy has been made. */
++ memset (name3_copy, 'X', strlen (name3_copy));
++
+ /* We dup the second descriptor. */
+ fd4 = MAX (2, MAX (fd1, MAX (fd2, fd3))) + 1;
+ if (posix_spawn_file_actions_adddup2 (&actions, fd2, fd4) != 0)
+@@ -254,6 +261,7 @@ do_test (int argc, char *argv[])
+ /* Cleanup. */
+ if (posix_spawn_file_actions_destroy (&actions) != 0)
+ error (EXIT_FAILURE, errno, "posix_spawn_file_actions_destroy");
++ free (name3_copy);
+
+ /* Wait for the child. */
+ if (waitpid (pid, &status, 0) != pid)
diff --git a/patches/source/glibc/glibc-2.17_CVE-2014-5119.diff b/patches/source/glibc/glibc-2.17_CVE-2014-5119.diff
new file mode 100644
index 000000000..c12408383
--- /dev/null
+++ b/patches/source/glibc/glibc-2.17_CVE-2014-5119.diff
@@ -0,0 +1,206 @@
+From 46baa0ddfee8b1fdbf0b6c1daf5473bfdaad2295 Mon Sep 17 00:00:00 2001
+From: mancha <mancha1 AT zoho DOT com>
+Date: Thu, 4 Sep 2014
+Subject: CVE-2014-5119
+
+Loadable gconv transliteration modules have never worked correctly
+and their implementation contains security vulnerabilities. This
+patch removes this feature.
+
+This fix for use with glibc 2.17 is based on the following
+upstream commit:
+
+https://sourceware.org/git/?p=glibc.git;h=a1a6a401ab0a
+
+---
+ iconv/gconv_trans.c | 177 +-------------------------------------------
+ 1 file changed, 4 insertions(+), 173 deletions(-)
+
+--- a/iconv/gconv_trans.c
++++ b/iconv/gconv_trans.c
+@@ -238,181 +238,12 @@ __gconv_transliterate (struct __gconv_step *step,
+ return __GCONV_ILLEGAL_INPUT;
+ }
+
+-
+-/* Structure to represent results of found (or not) transliteration
+- modules. */
+-struct known_trans
+-{
+- /* This structure must remain the first member. */
+- struct trans_struct info;
+-
+- char *fname;
+- void *handle;
+- int open_count;
+-};
+-
+-
+-/* Tree with results of previous calls to __gconv_translit_find. */
+-static void *search_tree;
+-
+-/* We modify global data. */
+-__libc_lock_define_initialized (static, lock);
+-
+-
+-/* Compare two transliteration entries. */
+-static int
+-trans_compare (const void *p1, const void *p2)
+-{
+- const struct known_trans *s1 = (const struct known_trans *) p1;
+- const struct known_trans *s2 = (const struct known_trans *) p2;
+-
+- return strcmp (s1->info.name, s2->info.name);
+-}
+-
+-
+-/* Open (maybe reopen) the module named in the struct. Get the function
+- and data structure pointers we need. */
+-static int
+-open_translit (struct known_trans *trans)
+-{
+- __gconv_trans_query_fct queryfct;
+-
+- trans->handle = __libc_dlopen (trans->fname);
+- if (trans->handle == NULL)
+- /* Not available. */
+- return 1;
+-
+- /* Find the required symbol. */
+- queryfct = __libc_dlsym (trans->handle, "gconv_trans_context");
+- if (queryfct == NULL)
+- {
+- /* We cannot live with that. */
+- close_and_out:
+- __libc_dlclose (trans->handle);
+- trans->handle = NULL;
+- return 1;
+- }
+-
+- /* Get the context. */
+- if (queryfct (trans->info.name, &trans->info.csnames, &trans->info.ncsnames)
+- != 0)
+- goto close_and_out;
+-
+- /* Of course we also have to have the actual function. */
+- trans->info.trans_fct = __libc_dlsym (trans->handle, "gconv_trans");
+- if (trans->info.trans_fct == NULL)
+- goto close_and_out;
+-
+- /* Now the optional functions. */
+- trans->info.trans_init_fct =
+- __libc_dlsym (trans->handle, "gconv_trans_init");
+- trans->info.trans_context_fct =
+- __libc_dlsym (trans->handle, "gconv_trans_context");
+- trans->info.trans_end_fct =
+- __libc_dlsym (trans->handle, "gconv_trans_end");
+-
+- trans->open_count = 1;
+-
+- return 0;
+-}
+-
+-
+ int
+ internal_function
+ __gconv_translit_find (struct trans_struct *trans)
+ {
+- struct known_trans **found;
+- const struct path_elem *runp;
+- int res = 1;
+-
+- /* We have to have a name. */
+- assert (trans->name != NULL);
+-
+- /* Acquire the lock. */
+- __libc_lock_lock (lock);
+-
+- /* See whether we know this module already. */
+- found = __tfind (trans, &search_tree, trans_compare);
+- if (found != NULL)
+- {
+- /* Is this module available? */
+- if ((*found)->handle != NULL)
+- {
+- /* Maybe we have to reopen the file. */
+- if ((*found)->handle != (void *) -1)
+- /* The object is not unloaded. */
+- res = 0;
+- else if (open_translit (*found) == 0)
+- {
+- /* Copy the data. */
+- *trans = (*found)->info;
+- (*found)->open_count++;
+- res = 0;
+- }
+- }
+- }
+- else
+- {
+- size_t name_len = strlen (trans->name) + 1;
+- int need_so = 0;
+- struct known_trans *newp;
+-
+- /* We have to continue looking for the module. */
+- if (__gconv_path_elem == NULL)
+- __gconv_get_path ();
+-
+- /* See whether we have to append .so. */
+- if (name_len <= 4 || memcmp (&trans->name[name_len - 4], ".so", 3) != 0)
+- need_so = 1;
+-
+- /* Create a new entry. */
+- newp = (struct known_trans *) malloc (sizeof (struct known_trans)
+- + (__gconv_max_path_elem_len
+- + name_len + 3)
+- + name_len);
+- if (newp != NULL)
+- {
+- char *cp;
+-
+- /* Clear the struct. */
+- memset (newp, '\0', sizeof (struct known_trans));
+-
+- /* Store a copy of the module name. */
+- newp->info.name = cp = (char *) (newp + 1);
+- cp = __mempcpy (cp, trans->name, name_len);
+-
+- newp->fname = cp;
+-
+- /* Search in all the directories. */
+- for (runp = __gconv_path_elem; runp->name != NULL; ++runp)
+- {
+- cp = __mempcpy (__stpcpy ((char *) newp->fname, runp->name),
+- trans->name, name_len);
+- if (need_so)
+- memcpy (cp, ".so", sizeof (".so"));
+-
+- if (open_translit (newp) == 0)
+- {
+- /* We found a module. */
+- res = 0;
+- break;
+- }
+- }
+-
+- if (res)
+- newp->fname = NULL;
+-
+- /* In any case we'll add the entry to our search tree. */
+- if (__tsearch (newp, &search_tree, trans_compare) == NULL)
+- {
+- /* Yickes, this should not happen. Unload the object. */
+- res = 1;
+- /* XXX unload here. */
+- }
+- }
+- }
+-
+- __libc_lock_unlock (lock);
+-
+- return res;
++ /* Transliteration module loading has been removed because it never
++ worked as intended and suffered from a security vulnerability.
++ Consequently, this function always fails. */
++ return 1;
+ }
diff --git a/patches/source/glibc/glibc-2.17_CVE-2014-6040.diff b/patches/source/glibc/glibc-2.17_CVE-2014-6040.diff
new file mode 100644
index 000000000..07a310372
--- /dev/null
+++ b/patches/source/glibc/glibc-2.17_CVE-2014-6040.diff
@@ -0,0 +1,153 @@
+From 3ca00de1ccc97fae843330fe3335289ac6aab703 Mon Sep 17 00:00:00 2001
+From: mancha <mancha1 AT zoho DOT com>
+Date: Tue, 21 Oct 2014
+Subject: CVE-2014-6040
+
+A flaw in the validation of input sequences in the character sets
+IBM933, IBM935, IBM937, IBM939, IBM1364 can lead to OOB array
+access and application DoS.
+
+This fix for use on glibc 2.17 is based on the following upstream
+commit:
+
+https://sourceware.org/git/?p=glibc.git;h=41488498b6d9
+
+---
+ iconvdata/Makefile | 1 +
+ iconvdata/ibm1364.c | 3 ++-
+ iconvdata/ibm932.c | 5 +++--
+ iconvdata/ibm933.c | 2 +-
+ iconvdata/ibm935.c | 2 +-
+ iconvdata/ibm937.c | 2 +-
+ iconvdata/ibm939.c | 2 +-
+ iconvdata/ibm943.c | 5 +++--
+ iconvdata/run-iconv-test.sh | 18 ++++++++++++++++++
+ 9 files changed, 31 insertions(+), 9 deletions(-)
+
+--- a/iconvdata/Makefile
++++ b/iconvdata/Makefile
+@@ -299,6 +299,7 @@ $(objpfx)tst-iconv7.out: $(objpfx)gconv-modules \
+ $(objpfx)iconv-test.out: run-iconv-test.sh $(objpfx)gconv-modules \
+ $(addprefix $(objpfx),$(modules.so)) \
+ $(common-objdir)/iconv/iconv_prog TESTS
++ iconv_modules="$(modules)" \
+ $(SHELL) $< $(common-objdir) '$(test-wrapper)' > $@
+
+ $(objpfx)tst-tables.out: tst-tables.sh $(objpfx)gconv-modules \
+--- a/iconvdata/ibm1364.c
++++ b/iconvdata/ibm1364.c
+@@ -220,7 +220,8 @@ enum
+ ++rp2; \
+ \
+ uint32_t res; \
+- if (__builtin_expect (ch < rp2->start, 0) \
++ if (__builtin_expect (rp2->start == 0xffff, 0) \
++ || __builtin_expect (ch < rp2->start, 0) \
+ || (res = DB_TO_UCS4[ch + rp2->idx], \
+ __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \
+ { \
+--- a/iconvdata/ibm932.c
++++ b/iconvdata/ibm932.c
+@@ -73,11 +73,12 @@
+ } \
+ \
+ ch = (ch * 0x100) + inptr[1]; \
++ /* ch was less than 0xfd. */ \
++ assert (ch < 0xfd00); \
+ while (ch > rp2->end) \
+ ++rp2; \
+ \
+- if (__builtin_expect (rp2 == NULL, 0) \
+- || __builtin_expect (ch < rp2->start, 0) \
++ if (__builtin_expect (ch < rp2->start, 0) \
+ || (res = __ibm932db_to_ucs4[ch + rp2->idx], \
+ __builtin_expect (res, '\1') == 0 && ch !=0)) \
+ { \
+--- a/iconvdata/ibm933.c
++++ b/iconvdata/ibm933.c
+@@ -161,7 +161,7 @@ enum
+ while (ch > rp2->end) \
+ ++rp2; \
+ \
+- if (__builtin_expect (rp2 == NULL, 0) \
++ if (__builtin_expect (rp2->start == 0xffff, 0) \
+ || __builtin_expect (ch < rp2->start, 0) \
+ || (res = __ibm933db_to_ucs4[ch + rp2->idx], \
+ __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \
+--- a/iconvdata/ibm935.c
++++ b/iconvdata/ibm935.c
+@@ -161,7 +161,7 @@ enum
+ while (ch > rp2->end) \
+ ++rp2; \
+ \
+- if (__builtin_expect (rp2 == NULL, 0) \
++ if (__builtin_expect (rp2->start == 0xffff, 0) \
+ || __builtin_expect (ch < rp2->start, 0) \
+ || (res = __ibm935db_to_ucs4[ch + rp2->idx], \
+ __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \
+--- a/iconvdata/ibm937.c
++++ b/iconvdata/ibm937.c
+@@ -161,7 +161,7 @@ enum
+ while (ch > rp2->end) \
+ ++rp2; \
+ \
+- if (__builtin_expect (rp2 == NULL, 0) \
++ if (__builtin_expect (rp2->start == 0xffff, 0) \
+ || __builtin_expect (ch < rp2->start, 0) \
+ || (res = __ibm937db_to_ucs4[ch + rp2->idx], \
+ __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \
+--- a/iconvdata/ibm939.c
++++ b/iconvdata/ibm939.c
+@@ -161,7 +161,7 @@ enum
+ while (ch > rp2->end) \
+ ++rp2; \
+ \
+- if (__builtin_expect (rp2 == NULL, 0) \
++ if (__builtin_expect (rp2->start == 0xffff, 0) \
+ || __builtin_expect (ch < rp2->start, 0) \
+ || (res = __ibm939db_to_ucs4[ch + rp2->idx], \
+ __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \
+--- a/iconvdata/ibm943.c
++++ b/iconvdata/ibm943.c
+@@ -74,11 +74,12 @@
+ } \
+ \
+ ch = (ch * 0x100) + inptr[1]; \
++ /* ch was less than 0xfd. */ \
++ assert (ch < 0xfd00); \
+ while (ch > rp2->end) \
+ ++rp2; \
+ \
+- if (__builtin_expect (rp2 == NULL, 0) \
+- || __builtin_expect (ch < rp2->start, 0) \
++ if (__builtin_expect (ch < rp2->start, 0) \
+ || (res = __ibm943db_to_ucs4[ch + rp2->idx], \
+ __builtin_expect (res, '\1') == 0 && ch !=0)) \
+ { \
+--- a/iconvdata/run-iconv-test.sh
++++ b/iconvdata/run-iconv-test.sh
+@@ -188,6 +188,24 @@ while read utf8 from filename; do
+
+ done < TESTS2
+
++# Check for crashes in decoders.
++printf '\016\377\377\377\377\377\377\377' > $temp1
++for from in $iconv_modules ; do
++ echo $ac_n "test decoder $from $ac_c"
++ PROG=`eval echo $ICONV`
++ if $PROG < $temp1 >/dev/null 2>&1 ; then
++ : # fall through
++ else
++ status=$?
++ if test $status -gt 1 ; then
++ echo "/FAILED"
++ failed=1
++ continue
++ fi
++ fi
++ echo "OK"
++done
++
+ exit $failed
+ # Local Variables:
+ # mode:shell-script
diff --git a/patches/source/glibc/glibc-2.17_CVE-2015-7547.diff b/patches/source/glibc/glibc-2.17_CVE-2015-7547.diff
new file mode 100644
index 000000000..0a6c98fc6
--- /dev/null
+++ b/patches/source/glibc/glibc-2.17_CVE-2015-7547.diff
@@ -0,0 +1,571 @@
+From 36485f1a46c66498a68862c5d245bc5019aafd47 Mon Sep 17 00:00:00 2001
+From: mancha <mancha1@zoho.com>
+Date: Wed, 17 Feb 2016
+Subject: CVE-2015-7547
+
+getaddrinfo() stack-based buffer overflow (Bug 18665)
+
+A stack-based buffer overflow was found in libresolv when invoked from
+libnss_dns, allowing specially crafted DNS responses to seize control
+of execution flow in the DNS client. The buffer overflow occurs in
+the functions send_dg (send datagram) and send_vc (send TCP) for the
+NSS module libnss_dns.so.2 when calling getaddrinfo with AF_UNSPEC
+family. The use of AF_UNSPEC triggers the low-level resolver code to
+send out two parallel queries for A and AAAA. A mismanagement of the
+buffers used for those queries could result in the response of a query
+writing beyond the alloca allocated buffer created by
+nss_dns_gethostbyname4_r. Buffer management is simplified to remove
+the overflow. Thanks to the Google Security Team and Red Hat for
+reporting the security impact of this issue, and Robert Holiday of
+Ciena for reporting the related bug 18665. (CVE-2015-7547)
+
+See also:
+ https://sourceware.org/ml/libc-alpha/2016-02/msg00416.html
+ https://sourceware.org/ml/libc-alpha/2016-02/msg00418.html
+
+Backported e9db92d3ac for glibc 2.17.
+
+---
+ resolv/nss_dns/dns-host.c | 111 +++++++++++++++
+ resolv/res_query.c | 3 +
+ resolv/res_send.c | 259 ++++++++++++++++++++++++++--------
+ 3 files changed, 311 insertions(+), 62 deletions(-)
+
+--- a/resolv/nss_dns/dns-host.c
++++ b/resolv/nss_dns/dns-host.c
+@@ -1049,7 +1049,10 @@ gaih_getanswer_slice (const querybuf *answer, int anslen, const char *qname,
+ int h_namelen = 0;
+
+ if (ancount == 0)
+- return NSS_STATUS_NOTFOUND;
++ {
++ *h_errnop = HOST_NOT_FOUND;
++ return NSS_STATUS_NOTFOUND;
++ }
+
+ while (ancount-- > 0 && cp < end_of_message && had_error == 0)
+ {
+@@ -1226,7 +1229,14 @@ gaih_getanswer_slice (const querybuf *answer, int anslen, const char *qname,
+ /* Special case here: if the resolver sent a result but it only
+ contains a CNAME while we are looking for a T_A or T_AAAA record,
+ we fail with NOTFOUND instead of TRYAGAIN. */
+- return canon == NULL ? NSS_STATUS_TRYAGAIN : NSS_STATUS_NOTFOUND;
++ if (canon != NULL)
++ {
++ *h_errnop = HOST_NOT_FOUND;
++ return NSS_STATUS_NOTFOUND;
++ }
++
++ *h_errnop = NETDB_INTERNAL;
++ return NSS_STATUS_TRYAGAIN;
+ }
+
+
+@@ -1240,11 +1250,101 @@ gaih_getanswer (const querybuf *answer1, int anslen1, const querybuf *answer2,
+
+ enum nss_status status = NSS_STATUS_NOTFOUND;
+
++ /* Combining the NSS status of two distinct queries requires some
++ compromise and attention to symmetry (A or AAAA queries can be
++ returned in any order). What follows is a breakdown of how this
++ code is expected to work and why. We discuss only SUCCESS,
++ TRYAGAIN, NOTFOUND and UNAVAIL, since they are the only returns
++ that apply (though RETURN and MERGE exist). We make a distinction
++ between TRYAGAIN (recoverable) and TRYAGAIN' (not-recoverable).
++ A recoverable TRYAGAIN is almost always due to buffer size issues
++ and returns ERANGE in errno and the caller is expected to retry
++ with a larger buffer.
++
++ Lastly, you may be tempted to make significant changes to the
++ conditions in this code to bring about symmetry between responses.
++ Please don't change anything without due consideration for
++ expected application behaviour. Some of the synthesized responses
++ aren't very well thought out and sometimes appear to imply that
++ IPv4 responses are always answer 1, and IPv6 responses are always
++ answer 2, but that's not true (see the implementation of send_dg
++ and send_vc to see response can arrive in any order, particularly
++ for UDP). However, we expect it holds roughly enough of the time
++ that this code works, but certainly needs to be fixed to make this
++ a more robust implementation.
++
++ ----------------------------------------------
++ | Answer 1 Status / | Synthesized | Reason |
++ | Answer 2 Status | Status | |
++ |--------------------------------------------|
++ | SUCCESS/SUCCESS | SUCCESS | [1] |
++ | SUCCESS/TRYAGAIN | TRYAGAIN | [5] |
++ | SUCCESS/TRYAGAIN' | SUCCESS | [1] |
++ | SUCCESS/NOTFOUND | SUCCESS | [1] |
++ | SUCCESS/UNAVAIL | SUCCESS | [1] |
++ | TRYAGAIN/SUCCESS | TRYAGAIN | [2] |
++ | TRYAGAIN/TRYAGAIN | TRYAGAIN | [2] |
++ | TRYAGAIN/TRYAGAIN' | TRYAGAIN | [2] |
++ | TRYAGAIN/NOTFOUND | TRYAGAIN | [2] |
++ | TRYAGAIN/UNAVAIL | TRYAGAIN | [2] |
++ | TRYAGAIN'/SUCCESS | SUCCESS | [3] |
++ | TRYAGAIN'/TRYAGAIN | TRYAGAIN | [3] |
++ | TRYAGAIN'/TRYAGAIN' | TRYAGAIN' | [3] |
++ | TRYAGAIN'/NOTFOUND | TRYAGAIN' | [3] |
++ | TRYAGAIN'/UNAVAIL | UNAVAIL | [3] |
++ | NOTFOUND/SUCCESS | SUCCESS | [3] |
++ | NOTFOUND/TRYAGAIN | TRYAGAIN | [3] |
++ | NOTFOUND/TRYAGAIN' | TRYAGAIN' | [3] |
++ | NOTFOUND/NOTFOUND | NOTFOUND | [3] |
++ | NOTFOUND/UNAVAIL | UNAVAIL | [3] |
++ | UNAVAIL/SUCCESS | UNAVAIL | [4] |
++ | UNAVAIL/TRYAGAIN | UNAVAIL | [4] |
++ | UNAVAIL/TRYAGAIN' | UNAVAIL | [4] |
++ | UNAVAIL/NOTFOUND | UNAVAIL | [4] |
++ | UNAVAIL/UNAVAIL | UNAVAIL | [4] |
++ ----------------------------------------------
++
++ [1] If the first response is a success we return success.
++ This ignores the state of the second answer and in fact
++ incorrectly sets errno and h_errno to that of the second
++ answer. However because the response is a success we ignore
++ *errnop and *h_errnop (though that means you touched errno on
++ success). We are being conservative here and returning the
++ likely IPv4 response in the first answer as a success.
++
++ [2] If the first response is a recoverable TRYAGAIN we return
++ that instead of looking at the second response. The
++ expectation here is that we have failed to get an IPv4 response
++ and should retry both queries.
++
++ [3] If the first response was not a SUCCESS and the second
++ response is not NOTFOUND (had a SUCCESS, need to TRYAGAIN,
++ or failed entirely e.g. TRYAGAIN' and UNAVAIL) then use the
++ result from the second response, otherwise the first responses
++ status is used. Again we have some odd side-effects when the
++ second response is NOTFOUND because we overwrite *errnop and
++ *h_errnop that means that a first answer of NOTFOUND might see
++ its *errnop and *h_errnop values altered. Whether it matters
++ in practice that a first response NOTFOUND has the wrong
++ *errnop and *h_errnop is undecided.
++
++ [4] If the first response is UNAVAIL we return that instead of
++ looking at the second response. The expectation here is that
++ it will have failed similarly e.g. configuration failure.
++
++ [5] Testing this code is complicated by the fact that truncated
++ second response buffers might be returned as SUCCESS if the
++ first answer is a SUCCESS. To fix this we add symmetry to
++ TRYAGAIN with the second response. If the second response
++ is a recoverable error we now return TRYAGIN even if the first
++ response was SUCCESS. */
++
+ if (anslen1 > 0)
+ status = gaih_getanswer_slice(answer1, anslen1, qname,
+ &pat, &buffer, &buflen,
+ errnop, h_errnop, ttlp,
+ &first);
++
+ if ((status == NSS_STATUS_SUCCESS || status == NSS_STATUS_NOTFOUND
+ || (status == NSS_STATUS_TRYAGAIN
+ /* We want to look at the second answer in case of an
+@@ -1260,8 +1360,15 @@ gaih_getanswer (const querybuf *answer1, int anslen1, const querybuf *answer2,
+ &pat, &buffer, &buflen,
+ errnop, h_errnop, ttlp,
+ &first);
++ /* Use the second response status in some cases. */
+ if (status != NSS_STATUS_SUCCESS && status2 != NSS_STATUS_NOTFOUND)
+ status = status2;
++ /* Do not return a truncated second response (unless it was
++ unavoidable e.g. unrecoverable TRYAGAIN). */
++ if (status == NSS_STATUS_SUCCESS
++ && (status2 == NSS_STATUS_TRYAGAIN
++ && *errnop == ERANGE && *h_errnop != NO_RECOVERY))
++ status = NSS_STATUS_TRYAGAIN;
+ }
+
+ return status;
+--- a/resolv/res_query.c
++++ b/resolv/res_query.c
+@@ -391,6 +391,7 @@ __libc_res_nsearch(res_state statp,
+ {
+ free (*answerp2);
+ *answerp2 = NULL;
++ *nanswerp2 = 0;
+ }
+ }
+
+@@ -431,6 +432,7 @@ __libc_res_nsearch(res_state statp,
+ {
+ free (*answerp2);
+ *answerp2 = NULL;
++ *nanswerp2 = 0;
+ }
+
+ /*
+@@ -502,6 +504,7 @@ __libc_res_nsearch(res_state statp,
+ {
+ free (*answerp2);
+ *answerp2 = NULL;
++ *nanswerp2 = 0;
+ }
+ if (saved_herrno != -1)
+ RES_SET_H_ERRNO(statp, saved_herrno);
+--- a/resolv/res_send.c
++++ b/resolv/res_send.c
+@@ -1,3 +1,20 @@
++/* Copyright (C) 2016 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, see
++ <http://www.gnu.org/licenses/>. */
++
+ /*
+ * Copyright (c) 1985, 1989, 1993
+ * The Regents of the University of California. All rights reserved.
+@@ -361,6 +361,8 @@ __libc_res_nsend(res_state statp, const
+ if (__builtin_expect (statp->qhook || statp->rhook, 0)) {
+ if (anssiz < MAXPACKET && ansp) {
+ u_char *buf = malloc (MAXPACKET);
++ /* Always allocate MAXPACKET, callers expect
++ this specific size. */
+ if (buf == NULL)
+ return (-1);
+ memcpy (buf, ans, HFIXEDSZ);
+@@ -652,6 +654,78 @@ libresolv_hidden_def (res_nsend)
+
+ /* Private */
+
++/* The send_vc function is responsible for sending a DNS query over TCP
++ to the nameserver numbered NS from the res_state STATP i.e.
++ EXT(statp).nssocks[ns]. The function supports sending both IPv4 and
++ IPv6 queries at the same serially on the same socket.
++
++ Please note that for TCP there is no way to disable sending both
++ queries, unlike UDP, which honours RES_SNGLKUP and RES_SNGLKUPREOP
++ and sends the queries serially and waits for the result after each
++ sent query. This implemetnation should be corrected to honour these
++ options.
++
++ Please also note that for TCP we send both queries over the same
++ socket one after another. This technically violates best practice
++ since the server is allowed to read the first query, respond, and
++ then close the socket (to service another client). If the server
++ does this, then the remaining second query in the socket data buffer
++ will cause the server to send the client an RST which will arrive
++ asynchronously and the client's OS will likely tear down the socket
++ receive buffer resulting in a potentially short read and lost
++ response data. This will force the client to retry the query again,
++ and this process may repeat until all servers and connection resets
++ are exhausted and then the query will fail. It's not known if this
++ happens with any frequency in real DNS server implementations. This
++ implementation should be corrected to use two sockets by default for
++ parallel queries.
++
++ The query stored in BUF of BUFLEN length is sent first followed by
++ the query stored in BUF2 of BUFLEN2 length. Queries are sent
++ serially on the same socket.
++
++ Answers to the query are stored firstly in *ANSP up to a max of
++ *ANSSIZP bytes. If more than *ANSSIZP bytes are needed and ANSCP
++ is non-NULL (to indicate that modifying the answer buffer is allowed)
++ then malloc is used to allocate a new response buffer and ANSCP and
++ ANSP will both point to the new buffer. If more than *ANSSIZP bytes
++ are needed but ANSCP is NULL, then as much of the response as
++ possible is read into the buffer, but the results will be truncated.
++ When truncation happens because of a small answer buffer the DNS
++ packets header field TC will bet set to 1, indicating a truncated
++ message and the rest of the socket data will be read and discarded.
++
++ Answers to the query are stored secondly in *ANSP2 up to a max of
++ *ANSSIZP2 bytes, with the actual response length stored in
++ *RESPLEN2. If more than *ANSSIZP bytes are needed and ANSP2
++ is non-NULL (required for a second query) then malloc is used to
++ allocate a new response buffer, *ANSSIZP2 is set to the new buffer
++ size and *ANSP2_MALLOCED is set to 1.
++
++ The ANSP2_MALLOCED argument will eventually be removed as the
++ change in buffer pointer can be used to detect the buffer has
++ changed and that the caller should use free on the new buffer.
++
++ Note that the answers may arrive in any order from the server and
++ therefore the first and second answer buffers may not correspond to
++ the first and second queries.
++
++ It is not supported to call this function with a non-NULL ANSP2
++ but a NULL ANSCP. Put another way, you can call send_vc with a
++ single unmodifiable buffer or two modifiable buffers, but no other
++ combination is supported.
++
++ It is the caller's responsibility to free the malloc allocated
++ buffers by detecting that the pointers have changed from their
++ original values i.e. *ANSCP or *ANSP2 has changed.
++
++ If errors are encountered then *TERRNO is set to an appropriate
++ errno value and a zero result is returned for a recoverable error,
++ and a less-than zero result is returned for a non-recoverable error.
++
++ If no errors are encountered then *TERRNO is left unmodified and
++ a the length of the first response in bytes is returned. */
++
+ static int
+ send_vc(res_state statp,
+ const u_char *buf, int buflen, const u_char *buf2, int buflen2,
+@@ -661,11 +735,7 @@ send_vc(res_state statp,
+ {
+ const HEADER *hp = (HEADER *) buf;
+ const HEADER *hp2 = (HEADER *) buf2;
+- u_char *ans = *ansp;
+- int orig_anssizp = *anssizp;
+- // XXX REMOVE
+- // int anssiz = *anssizp;
+- HEADER *anhp = (HEADER *) ans;
++ HEADER *anhp = (HEADER *) *ansp;
+ struct sockaddr_in6 *nsap = EXT(statp).nsaddrs[ns];
+ int truncating, connreset, resplen, n;
+ struct iovec iov[4];
+@@ -741,6 +811,8 @@ send_vc(res_state statp,
+ * Receive length & response
+ */
+ int recvresp1 = 0;
++ /* Skip the second response if there is no second query.
++ To do that we mark the second response as received. */
+ int recvresp2 = buf2 == NULL;
+ uint16_t rlen16;
+ read_len:
+@@ -777,33 +849,14 @@ send_vc(res_state statp,
+ u_char **thisansp;
+ int *thisresplenp;
+ if ((recvresp1 | recvresp2) == 0 || buf2 == NULL) {
++ /* We have not received any responses
++ yet or we only have one response to
++ receive. */
+ thisanssizp = anssizp;
+ thisansp = anscp ?: ansp;
+ assert (anscp != NULL || ansp2 == NULL);
+ thisresplenp = &resplen;
+ } else {
+- if (*anssizp != MAXPACKET) {
+- /* No buffer allocated for the first
+- reply. We can try to use the rest
+- of the user-provided buffer. */
+-#ifdef _STRING_ARCH_unaligned
+- *anssizp2 = orig_anssizp - resplen;
+- *ansp2 = *ansp + resplen;
+-#else
+- int aligned_resplen
+- = ((resplen + __alignof__ (HEADER) - 1)
+- & ~(__alignof__ (HEADER) - 1));
+- *anssizp2 = orig_anssizp - aligned_resplen;
+- *ansp2 = *ansp + aligned_resplen;
+-#endif
+- } else {
+- /* The first reply did not fit into the
+- user-provided buffer. Maybe the second
+- answer will. */
+- *anssizp2 = orig_anssizp;
+- *ansp2 = *ansp;
+- }
+-
+ thisanssizp = anssizp2;
+ thisansp = ansp2;
+ thisresplenp = resplen2;
+@@ -811,10 +864,14 @@ send_vc(res_state statp,
+ anhp = (HEADER *) *thisansp;
+
+ *thisresplenp = rlen;
+- if (rlen > *thisanssizp) {
+- /* Yes, we test ANSCP here. If we have two buffers
+- both will be allocatable. */
+- if (__builtin_expect (anscp != NULL, 1)) {
++ /* Is the answer buffer too small? */
++ if (*thisanssizp < rlen) {
++ /* If the current buffer is not the the static
++ user-supplied buffer then we can reallocate
++ it. */
++ if (thisansp != NULL && thisansp != ansp) {
++ /* Always allocate MAXPACKET, callers expect
++ this specific size. */
+ u_char *newp = malloc (MAXPACKET);
+ if (newp == NULL) {
+ *terrno = ENOMEM;
+@@ -824,6 +881,9 @@ send_vc(res_state statp,
+ *thisanssizp = MAXPACKET;
+ *thisansp = newp;
+ anhp = (HEADER *) newp;
++ /* A uint16_t can't be larger than MAXPACKET
++ thus it's safe to allocate MAXPACKET but
++ read RLEN bytes instead. */
+ len = rlen;
+ } else {
+ Dprint(statp->options & RES_DEBUG,
+@@ -987,6 +1047,67 @@ reopen (res_state statp, int *terrno, in
+ return 1;
+ }
+
++/* The send_dg function is responsible for sending a DNS query over UDP
++ to the nameserver numbered NS from the res_state STATP i.e.
++ EXT(statp).nssocks[ns]. The function supports IPv4 and IPv6 queries
++ along with the ability to send the query in parallel for both stacks
++ (default) or serially (RES_SINGLKUP). It also supports serial lookup
++ with a close and reopen of the socket used to talk to the server
++ (RES_SNGLKUPREOP) to work around broken name servers.
++
++ The query stored in BUF of BUFLEN length is sent first followed by
++ the query stored in BUF2 of BUFLEN2 length. Queries are sent
++ in parallel (default) or serially (RES_SINGLKUP or RES_SNGLKUPREOP).
++
++ Answers to the query are stored firstly in *ANSP up to a max of
++ *ANSSIZP bytes. If more than *ANSSIZP bytes are needed and ANSCP
++ is non-NULL (to indicate that modifying the answer buffer is allowed)
++ then malloc is used to allocate a new response buffer and ANSCP and
++ ANSP will both point to the new buffer. If more than *ANSSIZP bytes
++ are needed but ANSCP is NULL, then as much of the response as
++ possible is read into the buffer, but the results will be truncated.
++ When truncation happens because of a small answer buffer the DNS
++ packets header field TC will bet set to 1, indicating a truncated
++ message, while the rest of the UDP packet is discarded.
++
++ Answers to the query are stored secondly in *ANSP2 up to a max of
++ *ANSSIZP2 bytes, with the actual response length stored in
++ *RESPLEN2. If more than *ANSSIZP bytes are needed and ANSP2
++ is non-NULL (required for a second query) then malloc is used to
++ allocate a new response buffer, *ANSSIZP2 is set to the new buffer
++ size and *ANSP2_MALLOCED is set to 1.
++
++ The ANSP2_MALLOCED argument will eventually be removed as the
++ change in buffer pointer can be used to detect the buffer has
++ changed and that the caller should use free on the new buffer.
++
++ Note that the answers may arrive in any order from the server and
++ therefore the first and second answer buffers may not correspond to
++ the first and second queries.
++
++ It is not supported to call this function with a non-NULL ANSP2
++ but a NULL ANSCP. Put another way, you can call send_vc with a
++ single unmodifiable buffer or two modifiable buffers, but no other
++ combination is supported.
++
++ It is the caller's responsibility to free the malloc allocated
++ buffers by detecting that the pointers have changed from their
++ original values i.e. *ANSCP or *ANSP2 has changed.
++
++ If an answer is truncated because of UDP datagram DNS limits then
++ *V_CIRCUIT is set to 1 and the return value non-zero to indicate to
++ the caller to retry with TCP. The value *GOTSOMEWHERE is set to 1
++ if any progress was made reading a response from the nameserver and
++ is used by the caller to distinguish between ECONNREFUSED and
++ ETIMEDOUT (the latter if *GOTSOMEWHERE is 1).
++
++ If errors are encountered then *TERRNO is set to an appropriate
++ errno value and a zero result is returned for a recoverable error,
++ and a less-than zero result is returned for a non-recoverable error.
++
++ If no errors are encountered then *TERRNO is left unmodified and
++ a the length of the first response in bytes is returned. */
++
+ static int
+ send_dg(res_state statp,
+ const u_char *buf, int buflen, const u_char *buf2, int buflen2,
+@@ -996,8 +1117,6 @@ send_dg(res_state statp,
+ {
+ const HEADER *hp = (HEADER *) buf;
+ const HEADER *hp2 = (HEADER *) buf2;
+- u_char *ans = *ansp;
+- int orig_anssizp = *anssizp;
+ struct timespec now, timeout, finish;
+ struct pollfd pfd[1];
+ int ptimeout;
+@@ -1030,6 +1149,8 @@ send_dg(res_state statp,
+ int need_recompute = 0;
+ int nwritten = 0;
+ int recvresp1 = 0;
++ /* Skip the second response if there is no second query.
++ To do that we mark the second response as received. */
+ int recvresp2 = buf2 == NULL;
+ pfd[0].fd = EXT(statp).nssocks[ns];
+ pfd[0].events = POLLOUT;
+@@ -1193,50 +1314,51 @@ send_dg(res_state statp,
+ int *thisresplenp;
+
+ if ((recvresp1 | recvresp2) == 0 || buf2 == NULL) {
++ /* We have not received any responses
++ yet or we only have one response to
++ receive. */
+ thisanssizp = anssizp;
+ thisansp = anscp ?: ansp;
+ assert (anscp != NULL || ansp2 == NULL);
+ thisresplenp = &resplen;
+ } else {
+- if (*anssizp != MAXPACKET) {
+- /* No buffer allocated for the first
+- reply. We can try to use the rest
+- of the user-provided buffer. */
+-#ifdef _STRING_ARCH_unaligned
+- *anssizp2 = orig_anssizp - resplen;
+- *ansp2 = *ansp + resplen;
+-#else
+- int aligned_resplen
+- = ((resplen + __alignof__ (HEADER) - 1)
+- & ~(__alignof__ (HEADER) - 1));
+- *anssizp2 = orig_anssizp - aligned_resplen;
+- *ansp2 = *ansp + aligned_resplen;
+-#endif
+- } else {
+- /* The first reply did not fit into the
+- user-provided buffer. Maybe the second
+- answer will. */
+- *anssizp2 = orig_anssizp;
+- *ansp2 = *ansp;
+- }
+-
+ thisanssizp = anssizp2;
+ thisansp = ansp2;
+ thisresplenp = resplen2;
+ }
+
+ if (*thisanssizp < MAXPACKET
+- /* Yes, we test ANSCP here. If we have two buffers
+- both will be allocatable. */
+- && anscp
++ /* If the current buffer is not the the static
++ user-supplied buffer then we can reallocate
++ it. */
++ && (thisansp != NULL && thisansp != ansp)
++ /* Is the size too small? */
+ && (ioctl (pfd[0].fd, FIONREAD, thisresplenp) < 0
+ || *thisanssizp < *thisresplenp)) {
++ /* Always allocate MAXPACKET, callers expect
++ this specific size. */
+ u_char *newp = malloc (MAXPACKET);
+ if (newp != NULL) {
+- *anssizp = MAXPACKET;
+- *thisansp = ans = newp;
++ *thisanssizp = MAXPACKET;
++ *thisansp = newp;
+ }
+ }
++ /* We could end up with truncation if anscp was NULL
++ (not allowed to change caller's buffer) and the
++ response buffer size is too small. This isn't a
++ reliable way to detect truncation because the ioctl
++ may be an inaccurate report of the UDP message size.
++ Therefore we use this only to issue debug output.
++ To do truncation accurately with UDP we need
++ MSG_TRUNC which is only available on Linux. We
++ can abstract out the Linux-specific feature in the
++ future to detect truncation. */
++ if (__builtin_expect (*thisanssizp < *thisresplenp, 0)) {
++ Dprint(statp->options & RES_DEBUG,
++ (stdout, ";; response may be truncated (UDP)\n")
++ );
++ }
++
+ HEADER *anhp = (HEADER *) *thisansp;
+ socklen_t fromlen = sizeof(struct sockaddr_in6);
+ assert (sizeof(from) <= fromlen);
diff --git a/patches/source/glibc/glibc-2.17_gcc48-unsafe-optim.diff b/patches/source/glibc/glibc-2.17_gcc48-unsafe-optim.diff
new file mode 100644
index 000000000..4de9fe583
--- /dev/null
+++ b/patches/source/glibc/glibc-2.17_gcc48-unsafe-optim.diff
@@ -0,0 +1,49 @@
+From ea723210a76778c7e86b8df21cb284fc2665ee4f Mon Sep 17 00:00:00 2001
+From: mancha <mancha1 AT zoho DOT com>
+Date: Wed, 22 Oct 2014
+Subject: Fix unsafe compiler optimization
+
+GCC 4.8 enables -ftree-loop-distribute-patterns at -O3 by default and
+this optimization may transform loops into memset/memmove calls. Without
+proper handling this may generate unexpected PLT calls on GLIBC.
+This patch fixes by creating memset/memmove aliases to internal GLIBC
+__GI_memset/__GI_memmove symbols.
+
+This fix for use on glibc 2.17 is based on the following upstream
+commits:
+
+https://sourceware.org/git/?p=glibc.git;h=6a97b62a5b4f
+https://sourceware.org/git/?p=glibc.git;h=4959e284ca9c
+
+---
+ sysdeps/generic/symbol-hacks.h | 7 ++++++-
+ sysdeps/wordsize-32/symbol-hacks.h | 2 ++
+ sysdeps/x86_64/x32/symbol-hacks.h | 2 +-
+ 3 files changed, 9 insertions(+), 2 deletions(-)
+
+--- a/sysdeps/generic/symbol-hacks.h
++++ b/sysdeps/generic/symbol-hacks.h
+@@ -1 +1,6 @@
+-/* Fortunately nothing to do. */
++/* Some compiler optimizations may transform loops into memset/memmove
++ calls and without proper declaration it may generate PLT calls. */
++#if !defined __ASSEMBLER__ && !defined NOT_IN_libc && defined SHARED
++asm ("memmove = __GI_memmove");
++asm ("memset = __GI_memset");
++#endif
+--- a/sysdeps/wordsize-32/symbol-hacks.h
++++ b/sysdeps/wordsize-32/symbol-hacks.h
+@@ -16,6 +16,8 @@
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
++#include_next "symbol-hacks.h"
++
+ /* A very dirty trick: gcc emits references to __divdi3, __udivdi3,
+ __moddi3, and __umoddi3. These functions are exported and
+ therefore we get PLTs. Unnecessarily so. Changing gcc is a big
+--- a/sysdeps/x86_64/x32/symbol-hacks.h
++++ b/sysdeps/x86_64/x32/symbol-hacks.h
+@@ -1 +1 @@
+-/* Fortunately nothing to do. */
++#include <sysdeps/generic/symbol-hacks.h>
diff --git a/patches/source/glibc/glibc-2.17_hardening.diff b/patches/source/glibc/glibc-2.17_hardening.diff
new file mode 100644
index 000000000..7c437874e
--- /dev/null
+++ b/patches/source/glibc/glibc-2.17_hardening.diff
@@ -0,0 +1,33 @@
+From e92cd23a2bbc7d3e038187e6d35af03d307a1e43 Mon Sep 17 00:00:00 2001
+From: mancha <mancha1 AT zoho DOT com>
+Date: Tue, 21 Oct 2014
+Subject: Hardening patch
+
+As reported by the projectzero developer who designed the recent off-by-one
+glibc root exploit, extending glibc metadata hardening would have made
+exploitation much more difficult and potentially impossible.
+
+This fix for use on glibc 2.17 is based on the following upstream
+commit:
+
+https://sourceware.org/git/?p=glibc.git;h=52ffbdf25a11
+
+---
+ malloc/malloc.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/malloc/malloc.c
++++ b/malloc/malloc.c
+@@ -1435,8 +1435,10 @@ typedef struct malloc_chunk* mbinptr;
+ BK->fd = FD; \
+ if (!in_smallbin_range (P->size) \
+ && __builtin_expect (P->fd_nextsize != NULL, 0)) { \
+- assert (P->fd_nextsize->bk_nextsize == P); \
+- assert (P->bk_nextsize->fd_nextsize == P); \
++ if (__builtin_expect (P->fd_nextsize->bk_nextsize != P, 0) \
++ || __builtin_expect (P->bk_nextsize->fd_nextsize != P, 0)) \
++ malloc_printerr (check_action, \
++ "corrupted double-linked list (not small)", P);\
+ if (FD->fd_nextsize == NULL) { \
+ if (P->fd_nextsize == P) \
+ FD->fd_nextsize = FD->bk_nextsize = FD; \
diff --git a/patches/source/glibc/glibc-2.17_strcoll-change.diff b/patches/source/glibc/glibc-2.17_strcoll-change.diff
new file mode 100644
index 000000000..f92241498
--- /dev/null
+++ b/patches/source/glibc/glibc-2.17_strcoll-change.diff
@@ -0,0 +1,802 @@
+From c2428380d42e8fb594cdd0304fc591c73b152a24 Mon Sep 17 00:00:00 2001
+From: mancha <mancha1@hush.com>
+Date: Wed, 23 Oct 2013
+Subject: Simplify strcoll implementation
+
+Break up strcoll into simpler functions so that the logic is easier to
+follow and maintain.
+
+This is needed in order to backport the fixes for CVE-2012-4412 and
+CVE-2012-4424.
+
+---
+This patch was adapted for glibc 2.17 based on:
+https://sourceware.org/git/?p=glibc.git;a=commit;h=1326ba1af220
+---
+
+ strcoll_l.c | 701 +++++++++++++++++++++++++-----------------------------------
+ 1 file changed, 295 insertions(+), 406 deletions(-)
+
+--- a/string/strcoll_l.c
++++ b/string/strcoll_l.c
+@@ -41,11 +41,244 @@
+
+ #include "../locale/localeinfo.h"
+
++/* Track status while looking for sequences in a string. */
++typedef struct
++{
++ int len; /* Length of the current sequence. */
++ int val; /* Position of the sequence relative to the
++ previous non-ignored sequence. */
++ size_t idxnow; /* Current index in sequences. */
++ size_t idxmax; /* Maximum index in sequences. */
++ size_t idxcnt; /* Current count of indices. */
++ size_t backw; /* Current Backward sequence index. */
++ size_t backw_stop; /* Index where the backward sequences stop. */
++ const USTRING_TYPE *us; /* The string. */
++ int32_t *idxarr; /* Array to cache weight indices. */
++ unsigned char *rulearr; /* Array to cache rules. */
++} coll_seq;
++
++/* Get next sequence. The weight indices are cached, so we don't need to
++ traverse the string. */
++static void
++get_next_seq_cached (coll_seq *seq, int nrules, int pass,
++ const unsigned char *rulesets,
++ const USTRING_TYPE *weights)
++{
++ int val = seq->val = 0;
++ int len = seq->len;
++ size_t backw_stop = seq->backw_stop;
++ size_t backw = seq->backw;
++ size_t idxcnt = seq->idxcnt;
++ size_t idxmax = seq->idxmax;
++ size_t idxnow = seq->idxnow;
++ unsigned char *rulearr = seq->rulearr;
++ int32_t *idxarr = seq->idxarr;
++
++ while (len == 0)
++ {
++ ++val;
++ if (backw_stop != ~0ul)
++ {
++ /* There is something pushed. */
++ if (backw == backw_stop)
++ {
++ /* The last pushed character was handled. Continue
++ with forward characters. */
++ if (idxcnt < idxmax)
++ {
++ idxnow = idxcnt;
++ backw_stop = ~0ul;
++ }
++ else
++ {
++ /* Nothing any more. The backward sequence
++ ended with the last sequence in the string. */
++ idxnow = ~0ul;
++ break;
++ }
++ }
++ else
++ idxnow = --backw;
++ }
++ else
++ {
++ backw_stop = idxcnt;
++
++ while (idxcnt < idxmax)
++ {
++ if ((rulesets[rulearr[idxcnt] * nrules + pass]
++ & sort_backward) == 0)
++ /* No more backward characters to push. */
++ break;
++ ++idxcnt;
++ }
++
++ if (backw_stop == idxcnt)
++ {
++ /* No sequence at all or just one. */
++ if (idxcnt == idxmax)
++ /* Note that LEN is still zero. */
++ break;
++
++ backw_stop = ~0ul;
++ idxnow = idxcnt++;
++ }
++ else
++ /* We pushed backward sequences. */
++ idxnow = backw = idxcnt - 1;
++ }
++ len = weights[idxarr[idxnow]++];
++ }
++
++ /* Update the structure. */
++ seq->val = val;
++ seq->len = len;
++ seq->backw_stop = backw_stop;
++ seq->backw = backw;
++ seq->idxcnt = idxcnt;
++ seq->idxnow = idxnow;
++}
++
++/* Get next sequence. Traverse the string as required. */
++static void
++get_next_seq (coll_seq *seq, int nrules, const unsigned char *rulesets,
++ const USTRING_TYPE *weights, const int32_t *table,
++ const USTRING_TYPE *extra, const int32_t *indirect)
++{
++#include WEIGHT_H
++ int val = seq->val = 0;
++ int len = seq->len;
++ size_t backw_stop = seq->backw_stop;
++ size_t backw = seq->backw;
++ size_t idxcnt = seq->idxcnt;
++ size_t idxmax = seq->idxmax;
++ size_t idxnow = seq->idxnow;
++ unsigned char *rulearr = seq->rulearr;
++ int32_t *idxarr = seq->idxarr;
++ const USTRING_TYPE *us = seq->us;
++
++ while (len == 0)
++ {
++ ++val;
++ if (backw_stop != ~0ul)
++ {
++ /* The is something pushed. */
++ if (backw == backw_stop)
++ {
++ /* The last pushed character was handled. Continue
++ with forward characters. */
++ if (idxcnt < idxmax)
++ {
++ idxnow = idxcnt;
++ backw_stop = ~0ul;
++ }
++ else
++ /* Nothing any more. The backward sequence ended with
++ the last sequence in the string. Note that LEN
++ is still zero. */
++ break;
++ }
++ else
++ idxnow = --backw;
++ }
++ else
++ {
++ backw_stop = idxmax;
++
++ while (*us != L('\0'))
++ {
++ int32_t tmp = findidx (&us, -1);
++ rulearr[idxmax] = tmp >> 24;
++ idxarr[idxmax] = tmp & 0xffffff;
++ idxcnt = idxmax++;
++
++ if ((rulesets[rulearr[idxcnt] * nrules]
++ & sort_backward) == 0)
++ /* No more backward characters to push. */
++ break;
++ ++idxcnt;
++ }
++
++ if (backw_stop >= idxcnt)
++ {
++ /* No sequence at all or just one. */
++ if (idxcnt == idxmax || backw_stop > idxcnt)
++ /* Note that LEN is still zero. */
++ break;
++
++ backw_stop = ~0ul;
++ idxnow = idxcnt;
++ }
++ else
++ /* We pushed backward sequences. */
++ idxnow = backw = idxcnt - 1;
++ }
++ len = weights[idxarr[idxnow]++];
++ }
++
++ /* Update the structure. */
++ seq->val = val;
++ seq->len = len;
++ seq->backw_stop = backw_stop;
++ seq->backw = backw;
++ seq->idxcnt = idxcnt;
++ seq->idxmax = idxmax;
++ seq->idxnow = idxnow;
++ seq->us = us;
++}
++
++/* Compare two sequences. */
++static int
++do_compare (coll_seq *seq1, coll_seq *seq2, int position,
++ const USTRING_TYPE *weights)
++{
++ int seq1len = seq1->len;
++ int seq2len = seq2->len;
++ int val1 = seq1->val;
++ int val2 = seq2->val;
++ int32_t *idx1arr = seq1->idxarr;
++ int32_t *idx2arr = seq2->idxarr;
++ int idx1now = seq1->idxnow;
++ int idx2now = seq2->idxnow;
++ int result = 0;
++
++ /* Test for position if necessary. */
++ if (position && val1 != val2)
++ {
++ result = val1 - val2;
++ goto out;
++ }
++
++ /* Compare the two sequences. */
++ do
++ {
++ if (weights[idx1arr[idx1now]] != weights[idx2arr[idx2now]])
++ {
++ /* The sequences differ. */
++ result = weights[idx1arr[idx1now]] - weights[idx2arr[idx2now]];
++ goto out;
++ }
++
++ /* Increment the offsets. */
++ ++idx1arr[idx1now];
++ ++idx2arr[idx2now];
++
++ --seq1len;
++ --seq2len;
++ }
++ while (seq1len > 0 && seq2len > 0);
++
++ if (position && seq1len != seq2len)
++ result = seq1len - seq2len;
++
++out:
++ seq1->len = seq1len;
++ seq2->len = seq2len;
++ return result;
++}
++
+ int
+-STRCOLL (s1, s2, l)
+- const STRING_TYPE *s1;
+- const STRING_TYPE *s2;
+- __locale_t l;
++STRCOLL (const STRING_TYPE *s1, const STRING_TYPE *s2, __locale_t l)
+ {
+ struct __locale_data *current = l->__locales[LC_COLLATE];
+ uint_fast32_t nrules = current->values[_NL_ITEM_INDEX (_NL_COLLATE_NRULES)].word;
+@@ -56,34 +289,6 @@ STRCOLL (s1, s2, l)
+ const USTRING_TYPE *weights;
+ const USTRING_TYPE *extra;
+ const int32_t *indirect;
+- uint_fast32_t pass;
+- int result = 0;
+- const USTRING_TYPE *us1;
+- const USTRING_TYPE *us2;
+- size_t s1len;
+- size_t s2len;
+- int32_t *idx1arr;
+- int32_t *idx2arr;
+- unsigned char *rule1arr;
+- unsigned char *rule2arr;
+- size_t idx1max;
+- size_t idx2max;
+- size_t idx1cnt;
+- size_t idx2cnt;
+- size_t idx1now;
+- size_t idx2now;
+- size_t backw1_stop;
+- size_t backw2_stop;
+- size_t backw1;
+- size_t backw2;
+- int val1;
+- int val2;
+- int position;
+- int seq1len;
+- int seq2len;
+- int use_malloc;
+-
+-#include WEIGHT_H
+
+ if (nrules == 0)
+ return STRCMP (s1, s2);
+@@ -98,7 +303,6 @@ STRCOLL (s1, s2, l)
+ current->values[_NL_ITEM_INDEX (CONCAT(_NL_COLLATE_EXTRA,SUFFIX))].string;
+ indirect = (const int32_t *)
+ current->values[_NL_ITEM_INDEX (CONCAT(_NL_COLLATE_INDIRECT,SUFFIX))].string;
+- use_malloc = 0;
+
+ assert (((uintptr_t) table) % __alignof__ (table[0]) == 0);
+ assert (((uintptr_t) weights) % __alignof__ (weights[0]) == 0);
+@@ -106,18 +310,13 @@ STRCOLL (s1, s2, l)
+ assert (((uintptr_t) indirect) % __alignof__ (indirect[0]) == 0);
+
+ /* We need this a few times. */
+- s1len = STRLEN (s1);
+- s2len = STRLEN (s2);
++ size_t s1len = STRLEN (s1);
++ size_t s2len = STRLEN (s2);
+
+ /* Catch empty strings. */
+- if (__builtin_expect (s1len == 0, 0) || __builtin_expect (s2len == 0, 0))
++ if (__glibc_unlikely (s1len == 0) || __glibc_unlikely (s2len == 0))
+ return (s1len != 0) - (s2len != 0);
+
+- /* We need the elements of the strings as unsigned values since they
+- are used as indeces. */
+- us1 = (const USTRING_TYPE *) s1;
+- us2 = (const USTRING_TYPE *) s2;
+-
+ /* Perform the first pass over the string and while doing this find
+ and store the weights for each character. Since we want this to
+ be as fast as possible we are using `alloca' to store the temporary
+@@ -127,411 +326,101 @@ STRCOLL (s1, s2, l)
+
+ Please note that the localedef programs makes sure that `position'
+ is not used at the first level. */
++
++ coll_seq seq1, seq2;
++ bool use_malloc = false;
++ int result = 0;
++
++ memset (&seq1, 0, sizeof (seq1));
++ seq2 = seq1;
++
++ /* We need the elements of the strings as unsigned values since they
++ are used as indices. */
++ seq1.us = (const USTRING_TYPE *) s1;
++ seq2.us = (const USTRING_TYPE *) s2;
++
+ if (! __libc_use_alloca ((s1len + s2len) * (sizeof (int32_t) + 1)))
+ {
+- idx1arr = (int32_t *) malloc ((s1len + s2len) * (sizeof (int32_t) + 1));
+- idx2arr = &idx1arr[s1len];
+- rule1arr = (unsigned char *) &idx2arr[s2len];
+- rule2arr = &rule1arr[s1len];
++ seq1.idxarr = (int32_t *) malloc ((s1len + s2len) * (sizeof (int32_t) + 1));
++ seq2.idxarr = &seq1.idxarr[s1len];
++ seq1.rulearr = (unsigned char *) &seq2.idxarr[s2len];
++ seq2.rulearr = &seq1.rulearr[s1len];
+
+- if (idx1arr == NULL)
++ if (seq1.idxarr == NULL)
+ /* No memory. Well, go with the stack then.
+
+ XXX Once this implementation is stable we will handle this
+- differently. Instead of precomputing the indeces we will
++ differently. Instead of precomputing the indices we will
+ do this in time. This means, though, that this happens for
+ every pass again. */
+ goto try_stack;
+- use_malloc = 1;
++ use_malloc = true;
+ }
+ else
+ {
+ try_stack:
+- idx1arr = (int32_t *) alloca (s1len * sizeof (int32_t));
+- idx2arr = (int32_t *) alloca (s2len * sizeof (int32_t));
+- rule1arr = (unsigned char *) alloca (s1len);
+- rule2arr = (unsigned char *) alloca (s2len);
++ seq1.idxarr = (int32_t *) alloca (s1len * sizeof (int32_t));
++ seq2.idxarr = (int32_t *) alloca (s2len * sizeof (int32_t));
++ seq1.rulearr = (unsigned char *) alloca (s1len);
++ seq2.rulearr = (unsigned char *) alloca (s2len);
+ }
+
+- idx1cnt = 0;
+- idx2cnt = 0;
+- idx1max = 0;
+- idx2max = 0;
+- idx1now = 0;
+- idx2now = 0;
+- backw1_stop = ~0ul;
+- backw2_stop = ~0ul;
+- backw1 = ~0ul;
+- backw2 = ~0ul;
+- seq1len = 0;
+- seq2len = 0;
+- position = rulesets[0] & sort_position;
+- while (1)
+- {
+- val1 = 0;
+- val2 = 0;
+-
+- /* Get the next non-IGNOREd element for string `s1'. */
+- if (seq1len == 0)
+- do
+- {
+- ++val1;
+-
+- if (backw1_stop != ~0ul)
+- {
+- /* The is something pushed. */
+- if (backw1 == backw1_stop)
+- {
+- /* The last pushed character was handled. Continue
+- with forward characters. */
+- if (idx1cnt < idx1max)
+- {
+- idx1now = idx1cnt;
+- backw1_stop = ~0ul;
+- }
+- else
+- /* Nothing anymore. The backward sequence ended with
+- the last sequence in the string. Note that seq1len
+- is still zero. */
+- break;
+- }
+- else
+- idx1now = --backw1;
+- }
+- else
+- {
+- backw1_stop = idx1max;
+-
+- while (*us1 != L('\0'))
+- {
+- int32_t tmp = findidx (&us1, -1);
+- rule1arr[idx1max] = tmp >> 24;
+- idx1arr[idx1max] = tmp & 0xffffff;
+- idx1cnt = idx1max++;
+-
+- if ((rulesets[rule1arr[idx1cnt] * nrules]
+- & sort_backward) == 0)
+- /* No more backward characters to push. */
+- break;
+- ++idx1cnt;
+- }
+-
+- if (backw1_stop >= idx1cnt)
+- {
+- /* No sequence at all or just one. */
+- if (idx1cnt == idx1max || backw1_stop > idx1cnt)
+- /* Note that seq1len is still zero. */
+- break;
+-
+- backw1_stop = ~0ul;
+- idx1now = idx1cnt;
+- }
+- else
+- /* We pushed backward sequences. */
+- idx1now = backw1 = idx1cnt - 1;
+- }
+- }
+- while ((seq1len = weights[idx1arr[idx1now]++]) == 0);
+-
+- /* And the same for string `s2'. */
+- if (seq2len == 0)
+- do
+- {
+- ++val2;
+-
+- if (backw2_stop != ~0ul)
+- {
+- /* The is something pushed. */
+- if (backw2 == backw2_stop)
+- {
+- /* The last pushed character was handled. Continue
+- with forward characters. */
+- if (idx2cnt < idx2max)
+- {
+- idx2now = idx2cnt;
+- backw2_stop = ~0ul;
+- }
+- else
+- /* Nothing anymore. The backward sequence ended with
+- the last sequence in the string. Note that seq2len
+- is still zero. */
+- break;
+- }
+- else
+- idx2now = --backw2;
+- }
+- else
+- {
+- backw2_stop = idx2max;
+-
+- while (*us2 != L('\0'))
+- {
+- int32_t tmp = findidx (&us2, -1);
+- rule2arr[idx2max] = tmp >> 24;
+- idx2arr[idx2max] = tmp & 0xffffff;
+- idx2cnt = idx2max++;
+-
+- if ((rulesets[rule2arr[idx2cnt] * nrules]
+- & sort_backward) == 0)
+- /* No more backward characters to push. */
+- break;
+- ++idx2cnt;
+- }
+-
+- if (backw2_stop >= idx2cnt)
+- {
+- /* No sequence at all or just one. */
+- if (idx2cnt == idx2max || backw2_stop > idx2cnt)
+- /* Note that seq1len is still zero. */
+- break;
+-
+- backw2_stop = ~0ul;
+- idx2now = idx2cnt;
+- }
+- else
+- /* We pushed backward sequences. */
+- idx2now = backw2 = idx2cnt - 1;
+- }
+- }
+- while ((seq2len = weights[idx2arr[idx2now]++]) == 0);
+-
+- /* See whether any or both strings are empty. */
+- if (seq1len == 0 || seq2len == 0)
+- {
+- if (seq1len == seq2len)
+- /* Both ended. So far so good, both strings are equal at the
+- first level. */
+- break;
+-
+- /* This means one string is shorter than the other. Find out
+- which one and return an appropriate value. */
+- result = seq1len == 0 ? -1 : 1;
+- goto free_and_return;
+- }
+-
+- /* Test for position if necessary. */
+- if (position && val1 != val2)
+- {
+- result = val1 - val2;
+- goto free_and_return;
+- }
+-
+- /* Compare the two sequences. */
+- do
+- {
+- if (weights[idx1arr[idx1now]] != weights[idx2arr[idx2now]])
+- {
+- /* The sequences differ. */
+- result = weights[idx1arr[idx1now]] - weights[idx2arr[idx2now]];
+- goto free_and_return;
+- }
+-
+- /* Increment the offsets. */
+- ++idx1arr[idx1now];
+- ++idx2arr[idx2now];
++ seq1.rulearr[0] = 0;
+
+- --seq1len;
+- --seq2len;
+- }
+- while (seq1len > 0 && seq2len > 0);
+-
+- if (position && seq1len != seq2len)
+- {
+- result = seq1len - seq2len;
+- goto free_and_return;
+- }
+- }
+-
+- /* Now the remaining passes over the weights. We now use the
+- indeces we found before. */
+- for (pass = 1; pass < nrules; ++pass)
++ /* Cache values in the first pass and if needed, use them in subsequent
++ passes. */
++ for (int pass = 0; pass < nrules; ++pass)
+ {
++ seq1.idxcnt = 0;
++ seq1.backw_stop = ~0ul;
++ seq1.backw = ~0ul;
++ seq2.idxcnt = 0;
++ seq2.backw_stop = ~0ul;
++ seq2.backw = ~0ul;
++
+ /* We assume that if a rule has defined `position' in one section
+ this is true for all of them. */
+- idx1cnt = 0;
+- idx2cnt = 0;
+- backw1_stop = ~0ul;
+- backw2_stop = ~0ul;
+- backw1 = ~0ul;
+- backw2 = ~0ul;
+- position = rulesets[rule1arr[0] * nrules + pass] & sort_position;
++ int position = rulesets[seq1.rulearr[0] * nrules + pass] & sort_position;
+
+ while (1)
+ {
+- val1 = 0;
+- val2 = 0;
+-
+- /* Get the next non-IGNOREd element for string `s1'. */
+- if (seq1len == 0)
+- do
+- {
+- ++val1;
+-
+- if (backw1_stop != ~0ul)
+- {
+- /* The is something pushed. */
+- if (backw1 == backw1_stop)
+- {
+- /* The last pushed character was handled. Continue
+- with forward characters. */
+- if (idx1cnt < idx1max)
+- {
+- idx1now = idx1cnt;
+- backw1_stop = ~0ul;
+- }
+- else
+- {
+- /* Nothing anymore. The backward sequence
+- ended with the last sequence in the string. */
+- idx1now = ~0ul;
+- break;
+- }
+- }
+- else
+- idx1now = --backw1;
+- }
+- else
+- {
+- backw1_stop = idx1cnt;
+-
+- while (idx1cnt < idx1max)
+- {
+- if ((rulesets[rule1arr[idx1cnt] * nrules + pass]
+- & sort_backward) == 0)
+- /* No more backward characters to push. */
+- break;
+- ++idx1cnt;
+- }
+-
+- if (backw1_stop == idx1cnt)
+- {
+- /* No sequence at all or just one. */
+- if (idx1cnt == idx1max)
+- /* Note that seq1len is still zero. */
+- break;
+-
+- backw1_stop = ~0ul;
+- idx1now = idx1cnt++;
+- }
+- else
+- /* We pushed backward sequences. */
+- idx1now = backw1 = idx1cnt - 1;
+- }
+- }
+- while ((seq1len = weights[idx1arr[idx1now]++]) == 0);
+-
+- /* And the same for string `s2'. */
+- if (seq2len == 0)
+- do
+- {
+- ++val2;
+-
+- if (backw2_stop != ~0ul)
+- {
+- /* The is something pushed. */
+- if (backw2 == backw2_stop)
+- {
+- /* The last pushed character was handled. Continue
+- with forward characters. */
+- if (idx2cnt < idx2max)
+- {
+- idx2now = idx2cnt;
+- backw2_stop = ~0ul;
+- }
+- else
+- {
+- /* Nothing anymore. The backward sequence
+- ended with the last sequence in the string. */
+- idx2now = ~0ul;
+- break;
+- }
+- }
+- else
+- idx2now = --backw2;
+- }
+- else
+- {
+- backw2_stop = idx2cnt;
+-
+- while (idx2cnt < idx2max)
+- {
+- if ((rulesets[rule2arr[idx2cnt] * nrules + pass]
+- & sort_backward) == 0)
+- /* No more backward characters to push. */
+- break;
+- ++idx2cnt;
+- }
+-
+- if (backw2_stop == idx2cnt)
+- {
+- /* No sequence at all or just one. */
+- if (idx2cnt == idx2max)
+- /* Note that seq2len is still zero. */
+- break;
+-
+- backw2_stop = ~0ul;
+- idx2now = idx2cnt++;
+- }
+- else
+- /* We pushed backward sequences. */
+- idx2now = backw2 = idx2cnt - 1;
+- }
+- }
+- while ((seq2len = weights[idx2arr[idx2now]++]) == 0);
++ if (pass == 0)
++ {
++ get_next_seq (&seq1, nrules, rulesets, weights, table, extra,
++ indirect);
++ get_next_seq (&seq2, nrules, rulesets, weights, table, extra,
++ indirect);
++ }
++ else
++ {
++ get_next_seq_cached (&seq1, nrules, pass, rulesets, weights);
++ get_next_seq_cached (&seq2, nrules, pass, rulesets, weights);
++ }
+
+ /* See whether any or both strings are empty. */
+- if (seq1len == 0 || seq2len == 0)
++ if (seq1.len == 0 || seq2.len == 0)
+ {
+- if (seq1len == seq2len)
++ if (seq1.len == seq2.len)
+ /* Both ended. So far so good, both strings are equal
+ at this level. */
+ break;
+
+ /* This means one string is shorter than the other. Find out
+ which one and return an appropriate value. */
+- result = seq1len == 0 ? -1 : 1;
++ result = seq1.len == 0 ? -1 : 1;
+ goto free_and_return;
+ }
+
+- /* Test for position if necessary. */
+- if (position && val1 != val2)
+- {
+- result = val1 - val2;
+- goto free_and_return;
+- }
+-
+- /* Compare the two sequences. */
+- do
+- {
+- if (weights[idx1arr[idx1now]] != weights[idx2arr[idx2now]])
+- {
+- /* The sequences differ. */
+- result = (weights[idx1arr[idx1now]]
+- - weights[idx2arr[idx2now]]);
+- goto free_and_return;
+- }
+-
+- /* Increment the offsets. */
+- ++idx1arr[idx1now];
+- ++idx2arr[idx2now];
+-
+- --seq1len;
+- --seq2len;
+- }
+- while (seq1len > 0 && seq2len > 0);
+-
+- if (position && seq1len != seq2len)
+- {
+- result = seq1len - seq2len;
+- goto free_and_return;
+- }
++ result = do_compare (&seq1, &seq2, position, weights);
++ if (result != 0)
++ goto free_and_return;
+ }
+ }
+
+ /* Free the memory if needed. */
+ free_and_return:
+ if (use_malloc)
+- free (idx1arr);
++ free (seq1.idxarr);
+
+ return result;
+ }
diff --git a/patches/source/glibc/glibc-cvs-checkout.sh b/patches/source/glibc/glibc-cvs-checkout.sh
new file mode 100755
index 000000000..022d0117b
--- /dev/null
+++ b/patches/source/glibc/glibc-cvs-checkout.sh
@@ -0,0 +1,3 @@
+echo "The password below is \"anoncvs\":"
+cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/glibc login
+cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/glibc co libc
diff --git a/patches/source/glibc/glibc.CVE-2013-0242.diff b/patches/source/glibc/glibc.CVE-2013-0242.diff
new file mode 100644
index 000000000..e35a0bcec
--- /dev/null
+++ b/patches/source/glibc/glibc.CVE-2013-0242.diff
@@ -0,0 +1,189 @@
+From libc-alpha-return-36620-listarch-libc-alpha=sources dot redhat dot com at sourceware dot org Tue Jan 29 16:13:50 2013
+Return-Path: <libc-alpha-return-36620-listarch-libc-alpha=sources dot redhat dot com at sourceware dot org>
+Delivered-To: listarch-libc-alpha at sources dot redhat dot com
+Received: (qmail 32082 invoked by alias); 29 Jan 2013 16:13:48 -0000
+Received: (qmail 32049 invoked by uid 22791); 29 Jan 2013 16:13:43 -0000
+X-SWARE-Spam-Status: No, hits=-5.2 required=5.0
+ tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,TW_BK
+X-Spam-Check-By: sourceware.org
+From: Andreas Schwab <schwab at suse dot de>
+To: libc-alpha at sourceware dot org
+Subject: [PATCH] Fix buffer overrun in regexp matcher
+X-Yow: Are you selling NYLON OIL WELLS?? If so, we can use TWO DOZEN!!
+Date: Tue, 29 Jan 2013 17:13:35 +0100
+Message-ID: <mvma9rsq85s.fsf@hawking.suse.de>
+User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.92 (gnu/linux)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+Mailing-List: contact libc-alpha-help at sourceware dot org; run by ezmlm
+Precedence: bulk
+List-Id: <libc-alpha.sourceware.org>
+List-Subscribe: <mailto:libc-alpha-subscribe at sourceware dot org>
+List-Archive: <http://sourceware.org/ml/libc-alpha/>
+List-Post: <mailto:libc-alpha at sourceware dot org>
+List-Help: <mailto:libc-alpha-help at sourceware dot org>, <http://sourceware dot org/ml/#faqs>
+Sender: libc-alpha-owner at sourceware dot org
+Delivered-To: mailing list libc-alpha at sourceware dot org
+
+When extending regex buffers, make sure we allocate enough room for the
+state log. Merely doubling the space may not be enough if the current
+node has accepted a long run of characters. This part of the code only
+triggers with multibyte characters.
+
+Andreas.
+
+ [BZ #15078]
+ * posix/regexec.c (extend_buffers): Add parameter min_len.
+ (check_matching): Pass minimum needed length.
+ (clean_state_log_if_needed): Likewise.
+ (get_subexp): Likewise.
+ * posix/Makefile (tests): Add bug-regex34.
+ (bug-regex34-ENV): Define.
+ * posix/bug-regex34.c: New file.
+
+diff --git a/posix/Makefile b/posix/Makefile
+index 57672d8..6ceb440 100644
+--- a/posix/Makefile
++++ b/posix/Makefile
+@@ -86,7 +86,7 @@ tests := tstgetopt testfnm runtests runptests \
+ tst-rfc3484-3 \
+ tst-getaddrinfo3 tst-fnmatch2 tst-cpucount tst-cpuset \
+ bug-getopt1 bug-getopt2 bug-getopt3 bug-getopt4 \
+- bug-getopt5 tst-getopt_long1
++ bug-getopt5 tst-getopt_long1 bug-regex34
+ xtests := bug-ga2
+ ifeq (yes,$(build-shared))
+ test-srcs := globtest
+@@ -199,6 +199,7 @@ bug-regex26-ENV = LOCPATH=$(common-objpfx)localedata
+ bug-regex30-ENV = LOCPATH=$(common-objpfx)localedata
+ bug-regex32-ENV = LOCPATH=$(common-objpfx)localedata
+ bug-regex33-ENV = LOCPATH=$(common-objpfx)localedata
++bug-regex34-ENV = LOCPATH=$(common-objpfx)localedata
+ tst-rxspencer-ARGS = --utf8 rxspencer/tests
+ tst-rxspencer-ENV = LOCPATH=$(common-objpfx)localedata
+ tst-pcre-ARGS = PCRE.tests
+diff --git a/posix/bug-regex34.c b/posix/bug-regex34.c
+new file mode 100644
+index 0000000..bb3b613
+--- /dev/null
++++ b/posix/bug-regex34.c
+@@ -0,0 +1,46 @@
++/* Test re_search with multi-byte characters in UTF-8.
++ Copyright (C) 2013 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, see
++ <http://www.gnu.org/licenses/>. */
++
++#define _GNU_SOURCE 1
++#include <stdio.h>
++#include <string.h>
++#include <locale.h>
++#include <regex.h>
++
++static int
++do_test (void)
++{
++ struct re_pattern_buffer r;
++ /* ????????x */
++ const char *s = "\xe1\x80\x80\xe1\x80\xbb\xe1\x80\xbd\xe1\x80\x94\xe1\x80\xba\xe1\x80\xaf\xe1\x80\x95\xe1\x80\xbax";
++
++ if (setlocale (LC_ALL, "en_US.UTF-8") == NULL)
++ {
++ puts ("setlocale failed");
++ return 1;
++ }
++ memset (&r, 0, sizeof (r));
++
++ re_compile_pattern ("[^x]x", 5, &r);
++ /* This was triggering a buffer overflow. */
++ re_search (&r, s, strlen (s), 0, strlen (s), 0);
++ return 0;
++}
++
++#define TEST_FUNCTION do_test ()
++#include "../test-skeleton.c"
+diff --git a/posix/regexec.c b/posix/regexec.c
+index 7f2de85..5ca2bf6 100644
+--- a/posix/regexec.c
++++ b/posix/regexec.c
+@@ -197,7 +197,7 @@ static int group_nodes_into_DFAstates (const re_dfa_t *dfa,
+ static int check_node_accept (const re_match_context_t *mctx,
+ const re_token_t *node, int idx)
+ internal_function;
+-static reg_errcode_t extend_buffers (re_match_context_t *mctx)
++static reg_errcode_t extend_buffers (re_match_context_t *mctx, int min_len)
+ internal_function;
+
+ /* Entry point for POSIX code. */
+@@ -1160,7 +1160,7 @@ check_matching (re_match_context_t *mctx, int fl_longest_match,
+ || (BE (next_char_idx >= mctx->input.valid_len, 0)
+ && mctx->input.valid_len < mctx->input.len))
+ {
+- err = extend_buffers (mctx);
++ err = extend_buffers (mctx, next_char_idx + 1);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ assert (err == REG_ESPACE);
+@@ -1738,7 +1738,7 @@ clean_state_log_if_needed (re_match_context_t *mctx, int next_state_log_idx)
+ && mctx->input.valid_len < mctx->input.len))
+ {
+ reg_errcode_t err;
+- err = extend_buffers (mctx);
++ err = extend_buffers (mctx, next_state_log_idx + 1);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+@@ -2792,7 +2792,7 @@ get_subexp (re_match_context_t *mctx, int bkref_node, int bkref_str_idx)
+ if (bkref_str_off >= mctx->input.len)
+ break;
+
+- err = extend_buffers (mctx);
++ err = extend_buffers (mctx, bkref_str_off + 1);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+
+@@ -4102,7 +4102,7 @@ check_node_accept (const re_match_context_t *mctx, const re_token_t *node,
+
+ static reg_errcode_t
+ internal_function __attribute_warn_unused_result__
+-extend_buffers (re_match_context_t *mctx)
++extend_buffers (re_match_context_t *mctx, int min_len)
+ {
+ reg_errcode_t ret;
+ re_string_t *pstr = &mctx->input;
+@@ -4111,8 +4111,10 @@ extend_buffers (re_match_context_t *mctx)
+ if (BE (INT_MAX / 2 / sizeof (re_dfastate_t *) <= pstr->bufs_len, 0))
+ return REG_ESPACE;
+
+- /* Double the lengthes of the buffers. */
+- ret = re_string_realloc_buffers (pstr, MIN (pstr->len, pstr->bufs_len * 2));
++ /* Double the lengthes of the buffers, but allocate at least MIN_LEN. */
++ ret = re_string_realloc_buffers (pstr,
++ MAX (min_len,
++ MIN (pstr->len, pstr->bufs_len * 2)));
+ if (BE (ret != REG_NOERROR, 0))
+ return ret;
+
+--
+1.8.1.2
+
+
+--
+Andreas Schwab, SUSE Labs, schwab@suse.de
+GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
+"And now for something completely different."
+
+
diff --git a/patches/source/glibc/glibc.CVE-2013-1914.diff b/patches/source/glibc/glibc.CVE-2013-1914.diff
new file mode 100644
index 000000000..fc844829c
--- /dev/null
+++ b/patches/source/glibc/glibc.CVE-2013-1914.diff
@@ -0,0 +1,53 @@
+From: Andreas Schwab <schwab@suse.de>
+Date: Thu, 21 Mar 2013 14:50:27 +0000 (+0100)
+Subject: Fix stack overflow in getaddrinfo with many results
+X-Git-Url: http://sourceware.org/git/?p=glibc.git;a=commitdiff_plain;h=1cef1b19089528db11f221e938f60b9b048945d7
+
+Fix stack overflow in getaddrinfo with many results
+---
+
+diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
+index d95c2d1..2309281 100644
+--- a/sysdeps/posix/getaddrinfo.c
++++ b/sysdeps/posix/getaddrinfo.c
+@@ -2489,11 +2489,27 @@ getaddrinfo (const char *name, const char *service,
+ __typeof (once) old_once = once;
+ __libc_once (once, gaiconf_init);
+ /* Sort results according to RFC 3484. */
+- struct sort_result results[nresults];
+- size_t order[nresults];
++ struct sort_result *results;
++ size_t *order;
+ struct addrinfo *q;
+ struct addrinfo *last = NULL;
+ char *canonname = NULL;
++ bool malloc_results;
++
++ malloc_results
++ = !__libc_use_alloca (nresults * (sizeof (*results) + sizeof (size_t)));
++ if (malloc_results)
++ {
++ results = malloc (nresults * (sizeof (*results) + sizeof (size_t)));
++ if (results == NULL)
++ {
++ __free_in6ai (in6ai);
++ return EAI_MEMORY;
++ }
++ }
++ else
++ results = alloca (nresults * (sizeof (*results) + sizeof (size_t)));
++ order = (size_t *) (results + nresults);
+
+ /* Now we definitely need the interface information. */
+ if (! check_pf_called)
+@@ -2664,6 +2680,9 @@ getaddrinfo (const char *name, const char *service,
+
+ /* Fill in the canonical name into the new first entry. */
+ p->ai_canonname = canonname;
++
++ if (malloc_results)
++ free (results);
+ }
+
+ __free_in6ai (in6ai);
+
diff --git a/patches/source/glibc/glibc.CVE-2013-2207.diff b/patches/source/glibc/glibc.CVE-2013-2207.diff
new file mode 100644
index 000000000..c43ccf5cd
--- /dev/null
+++ b/patches/source/glibc/glibc.CVE-2013-2207.diff
@@ -0,0 +1,241 @@
+From 5d96012d9978efe4bad88a38e2efcbeada9f7585 Mon Sep 17 00:00:00 2001
+From: mancha <mancha1@hush.com>
+Date: Thu, 22 Aug 2013
+Subject: CVE-2013-2207, BZ #15755: Disable pt_chown.
+
+Using the setuid installed pt_chown and a weak check on whether a file
+descriptor is a tty, an attacker could fake a pty check using FUSE and
+trick pt_chown to grant ownership of a pty descriptor that the current
+user does not own. It cannot access /dev/pts/ptmx however.
+
+Pre-conditions for the attack:
+
+ * Attacker with local user account
+ * Kernel with FUSE support
+ * "user_allow_other" in /etc/fuse.conf
+ * Victim with allocated slave in /dev/pts
+
+In most modern distributions pt_chown is not needed because devpts
+is enabled by default. The fix for this CVE is to disable building
+and using pt_chown by default. We still provide a configure option
+to enable the use of pt_chown but distributions do so at their own
+risk.
+
+---
+This patch was adapted for glibc 2.17 point release from:
+http://sourceware.org/git/?p=glibc.git;a=commit;h=e4608715e6e1
+---
+
+ INSTALL | 12 ++++++++++++
+ config.h.in | 3 +++
+ config.make.in | 1 +
+ configure | 15 +++++++++++++++
+ configure.in | 10 ++++++++++
+ login/Makefile | 8 +++++++-
+ manual/install.texi | 14 ++++++++++++++
+ sysdeps/unix/grantpt.c | 8 +++++---
+ sysdeps/unix/sysv/linux/grantpt.c | 5 +++--
+ 9 files changed, 70 insertions(+), 6 deletions(-)
+---
+
+--- a/INSTALL
++++ b/INSTALL
+@@ -128,6 +128,18 @@ will be used, and CFLAGS sets optimizati
+ this can be prevented though there generally is no reason since it
+ creates compatibility problems.
+
++`--enable-pt_chown'
++ The file `pt_chown' is a helper binary for `grantpt' (*note
++ Pseudo-Terminals: Allocation.) that is installed setuid root to
++ fix up pseudo-terminal ownership. It is not built by default
++ because systems using the Linux kernel are commonly built with the
++ `devpts' filesystem enabled and mounted at `/dev/pts', which
++ manages pseudo-terminal ownership automatically. By using
++ `--enable-pt_chown', you may build `pt_chown' and install it
++ setuid and owned by `root'. The use of `pt_chown' introduces
++ additional security risks to the system and you should enable it
++ only if you understand and accept those risks.
++
+ `--build=BUILD-SYSTEM'
+ `--host=HOST-SYSTEM'
+ These options are for cross-compiling. If you specify both
+--- a/config.h.in
++++ b/config.h.in
+@@ -232,4 +232,7 @@
+ /* The ARM hard-float ABI is being used. */
+ #undef HAVE_ARM_PCS_VFP
+
++/* The pt_chown binary is being built and used by grantpt. */
++#undef HAVE_PT_CHOWN
++
+ #endif
+--- a/config.make.in
++++ b/config.make.in
+@@ -101,6 +101,7 @@ force-install = @force_install@
+ link-obsolete-rpc = @link_obsolete_rpc@
+ build-nscd = @build_nscd@
+ use-nscd = @use_nscd@
++build-pt-chown = @build_pt_chown@
+
+ # Build tools.
+ CC = @CC@
+--- a/configure
++++ b/configure
+@@ -653,6 +653,7 @@ multi_arch
+ base_machine
+ add_on_subdirs
+ add_ons
++build_pt_chown
+ build_nscd
+ link_obsolete_rpc
+ libc_cv_nss_crypt
+@@ -759,6 +760,7 @@ enable_obsolete_rpc
+ enable_systemtap
+ enable_build_nscd
+ enable_nscd
++enable_pt_chown
+ with_cpu
+ '
+ ac_precious_vars='build_alias
+@@ -1419,6 +1421,7 @@ Optional Features:
+ --enable-systemtap enable systemtap static probe points [default=no]
+ --disable-build-nscd disable building and installing the nscd daemon
+ --disable-nscd library functions will not contact the nscd daemon
++ --enable-pt_chown Enable building and installing pt_chown
+
+ Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+@@ -3933,6 +3936,18 @@ else
+ use_nscd=yes
+ fi
+
++# Check whether --enable-pt_chown was given.
++if test "${enable_pt_chown+set}" = set; then :
++ enableval=$enable_pt_chown; build_pt_chown=$enableval
++else
++ build_pt_chown=no
++fi
++
++
++if test $build_pt_chown = yes; then
++ $as_echo "#define HAVE_PT_CHOWN 1" >>confdefs.h
++
++fi
+
+ # The way shlib-versions is used to generate soversions.mk uses a
+ # fairly simplistic model for name recognition that can't distinguish
+--- a/configure.in
++++ b/configure.in
+@@ -315,6 +315,16 @@ AC_ARG_ENABLE([nscd],
+ [use_nscd=$enableval],
+ [use_nscd=yes])
+
++AC_ARG_ENABLE([pt_chown],
++ [AS_HELP_STRING([--enable-pt_chown],
++ [Enable building and installing pt_chown])],
++ [build_pt_chown=$enableval],
++ [build_pt_chown=no])
++AC_SUBST(build_pt_chown)
++if test $build_pt_chown = yes; then
++ AC_DEFINE(HAVE_PT_CHOWN)
++fi
++
+ # The way shlib-versions is used to generate soversions.mk uses a
+ # fairly simplistic model for name recognition that can't distinguish
+ # i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os
+--- a/login/Makefile
++++ b/login/Makefile
+@@ -29,9 +29,15 @@ routines := getutent getutent_r getutid
+
+ CFLAGS-grantpt.c = -DLIBEXECDIR='"$(libexecdir)"'
+
+-others = utmpdump pt_chown
++others = utmpdump
++
++include ../Makeconfig
++
++ifeq (yes,$(build-pt-chown))
++others += pt_chown
+ others-pie = pt_chown
+ install-others-programs = $(inst_libexecdir)/pt_chown
++endif
+
+ subdir-dirs = programs
+ vpath %.c programs
+--- a/manual/install.texi
++++ b/manual/install.texi
+@@ -155,6 +155,20 @@ if the used tools support it. By using
+ prevented though there generally is no reason since it creates
+ compatibility problems.
+
++@pindex pt_chown
++@findex grantpt
++@item --enable-pt_chown
++The file @file{pt_chown} is a helper binary for @code{grantpt}
++(@pxref{Allocation, Pseudo-Terminals}) that is installed setuid root to
++fix up pseudo-terminal ownership. It is not built by default because
++systems using the Linux kernel are commonly built with the @code{devpts}
++filesystem enabled and mounted at @file{/dev/pts}, which manages
++pseudo-terminal ownership automatically. By using
++@samp{--enable-pt_chown}, you may build @file{pt_chown} and install it
++setuid and owned by @code{root}. The use of @file{pt_chown} introduces
++additional security risks to the system and you should enable it only if
++you understand and accept those risks.
++
+ @item --build=@var{build-system}
+ @itemx --host=@var{host-system}
+ These options are for cross-compiling. If you specify both options and
+--- a/sysdeps/unix/grantpt.c
++++ b/sysdeps/unix/grantpt.c
+@@ -173,9 +173,10 @@ grantpt (int fd)
+ retval = 0;
+ goto cleanup;
+
+- /* We have to use the helper program. */
++ /* We have to use the helper program if it is available.. */
+ helper:;
+
++#ifdef HAVE_PT_CHOWN
+ pid_t pid = __fork ();
+ if (pid == -1)
+ goto cleanup;
+@@ -190,9 +191,9 @@ grantpt (int fd)
+ if (__dup2 (fd, PTY_FILENO) < 0)
+ _exit (FAIL_EBADF);
+
+-#ifdef CLOSE_ALL_FDS
++# ifdef CLOSE_ALL_FDS
+ CLOSE_ALL_FDS ();
+-#endif
++# endif
+
+ execle (_PATH_PT_CHOWN, basename (_PATH_PT_CHOWN), NULL, NULL);
+ _exit (FAIL_EXEC);
+@@ -231,6 +232,7 @@ grantpt (int fd)
+ assert(! "getpt: internal error: invalid exit code from pt_chown");
+ }
+ }
++#endif
+
+ cleanup:
+ if (buf != _buf)
+--- a/sysdeps/unix/sysv/linux/grantpt.c
++++ b/sysdeps/unix/sysv/linux/grantpt.c
+@@ -11,7 +11,7 @@
+
+ #include "pty-private.h"
+
+-
++#if HAVE_PT_CHOWN
+ /* Close all file descriptors except the one specified. */
+ static void
+ close_all_fds (void)
+@@ -38,6 +38,7 @@ close_all_fds (void)
+ __dup2 (STDOUT_FILENO, STDERR_FILENO);
+ }
+ }
+-#define CLOSE_ALL_FDS() close_all_fds()
++# define CLOSE_ALL_FDS() close_all_fds()
++#endif
+
+ #include <sysdeps/unix/grantpt.c>
diff --git a/patches/source/glibc/glibc.CVE-2013-4332.diff b/patches/source/glibc/glibc.CVE-2013-4332.diff
new file mode 100644
index 000000000..9f7f5886c
--- /dev/null
+++ b/patches/source/glibc/glibc.CVE-2013-4332.diff
@@ -0,0 +1,64 @@
+From 0d6085cb1b4330b835ad08a3ec8f80b30f0cadb4 Mon Sep 17 00:00:00 2001
+From: mancha <mancha1@hush.com>
+Date: Wed, 11 Sep 2013
+Subject: CVE-2013-4332
+
+malloc: Check for integer overflow in pvalloc, valloc, and memalign.
+
+A large bytes parameter to pvalloc, valloc, or memalign could cause
+an integer overflow and corrupt allocator internals. Check the
+overflow does not occur before continuing with the allocation.
+
+Note: This is a backport to glibc 2.17 of the following three commits:
+ * https://sourceware.org/git/?p=glibc.git;a=commit;h=1159a193696a
+ * https://sourceware.org/git/?p=glibc.git;a=commit;h=55e17aadc1ef
+ * https://sourceware.org/git/?p=glibc.git;a=commit;h=b73ed247781d
+---
+
+malloc.c | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+
+--- a/malloc/malloc.c
++++ b/malloc/malloc.c
+@@ -3020,6 +3020,13 @@ __libc_memalign(size_t alignment, size_t
+ /* Otherwise, ensure that it is at least a minimum chunk size */
+ if (alignment < MINSIZE) alignment = MINSIZE;
+
++ /* Check for overflow. */
++ if (bytes > SIZE_MAX - alignment - MINSIZE)
++ {
++ __set_errno (ENOMEM);
++ return 0;
++ }
++
+ arena_get(ar_ptr, bytes + alignment + MINSIZE);
+ if(!ar_ptr)
+ return 0;
+@@ -3051,6 +3058,13 @@ __libc_valloc(size_t bytes)
+
+ size_t pagesz = GLRO(dl_pagesize);
+
++ /* Check for overflow. */
++ if (bytes > SIZE_MAX - pagesz - MINSIZE)
++ {
++ __set_errno (ENOMEM);
++ return 0;
++ }
++
+ __malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, size_t,
+ const __malloc_ptr_t)) =
+ force_reg (__memalign_hook);
+@@ -3088,6 +3102,13 @@ __libc_pvalloc(size_t bytes)
+ size_t page_mask = GLRO(dl_pagesize) - 1;
+ size_t rounded_bytes = (bytes + page_mask) & ~(page_mask);
+
++ /* Check for overflow. */
++ if (bytes > SIZE_MAX - 2*pagesz - MINSIZE)
++ {
++ __set_errno (ENOMEM);
++ return 0;
++ }
++
+ __malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, size_t,
+ const __malloc_ptr_t)) =
+ force_reg (__memalign_hook);
diff --git a/patches/source/glibc/glibc.CVE-2015-0235.glibc217.diff b/patches/source/glibc/glibc.CVE-2015-0235.glibc217.diff
new file mode 100644
index 000000000..06d482e89
--- /dev/null
+++ b/patches/source/glibc/glibc.CVE-2015-0235.glibc217.diff
@@ -0,0 +1,217 @@
+--- ./nss/getXXbyYY_r.c.orig 2012-12-24 21:02:13.000000000 -0600
++++ ./nss/getXXbyYY_r.c 2015-01-27 17:36:40.945070889 -0600
+@@ -179,6 +179,9 @@
+ case -1:
+ return errno;
+ case 1:
++#ifdef NEED_H_ERRNO
++ any_service = true;
++#endif
+ goto done;
+ }
+ #endif
+@@ -288,7 +291,7 @@
+ /* Either we failed to lookup the functions or the functions themselves
+ had a system error. Set NETDB_INTERNAL here to let the caller know
+ that the errno may have the real reason for failure. */
+- *h_errnop = NETDB_INTERNAL;
++ *h_errnop = NETDB_INTERNAL;
+ else if (status != NSS_STATUS_SUCCESS && !any_service)
+ /* We were not able to use any service. */
+ *h_errnop = NO_RECOVERY;
+--- ./nss/digits_dots.c.orig 2012-12-24 21:02:13.000000000 -0600
++++ ./nss/digits_dots.c 2015-01-27 17:36:40.945070889 -0600
+@@ -46,7 +46,10 @@
+ {
+ if (h_errnop)
+ *h_errnop = NETDB_INTERNAL;
+- *result = NULL;
++ if (buffer_size == NULL)
++ *status = NSS_STATUS_TRYAGAIN;
++ else
++ *result = NULL;
+ return -1;
+ }
+
+@@ -83,14 +86,16 @@
+ }
+
+ size_needed = (sizeof (*host_addr)
+- + sizeof (*h_addr_ptrs) + strlen (name) + 1);
++ + sizeof (*h_addr_ptrs)
++ + sizeof (*h_alias_ptr) + strlen (name) + 1);
+
+ if (buffer_size == NULL)
+ {
+ if (buflen < size_needed)
+ {
++ *status = NSS_STATUS_TRYAGAIN;
+ if (h_errnop != NULL)
+- *h_errnop = TRY_AGAIN;
++ *h_errnop = NETDB_INTERNAL;
+ __set_errno (ERANGE);
+ goto done;
+ }
+@@ -109,7 +114,7 @@
+ *buffer_size = 0;
+ __set_errno (save);
+ if (h_errnop != NULL)
+- *h_errnop = TRY_AGAIN;
++ *h_errnop = NETDB_INTERNAL;
+ *result = NULL;
+ goto done;
+ }
+@@ -149,7 +154,9 @@
+ if (! ok)
+ {
+ *h_errnop = HOST_NOT_FOUND;
+- if (buffer_size)
++ if (buffer_size == NULL)
++ *status = NSS_STATUS_NOTFOUND;
++ else
+ *result = NULL;
+ goto done;
+ }
+@@ -190,7 +197,7 @@
+ if (buffer_size == NULL)
+ *status = NSS_STATUS_SUCCESS;
+ else
+- *result = resbuf;
++ *result = resbuf;
+ goto done;
+ }
+
+@@ -201,15 +208,6 @@
+
+ if ((isxdigit (name[0]) && strchr (name, ':') != NULL) || name[0] == ':')
+ {
+- const char *cp;
+- char *hostname;
+- typedef unsigned char host_addr_t[16];
+- host_addr_t *host_addr;
+- typedef char *host_addr_list_t[2];
+- host_addr_list_t *h_addr_ptrs;
+- size_t size_needed;
+- int addr_size;
+-
+ switch (af)
+ {
+ default:
+@@ -225,7 +223,10 @@
+ /* This is not possible. We cannot represent an IPv6 address
+ in an `struct in_addr' variable. */
+ *h_errnop = HOST_NOT_FOUND;
+- *result = NULL;
++ if (buffer_size == NULL)
++ *status = NSS_STATUS_NOTFOUND;
++ else
++ *result = NULL;
+ goto done;
+
+ case AF_INET6:
+@@ -233,42 +234,6 @@
+ break;
+ }
+
+- size_needed = (sizeof (*host_addr)
+- + sizeof (*h_addr_ptrs) + strlen (name) + 1);
+-
+- if (buffer_size == NULL && buflen < size_needed)
+- {
+- if (h_errnop != NULL)
+- *h_errnop = TRY_AGAIN;
+- __set_errno (ERANGE);
+- goto done;
+- }
+- else if (buffer_size != NULL && *buffer_size < size_needed)
+- {
+- char *new_buf;
+- *buffer_size = size_needed;
+- new_buf = realloc (*buffer, *buffer_size);
+-
+- if (new_buf == NULL)
+- {
+- save = errno;
+- free (*buffer);
+- __set_errno (save);
+- *buffer = NULL;
+- *buffer_size = 0;
+- *result = NULL;
+- goto done;
+- }
+- *buffer = new_buf;
+- }
+-
+- memset (*buffer, '\0', size_needed);
+-
+- host_addr = (host_addr_t *) *buffer;
+- h_addr_ptrs = (host_addr_list_t *)
+- ((char *) host_addr + sizeof (*host_addr));
+- hostname = (char *) h_addr_ptrs + sizeof (*h_addr_ptrs);
+-
+ for (cp = name;; ++cp)
+ {
+ if (!*cp)
+@@ -281,7 +246,9 @@
+ if (inet_pton (AF_INET6, name, host_addr) <= 0)
+ {
+ *h_errnop = HOST_NOT_FOUND;
+- if (buffer_size)
++ if (buffer_size == NULL)
++ *status = NSS_STATUS_NOTFOUND;
++ else
+ *result = NULL;
+ goto done;
+ }
+--- ./nss/test-digits-dots.c.orig 2015-01-27 17:36:40.946070889 -0600
++++ ./nss/test-digits-dots.c 2015-01-27 17:36:40.946070889 -0600
+@@ -0,0 +1,38 @@
++/* Copyright (C) 2013 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, see
++ <http://www.gnu.org/licenses/>. */
++
++/* Testcase for BZ #15014 */
++
++#include <stdlib.h>
++#include <netdb.h>
++#include <errno.h>
++
++static int
++do_test (void)
++{
++ char buf[32];
++ struct hostent *result = NULL;
++ struct hostent ret;
++ int h_err = 0;
++ int err;
++
++ err = gethostbyname_r ("1.2.3.4", &ret, buf, sizeof (buf), &result, &h_err);
++ return err == ERANGE && h_err == NETDB_INTERNAL ? EXIT_SUCCESS : EXIT_FAILURE;
++}
++
++#define TEST_FUNCTION do_test ()
++#include "../test-skeleton.c"
+--- ./nss/Makefile.orig 2012-12-24 21:02:13.000000000 -0600
++++ ./nss/Makefile 2015-01-27 17:36:40.944070889 -0600
+@@ -38,7 +38,7 @@
+ makedb-modules = xmalloc hash-string
+ extra-objs += $(makedb-modules:=.o)
+
+-tests = test-netdb tst-nss-test1
++tests = test-netdb tst-nss-test1 test-digits-dots
+ xtests = bug-erange
+
+ include ../Makeconfig
diff --git a/patches/source/glibc/glibc.SlackBuild b/patches/source/glibc/glibc.SlackBuild
new file mode 100755
index 000000000..6b7d23187
--- /dev/null
+++ b/patches/source/glibc/glibc.SlackBuild
@@ -0,0 +1,536 @@
+#!/bin/sh
+
+# Copyright 2006, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2016 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+## build glibc-$VERSION for Slackware
+
+VERSION=${VERSION:-2.17}
+CHECKOUT=${CHECKOUT:-""}
+BUILD=${BUILD:-11_slack14.1}
+
+# I was considering disabling NSCD, but MoZes talked me out of it. :)
+#DISABLE_NSCD=" --disable-nscd "
+
+# $ARCH may be preset, otherwise i486 compatibility with i686 binary
+# structuring is the Slackware default, since this is what gcc-3.2+
+# requires for binary compatibility with previous releases.
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# I'll break this out as an option for fun :-)
+case $ARCH in
+ i386)
+ OPTIMIZ="-O3 -march=i386 -mcpu=i686"
+ LIBDIRSUFFIX=""
+ ;;
+ i486)
+ OPTIMIZ="-O3 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+ ;;
+ i586)
+ OPTIMIZ="-O3 -march=i586"
+ LIBDIRSUFFIX=""
+ ;;
+ i686)
+ OPTIMIZ="-O3 -march=i686"
+ LIBDIRSUFFIX=""
+ ;;
+ athlon)
+ OPTIMIZ="-O3 -march=athlon"
+ LIBDIRSUFFIX=""
+ ;;
+ s390)
+ OPTIMIZ="-O3"
+ LIBDIRSUFFIX=""
+ ;;
+ x86_64)
+ OPTIMIZ="-O3 -fPIC"
+ LIBDIRSUFFIX="64"
+ ;;
+ *)
+ OPTIMIZ="-O3"
+ LIBDIRSUFFIX=""
+ ;;
+esac
+
+case $ARCH in
+ x86_64)
+ TARGET=${TARGET:-x86_64}
+ ;;
+ i486)
+ # This should be i486 for all 32-bit x86 arch:
+ TARGET=${TARGET:-i486}
+ ;;
+esac
+
+# Hand off the $ARCH variable to $SLACKWARE_ARCH to avoid confusing glibc:
+SLACKWARE_ARCH=$ARCH
+unset ARCH
+
+CVSVER=${VERSION}${CHECKOUT}
+
+# NOTE!!! glibc needs to be built against the sanitized kernel headers,
+# which will be installed under /usr/include by the kernel-headers package.
+# Be sure the correct version of the headers package is installed BEFORE
+# building glibc!
+
+CWD=$(pwd)
+# Temporary build location. This should not be a directory
+# path a non-root user could create later...
+TMP=${TMP:-/glibc-tmp-$(mcookie)}
+mkdir -p $TMP
+
+NUMJOBS=${NUMJOBS:--j4}
+
+# Sanity check on the version number in the install scripts:
+if ! grep -vq libutil-${VERSION}.so $CWD/doinst.sh-glibc ; then
+ echo "FATAL: doinst.sh scripts have wrong version numbers."
+ exit 1
+fi
+
+# This function fixes a doinst.sh file for x86_64.
+# With thanks to Fred Emmott.
+fix_doinst() {
+ if [ "x$LIBDIRSUFFIX" = "x" ]; then
+ return;
+ fi;
+ # Fix "( cd usr/lib ;" occurrences
+ sed -i "s#lib ;#lib${LIBDIRSUFFIX} ;#" install/doinst.sh
+ # Fix "lib/" occurrences
+ sed -i "s#lib/#lib${LIBDIRSUFFIX}/#g" install/doinst.sh
+ # Fix "( cd lib" occurrences
+ sed -i "s#( cd lib\$#( cd lib${LIBDIRSUFFIX}#" install/doinst.sh
+
+ if [ "$SLACKWARE_ARCH" = "x86_64" ]; then
+ sed -i 's#ld-linux.so.2#ld-linux-x86-64.so.2#' install/doinst.sh
+ fi
+}
+
+# This is a patch function to put all glibc patches in the build script
+# up near the top.
+apply_patches() {
+ # Use old-style locale directories rather than a single (and strangely
+ # formatted) /usr/lib/locale/locale-archive file:
+ zcat $CWD/glibc.locale.no-archive.diff.gz | patch -p1 --verbose || exit 1
+ # The is_IS locale is causing a strange error about the "echn" command
+ # not existing. This patch reverts is_IS to the version shipped in
+ # glibc-2.5:
+ zcat $CWD/is_IS.diff.gz | patch -p1 --verbose || exit 1
+ # Fix NIS netgroups:
+ zcat $CWD/glibc.nis-netgroups.diff.gz | patch -p1 --verbose || exit 1
+ # Support ru_RU.CP1251 locale:
+ zcat $CWD/glibc.ru_RU.CP1251.diff.gz | patch -p1 --verbose || exit 1
+ # Fix missing MAX macro in getcwd.c:
+ zcat $CWD/glibc.getcwd.max.macro.diff.gz | patch -p1 --verbose || exit 1
+ # Fix resolver problem with glibc-2.9:
+ zcat $CWD/glibc-2.10-dns-no-gethostbyname4.diff.gz | patch -p0 --verbose || exit 1
+ # This reverts a patch that was made to glibc to fix "namespace leakage",
+ # which seems to cause some build failures (e.g. with conntrack):
+ zcat $CWD/glibc.revert.to.fix.build.breakages.diff.gz | patch -p1 --verbose || exit 1
+ # This partial security patch still applies and might be needed:
+ zcat $CWD/glibc.git-96611391ad8823ba58405325d78cefeae5cdf699-CVE-2010-3847b.patch.gz | patch -p1 --verbose || exit 1
+ # Make it harder for people to trick ldd into running code:
+ zcat $CWD/glibc.ldd.trace.through.dynamic.linker.diff.gz | patch -p1 --verbose || exit 1
+ # Make glibc compile with binutils using --enable-initfini-array.
+ # At this time, we do not recommend this due to probable ABI breakage.
+ # The also patch needs work before it would apply.
+ # ***NOT READY***
+ #zcat $CWD/glibc.git-4a531bb0b3b582cb693de9f76d2d97d970f9a5d5.patch.gz | patch -p1 --verbose || exit 1
+ #
+ # Avoid the Intel optimized asm routines for now because they break
+ # the flash player. We'll phase this in when it's safer to do so.
+ zcat $CWD/glibc.disable.broken.optimized.memcpy.diff.gz | patch -p1 --verbose || exit 1
+ # Fix buffer overrun in regexp matcher. This bug is deemed low impact since
+ # the buffer contents cannot be controlled, but could lead to a crash.
+ zcat $CWD/glibc.CVE-2013-0242.diff.gz | patch -p1 --verbose || exit 1
+ # Fix stack overflow in getaddrinfo with many results. This bug can only be
+ # triggered through DNS poisoning or through the use of a hostile DNS
+ # server (in which case you already have problems), and requires large
+ # amounts of data to be sent to the targeted machine. May lead to a
+ # crash. Considered low impact.
+ zcat $CWD/glibc.CVE-2013-1914.diff.gz | patch -p1 --verbose || exit 1
+ # Remove pt_chown by default, as it can be used for a local privilege
+ # escalation. However, although this is worth patching in the -current
+ # version, it requires a non-default (and known to weaken security) setting
+ # for FUSE. Additionally, the patch is not portable to older versions of
+ # glibc (but thanks Mancha for porting it to 2.17!). On older versions
+ # of glibc, making /usr/libexec/pt_chown a symlink to /bin/true will
+ # provide the same fix, if needed. But the insecure setting for FUSE
+ # probably opens up many other possible exploits and should be avoided.
+ zcat $CWD/glibc.CVE-2013-2207.diff.gz | patch -p1 --verbose || exit 1
+ # Patch integer overflows in pvalloc, valloc, and
+ # posix_memalign/memalign/aligned_alloc (CVE-2013-4332).
+ zcat $CWD/glibc.CVE-2013-4332.diff.gz | patch -p1 --verbose || exit 1
+ # Security patches:
+ patch -p1 --verbose < $CWD/glibc-2.17_strcoll-change.diff || exit 1
+ patch -p1 --verbose < $CWD/glibc-2.17_CVE-2012-4424.diff || exit 1
+ patch -p1 --verbose < $CWD/glibc-2.17_CVE-2012-4412.diff || exit 1
+ patch -p1 --verbose < $CWD/glibc-2.17_CVE-2013-4237.diff || exit 1
+ patch -p1 --verbose < $CWD/glibc-2.17_CVE-2013-4788.diff || exit 1
+ patch -p1 --verbose < $CWD/glibc-2.17_CVE-2013-4458.diff || exit 1
+ patch -p1 --verbose < $CWD/glibc-2.17_CVE-2014-4043.diff || exit 1
+ patch -p1 --verbose < $CWD/glibc-2.17_CVE-2014-0475.diff || exit 1
+ patch -p1 --verbose < $CWD/glibc-2.17_CVE-2014-5119.diff || exit 1
+ patch -p1 --verbose < $CWD/glibc-2.17_CVE-2014-6040.diff || exit 1
+ # Security hardening patch from Florian Weimer:
+ patch -p1 --verbose < $CWD/glibc-2.17_hardening.diff || exit 1
+ # Bugfix patch for optimization in gcc-4.8+:
+ patch -p1 --verbose < $CWD/glibc-2.17_gcc48-unsafe-optim.diff || exit 1
+ # Fix parsing of numeric hosts in gethostbyname_r:
+ zcat $CWD/glibc.CVE-2015-0235.glibc217.diff.gz | patch -p1 --verbose || exit 1
+ # Patch CVE-2015-7547:
+ zcat $CWD/glibc-2.17_CVE-2015-7547.diff.gz | patch -p1 --verbose || exit 1
+}
+
+# This is going to be the initial $DESTDIR:
+export PKG=$TMP/package-glibc-incoming-tree
+PGLIBC=$TMP/package-glibc
+PSOLIBS=$TMP/package-glibc-solibs
+PZONE=$TMP/package-glibc-zoneinfo
+PI18N=$TMP/package-glibc-i18n
+PPROFILE=$TMP/package-glibc-profile
+PDEBUG=$TMP/package-glibc-debug
+
+# Empty these locations first:
+for dir in $PKG $PGLIBC $PSOLIBS $PZONE $PI18N $PPROFILE $PDEBUG ; do
+ if [ -d $dir ]; then
+ rm -rf $dir
+ fi
+ mkdir -p $dir
+done
+if [ -d $TMP/glibc-$VERSION ]; then
+ rm -rf $TMP/glibc-$VERSION
+fi
+
+# Create an incoming directory structure for glibc to be built into:
+mkdir -p $PKG/lib${LIBDIRSUFFIX}
+mkdir -p $PKG/sbin
+mkdir -p $PKG/usr/bin
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}
+mkdir -p $PKG/usr/sbin
+mkdir -p $PKG/usr/include
+mkdir -p $PKG/usr/doc
+mkdir -p $PKG/usr/man
+mkdir -p $PKG/usr/share
+mkdir -p $PKG/var/db/nscd
+mkdir -p $PKG/var/run/nscd
+
+# Begin extract/compile:
+cd $TMP
+rm -rf glibc-$CVSVER
+tar xvf $CWD/glibc-$CVSVER.tar.xz \
+ || tar xvf $CWD/glibc-$CVSVER.tar.bz2 \
+ || tar xvf $CWD/glibc-$CVSVER.tar.gz
+cd glibc-$CVSVER
+
+chown -R root:root .
+find . -perm 666 -exec chmod 644 {} \;
+find . -perm 664 -exec chmod 644 {} \;
+find . -perm 600 -exec chmod 644 {} \;
+find . -perm 444 -exec chmod 644 {} \;
+find . -perm 400 -exec chmod 644 {} \;
+find . -perm 440 -exec chmod 644 {} \;
+find . -perm 777 -exec chmod 755 {} \;
+find . -perm 775 -exec chmod 755 {} \;
+find . -perm 511 -exec chmod 755 {} \;
+find . -perm 711 -exec chmod 755 {} \;
+find . -perm 555 -exec chmod 755 {} \;
+
+# Clean up leftover CVS directories:
+find . -type d -name CVS -exec rm -r {} \; 2> /dev/null
+
+# Apply patches; exit if any fail.
+apply_patches
+if [ ! $? = 0 ]; then
+ exit 1
+fi
+
+# Make build directory:
+mkdir build-glibc-$VERSION
+cd build-glibc-$VERSION || exit 1
+
+echo "BUILDING DAS NPTL GLIBC"
+CFLAGS="-g $OPTIMIZ" \
+../configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --enable-kernel=2.6.32 \
+ --with-headers=/usr/include \
+ --enable-add-ons=libidn,nptl \
+ --enable-obsolete-rpc \
+ --enable-profile \
+ $DISABLE_NSCD \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --with-tls \
+ --with-__thread \
+ --without-cvs \
+ $TARGET-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install install_root=$PKG || exit 1
+make localedata/install-locales install_root=$PKG || exit 1
+
+# The prevailing standard seems to be putting unstripped libraries in
+# /usr/lib/debug/ and stripping the debugging symbols from all the other
+# libraries.
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/debug
+cp -a $PKG/lib${LIBDIRSUFFIX}/l*.so* $PKG/usr/lib${LIBDIRSUFFIX}/debug
+cp -a $PKG/usr/lib${LIBDIRSUFFIX}/*.a $PKG/usr/lib${LIBDIRSUFFIX}/debug
+# Don't need debug+profile:
+( cd $PKG/usr/lib${LIBDIRSUFFIX}/debug ; rm -f *_p.* )
+# NOTE: Is there really a reason for the glibc-debug package?
+# If you're debugging glibc, you can also compile it, right?
+
+## COMMENTED OUT: There's no reason for profile libs to include -g information.
+## Put back unstripped profiling libraries:
+#mv $PKG/usr/lib${LIBDIRSUFFIX}/debug/*_p.a $PKG/usr/lib${LIBDIRSUFFIX}
+# It might be best to put the unstripped and profiling libraries in glibc-debug and glibc-profile.
+
+# I don't think "strip -g" causes the pthread problems. It's --strip-unneeded that does.
+strip -g $PKG/lib${LIBDIRSUFFIX}/l*.so*
+strip -g $PKG/usr/lib${LIBDIRSUFFIX}/l*.so*
+strip -g $PKG/usr/lib${LIBDIRSUFFIX}/lib*.a
+
+# Build and install the zoneinfo database:
+cd $TMP
+rm -rf tzcodedata-build
+mkdir tzcodedata-build
+cd tzcodedata-build
+tar xzf $CWD/tzdata?????.tar.gz
+tar xzf $CWD/tzcode?????.tar.gz
+sed -i "s,/usr/local,$(pwd),g" Makefile
+sed -i "s,/etc/zoneinfo,/zoneinfo,g" Makefile
+make
+make install
+mkdir -p $PKG/usr/share/zoneinfo/{posix,right}
+cd etc
+cp -a zoneinfo/* $PKG/usr/share/zoneinfo
+cp -a zoneinfo-posix/* $PKG/usr/share/zoneinfo/posix
+cp -a zoneinfo-leaps/* $PKG/usr/share/zoneinfo/right
+# Remove $PKG/usr/share/zoneinfo/localtime -- the install script will
+# create it as a link to /etc/localtime.
+rm -f $PKG/usr/share/zoneinfo/localtime
+
+# Back to the sources dir to add some files/docs:
+cd $TMP/glibc-$CVSVER
+
+# We'll automatically install the config file for the Name Server Cache Daemon.
+# Perhaps this should also have some commented-out startup code in rc.inet2...
+mkdir -p $PKG/etc
+cat nscd/nscd.conf > $PKG/etc/nscd.conf.new
+
+# Install some scripts to help select a timezone:
+( cd $CWD/timezone-scripts
+ # Try to rebuild this:
+ sh output-updated-timeconfig.sh $PKG/usr/share/zoneinfo > timeconfig 2> /dev/null
+)
+mkdir -p $PKG/var/log/setup
+cp -a $CWD/timezone-scripts/setup.timeconfig $PKG/var/log/setup
+chown root:root $PKG/var/log/setup/setup.timeconfig
+chmod 755 $PKG/var/log/setup/setup.timeconfig
+mkdir -p $PKG/usr/sbin
+cp -a $CWD/timezone-scripts/timeconfig $PKG/usr/sbin
+chown root:root $PKG/usr/sbin/timeconfig
+chmod 755 $PKG/usr/sbin/timeconfig
+
+## Install docs:
+( mkdir -p $PKG/usr/doc/glibc-$VERSION
+ cp -a \
+ BUGS CONFORMANCE COPYING COPYING.LIB FAQ INSTALL LICENSES NAMESPACE \
+ NEWS NOTES PROJECTS README README.libm \
+ $PKG/usr/doc/glibc-$VERSION
+)
+
+# Don't forget to add the /usr/share/zoneinfo/localtime -> /etc/localtime symlink! :)
+if [ ! -r $PKG/usr/share/zoneinfo/localtime ]; then
+ ( cd $PKG/usr/share/zoneinfo ; ln -sf /etc/localtime . )
+fi
+
+# OK, there are some very old Linux standards that say that any binaries in a /bin or
+# /sbin directory (and the directories themselves) should be group bin rather than
+# group root, unless a specific group is really needed for some reason.
+#
+# I can't find any mention of this in more recent standards docs, and always thought
+# that it was pretty cosmetic anyway (hey, if there's a reason -- fill me in!), so
+# it's possible that this ownership change won't be followed in the near future
+# (it's a PITA, and causes many bug reports when the perms change is occasionally
+# forgotten).
+#
+# But, it's hard to get me to break old habits, so we'll continue the tradition here:
+#
+# No, no we won't. You know how we love to break traditions.
+
+# Strip most binaries:
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-debug 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+)
+
+# Fix info dir:
+rm $PKG/usr/info/dir
+gzip -9 $PKG/usr/info/*
+
+# This is junk
+rm $PKG/etc/ld.so.cache
+( cd $PKG
+ find . -name "*.orig" -exec rm {} \;
+)
+
+##################################
+# OK, time to make some packages #
+##################################
+
+# glibc-zoneinfo. We will start with an easy one to avoid breaking a sweat. ;-)
+cd $CWD
+ZONE_VERSIONS="$(echo tzdata* | cut -f1 -d . | cut -b7-11)"
+echo $ZONE_VERSIONS
+cd $PZONE
+# Install some scripts to help select a timezone:
+mkdir -p $PZONE/var/log/setup
+cp -a $CWD/timezone-scripts/setup.timeconfig $PZONE/var/log/setup
+chown root:root $PZONE/var/log/setup/setup.timeconfig
+chmod 755 $PZONE/var/log/setup/setup.timeconfig
+mkdir -p $PZONE/usr/sbin
+cp -a $CWD/timezone-scripts/timeconfig $PZONE/usr/sbin
+chown root:root $PZONE/usr/sbin/timeconfig
+chmod 755 $PZONE/usr/sbin/timeconfig
+mkdir $PZONE/install
+cat $CWD/doinst.sh-glibc-zoneinfo > $PZONE/install/doinst.sh
+cat $CWD/slack-desc.glibc-zoneinfo > $PZONE/install/slack-desc
+mkdir -p $PZONE/usr/share
+cd $PZONE/usr/share
+cp -a --verbose $PKG/usr/share/zoneinfo .
+cd $PZONE
+mkdir -p $PZONE/etc
+# This is already hard-coded into doinst.sh (like it'll be there anyway ;-):
+rm -f etc/localtime
+# Wrap it up:
+makepkg -l y -c n $TMP/glibc-zoneinfo-$ZONE_VERSIONS-noarch-$BUILD.txz
+
+# glibc-profile:
+cd $PPROFILE
+mkdir -p usr/lib${LIBDIRSUFFIX}
+# Might as well just grab these with 'mv' to simplify things later:
+mv $PKG/usr/lib${LIBDIRSUFFIX}/lib*_p.a usr/lib${LIBDIRSUFFIX}
+# Profile libs should be stripped. Use the debug libs to debug...
+( cd usr/lib${LIBDIRSUFFIX} ; strip -g *.a )
+mkdir install
+cp -a $CWD/slack-desc.glibc-profile install/slack-desc
+makepkg -l y -c n $TMP/glibc-profile-$VERSION-$SLACKWARE_ARCH-$BUILD.txz
+
+# THIS IS NO LONGER PACKAGED (or is it? might be better to let it be made, and then ship it or not...)
+# glibc-debug:
+cd $PDEBUG
+mkdir -p usr/lib${LIBDIRSUFFIX}
+# Might as well just grab these with 'mv' to simplify things later:
+mv $PKG/usr/lib${LIBDIRSUFFIX}/debug usr/lib${LIBDIRSUFFIX}
+mkdir install
+cp -a $CWD/slack-desc.glibc-debug install/slack-desc
+makepkg -l y -c n $TMP/glibc-debug-$VERSION-$SLACKWARE_ARCH-$BUILD.txz
+## INSTEAD, NUKE THESE LIBS
+#rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/debug
+
+# glibc-i18n:
+cd $PI18N
+mkdir -p usr/lib${LIBDIRSUFFIX}
+rm -rf usr/lib${LIBDIRSUFFIX}/locale
+cp -a $PKG/usr/lib${LIBDIRSUFFIX}/locale usr/lib${LIBDIRSUFFIX}
+mkdir -p usr/share
+cp -a $PKG/usr/share/i18n usr/share
+cp -a $PKG/usr/share/locale usr/share
+mkdir install
+cp -a $CWD/slack-desc.glibc-i18n install/slack-desc
+makepkg -l y -c n $TMP/glibc-i18n-$VERSION-$SLACKWARE_ARCH-$BUILD.txz
+
+# glibc-solibs:
+cd $PSOLIBS
+mkdir -p etc/profile.d
+cp -a $CWD/profile.d/* etc/profile.d
+chown -R root:root etc
+chmod 755 etc/profile.d/*
+mkdir -p lib${LIBDIRSUFFIX}
+cp -a $PKG/lib${LIBDIRSUFFIX}/* lib${LIBDIRSUFFIX}
+( cd lib${LIBDIRSUFFIX}
+ mkdir incoming
+ mv *so* incoming
+ mv incoming/libSegFault.so .
+)
+mkdir -p usr
+cp -a $PKG/usr/bin usr
+mv usr/bin/ldd .
+rm usr/bin/*
+mv ldd usr/bin
+mkdir -p usr/lib${LIBDIRSUFFIX}
+# The gconv directory has a lot of stuff, but including it here will save some problems.
+# Seems standard elsewhere.
+cp -a $PKG/usr/lib${LIBDIRSUFFIX}/gconv usr/lib${LIBDIRSUFFIX}
+# Another manpage abandoned by GNU...
+#mkdir -p usr/man/man1
+#cp -a $PKG/usr/man/man1/ldd.1.gz usr/man/man1
+mkdir -p usr/libexec
+cp -a $PKG/usr/libexec/pt_chown usr/libexec
+# Same usr.bin deal:
+cp -a $PKG/sbin .
+mv sbin/ldconfig .
+rm sbin/*
+mv ldconfig sbin
+mkdir install
+cp -a $CWD/slack-desc.glibc-solibs install/slack-desc
+cp -a $CWD/doinst.sh-glibc-solibs install/doinst.sh
+fix_doinst
+# Ditch links:
+find . -type l -exec rm {} \;
+# Build the package:
+makepkg -l y -c n $TMP/glibc-solibs-$VERSION-$SLACKWARE_ARCH-$BUILD.txz
+
+# And finally, the complete "all-in-one" glibc package is created
+# from whatever was leftover:
+cd $PGLIBC
+mv $PKG/* .
+mkdir -p etc/profile.d
+cp -a $CWD/profile.d/* etc/profile.d
+chown -R root:root etc
+chmod 755 etc/profile.d/*
+# Ditch links (these are in doinst.sh-glibc):
+find . -type l -exec rm {} \;
+mkdir install
+cp -a $CWD/slack-desc.glibc install/slack-desc
+cp -a $CWD/doinst.sh-glibc install/doinst.sh
+fix_doinst
+( cd lib${LIBDIRSUFFIX}
+ mkdir incoming
+ mv *so* incoming
+ mv incoming/libSegFault.so .
+)
+# Build the package:
+/sbin/makepkg -l y -c n $TMP/glibc-$VERSION-$SLACKWARE_ARCH-$BUILD.txz
+
+# Done!
+echo
+echo "glibc packages built in $TMP!"
+
diff --git a/patches/source/glibc/glibc.disable.broken.optimized.memcpy.diff b/patches/source/glibc/glibc.disable.broken.optimized.memcpy.diff
new file mode 100644
index 000000000..8034f1201
--- /dev/null
+++ b/patches/source/glibc/glibc.disable.broken.optimized.memcpy.diff
@@ -0,0 +1,30 @@
+--- ./sysdeps/x86_64/multiarch/memcpy.S.orig 2011-01-17 22:34:07.000000000 -0600
++++ ./sysdeps/x86_64/multiarch/memcpy.S 2011-02-08 19:36:26.000000000 -0600
+@@ -32,12 +32,6 @@
+ jne 1f
+ call __init_cpu_features
+ 1: leaq __memcpy_sse2(%rip), %rax
+- testl $bit_SSSE3, __cpu_features+CPUID_OFFSET+index_SSSE3(%rip)
+- jz 2f
+- leaq __memcpy_ssse3(%rip), %rax
+- testl $bit_Fast_Copy_Backward, __cpu_features+FEATURE_OFFSET+index_Fast_Copy_Backward(%rip)
+- jz 2f
+- leaq __memcpy_ssse3_back(%rip), %rax
+ 2: ret
+ END(memcpy)
+
+--- ./sysdeps/x86_64/multiarch/mempcpy.S.orig 2011-01-17 22:34:07.000000000 -0600
++++ ./sysdeps/x86_64/multiarch/mempcpy.S 2011-02-08 19:36:37.000000000 -0600
+@@ -31,12 +31,6 @@
+ jne 1f
+ call __init_cpu_features
+ 1: leaq __mempcpy_sse2(%rip), %rax
+- testl $bit_SSSE3, __cpu_features+CPUID_OFFSET+index_SSSE3(%rip)
+- jz 2f
+- leaq __mempcpy_ssse3(%rip), %rax
+- testl $bit_Fast_Copy_Backward, __cpu_features+FEATURE_OFFSET+index_Fast_Copy_Backward(%rip)
+- jz 2f
+- leaq __mempcpy_ssse3_back(%rip), %rax
+ 2: ret
+ END(__mempcpy)
+
diff --git a/patches/source/glibc/glibc.getcwd.max.macro.diff b/patches/source/glibc/glibc.getcwd.max.macro.diff
new file mode 100644
index 000000000..e26e14d95
--- /dev/null
+++ b/patches/source/glibc/glibc.getcwd.max.macro.diff
@@ -0,0 +1,10 @@
+--- ./sysdeps/unix/sysv/linux/getcwd.c.orig 2006-04-02 12:58:28.000000000 -0500
++++ ./sysdeps/unix/sysv/linux/getcwd.c 2006-10-10 22:11:02.000000000 -0500
+@@ -28,6 +28,7 @@
+ #include <sysdep.h>
+ #include <sys/syscall.h>
+ #include <bp-checks.h>
++#include <sys/param.h>
+
+ #include <kernel-features.h>
+
diff --git a/patches/source/glibc/glibc.git-4a531bb0b3b582cb693de9f76d2d97d970f9a5d5.patch b/patches/source/glibc/glibc.git-4a531bb0b3b582cb693de9f76d2d97d970f9a5d5.patch
new file mode 100644
index 000000000..9b58674c7
--- /dev/null
+++ b/patches/source/glibc/glibc.git-4a531bb0b3b582cb693de9f76d2d97d970f9a5d5.patch
@@ -0,0 +1,1212 @@
+From 4a531bb0b3b582cb693de9f76d2d97d970f9a5d5 Mon Sep 17 00:00:00 2001
+From: H.J. Lu <hongjiu.lu@intel.com>
+Date: Fri, 24 Dec 2010 20:14:37 -0500
+Subject: [PATCH] Remove `.ctors' and `.dtors' output sections
+
+---
+ ChangeLog | 15 ++
+ config.h.in | 3 +
+ configure | 334 +++++++++++++++++---------------
+ configure.in | 2 +
+ elf/sofini.c | 2 +
+ elf/soinit.c | 2 +
+ sysdeps/i386/init-first.c | 2 +
+ sysdeps/mach/hurd/i386/init-first.c | 2 +-
+ sysdeps/mach/hurd/powerpc/init-first.c | 2 +-
+ sysdeps/sh/init-first.c | 2 +
+ sysdeps/unix/sysv/linux/init-first.c | 2 +-
+ 11 files changed, 209 insertions(+), 159 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index 958c76a..497de67 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,18 @@
++2010-12-15 H.J. Lu <hongjiu.lu@intel.com>
++
++ * config.h.in (NO_CTORS_DTORS_SECTIONS): Define.
++ * configure.in: Define NO_CTORS_DTORS_SECTIONS if linker
++ script has SORT_BY_INIT_PRIORITY.
++ * elf/sofini.c: Remove `.ctors' and `.dtors' sections if
++ NO_CTORS_DTORS_SECTIONS is defined.
++ * elf/soinit.c: Likewise.
++ * sysdeps/i386/init-first.c: Don't call __libc_global_ctors if
++ NO_CTORS_DTORS_SECTIONS is defined.
++ * sysdeps/mach/hurd/i386/init-first.c: Likewise.
++ * sysdeps/mach/hurd/powerpc/init-first.c: Likewise.
++ * sysdeps/sh/init-first.c: Likewise.
++ * sysdeps/unix/sysv/linux/init-first.c: Likewise.
++
+ 2010-12-24 Ulrich Drepper <drepper@gmail.com>
+
+ * stdio-common/vfprintf.c (vfprintf): If printf handlers are installed
+diff --git a/config.h.in b/config.h.in
+index 18bf01a..9e797eb 100644
+--- a/config.h.in
++++ b/config.h.in
+@@ -201,6 +201,9 @@
+ /* Define if multi-arch DSOs should be generated. */
+ #undef USE_MULTIARCH
+
++/* Define if `.ctors' and `.dtors' sections shouldn't be used. */
++#undef NO_CTORS_DTORS_SECTIONS
++
+ /*
+ */
+
+diff --git a/configure b/configure
+index eae35ba..823f15e 100755
+--- a/configure
++++ b/configure
+@@ -1,14 +1,14 @@
+ #! /bin/sh
+ # From configure.in CVSid.
+ # Guess values for system-dependent variables and create Makefiles.
+-# Generated by GNU Autoconf 2.65 for GNU C Library (see version.h).
++# Generated by GNU Autoconf 2.66 for GNU C Library (see version.h).
+ #
+ # Report bugs to <glibc>.
+ #
+ #
+ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+-# Inc.
++# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
++# Foundation, Inc.
+ #
+ #
+ # This configure script is free software; the Free Software Foundation
+@@ -319,7 +319,7 @@ $as_echo X"$as_dir" |
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
++ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+ } # as_fn_mkdir_p
+@@ -359,19 +359,19 @@ else
+ fi # as_fn_arith
+
+
+-# as_fn_error ERROR [LINENO LOG_FD]
+-# ---------------------------------
++# as_fn_error STATUS ERROR [LINENO LOG_FD]
++# ----------------------------------------
+ # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+ # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+-# script with status $?, using 1 if that was 0.
++# script with STATUS, using 1 if that was 0.
+ as_fn_error ()
+ {
+- as_status=$?; test $as_status -eq 0 && as_status=1
+- if test "$3"; then
+- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
++ as_status=$1; test $as_status -eq 0 && as_status=1
++ if test "$4"; then
++ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+- $as_echo "$as_me: error: $1" >&2
++ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+ } # as_fn_error
+
+@@ -533,7 +533,7 @@ test -n "$DJDIR" || exec 7<&0 </dev/null
+ exec 6>&1
+
+ # Name of the host.
+-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
++# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+ # so uname gets run too.
+ ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+@@ -907,7 +907,7 @@ do
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+- as_fn_error "invalid feature name: $ac_useropt"
++ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+@@ -933,7 +933,7 @@ do
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+- as_fn_error "invalid feature name: $ac_useropt"
++ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+@@ -1137,7 +1137,7 @@ do
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+- as_fn_error "invalid package name: $ac_useropt"
++ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+@@ -1153,7 +1153,7 @@ do
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+- as_fn_error "invalid package name: $ac_useropt"
++ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+@@ -1183,8 +1183,8 @@ do
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+- -*) as_fn_error "unrecognized option: \`$ac_option'
+-Try \`$0 --help' for more information."
++ -*) as_fn_error $? "unrecognized option: \`$ac_option'
++Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+@@ -1192,7 +1192,7 @@ Try \`$0 --help' for more information."
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+- as_fn_error "invalid variable name: \`$ac_envvar'" ;;
++ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+@@ -1210,13 +1210,13 @@ done
+
+ if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+- as_fn_error "missing argument to $ac_option"
++ as_fn_error $? "missing argument to $ac_option"
+ fi
+
+ if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+- fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
++ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+ fi
+@@ -1239,7 +1239,7 @@ do
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+- as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
++ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+ done
+
+ # There might be people who depend on the old broken behavior: `$host'
+@@ -1253,8 +1253,8 @@ target=$target_alias
+ if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+- $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+- If a cross compiler is detected then cross compile mode will be used." >&2
++ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
++ If a cross compiler is detected then cross compile mode will be used" >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+@@ -1269,9 +1269,9 @@ test "$silent" = yes && exec 6>/dev/null
+ ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ ac_ls_di=`ls -di .` &&
+ ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+- as_fn_error "working directory cannot be determined"
++ as_fn_error $? "working directory cannot be determined"
+ test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+- as_fn_error "pwd does not report name of working directory"
++ as_fn_error $? "pwd does not report name of working directory"
+
+
+ # Find the source files, if location was not specified.
+@@ -1310,11 +1310,11 @@ else
+ fi
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+- as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
++ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+ fi
+ ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ ac_abs_confdir=`(
+- cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
++ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+ # When building in place, set srcdir=.
+ if test "$ac_abs_confdir" = "$ac_pwd"; then
+@@ -1354,7 +1354,7 @@ Configuration:
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+- -q, --quiet, --silent do not print \`checking...' messages
++ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+@@ -1544,9 +1544,9 @@ test -n "$ac_init_help" && exit $ac_status
+ if $ac_init_version; then
+ cat <<\_ACEOF
+ GNU C Library configure (see version.h)
+-generated by GNU Autoconf 2.65
++generated by GNU Autoconf 2.66
+
+-Copyright (C) 2009 Free Software Foundation, Inc.
++Copyright (C) 2010 Free Software Foundation, Inc.
+ This configure script is free software; the Free Software Foundation
+ gives unlimited permission to copy, distribute and modify it.
+ _ACEOF
+@@ -1945,7 +1945,7 @@ ac_fn_c_check_header_compile ()
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+ $as_echo_n "checking for $2... " >&6; }
+-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+@@ -1971,7 +1971,7 @@ This file contains any messages produced by compilers while
+ running configure, to aid debugging if configure makes a mistake.
+
+ It was created by GNU C Library $as_me (see version.h), which was
+-generated by GNU Autoconf 2.65. Invocation command line was
++generated by GNU Autoconf 2.66. Invocation command line was
+
+ $ $0 $@
+
+@@ -2081,11 +2081,9 @@ trap 'exit_status=$?
+ {
+ echo
+
+- cat <<\_ASBOX
+-## ---------------- ##
++ $as_echo "## ---------------- ##
+ ## Cache variables. ##
+-## ---------------- ##
+-_ASBOX
++## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+ (
+@@ -2119,11 +2117,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ )
+ echo
+
+- cat <<\_ASBOX
+-## ----------------- ##
++ $as_echo "## ----------------- ##
+ ## Output variables. ##
+-## ----------------- ##
+-_ASBOX
++## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+@@ -2136,11 +2132,9 @@ _ASBOX
+ echo
+
+ if test -n "$ac_subst_files"; then
+- cat <<\_ASBOX
+-## ------------------- ##
++ $as_echo "## ------------------- ##
+ ## File substitutions. ##
+-## ------------------- ##
+-_ASBOX
++## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+@@ -2154,11 +2148,9 @@ _ASBOX
+ fi
+
+ if test -s confdefs.h; then
+- cat <<\_ASBOX
+-## ----------- ##
++ $as_echo "## ----------- ##
+ ## confdefs.h. ##
+-## ----------- ##
+-_ASBOX
++## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+@@ -2213,7 +2205,12 @@ _ACEOF
+ ac_site_file1=NONE
+ ac_site_file2=NONE
+ if test -n "$CONFIG_SITE"; then
+- ac_site_file1=$CONFIG_SITE
++ # We do not want a PATH search for config.site.
++ case $CONFIG_SITE in #((
++ -*) ac_site_file1=./$CONFIG_SITE;;
++ */*) ac_site_file1=$CONFIG_SITE;;
++ *) ac_site_file1=./$CONFIG_SITE;;
++ esac
+ elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+@@ -2228,7 +2225,11 @@ do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+ $as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+- . "$ac_site_file"
++ . "$ac_site_file" \
++ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error $? "failed to load site script $ac_site_file
++See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ done
+
+@@ -2304,7 +2305,7 @@ if $ac_cache_corrupted; then
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+ $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+- as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
++ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+ fi
+ ## -------------------- ##
+ ## Main body of script. ##
+@@ -2322,16 +2323,22 @@ ac_config_headers="$ac_config_headers config.h"
+
+ ac_aux_dir=
+ for ac_dir in scripts "$srcdir"/scripts; do
+- for ac_t in install-sh install.sh shtool; do
+- if test -f "$ac_dir/$ac_t"; then
+- ac_aux_dir=$ac_dir
+- ac_install_sh="$ac_aux_dir/$ac_t -c"
+- break 2
+- fi
+- done
++ if test -f "$ac_dir/install-sh"; then
++ ac_aux_dir=$ac_dir
++ ac_install_sh="$ac_aux_dir/install-sh -c"
++ break
++ elif test -f "$ac_dir/install.sh"; then
++ ac_aux_dir=$ac_dir
++ ac_install_sh="$ac_aux_dir/install.sh -c"
++ break
++ elif test -f "$ac_dir/shtool"; then
++ ac_aux_dir=$ac_dir
++ ac_install_sh="$ac_aux_dir/shtool install -c"
++ break
++ fi
+ done
+ if test -z "$ac_aux_dir"; then
+- as_fn_error "cannot find install-sh, install.sh, or shtool in scripts \"$srcdir\"/scripts" "$LINENO" 5
++ as_fn_error $? "cannot find install-sh, install.sh, or shtool in scripts \"$srcdir\"/scripts" "$LINENO" 5
+ fi
+
+ # These three variables are undocumented and unsupported,
+@@ -2351,7 +2358,7 @@ subdirs="$subdirs "
+
+ # Make sure we can run config.sub.
+ $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+- as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
++ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+ $as_echo_n "checking build system type... " >&6; }
+@@ -2362,16 +2369,16 @@ else
+ test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+ test "x$ac_build_alias" = x &&
+- as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
++ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+- as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
++ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+ $as_echo "$ac_cv_build" >&6; }
+ case $ac_cv_build in
+ *-*-*) ;;
+-*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
++*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+ esac
+ build=$ac_cv_build
+ ac_save_IFS=$IFS; IFS='-'
+@@ -2396,7 +2403,7 @@ else
+ ac_cv_host=$ac_cv_build
+ else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+- as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
++ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+ fi
+
+ fi
+@@ -2404,7 +2411,7 @@ fi
+ $as_echo "$ac_cv_host" >&6; }
+ case $ac_cv_host in
+ *-*-*) ;;
+-*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
++*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+ esac
+ host=$ac_cv_host
+ ac_save_IFS=$IFS; IFS='-'
+@@ -2721,8 +2728,8 @@ fi
+
+ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error "no acceptable C compiler found in \$PATH
+-See \`config.log' for more details." "$LINENO" 5; }
++as_fn_error $? "no acceptable C compiler found in \$PATH
++See \`config.log' for more details" "$LINENO" 5; }
+
+ # Provide some information about the compiler.
+ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+@@ -2792,8 +2799,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
+
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error "cannot compute suffix of object files: cannot compile
+-See \`config.log' for more details." "$LINENO" 5; }
++as_fn_error $? "cannot compute suffix of object files: cannot compile
++See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ rm -f conftest.$ac_cv_objext conftest.$ac_ext
+ fi
+@@ -3185,8 +3192,8 @@ if $ac_preproc_ok; then :
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error "C preprocessor \"$CPP\" fails sanity check
+-See \`config.log' for more details." "$LINENO" 5; }
++as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
++See \`config.log' for more details" "$LINENO" 5; }
+ fi
+
+ ac_ext=c
+@@ -3455,7 +3462,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ if test "`cd $srcdir; /bin/pwd`" = "`/bin/pwd`"; then
+- as_fn_error "you must configure in a separate build directory" "$LINENO" 5
++ as_fn_error $? "you must configure in a separate build directory" "$LINENO" 5
+ fi
+
+ # This will get text that should go into config.make.
+@@ -3767,7 +3774,7 @@ fi
+ if test x$nss_crypt = xyes; then
+ nss_includes=-I$(nss-config --includedir 2>/dev/null)
+ if test $? -ne 0; then
+- as_fn_error "cannot find include directory with nss-config" "$LINENO" 5
++ as_fn_error $? "cannot find include directory with nss-config" "$LINENO" 5
+ fi
+ old_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $nss_includes"
+@@ -3782,7 +3789,7 @@ _ACEOF
+ if ac_fn_c_try_compile "$LINENO"; then :
+ libc_cv_nss_crypt=yes
+ else
+- as_fn_error "
++ as_fn_error $? "
+ cannot find NSS headers with lowlevel hash function interfaces" "$LINENO" 5
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+@@ -3804,7 +3811,7 @@ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+ libc_cv_nss_crypt=yes
+ else
+- as_fn_error "
++ as_fn_error $? "
+ cannot link program using lowlevel NSS hash functions" "$LINENO" 5
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+@@ -3880,7 +3887,7 @@ submachine=
+ # Check whether --with-cpu was given.
+ if test "${with_cpu+set}" = set; then :
+ withval=$with_cpu; case "$withval" in
+- yes|'') as_fn_error "--with-cpu requires an argument" "$LINENO" 5 ;;
++ yes|'') as_fn_error $? "--with-cpu requires an argument" "$LINENO" 5 ;;
+ no) ;;
+ *) submachine="$withval" ;;
+ esac
+@@ -3913,14 +3920,14 @@ if test x"$add_ons" != x; then
+ # Some sanity checks
+ case "$f" in
+ crypt)
+- as_fn_error "
++ as_fn_error $? "
+ *** It seems that you're using an old \`crypt' add-on. crypt is now
+ *** part of glibc and using the old add-on will not work with this
+ *** release. Start again with fresh sources and without the old
+ *** \`crypt' add-on." "$LINENO" 5
+ ;;
+ localedata)
+- as_fn_error "
++ as_fn_error $? "
+ *** It seems that you're using an old \`localedata' add-on. localedata
+ *** is now part of glibc and using the old add-on will not work with
+ *** this release. Start again with fresh sources and without the old
+@@ -3947,7 +3954,7 @@ if test x"$add_ons" != x; then
+ if test -d "$libc_add_on"; then
+ libc_add_on="`pwd`/$libc_add_on"
+ else
+- as_fn_error "add-on directory \"$libc_add_on\" does not exist" "$LINENO" 5
++ as_fn_error $? "add-on directory \"$libc_add_on\" does not exist" "$LINENO" 5
+ fi
+ }
+ libc_add_on_srcdir=$srcdir/$libc_add_on
+@@ -3966,7 +3973,7 @@ $as_echo "$as_me: running configure fragment for add-on $libc_add_on" >&6;}
+ test -z "$libc_add_on" || {
+ configured_add_ons="$configured_add_ons $libc_add_on"
+ if test "x$libc_add_on_canonical" = xunknown; then
+- as_fn_error "fragment must set \$libc_add_on_canonical" "$LINENO" 5
++ as_fn_error $? "fragment must set \$libc_add_on_canonical" "$LINENO" 5
+ fi
+ for d in $libc_add_on_subdirs; do
+ case "$libc_add_on" in
+@@ -3991,13 +3998,13 @@ $d-srcdir = $subdir_srcdir"
+ done
+ for d in $libc_add_on_config_subdirs; do
+ case "$d" in
+- /*) as_fn_error "fragment uses absolute path in \$libc_add_on_config_subdirs" "$LINENO" 5 ;;
++ /*) as_fn_error $? "fragment uses absolute path in \$libc_add_on_config_subdirs" "$LINENO" 5 ;;
+ esac
+ if test ! -d "$libc_add_on_srcdir/$d"; then
+- as_fn_error "fragment wants to configure missing directory $d" "$LINENO" 5
++ as_fn_error $? "fragment wants to configure missing directory $d" "$LINENO" 5
+ fi
+ case "$libc_add_on" in
+- /*) as_fn_error "relative path required for add-on using \$libc_add_on_config_subdirs" "$LINENO" 5 ;;
++ /*) as_fn_error $? "relative path required for add-on using \$libc_add_on_config_subdirs" "$LINENO" 5 ;;
+ esac
+ subdirs="$subdirs $libc_add_on/$d"
+ done
+@@ -4174,7 +4181,7 @@ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_global_directive" >&5
+ $as_echo "$libc_cv_asm_global_directive" >&6; }
+ if test $libc_cv_asm_global_directive = UNKNOWN; then
+- as_fn_error "cannot determine asm global directive" "$LINENO" 5
++ as_fn_error $? "cannot determine asm global directive" "$LINENO" 5
+ else
+ cat >>confdefs.h <<_ACEOF
+ #define ASM_GLOBAL_DIRECTIVE ${libc_cv_asm_global_directive}
+@@ -4220,7 +4227,7 @@ fi
+
+ if test x"$libc_cv_asm_gnu_indirect_function" != xyes -a x"$libc_cv_asm_type_prefix" = xno; then
+ if test x"$multi_arch" = xyes; then
+- as_fn_error "--enable-multi-arch support requires assembler and linker support" "$LINENO" 5
++ as_fn_error $? "--enable-multi-arch support requires assembler and linker support" "$LINENO" 5
+ else
+ multi_arch=no
+ fi
+@@ -4359,13 +4366,13 @@ fi
+
+
+ if test -z "$os_used" && test "$os" != none; then
+- as_fn_error "Operating system $os is not supported." "$LINENO" 5
++ as_fn_error $? "Operating system $os is not supported." "$LINENO" 5
+ fi
+ if test -z "$machine_used" && test "$machine" != none; then
+- as_fn_error "The $machine is not supported." "$LINENO" 5
++ as_fn_error $? "The $machine is not supported." "$LINENO" 5
+ fi
+ if test -z "$submachine_used" && test -n "$submachine"; then
+- as_fn_error "The $submachine subspecies of $host_cpu is not supported." "$LINENO" 5
++ as_fn_error $? "The $submachine subspecies of $host_cpu is not supported." "$LINENO" 5
+ fi
+
+
+@@ -4492,7 +4499,7 @@ for add_on in $add_ons; do
+ case "$configured_add_ons " in
+ *" $add_on "*) ;;
+ *|'')
+- as_fn_error "add-on $add_on has no configure fragment or sysdeps tree" "$LINENO" 5
++ as_fn_error $? "add-on $add_on has no configure fragment or sysdeps tree" "$LINENO" 5
+ ;;
+ esac
+ continue
+@@ -4978,7 +4985,7 @@ fi
+
+
+ if test "$PWD_P" = no; then
+- as_fn_error "*** A pwd binary could not be found." "$LINENO" 5
++ as_fn_error $? "*** A pwd binary could not be found." "$LINENO" 5
+ fi
+
+ # These programs are version sensitive.
+@@ -5367,7 +5374,7 @@ if test "x$with_cvs" = xyes && test "x$AUTOCONF" = xno; then
+ aux_missing="$aux_missing autoconf"
+ fi
+
+-test -n "$critic_missing" && as_fn_error "
++test -n "$critic_missing" && as_fn_error $? "
+ *** These critical programs are missing or too old:$critic_missing
+ *** Check the INSTALL file for required versions." "$LINENO" 5
+
+@@ -5450,7 +5457,7 @@ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_library_path_setting" >&5
+ $as_echo "$ld_library_path_setting" >&6; }
+ if test "$ld_library_path_setting" != "ok"; then
+-as_fn_error "
++as_fn_error $? "
+ *** LD_LIBRARY_PATH shouldn't contain the current directory when
+ *** building glibc. Please change the environment variable
+ *** and run configure again." "$LINENO" 5
+@@ -6053,7 +6060,7 @@ EOF
+ test $ac_status = 0; }; }; then
+ libc_cv_asm_protected_directive=yes
+ else
+- as_fn_error "assembler support for symbol visibility is required" "$LINENO" 5
++ as_fn_error $? "assembler support for symbol visibility is required" "$LINENO" 5
+ fi
+ rm -f conftest*
+ fi
+@@ -6089,7 +6096,7 @@ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_visibility_attribute" >&5
+ $as_echo "$libc_cv_visibility_attribute" >&6; }
+ if test $libc_cv_visibility_attribute != yes; then
+- as_fn_error "compiler support for visibility attribute is required" "$LINENO" 5
++ as_fn_error $? "compiler support for visibility attribute is required" "$LINENO" 5
+ fi
+ fi
+
+@@ -6121,7 +6128,7 @@ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_broken_visibility_attribute" >&5
+ $as_echo "$libc_cv_broken_visibility_attribute" >&6; }
+ if test $libc_cv_broken_visibility_attribute = yes; then
+- as_fn_error "working compiler support for visibility attribute is required" "$LINENO" 5
++ as_fn_error $? "working compiler support for visibility attribute is required" "$LINENO" 5
+ fi
+ fi
+
+@@ -6156,7 +6163,7 @@ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_broken_alias_attribute" >&5
+ $as_echo "$libc_cv_broken_alias_attribute" >&6; }
+ if test $libc_cv_broken_alias_attribute = yes; then
+- as_fn_error "working alias attribute support required" "$LINENO" 5
++ as_fn_error $? "working alias attribute support required" "$LINENO" 5
+ fi
+
+ if test $libc_cv_visibility_attribute = yes; then
+@@ -6214,7 +6221,15 @@ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_initfini_array" >&5
+ $as_echo "$libc_cv_initfini_array" >&6; }
+ if test $libc_cv_initfini_array != yes; then
+- as_fn_error "Need linker with .init_array/.fini_array support." "$LINENO" 5
++ as_fn_error $? "Need linker with .init_array/.fini_array support." "$LINENO" 5
++ elif { ac_try='${CC-cc} -Wl,--verbose 2>&1|grep SORT_BY_INIT_PRIORITY 1>&5'
++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; }; then
++ $as_echo "#define NO_CTORS_DTORS_SECTIONS 1" >>confdefs.h
++
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libunwind-support in compiler" >&5
+@@ -6262,7 +6277,7 @@ EOF
+ then
+ libc_cv_z_nodelete=yes
+ else
+- as_fn_error "linker with -z nodelete support required" "$LINENO" 5
++ as_fn_error $? "linker with -z nodelete support required" "$LINENO" 5
+ fi
+ rm -f conftest*
+ fi
+@@ -6289,7 +6304,7 @@ EOF
+ then
+ libc_cv_z_nodlopen=yes
+ else
+- as_fn_error "linker with -z nodlopen support required" "$LINENO" 5
++ as_fn_error $? "linker with -z nodlopen support required" "$LINENO" 5
+ fi
+ rm -f conftest*
+ fi
+@@ -6316,7 +6331,7 @@ EOF
+ then
+ libc_cv_z_initfirst=yes
+ else
+- as_fn_error "linker with -z initfirst support required" "$LINENO" 5
++ as_fn_error $? "linker with -z initfirst support required" "$LINENO" 5
+ fi
+ rm -f conftest*
+ fi
+@@ -6352,7 +6367,7 @@ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_z_relro" >&5
+ $as_echo "$libc_cv_z_relro" >&6; }
+ if test "$libc_cv_z_relro" = no; then
+- as_fn_error "linker with -z relro support required" "$LINENO" 5
++ as_fn_error $? "linker with -z relro support required" "$LINENO" 5
+ fi
+ ;;
+ *) ;;
+@@ -7202,7 +7217,7 @@ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_submachine" >&5
+ $as_echo "$libc_cv_cc_submachine" >&6; }
+ if test "x$libc_cv_cc_submachine" = xno; then
+- as_fn_error "${CC-cc} does not support $submachine" "$LINENO" 5
++ as_fn_error $? "${CC-cc} does not support $submachine" "$LINENO" 5
+ fi
+ fi
+
+@@ -7322,7 +7337,7 @@ $as_echo "$have_selinux" >&6; }
+
+ if test x$with_selinux = xyes ; then
+ if test x$have_selinux = xno ; then
+- as_fn_error "SELinux explicitly required, but sufficiently recent SELinux library not found" "$LINENO" 5
++ as_fn_error $? "SELinux explicitly required, but sufficiently recent SELinux library not found" "$LINENO" 5
+ fi
+ fi
+ fi
+@@ -7486,7 +7501,7 @@ esac
+ done
+ IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+- as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
++ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+ else
+ ac_cv_path_GREP=$GREP
+@@ -7552,7 +7567,7 @@ esac
+ done
+ IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+- as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
++ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+ else
+ ac_cv_path_EGREP=$EGREP
+@@ -7684,8 +7699,7 @@ do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+ "
+-eval as_val=\$$as_ac_Header
+- if test "x$as_val" = x""yes; then :
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+@@ -7710,9 +7724,8 @@ else
+ if test "$ac_cv_type_long_double" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-{ as_fn_set_status 77
+-as_fn_error "cannot compute sizeof (long double)
+-See \`config.log' for more details." "$LINENO" 5; }; }
++as_fn_error 77 "cannot compute sizeof (long double)
++See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_long_double=0
+ fi
+@@ -7943,6 +7956,7 @@ DEFS=-DHAVE_CONFIG_H
+
+ ac_libobjs=
+ ac_ltlibobjs=
++U=
+ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+@@ -8104,19 +8118,19 @@ export LANGUAGE
+ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+-# as_fn_error ERROR [LINENO LOG_FD]
+-# ---------------------------------
++# as_fn_error STATUS ERROR [LINENO LOG_FD]
++# ----------------------------------------
+ # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+ # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+-# script with status $?, using 1 if that was 0.
++# script with STATUS, using 1 if that was 0.
+ as_fn_error ()
+ {
+- as_status=$?; test $as_status -eq 0 && as_status=1
+- if test "$3"; then
+- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
++ as_status=$1; test $as_status -eq 0 && as_status=1
++ if test "$4"; then
++ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+- $as_echo "$as_me: error: $1" >&2
++ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+ } # as_fn_error
+
+@@ -8312,7 +8326,7 @@ $as_echo X"$as_dir" |
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
++ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+ } # as_fn_mkdir_p
+@@ -8366,7 +8380,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ # values after options handling.
+ ac_log="
+ This file was extended by GNU C Library $as_me (see version.h), which was
+-generated by GNU Autoconf 2.65. Invocation command line was
++generated by GNU Autoconf 2.66. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+@@ -8434,10 +8448,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ ac_cs_version="\\
+ GNU C Library config.status (see version.h)
+-configured by $0, generated by GNU Autoconf 2.65,
++configured by $0, generated by GNU Autoconf 2.66,
+ with options \\"\$ac_cs_config\\"
+
+-Copyright (C) 2009 Free Software Foundation, Inc.
++Copyright (C) 2010 Free Software Foundation, Inc.
+ This config.status script is free software; the Free Software Foundation
+ gives unlimited permission to copy, distribute and modify it."
+
+@@ -8492,7 +8506,7 @@ do
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+- as_fn_error "ambiguous option: \`$1'
++ as_fn_error $? "ambiguous option: \`$1'
+ Try \`$0 --help' for more information.";;
+ --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+@@ -8501,7 +8515,7 @@ Try \`$0 --help' for more information.";;
+ ac_cs_silent=: ;;
+
+ # This is an error.
+- -*) as_fn_error "unrecognized option: \`$1'
++ -*) as_fn_error $? "unrecognized option: \`$1'
+ Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+@@ -8560,7 +8574,7 @@ do
+ "${config_makefile}") CONFIG_FILES="$CONFIG_FILES ${config_makefile}" ;;
+ "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+
+- *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
++ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+ done
+
+@@ -8598,7 +8612,7 @@ $debug ||
+ {
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
++} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+
+ # Set up the scripts for CONFIG_FILES section.
+ # No need to generate them if there are no CONFIG_FILES.
+@@ -8615,7 +8629,7 @@ if test "x$ac_cr" = x; then
+ fi
+ ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+ if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+- ac_cs_awk_cr='\r'
++ ac_cs_awk_cr='\\r'
+ else
+ ac_cs_awk_cr=$ac_cr
+ fi
+@@ -8629,18 +8643,18 @@ _ACEOF
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+ } >conf$$subs.sh ||
+- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
++ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
++ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ ac_delim='%!_!# '
+ for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
++ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
++ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+@@ -8729,20 +8743,28 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ else
+ cat
+ fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+- || as_fn_error "could not setup config files machinery" "$LINENO" 5
++ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+ _ACEOF
+
+-# VPATH may cause trouble with some makes, so we remove $(srcdir),
+-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
++# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
++# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+ # trailing colons and then remove the whole line if VPATH becomes empty
+ # (actually we leave an empty line to preserve line numbers).
+ if test "x$srcdir" = x.; then
+- ac_vpsub='/^[ ]*VPATH[ ]*=/{
+-s/:*\$(srcdir):*/:/
+-s/:*\${srcdir}:*/:/
+-s/:*@srcdir@:*/:/
+-s/^\([^=]*=[ ]*\):*/\1/
++ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
++h
++s///
++s/^/:/
++s/[ ]*$/:/
++s/:\$(srcdir):/:/g
++s/:\${srcdir}:/:/g
++s/:@srcdir@:/:/g
++s/^:*//
+ s/:*$//
++x
++s/\(=[ ]*\).*/\1/
++G
++s/\n//
+ s/^[^=]*=[ ]*$//
+ }'
+ fi
+@@ -8770,7 +8792,7 @@ for ac_last_try in false false :; do
+ if test -z "$ac_t"; then
+ break
+ elif $ac_last_try; then
+- as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
++ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+@@ -8855,7 +8877,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ _ACAWK
+ _ACEOF
+ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+- as_fn_error "could not setup config headers machinery" "$LINENO" 5
++ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+ fi # test -n "$CONFIG_HEADERS"
+
+
+@@ -8868,7 +8890,7 @@ do
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+- :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
++ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+@@ -8896,7 +8918,7 @@ do
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+- as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
++ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+@@ -8923,7 +8945,7 @@ $as_echo "$as_me: creating $ac_file" >&6;}
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$tmp/stdin" \
+- || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
++ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+@@ -9054,22 +9076,22 @@ s&@INSTALL@&$ac_INSTALL&;t t
+ $ac_datarootdir_hack
+ "
+ eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+- || as_fn_error "could not create $ac_file" "$LINENO" 5
++ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+-which seems to be undefined. Please make sure it is defined." >&5
++which seems to be undefined. Please make sure it is defined" >&5
+ $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+-which seems to be undefined. Please make sure it is defined." >&2;}
++which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$tmp/stdin"
+ case $ac_file in
+ -) cat "$tmp/out" && rm -f "$tmp/out";;
+ *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ esac \
+- || as_fn_error "could not create $ac_file" "$LINENO" 5
++ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+ :H)
+ #
+@@ -9080,19 +9102,19 @@ which seems to be undefined. Please make sure it is defined." >&2;}
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+ } >"$tmp/config.h" \
+- || as_fn_error "could not create $ac_file" "$LINENO" 5
++ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+ $as_echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+ mv "$tmp/config.h" "$ac_file" \
+- || as_fn_error "could not create $ac_file" "$LINENO" 5
++ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ fi
+ else
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+- || as_fn_error "could not create -" "$LINENO" 5
++ || as_fn_error $? "could not create -" "$LINENO" 5
+ fi
+ ;;
+
+@@ -9118,7 +9140,7 @@ _ACEOF
+ ac_clean_files=$ac_clean_files_save
+
+ test $ac_write_fail = 0 ||
+- as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
++ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+ # configure is writing to config.log, and then calls config.status.
+@@ -9139,7 +9161,7 @@ if test "$no_create" != yes; then
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+- $ac_cs_success || as_fn_exit $?
++ $ac_cs_success || as_fn_exit 1
+ fi
+
+ #
+@@ -9280,7 +9302,7 @@ $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cach
+ # The eval makes quoting arguments work.
+ eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
+ --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
+- as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
++ as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
+ fi
+
+ cd "$ac_popdir"
+diff --git a/configure.in b/configure.in
+index d8cd5f1..ad25b9b 100644
+--- a/configure.in
++++ b/configure.in
+@@ -1497,6 +1497,8 @@ EOF
+ rm -f conftest*])
+ if test $libc_cv_initfini_array != yes; then
+ AC_MSG_ERROR([Need linker with .init_array/.fini_array support.])
++ elif AC_TRY_COMMAND([${CC-cc} -Wl,--verbose 2>&1|grep SORT_BY_INIT_PRIORITY 1>&AS_MESSAGE_LOG_FD]); then
++ AC_DEFINE(NO_CTORS_DTORS_SECTIONS)
+ fi
+
+ AC_CACHE_CHECK(for libunwind-support in compiler,
+diff --git a/elf/sofini.c b/elf/sofini.c
+index 5e06f0c..13e74b7 100644
+--- a/elf/sofini.c
++++ b/elf/sofini.c
+@@ -1,12 +1,14 @@
+ /* Finalizer module for ELF shared C library. This provides terminating
+ null pointer words in the `.ctors' and `.dtors' sections. */
+
++#ifndef NO_CTORS_DTORS_SECTIONS
+ static void (*const __CTOR_END__[1]) (void)
+ __attribute__ ((used, section (".ctors")))
+ = { 0 };
+ static void (*const __DTOR_END__[1]) (void)
+ __attribute__ ((used, section (".dtors")))
+ = { 0 };
++#endif
+
+ /* Terminate the frame unwind info section with a 4byte 0 as a sentinel;
+ this would be the 'length' field in a real FDE. */
+diff --git a/elf/soinit.c b/elf/soinit.c
+index 6fecbb5..1db676a 100644
+--- a/elf/soinit.c
++++ b/elf/soinit.c
+@@ -3,6 +3,7 @@
+ the `.ctors' and `.dtors' sections so the lists are terminated, and
+ calling those lists of functions. */
+
++#ifndef NO_CTORS_DTORS_SECTIONS
+ #include <libc-internal.h>
+ #include <stdlib.h>
+
+@@ -40,3 +41,4 @@ __libc_fini (void)
+
+ void (*_fini_ptr) (void) __attribute__ ((section (".fini_array")))
+ = &__libc_fini;
++#endif
+diff --git a/sysdeps/i386/init-first.c b/sysdeps/i386/init-first.c
+index c6355a8..2af042f 100644
+--- a/sysdeps/i386/init-first.c
++++ b/sysdeps/i386/init-first.c
+@@ -59,7 +59,9 @@ _init (int argc, ...)
+ {
+ init (&argc);
+
++#ifndef NO_CTORS_DTORS_SECTIONS
+ __libc_global_ctors ();
++#endif
+ }
+ #endif
+
+diff --git a/sysdeps/mach/hurd/i386/init-first.c b/sysdeps/mach/hurd/i386/init-first.c
+index f9a7a58..60823bd 100644
+--- a/sysdeps/mach/hurd/i386/init-first.c
++++ b/sysdeps/mach/hurd/i386/init-first.c
+@@ -92,7 +92,7 @@ posixland_init (int argc, char **argv, char **envp)
+ __getopt_clean_environment (envp);
+ #endif
+
+-#ifdef SHARED
++#if defined SHARED && !defined NO_CTORS_DTORS_SECTIONS
+ __libc_global_ctors ();
+ #endif
+ }
+diff --git a/sysdeps/mach/hurd/powerpc/init-first.c b/sysdeps/mach/hurd/powerpc/init-first.c
+index 20fa1d4..21b5054 100644
+--- a/sysdeps/mach/hurd/powerpc/init-first.c
++++ b/sysdeps/mach/hurd/powerpc/init-first.c
+@@ -82,7 +82,7 @@ posixland_init (int argc, char **argv, char **envp)
+ __getopt_clean_environment (__environ);
+ #endif
+
+-#ifdef SHARED
++#if defined SHARED && !defined NO_CTORS_DTORS_SECTIONS
+ __libc_global_ctors ();
+ #endif
+ }
+diff --git a/sysdeps/sh/init-first.c b/sysdeps/sh/init-first.c
+index d816625..1f3a821 100644
+--- a/sysdeps/sh/init-first.c
++++ b/sysdeps/sh/init-first.c
+@@ -59,7 +59,9 @@ _init (int argc, ...)
+ {
+ init (&argc);
+
++#ifndef NO_CTORS_DTORS_SECTIONS
+ __libc_global_ctors ();
++#endif
+ }
+ #endif
+
+diff --git a/sysdeps/unix/sysv/linux/init-first.c b/sysdeps/unix/sysv/linux/init-first.c
+index 7b2333d..a60212f 100644
+--- a/sysdeps/unix/sysv/linux/init-first.c
++++ b/sysdeps/unix/sysv/linux/init-first.c
+@@ -93,7 +93,7 @@ _init (int argc, char **argv, char **envp)
+ __getopt_clean_environment (envp);
+ #endif
+
+-#ifdef SHARED
++#if defined SHARED && !defined NO_CTORS_DTORS_SECTIONS
+ __libc_global_ctors ();
+ #endif
+ }
+--
+1.7.3.4
+
diff --git a/patches/source/glibc/glibc.git-96611391ad8823ba58405325d78cefeae5cdf699-CVE-2010-3847b.patch b/patches/source/glibc/glibc.git-96611391ad8823ba58405325d78cefeae5cdf699-CVE-2010-3847b.patch
new file mode 100644
index 000000000..b33b5a0db
--- /dev/null
+++ b/patches/source/glibc/glibc.git-96611391ad8823ba58405325d78cefeae5cdf699-CVE-2010-3847b.patch
@@ -0,0 +1,27 @@
+From 96611391ad8823ba58405325d78cefeae5cdf699 Mon Sep 17 00:00:00 2001
+From: Andreas Schwab <schwab@redhat.com>
+Date: Thu, 9 Dec 2010 15:00:59 +0100
+Subject: [PATCH] Ignore origin of privileged program
+
+---
+ ChangeLog | 5 +++++
+ elf/dl-object.c | 3 +++
+ 2 files changed, 8 insertions(+), 0 deletions(-)
+
+diff --git a/elf/dl-object.c b/elf/dl-object.c
+index 5d15ce1..a34e902 100644
+--- a/elf/dl-object.c
++++ b/elf/dl-object.c
+@@ -220,6 +220,9 @@ _dl_new_object (char *realname, const char *libname, int type,
+ out:
+ new->l_origin = origin;
+ }
++ else if (INTUSE(__libc_enable_secure) && type == lt_executable)
++ /* The origin of a privileged program cannot be trusted. */
++ new->l_origin = (char *) -1;
+
+ return new;
+ }
+--
+1.7.3.4
+
diff --git a/patches/source/glibc/glibc.ldd.trace.through.dynamic.linker.diff b/patches/source/glibc/glibc.ldd.trace.through.dynamic.linker.diff
new file mode 100644
index 000000000..6b1f5c843
--- /dev/null
+++ b/patches/source/glibc/glibc.ldd.trace.through.dynamic.linker.diff
@@ -0,0 +1,49 @@
+2009-11-08 Aurelien Jarno <aurelien@aurel32.net>
+
+ * elf/ldd.bash.in: also handle error code 126 (ld.so non
+ executable). Always trace dynamic library dependencies through
+ the dynamic linker.
+
+--- a/elf/ldd.bash.in
++++ b/elf/ldd.bash.in
+@@ -153,8 +153,6 @@ for file do
+ echo "ldd: ${file}:" $"not regular file" >&2
+ result=1
+ elif test -r "$file"; then
+- test -x "$file" || echo 'ldd:' $"\
+-warning: you do not have execution permission for" "\`$file'" >&2
+ RTLD=
+ ret=1
+ for rtld in ${RTLDLIST}; do
+@@ -167,28 +165,16 @@ warning: you do not have execution permission for" "\`$file'" >&2
+ fi
+ done
+ case $ret in
+- 0)
+- # If the program exits with exit code 5, it means the process has been
+- # invoked with __libc_enable_secure. Fall back to running it through
+- # the dynamic linker.
+- try_trace "$file"
+- rc=$?
+- if [ $rc = 5 ]; then
+- try_trace "$RTLD" "$file"
+- rc=$?
+- fi
+- [ $rc = 0 ] || result=1
++ 0|2)
++ try_trace "$RTLD" "$file" || result=1
+ ;;
+- 1)
++ 1|126)
+ # This can be a non-ELF binary or no binary at all.
+ nonelf "$file" || {
+ echo $" not a dynamic executable"
+ result=1
+ }
+ ;;
+- 2)
+- try_trace "$RTLD" "$file" || result=1
+- ;;
+ *)
+ echo 'ldd:' ${RTLD} $"exited with unknown exit code" "($ret)" >&2
+ exit 1
diff --git a/patches/source/glibc/glibc.locale.no-archive.diff b/patches/source/glibc/glibc.locale.no-archive.diff
new file mode 100644
index 000000000..bf1a83b71
--- /dev/null
+++ b/patches/source/glibc/glibc.locale.no-archive.diff
@@ -0,0 +1,10 @@
+--- ./localedata/Makefile.orig 2003-11-20 15:31:38.000000000 -0800
++++ ./localedata/Makefile 2004-08-03 17:20:54.000000000 -0700
+@@ -222,6 +222,7 @@
+ echo -n '...'; \
+ input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \
+ $(LOCALEDEF) --alias-file=../intl/locale.alias \
++ --no-archive \
+ -i locales/$$input -c -f charmaps/$$charset \
+ $(addprefix --prefix=,$(install_root)) $$locale; \
+ echo ' done'; \
diff --git a/patches/source/glibc/glibc.make-3.82.diff b/patches/source/glibc/glibc.make-3.82.diff
new file mode 100644
index 000000000..56b0675b3
--- /dev/null
+++ b/patches/source/glibc/glibc.make-3.82.diff
@@ -0,0 +1,28 @@
+Submitted By: Matt Burgess <matthew_at_linuxfromscratch_dot_org>
+Date: 2010-07-26
+Initial Package Version: 2.11.2
+Upstream Status: Not submitted
+Origin: Denis Onischenko
+ (http://www.mail-archive.com/help-make@gnu.org/msg08847.html)
+Description: Fixes an incompatibility with Make-3.82.
+
+diff -Naur glibc-2.11.2.orig/manual/Makefile glibc-2.11.2/manual/Makefile
+--- glibc-2.11.2.orig/manual/Makefile 2010-05-19 20:38:20.000000000 +0000
++++ glibc-2.11.2/manual/Makefile 2010-07-26 06:51:27.049899308 +0000
+@@ -232,9 +232,13 @@
+ .PHONY: stubs
+ stubs: $(objpfx)stubs
+ endif
+-$(objpfx)stubs ../po/manual.pot $(objpfx)stamp%:
+- $(make-target-directory)
+- touch $@
++$(objpfx)stubs ../po/manual.pot:
++ $(make-target-directory)
++ touch $@
++
++$(objpfx)stamp%:
++ $(make-target-directory)
++ touch $@
+
+ # Make the target directory if it doesn't exist, using the `mkinstalldirs'
+ # script that does `mkdir -p' even if `mkdir' doesn't support that flag.
diff --git a/patches/source/glibc/glibc.nis-netgroups.diff b/patches/source/glibc/glibc.nis-netgroups.diff
new file mode 100644
index 000000000..2473e9766
--- /dev/null
+++ b/patches/source/glibc/glibc.nis-netgroups.diff
@@ -0,0 +1,12 @@
+--- ./nis/nss_nis/nis-netgrp.c.orig 2006-04-08 21:08:28.000000000 -0500
++++ ./nis/nss_nis/nis-netgrp.c 2006-10-10 20:49:11.000000000 -0500
+@@ -72,7 +72,8 @@
+ and the last byte is filled with NUL. So we can simply
+ use that buffer. */
+ assert (len >= 0);
+- assert (malloc_usable_size (netgrp->data) >= len + 1);
++ /* The next line break NIS netgroups on non-PAM systems, so we will comment it out */
++ /* assert (malloc_usable_size (netgrp->data) >= len + 1); */
+ assert (netgrp->data[len] == '\0');
+
+ netgrp->data_size = len;
diff --git a/patches/source/glibc/glibc.revert.to.fix.build.breakages.diff b/patches/source/glibc/glibc.revert.to.fix.build.breakages.diff
new file mode 100644
index 000000000..9c8e93b9b
--- /dev/null
+++ b/patches/source/glibc/glibc.revert.to.fix.build.breakages.diff
@@ -0,0 +1,13 @@
+--- ./sysdeps/unix/sysv/linux/bits/socket.h.orig 2008-07-27 03:25:30.000000000 -0500
++++ ./sysdeps/unix/sysv/linux/bits/socket.h 2009-02-24 17:38:52.000000000 -0600
+@@ -26,8 +26,9 @@
+ #endif
+
+ #define __need_size_t
++#define __need_NULL
+ #include <stddef.h>
+-
++#include <limits.h>
+ #include <sys/types.h>
+
+ /* Type for length arguments in socket calls. */
diff --git a/patches/source/glibc/glibc.ru_RU.CP1251.diff b/patches/source/glibc/glibc.ru_RU.CP1251.diff
new file mode 100644
index 000000000..376cf76a7
--- /dev/null
+++ b/patches/source/glibc/glibc.ru_RU.CP1251.diff
@@ -0,0 +1,10 @@
+--- ./localedata/SUPPORTED.orig 2005-07-17 20:50:35.000000000 -0500
++++ ./localedata/SUPPORTED 2006-08-22 01:33:09.000000000 -0500
+@@ -270,6 +270,7 @@
+ ro_RO/ISO-8859-2 \
+ ru_RU.KOI8-R/KOI8-R \
+ ru_RU.UTF-8/UTF-8 \
++ru_RU.CP1251/CP1251 \
+ ru_RU/ISO-8859-5 \
+ ru_UA.UTF-8/UTF-8 \
+ ru_UA/KOI8-U \
diff --git a/patches/source/glibc/is_IS.diff b/patches/source/glibc/is_IS.diff
new file mode 100644
index 000000000..52a99696c
--- /dev/null
+++ b/patches/source/glibc/is_IS.diff
@@ -0,0 +1,19 @@
+--- ./localedata/locales/is_IS.orig 2007-09-30 17:30:17.000000000 -0500
++++ ./localedata/locales/is_IS 2006-07-30 17:19:43.000000000 -0500
+@@ -947,6 +947,7 @@
+ <UE00D> IGNORE;IGNORE;IGNORE;<UE00D>
+ <UE00E> IGNORE;IGNORE;IGNORE;<UE00E>
+ <UE00F> IGNORE;IGNORE;IGNORE;<UE00F>
++<"=> IGNORE;IGNORE;IGNORE;<"=>
+ <UE011> IGNORE;IGNORE;IGNORE;<UE011>
+ <UE012> IGNORE;IGNORE;IGNORE;<UE012>
+ <UE013> IGNORE;IGNORE;IGNORE;<UE013>
+@@ -955,6 +956,8 @@
+ <UE017> IGNORE;IGNORE;IGNORE;<UE017>
+ <UE018> IGNORE;IGNORE;IGNORE;<UE018>
+ <UE019> IGNORE;IGNORE;IGNORE;<UE019>
++<Mc> IGNORE;IGNORE;IGNORE;<Mc>
++<Fl> IGNORE;IGNORE;IGNORE;<Fl>
+ UNDEFINED IGNORE;IGNORE;IGNORE
+
+ <U0030> <U0030>;<U0030>;IGNORE;IGNORE
diff --git a/patches/source/glibc/profile.d/glibc.csh.new b/patches/source/glibc/profile.d/glibc.csh.new
new file mode 100755
index 000000000..1f33e9663
--- /dev/null
+++ b/patches/source/glibc/profile.d/glibc.csh.new
@@ -0,0 +1,9 @@
+#!/bin/csh
+# Set more relaxed (glibc-2.3.5 like) malloc() checking.
+#
+# This relaxes the default paranoia level so that it reports
+# bugs, but does not kill the questionable process. You can
+# get away with running broken programs with this setting,
+# but at a possible performance and security cost.
+#
+#setenv MALLOC_CHECK_ 1
diff --git a/patches/source/glibc/profile.d/glibc.sh.new b/patches/source/glibc/profile.d/glibc.sh.new
new file mode 100755
index 000000000..979f4879e
--- /dev/null
+++ b/patches/source/glibc/profile.d/glibc.sh.new
@@ -0,0 +1,8 @@
+#!/bin/sh
+# Set more relaxed (glibc-2.3.5 like) malloc() checking.
+#
+# This relaxes the default paranoia level so that it reports
+# bugs, but does not kill the questionable process. You can
+# get away with running broken programs with this setting,
+# but at a possible performance and security cost.
+#export MALLOC_CHECK_=1
diff --git a/patches/source/glibc/slack-desc.glibc b/patches/source/glibc/slack-desc.glibc
new file mode 100644
index 000000000..c9c35c2da
--- /dev/null
+++ b/patches/source/glibc/slack-desc.glibc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+glibc: glibc (GNU C libraries)
+glibc:
+glibc: This package contains the GNU C libraries and header files. The GNU
+glibc: C library was written originally by Roland McGrath, and is currently
+glibc: maintained by Ulrich Drepper. Some parts of the library were
+glibc: contributed or worked on by other people.
+glibc:
+glibc: You'll need this package to compile programs.
+glibc:
+glibc:
+glibc:
diff --git a/patches/source/glibc/slack-desc.glibc-debug b/patches/source/glibc/slack-desc.glibc-debug
new file mode 100644
index 000000000..79398d0b6
--- /dev/null
+++ b/patches/source/glibc/slack-desc.glibc-debug
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+glibc-debug: glibc-debug (GNU C libraries with debugging symbols)
+glibc-debug:
+glibc-debug: This package contains versions of the GNU C libraries with debugging
+glibc-debug: information. These are needed only if you wish to be able to step
+glibc-debug: through C library routines while debugging programs. Most debugging
+glibc-debug: efforts will not require these.
+glibc-debug: To use these libraries, set LD_LIBRARY_PATH when calling the debugger:
+glibc-debug: LD_LIBRARY_PATH=/usr/lib/debug gdb <executable>
+glibc-debug:
+glibc-debug: Or, use this approach if you need to debug a setuid binary:
+glibc-debug: su user -c "LD_LIBRARY_PATH=/usr/lib/debug gdb <executable>"
diff --git a/patches/source/glibc/slack-desc.glibc-i18n b/patches/source/glibc/slack-desc.glibc-i18n
new file mode 100644
index 000000000..71f5336c0
--- /dev/null
+++ b/patches/source/glibc/slack-desc.glibc-i18n
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+glibc-i18n: glibc-i18n (locale files from glibc)
+glibc-i18n:
+glibc-i18n: These files go in /usr/lib/locale and /usr/share/i18n/ to provide
+glibc-i18n: internationalization support. You'll need this package unless you
+glibc-i18n: will be using US English only.
+glibc-i18n:
+glibc-i18n:
+glibc-i18n:
+glibc-i18n:
+glibc-i18n:
+glibc-i18n:
diff --git a/patches/source/glibc/slack-desc.glibc-profile b/patches/source/glibc/slack-desc.glibc-profile
new file mode 100644
index 000000000..8c873fd92
--- /dev/null
+++ b/patches/source/glibc/slack-desc.glibc-profile
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+glibc-profile: glibc-profile (GNU C libraries with profiling support)
+glibc-profile:
+glibc-profile: This package contains static versions of the GNU C libraries with
+glibc-profile: support for profiling binaries using gprof. gprof calculates how
+glibc-profile: much time a program spends in each routine which can suggest where
+glibc-profile: to concentrate efforts to improve performance.
+glibc-profile:
+glibc-profile: See the gprof man page for more details.
+glibc-profile:
+glibc-profile:
+glibc-profile:
diff --git a/patches/source/glibc/slack-desc.glibc-solibs b/patches/source/glibc/slack-desc.glibc-solibs
new file mode 100644
index 000000000..807df645a
--- /dev/null
+++ b/patches/source/glibc/slack-desc.glibc-solibs
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+glibc-solibs: glibc-solibs (shared GNU C libraries)
+glibc-solibs:
+glibc-solibs: This package contains the shared libraries, binaries, and support
+glibc-solibs: files required to run most Linux applications linked with glibc.
+glibc-solibs:
+glibc-solibs:
+glibc-solibs:
+glibc-solibs:
+glibc-solibs:
+glibc-solibs:
+glibc-solibs:
diff --git a/patches/source/glibc/slack-desc.glibc-solibs-linuxthreads b/patches/source/glibc/slack-desc.glibc-solibs-linuxthreads
new file mode 100644
index 000000000..9efe3bf1d
--- /dev/null
+++ b/patches/source/glibc/slack-desc.glibc-solibs-linuxthreads
@@ -0,0 +1,18 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+glibc-solibs-linuxthreads: glibc-solibs-linuxthreads (LinuxThreads shared GNU C libraries)
+glibc-solibs-linuxthreads:
+glibc-solibs-linuxthreads: This package contains the shared libraries for glibc that uses
+glibc-solibs-linuxthreads: LinuxThreads, the threading implementation in Linux 2.4.x and
+glibc-solibs-linuxthreads: earlier kernels. In some cases you'll need to use these libraries
+glibc-solibs-linuxthreads: to run old binaries by setting these environment variables:
+glibc-solibs-linuxthreads: export LD_ASSUME_KERNEL=2.4.33
+glibc-solibs-linuxthreads: export LD_LIBRARY_PATH=/lib/obsolete/linuxthreads
+glibc-solibs-linuxthreads: old-program
+glibc-solibs-linuxthreads: Most users should have no need for this package. Recompile. :-)
diff --git a/patches/source/glibc/slack-desc.glibc-zoneinfo b/patches/source/glibc/slack-desc.glibc-zoneinfo
new file mode 100644
index 000000000..69420f78d
--- /dev/null
+++ b/patches/source/glibc/slack-desc.glibc-zoneinfo
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+glibc-zoneinfo: glibc-zoneinfo (timezone database)
+glibc-zoneinfo:
+glibc-zoneinfo: This package allows you to configure your time zone.
+glibc-zoneinfo:
+glibc-zoneinfo: This timezone database comes from the tzdata and tzcode packages by
+glibc-zoneinfo: Arthur David Olson et.al. The latest version and more information
+glibc-zoneinfo: may be found at: http://www.iana.org/time-zones
+glibc-zoneinfo:
+glibc-zoneinfo: Use the timeconfig utility to set your local time zone.
+glibc-zoneinfo:
+glibc-zoneinfo:
diff --git a/patches/source/glibc/slack-desc.glibc-zoneinfo.olson b/patches/source/glibc/slack-desc.glibc-zoneinfo.olson
new file mode 100644
index 000000000..24dfd0e9f
--- /dev/null
+++ b/patches/source/glibc/slack-desc.glibc-zoneinfo.olson
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+glibc-zoneinfo: glibc-zoneinfo (timezone database)
+glibc-zoneinfo:
+glibc-zoneinfo: This package allows you to configure your time zone.
+glibc-zoneinfo:
+glibc-zoneinfo: This timezone database comes from the tzdata and tzcode packages by
+glibc-zoneinfo: Arthur David Olson et.al. The latest version and more information
+glibc-zoneinfo: may be found at ftp://elsie.nci.nih.gov/pub/
+glibc-zoneinfo:
+glibc-zoneinfo: Use the timeconfig utility to set your local time zone.
+glibc-zoneinfo:
+glibc-zoneinfo:
diff --git a/patches/source/glibc/timezone-scripts/output-updated-timeconfig.sh b/patches/source/glibc/timezone-scripts/output-updated-timeconfig.sh
new file mode 100644
index 000000000..a04f1b67f
--- /dev/null
+++ b/patches/source/glibc/timezone-scripts/output-updated-timeconfig.sh
@@ -0,0 +1,53 @@
+#!/bin/sh
+# Copyright 2000, 2001, 2006, 2007, 2008, 2012 Patrick J. Volkerding, Sebeka, MN, USA.
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+if [ ! "$(basename "$1")" = "zoneinfo" -o ! -d "$1" ]; then
+ echo " Usage: output-updated-timeconfig.sh <zoneinfo directory>"
+ exit 1
+fi
+
+CWD=$(pwd)
+cat $CWD/parts/00
+# Sorry, I'd rather not be US-centric but some people here have a hard
+# time finding things. ;-)
+( cd $1
+ find . -type f | xargs file | grep "timezone data" | cut -f 1 -d : | cut -f 2- -d / | sort | grep "^US/" | while read zone ; do
+ echo "\"${zone}\" \" \" \\"
+ done
+)
+( cd $1
+ find . -type f | xargs file | grep "timezone data" | cut -f 1 -d : | cut -f 2- -d / | sort | grep -v "^US/" | while read zone ; do
+ echo "\"${zone}\" \" \" \\"
+ done
+)
+cat $CWD/parts/02
+( cd $1
+ find . -type f | xargs file | grep "timezone data" | cut -f 1 -d : | cut -f 2- -d / | sort | grep "^US/" | while read zone ; do
+ echo "${zone}"
+ done
+)
+( cd $1
+ find . -type f | xargs file | grep "timezone data" | cut -f 1 -d : | cut -f 2- -d / | sort | grep -v "^US/" | while read zone ; do
+ echo "${zone}"
+ done
+)
+cat $CWD/parts/04
diff --git a/patches/source/glibc/timezone-scripts/parts/00 b/patches/source/glibc/timezone-scripts/parts/00
new file mode 100644
index 000000000..a1601faaf
--- /dev/null
+++ b/patches/source/glibc/timezone-scripts/parts/00
@@ -0,0 +1,131 @@
+#!/bin/sh
+#
+# timeconfig Slackware Linux timezone configuration utility.
+#
+# Author: Patrick Volkerding <volkerdi@slackware.com>
+# Modified by: David Cantrell <david@slackware.com>, 06-Oct-2000
+#
+# ChangeLog:
+# 2014-10-22: Updated timezones from tzdata2014i. <pjv>
+# 2012-12-12: Updated timezones from tzdata2012j. <pjv>
+# 2008-03-10: Updated timezones from tzdata2008a. <pjv>
+# 2007-12-21: Updated timezones from tzdata2007j. <pjv>
+# 2006-12-03: Updated timezones from tzdata2006p. <pjv>
+# 2006-09-14: Updated timezones from tzdata2006k. <pjv>
+# 2006-08-22: Updated timezones from tzdata2006j.
+# 2006-08-13: Updated timezones from tzdata2006g.
+# 2006-03-13: Updated timezones from tzdata2006c.
+# 19-Feb-2001 Add new timezones from glibc-2.2.2.
+# 06-Oct-2000 Fixed a problem with selecting UTC time. It was writing
+# the hardwareclock file to the root disk and not your dest
+# partition. Changed the HWCLOCK_CONF variable to be
+# $T_PX/etc/hardwareclock to fix this. Thanks to David L.
+# Dickman <softbear@optonline.net> for finding this and
+# submitting a patch.
+#
+# 15-Mar-2000 Added the writeconf function to write out the
+# /etc/hardwareclock file which tells what the hardware clock
+# is set to (UTC or localtime).
+#
+# 03-Mar-2000 Reorganized script. Made one timezone set block, added
+# stage that asks the user if the hardware clock is set to
+# UTC.
+
+# setup our temp locations and variables
+TMP=/var/log/setup/tmp
+if [ -r $TMP/SeTT_PX ]; then
+ T_PX="`cat $TMP/SeTT_PX`"
+elif [ ! "$!" = "" ]; then
+ T_PX=$1
+else
+ T_PX=/
+fi
+
+# the hardware clock configuration file
+HWCLOCK_CONF=$T_PX/etc/hardwareclock
+
+# setzone( $TIMEZONE )
+#
+# This function accepts a time zone as the only parameter and sets it as
+# the default system time zone.
+setzone()
+{
+ TZ=$1
+
+ cd $T_PX/etc
+ if [ -r $T_PX/usr/share/zoneinfo/$TZ -o \
+ -r /var/log/mount/usr/share/zoneinfo/$TZ -o \
+ -L $T_PX/usr/share/zoneinfo/$TZ -o \
+ -L /var/log/mount/usr/share/zoneinfo/$TZ ]; then
+ ln -sf /usr/share/zoneinfo/$TZ localtime-copied-from
+ rm -f localtime
+ cd ..
+ chroot . cp etc/localtime-copied-from etc/localtime
+ fi
+}
+
+# writeconf( $CLOCK_SET_TO )
+#
+# Writes out $HWCLOCK_CONF that tells rc.S how the hardware clock
+# value is stored.
+writeconf()
+{
+ echo "# /etc/hardwareclock" > $HWCLOCK_CONF
+ echo "#" >> $HWCLOCK_CONF
+ echo "# Tells how the hardware clock time is stored." >> $HWCLOCK_CONF
+ echo "# You should run timeconfig to edit this file." >> $HWCLOCK_CONF
+ echo >> $HWCLOCK_CONF
+ echo $1 >> $HWCLOCK_CONF
+}
+
+# ask the user if the hardware clock is set for UTC/GMT
+if [ "$COLOR" = "on" -o -r $TMP/SeTcolor -o "$T_PX" = "/" ]; then
+ ###
+ ### use color menus here
+ ###
+ dialog --title "HARDWARE CLOCK SET TO UTC?" --menu "Is the hardware clock set \
+to Coordinated Universal Time (UTC/GMT)? If it is, select YES here. If the \
+hardware clock is set to the current local time (this is how most PCs are set \
+up), then say NO here. If you are not sure what this is, you should answer NO \
+here." 13 60 2 \
+ "NO" "Hardware clock is set to local time" \
+ "YES" "Hardware clock is set to UTC" \
+ 2> $TMP/utc
+ if [ $? = 1 -o $? = 255 ]; then
+ rm -f $TMP/utc
+ exit
+ fi
+ if [ "`cat $TMP/utc`" = "YES" ]; then
+ # yes, the hardware clock is UTC
+ writeconf "UTC"
+ else # must be NO
+ writeconf "localtime"
+ fi
+ rm -f $TMP/utc
+else
+ ###
+ ### use text prompts
+ ###
+ echo "Is the hardware clock set to Coordinated Universal Time (UTC/GMT)?"
+ echo "If it is, select 'y' here. If the hardware clock is set to the"
+ echo "current local time (this is how most PCs are set up), then say 'n'"
+ echo "here. If you are not sure what this is, you should answer 'n' here."
+ echo
+ echo -n "Is your hardware clock set to UTC ([y]es, [n]o)? "
+ read HEJAZ
+
+ if [ "$HEJAZ" = "y" -o "$HEJAZ" = "Y" -o "$HEJAZ" = "YES" -o "$HEJAZ" = "yes" ]; then
+ # yes, the hardware clock is UTC
+ writeconf "UTC"
+ else
+ # default to localtime
+ writeconf "localtime"
+ fi
+fi
+
+# Now set the correct timezone link:
+if [ "$COLOR" = "on" -o -r $TMP/SeTcolor -o "$T_PX" = "/" ]; then
+ ###
+ ### use color menus here
+ ###
+ dialog --title "TIMEZONE CONFIGURATION" --menu "Please select one of the following timezones for your machine:" 21 50 13 \
diff --git a/patches/source/glibc/timezone-scripts/parts/01 b/patches/source/glibc/timezone-scripts/parts/01
new file mode 100644
index 000000000..7fc8fb1d4
--- /dev/null
+++ b/patches/source/glibc/timezone-scripts/parts/01
@@ -0,0 +1,1658 @@
+"US/Alaska" " " \
+"US/Aleutian" " " \
+"US/Arizona" " " \
+"US/Central" " " \
+"US/East-Indiana" " " \
+"US/Eastern" " " \
+"US/Hawaii" " " \
+"US/Indiana-Starke" " " \
+"US/Michigan" " " \
+"US/Mountain" " " \
+"US/Pacific" " " \
+"US/Pacific-New" " " \
+"US/Samoa" " " \
+"Africa/Abidjan" " " \
+"Africa/Accra" " " \
+"Africa/Addis_Ababa" " " \
+"Africa/Algiers" " " \
+"Africa/Asmera" " " \
+"Africa/Bamako" " " \
+"Africa/Bangui" " " \
+"Africa/Banjul" " " \
+"Africa/Bissau" " " \
+"Africa/Blantyre" " " \
+"Africa/Brazzaville" " " \
+"Africa/Bujumbura" " " \
+"Africa/Cairo" " " \
+"Africa/Casablanca" " " \
+"Africa/Ceuta" " " \
+"Africa/Conakry" " " \
+"Africa/Dakar" " " \
+"Africa/Dar_es_Salaam" " " \
+"Africa/Djibouti" " " \
+"Africa/Douala" " " \
+"Africa/El_Aaiun" " " \
+"Africa/Freetown" " " \
+"Africa/Gaborone" " " \
+"Africa/Harare" " " \
+"Africa/Johannesburg" " " \
+"Africa/Kampala" " " \
+"Africa/Khartoum" " " \
+"Africa/Kigali" " " \
+"Africa/Kinshasa" " " \
+"Africa/Lagos" " " \
+"Africa/Libreville" " " \
+"Africa/Lome" " " \
+"Africa/Luanda" " " \
+"Africa/Lubumbashi" " " \
+"Africa/Lusaka" " " \
+"Africa/Malabo" " " \
+"Africa/Maputo" " " \
+"Africa/Maseru" " " \
+"Africa/Mbabane" " " \
+"Africa/Mogadishu" " " \
+"Africa/Monrovia" " " \
+"Africa/Nairobi" " " \
+"Africa/Ndjamena" " " \
+"Africa/Niamey" " " \
+"Africa/Nouakchott" " " \
+"Africa/Ouagadougou" " " \
+"Africa/Porto-Novo" " " \
+"Africa/Sao_Tome" " " \
+"Africa/Timbuktu" " " \
+"Africa/Tripoli" " " \
+"Africa/Tunis" " " \
+"Africa/Windhoek" " " \
+"America/Adak" " " \
+"America/Anchorage" " " \
+"America/Anguilla" " " \
+"America/Antigua" " " \
+"America/Araguaina" " " \
+"America/Argentina/Buenos_Aires" " " \
+"America/Argentina/Catamarca" " " \
+"America/Argentina/ComodRivadavia" " " \
+"America/Argentina/Cordoba" " " \
+"America/Argentina/Jujuy" " " \
+"America/Argentina/La_Rioja" " " \
+"America/Argentina/Mendoza" " " \
+"America/Argentina/Rio_Gallegos" " " \
+"America/Argentina/San_Juan" " " \
+"America/Argentina/Tucuman" " " \
+"America/Argentina/Ushuaia" " " \
+"America/Aruba" " " \
+"America/Asuncion" " " \
+"America/Atikokan" " " \
+"America/Atka" " " \
+"America/Bahia" " " \
+"America/Barbados" " " \
+"America/Belem" " " \
+"America/Belize" " " \
+"America/Blanc-Sablon" " " \
+"America/Boa_Vista" " " \
+"America/Bogota" " " \
+"America/Boise" " " \
+"America/Buenos_Aires" " " \
+"America/Cambridge_Bay" " " \
+"America/Campo_Grande" " " \
+"America/Cancun" " " \
+"America/Caracas" " " \
+"America/Catamarca" " " \
+"America/Cayenne" " " \
+"America/Cayman" " " \
+"America/Chicago" " " \
+"America/Chihuahua" " " \
+"America/Coral_Harbour" " " \
+"America/Cordoba" " " \
+"America/Costa_Rica" " " \
+"America/Cuiaba" " " \
+"America/Curacao" " " \
+"America/Danmarkshavn" " " \
+"America/Dawson" " " \
+"America/Dawson_Creek" " " \
+"America/Denver" " " \
+"America/Detroit" " " \
+"America/Dominica" " " \
+"America/Edmonton" " " \
+"America/Eirunepe" " " \
+"America/El_Salvador" " " \
+"America/Ensenada" " " \
+"America/Fort_Wayne" " " \
+"America/Fortaleza" " " \
+"America/Glace_Bay" " " \
+"America/Godthab" " " \
+"America/Goose_Bay" " " \
+"America/Grand_Turk" " " \
+"America/Grenada" " " \
+"America/Guadeloupe" " " \
+"America/Guatemala" " " \
+"America/Guayaquil" " " \
+"America/Guyana" " " \
+"America/Halifax" " " \
+"America/Havana" " " \
+"America/Hermosillo" " " \
+"America/Indiana/Indianapolis" " " \
+"America/Indiana/Knox" " " \
+"America/Indiana/Marengo" " " \
+"America/Indiana/Petersburg" " " \
+"America/Indiana/Tell_City" " " \
+"America/Indiana/Vevay" " " \
+"America/Indiana/Vincennes" " " \
+"America/Indianapolis" " " \
+"America/Inuvik" " " \
+"America/Iqaluit" " " \
+"America/Jamaica" " " \
+"America/Jujuy" " " \
+"America/Juneau" " " \
+"America/Kentucky/Louisville" " " \
+"America/Kentucky/Monticello" " " \
+"America/Knox_IN" " " \
+"America/La_Paz" " " \
+"America/Lima" " " \
+"America/Los_Angeles" " " \
+"America/Louisville" " " \
+"America/Maceio" " " \
+"America/Managua" " " \
+"America/Manaus" " " \
+"America/Martinique" " " \
+"America/Mazatlan" " " \
+"America/Mendoza" " " \
+"America/Menominee" " " \
+"America/Merida" " " \
+"America/Mexico_City" " " \
+"America/Miquelon" " " \
+"America/Moncton" " " \
+"America/Monterrey" " " \
+"America/Montevideo" " " \
+"America/Montreal" " " \
+"America/Montserrat" " " \
+"America/Nassau" " " \
+"America/New_York" " " \
+"America/Nipigon" " " \
+"America/Nome" " " \
+"America/Noronha" " " \
+"America/North_Dakota/Center" " " \
+"America/North_Dakota/New_Salem" " " \
+"America/Panama" " " \
+"America/Pangnirtung" " " \
+"America/Paramaribo" " " \
+"America/Phoenix" " " \
+"America/Port-au-Prince" " " \
+"America/Port_of_Spain" " " \
+"America/Porto_Acre" " " \
+"America/Porto_Velho" " " \
+"America/Puerto_Rico" " " \
+"America/Rainy_River" " " \
+"America/Rankin_Inlet" " " \
+"America/Recife" " " \
+"America/Regina" " " \
+"America/Rio_Branco" " " \
+"America/Rosario" " " \
+"America/Santiago" " " \
+"America/Santo_Domingo" " " \
+"America/Sao_Paulo" " " \
+"America/Scoresbysund" " " \
+"America/Shiprock" " " \
+"America/St_Johns" " " \
+"America/St_Kitts" " " \
+"America/St_Lucia" " " \
+"America/St_Thomas" " " \
+"America/St_Vincent" " " \
+"America/Swift_Current" " " \
+"America/Tegucigalpa" " " \
+"America/Thule" " " \
+"America/Thunder_Bay" " " \
+"America/Tijuana" " " \
+"America/Toronto" " " \
+"America/Tortola" " " \
+"America/Vancouver" " " \
+"America/Virgin" " " \
+"America/Whitehorse" " " \
+"America/Winnipeg" " " \
+"America/Yakutat" " " \
+"America/Yellowknife" " " \
+"Antarctica/Casey" " " \
+"Antarctica/Davis" " " \
+"Antarctica/DumontDUrville" " " \
+"Antarctica/Mawson" " " \
+"Antarctica/McMurdo" " " \
+"Antarctica/Palmer" " " \
+"Antarctica/Rothera" " " \
+"Antarctica/South_Pole" " " \
+"Antarctica/Syowa" " " \
+"Antarctica/Troll" " " \
+"Antarctica/Vostok" " " \
+"Arctic/Longyearbyen" " " \
+"Asia/Aden" " " \
+"Asia/Almaty" " " \
+"Asia/Amman" " " \
+"Asia/Anadyr" " " \
+"Asia/Aqtau" " " \
+"Asia/Aqtobe" " " \
+"Asia/Ashgabat" " " \
+"Asia/Ashkhabad" " " \
+"Asia/Baghdad" " " \
+"Asia/Bahrain" " " \
+"Asia/Baku" " " \
+"Asia/Bangkok" " " \
+"Asia/Beirut" " " \
+"Asia/Bishkek" " " \
+"Asia/Brunei" " " \
+"Asia/Calcutta" " " \
+"Asia/Chita" " " \
+"Asia/Choibalsan" " " \
+"Asia/Chongqing" " " \
+"Asia/Chungking" " " \
+"Asia/Colombo" " " \
+"Asia/Dacca" " " \
+"Asia/Damascus" " " \
+"Asia/Dhaka" " " \
+"Asia/Dili" " " \
+"Asia/Dubai" " " \
+"Asia/Dushanbe" " " \
+"Asia/Gaza" " " \
+"Asia/Harbin" " " \
+"Asia/Hong_Kong" " " \
+"Asia/Hovd" " " \
+"Asia/Irkutsk" " " \
+"Asia/Istanbul" " " \
+"Asia/Jakarta" " " \
+"Asia/Jayapura" " " \
+"Asia/Jerusalem" " " \
+"Asia/Kabul" " " \
+"Asia/Kamchatka" " " \
+"Asia/Karachi" " " \
+"Asia/Kashgar" " " \
+"Asia/Katmandu" " " \
+"Asia/Khandyga" " " \
+"Asia/Khandyga" " " \
+"Asia/Krasnoyarsk" " " \
+"Asia/Kuala_Lumpur" " " \
+"Asia/Kuching" " " \
+"Asia/Kuwait" " " \
+"Asia/Macao" " " \
+"Asia/Macau" " " \
+"Asia/Magadan" " " \
+"Asia/Makassar" " " \
+"Asia/Manila" " " \
+"Asia/Muscat" " " \
+"Asia/Nicosia" " " \
+"Asia/Novosibirsk" " " \
+"Asia/Omsk" " " \
+"Asia/Oral" " " \
+"Asia/Phnom_Penh" " " \
+"Asia/Pontianak" " " \
+"Asia/Pyongyang" " " \
+"Asia/Qatar" " " \
+"Asia/Qyzylorda" " " \
+"Asia/Rangoon" " " \
+"Asia/Riyadh" " " \
+"Asia/Saigon" " " \
+"Asia/Sakhalin" " " \
+"Asia/Samarkand" " " \
+"Asia/Seoul" " " \
+"Asia/Shanghai" " " \
+"Asia/Singapore" " " \
+"Asia/Srednekolymsk" " " \
+"Asia/Taipei" " " \
+"Asia/Tashkent" " " \
+"Asia/Tbilisi" " " \
+"Asia/Tehran" " " \
+"Asia/Tel_Aviv" " " \
+"Asia/Thimbu" " " \
+"Asia/Thimphu" " " \
+"Asia/Tokyo" " " \
+"Asia/Ujung_Pandang" " " \
+"Asia/Ulaanbaatar" " " \
+"Asia/Ulan_Bator" " " \
+"Asia/Urumqi" " " \
+"Asia/Ust-Nera" " " \
+"Asia/Vientiane" " " \
+"Asia/Vladivostok" " " \
+"Asia/Yakutsk" " " \
+"Asia/Yekaterinburg" " " \
+"Asia/Yerevan" " " \
+"Atlantic/Azores" " " \
+"Atlantic/Bermuda" " " \
+"Atlantic/Canary" " " \
+"Atlantic/Cape_Verde" " " \
+"Atlantic/Faeroe" " " \
+"Atlantic/Jan_Mayen" " " \
+"Atlantic/Madeira" " " \
+"Atlantic/Reykjavik" " " \
+"Atlantic/South_Georgia" " " \
+"Atlantic/St_Helena" " " \
+"Atlantic/Stanley" " " \
+"Australia/ACT" " " \
+"Australia/Adelaide" " " \
+"Australia/Brisbane" " " \
+"Australia/Broken_Hill" " " \
+"Australia/Canberra" " " \
+"Australia/Currie" " " \
+"Australia/Darwin" " " \
+"Australia/Hobart" " " \
+"Australia/LHI" " " \
+"Australia/Lindeman" " " \
+"Australia/Lord_Howe" " " \
+"Australia/Melbourne" " " \
+"Australia/NSW" " " \
+"Australia/North" " " \
+"Australia/Perth" " " \
+"Australia/Queensland" " " \
+"Australia/South" " " \
+"Australia/Sydney" " " \
+"Australia/Tasmania" " " \
+"Australia/Victoria" " " \
+"Australia/West" " " \
+"Australia/Yancowinna" " " \
+"Brazil/Acre" " " \
+"Brazil/DeNoronha" " " \
+"Brazil/East" " " \
+"Brazil/West" " " \
+"CET" " " \
+"CST6CDT" " " \
+"Canada/Atlantic" " " \
+"Canada/Central" " " \
+"Canada/East-Saskatchewan" " " \
+"Canada/Eastern" " " \
+"Canada/Mountain" " " \
+"Canada/Newfoundland" " " \
+"Canada/Pacific" " " \
+"Canada/Saskatchewan" " " \
+"Canada/Yukon" " " \
+"Chile/Continental" " " \
+"Chile/EasterIsland" " " \
+"Cuba" " " \
+"EET" " " \
+"EST" " " \
+"EST5EDT" " " \
+"Egypt" " " \
+"Eire" " " \
+"Etc/GMT" " " \
+"Etc/GMT+0" " " \
+"Etc/GMT+1" " " \
+"Etc/GMT+10" " " \
+"Etc/GMT+11" " " \
+"Etc/GMT+12" " " \
+"Etc/GMT+2" " " \
+"Etc/GMT+3" " " \
+"Etc/GMT+4" " " \
+"Etc/GMT+5" " " \
+"Etc/GMT+6" " " \
+"Etc/GMT+7" " " \
+"Etc/GMT+8" " " \
+"Etc/GMT+9" " " \
+"Etc/GMT-0" " " \
+"Etc/GMT-1" " " \
+"Etc/GMT-10" " " \
+"Etc/GMT-11" " " \
+"Etc/GMT-12" " " \
+"Etc/GMT-13" " " \
+"Etc/GMT-14" " " \
+"Etc/GMT-2" " " \
+"Etc/GMT-3" " " \
+"Etc/GMT-4" " " \
+"Etc/GMT-5" " " \
+"Etc/GMT-6" " " \
+"Etc/GMT-7" " " \
+"Etc/GMT-8" " " \
+"Etc/GMT-9" " " \
+"Etc/GMT0" " " \
+"Etc/Greenwich" " " \
+"Etc/UCT" " " \
+"Etc/UTC" " " \
+"Etc/Universal" " " \
+"Etc/Zulu" " " \
+"Europe/Amsterdam" " " \
+"Europe/Andorra" " " \
+"Europe/Athens" " " \
+"Europe/Belfast" " " \
+"Europe/Belgrade" " " \
+"Europe/Berlin" " " \
+"Europe/Bratislava" " " \
+"Europe/Brussels" " " \
+"Europe/Bucharest" " " \
+"Europe/Budapest" " " \
+"Europe/Busingen" " " \
+"Europe/Chisinau" " " \
+"Europe/Copenhagen" " " \
+"Europe/Dublin" " " \
+"Europe/Gibraltar" " " \
+"Europe/Guernsey" " " \
+"Europe/Helsinki" " " \
+"Europe/Isle_of_Man" " " \
+"Europe/Istanbul" " " \
+"Europe/Jersey" " " \
+"Europe/Kaliningrad" " " \
+"Europe/Kiev" " " \
+"Europe/Lisbon" " " \
+"Europe/Ljubljana" " " \
+"Europe/London" " " \
+"Europe/Luxembourg" " " \
+"Europe/Madrid" " " \
+"Europe/Malta" " " \
+"Europe/Mariehamn" " " \
+"Europe/Minsk" " " \
+"Europe/Monaco" " " \
+"Europe/Moscow" " " \
+"Europe/Nicosia" " " \
+"Europe/Oslo" " " \
+"Europe/Paris" " " \
+"Europe/Podgorica" " " \
+"Europe/Prague" " " \
+"Europe/Riga" " " \
+"Europe/Rome" " " \
+"Europe/Samara" " " \
+"Europe/San_Marino" " " \
+"Europe/Sarajevo" " " \
+"Europe/Simferopol" " " \
+"Europe/Skopje" " " \
+"Europe/Sofia" " " \
+"Europe/Stockholm" " " \
+"Europe/Tallinn" " " \
+"Europe/Tirane" " " \
+"Europe/Tiraspol" " " \
+"Europe/Uzhgorod" " " \
+"Europe/Vaduz" " " \
+"Europe/Vatican" " " \
+"Europe/Vienna" " " \
+"Europe/Vilnius" " " \
+"Europe/Volgograd" " " \
+"Europe/Warsaw" " " \
+"Europe/Zagreb" " " \
+"Europe/Zaporozhye" " " \
+"Europe/Zurich" " " \
+"Factory" " " \
+"GB" " " \
+"GB-Eire" " " \
+"GMT" " " \
+"GMT+0" " " \
+"GMT-0" " " \
+"GMT0" " " \
+"Greenwich" " " \
+"HST" " " \
+"Hongkong" " " \
+"Iceland" " " \
+"Indian/Antananarivo" " " \
+"Indian/Chagos" " " \
+"Indian/Christmas" " " \
+"Indian/Cocos" " " \
+"Indian/Comoro" " " \
+"Indian/Kerguelen" " " \
+"Indian/Mahe" " " \
+"Indian/Maldives" " " \
+"Indian/Mauritius" " " \
+"Indian/Mayotte" " " \
+"Indian/Reunion" " " \
+"Iran" " " \
+"Israel" " " \
+"Jamaica" " " \
+"Japan" " " \
+"Kwajalein" " " \
+"Libya" " " \
+"MET" " " \
+"MST" " " \
+"MST7MDT" " " \
+"Mexico/BajaNorte" " " \
+"Mexico/BajaSur" " " \
+"Mexico/General" " " \
+"NZ" " " \
+"NZ-CHAT" " " \
+"Navajo" " " \
+"PRC" " " \
+"PST8PDT" " " \
+"Pacific/Apia" " " \
+"Pacific/Auckland" " " \
+"Pacific/Bougainville" " " \
+"Pacific/Chatham" " " \
+"Pacific/Easter" " " \
+"Pacific/Efate" " " \
+"Pacific/Enderbury" " " \
+"Pacific/Fakaofo" " " \
+"Pacific/Fiji" " " \
+"Pacific/Funafuti" " " \
+"Pacific/Galapagos" " " \
+"Pacific/Gambier" " " \
+"Pacific/Guadalcanal" " " \
+"Pacific/Guam" " " \
+"Pacific/Honolulu" " " \
+"Pacific/Johnston" " " \
+"Pacific/Kiritimati" " " \
+"Pacific/Kosrae" " " \
+"Pacific/Kwajalein" " " \
+"Pacific/Majuro" " " \
+"Pacific/Marquesas" " " \
+"Pacific/Midway" " " \
+"Pacific/Nauru" " " \
+"Pacific/Niue" " " \
+"Pacific/Norfolk" " " \
+"Pacific/Noumea" " " \
+"Pacific/Pago_Pago" " " \
+"Pacific/Palau" " " \
+"Pacific/Pitcairn" " " \
+"Pacific/Ponape" " " \
+"Pacific/Port_Moresby" " " \
+"Pacific/Rarotonga" " " \
+"Pacific/Saipan" " " \
+"Pacific/Samoa" " " \
+"Pacific/Tahiti" " " \
+"Pacific/Tarawa" " " \
+"Pacific/Tongatapu" " " \
+"Pacific/Truk" " " \
+"Pacific/Wake" " " \
+"Pacific/Wallis" " " \
+"Pacific/Yap" " " \
+"Poland" " " \
+"Portugal" " " \
+"ROC" " " \
+"ROK" " " \
+"Singapore" " " \
+"Turkey" " " \
+"UCT" " " \
+"UTC" " " \
+"Universal" " " \
+"W-SU" " " \
+"WET" " " \
+"Zulu" " " \
+"posix/Africa/Abidjan" " " \
+"posix/Africa/Accra" " " \
+"posix/Africa/Addis_Ababa" " " \
+"posix/Africa/Algiers" " " \
+"posix/Africa/Asmera" " " \
+"posix/Africa/Bamako" " " \
+"posix/Africa/Bangui" " " \
+"posix/Africa/Banjul" " " \
+"posix/Africa/Bissau" " " \
+"posix/Africa/Blantyre" " " \
+"posix/Africa/Brazzaville" " " \
+"posix/Africa/Bujumbura" " " \
+"posix/Africa/Cairo" " " \
+"posix/Africa/Casablanca" " " \
+"posix/Africa/Ceuta" " " \
+"posix/Africa/Conakry" " " \
+"posix/Africa/Dakar" " " \
+"posix/Africa/Dar_es_Salaam" " " \
+"posix/Africa/Djibouti" " " \
+"posix/Africa/Douala" " " \
+"posix/Africa/El_Aaiun" " " \
+"posix/Africa/Freetown" " " \
+"posix/Africa/Gaborone" " " \
+"posix/Africa/Harare" " " \
+"posix/Africa/Johannesburg" " " \
+"posix/Africa/Kampala" " " \
+"posix/Africa/Khartoum" " " \
+"posix/Africa/Kigali" " " \
+"posix/Africa/Kinshasa" " " \
+"posix/Africa/Lagos" " " \
+"posix/Africa/Libreville" " " \
+"posix/Africa/Lome" " " \
+"posix/Africa/Luanda" " " \
+"posix/Africa/Lubumbashi" " " \
+"posix/Africa/Lusaka" " " \
+"posix/Africa/Malabo" " " \
+"posix/Africa/Maputo" " " \
+"posix/Africa/Maseru" " " \
+"posix/Africa/Mbabane" " " \
+"posix/Africa/Mogadishu" " " \
+"posix/Africa/Monrovia" " " \
+"posix/Africa/Nairobi" " " \
+"posix/Africa/Ndjamena" " " \
+"posix/Africa/Niamey" " " \
+"posix/Africa/Nouakchott" " " \
+"posix/Africa/Ouagadougou" " " \
+"posix/Africa/Porto-Novo" " " \
+"posix/Africa/Sao_Tome" " " \
+"posix/Africa/Timbuktu" " " \
+"posix/Africa/Tripoli" " " \
+"posix/Africa/Tunis" " " \
+"posix/Africa/Windhoek" " " \
+"posix/America/Adak" " " \
+"posix/America/Anchorage" " " \
+"posix/America/Anguilla" " " \
+"posix/America/Antigua" " " \
+"posix/America/Araguaina" " " \
+"posix/America/Argentina/Buenos_Aires" " " \
+"posix/America/Argentina/Catamarca" " " \
+"posix/America/Argentina/ComodRivadavia" " " \
+"posix/America/Argentina/Cordoba" " " \
+"posix/America/Argentina/Jujuy" " " \
+"posix/America/Argentina/La_Rioja" " " \
+"posix/America/Argentina/Mendoza" " " \
+"posix/America/Argentina/Rio_Gallegos" " " \
+"posix/America/Argentina/San_Juan" " " \
+"posix/America/Argentina/Tucuman" " " \
+"posix/America/Argentina/Ushuaia" " " \
+"posix/America/Aruba" " " \
+"posix/America/Asuncion" " " \
+"posix/America/Atikokan" " " \
+"posix/America/Atka" " " \
+"posix/America/Bahia" " " \
+"posix/America/Barbados" " " \
+"posix/America/Belem" " " \
+"posix/America/Belize" " " \
+"posix/America/Blanc-Sablon" " " \
+"posix/America/Boa_Vista" " " \
+"posix/America/Bogota" " " \
+"posix/America/Boise" " " \
+"posix/America/Buenos_Aires" " " \
+"posix/America/Cambridge_Bay" " " \
+"posix/America/Campo_Grande" " " \
+"posix/America/Cancun" " " \
+"posix/America/Caracas" " " \
+"posix/America/Catamarca" " " \
+"posix/America/Cayenne" " " \
+"posix/America/Cayman" " " \
+"posix/America/Chicago" " " \
+"posix/America/Chihuahua" " " \
+"posix/America/Coral_Harbour" " " \
+"posix/America/Cordoba" " " \
+"posix/America/Costa_Rica" " " \
+"posix/America/Cuiaba" " " \
+"posix/America/Curacao" " " \
+"posix/America/Danmarkshavn" " " \
+"posix/America/Dawson" " " \
+"posix/America/Dawson_Creek" " " \
+"posix/America/Denver" " " \
+"posix/America/Detroit" " " \
+"posix/America/Dominica" " " \
+"posix/America/Edmonton" " " \
+"posix/America/Eirunepe" " " \
+"posix/America/El_Salvador" " " \
+"posix/America/Ensenada" " " \
+"posix/America/Fort_Wayne" " " \
+"posix/America/Fortaleza" " " \
+"posix/America/Glace_Bay" " " \
+"posix/America/Godthab" " " \
+"posix/America/Goose_Bay" " " \
+"posix/America/Grand_Turk" " " \
+"posix/America/Grenada" " " \
+"posix/America/Guadeloupe" " " \
+"posix/America/Guatemala" " " \
+"posix/America/Guayaquil" " " \
+"posix/America/Guyana" " " \
+"posix/America/Halifax" " " \
+"posix/America/Havana" " " \
+"posix/America/Hermosillo" " " \
+"posix/America/Indiana/Indianapolis" " " \
+"posix/America/Indiana/Knox" " " \
+"posix/America/Indiana/Marengo" " " \
+"posix/America/Indiana/Petersburg" " " \
+"posix/America/Indiana/Tell_City" " " \
+"posix/America/Indiana/Vevay" " " \
+"posix/America/Indiana/Vincennes" " " \
+"posix/America/Indianapolis" " " \
+"posix/America/Inuvik" " " \
+"posix/America/Iqaluit" " " \
+"posix/America/Jamaica" " " \
+"posix/America/Jujuy" " " \
+"posix/America/Juneau" " " \
+"posix/America/Kentucky/Louisville" " " \
+"posix/America/Kentucky/Monticello" " " \
+"posix/America/Knox_IN" " " \
+"posix/America/La_Paz" " " \
+"posix/America/Lima" " " \
+"posix/America/Los_Angeles" " " \
+"posix/America/Louisville" " " \
+"posix/America/Maceio" " " \
+"posix/America/Managua" " " \
+"posix/America/Manaus" " " \
+"posix/America/Martinique" " " \
+"posix/America/Mazatlan" " " \
+"posix/America/Mendoza" " " \
+"posix/America/Menominee" " " \
+"posix/America/Merida" " " \
+"posix/America/Mexico_City" " " \
+"posix/America/Miquelon" " " \
+"posix/America/Moncton" " " \
+"posix/America/Monterrey" " " \
+"posix/America/Montevideo" " " \
+"posix/America/Montreal" " " \
+"posix/America/Montserrat" " " \
+"posix/America/Nassau" " " \
+"posix/America/New_York" " " \
+"posix/America/Nipigon" " " \
+"posix/America/Nome" " " \
+"posix/America/Noronha" " " \
+"posix/America/North_Dakota/Center" " " \
+"posix/America/North_Dakota/New_Salem" " " \
+"posix/America/Panama" " " \
+"posix/America/Pangnirtung" " " \
+"posix/America/Paramaribo" " " \
+"posix/America/Phoenix" " " \
+"posix/America/Port-au-Prince" " " \
+"posix/America/Port_of_Spain" " " \
+"posix/America/Porto_Acre" " " \
+"posix/America/Porto_Velho" " " \
+"posix/America/Puerto_Rico" " " \
+"posix/America/Rainy_River" " " \
+"posix/America/Rankin_Inlet" " " \
+"posix/America/Recife" " " \
+"posix/America/Regina" " " \
+"posix/America/Rio_Branco" " " \
+"posix/America/Rosario" " " \
+"posix/America/Santiago" " " \
+"posix/America/Santo_Domingo" " " \
+"posix/America/Sao_Paulo" " " \
+"posix/America/Scoresbysund" " " \
+"posix/America/Shiprock" " " \
+"posix/America/St_Johns" " " \
+"posix/America/St_Kitts" " " \
+"posix/America/St_Lucia" " " \
+"posix/America/St_Thomas" " " \
+"posix/America/St_Vincent" " " \
+"posix/America/Swift_Current" " " \
+"posix/America/Tegucigalpa" " " \
+"posix/America/Thule" " " \
+"posix/America/Thunder_Bay" " " \
+"posix/America/Tijuana" " " \
+"posix/America/Toronto" " " \
+"posix/America/Tortola" " " \
+"posix/America/Vancouver" " " \
+"posix/America/Virgin" " " \
+"posix/America/Whitehorse" " " \
+"posix/America/Winnipeg" " " \
+"posix/America/Yakutat" " " \
+"posix/America/Yellowknife" " " \
+"posix/Antarctica/Casey" " " \
+"posix/Antarctica/Davis" " " \
+"posix/Antarctica/DumontDUrville" " " \
+"posix/Antarctica/Mawson" " " \
+"posix/Antarctica/McMurdo" " " \
+"posix/Antarctica/Palmer" " " \
+"posix/Antarctica/Rothera" " " \
+"posix/Antarctica/South_Pole" " " \
+"posix/Antarctica/Syowa" " " \
+"posix/Antarctica/Troll" " " \
+"posix/Antarctica/Vostok" " " \
+"posix/Arctic/Longyearbyen" " " \
+"posix/Asia/Aden" " " \
+"posix/Asia/Almaty" " " \
+"posix/Asia/Amman" " " \
+"posix/Asia/Anadyr" " " \
+"posix/Asia/Aqtau" " " \
+"posix/Asia/Aqtobe" " " \
+"posix/Asia/Ashgabat" " " \
+"posix/Asia/Ashkhabad" " " \
+"posix/Asia/Baghdad" " " \
+"posix/Asia/Bahrain" " " \
+"posix/Asia/Baku" " " \
+"posix/Asia/Bangkok" " " \
+"posix/Asia/Beirut" " " \
+"posix/Asia/Bishkek" " " \
+"posix/Asia/Brunei" " " \
+"posix/Asia/Calcutta" " " \
+"posix/Asia/Chita" " " \
+"posix/Asia/Choibalsan" " " \
+"posix/Asia/Chongqing" " " \
+"posix/Asia/Chungking" " " \
+"posix/Asia/Colombo" " " \
+"posix/Asia/Dacca" " " \
+"posix/Asia/Damascus" " " \
+"posix/Asia/Dhaka" " " \
+"posix/Asia/Dili" " " \
+"posix/Asia/Dubai" " " \
+"posix/Asia/Dushanbe" " " \
+"posix/Asia/Gaza" " " \
+"posix/Asia/Harbin" " " \
+"posix/Asia/Hong_Kong" " " \
+"posix/Asia/Hovd" " " \
+"posix/Asia/Irkutsk" " " \
+"posix/Asia/Istanbul" " " \
+"posix/Asia/Jakarta" " " \
+"posix/Asia/Jayapura" " " \
+"posix/Asia/Jerusalem" " " \
+"posix/Asia/Kabul" " " \
+"posix/Asia/Kamchatka" " " \
+"posix/Asia/Karachi" " " \
+"posix/Asia/Kashgar" " " \
+"posix/Asia/Katmandu" " " \
+"posix/Asia/Krasnoyarsk" " " \
+"posix/Asia/Kuala_Lumpur" " " \
+"posix/Asia/Kuching" " " \
+"posix/Asia/Kuwait" " " \
+"posix/Asia/Macao" " " \
+"posix/Asia/Macau" " " \
+"posix/Asia/Magadan" " " \
+"posix/Asia/Makassar" " " \
+"posix/Asia/Manila" " " \
+"posix/Asia/Muscat" " " \
+"posix/Asia/Nicosia" " " \
+"posix/Asia/Novosibirsk" " " \
+"posix/Asia/Omsk" " " \
+"posix/Asia/Oral" " " \
+"posix/Asia/Phnom_Penh" " " \
+"posix/Asia/Pontianak" " " \
+"posix/Asia/Pyongyang" " " \
+"posix/Asia/Qatar" " " \
+"posix/Asia/Qyzylorda" " " \
+"posix/Asia/Rangoon" " " \
+"posix/Asia/Riyadh" " " \
+"posix/Asia/Saigon" " " \
+"posix/Asia/Sakhalin" " " \
+"posix/Asia/Samarkand" " " \
+"posix/Asia/Seoul" " " \
+"posix/Asia/Shanghai" " " \
+"posix/Asia/Singapore" " " \
+"posix/Asia/Srednekolymsk" " " \
+"posix/Asia/Taipei" " " \
+"posix/Asia/Tashkent" " " \
+"posix/Asia/Tbilisi" " " \
+"posix/Asia/Tehran" " " \
+"posix/Asia/Tel_Aviv" " " \
+"posix/Asia/Thimbu" " " \
+"posix/Asia/Thimphu" " " \
+"posix/Asia/Tokyo" " " \
+"posix/Asia/Ujung_Pandang" " " \
+"posix/Asia/Ulaanbaatar" " " \
+"posix/Asia/Ulan_Bator" " " \
+"posix/Asia/Urumqi" " " \
+"posix/Asia/Vientiane" " " \
+"posix/Asia/Vladivostok" " " \
+"posix/Asia/Yakutsk" " " \
+"posix/Asia/Yekaterinburg" " " \
+"posix/Asia/Yerevan" " " \
+"posix/Atlantic/Azores" " " \
+"posix/Atlantic/Bermuda" " " \
+"posix/Atlantic/Canary" " " \
+"posix/Atlantic/Cape_Verde" " " \
+"posix/Atlantic/Faeroe" " " \
+"posix/Atlantic/Jan_Mayen" " " \
+"posix/Atlantic/Madeira" " " \
+"posix/Atlantic/Reykjavik" " " \
+"posix/Atlantic/South_Georgia" " " \
+"posix/Atlantic/St_Helena" " " \
+"posix/Atlantic/Stanley" " " \
+"posix/Australia/ACT" " " \
+"posix/Australia/Adelaide" " " \
+"posix/Australia/Brisbane" " " \
+"posix/Australia/Broken_Hill" " " \
+"posix/Australia/Canberra" " " \
+"posix/Australia/Currie" " " \
+"posix/Australia/Darwin" " " \
+"posix/Australia/Hobart" " " \
+"posix/Australia/LHI" " " \
+"posix/Australia/Lindeman" " " \
+"posix/Australia/Lord_Howe" " " \
+"posix/Australia/Melbourne" " " \
+"posix/Australia/NSW" " " \
+"posix/Australia/North" " " \
+"posix/Australia/Perth" " " \
+"posix/Australia/Queensland" " " \
+"posix/Australia/South" " " \
+"posix/Australia/Sydney" " " \
+"posix/Australia/Tasmania" " " \
+"posix/Australia/Victoria" " " \
+"posix/Australia/West" " " \
+"posix/Australia/Yancowinna" " " \
+"posix/Brazil/Acre" " " \
+"posix/Brazil/DeNoronha" " " \
+"posix/Brazil/East" " " \
+"posix/Brazil/West" " " \
+"posix/CET" " " \
+"posix/CST6CDT" " " \
+"posix/Canada/Atlantic" " " \
+"posix/Canada/Central" " " \
+"posix/Canada/East-Saskatchewan" " " \
+"posix/Canada/Eastern" " " \
+"posix/Canada/Mountain" " " \
+"posix/Canada/Newfoundland" " " \
+"posix/Canada/Pacific" " " \
+"posix/Canada/Saskatchewan" " " \
+"posix/Canada/Yukon" " " \
+"posix/Chile/Continental" " " \
+"posix/Chile/EasterIsland" " " \
+"posix/Cuba" " " \
+"posix/EET" " " \
+"posix/EST" " " \
+"posix/EST5EDT" " " \
+"posix/Egypt" " " \
+"posix/Eire" " " \
+"posix/Etc/GMT" " " \
+"posix/Etc/GMT+0" " " \
+"posix/Etc/GMT+1" " " \
+"posix/Etc/GMT+10" " " \
+"posix/Etc/GMT+11" " " \
+"posix/Etc/GMT+12" " " \
+"posix/Etc/GMT+2" " " \
+"posix/Etc/GMT+3" " " \
+"posix/Etc/GMT+4" " " \
+"posix/Etc/GMT+5" " " \
+"posix/Etc/GMT+6" " " \
+"posix/Etc/GMT+7" " " \
+"posix/Etc/GMT+8" " " \
+"posix/Etc/GMT+9" " " \
+"posix/Etc/GMT-0" " " \
+"posix/Etc/GMT-1" " " \
+"posix/Etc/GMT-10" " " \
+"posix/Etc/GMT-11" " " \
+"posix/Etc/GMT-12" " " \
+"posix/Etc/GMT-13" " " \
+"posix/Etc/GMT-14" " " \
+"posix/Etc/GMT-2" " " \
+"posix/Etc/GMT-3" " " \
+"posix/Etc/GMT-4" " " \
+"posix/Etc/GMT-5" " " \
+"posix/Etc/GMT-6" " " \
+"posix/Etc/GMT-7" " " \
+"posix/Etc/GMT-8" " " \
+"posix/Etc/GMT-9" " " \
+"posix/Etc/GMT0" " " \
+"posix/Etc/Greenwich" " " \
+"posix/Etc/UCT" " " \
+"posix/Etc/UTC" " " \
+"posix/Etc/Universal" " " \
+"posix/Etc/Zulu" " " \
+"posix/Europe/Amsterdam" " " \
+"posix/Europe/Andorra" " " \
+"posix/Europe/Athens" " " \
+"posix/Europe/Belfast" " " \
+"posix/Europe/Belgrade" " " \
+"posix/Europe/Berlin" " " \
+"posix/Europe/Bratislava" " " \
+"posix/Europe/Brussels" " " \
+"posix/Europe/Bucharest" " " \
+"posix/Europe/Budapest" " " \
+"posix/Europe/Chisinau" " " \
+"posix/Europe/Copenhagen" " " \
+"posix/Europe/Dublin" " " \
+"posix/Europe/Gibraltar" " " \
+"posix/Europe/Guernsey" " " \
+"posix/Europe/Helsinki" " " \
+"posix/Europe/Isle_of_Man" " " \
+"posix/Europe/Istanbul" " " \
+"posix/Europe/Jersey" " " \
+"posix/Europe/Kaliningrad" " " \
+"posix/Europe/Kiev" " " \
+"posix/Europe/Lisbon" " " \
+"posix/Europe/Ljubljana" " " \
+"posix/Europe/London" " " \
+"posix/Europe/Luxembourg" " " \
+"posix/Europe/Madrid" " " \
+"posix/Europe/Malta" " " \
+"posix/Europe/Mariehamn" " " \
+"posix/Europe/Minsk" " " \
+"posix/Europe/Monaco" " " \
+"posix/Europe/Moscow" " " \
+"posix/Europe/Nicosia" " " \
+"posix/Europe/Oslo" " " \
+"posix/Europe/Paris" " " \
+"posix/Europe/Podgorica" " " \
+"posix/Europe/Prague" " " \
+"posix/Europe/Riga" " " \
+"posix/Europe/Rome" " " \
+"posix/Europe/Samara" " " \
+"posix/Europe/San_Marino" " " \
+"posix/Europe/Sarajevo" " " \
+"posix/Europe/Simferopol" " " \
+"posix/Europe/Skopje" " " \
+"posix/Europe/Sofia" " " \
+"posix/Europe/Stockholm" " " \
+"posix/Europe/Tallinn" " " \
+"posix/Europe/Tirane" " " \
+"posix/Europe/Tiraspol" " " \
+"posix/Europe/Uzhgorod" " " \
+"posix/Europe/Vaduz" " " \
+"posix/Europe/Vatican" " " \
+"posix/Europe/Vienna" " " \
+"posix/Europe/Vilnius" " " \
+"posix/Europe/Volgograd" " " \
+"posix/Europe/Warsaw" " " \
+"posix/Europe/Zagreb" " " \
+"posix/Europe/Zaporozhye" " " \
+"posix/Europe/Zurich" " " \
+"posix/Factory" " " \
+"posix/GB" " " \
+"posix/GB-Eire" " " \
+"posix/GMT" " " \
+"posix/GMT+0" " " \
+"posix/GMT-0" " " \
+"posix/GMT0" " " \
+"posix/Greenwich" " " \
+"posix/HST" " " \
+"posix/Hongkong" " " \
+"posix/Iceland" " " \
+"posix/Indian/Antananarivo" " " \
+"posix/Indian/Chagos" " " \
+"posix/Indian/Christmas" " " \
+"posix/Indian/Cocos" " " \
+"posix/Indian/Comoro" " " \
+"posix/Indian/Kerguelen" " " \
+"posix/Indian/Mahe" " " \
+"posix/Indian/Maldives" " " \
+"posix/Indian/Mauritius" " " \
+"posix/Indian/Mayotte" " " \
+"posix/Indian/Reunion" " " \
+"posix/Iran" " " \
+"posix/Israel" " " \
+"posix/Jamaica" " " \
+"posix/Japan" " " \
+"posix/Kwajalein" " " \
+"posix/Libya" " " \
+"posix/MET" " " \
+"posix/MST" " " \
+"posix/MST7MDT" " " \
+"posix/Mexico/BajaNorte" " " \
+"posix/Mexico/BajaSur" " " \
+"posix/Mexico/General" " " \
+"posix/NZ" " " \
+"posix/NZ-CHAT" " " \
+"posix/Navajo" " " \
+"posix/PRC" " " \
+"posix/PST8PDT" " " \
+"posix/Pacific/Apia" " " \
+"posix/Pacific/Auckland" " " \
+"posix/Pacific/Bougainville" " " \
+"posix/Pacific/Chatham" " " \
+"posix/Pacific/Easter" " " \
+"posix/Pacific/Efate" " " \
+"posix/Pacific/Enderbury" " " \
+"posix/Pacific/Fakaofo" " " \
+"posix/Pacific/Fiji" " " \
+"posix/Pacific/Funafuti" " " \
+"posix/Pacific/Galapagos" " " \
+"posix/Pacific/Gambier" " " \
+"posix/Pacific/Guadalcanal" " " \
+"posix/Pacific/Guam" " " \
+"posix/Pacific/Honolulu" " " \
+"posix/Pacific/Johnston" " " \
+"posix/Pacific/Kiritimati" " " \
+"posix/Pacific/Kosrae" " " \
+"posix/Pacific/Kwajalein" " " \
+"posix/Pacific/Majuro" " " \
+"posix/Pacific/Marquesas" " " \
+"posix/Pacific/Midway" " " \
+"posix/Pacific/Nauru" " " \
+"posix/Pacific/Niue" " " \
+"posix/Pacific/Norfolk" " " \
+"posix/Pacific/Noumea" " " \
+"posix/Pacific/Pago_Pago" " " \
+"posix/Pacific/Palau" " " \
+"posix/Pacific/Pitcairn" " " \
+"posix/Pacific/Ponape" " " \
+"posix/Pacific/Port_Moresby" " " \
+"posix/Pacific/Rarotonga" " " \
+"posix/Pacific/Saipan" " " \
+"posix/Pacific/Samoa" " " \
+"posix/Pacific/Tahiti" " " \
+"posix/Pacific/Tarawa" " " \
+"posix/Pacific/Tongatapu" " " \
+"posix/Pacific/Truk" " " \
+"posix/Pacific/Wake" " " \
+"posix/Pacific/Wallis" " " \
+"posix/Pacific/Yap" " " \
+"posix/Poland" " " \
+"posix/Portugal" " " \
+"posix/ROC" " " \
+"posix/ROK" " " \
+"posix/Singapore" " " \
+"posix/Turkey" " " \
+"posix/UCT" " " \
+"posix/US/Alaska" " " \
+"posix/US/Aleutian" " " \
+"posix/US/Arizona" " " \
+"posix/US/Central" " " \
+"posix/US/East-Indiana" " " \
+"posix/US/Eastern" " " \
+"posix/US/Hawaii" " " \
+"posix/US/Indiana-Starke" " " \
+"posix/US/Michigan" " " \
+"posix/US/Mountain" " " \
+"posix/US/Pacific" " " \
+"posix/US/Pacific-New" " " \
+"posix/US/Samoa" " " \
+"posix/UTC" " " \
+"posix/Universal" " " \
+"posix/W-SU" " " \
+"posix/WET" " " \
+"posix/Zulu" " " \
+"posixrules" " " \
+"right/Africa/Abidjan" " " \
+"right/Africa/Accra" " " \
+"right/Africa/Addis_Ababa" " " \
+"right/Africa/Algiers" " " \
+"right/Africa/Asmera" " " \
+"right/Africa/Bamako" " " \
+"right/Africa/Bangui" " " \
+"right/Africa/Banjul" " " \
+"right/Africa/Bissau" " " \
+"right/Africa/Blantyre" " " \
+"right/Africa/Brazzaville" " " \
+"right/Africa/Bujumbura" " " \
+"right/Africa/Cairo" " " \
+"right/Africa/Casablanca" " " \
+"right/Africa/Ceuta" " " \
+"right/Africa/Conakry" " " \
+"right/Africa/Dakar" " " \
+"right/Africa/Dar_es_Salaam" " " \
+"right/Africa/Djibouti" " " \
+"right/Africa/Douala" " " \
+"right/Africa/El_Aaiun" " " \
+"right/Africa/Freetown" " " \
+"right/Africa/Gaborone" " " \
+"right/Africa/Harare" " " \
+"right/Africa/Johannesburg" " " \
+"right/Africa/Kampala" " " \
+"right/Africa/Khartoum" " " \
+"right/Africa/Kigali" " " \
+"right/Africa/Kinshasa" " " \
+"right/Africa/Lagos" " " \
+"right/Africa/Libreville" " " \
+"right/Africa/Lome" " " \
+"right/Africa/Luanda" " " \
+"right/Africa/Lubumbashi" " " \
+"right/Africa/Lusaka" " " \
+"right/Africa/Malabo" " " \
+"right/Africa/Maputo" " " \
+"right/Africa/Maseru" " " \
+"right/Africa/Mbabane" " " \
+"right/Africa/Mogadishu" " " \
+"right/Africa/Monrovia" " " \
+"right/Africa/Nairobi" " " \
+"right/Africa/Ndjamena" " " \
+"right/Africa/Niamey" " " \
+"right/Africa/Nouakchott" " " \
+"right/Africa/Ouagadougou" " " \
+"right/Africa/Porto-Novo" " " \
+"right/Africa/Sao_Tome" " " \
+"right/Africa/Timbuktu" " " \
+"right/Africa/Tripoli" " " \
+"right/Africa/Tunis" " " \
+"right/Africa/Windhoek" " " \
+"right/America/Adak" " " \
+"right/America/Anchorage" " " \
+"right/America/Anguilla" " " \
+"right/America/Antigua" " " \
+"right/America/Araguaina" " " \
+"right/America/Argentina/Buenos_Aires" " " \
+"right/America/Argentina/Catamarca" " " \
+"right/America/Argentina/ComodRivadavia" " " \
+"right/America/Argentina/Cordoba" " " \
+"right/America/Argentina/Jujuy" " " \
+"right/America/Argentina/La_Rioja" " " \
+"right/America/Argentina/Mendoza" " " \
+"right/America/Argentina/Rio_Gallegos" " " \
+"right/America/Argentina/San_Juan" " " \
+"right/America/Argentina/Tucuman" " " \
+"right/America/Argentina/Ushuaia" " " \
+"right/America/Aruba" " " \
+"right/America/Asuncion" " " \
+"right/America/Atikokan" " " \
+"right/America/Atka" " " \
+"right/America/Bahia" " " \
+"right/America/Barbados" " " \
+"right/America/Belem" " " \
+"right/America/Belize" " " \
+"right/America/Blanc-Sablon" " " \
+"right/America/Boa_Vista" " " \
+"right/America/Bogota" " " \
+"right/America/Boise" " " \
+"right/America/Buenos_Aires" " " \
+"right/America/Cambridge_Bay" " " \
+"right/America/Campo_Grande" " " \
+"right/America/Cancun" " " \
+"right/America/Caracas" " " \
+"right/America/Catamarca" " " \
+"right/America/Cayenne" " " \
+"right/America/Cayman" " " \
+"right/America/Chicago" " " \
+"right/America/Chihuahua" " " \
+"right/America/Coral_Harbour" " " \
+"right/America/Cordoba" " " \
+"right/America/Costa_Rica" " " \
+"right/America/Cuiaba" " " \
+"right/America/Curacao" " " \
+"right/America/Danmarkshavn" " " \
+"right/America/Dawson" " " \
+"right/America/Dawson_Creek" " " \
+"right/America/Denver" " " \
+"right/America/Detroit" " " \
+"right/America/Dominica" " " \
+"right/America/Edmonton" " " \
+"right/America/Eirunepe" " " \
+"right/America/El_Salvador" " " \
+"right/America/Ensenada" " " \
+"right/America/Fort_Wayne" " " \
+"right/America/Fortaleza" " " \
+"right/America/Glace_Bay" " " \
+"right/America/Godthab" " " \
+"right/America/Goose_Bay" " " \
+"right/America/Grand_Turk" " " \
+"right/America/Grenada" " " \
+"right/America/Guadeloupe" " " \
+"right/America/Guatemala" " " \
+"right/America/Guayaquil" " " \
+"right/America/Guyana" " " \
+"right/America/Halifax" " " \
+"right/America/Havana" " " \
+"right/America/Hermosillo" " " \
+"right/America/Indiana/Indianapolis" " " \
+"right/America/Indiana/Knox" " " \
+"right/America/Indiana/Marengo" " " \
+"right/America/Indiana/Petersburg" " " \
+"right/America/Indiana/Tell_City" " " \
+"right/America/Indiana/Vevay" " " \
+"right/America/Indiana/Vincennes" " " \
+"right/America/Indianapolis" " " \
+"right/America/Inuvik" " " \
+"right/America/Iqaluit" " " \
+"right/America/Jamaica" " " \
+"right/America/Jujuy" " " \
+"right/America/Juneau" " " \
+"right/America/Kentucky/Louisville" " " \
+"right/America/Kentucky/Monticello" " " \
+"right/America/Knox_IN" " " \
+"right/America/La_Paz" " " \
+"right/America/Lima" " " \
+"right/America/Los_Angeles" " " \
+"right/America/Louisville" " " \
+"right/America/Maceio" " " \
+"right/America/Managua" " " \
+"right/America/Manaus" " " \
+"right/America/Martinique" " " \
+"right/America/Mazatlan" " " \
+"right/America/Mendoza" " " \
+"right/America/Menominee" " " \
+"right/America/Merida" " " \
+"right/America/Mexico_City" " " \
+"right/America/Miquelon" " " \
+"right/America/Moncton" " " \
+"right/America/Monterrey" " " \
+"right/America/Montevideo" " " \
+"right/America/Montreal" " " \
+"right/America/Montserrat" " " \
+"right/America/Nassau" " " \
+"right/America/New_York" " " \
+"right/America/Nipigon" " " \
+"right/America/Nome" " " \
+"right/America/Noronha" " " \
+"right/America/North_Dakota/Center" " " \
+"right/America/North_Dakota/New_Salem" " " \
+"right/America/Panama" " " \
+"right/America/Pangnirtung" " " \
+"right/America/Paramaribo" " " \
+"right/America/Phoenix" " " \
+"right/America/Port-au-Prince" " " \
+"right/America/Port_of_Spain" " " \
+"right/America/Porto_Acre" " " \
+"right/America/Porto_Velho" " " \
+"right/America/Puerto_Rico" " " \
+"right/America/Rainy_River" " " \
+"right/America/Rankin_Inlet" " " \
+"right/America/Recife" " " \
+"right/America/Regina" " " \
+"right/America/Rio_Branco" " " \
+"right/America/Rosario" " " \
+"right/America/Santiago" " " \
+"right/America/Santo_Domingo" " " \
+"right/America/Sao_Paulo" " " \
+"right/America/Scoresbysund" " " \
+"right/America/Shiprock" " " \
+"right/America/St_Johns" " " \
+"right/America/St_Kitts" " " \
+"right/America/St_Lucia" " " \
+"right/America/St_Thomas" " " \
+"right/America/St_Vincent" " " \
+"right/America/Swift_Current" " " \
+"right/America/Tegucigalpa" " " \
+"right/America/Thule" " " \
+"right/America/Thunder_Bay" " " \
+"right/America/Tijuana" " " \
+"right/America/Toronto" " " \
+"right/America/Tortola" " " \
+"right/America/Vancouver" " " \
+"right/America/Virgin" " " \
+"right/America/Whitehorse" " " \
+"right/America/Winnipeg" " " \
+"right/America/Yakutat" " " \
+"right/America/Yellowknife" " " \
+"right/Antarctica/Casey" " " \
+"right/Antarctica/Davis" " " \
+"right/Antarctica/DumontDUrville" " " \
+"right/Antarctica/Mawson" " " \
+"right/Antarctica/McMurdo" " " \
+"right/Antarctica/Palmer" " " \
+"right/Antarctica/Rothera" " " \
+"right/Antarctica/South_Pole" " " \
+"right/Antarctica/Syowa" " " \
+"right/Antarctica/Troll" " " \
+"right/Antarctica/Vostok" " " \
+"right/Arctic/Longyearbyen" " " \
+"right/Asia/Aden" " " \
+"right/Asia/Almaty" " " \
+"right/Asia/Amman" " " \
+"right/Asia/Anadyr" " " \
+"right/Asia/Aqtau" " " \
+"right/Asia/Aqtobe" " " \
+"right/Asia/Ashgabat" " " \
+"right/Asia/Ashkhabad" " " \
+"right/Asia/Baghdad" " " \
+"right/Asia/Bahrain" " " \
+"right/Asia/Baku" " " \
+"right/Asia/Bangkok" " " \
+"right/Asia/Beirut" " " \
+"right/Asia/Bishkek" " " \
+"right/Asia/Brunei" " " \
+"right/Asia/Calcutta" " " \
+"right/Asia/Chita" " " \
+"right/Asia/Choibalsan" " " \
+"right/Asia/Chongqing" " " \
+"right/Asia/Chungking" " " \
+"right/Asia/Colombo" " " \
+"right/Asia/Dacca" " " \
+"right/Asia/Damascus" " " \
+"right/Asia/Dhaka" " " \
+"right/Asia/Dili" " " \
+"right/Asia/Dubai" " " \
+"right/Asia/Dushanbe" " " \
+"right/Asia/Gaza" " " \
+"right/Asia/Harbin" " " \
+"right/Asia/Hong_Kong" " " \
+"right/Asia/Hovd" " " \
+"right/Asia/Irkutsk" " " \
+"right/Asia/Istanbul" " " \
+"right/Asia/Jakarta" " " \
+"right/Asia/Jayapura" " " \
+"right/Asia/Jerusalem" " " \
+"right/Asia/Kabul" " " \
+"right/Asia/Kamchatka" " " \
+"right/Asia/Karachi" " " \
+"right/Asia/Kashgar" " " \
+"right/Asia/Katmandu" " " \
+"right/Asia/Krasnoyarsk" " " \
+"right/Asia/Kuala_Lumpur" " " \
+"right/Asia/Kuching" " " \
+"right/Asia/Kuwait" " " \
+"right/Asia/Macao" " " \
+"right/Asia/Macau" " " \
+"right/Asia/Magadan" " " \
+"right/Asia/Makassar" " " \
+"right/Asia/Manila" " " \
+"right/Asia/Muscat" " " \
+"right/Asia/Nicosia" " " \
+"right/Asia/Novosibirsk" " " \
+"right/Asia/Omsk" " " \
+"right/Asia/Oral" " " \
+"right/Asia/Phnom_Penh" " " \
+"right/Asia/Pontianak" " " \
+"right/Asia/Pyongyang" " " \
+"right/Asia/Qatar" " " \
+"right/Asia/Qyzylorda" " " \
+"right/Asia/Rangoon" " " \
+"right/Asia/Riyadh" " " \
+"right/Asia/Saigon" " " \
+"right/Asia/Sakhalin" " " \
+"right/Asia/Samarkand" " " \
+"right/Asia/Seoul" " " \
+"right/Asia/Shanghai" " " \
+"right/Asia/Singapore" " " \
+"right/Asia/Srednekolymsk" " " \
+"right/Asia/Taipei" " " \
+"right/Asia/Tashkent" " " \
+"right/Asia/Tbilisi" " " \
+"right/Asia/Tehran" " " \
+"right/Asia/Tel_Aviv" " " \
+"right/Asia/Thimbu" " " \
+"right/Asia/Thimphu" " " \
+"right/Asia/Tokyo" " " \
+"right/Asia/Ujung_Pandang" " " \
+"right/Asia/Ulaanbaatar" " " \
+"right/Asia/Ulan_Bator" " " \
+"right/Asia/Urumqi" " " \
+"right/Asia/Vientiane" " " \
+"right/Asia/Vladivostok" " " \
+"right/Asia/Yakutsk" " " \
+"right/Asia/Yekaterinburg" " " \
+"right/Asia/Yerevan" " " \
+"right/Atlantic/Azores" " " \
+"right/Atlantic/Bermuda" " " \
+"right/Atlantic/Canary" " " \
+"right/Atlantic/Cape_Verde" " " \
+"right/Atlantic/Faeroe" " " \
+"right/Atlantic/Jan_Mayen" " " \
+"right/Atlantic/Madeira" " " \
+"right/Atlantic/Reykjavik" " " \
+"right/Atlantic/South_Georgia" " " \
+"right/Atlantic/St_Helena" " " \
+"right/Atlantic/Stanley" " " \
+"right/Australia/ACT" " " \
+"right/Australia/Adelaide" " " \
+"right/Australia/Brisbane" " " \
+"right/Australia/Broken_Hill" " " \
+"right/Australia/Canberra" " " \
+"right/Australia/Currie" " " \
+"right/Australia/Darwin" " " \
+"right/Australia/Hobart" " " \
+"right/Australia/LHI" " " \
+"right/Australia/Lindeman" " " \
+"right/Australia/Lord_Howe" " " \
+"right/Australia/Melbourne" " " \
+"right/Australia/NSW" " " \
+"right/Australia/North" " " \
+"right/Australia/Perth" " " \
+"right/Australia/Queensland" " " \
+"right/Australia/South" " " \
+"right/Australia/Sydney" " " \
+"right/Australia/Tasmania" " " \
+"right/Australia/Victoria" " " \
+"right/Australia/West" " " \
+"right/Australia/Yancowinna" " " \
+"right/Brazil/Acre" " " \
+"right/Brazil/DeNoronha" " " \
+"right/Brazil/East" " " \
+"right/Brazil/West" " " \
+"right/CET" " " \
+"right/CST6CDT" " " \
+"right/Canada/Atlantic" " " \
+"right/Canada/Central" " " \
+"right/Canada/East-Saskatchewan" " " \
+"right/Canada/Eastern" " " \
+"right/Canada/Mountain" " " \
+"right/Canada/Newfoundland" " " \
+"right/Canada/Pacific" " " \
+"right/Canada/Saskatchewan" " " \
+"right/Canada/Yukon" " " \
+"right/Chile/Continental" " " \
+"right/Chile/EasterIsland" " " \
+"right/Cuba" " " \
+"right/EET" " " \
+"right/EST" " " \
+"right/EST5EDT" " " \
+"right/Egypt" " " \
+"right/Eire" " " \
+"right/Etc/GMT" " " \
+"right/Etc/GMT+0" " " \
+"right/Etc/GMT+1" " " \
+"right/Etc/GMT+10" " " \
+"right/Etc/GMT+11" " " \
+"right/Etc/GMT+12" " " \
+"right/Etc/GMT+2" " " \
+"right/Etc/GMT+3" " " \
+"right/Etc/GMT+4" " " \
+"right/Etc/GMT+5" " " \
+"right/Etc/GMT+6" " " \
+"right/Etc/GMT+7" " " \
+"right/Etc/GMT+8" " " \
+"right/Etc/GMT+9" " " \
+"right/Etc/GMT-0" " " \
+"right/Etc/GMT-1" " " \
+"right/Etc/GMT-10" " " \
+"right/Etc/GMT-11" " " \
+"right/Etc/GMT-12" " " \
+"right/Etc/GMT-13" " " \
+"right/Etc/GMT-14" " " \
+"right/Etc/GMT-2" " " \
+"right/Etc/GMT-3" " " \
+"right/Etc/GMT-4" " " \
+"right/Etc/GMT-5" " " \
+"right/Etc/GMT-6" " " \
+"right/Etc/GMT-7" " " \
+"right/Etc/GMT-8" " " \
+"right/Etc/GMT-9" " " \
+"right/Etc/GMT0" " " \
+"right/Etc/Greenwich" " " \
+"right/Etc/UCT" " " \
+"right/Etc/UTC" " " \
+"right/Etc/Universal" " " \
+"right/Etc/Zulu" " " \
+"right/Europe/Amsterdam" " " \
+"right/Europe/Andorra" " " \
+"right/Europe/Athens" " " \
+"right/Europe/Belfast" " " \
+"right/Europe/Belgrade" " " \
+"right/Europe/Berlin" " " \
+"right/Europe/Bratislava" " " \
+"right/Europe/Brussels" " " \
+"right/Europe/Bucharest" " " \
+"right/Europe/Budapest" " " \
+"right/Europe/Chisinau" " " \
+"right/Europe/Copenhagen" " " \
+"right/Europe/Dublin" " " \
+"right/Europe/Gibraltar" " " \
+"right/Europe/Guernsey" " " \
+"right/Europe/Helsinki" " " \
+"right/Europe/Isle_of_Man" " " \
+"right/Europe/Istanbul" " " \
+"right/Europe/Jersey" " " \
+"right/Europe/Kaliningrad" " " \
+"right/Europe/Kiev" " " \
+"right/Europe/Lisbon" " " \
+"right/Europe/Ljubljana" " " \
+"right/Europe/London" " " \
+"right/Europe/Luxembourg" " " \
+"right/Europe/Madrid" " " \
+"right/Europe/Malta" " " \
+"right/Europe/Mariehamn" " " \
+"right/Europe/Minsk" " " \
+"right/Europe/Monaco" " " \
+"right/Europe/Moscow" " " \
+"right/Europe/Nicosia" " " \
+"right/Europe/Oslo" " " \
+"right/Europe/Paris" " " \
+"right/Europe/Podgorica" " " \
+"right/Europe/Prague" " " \
+"right/Europe/Riga" " " \
+"right/Europe/Rome" " " \
+"right/Europe/Samara" " " \
+"right/Europe/San_Marino" " " \
+"right/Europe/Sarajevo" " " \
+"right/Europe/Simferopol" " " \
+"right/Europe/Skopje" " " \
+"right/Europe/Sofia" " " \
+"right/Europe/Stockholm" " " \
+"right/Europe/Tallinn" " " \
+"right/Europe/Tirane" " " \
+"right/Europe/Tiraspol" " " \
+"right/Europe/Uzhgorod" " " \
+"right/Europe/Vaduz" " " \
+"right/Europe/Vatican" " " \
+"right/Europe/Vienna" " " \
+"right/Europe/Vilnius" " " \
+"right/Europe/Volgograd" " " \
+"right/Europe/Warsaw" " " \
+"right/Europe/Zagreb" " " \
+"right/Europe/Zaporozhye" " " \
+"right/Europe/Zurich" " " \
+"right/Factory" " " \
+"right/GB" " " \
+"right/GB-Eire" " " \
+"right/GMT" " " \
+"right/GMT+0" " " \
+"right/GMT-0" " " \
+"right/GMT0" " " \
+"right/Greenwich" " " \
+"right/HST" " " \
+"right/Hongkong" " " \
+"right/Iceland" " " \
+"right/Indian/Antananarivo" " " \
+"right/Indian/Chagos" " " \
+"right/Indian/Christmas" " " \
+"right/Indian/Cocos" " " \
+"right/Indian/Comoro" " " \
+"right/Indian/Kerguelen" " " \
+"right/Indian/Mahe" " " \
+"right/Indian/Maldives" " " \
+"right/Indian/Mauritius" " " \
+"right/Indian/Mayotte" " " \
+"right/Indian/Reunion" " " \
+"right/Iran" " " \
+"right/Israel" " " \
+"right/Jamaica" " " \
+"right/Japan" " " \
+"right/Kwajalein" " " \
+"right/Libya" " " \
+"right/MET" " " \
+"right/MST" " " \
+"right/MST7MDT" " " \
+"right/Mexico/BajaNorte" " " \
+"right/Mexico/BajaSur" " " \
+"right/Mexico/General" " " \
+"right/NZ" " " \
+"right/NZ-CHAT" " " \
+"right/Navajo" " " \
+"right/PRC" " " \
+"right/PST8PDT" " " \
+"right/Pacific/Apia" " " \
+"right/Pacific/Auckland" " " \
+"right/Pacific/Bougainville" " " \
+"right/Pacific/Chatham" " " \
+"right/Pacific/Easter" " " \
+"right/Pacific/Efate" " " \
+"right/Pacific/Enderbury" " " \
+"right/Pacific/Fakaofo" " " \
+"right/Pacific/Fiji" " " \
+"right/Pacific/Funafuti" " " \
+"right/Pacific/Galapagos" " " \
+"right/Pacific/Gambier" " " \
+"right/Pacific/Guadalcanal" " " \
+"right/Pacific/Guam" " " \
+"right/Pacific/Honolulu" " " \
+"right/Pacific/Johnston" " " \
+"right/Pacific/Kiritimati" " " \
+"right/Pacific/Kosrae" " " \
+"right/Pacific/Kwajalein" " " \
+"right/Pacific/Majuro" " " \
+"right/Pacific/Marquesas" " " \
+"right/Pacific/Midway" " " \
+"right/Pacific/Nauru" " " \
+"right/Pacific/Niue" " " \
+"right/Pacific/Norfolk" " " \
+"right/Pacific/Noumea" " " \
+"right/Pacific/Pago_Pago" " " \
+"right/Pacific/Palau" " " \
+"right/Pacific/Pitcairn" " " \
+"right/Pacific/Ponape" " " \
+"right/Pacific/Port_Moresby" " " \
+"right/Pacific/Rarotonga" " " \
+"right/Pacific/Saipan" " " \
+"right/Pacific/Samoa" " " \
+"right/Pacific/Tahiti" " " \
+"right/Pacific/Tarawa" " " \
+"right/Pacific/Tongatapu" " " \
+"right/Pacific/Truk" " " \
+"right/Pacific/Wake" " " \
+"right/Pacific/Wallis" " " \
+"right/Pacific/Yap" " " \
+"right/Poland" " " \
+"right/Portugal" " " \
+"right/ROC" " " \
+"right/ROK" " " \
+"right/Singapore" " " \
+"right/Turkey" " " \
+"right/UCT" " " \
+"right/US/Alaska" " " \
+"right/US/Aleutian" " " \
+"right/US/Arizona" " " \
+"right/US/Central" " " \
+"right/US/East-Indiana" " " \
+"right/US/Eastern" " " \
+"right/US/Hawaii" " " \
+"right/US/Indiana-Starke" " " \
+"right/US/Michigan" " " \
+"right/US/Mountain" " " \
+"right/US/Pacific" " " \
+"right/US/Pacific-New" " " \
+"right/US/Samoa" " " \
+"right/UTC" " " \
+"right/Universal" " " \
+"right/W-SU" " " \
+"right/WET" " " \
+"right/Zulu" " " \
diff --git a/patches/source/glibc/timezone-scripts/parts/02 b/patches/source/glibc/timezone-scripts/parts/02
new file mode 100644
index 000000000..bd5a50bb0
--- /dev/null
+++ b/patches/source/glibc/timezone-scripts/parts/02
@@ -0,0 +1,28 @@
+ 2> $TMP/tz
+
+ if [ $? = 1 -o $? = 255 ]; then
+ rm -f $TMP/tz
+ exit
+ fi
+
+ TIMEZONE="`cat $TMP/tz`"
+ rm -f $TMP/tz
+
+ setzone $TIMEZONE
+ exit
+else
+ ###
+ ### use text prompts
+ ###
+ while [ 0 ]; do
+ echo -n "Would you like to configure your timezone ([y]es, [n]o)? "
+ read TIMECONF;
+ echo
+
+ if [ "$TIMECONF" = "n" ]; then
+ break
+ fi
+
+ cat << EOF
+Select one of these timezones:
+
diff --git a/patches/source/glibc/timezone-scripts/parts/03 b/patches/source/glibc/timezone-scripts/parts/03
new file mode 100644
index 000000000..7da2043d8
--- /dev/null
+++ b/patches/source/glibc/timezone-scripts/parts/03
@@ -0,0 +1,1658 @@
+US/Alaska
+US/Aleutian
+US/Arizona
+US/Central
+US/East-Indiana
+US/Eastern
+US/Hawaii
+US/Indiana-Starke
+US/Michigan
+US/Mountain
+US/Pacific
+US/Pacific-New
+US/Samoa
+Africa/Abidjan
+Africa/Accra
+Africa/Addis_Ababa
+Africa/Algiers
+Africa/Asmera
+Africa/Bamako
+Africa/Bangui
+Africa/Banjul
+Africa/Bissau
+Africa/Blantyre
+Africa/Brazzaville
+Africa/Bujumbura
+Africa/Cairo
+Africa/Casablanca
+Africa/Ceuta
+Africa/Conakry
+Africa/Dakar
+Africa/Dar_es_Salaam
+Africa/Djibouti
+Africa/Douala
+Africa/El_Aaiun
+Africa/Freetown
+Africa/Gaborone
+Africa/Harare
+Africa/Johannesburg
+Africa/Kampala
+Africa/Khartoum
+Africa/Kigali
+Africa/Kinshasa
+Africa/Lagos
+Africa/Libreville
+Africa/Lome
+Africa/Luanda
+Africa/Lubumbashi
+Africa/Lusaka
+Africa/Malabo
+Africa/Maputo
+Africa/Maseru
+Africa/Mbabane
+Africa/Mogadishu
+Africa/Monrovia
+Africa/Nairobi
+Africa/Ndjamena
+Africa/Niamey
+Africa/Nouakchott
+Africa/Ouagadougou
+Africa/Porto-Novo
+Africa/Sao_Tome
+Africa/Timbuktu
+Africa/Tripoli
+Africa/Tunis
+Africa/Windhoek
+America/Adak
+America/Anchorage
+America/Anguilla
+America/Antigua
+America/Araguaina
+America/Argentina/Buenos_Aires
+America/Argentina/Catamarca
+America/Argentina/ComodRivadavia
+America/Argentina/Cordoba
+America/Argentina/Jujuy
+America/Argentina/La_Rioja
+America/Argentina/Mendoza
+America/Argentina/Rio_Gallegos
+America/Argentina/San_Juan
+America/Argentina/Tucuman
+America/Argentina/Ushuaia
+America/Aruba
+America/Asuncion
+America/Atikokan
+America/Atka
+America/Bahia
+America/Barbados
+America/Belem
+America/Belize
+America/Blanc-Sablon
+America/Boa_Vista
+America/Bogota
+America/Boise
+America/Buenos_Aires
+America/Cambridge_Bay
+America/Campo_Grande
+America/Cancun
+America/Caracas
+America/Catamarca
+America/Cayenne
+America/Cayman
+America/Chicago
+America/Chihuahua
+America/Coral_Harbour
+America/Cordoba
+America/Costa_Rica
+America/Cuiaba
+America/Curacao
+America/Danmarkshavn
+America/Dawson
+America/Dawson_Creek
+America/Denver
+America/Detroit
+America/Dominica
+America/Edmonton
+America/Eirunepe
+America/El_Salvador
+America/Ensenada
+America/Fort_Wayne
+America/Fortaleza
+America/Glace_Bay
+America/Godthab
+America/Goose_Bay
+America/Grand_Turk
+America/Grenada
+America/Guadeloupe
+America/Guatemala
+America/Guayaquil
+America/Guyana
+America/Halifax
+America/Havana
+America/Hermosillo
+America/Indiana/Indianapolis
+America/Indiana/Knox
+America/Indiana/Marengo
+America/Indiana/Petersburg
+America/Indiana/Tell_City
+America/Indiana/Vevay
+America/Indiana/Vincennes
+America/Indianapolis
+America/Inuvik
+America/Iqaluit
+America/Jamaica
+America/Jujuy
+America/Juneau
+America/Kentucky/Louisville
+America/Kentucky/Monticello
+America/Knox_IN
+America/La_Paz
+America/Lima
+America/Los_Angeles
+America/Louisville
+America/Maceio
+America/Managua
+America/Manaus
+America/Martinique
+America/Mazatlan
+America/Mendoza
+America/Menominee
+America/Merida
+America/Mexico_City
+America/Miquelon
+America/Moncton
+America/Monterrey
+America/Montevideo
+America/Montreal
+America/Montserrat
+America/Nassau
+America/New_York
+America/Nipigon
+America/Nome
+America/Noronha
+America/North_Dakota/Center
+America/North_Dakota/New_Salem
+America/Panama
+America/Pangnirtung
+America/Paramaribo
+America/Phoenix
+America/Port-au-Prince
+America/Port_of_Spain
+America/Porto_Acre
+America/Porto_Velho
+America/Puerto_Rico
+America/Rainy_River
+America/Rankin_Inlet
+America/Recife
+America/Regina
+America/Rio_Branco
+America/Rosario
+America/Santiago
+America/Santo_Domingo
+America/Sao_Paulo
+America/Scoresbysund
+America/Shiprock
+America/St_Johns
+America/St_Kitts
+America/St_Lucia
+America/St_Thomas
+America/St_Vincent
+America/Swift_Current
+America/Tegucigalpa
+America/Thule
+America/Thunder_Bay
+America/Tijuana
+America/Toronto
+America/Tortola
+America/Vancouver
+America/Virgin
+America/Whitehorse
+America/Winnipeg
+America/Yakutat
+America/Yellowknife
+Antarctica/Casey
+Antarctica/Davis
+Antarctica/DumontDUrville
+Antarctica/Mawson
+Antarctica/McMurdo
+Antarctica/Palmer
+Antarctica/Rothera
+Antarctica/South_Pole
+Antarctica/Syowa
+Antarctica/Troll
+Antarctica/Vostok
+Arctic/Longyearbyen
+Asia/Aden
+Asia/Almaty
+Asia/Amman
+Asia/Anadyr
+Asia/Aqtau
+Asia/Aqtobe
+Asia/Ashgabat
+Asia/Ashkhabad
+Asia/Baghdad
+Asia/Bahrain
+Asia/Baku
+Asia/Bangkok
+Asia/Beirut
+Asia/Bishkek
+Asia/Brunei
+Asia/Calcutta
+Asia/Chita
+Asia/Choibalsan
+Asia/Chongqing
+Asia/Chungking
+Asia/Colombo
+Asia/Dacca
+Asia/Damascus
+Asia/Dhaka
+Asia/Dili
+Asia/Dubai
+Asia/Dushanbe
+Asia/Gaza
+Asia/Harbin
+Asia/Hong_Kong
+Asia/Hovd
+Asia/Irkutsk
+Asia/Istanbul
+Asia/Jakarta
+Asia/Jayapura
+Asia/Jerusalem
+Asia/Kabul
+Asia/Kamchatka
+Asia/Karachi
+Asia/Kashgar
+Asia/Katmandu
+Asia/Khandyga
+Asia/Kolkata
+Asia/Krasnoyarsk
+Asia/Kuala_Lumpur
+Asia/Kuching
+Asia/Kuwait
+Asia/Macao
+Asia/Macau
+Asia/Magadan
+Asia/Makassar
+Asia/Manila
+Asia/Muscat
+Asia/Nicosia
+Asia/Novosibirsk
+Asia/Omsk
+Asia/Oral
+Asia/Phnom_Penh
+Asia/Pontianak
+Asia/Pyongyang
+Asia/Qatar
+Asia/Qyzylorda
+Asia/Rangoon
+Asia/Riyadh
+Asia/Saigon
+Asia/Sakhalin
+Asia/Samarkand
+Asia/Seoul
+Asia/Shanghai
+Asia/Singapore
+Asia/Srednekolymsk
+Asia/Taipei
+Asia/Tashkent
+Asia/Tbilisi
+Asia/Tehran
+Asia/Tel_Aviv
+Asia/Thimbu
+Asia/Thimphu
+Asia/Tokyo
+Asia/Ujung_Pandang
+Asia/Ulaanbaatar
+Asia/Ulan_Bator
+Asia/Urumqi
+Asia/Ust-Nera
+Asia/Vientiane
+Asia/Vladivostok
+Asia/Yakutsk
+Asia/Yekaterinburg
+Asia/Yerevan
+Atlantic/Azores
+Atlantic/Bermuda
+Atlantic/Canary
+Atlantic/Cape_Verde
+Atlantic/Faeroe
+Atlantic/Jan_Mayen
+Atlantic/Madeira
+Atlantic/Reykjavik
+Atlantic/South_Georgia
+Atlantic/St_Helena
+Atlantic/Stanley
+Australia/ACT
+Australia/Adelaide
+Australia/Brisbane
+Australia/Broken_Hill
+Australia/Canberra
+Australia/Currie
+Australia/Darwin
+Australia/Hobart
+Australia/LHI
+Australia/Lindeman
+Australia/Lord_Howe
+Australia/Melbourne
+Australia/NSW
+Australia/North
+Australia/Perth
+Australia/Queensland
+Australia/South
+Australia/Sydney
+Australia/Tasmania
+Australia/Victoria
+Australia/West
+Australia/Yancowinna
+Brazil/Acre
+Brazil/DeNoronha
+Brazil/East
+Brazil/West
+CET
+CST6CDT
+Canada/Atlantic
+Canada/Central
+Canada/East-Saskatchewan
+Canada/Eastern
+Canada/Mountain
+Canada/Newfoundland
+Canada/Pacific
+Canada/Saskatchewan
+Canada/Yukon
+Chile/Continental
+Chile/EasterIsland
+Cuba
+EET
+EST
+EST5EDT
+Egypt
+Eire
+Etc/GMT
+Etc/GMT+0
+Etc/GMT+1
+Etc/GMT+10
+Etc/GMT+11
+Etc/GMT+12
+Etc/GMT+2
+Etc/GMT+3
+Etc/GMT+4
+Etc/GMT+5
+Etc/GMT+6
+Etc/GMT+7
+Etc/GMT+8
+Etc/GMT+9
+Etc/GMT-0
+Etc/GMT-1
+Etc/GMT-10
+Etc/GMT-11
+Etc/GMT-12
+Etc/GMT-13
+Etc/GMT-14
+Etc/GMT-2
+Etc/GMT-3
+Etc/GMT-4
+Etc/GMT-5
+Etc/GMT-6
+Etc/GMT-7
+Etc/GMT-8
+Etc/GMT-9
+Etc/GMT0
+Etc/Greenwich
+Etc/UCT
+Etc/UTC
+Etc/Universal
+Etc/Zulu
+Europe/Amsterdam
+Europe/Andorra
+Europe/Athens
+Europe/Belfast
+Europe/Belgrade
+Europe/Berlin
+Europe/Bratislava
+Europe/Brussels
+Europe/Bucharest
+Europe/Budapest
+Europe/Busingen
+Europe/Chisinau
+Europe/Copenhagen
+Europe/Dublin
+Europe/Gibraltar
+Europe/Guernsey
+Europe/Helsinki
+Europe/Isle_of_Man
+Europe/Istanbul
+Europe/Jersey
+Europe/Kaliningrad
+Europe/Kiev
+Europe/Lisbon
+Europe/Ljubljana
+Europe/London
+Europe/Luxembourg
+Europe/Madrid
+Europe/Malta
+Europe/Mariehamn
+Europe/Minsk
+Europe/Monaco
+Europe/Moscow
+Europe/Nicosia
+Europe/Oslo
+Europe/Paris
+Europe/Podgorica
+Europe/Prague
+Europe/Riga
+Europe/Rome
+Europe/Samara
+Europe/San_Marino
+Europe/Sarajevo
+Europe/Simferopol
+Europe/Skopje
+Europe/Sofia
+Europe/Stockholm
+Europe/Tallinn
+Europe/Tirane
+Europe/Tiraspol
+Europe/Uzhgorod
+Europe/Vaduz
+Europe/Vatican
+Europe/Vienna
+Europe/Vilnius
+Europe/Volgograd
+Europe/Warsaw
+Europe/Zagreb
+Europe/Zaporozhye
+Europe/Zurich
+Factory
+GB
+GB-Eire
+GMT
+GMT+0
+GMT-0
+GMT0
+Greenwich
+HST
+Hongkong
+Iceland
+Indian/Antananarivo
+Indian/Chagos
+Indian/Christmas
+Indian/Cocos
+Indian/Comoro
+Indian/Kerguelen
+Indian/Mahe
+Indian/Maldives
+Indian/Mauritius
+Indian/Mayotte
+Indian/Reunion
+Iran
+Israel
+Jamaica
+Japan
+Kwajalein
+Libya
+MET
+MST
+MST7MDT
+Mexico/BajaNorte
+Mexico/BajaSur
+Mexico/General
+NZ
+NZ-CHAT
+Navajo
+PRC
+PST8PDT
+Pacific/Apia
+Pacific/Auckland
+Pacific/Bougainville
+Pacific/Chatham
+Pacific/Easter
+Pacific/Efate
+Pacific/Enderbury
+Pacific/Fakaofo
+Pacific/Fiji
+Pacific/Funafuti
+Pacific/Galapagos
+Pacific/Gambier
+Pacific/Guadalcanal
+Pacific/Guam
+Pacific/Honolulu
+Pacific/Johnston
+Pacific/Kiritimati
+Pacific/Kosrae
+Pacific/Kwajalein
+Pacific/Majuro
+Pacific/Marquesas
+Pacific/Midway
+Pacific/Nauru
+Pacific/Niue
+Pacific/Norfolk
+Pacific/Noumea
+Pacific/Pago_Pago
+Pacific/Palau
+Pacific/Pitcairn
+Pacific/Ponape
+Pacific/Port_Moresby
+Pacific/Rarotonga
+Pacific/Saipan
+Pacific/Samoa
+Pacific/Tahiti
+Pacific/Tarawa
+Pacific/Tongatapu
+Pacific/Truk
+Pacific/Wake
+Pacific/Wallis
+Pacific/Yap
+Poland
+Portugal
+ROC
+ROK
+Singapore
+Turkey
+UCT
+UTC
+Universal
+W-SU
+WET
+Zulu
+posix/Africa/Abidjan
+posix/Africa/Accra
+posix/Africa/Addis_Ababa
+posix/Africa/Algiers
+posix/Africa/Asmera
+posix/Africa/Bamako
+posix/Africa/Bangui
+posix/Africa/Banjul
+posix/Africa/Bissau
+posix/Africa/Blantyre
+posix/Africa/Brazzaville
+posix/Africa/Bujumbura
+posix/Africa/Cairo
+posix/Africa/Casablanca
+posix/Africa/Ceuta
+posix/Africa/Conakry
+posix/Africa/Dakar
+posix/Africa/Dar_es_Salaam
+posix/Africa/Djibouti
+posix/Africa/Douala
+posix/Africa/El_Aaiun
+posix/Africa/Freetown
+posix/Africa/Gaborone
+posix/Africa/Harare
+posix/Africa/Johannesburg
+posix/Africa/Kampala
+posix/Africa/Khartoum
+posix/Africa/Kigali
+posix/Africa/Kinshasa
+posix/Africa/Lagos
+posix/Africa/Libreville
+posix/Africa/Lome
+posix/Africa/Luanda
+posix/Africa/Lubumbashi
+posix/Africa/Lusaka
+posix/Africa/Malabo
+posix/Africa/Maputo
+posix/Africa/Maseru
+posix/Africa/Mbabane
+posix/Africa/Mogadishu
+posix/Africa/Monrovia
+posix/Africa/Nairobi
+posix/Africa/Ndjamena
+posix/Africa/Niamey
+posix/Africa/Nouakchott
+posix/Africa/Ouagadougou
+posix/Africa/Porto-Novo
+posix/Africa/Sao_Tome
+posix/Africa/Timbuktu
+posix/Africa/Tripoli
+posix/Africa/Tunis
+posix/Africa/Windhoek
+posix/America/Adak
+posix/America/Anchorage
+posix/America/Anguilla
+posix/America/Antigua
+posix/America/Araguaina
+posix/America/Argentina/Buenos_Aires
+posix/America/Argentina/Catamarca
+posix/America/Argentina/ComodRivadavia
+posix/America/Argentina/Cordoba
+posix/America/Argentina/Jujuy
+posix/America/Argentina/La_Rioja
+posix/America/Argentina/Mendoza
+posix/America/Argentina/Rio_Gallegos
+posix/America/Argentina/San_Juan
+posix/America/Argentina/Tucuman
+posix/America/Argentina/Ushuaia
+posix/America/Aruba
+posix/America/Asuncion
+posix/America/Atikokan
+posix/America/Atka
+posix/America/Bahia
+posix/America/Barbados
+posix/America/Belem
+posix/America/Belize
+posix/America/Blanc-Sablon
+posix/America/Boa_Vista
+posix/America/Bogota
+posix/America/Boise
+posix/America/Buenos_Aires
+posix/America/Cambridge_Bay
+posix/America/Campo_Grande
+posix/America/Cancun
+posix/America/Caracas
+posix/America/Catamarca
+posix/America/Cayenne
+posix/America/Cayman
+posix/America/Chicago
+posix/America/Chihuahua
+posix/America/Coral_Harbour
+posix/America/Cordoba
+posix/America/Costa_Rica
+posix/America/Cuiaba
+posix/America/Curacao
+posix/America/Danmarkshavn
+posix/America/Dawson
+posix/America/Dawson_Creek
+posix/America/Denver
+posix/America/Detroit
+posix/America/Dominica
+posix/America/Edmonton
+posix/America/Eirunepe
+posix/America/El_Salvador
+posix/America/Ensenada
+posix/America/Fort_Wayne
+posix/America/Fortaleza
+posix/America/Glace_Bay
+posix/America/Godthab
+posix/America/Goose_Bay
+posix/America/Grand_Turk
+posix/America/Grenada
+posix/America/Guadeloupe
+posix/America/Guatemala
+posix/America/Guayaquil
+posix/America/Guyana
+posix/America/Halifax
+posix/America/Havana
+posix/America/Hermosillo
+posix/America/Indiana/Indianapolis
+posix/America/Indiana/Knox
+posix/America/Indiana/Marengo
+posix/America/Indiana/Petersburg
+posix/America/Indiana/Tell_City
+posix/America/Indiana/Vevay
+posix/America/Indiana/Vincennes
+posix/America/Indianapolis
+posix/America/Inuvik
+posix/America/Iqaluit
+posix/America/Jamaica
+posix/America/Jujuy
+posix/America/Juneau
+posix/America/Kentucky/Louisville
+posix/America/Kentucky/Monticello
+posix/America/Knox_IN
+posix/America/La_Paz
+posix/America/Lima
+posix/America/Los_Angeles
+posix/America/Louisville
+posix/America/Maceio
+posix/America/Managua
+posix/America/Manaus
+posix/America/Martinique
+posix/America/Mazatlan
+posix/America/Mendoza
+posix/America/Menominee
+posix/America/Merida
+posix/America/Mexico_City
+posix/America/Miquelon
+posix/America/Moncton
+posix/America/Monterrey
+posix/America/Montevideo
+posix/America/Montreal
+posix/America/Montserrat
+posix/America/Nassau
+posix/America/New_York
+posix/America/Nipigon
+posix/America/Nome
+posix/America/Noronha
+posix/America/North_Dakota/Center
+posix/America/North_Dakota/New_Salem
+posix/America/Panama
+posix/America/Pangnirtung
+posix/America/Paramaribo
+posix/America/Phoenix
+posix/America/Port-au-Prince
+posix/America/Port_of_Spain
+posix/America/Porto_Acre
+posix/America/Porto_Velho
+posix/America/Puerto_Rico
+posix/America/Rainy_River
+posix/America/Rankin_Inlet
+posix/America/Recife
+posix/America/Regina
+posix/America/Rio_Branco
+posix/America/Rosario
+posix/America/Santiago
+posix/America/Santo_Domingo
+posix/America/Sao_Paulo
+posix/America/Scoresbysund
+posix/America/Shiprock
+posix/America/St_Johns
+posix/America/St_Kitts
+posix/America/St_Lucia
+posix/America/St_Thomas
+posix/America/St_Vincent
+posix/America/Swift_Current
+posix/America/Tegucigalpa
+posix/America/Thule
+posix/America/Thunder_Bay
+posix/America/Tijuana
+posix/America/Toronto
+posix/America/Tortola
+posix/America/Vancouver
+posix/America/Virgin
+posix/America/Whitehorse
+posix/America/Winnipeg
+posix/America/Yakutat
+posix/America/Yellowknife
+posix/Antarctica/Casey
+posix/Antarctica/Davis
+posix/Antarctica/DumontDUrville
+posix/Antarctica/Mawson
+posix/Antarctica/McMurdo
+posix/Antarctica/Palmer
+posix/Antarctica/Rothera
+posix/Antarctica/South_Pole
+posix/Antarctica/Syowa
+posix/Antarctica/Troll
+posix/Antarctica/Vostok
+posix/Arctic/Longyearbyen
+posix/Asia/Aden
+posix/Asia/Almaty
+posix/Asia/Amman
+posix/Asia/Anadyr
+posix/Asia/Aqtau
+posix/Asia/Aqtobe
+posix/Asia/Ashgabat
+posix/Asia/Ashkhabad
+posix/Asia/Baghdad
+posix/Asia/Bahrain
+posix/Asia/Baku
+posix/Asia/Bangkok
+posix/Asia/Beirut
+posix/Asia/Bishkek
+posix/Asia/Brunei
+posix/Asia/Calcutta
+posix/Asia/Chita
+posix/Asia/Choibalsan
+posix/Asia/Chongqing
+posix/Asia/Chungking
+posix/Asia/Colombo
+posix/Asia/Dacca
+posix/Asia/Damascus
+posix/Asia/Dhaka
+posix/Asia/Dili
+posix/Asia/Dubai
+posix/Asia/Dushanbe
+posix/Asia/Gaza
+posix/Asia/Harbin
+posix/Asia/Hong_Kong
+posix/Asia/Hovd
+posix/Asia/Irkutsk
+posix/Asia/Istanbul
+posix/Asia/Jakarta
+posix/Asia/Jayapura
+posix/Asia/Jerusalem
+posix/Asia/Kabul
+posix/Asia/Kamchatka
+posix/Asia/Karachi
+posix/Asia/Kashgar
+posix/Asia/Katmandu
+posix/Asia/Krasnoyarsk
+posix/Asia/Kuala_Lumpur
+posix/Asia/Kuching
+posix/Asia/Kuwait
+posix/Asia/Macao
+posix/Asia/Macau
+posix/Asia/Magadan
+posix/Asia/Makassar
+posix/Asia/Manila
+posix/Asia/Muscat
+posix/Asia/Nicosia
+posix/Asia/Novosibirsk
+posix/Asia/Omsk
+posix/Asia/Oral
+posix/Asia/Phnom_Penh
+posix/Asia/Pontianak
+posix/Asia/Pyongyang
+posix/Asia/Qatar
+posix/Asia/Qyzylorda
+posix/Asia/Rangoon
+posix/Asia/Riyadh
+posix/Asia/Saigon
+posix/Asia/Sakhalin
+posix/Asia/Samarkand
+posix/Asia/Seoul
+posix/Asia/Shanghai
+posix/Asia/Singapore
+posix/Asia/Srednekolymsk
+posix/Asia/Taipei
+posix/Asia/Tashkent
+posix/Asia/Tbilisi
+posix/Asia/Tehran
+posix/Asia/Tel_Aviv
+posix/Asia/Thimbu
+posix/Asia/Thimphu
+posix/Asia/Tokyo
+posix/Asia/Ujung_Pandang
+posix/Asia/Ulaanbaatar
+posix/Asia/Ulan_Bator
+posix/Asia/Urumqi
+posix/Asia/Vientiane
+posix/Asia/Vladivostok
+posix/Asia/Yakutsk
+posix/Asia/Yekaterinburg
+posix/Asia/Yerevan
+posix/Atlantic/Azores
+posix/Atlantic/Bermuda
+posix/Atlantic/Canary
+posix/Atlantic/Cape_Verde
+posix/Atlantic/Faeroe
+posix/Atlantic/Jan_Mayen
+posix/Atlantic/Madeira
+posix/Atlantic/Reykjavik
+posix/Atlantic/South_Georgia
+posix/Atlantic/St_Helena
+posix/Atlantic/Stanley
+posix/Australia/ACT
+posix/Australia/Adelaide
+posix/Australia/Brisbane
+posix/Australia/Broken_Hill
+posix/Australia/Canberra
+posix/Australia/Currie
+posix/Australia/Darwin
+posix/Australia/Hobart
+posix/Australia/LHI
+posix/Australia/Lindeman
+posix/Australia/Lord_Howe
+posix/Australia/Melbourne
+posix/Australia/NSW
+posix/Australia/North
+posix/Australia/Perth
+posix/Australia/Queensland
+posix/Australia/South
+posix/Australia/Sydney
+posix/Australia/Tasmania
+posix/Australia/Victoria
+posix/Australia/West
+posix/Australia/Yancowinna
+posix/Brazil/Acre
+posix/Brazil/DeNoronha
+posix/Brazil/East
+posix/Brazil/West
+posix/CET
+posix/CST6CDT
+posix/Canada/Atlantic
+posix/Canada/Central
+posix/Canada/East-Saskatchewan
+posix/Canada/Eastern
+posix/Canada/Mountain
+posix/Canada/Newfoundland
+posix/Canada/Pacific
+posix/Canada/Saskatchewan
+posix/Canada/Yukon
+posix/Chile/Continental
+posix/Chile/EasterIsland
+posix/Cuba
+posix/EET
+posix/EST
+posix/EST5EDT
+posix/Egypt
+posix/Eire
+posix/Etc/GMT
+posix/Etc/GMT+0
+posix/Etc/GMT+1
+posix/Etc/GMT+10
+posix/Etc/GMT+11
+posix/Etc/GMT+12
+posix/Etc/GMT+2
+posix/Etc/GMT+3
+posix/Etc/GMT+4
+posix/Etc/GMT+5
+posix/Etc/GMT+6
+posix/Etc/GMT+7
+posix/Etc/GMT+8
+posix/Etc/GMT+9
+posix/Etc/GMT-0
+posix/Etc/GMT-1
+posix/Etc/GMT-10
+posix/Etc/GMT-11
+posix/Etc/GMT-12
+posix/Etc/GMT-13
+posix/Etc/GMT-14
+posix/Etc/GMT-2
+posix/Etc/GMT-3
+posix/Etc/GMT-4
+posix/Etc/GMT-5
+posix/Etc/GMT-6
+posix/Etc/GMT-7
+posix/Etc/GMT-8
+posix/Etc/GMT-9
+posix/Etc/GMT0
+posix/Etc/Greenwich
+posix/Etc/UCT
+posix/Etc/UTC
+posix/Etc/Universal
+posix/Etc/Zulu
+posix/Europe/Amsterdam
+posix/Europe/Andorra
+posix/Europe/Athens
+posix/Europe/Belfast
+posix/Europe/Belgrade
+posix/Europe/Berlin
+posix/Europe/Bratislava
+posix/Europe/Brussels
+posix/Europe/Bucharest
+posix/Europe/Budapest
+posix/Europe/Chisinau
+posix/Europe/Copenhagen
+posix/Europe/Dublin
+posix/Europe/Gibraltar
+posix/Europe/Guernsey
+posix/Europe/Helsinki
+posix/Europe/Isle_of_Man
+posix/Europe/Istanbul
+posix/Europe/Jersey
+posix/Europe/Kaliningrad
+posix/Europe/Kiev
+posix/Europe/Lisbon
+posix/Europe/Ljubljana
+posix/Europe/London
+posix/Europe/Luxembourg
+posix/Europe/Madrid
+posix/Europe/Malta
+posix/Europe/Mariehamn
+posix/Europe/Minsk
+posix/Europe/Monaco
+posix/Europe/Moscow
+posix/Europe/Nicosia
+posix/Europe/Oslo
+posix/Europe/Paris
+posix/Europe/Podgorica
+posix/Europe/Prague
+posix/Europe/Riga
+posix/Europe/Rome
+posix/Europe/Samara
+posix/Europe/San_Marino
+posix/Europe/Sarajevo
+posix/Europe/Simferopol
+posix/Europe/Skopje
+posix/Europe/Sofia
+posix/Europe/Stockholm
+posix/Europe/Tallinn
+posix/Europe/Tirane
+posix/Europe/Tiraspol
+posix/Europe/Uzhgorod
+posix/Europe/Vaduz
+posix/Europe/Vatican
+posix/Europe/Vienna
+posix/Europe/Vilnius
+posix/Europe/Volgograd
+posix/Europe/Warsaw
+posix/Europe/Zagreb
+posix/Europe/Zaporozhye
+posix/Europe/Zurich
+posix/Factory
+posix/GB
+posix/GB-Eire
+posix/GMT
+posix/GMT+0
+posix/GMT-0
+posix/GMT0
+posix/Greenwich
+posix/HST
+posix/Hongkong
+posix/Iceland
+posix/Indian/Antananarivo
+posix/Indian/Chagos
+posix/Indian/Christmas
+posix/Indian/Cocos
+posix/Indian/Comoro
+posix/Indian/Kerguelen
+posix/Indian/Mahe
+posix/Indian/Maldives
+posix/Indian/Mauritius
+posix/Indian/Mayotte
+posix/Indian/Reunion
+posix/Iran
+posix/Israel
+posix/Jamaica
+posix/Japan
+posix/Kwajalein
+posix/Libya
+posix/MET
+posix/MST
+posix/MST7MDT
+posix/Mexico/BajaNorte
+posix/Mexico/BajaSur
+posix/Mexico/General
+posix/NZ
+posix/NZ-CHAT
+posix/Navajo
+posix/PRC
+posix/PST8PDT
+posix/Pacific/Apia
+posix/Pacific/Auckland
+posix/Pacific/Bougainville
+posix/Pacific/Chatham
+posix/Pacific/Easter
+posix/Pacific/Efate
+posix/Pacific/Enderbury
+posix/Pacific/Fakaofo
+posix/Pacific/Fiji
+posix/Pacific/Funafuti
+posix/Pacific/Galapagos
+posix/Pacific/Gambier
+posix/Pacific/Guadalcanal
+posix/Pacific/Guam
+posix/Pacific/Honolulu
+posix/Pacific/Johnston
+posix/Pacific/Kiritimati
+posix/Pacific/Kosrae
+posix/Pacific/Kwajalein
+posix/Pacific/Majuro
+posix/Pacific/Marquesas
+posix/Pacific/Midway
+posix/Pacific/Nauru
+posix/Pacific/Niue
+posix/Pacific/Norfolk
+posix/Pacific/Noumea
+posix/Pacific/Pago_Pago
+posix/Pacific/Palau
+posix/Pacific/Pitcairn
+posix/Pacific/Ponape
+posix/Pacific/Port_Moresby
+posix/Pacific/Rarotonga
+posix/Pacific/Saipan
+posix/Pacific/Samoa
+posix/Pacific/Tahiti
+posix/Pacific/Tarawa
+posix/Pacific/Tongatapu
+posix/Pacific/Truk
+posix/Pacific/Wake
+posix/Pacific/Wallis
+posix/Pacific/Yap
+posix/Poland
+posix/Portugal
+posix/ROC
+posix/ROK
+posix/Singapore
+posix/Turkey
+posix/UCT
+posix/US/Alaska
+posix/US/Aleutian
+posix/US/Arizona
+posix/US/Central
+posix/US/East-Indiana
+posix/US/Eastern
+posix/US/Hawaii
+posix/US/Indiana-Starke
+posix/US/Michigan
+posix/US/Mountain
+posix/US/Pacific
+posix/US/Pacific-New
+posix/US/Samoa
+posix/UTC
+posix/Universal
+posix/W-SU
+posix/WET
+posix/Zulu
+posixrules
+right/Africa/Abidjan
+right/Africa/Accra
+right/Africa/Addis_Ababa
+right/Africa/Algiers
+right/Africa/Asmera
+right/Africa/Bamako
+right/Africa/Bangui
+right/Africa/Banjul
+right/Africa/Bissau
+right/Africa/Blantyre
+right/Africa/Brazzaville
+right/Africa/Bujumbura
+right/Africa/Cairo
+right/Africa/Casablanca
+right/Africa/Ceuta
+right/Africa/Conakry
+right/Africa/Dakar
+right/Africa/Dar_es_Salaam
+right/Africa/Djibouti
+right/Africa/Douala
+right/Africa/El_Aaiun
+right/Africa/Freetown
+right/Africa/Gaborone
+right/Africa/Harare
+right/Africa/Johannesburg
+right/Africa/Kampala
+right/Africa/Khartoum
+right/Africa/Kigali
+right/Africa/Kinshasa
+right/Africa/Lagos
+right/Africa/Libreville
+right/Africa/Lome
+right/Africa/Luanda
+right/Africa/Lubumbashi
+right/Africa/Lusaka
+right/Africa/Malabo
+right/Africa/Maputo
+right/Africa/Maseru
+right/Africa/Mbabane
+right/Africa/Mogadishu
+right/Africa/Monrovia
+right/Africa/Nairobi
+right/Africa/Ndjamena
+right/Africa/Niamey
+right/Africa/Nouakchott
+right/Africa/Ouagadougou
+right/Africa/Porto-Novo
+right/Africa/Sao_Tome
+right/Africa/Timbuktu
+right/Africa/Tripoli
+right/Africa/Tunis
+right/Africa/Windhoek
+right/America/Adak
+right/America/Anchorage
+right/America/Anguilla
+right/America/Antigua
+right/America/Araguaina
+right/America/Argentina/Buenos_Aires
+right/America/Argentina/Catamarca
+right/America/Argentina/ComodRivadavia
+right/America/Argentina/Cordoba
+right/America/Argentina/Jujuy
+right/America/Argentina/La_Rioja
+right/America/Argentina/Mendoza
+right/America/Argentina/Rio_Gallegos
+right/America/Argentina/San_Juan
+right/America/Argentina/Tucuman
+right/America/Argentina/Ushuaia
+right/America/Aruba
+right/America/Asuncion
+right/America/Atikokan
+right/America/Atka
+right/America/Bahia
+right/America/Barbados
+right/America/Belem
+right/America/Belize
+right/America/Blanc-Sablon
+right/America/Boa_Vista
+right/America/Bogota
+right/America/Boise
+right/America/Buenos_Aires
+right/America/Cambridge_Bay
+right/America/Campo_Grande
+right/America/Cancun
+right/America/Caracas
+right/America/Catamarca
+right/America/Cayenne
+right/America/Cayman
+right/America/Chicago
+right/America/Chihuahua
+right/America/Coral_Harbour
+right/America/Cordoba
+right/America/Costa_Rica
+right/America/Cuiaba
+right/America/Curacao
+right/America/Danmarkshavn
+right/America/Dawson
+right/America/Dawson_Creek
+right/America/Denver
+right/America/Detroit
+right/America/Dominica
+right/America/Edmonton
+right/America/Eirunepe
+right/America/El_Salvador
+right/America/Ensenada
+right/America/Fort_Wayne
+right/America/Fortaleza
+right/America/Glace_Bay
+right/America/Godthab
+right/America/Goose_Bay
+right/America/Grand_Turk
+right/America/Grenada
+right/America/Guadeloupe
+right/America/Guatemala
+right/America/Guayaquil
+right/America/Guyana
+right/America/Halifax
+right/America/Havana
+right/America/Hermosillo
+right/America/Indiana/Indianapolis
+right/America/Indiana/Knox
+right/America/Indiana/Marengo
+right/America/Indiana/Petersburg
+right/America/Indiana/Tell_City
+right/America/Indiana/Vevay
+right/America/Indiana/Vincennes
+right/America/Indianapolis
+right/America/Inuvik
+right/America/Iqaluit
+right/America/Jamaica
+right/America/Jujuy
+right/America/Juneau
+right/America/Kentucky/Louisville
+right/America/Kentucky/Monticello
+right/America/Knox_IN
+right/America/La_Paz
+right/America/Lima
+right/America/Los_Angeles
+right/America/Louisville
+right/America/Maceio
+right/America/Managua
+right/America/Manaus
+right/America/Martinique
+right/America/Mazatlan
+right/America/Mendoza
+right/America/Menominee
+right/America/Merida
+right/America/Mexico_City
+right/America/Miquelon
+right/America/Moncton
+right/America/Monterrey
+right/America/Montevideo
+right/America/Montreal
+right/America/Montserrat
+right/America/Nassau
+right/America/New_York
+right/America/Nipigon
+right/America/Nome
+right/America/Noronha
+right/America/North_Dakota/Center
+right/America/North_Dakota/New_Salem
+right/America/Panama
+right/America/Pangnirtung
+right/America/Paramaribo
+right/America/Phoenix
+right/America/Port-au-Prince
+right/America/Port_of_Spain
+right/America/Porto_Acre
+right/America/Porto_Velho
+right/America/Puerto_Rico
+right/America/Rainy_River
+right/America/Rankin_Inlet
+right/America/Recife
+right/America/Regina
+right/America/Rio_Branco
+right/America/Rosario
+right/America/Santiago
+right/America/Santo_Domingo
+right/America/Sao_Paulo
+right/America/Scoresbysund
+right/America/Shiprock
+right/America/St_Johns
+right/America/St_Kitts
+right/America/St_Lucia
+right/America/St_Thomas
+right/America/St_Vincent
+right/America/Swift_Current
+right/America/Tegucigalpa
+right/America/Thule
+right/America/Thunder_Bay
+right/America/Tijuana
+right/America/Toronto
+right/America/Tortola
+right/America/Vancouver
+right/America/Virgin
+right/America/Whitehorse
+right/America/Winnipeg
+right/America/Yakutat
+right/America/Yellowknife
+right/Antarctica/Casey
+right/Antarctica/Davis
+right/Antarctica/DumontDUrville
+right/Antarctica/Mawson
+right/Antarctica/McMurdo
+right/Antarctica/Palmer
+right/Antarctica/Rothera
+right/Antarctica/South_Pole
+right/Antarctica/Syowa
+right/Antarctica/Troll
+right/Antarctica/Vostok
+right/Arctic/Longyearbyen
+right/Asia/Aden
+right/Asia/Almaty
+right/Asia/Amman
+right/Asia/Anadyr
+right/Asia/Aqtau
+right/Asia/Aqtobe
+right/Asia/Ashgabat
+right/Asia/Ashkhabad
+right/Asia/Baghdad
+right/Asia/Bahrain
+right/Asia/Baku
+right/Asia/Bangkok
+right/Asia/Beirut
+right/Asia/Bishkek
+right/Asia/Brunei
+right/Asia/Calcutta
+right/Asia/Chita
+right/Asia/Choibalsan
+right/Asia/Chongqing
+right/Asia/Chungking
+right/Asia/Colombo
+right/Asia/Dacca
+right/Asia/Damascus
+right/Asia/Dhaka
+right/Asia/Dili
+right/Asia/Dubai
+right/Asia/Dushanbe
+right/Asia/Gaza
+right/Asia/Harbin
+right/Asia/Hong_Kong
+right/Asia/Hovd
+right/Asia/Irkutsk
+right/Asia/Istanbul
+right/Asia/Jakarta
+right/Asia/Jayapura
+right/Asia/Jerusalem
+right/Asia/Kabul
+right/Asia/Kamchatka
+right/Asia/Karachi
+right/Asia/Kashgar
+right/Asia/Katmandu
+right/Asia/Krasnoyarsk
+right/Asia/Kuala_Lumpur
+right/Asia/Kuching
+right/Asia/Kuwait
+right/Asia/Macao
+right/Asia/Macau
+right/Asia/Magadan
+right/Asia/Makassar
+right/Asia/Manila
+right/Asia/Muscat
+right/Asia/Nicosia
+right/Asia/Novosibirsk
+right/Asia/Omsk
+right/Asia/Oral
+right/Asia/Phnom_Penh
+right/Asia/Pontianak
+right/Asia/Pyongyang
+right/Asia/Qatar
+right/Asia/Qyzylorda
+right/Asia/Rangoon
+right/Asia/Riyadh
+right/Asia/Saigon
+right/Asia/Sakhalin
+right/Asia/Samarkand
+right/Asia/Seoul
+right/Asia/Shanghai
+right/Asia/Singapore
+right/Asia/Srednekolymsk
+right/Asia/Taipei
+right/Asia/Tashkent
+right/Asia/Tbilisi
+right/Asia/Tehran
+right/Asia/Tel_Aviv
+right/Asia/Thimbu
+right/Asia/Thimphu
+right/Asia/Tokyo
+right/Asia/Ujung_Pandang
+right/Asia/Ulaanbaatar
+right/Asia/Ulan_Bator
+right/Asia/Urumqi
+right/Asia/Vientiane
+right/Asia/Vladivostok
+right/Asia/Yakutsk
+right/Asia/Yekaterinburg
+right/Asia/Yerevan
+right/Atlantic/Azores
+right/Atlantic/Bermuda
+right/Atlantic/Canary
+right/Atlantic/Cape_Verde
+right/Atlantic/Faeroe
+right/Atlantic/Jan_Mayen
+right/Atlantic/Madeira
+right/Atlantic/Reykjavik
+right/Atlantic/South_Georgia
+right/Atlantic/St_Helena
+right/Atlantic/Stanley
+right/Australia/ACT
+right/Australia/Adelaide
+right/Australia/Brisbane
+right/Australia/Broken_Hill
+right/Australia/Canberra
+right/Australia/Currie
+right/Australia/Darwin
+right/Australia/Hobart
+right/Australia/LHI
+right/Australia/Lindeman
+right/Australia/Lord_Howe
+right/Australia/Melbourne
+right/Australia/NSW
+right/Australia/North
+right/Australia/Perth
+right/Australia/Queensland
+right/Australia/South
+right/Australia/Sydney
+right/Australia/Tasmania
+right/Australia/Victoria
+right/Australia/West
+right/Australia/Yancowinna
+right/Brazil/Acre
+right/Brazil/DeNoronha
+right/Brazil/East
+right/Brazil/West
+right/CET
+right/CST6CDT
+right/Canada/Atlantic
+right/Canada/Central
+right/Canada/East-Saskatchewan
+right/Canada/Eastern
+right/Canada/Mountain
+right/Canada/Newfoundland
+right/Canada/Pacific
+right/Canada/Saskatchewan
+right/Canada/Yukon
+right/Chile/Continental
+right/Chile/EasterIsland
+right/Cuba
+right/EET
+right/EST
+right/EST5EDT
+right/Egypt
+right/Eire
+right/Etc/GMT
+right/Etc/GMT+0
+right/Etc/GMT+1
+right/Etc/GMT+10
+right/Etc/GMT+11
+right/Etc/GMT+12
+right/Etc/GMT+2
+right/Etc/GMT+3
+right/Etc/GMT+4
+right/Etc/GMT+5
+right/Etc/GMT+6
+right/Etc/GMT+7
+right/Etc/GMT+8
+right/Etc/GMT+9
+right/Etc/GMT-0
+right/Etc/GMT-1
+right/Etc/GMT-10
+right/Etc/GMT-11
+right/Etc/GMT-12
+right/Etc/GMT-13
+right/Etc/GMT-14
+right/Etc/GMT-2
+right/Etc/GMT-3
+right/Etc/GMT-4
+right/Etc/GMT-5
+right/Etc/GMT-6
+right/Etc/GMT-7
+right/Etc/GMT-8
+right/Etc/GMT-9
+right/Etc/GMT0
+right/Etc/Greenwich
+right/Etc/UCT
+right/Etc/UTC
+right/Etc/Universal
+right/Etc/Zulu
+right/Europe/Amsterdam
+right/Europe/Andorra
+right/Europe/Athens
+right/Europe/Belfast
+right/Europe/Belgrade
+right/Europe/Berlin
+right/Europe/Bratislava
+right/Europe/Brussels
+right/Europe/Bucharest
+right/Europe/Budapest
+right/Europe/Chisinau
+right/Europe/Copenhagen
+right/Europe/Dublin
+right/Europe/Gibraltar
+right/Europe/Guernsey
+right/Europe/Helsinki
+right/Europe/Isle_of_Man
+right/Europe/Istanbul
+right/Europe/Jersey
+right/Europe/Kaliningrad
+right/Europe/Kiev
+right/Europe/Lisbon
+right/Europe/Ljubljana
+right/Europe/London
+right/Europe/Luxembourg
+right/Europe/Madrid
+right/Europe/Malta
+right/Europe/Mariehamn
+right/Europe/Minsk
+right/Europe/Monaco
+right/Europe/Moscow
+right/Europe/Nicosia
+right/Europe/Oslo
+right/Europe/Paris
+right/Europe/Podgorica
+right/Europe/Prague
+right/Europe/Riga
+right/Europe/Rome
+right/Europe/Samara
+right/Europe/San_Marino
+right/Europe/Sarajevo
+right/Europe/Simferopol
+right/Europe/Skopje
+right/Europe/Sofia
+right/Europe/Stockholm
+right/Europe/Tallinn
+right/Europe/Tirane
+right/Europe/Tiraspol
+right/Europe/Uzhgorod
+right/Europe/Vaduz
+right/Europe/Vatican
+right/Europe/Vienna
+right/Europe/Vilnius
+right/Europe/Volgograd
+right/Europe/Warsaw
+right/Europe/Zagreb
+right/Europe/Zaporozhye
+right/Europe/Zurich
+right/Factory
+right/GB
+right/GB-Eire
+right/GMT
+right/GMT+0
+right/GMT-0
+right/GMT0
+right/Greenwich
+right/HST
+right/Hongkong
+right/Iceland
+right/Indian/Antananarivo
+right/Indian/Chagos
+right/Indian/Christmas
+right/Indian/Cocos
+right/Indian/Comoro
+right/Indian/Kerguelen
+right/Indian/Mahe
+right/Indian/Maldives
+right/Indian/Mauritius
+right/Indian/Mayotte
+right/Indian/Reunion
+right/Iran
+right/Israel
+right/Jamaica
+right/Japan
+right/Kwajalein
+right/Libya
+right/MET
+right/MST
+right/MST7MDT
+right/Mexico/BajaNorte
+right/Mexico/BajaSur
+right/Mexico/General
+right/NZ
+right/NZ-CHAT
+right/Navajo
+right/PRC
+right/PST8PDT
+right/Pacific/Apia
+right/Pacific/Auckland
+right/Pacific/Bougainville
+right/Pacific/Chatham
+right/Pacific/Easter
+right/Pacific/Efate
+right/Pacific/Enderbury
+right/Pacific/Fakaofo
+right/Pacific/Fiji
+right/Pacific/Funafuti
+right/Pacific/Galapagos
+right/Pacific/Gambier
+right/Pacific/Guadalcanal
+right/Pacific/Guam
+right/Pacific/Honolulu
+right/Pacific/Johnston
+right/Pacific/Kiritimati
+right/Pacific/Kosrae
+right/Pacific/Kwajalein
+right/Pacific/Majuro
+right/Pacific/Marquesas
+right/Pacific/Midway
+right/Pacific/Nauru
+right/Pacific/Niue
+right/Pacific/Norfolk
+right/Pacific/Noumea
+right/Pacific/Pago_Pago
+right/Pacific/Palau
+right/Pacific/Pitcairn
+right/Pacific/Ponape
+right/Pacific/Port_Moresby
+right/Pacific/Rarotonga
+right/Pacific/Saipan
+right/Pacific/Samoa
+right/Pacific/Tahiti
+right/Pacific/Tarawa
+right/Pacific/Tongatapu
+right/Pacific/Truk
+right/Pacific/Wake
+right/Pacific/Wallis
+right/Pacific/Yap
+right/Poland
+right/Portugal
+right/ROC
+right/ROK
+right/Singapore
+right/Turkey
+right/UCT
+right/US/Alaska
+right/US/Aleutian
+right/US/Arizona
+right/US/Central
+right/US/East-Indiana
+right/US/Eastern
+right/US/Hawaii
+right/US/Indiana-Starke
+right/US/Michigan
+right/US/Mountain
+right/US/Pacific
+right/US/Pacific-New
+right/US/Samoa
+right/UTC
+right/Universal
+right/W-SU
+right/WET
+right/Zulu
diff --git a/patches/source/glibc/timezone-scripts/parts/04 b/patches/source/glibc/timezone-scripts/parts/04
new file mode 100644
index 000000000..ec36338b1
--- /dev/null
+++ b/patches/source/glibc/timezone-scripts/parts/04
@@ -0,0 +1,32 @@
+
+Type it at the prompt below exactly as it appears above. (NOTE: If you don't
+see your timezone, use "timeconfig" again after booting for the verbose list)
+
+EOF
+ echo -n "Timezone? "
+ read TIMEZONE;
+ echo
+
+ if [ -r $T_PX/usr/share/zoneinfo/$TIMEZONE -o \
+ -r /var/log/mount/usr/share/zoneinfo/$TIMEZONE -o \
+ -L $T_PX/usr/share/zoneinfo/$TIMEZONE -o \
+ -L /var/log/mount/usr/share/zoneinfo/$TIMEZONE ]; then
+ echo "Creating link from $TIMEZONE to localtime in /etc..."
+ echo
+ setzone $TIMEZONE
+ exit
+ else
+ cat << EOF
+
+Timezone $TIMEZONE could not be found. You may try again if you wish.
+Make sure you type the name exactly as it appears - this configuration script
+is case sensitive.
+
+Press [enter] to continue.
+
+EOF
+ read JUNK;
+ fi
+ done
+fi
+
diff --git a/patches/source/glibc/timezone-scripts/parts/README b/patches/source/glibc/timezone-scripts/parts/README
new file mode 100644
index 000000000..80d5cf5b4
--- /dev/null
+++ b/patches/source/glibc/timezone-scripts/parts/README
@@ -0,0 +1,2 @@
+Files 01 and 03 are samples, showing the format, and are
+not necessarily up to date...
diff --git a/patches/source/glibc/timezone-scripts/setup.timeconfig b/patches/source/glibc/timezone-scripts/setup.timeconfig
new file mode 100644
index 000000000..81ff7055f
--- /dev/null
+++ b/patches/source/glibc/timezone-scripts/setup.timeconfig
@@ -0,0 +1,3 @@
+#!/bin/sh
+#BLURB="Select your timezone"
+sh usr/sbin/timeconfig $*
diff --git a/patches/source/glibc/timezone-scripts/timeconfig b/patches/source/glibc/timezone-scripts/timeconfig
new file mode 100644
index 000000000..9f939b360
--- /dev/null
+++ b/patches/source/glibc/timezone-scripts/timeconfig
@@ -0,0 +1,3695 @@
+#!/bin/sh
+#
+# timeconfig Slackware Linux timezone configuration utility.
+#
+# Author: Patrick Volkerding <volkerdi@slackware.com>
+# Modified by: David Cantrell <david@slackware.com>, 06-Oct-2000
+#
+# ChangeLog:
+# 2014-10-22: Updated timezones from tzdata2014i. <pjv>
+# 2012-12-12: Updated timezones from tzdata2012j. <pjv>
+# 2008-03-10: Updated timezones from tzdata2008a. <pjv>
+# 2007-12-21: Updated timezones from tzdata2007j. <pjv>
+# 2006-12-03: Updated timezones from tzdata2006p. <pjv>
+# 2006-09-14: Updated timezones from tzdata2006k. <pjv>
+# 2006-08-22: Updated timezones from tzdata2006j.
+# 2006-08-13: Updated timezones from tzdata2006g.
+# 2006-03-13: Updated timezones from tzdata2006c.
+# 19-Feb-2001 Add new timezones from glibc-2.2.2.
+# 06-Oct-2000 Fixed a problem with selecting UTC time. It was writing
+# the hardwareclock file to the root disk and not your dest
+# partition. Changed the HWCLOCK_CONF variable to be
+# $T_PX/etc/hardwareclock to fix this. Thanks to David L.
+# Dickman <softbear@optonline.net> for finding this and
+# submitting a patch.
+#
+# 15-Mar-2000 Added the writeconf function to write out the
+# /etc/hardwareclock file which tells what the hardware clock
+# is set to (UTC or localtime).
+#
+# 03-Mar-2000 Reorganized script. Made one timezone set block, added
+# stage that asks the user if the hardware clock is set to
+# UTC.
+
+# setup our temp locations and variables
+TMP=/var/log/setup/tmp
+if [ -r $TMP/SeTT_PX ]; then
+ T_PX="`cat $TMP/SeTT_PX`"
+elif [ ! "$!" = "" ]; then
+ T_PX=$1
+else
+ T_PX=/
+fi
+
+# the hardware clock configuration file
+HWCLOCK_CONF=$T_PX/etc/hardwareclock
+
+# setzone( $TIMEZONE )
+#
+# This function accepts a time zone as the only parameter and sets it as
+# the default system time zone.
+setzone()
+{
+ TZ=$1
+
+ cd $T_PX/etc
+ if [ -r $T_PX/usr/share/zoneinfo/$TZ -o \
+ -r /var/log/mount/usr/share/zoneinfo/$TZ -o \
+ -L $T_PX/usr/share/zoneinfo/$TZ -o \
+ -L /var/log/mount/usr/share/zoneinfo/$TZ ]; then
+ ln -sf /usr/share/zoneinfo/$TZ localtime-copied-from
+ rm -f localtime
+ cd ..
+ chroot . cp etc/localtime-copied-from etc/localtime
+ fi
+}
+
+# writeconf( $CLOCK_SET_TO )
+#
+# Writes out $HWCLOCK_CONF that tells rc.S how the hardware clock
+# value is stored.
+writeconf()
+{
+ echo "# /etc/hardwareclock" > $HWCLOCK_CONF
+ echo "#" >> $HWCLOCK_CONF
+ echo "# Tells how the hardware clock time is stored." >> $HWCLOCK_CONF
+ echo "# You should run timeconfig to edit this file." >> $HWCLOCK_CONF
+ echo >> $HWCLOCK_CONF
+ echo $1 >> $HWCLOCK_CONF
+}
+
+# ask the user if the hardware clock is set for UTC/GMT
+if [ "$COLOR" = "on" -o -r $TMP/SeTcolor -o "$T_PX" = "/" ]; then
+ ###
+ ### use color menus here
+ ###
+ dialog --title "HARDWARE CLOCK SET TO UTC?" --menu "Is the hardware clock set \
+to Coordinated Universal Time (UTC/GMT)? If it is, select YES here. If the \
+hardware clock is set to the current local time (this is how most PCs are set \
+up), then say NO here. If you are not sure what this is, you should answer NO \
+here." 13 60 2 \
+ "NO" "Hardware clock is set to local time" \
+ "YES" "Hardware clock is set to UTC" \
+ 2> $TMP/utc
+ if [ $? = 1 -o $? = 255 ]; then
+ rm -f $TMP/utc
+ exit
+ fi
+ if [ "`cat $TMP/utc`" = "YES" ]; then
+ # yes, the hardware clock is UTC
+ writeconf "UTC"
+ else # must be NO
+ writeconf "localtime"
+ fi
+ rm -f $TMP/utc
+else
+ ###
+ ### use text prompts
+ ###
+ echo "Is the hardware clock set to Coordinated Universal Time (UTC/GMT)?"
+ echo "If it is, select 'y' here. If the hardware clock is set to the"
+ echo "current local time (this is how most PCs are set up), then say 'n'"
+ echo "here. If you are not sure what this is, you should answer 'n' here."
+ echo
+ echo -n "Is your hardware clock set to UTC ([y]es, [n]o)? "
+ read HEJAZ
+
+ if [ "$HEJAZ" = "y" -o "$HEJAZ" = "Y" -o "$HEJAZ" = "YES" -o "$HEJAZ" = "yes" ]; then
+ # yes, the hardware clock is UTC
+ writeconf "UTC"
+ else
+ # default to localtime
+ writeconf "localtime"
+ fi
+fi
+
+# Now set the correct timezone link:
+if [ "$COLOR" = "on" -o -r $TMP/SeTcolor -o "$T_PX" = "/" ]; then
+ ###
+ ### use color menus here
+ ###
+ dialog --title "TIMEZONE CONFIGURATION" --menu "Please select one of the following timezones for your machine:" 21 50 13 \
+"US/Alaska" " " \
+"US/Aleutian" " " \
+"US/Arizona" " " \
+"US/Central" " " \
+"US/East-Indiana" " " \
+"US/Eastern" " " \
+"US/Hawaii" " " \
+"US/Indiana-Starke" " " \
+"US/Michigan" " " \
+"US/Mountain" " " \
+"US/Pacific" " " \
+"US/Pacific-New" " " \
+"US/Samoa" " " \
+"Africa/Abidjan" " " \
+"Africa/Accra" " " \
+"Africa/Addis_Ababa" " " \
+"Africa/Algiers" " " \
+"Africa/Asmara" " " \
+"Africa/Asmera" " " \
+"Africa/Bamako" " " \
+"Africa/Bangui" " " \
+"Africa/Banjul" " " \
+"Africa/Bissau" " " \
+"Africa/Blantyre" " " \
+"Africa/Brazzaville" " " \
+"Africa/Bujumbura" " " \
+"Africa/Cairo" " " \
+"Africa/Casablanca" " " \
+"Africa/Ceuta" " " \
+"Africa/Conakry" " " \
+"Africa/Dakar" " " \
+"Africa/Dar_es_Salaam" " " \
+"Africa/Djibouti" " " \
+"Africa/Douala" " " \
+"Africa/El_Aaiun" " " \
+"Africa/Freetown" " " \
+"Africa/Gaborone" " " \
+"Africa/Harare" " " \
+"Africa/Johannesburg" " " \
+"Africa/Juba" " " \
+"Africa/Kampala" " " \
+"Africa/Khartoum" " " \
+"Africa/Kigali" " " \
+"Africa/Kinshasa" " " \
+"Africa/Lagos" " " \
+"Africa/Libreville" " " \
+"Africa/Lome" " " \
+"Africa/Luanda" " " \
+"Africa/Lubumbashi" " " \
+"Africa/Lusaka" " " \
+"Africa/Malabo" " " \
+"Africa/Maputo" " " \
+"Africa/Maseru" " " \
+"Africa/Mbabane" " " \
+"Africa/Mogadishu" " " \
+"Africa/Monrovia" " " \
+"Africa/Nairobi" " " \
+"Africa/Ndjamena" " " \
+"Africa/Niamey" " " \
+"Africa/Nouakchott" " " \
+"Africa/Ouagadougou" " " \
+"Africa/Porto-Novo" " " \
+"Africa/Sao_Tome" " " \
+"Africa/Timbuktu" " " \
+"Africa/Tripoli" " " \
+"Africa/Tunis" " " \
+"Africa/Windhoek" " " \
+"America/Adak" " " \
+"America/Anchorage" " " \
+"America/Anguilla" " " \
+"America/Antigua" " " \
+"America/Araguaina" " " \
+"America/Argentina/Buenos_Aires" " " \
+"America/Argentina/Catamarca" " " \
+"America/Argentina/ComodRivadavia" " " \
+"America/Argentina/Cordoba" " " \
+"America/Argentina/Jujuy" " " \
+"America/Argentina/La_Rioja" " " \
+"America/Argentina/Mendoza" " " \
+"America/Argentina/Rio_Gallegos" " " \
+"America/Argentina/Salta" " " \
+"America/Argentina/San_Juan" " " \
+"America/Argentina/San_Luis" " " \
+"America/Argentina/Tucuman" " " \
+"America/Argentina/Ushuaia" " " \
+"America/Aruba" " " \
+"America/Asuncion" " " \
+"America/Atikokan" " " \
+"America/Atka" " " \
+"America/Bahia" " " \
+"America/Bahia_Banderas" " " \
+"America/Barbados" " " \
+"America/Belem" " " \
+"America/Belize" " " \
+"America/Blanc-Sablon" " " \
+"America/Boa_Vista" " " \
+"America/Bogota" " " \
+"America/Boise" " " \
+"America/Buenos_Aires" " " \
+"America/Cambridge_Bay" " " \
+"America/Campo_Grande" " " \
+"America/Cancun" " " \
+"America/Caracas" " " \
+"America/Catamarca" " " \
+"America/Cayenne" " " \
+"America/Cayman" " " \
+"America/Chicago" " " \
+"America/Chihuahua" " " \
+"America/Coral_Harbour" " " \
+"America/Cordoba" " " \
+"America/Costa_Rica" " " \
+"America/Creston" " " \
+"America/Cuiaba" " " \
+"America/Curacao" " " \
+"America/Danmarkshavn" " " \
+"America/Dawson" " " \
+"America/Dawson_Creek" " " \
+"America/Denver" " " \
+"America/Detroit" " " \
+"America/Dominica" " " \
+"America/Edmonton" " " \
+"America/Eirunepe" " " \
+"America/El_Salvador" " " \
+"America/Ensenada" " " \
+"America/Fort_Wayne" " " \
+"America/Fortaleza" " " \
+"America/Glace_Bay" " " \
+"America/Godthab" " " \
+"America/Goose_Bay" " " \
+"America/Grand_Turk" " " \
+"America/Grenada" " " \
+"America/Guadeloupe" " " \
+"America/Guatemala" " " \
+"America/Guayaquil" " " \
+"America/Guyana" " " \
+"America/Halifax" " " \
+"America/Havana" " " \
+"America/Hermosillo" " " \
+"America/Indiana/Indianapolis" " " \
+"America/Indiana/Knox" " " \
+"America/Indiana/Marengo" " " \
+"America/Indiana/Petersburg" " " \
+"America/Indiana/Tell_City" " " \
+"America/Indiana/Vevay" " " \
+"America/Indiana/Vincennes" " " \
+"America/Indiana/Winamac" " " \
+"America/Indianapolis" " " \
+"America/Inuvik" " " \
+"America/Iqaluit" " " \
+"America/Jamaica" " " \
+"America/Jujuy" " " \
+"America/Juneau" " " \
+"America/Kentucky/Louisville" " " \
+"America/Kentucky/Monticello" " " \
+"America/Knox_IN" " " \
+"America/Kralendijk" " " \
+"America/La_Paz" " " \
+"America/Lima" " " \
+"America/Los_Angeles" " " \
+"America/Louisville" " " \
+"America/Lower_Princes" " " \
+"America/Maceio" " " \
+"America/Managua" " " \
+"America/Manaus" " " \
+"America/Marigot" " " \
+"America/Martinique" " " \
+"America/Matamoros" " " \
+"America/Mazatlan" " " \
+"America/Mendoza" " " \
+"America/Menominee" " " \
+"America/Merida" " " \
+"America/Metlakatla" " " \
+"America/Mexico_City" " " \
+"America/Miquelon" " " \
+"America/Moncton" " " \
+"America/Monterrey" " " \
+"America/Montevideo" " " \
+"America/Montreal" " " \
+"America/Montserrat" " " \
+"America/Nassau" " " \
+"America/New_York" " " \
+"America/Nipigon" " " \
+"America/Nome" " " \
+"America/Noronha" " " \
+"America/North_Dakota/Beulah" " " \
+"America/North_Dakota/Center" " " \
+"America/North_Dakota/New_Salem" " " \
+"America/Ojinaga" " " \
+"America/Panama" " " \
+"America/Pangnirtung" " " \
+"America/Paramaribo" " " \
+"America/Phoenix" " " \
+"America/Port-au-Prince" " " \
+"America/Port_of_Spain" " " \
+"America/Porto_Acre" " " \
+"America/Porto_Velho" " " \
+"America/Puerto_Rico" " " \
+"America/Rainy_River" " " \
+"America/Rankin_Inlet" " " \
+"America/Recife" " " \
+"America/Regina" " " \
+"America/Resolute" " " \
+"America/Rio_Branco" " " \
+"America/Rosario" " " \
+"America/Santa_Isabel" " " \
+"America/Santarem" " " \
+"America/Santiago" " " \
+"America/Santo_Domingo" " " \
+"America/Sao_Paulo" " " \
+"America/Scoresbysund" " " \
+"America/Shiprock" " " \
+"America/Sitka" " " \
+"America/St_Barthelemy" " " \
+"America/St_Johns" " " \
+"America/St_Kitts" " " \
+"America/St_Lucia" " " \
+"America/St_Thomas" " " \
+"America/St_Vincent" " " \
+"America/Swift_Current" " " \
+"America/Tegucigalpa" " " \
+"America/Thule" " " \
+"America/Thunder_Bay" " " \
+"America/Tijuana" " " \
+"America/Toronto" " " \
+"America/Tortola" " " \
+"America/Vancouver" " " \
+"America/Virgin" " " \
+"America/Whitehorse" " " \
+"America/Winnipeg" " " \
+"America/Yakutat" " " \
+"America/Yellowknife" " " \
+"Antarctica/Casey" " " \
+"Antarctica/Davis" " " \
+"Antarctica/DumontDUrville" " " \
+"Antarctica/Macquarie" " " \
+"Antarctica/Mawson" " " \
+"Antarctica/McMurdo" " " \
+"Antarctica/Palmer" " " \
+"Antarctica/Rothera" " " \
+"Antarctica/South_Pole" " " \
+"Antarctica/Syowa" " " \
+"Antarctica/Troll" " " \
+"Antarctica/Vostok" " " \
+"Arctic/Longyearbyen" " " \
+"Asia/Aden" " " \
+"Asia/Almaty" " " \
+"Asia/Amman" " " \
+"Asia/Anadyr" " " \
+"Asia/Aqtau" " " \
+"Asia/Aqtobe" " " \
+"Asia/Ashgabat" " " \
+"Asia/Ashkhabad" " " \
+"Asia/Baghdad" " " \
+"Asia/Bahrain" " " \
+"Asia/Baku" " " \
+"Asia/Bangkok" " " \
+"Asia/Beirut" " " \
+"Asia/Bishkek" " " \
+"Asia/Brunei" " " \
+"Asia/Calcutta" " " \
+"Asia/Chita" " " \
+"Asia/Choibalsan" " " \
+"Asia/Chongqing" " " \
+"Asia/Chungking" " " \
+"Asia/Colombo" " " \
+"Asia/Dacca" " " \
+"Asia/Damascus" " " \
+"Asia/Dhaka" " " \
+"Asia/Dili" " " \
+"Asia/Dubai" " " \
+"Asia/Dushanbe" " " \
+"Asia/Gaza" " " \
+"Asia/Harbin" " " \
+"Asia/Hebron" " " \
+"Asia/Ho_Chi_Minh" " " \
+"Asia/Hong_Kong" " " \
+"Asia/Hovd" " " \
+"Asia/Irkutsk" " " \
+"Asia/Istanbul" " " \
+"Asia/Jakarta" " " \
+"Asia/Jayapura" " " \
+"Asia/Jerusalem" " " \
+"Asia/Kabul" " " \
+"Asia/Kamchatka" " " \
+"Asia/Karachi" " " \
+"Asia/Kashgar" " " \
+"Asia/Kathmandu" " " \
+"Asia/Katmandu" " " \
+"Asia/Khandyga" " " \
+"Asia/Kolkata" " " \
+"Asia/Krasnoyarsk" " " \
+"Asia/Kuala_Lumpur" " " \
+"Asia/Kuching" " " \
+"Asia/Kuwait" " " \
+"Asia/Macao" " " \
+"Asia/Macau" " " \
+"Asia/Magadan" " " \
+"Asia/Makassar" " " \
+"Asia/Manila" " " \
+"Asia/Muscat" " " \
+"Asia/Nicosia" " " \
+"Asia/Novokuznetsk" " " \
+"Asia/Novosibirsk" " " \
+"Asia/Omsk" " " \
+"Asia/Oral" " " \
+"Asia/Phnom_Penh" " " \
+"Asia/Pontianak" " " \
+"Asia/Pyongyang" " " \
+"Asia/Qatar" " " \
+"Asia/Qyzylorda" " " \
+"Asia/Rangoon" " " \
+"Asia/Riyadh" " " \
+"Asia/Saigon" " " \
+"Asia/Sakhalin" " " \
+"Asia/Samarkand" " " \
+"Asia/Seoul" " " \
+"Asia/Shanghai" " " \
+"Asia/Singapore" " " \
+"Asia/Srednekolymsk" " " \
+"Asia/Taipei" " " \
+"Asia/Tashkent" " " \
+"Asia/Tbilisi" " " \
+"Asia/Tehran" " " \
+"Asia/Tel_Aviv" " " \
+"Asia/Thimbu" " " \
+"Asia/Thimphu" " " \
+"Asia/Tokyo" " " \
+"Asia/Ujung_Pandang" " " \
+"Asia/Ulaanbaatar" " " \
+"Asia/Ulan_Bator" " " \
+"Asia/Urumqi" " " \
+"Asia/Ust-Nera" " " \
+"Asia/Vientiane" " " \
+"Asia/Vladivostok" " " \
+"Asia/Yakutsk" " " \
+"Asia/Yekaterinburg" " " \
+"Asia/Yerevan" " " \
+"Atlantic/Azores" " " \
+"Atlantic/Bermuda" " " \
+"Atlantic/Canary" " " \
+"Atlantic/Cape_Verde" " " \
+"Atlantic/Faeroe" " " \
+"Atlantic/Faroe" " " \
+"Atlantic/Jan_Mayen" " " \
+"Atlantic/Madeira" " " \
+"Atlantic/Reykjavik" " " \
+"Atlantic/South_Georgia" " " \
+"Atlantic/St_Helena" " " \
+"Atlantic/Stanley" " " \
+"Australia/ACT" " " \
+"Australia/Adelaide" " " \
+"Australia/Brisbane" " " \
+"Australia/Broken_Hill" " " \
+"Australia/Canberra" " " \
+"Australia/Currie" " " \
+"Australia/Darwin" " " \
+"Australia/Eucla" " " \
+"Australia/Hobart" " " \
+"Australia/LHI" " " \
+"Australia/Lindeman" " " \
+"Australia/Lord_Howe" " " \
+"Australia/Melbourne" " " \
+"Australia/NSW" " " \
+"Australia/North" " " \
+"Australia/Perth" " " \
+"Australia/Queensland" " " \
+"Australia/South" " " \
+"Australia/Sydney" " " \
+"Australia/Tasmania" " " \
+"Australia/Victoria" " " \
+"Australia/West" " " \
+"Australia/Yancowinna" " " \
+"Brazil/Acre" " " \
+"Brazil/DeNoronha" " " \
+"Brazil/East" " " \
+"Brazil/West" " " \
+"CET" " " \
+"CST6CDT" " " \
+"Canada/Atlantic" " " \
+"Canada/Central" " " \
+"Canada/East-Saskatchewan" " " \
+"Canada/Eastern" " " \
+"Canada/Mountain" " " \
+"Canada/Newfoundland" " " \
+"Canada/Pacific" " " \
+"Canada/Saskatchewan" " " \
+"Canada/Yukon" " " \
+"Chile/Continental" " " \
+"Chile/EasterIsland" " " \
+"Cuba" " " \
+"EET" " " \
+"EST" " " \
+"EST5EDT" " " \
+"Egypt" " " \
+"Eire" " " \
+"Etc/GMT" " " \
+"Etc/GMT+0" " " \
+"Etc/GMT+1" " " \
+"Etc/GMT+10" " " \
+"Etc/GMT+11" " " \
+"Etc/GMT+12" " " \
+"Etc/GMT+2" " " \
+"Etc/GMT+3" " " \
+"Etc/GMT+4" " " \
+"Etc/GMT+5" " " \
+"Etc/GMT+6" " " \
+"Etc/GMT+7" " " \
+"Etc/GMT+8" " " \
+"Etc/GMT+9" " " \
+"Etc/GMT-0" " " \
+"Etc/GMT-1" " " \
+"Etc/GMT-10" " " \
+"Etc/GMT-11" " " \
+"Etc/GMT-12" " " \
+"Etc/GMT-13" " " \
+"Etc/GMT-14" " " \
+"Etc/GMT-2" " " \
+"Etc/GMT-3" " " \
+"Etc/GMT-4" " " \
+"Etc/GMT-5" " " \
+"Etc/GMT-6" " " \
+"Etc/GMT-7" " " \
+"Etc/GMT-8" " " \
+"Etc/GMT-9" " " \
+"Etc/GMT0" " " \
+"Etc/Greenwich" " " \
+"Etc/UCT" " " \
+"Etc/UTC" " " \
+"Etc/Universal" " " \
+"Etc/Zulu" " " \
+"Europe/Amsterdam" " " \
+"Europe/Andorra" " " \
+"Europe/Athens" " " \
+"Europe/Belfast" " " \
+"Europe/Belgrade" " " \
+"Europe/Berlin" " " \
+"Europe/Bratislava" " " \
+"Europe/Brussels" " " \
+"Europe/Bucharest" " " \
+"Europe/Budapest" " " \
+"Europe/Busingen" " " \
+"Europe/Chisinau" " " \
+"Europe/Copenhagen" " " \
+"Europe/Dublin" " " \
+"Europe/Gibraltar" " " \
+"Europe/Guernsey" " " \
+"Europe/Helsinki" " " \
+"Europe/Isle_of_Man" " " \
+"Europe/Istanbul" " " \
+"Europe/Jersey" " " \
+"Europe/Kaliningrad" " " \
+"Europe/Kiev" " " \
+"Europe/Lisbon" " " \
+"Europe/Ljubljana" " " \
+"Europe/London" " " \
+"Europe/Luxembourg" " " \
+"Europe/Madrid" " " \
+"Europe/Malta" " " \
+"Europe/Mariehamn" " " \
+"Europe/Minsk" " " \
+"Europe/Monaco" " " \
+"Europe/Moscow" " " \
+"Europe/Nicosia" " " \
+"Europe/Oslo" " " \
+"Europe/Paris" " " \
+"Europe/Podgorica" " " \
+"Europe/Prague" " " \
+"Europe/Riga" " " \
+"Europe/Rome" " " \
+"Europe/Samara" " " \
+"Europe/San_Marino" " " \
+"Europe/Sarajevo" " " \
+"Europe/Simferopol" " " \
+"Europe/Skopje" " " \
+"Europe/Sofia" " " \
+"Europe/Stockholm" " " \
+"Europe/Tallinn" " " \
+"Europe/Tirane" " " \
+"Europe/Tiraspol" " " \
+"Europe/Uzhgorod" " " \
+"Europe/Vaduz" " " \
+"Europe/Vatican" " " \
+"Europe/Vienna" " " \
+"Europe/Vilnius" " " \
+"Europe/Volgograd" " " \
+"Europe/Warsaw" " " \
+"Europe/Zagreb" " " \
+"Europe/Zaporozhye" " " \
+"Europe/Zurich" " " \
+"Factory" " " \
+"GB" " " \
+"GB-Eire" " " \
+"GMT" " " \
+"GMT+0" " " \
+"GMT-0" " " \
+"GMT0" " " \
+"Greenwich" " " \
+"HST" " " \
+"Hongkong" " " \
+"Iceland" " " \
+"Indian/Antananarivo" " " \
+"Indian/Chagos" " " \
+"Indian/Christmas" " " \
+"Indian/Cocos" " " \
+"Indian/Comoro" " " \
+"Indian/Kerguelen" " " \
+"Indian/Mahe" " " \
+"Indian/Maldives" " " \
+"Indian/Mauritius" " " \
+"Indian/Mayotte" " " \
+"Indian/Reunion" " " \
+"Iran" " " \
+"Israel" " " \
+"Jamaica" " " \
+"Japan" " " \
+"Kwajalein" " " \
+"Libya" " " \
+"MET" " " \
+"MST" " " \
+"MST7MDT" " " \
+"Mexico/BajaNorte" " " \
+"Mexico/BajaSur" " " \
+"Mexico/General" " " \
+"NZ" " " \
+"NZ-CHAT" " " \
+"Navajo" " " \
+"PRC" " " \
+"PST8PDT" " " \
+"Pacific/Apia" " " \
+"Pacific/Auckland" " " \
+"Pacific/Bougainville" " " \
+"Pacific/Chatham" " " \
+"Pacific/Chuuk" " " \
+"Pacific/Easter" " " \
+"Pacific/Efate" " " \
+"Pacific/Enderbury" " " \
+"Pacific/Fakaofo" " " \
+"Pacific/Fiji" " " \
+"Pacific/Funafuti" " " \
+"Pacific/Galapagos" " " \
+"Pacific/Gambier" " " \
+"Pacific/Guadalcanal" " " \
+"Pacific/Guam" " " \
+"Pacific/Honolulu" " " \
+"Pacific/Johnston" " " \
+"Pacific/Kiritimati" " " \
+"Pacific/Kosrae" " " \
+"Pacific/Kwajalein" " " \
+"Pacific/Majuro" " " \
+"Pacific/Marquesas" " " \
+"Pacific/Midway" " " \
+"Pacific/Nauru" " " \
+"Pacific/Niue" " " \
+"Pacific/Norfolk" " " \
+"Pacific/Noumea" " " \
+"Pacific/Pago_Pago" " " \
+"Pacific/Palau" " " \
+"Pacific/Pitcairn" " " \
+"Pacific/Pohnpei" " " \
+"Pacific/Ponape" " " \
+"Pacific/Port_Moresby" " " \
+"Pacific/Rarotonga" " " \
+"Pacific/Saipan" " " \
+"Pacific/Samoa" " " \
+"Pacific/Tahiti" " " \
+"Pacific/Tarawa" " " \
+"Pacific/Tongatapu" " " \
+"Pacific/Truk" " " \
+"Pacific/Wake" " " \
+"Pacific/Wallis" " " \
+"Pacific/Yap" " " \
+"Poland" " " \
+"Portugal" " " \
+"ROC" " " \
+"ROK" " " \
+"Singapore" " " \
+"Turkey" " " \
+"UCT" " " \
+"UTC" " " \
+"Universal" " " \
+"W-SU" " " \
+"WET" " " \
+"Zulu" " " \
+"posix/Africa/Abidjan" " " \
+"posix/Africa/Accra" " " \
+"posix/Africa/Addis_Ababa" " " \
+"posix/Africa/Algiers" " " \
+"posix/Africa/Asmara" " " \
+"posix/Africa/Asmera" " " \
+"posix/Africa/Bamako" " " \
+"posix/Africa/Bangui" " " \
+"posix/Africa/Banjul" " " \
+"posix/Africa/Bissau" " " \
+"posix/Africa/Blantyre" " " \
+"posix/Africa/Brazzaville" " " \
+"posix/Africa/Bujumbura" " " \
+"posix/Africa/Cairo" " " \
+"posix/Africa/Casablanca" " " \
+"posix/Africa/Ceuta" " " \
+"posix/Africa/Conakry" " " \
+"posix/Africa/Dakar" " " \
+"posix/Africa/Dar_es_Salaam" " " \
+"posix/Africa/Djibouti" " " \
+"posix/Africa/Douala" " " \
+"posix/Africa/El_Aaiun" " " \
+"posix/Africa/Freetown" " " \
+"posix/Africa/Gaborone" " " \
+"posix/Africa/Harare" " " \
+"posix/Africa/Johannesburg" " " \
+"posix/Africa/Juba" " " \
+"posix/Africa/Kampala" " " \
+"posix/Africa/Khartoum" " " \
+"posix/Africa/Kigali" " " \
+"posix/Africa/Kinshasa" " " \
+"posix/Africa/Lagos" " " \
+"posix/Africa/Libreville" " " \
+"posix/Africa/Lome" " " \
+"posix/Africa/Luanda" " " \
+"posix/Africa/Lubumbashi" " " \
+"posix/Africa/Lusaka" " " \
+"posix/Africa/Malabo" " " \
+"posix/Africa/Maputo" " " \
+"posix/Africa/Maseru" " " \
+"posix/Africa/Mbabane" " " \
+"posix/Africa/Mogadishu" " " \
+"posix/Africa/Monrovia" " " \
+"posix/Africa/Nairobi" " " \
+"posix/Africa/Ndjamena" " " \
+"posix/Africa/Niamey" " " \
+"posix/Africa/Nouakchott" " " \
+"posix/Africa/Ouagadougou" " " \
+"posix/Africa/Porto-Novo" " " \
+"posix/Africa/Sao_Tome" " " \
+"posix/Africa/Timbuktu" " " \
+"posix/Africa/Tripoli" " " \
+"posix/Africa/Tunis" " " \
+"posix/Africa/Windhoek" " " \
+"posix/America/Adak" " " \
+"posix/America/Anchorage" " " \
+"posix/America/Anguilla" " " \
+"posix/America/Antigua" " " \
+"posix/America/Araguaina" " " \
+"posix/America/Argentina/Buenos_Aires" " " \
+"posix/America/Argentina/Catamarca" " " \
+"posix/America/Argentina/ComodRivadavia" " " \
+"posix/America/Argentina/Cordoba" " " \
+"posix/America/Argentina/Jujuy" " " \
+"posix/America/Argentina/La_Rioja" " " \
+"posix/America/Argentina/Mendoza" " " \
+"posix/America/Argentina/Rio_Gallegos" " " \
+"posix/America/Argentina/Salta" " " \
+"posix/America/Argentina/San_Juan" " " \
+"posix/America/Argentina/San_Luis" " " \
+"posix/America/Argentina/Tucuman" " " \
+"posix/America/Argentina/Ushuaia" " " \
+"posix/America/Aruba" " " \
+"posix/America/Asuncion" " " \
+"posix/America/Atikokan" " " \
+"posix/America/Atka" " " \
+"posix/America/Bahia" " " \
+"posix/America/Bahia_Banderas" " " \
+"posix/America/Barbados" " " \
+"posix/America/Belem" " " \
+"posix/America/Belize" " " \
+"posix/America/Blanc-Sablon" " " \
+"posix/America/Boa_Vista" " " \
+"posix/America/Bogota" " " \
+"posix/America/Boise" " " \
+"posix/America/Buenos_Aires" " " \
+"posix/America/Cambridge_Bay" " " \
+"posix/America/Campo_Grande" " " \
+"posix/America/Cancun" " " \
+"posix/America/Caracas" " " \
+"posix/America/Catamarca" " " \
+"posix/America/Cayenne" " " \
+"posix/America/Cayman" " " \
+"posix/America/Chicago" " " \
+"posix/America/Chihuahua" " " \
+"posix/America/Coral_Harbour" " " \
+"posix/America/Cordoba" " " \
+"posix/America/Costa_Rica" " " \
+"posix/America/Creston" " " \
+"posix/America/Cuiaba" " " \
+"posix/America/Curacao" " " \
+"posix/America/Danmarkshavn" " " \
+"posix/America/Dawson" " " \
+"posix/America/Dawson_Creek" " " \
+"posix/America/Denver" " " \
+"posix/America/Detroit" " " \
+"posix/America/Dominica" " " \
+"posix/America/Edmonton" " " \
+"posix/America/Eirunepe" " " \
+"posix/America/El_Salvador" " " \
+"posix/America/Ensenada" " " \
+"posix/America/Fort_Wayne" " " \
+"posix/America/Fortaleza" " " \
+"posix/America/Glace_Bay" " " \
+"posix/America/Godthab" " " \
+"posix/America/Goose_Bay" " " \
+"posix/America/Grand_Turk" " " \
+"posix/America/Grenada" " " \
+"posix/America/Guadeloupe" " " \
+"posix/America/Guatemala" " " \
+"posix/America/Guayaquil" " " \
+"posix/America/Guyana" " " \
+"posix/America/Halifax" " " \
+"posix/America/Havana" " " \
+"posix/America/Hermosillo" " " \
+"posix/America/Indiana/Indianapolis" " " \
+"posix/America/Indiana/Knox" " " \
+"posix/America/Indiana/Marengo" " " \
+"posix/America/Indiana/Petersburg" " " \
+"posix/America/Indiana/Tell_City" " " \
+"posix/America/Indiana/Vevay" " " \
+"posix/America/Indiana/Vincennes" " " \
+"posix/America/Indiana/Winamac" " " \
+"posix/America/Indianapolis" " " \
+"posix/America/Inuvik" " " \
+"posix/America/Iqaluit" " " \
+"posix/America/Jamaica" " " \
+"posix/America/Jujuy" " " \
+"posix/America/Juneau" " " \
+"posix/America/Kentucky/Louisville" " " \
+"posix/America/Kentucky/Monticello" " " \
+"posix/America/Knox_IN" " " \
+"posix/America/Kralendijk" " " \
+"posix/America/La_Paz" " " \
+"posix/America/Lima" " " \
+"posix/America/Los_Angeles" " " \
+"posix/America/Louisville" " " \
+"posix/America/Lower_Princes" " " \
+"posix/America/Maceio" " " \
+"posix/America/Managua" " " \
+"posix/America/Manaus" " " \
+"posix/America/Marigot" " " \
+"posix/America/Martinique" " " \
+"posix/America/Matamoros" " " \
+"posix/America/Mazatlan" " " \
+"posix/America/Mendoza" " " \
+"posix/America/Menominee" " " \
+"posix/America/Merida" " " \
+"posix/America/Metlakatla" " " \
+"posix/America/Mexico_City" " " \
+"posix/America/Miquelon" " " \
+"posix/America/Moncton" " " \
+"posix/America/Monterrey" " " \
+"posix/America/Montevideo" " " \
+"posix/America/Montreal" " " \
+"posix/America/Montserrat" " " \
+"posix/America/Nassau" " " \
+"posix/America/New_York" " " \
+"posix/America/Nipigon" " " \
+"posix/America/Nome" " " \
+"posix/America/Noronha" " " \
+"posix/America/North_Dakota/Beulah" " " \
+"posix/America/North_Dakota/Center" " " \
+"posix/America/North_Dakota/New_Salem" " " \
+"posix/America/Ojinaga" " " \
+"posix/America/Panama" " " \
+"posix/America/Pangnirtung" " " \
+"posix/America/Paramaribo" " " \
+"posix/America/Phoenix" " " \
+"posix/America/Port-au-Prince" " " \
+"posix/America/Port_of_Spain" " " \
+"posix/America/Porto_Acre" " " \
+"posix/America/Porto_Velho" " " \
+"posix/America/Puerto_Rico" " " \
+"posix/America/Rainy_River" " " \
+"posix/America/Rankin_Inlet" " " \
+"posix/America/Recife" " " \
+"posix/America/Regina" " " \
+"posix/America/Resolute" " " \
+"posix/America/Rio_Branco" " " \
+"posix/America/Rosario" " " \
+"posix/America/Santa_Isabel" " " \
+"posix/America/Santarem" " " \
+"posix/America/Santiago" " " \
+"posix/America/Santo_Domingo" " " \
+"posix/America/Sao_Paulo" " " \
+"posix/America/Scoresbysund" " " \
+"posix/America/Shiprock" " " \
+"posix/America/Sitka" " " \
+"posix/America/St_Barthelemy" " " \
+"posix/America/St_Johns" " " \
+"posix/America/St_Kitts" " " \
+"posix/America/St_Lucia" " " \
+"posix/America/St_Thomas" " " \
+"posix/America/St_Vincent" " " \
+"posix/America/Swift_Current" " " \
+"posix/America/Tegucigalpa" " " \
+"posix/America/Thule" " " \
+"posix/America/Thunder_Bay" " " \
+"posix/America/Tijuana" " " \
+"posix/America/Toronto" " " \
+"posix/America/Tortola" " " \
+"posix/America/Vancouver" " " \
+"posix/America/Virgin" " " \
+"posix/America/Whitehorse" " " \
+"posix/America/Winnipeg" " " \
+"posix/America/Yakutat" " " \
+"posix/America/Yellowknife" " " \
+"posix/Antarctica/Casey" " " \
+"posix/Antarctica/Davis" " " \
+"posix/Antarctica/DumontDUrville" " " \
+"posix/Antarctica/Macquarie" " " \
+"posix/Antarctica/Mawson" " " \
+"posix/Antarctica/McMurdo" " " \
+"posix/Antarctica/Palmer" " " \
+"posix/Antarctica/Rothera" " " \
+"posix/Antarctica/South_Pole" " " \
+"posix/Antarctica/Syowa" " " \
+"posix/Antarctica/Troll" " " \
+"posix/Antarctica/Vostok" " " \
+"posix/Arctic/Longyearbyen" " " \
+"posix/Asia/Aden" " " \
+"posix/Asia/Almaty" " " \
+"posix/Asia/Amman" " " \
+"posix/Asia/Anadyr" " " \
+"posix/Asia/Aqtau" " " \
+"posix/Asia/Aqtobe" " " \
+"posix/Asia/Ashgabat" " " \
+"posix/Asia/Ashkhabad" " " \
+"posix/Asia/Baghdad" " " \
+"posix/Asia/Bahrain" " " \
+"posix/Asia/Baku" " " \
+"posix/Asia/Bangkok" " " \
+"posix/Asia/Beirut" " " \
+"posix/Asia/Bishkek" " " \
+"posix/Asia/Brunei" " " \
+"posix/Asia/Calcutta" " " \
+"posix/Asia/Chita" " " \
+"posix/Asia/Choibalsan" " " \
+"posix/Asia/Chongqing" " " \
+"posix/Asia/Chungking" " " \
+"posix/Asia/Colombo" " " \
+"posix/Asia/Dacca" " " \
+"posix/Asia/Damascus" " " \
+"posix/Asia/Dhaka" " " \
+"posix/Asia/Dili" " " \
+"posix/Asia/Dubai" " " \
+"posix/Asia/Dushanbe" " " \
+"posix/Asia/Gaza" " " \
+"posix/Asia/Harbin" " " \
+"posix/Asia/Hebron" " " \
+"posix/Asia/Ho_Chi_Minh" " " \
+"posix/Asia/Hong_Kong" " " \
+"posix/Asia/Hovd" " " \
+"posix/Asia/Irkutsk" " " \
+"posix/Asia/Istanbul" " " \
+"posix/Asia/Jakarta" " " \
+"posix/Asia/Jayapura" " " \
+"posix/Asia/Jerusalem" " " \
+"posix/Asia/Kabul" " " \
+"posix/Asia/Kamchatka" " " \
+"posix/Asia/Karachi" " " \
+"posix/Asia/Kashgar" " " \
+"posix/Asia/Kathmandu" " " \
+"posix/Asia/Katmandu" " " \
+"posix/Asia/Khandyga" " " \
+"posix/Asia/Kolkata" " " \
+"posix/Asia/Krasnoyarsk" " " \
+"posix/Asia/Kuala_Lumpur" " " \
+"posix/Asia/Kuching" " " \
+"posix/Asia/Kuwait" " " \
+"posix/Asia/Macao" " " \
+"posix/Asia/Macau" " " \
+"posix/Asia/Magadan" " " \
+"posix/Asia/Makassar" " " \
+"posix/Asia/Manila" " " \
+"posix/Asia/Muscat" " " \
+"posix/Asia/Nicosia" " " \
+"posix/Asia/Novokuznetsk" " " \
+"posix/Asia/Novosibirsk" " " \
+"posix/Asia/Omsk" " " \
+"posix/Asia/Oral" " " \
+"posix/Asia/Phnom_Penh" " " \
+"posix/Asia/Pontianak" " " \
+"posix/Asia/Pyongyang" " " \
+"posix/Asia/Qatar" " " \
+"posix/Asia/Qyzylorda" " " \
+"posix/Asia/Rangoon" " " \
+"posix/Asia/Riyadh" " " \
+"posix/Asia/Saigon" " " \
+"posix/Asia/Sakhalin" " " \
+"posix/Asia/Samarkand" " " \
+"posix/Asia/Seoul" " " \
+"posix/Asia/Shanghai" " " \
+"posix/Asia/Singapore" " " \
+"posix/Asia/Srednekolymsk" " " \
+"posix/Asia/Taipei" " " \
+"posix/Asia/Tashkent" " " \
+"posix/Asia/Tbilisi" " " \
+"posix/Asia/Tehran" " " \
+"posix/Asia/Tel_Aviv" " " \
+"posix/Asia/Thimbu" " " \
+"posix/Asia/Thimphu" " " \
+"posix/Asia/Tokyo" " " \
+"posix/Asia/Ujung_Pandang" " " \
+"posix/Asia/Ulaanbaatar" " " \
+"posix/Asia/Ulan_Bator" " " \
+"posix/Asia/Urumqi" " " \
+"posix/Asia/Ust-Nera" " " \
+"posix/Asia/Vientiane" " " \
+"posix/Asia/Vladivostok" " " \
+"posix/Asia/Yakutsk" " " \
+"posix/Asia/Yekaterinburg" " " \
+"posix/Asia/Yerevan" " " \
+"posix/Atlantic/Azores" " " \
+"posix/Atlantic/Bermuda" " " \
+"posix/Atlantic/Canary" " " \
+"posix/Atlantic/Cape_Verde" " " \
+"posix/Atlantic/Faeroe" " " \
+"posix/Atlantic/Faroe" " " \
+"posix/Atlantic/Jan_Mayen" " " \
+"posix/Atlantic/Madeira" " " \
+"posix/Atlantic/Reykjavik" " " \
+"posix/Atlantic/South_Georgia" " " \
+"posix/Atlantic/St_Helena" " " \
+"posix/Atlantic/Stanley" " " \
+"posix/Australia/ACT" " " \
+"posix/Australia/Adelaide" " " \
+"posix/Australia/Brisbane" " " \
+"posix/Australia/Broken_Hill" " " \
+"posix/Australia/Canberra" " " \
+"posix/Australia/Currie" " " \
+"posix/Australia/Darwin" " " \
+"posix/Australia/Eucla" " " \
+"posix/Australia/Hobart" " " \
+"posix/Australia/LHI" " " \
+"posix/Australia/Lindeman" " " \
+"posix/Australia/Lord_Howe" " " \
+"posix/Australia/Melbourne" " " \
+"posix/Australia/NSW" " " \
+"posix/Australia/North" " " \
+"posix/Australia/Perth" " " \
+"posix/Australia/Queensland" " " \
+"posix/Australia/South" " " \
+"posix/Australia/Sydney" " " \
+"posix/Australia/Tasmania" " " \
+"posix/Australia/Victoria" " " \
+"posix/Australia/West" " " \
+"posix/Australia/Yancowinna" " " \
+"posix/Brazil/Acre" " " \
+"posix/Brazil/DeNoronha" " " \
+"posix/Brazil/East" " " \
+"posix/Brazil/West" " " \
+"posix/CET" " " \
+"posix/CST6CDT" " " \
+"posix/Canada/Atlantic" " " \
+"posix/Canada/Central" " " \
+"posix/Canada/East-Saskatchewan" " " \
+"posix/Canada/Eastern" " " \
+"posix/Canada/Mountain" " " \
+"posix/Canada/Newfoundland" " " \
+"posix/Canada/Pacific" " " \
+"posix/Canada/Saskatchewan" " " \
+"posix/Canada/Yukon" " " \
+"posix/Chile/Continental" " " \
+"posix/Chile/EasterIsland" " " \
+"posix/Cuba" " " \
+"posix/EET" " " \
+"posix/EST" " " \
+"posix/EST5EDT" " " \
+"posix/Egypt" " " \
+"posix/Eire" " " \
+"posix/Etc/GMT" " " \
+"posix/Etc/GMT+0" " " \
+"posix/Etc/GMT+1" " " \
+"posix/Etc/GMT+10" " " \
+"posix/Etc/GMT+11" " " \
+"posix/Etc/GMT+12" " " \
+"posix/Etc/GMT+2" " " \
+"posix/Etc/GMT+3" " " \
+"posix/Etc/GMT+4" " " \
+"posix/Etc/GMT+5" " " \
+"posix/Etc/GMT+6" " " \
+"posix/Etc/GMT+7" " " \
+"posix/Etc/GMT+8" " " \
+"posix/Etc/GMT+9" " " \
+"posix/Etc/GMT-0" " " \
+"posix/Etc/GMT-1" " " \
+"posix/Etc/GMT-10" " " \
+"posix/Etc/GMT-11" " " \
+"posix/Etc/GMT-12" " " \
+"posix/Etc/GMT-13" " " \
+"posix/Etc/GMT-14" " " \
+"posix/Etc/GMT-2" " " \
+"posix/Etc/GMT-3" " " \
+"posix/Etc/GMT-4" " " \
+"posix/Etc/GMT-5" " " \
+"posix/Etc/GMT-6" " " \
+"posix/Etc/GMT-7" " " \
+"posix/Etc/GMT-8" " " \
+"posix/Etc/GMT-9" " " \
+"posix/Etc/GMT0" " " \
+"posix/Etc/Greenwich" " " \
+"posix/Etc/UCT" " " \
+"posix/Etc/UTC" " " \
+"posix/Etc/Universal" " " \
+"posix/Etc/Zulu" " " \
+"posix/Europe/Amsterdam" " " \
+"posix/Europe/Andorra" " " \
+"posix/Europe/Athens" " " \
+"posix/Europe/Belfast" " " \
+"posix/Europe/Belgrade" " " \
+"posix/Europe/Berlin" " " \
+"posix/Europe/Bratislava" " " \
+"posix/Europe/Brussels" " " \
+"posix/Europe/Bucharest" " " \
+"posix/Europe/Budapest" " " \
+"posix/Europe/Busingen" " " \
+"posix/Europe/Chisinau" " " \
+"posix/Europe/Copenhagen" " " \
+"posix/Europe/Dublin" " " \
+"posix/Europe/Gibraltar" " " \
+"posix/Europe/Guernsey" " " \
+"posix/Europe/Helsinki" " " \
+"posix/Europe/Isle_of_Man" " " \
+"posix/Europe/Istanbul" " " \
+"posix/Europe/Jersey" " " \
+"posix/Europe/Kaliningrad" " " \
+"posix/Europe/Kiev" " " \
+"posix/Europe/Lisbon" " " \
+"posix/Europe/Ljubljana" " " \
+"posix/Europe/London" " " \
+"posix/Europe/Luxembourg" " " \
+"posix/Europe/Madrid" " " \
+"posix/Europe/Malta" " " \
+"posix/Europe/Mariehamn" " " \
+"posix/Europe/Minsk" " " \
+"posix/Europe/Monaco" " " \
+"posix/Europe/Moscow" " " \
+"posix/Europe/Nicosia" " " \
+"posix/Europe/Oslo" " " \
+"posix/Europe/Paris" " " \
+"posix/Europe/Podgorica" " " \
+"posix/Europe/Prague" " " \
+"posix/Europe/Riga" " " \
+"posix/Europe/Rome" " " \
+"posix/Europe/Samara" " " \
+"posix/Europe/San_Marino" " " \
+"posix/Europe/Sarajevo" " " \
+"posix/Europe/Simferopol" " " \
+"posix/Europe/Skopje" " " \
+"posix/Europe/Sofia" " " \
+"posix/Europe/Stockholm" " " \
+"posix/Europe/Tallinn" " " \
+"posix/Europe/Tirane" " " \
+"posix/Europe/Tiraspol" " " \
+"posix/Europe/Uzhgorod" " " \
+"posix/Europe/Vaduz" " " \
+"posix/Europe/Vatican" " " \
+"posix/Europe/Vienna" " " \
+"posix/Europe/Vilnius" " " \
+"posix/Europe/Volgograd" " " \
+"posix/Europe/Warsaw" " " \
+"posix/Europe/Zagreb" " " \
+"posix/Europe/Zaporozhye" " " \
+"posix/Europe/Zurich" " " \
+"posix/Factory" " " \
+"posix/GB" " " \
+"posix/GB-Eire" " " \
+"posix/GMT" " " \
+"posix/GMT+0" " " \
+"posix/GMT-0" " " \
+"posix/GMT0" " " \
+"posix/Greenwich" " " \
+"posix/HST" " " \
+"posix/Hongkong" " " \
+"posix/Iceland" " " \
+"posix/Indian/Antananarivo" " " \
+"posix/Indian/Chagos" " " \
+"posix/Indian/Christmas" " " \
+"posix/Indian/Cocos" " " \
+"posix/Indian/Comoro" " " \
+"posix/Indian/Kerguelen" " " \
+"posix/Indian/Mahe" " " \
+"posix/Indian/Maldives" " " \
+"posix/Indian/Mauritius" " " \
+"posix/Indian/Mayotte" " " \
+"posix/Indian/Reunion" " " \
+"posix/Iran" " " \
+"posix/Israel" " " \
+"posix/Jamaica" " " \
+"posix/Japan" " " \
+"posix/Kwajalein" " " \
+"posix/Libya" " " \
+"posix/MET" " " \
+"posix/MST" " " \
+"posix/MST7MDT" " " \
+"posix/Mexico/BajaNorte" " " \
+"posix/Mexico/BajaSur" " " \
+"posix/Mexico/General" " " \
+"posix/NZ" " " \
+"posix/NZ-CHAT" " " \
+"posix/Navajo" " " \
+"posix/PRC" " " \
+"posix/PST8PDT" " " \
+"posix/Pacific/Apia" " " \
+"posix/Pacific/Auckland" " " \
+"posix/Pacific/Bougainville" " " \
+"posix/Pacific/Chatham" " " \
+"posix/Pacific/Chuuk" " " \
+"posix/Pacific/Easter" " " \
+"posix/Pacific/Efate" " " \
+"posix/Pacific/Enderbury" " " \
+"posix/Pacific/Fakaofo" " " \
+"posix/Pacific/Fiji" " " \
+"posix/Pacific/Funafuti" " " \
+"posix/Pacific/Galapagos" " " \
+"posix/Pacific/Gambier" " " \
+"posix/Pacific/Guadalcanal" " " \
+"posix/Pacific/Guam" " " \
+"posix/Pacific/Honolulu" " " \
+"posix/Pacific/Johnston" " " \
+"posix/Pacific/Kiritimati" " " \
+"posix/Pacific/Kosrae" " " \
+"posix/Pacific/Kwajalein" " " \
+"posix/Pacific/Majuro" " " \
+"posix/Pacific/Marquesas" " " \
+"posix/Pacific/Midway" " " \
+"posix/Pacific/Nauru" " " \
+"posix/Pacific/Niue" " " \
+"posix/Pacific/Norfolk" " " \
+"posix/Pacific/Noumea" " " \
+"posix/Pacific/Pago_Pago" " " \
+"posix/Pacific/Palau" " " \
+"posix/Pacific/Pitcairn" " " \
+"posix/Pacific/Pohnpei" " " \
+"posix/Pacific/Ponape" " " \
+"posix/Pacific/Port_Moresby" " " \
+"posix/Pacific/Rarotonga" " " \
+"posix/Pacific/Saipan" " " \
+"posix/Pacific/Samoa" " " \
+"posix/Pacific/Tahiti" " " \
+"posix/Pacific/Tarawa" " " \
+"posix/Pacific/Tongatapu" " " \
+"posix/Pacific/Truk" " " \
+"posix/Pacific/Wake" " " \
+"posix/Pacific/Wallis" " " \
+"posix/Pacific/Yap" " " \
+"posix/Poland" " " \
+"posix/Portugal" " " \
+"posix/ROC" " " \
+"posix/ROK" " " \
+"posix/Singapore" " " \
+"posix/Turkey" " " \
+"posix/UCT" " " \
+"posix/US/Alaska" " " \
+"posix/US/Aleutian" " " \
+"posix/US/Arizona" " " \
+"posix/US/Central" " " \
+"posix/US/East-Indiana" " " \
+"posix/US/Eastern" " " \
+"posix/US/Hawaii" " " \
+"posix/US/Indiana-Starke" " " \
+"posix/US/Michigan" " " \
+"posix/US/Mountain" " " \
+"posix/US/Pacific" " " \
+"posix/US/Pacific-New" " " \
+"posix/US/Samoa" " " \
+"posix/UTC" " " \
+"posix/Universal" " " \
+"posix/W-SU" " " \
+"posix/WET" " " \
+"posix/Zulu" " " \
+"posix/localtime" " " \
+"posix/posixrules" " " \
+"posixrules" " " \
+"right/Africa/Abidjan" " " \
+"right/Africa/Accra" " " \
+"right/Africa/Addis_Ababa" " " \
+"right/Africa/Algiers" " " \
+"right/Africa/Asmara" " " \
+"right/Africa/Asmera" " " \
+"right/Africa/Bamako" " " \
+"right/Africa/Bangui" " " \
+"right/Africa/Banjul" " " \
+"right/Africa/Bissau" " " \
+"right/Africa/Blantyre" " " \
+"right/Africa/Brazzaville" " " \
+"right/Africa/Bujumbura" " " \
+"right/Africa/Cairo" " " \
+"right/Africa/Casablanca" " " \
+"right/Africa/Ceuta" " " \
+"right/Africa/Conakry" " " \
+"right/Africa/Dakar" " " \
+"right/Africa/Dar_es_Salaam" " " \
+"right/Africa/Djibouti" " " \
+"right/Africa/Douala" " " \
+"right/Africa/El_Aaiun" " " \
+"right/Africa/Freetown" " " \
+"right/Africa/Gaborone" " " \
+"right/Africa/Harare" " " \
+"right/Africa/Johannesburg" " " \
+"right/Africa/Juba" " " \
+"right/Africa/Kampala" " " \
+"right/Africa/Khartoum" " " \
+"right/Africa/Kigali" " " \
+"right/Africa/Kinshasa" " " \
+"right/Africa/Lagos" " " \
+"right/Africa/Libreville" " " \
+"right/Africa/Lome" " " \
+"right/Africa/Luanda" " " \
+"right/Africa/Lubumbashi" " " \
+"right/Africa/Lusaka" " " \
+"right/Africa/Malabo" " " \
+"right/Africa/Maputo" " " \
+"right/Africa/Maseru" " " \
+"right/Africa/Mbabane" " " \
+"right/Africa/Mogadishu" " " \
+"right/Africa/Monrovia" " " \
+"right/Africa/Nairobi" " " \
+"right/Africa/Ndjamena" " " \
+"right/Africa/Niamey" " " \
+"right/Africa/Nouakchott" " " \
+"right/Africa/Ouagadougou" " " \
+"right/Africa/Porto-Novo" " " \
+"right/Africa/Sao_Tome" " " \
+"right/Africa/Timbuktu" " " \
+"right/Africa/Tripoli" " " \
+"right/Africa/Tunis" " " \
+"right/Africa/Windhoek" " " \
+"right/America/Adak" " " \
+"right/America/Anchorage" " " \
+"right/America/Anguilla" " " \
+"right/America/Antigua" " " \
+"right/America/Araguaina" " " \
+"right/America/Argentina/Buenos_Aires" " " \
+"right/America/Argentina/Catamarca" " " \
+"right/America/Argentina/ComodRivadavia" " " \
+"right/America/Argentina/Cordoba" " " \
+"right/America/Argentina/Jujuy" " " \
+"right/America/Argentina/La_Rioja" " " \
+"right/America/Argentina/Mendoza" " " \
+"right/America/Argentina/Rio_Gallegos" " " \
+"right/America/Argentina/Salta" " " \
+"right/America/Argentina/San_Juan" " " \
+"right/America/Argentina/San_Luis" " " \
+"right/America/Argentina/Tucuman" " " \
+"right/America/Argentina/Ushuaia" " " \
+"right/America/Aruba" " " \
+"right/America/Asuncion" " " \
+"right/America/Atikokan" " " \
+"right/America/Atka" " " \
+"right/America/Bahia" " " \
+"right/America/Bahia_Banderas" " " \
+"right/America/Barbados" " " \
+"right/America/Belem" " " \
+"right/America/Belize" " " \
+"right/America/Blanc-Sablon" " " \
+"right/America/Boa_Vista" " " \
+"right/America/Bogota" " " \
+"right/America/Boise" " " \
+"right/America/Buenos_Aires" " " \
+"right/America/Cambridge_Bay" " " \
+"right/America/Campo_Grande" " " \
+"right/America/Cancun" " " \
+"right/America/Caracas" " " \
+"right/America/Catamarca" " " \
+"right/America/Cayenne" " " \
+"right/America/Cayman" " " \
+"right/America/Chicago" " " \
+"right/America/Chihuahua" " " \
+"right/America/Coral_Harbour" " " \
+"right/America/Cordoba" " " \
+"right/America/Costa_Rica" " " \
+"right/America/Creston" " " \
+"right/America/Cuiaba" " " \
+"right/America/Curacao" " " \
+"right/America/Danmarkshavn" " " \
+"right/America/Dawson" " " \
+"right/America/Dawson_Creek" " " \
+"right/America/Denver" " " \
+"right/America/Detroit" " " \
+"right/America/Dominica" " " \
+"right/America/Edmonton" " " \
+"right/America/Eirunepe" " " \
+"right/America/El_Salvador" " " \
+"right/America/Ensenada" " " \
+"right/America/Fort_Wayne" " " \
+"right/America/Fortaleza" " " \
+"right/America/Glace_Bay" " " \
+"right/America/Godthab" " " \
+"right/America/Goose_Bay" " " \
+"right/America/Grand_Turk" " " \
+"right/America/Grenada" " " \
+"right/America/Guadeloupe" " " \
+"right/America/Guatemala" " " \
+"right/America/Guayaquil" " " \
+"right/America/Guyana" " " \
+"right/America/Halifax" " " \
+"right/America/Havana" " " \
+"right/America/Hermosillo" " " \
+"right/America/Indiana/Indianapolis" " " \
+"right/America/Indiana/Knox" " " \
+"right/America/Indiana/Marengo" " " \
+"right/America/Indiana/Petersburg" " " \
+"right/America/Indiana/Tell_City" " " \
+"right/America/Indiana/Vevay" " " \
+"right/America/Indiana/Vincennes" " " \
+"right/America/Indiana/Winamac" " " \
+"right/America/Indianapolis" " " \
+"right/America/Inuvik" " " \
+"right/America/Iqaluit" " " \
+"right/America/Jamaica" " " \
+"right/America/Jujuy" " " \
+"right/America/Juneau" " " \
+"right/America/Kentucky/Louisville" " " \
+"right/America/Kentucky/Monticello" " " \
+"right/America/Knox_IN" " " \
+"right/America/Kralendijk" " " \
+"right/America/La_Paz" " " \
+"right/America/Lima" " " \
+"right/America/Los_Angeles" " " \
+"right/America/Louisville" " " \
+"right/America/Lower_Princes" " " \
+"right/America/Maceio" " " \
+"right/America/Managua" " " \
+"right/America/Manaus" " " \
+"right/America/Marigot" " " \
+"right/America/Martinique" " " \
+"right/America/Matamoros" " " \
+"right/America/Mazatlan" " " \
+"right/America/Mendoza" " " \
+"right/America/Menominee" " " \
+"right/America/Merida" " " \
+"right/America/Metlakatla" " " \
+"right/America/Mexico_City" " " \
+"right/America/Miquelon" " " \
+"right/America/Moncton" " " \
+"right/America/Monterrey" " " \
+"right/America/Montevideo" " " \
+"right/America/Montreal" " " \
+"right/America/Montserrat" " " \
+"right/America/Nassau" " " \
+"right/America/New_York" " " \
+"right/America/Nipigon" " " \
+"right/America/Nome" " " \
+"right/America/Noronha" " " \
+"right/America/North_Dakota/Beulah" " " \
+"right/America/North_Dakota/Center" " " \
+"right/America/North_Dakota/New_Salem" " " \
+"right/America/Ojinaga" " " \
+"right/America/Panama" " " \
+"right/America/Pangnirtung" " " \
+"right/America/Paramaribo" " " \
+"right/America/Phoenix" " " \
+"right/America/Port-au-Prince" " " \
+"right/America/Port_of_Spain" " " \
+"right/America/Porto_Acre" " " \
+"right/America/Porto_Velho" " " \
+"right/America/Puerto_Rico" " " \
+"right/America/Rainy_River" " " \
+"right/America/Rankin_Inlet" " " \
+"right/America/Recife" " " \
+"right/America/Regina" " " \
+"right/America/Resolute" " " \
+"right/America/Rio_Branco" " " \
+"right/America/Rosario" " " \
+"right/America/Santa_Isabel" " " \
+"right/America/Santarem" " " \
+"right/America/Santiago" " " \
+"right/America/Santo_Domingo" " " \
+"right/America/Sao_Paulo" " " \
+"right/America/Scoresbysund" " " \
+"right/America/Shiprock" " " \
+"right/America/Sitka" " " \
+"right/America/St_Barthelemy" " " \
+"right/America/St_Johns" " " \
+"right/America/St_Kitts" " " \
+"right/America/St_Lucia" " " \
+"right/America/St_Thomas" " " \
+"right/America/St_Vincent" " " \
+"right/America/Swift_Current" " " \
+"right/America/Tegucigalpa" " " \
+"right/America/Thule" " " \
+"right/America/Thunder_Bay" " " \
+"right/America/Tijuana" " " \
+"right/America/Toronto" " " \
+"right/America/Tortola" " " \
+"right/America/Vancouver" " " \
+"right/America/Virgin" " " \
+"right/America/Whitehorse" " " \
+"right/America/Winnipeg" " " \
+"right/America/Yakutat" " " \
+"right/America/Yellowknife" " " \
+"right/Antarctica/Casey" " " \
+"right/Antarctica/Davis" " " \
+"right/Antarctica/DumontDUrville" " " \
+"right/Antarctica/Macquarie" " " \
+"right/Antarctica/Mawson" " " \
+"right/Antarctica/McMurdo" " " \
+"right/Antarctica/Palmer" " " \
+"right/Antarctica/Rothera" " " \
+"right/Antarctica/South_Pole" " " \
+"right/Antarctica/Syowa" " " \
+"right/Antarctica/Troll" " " \
+"right/Antarctica/Vostok" " " \
+"right/Arctic/Longyearbyen" " " \
+"right/Asia/Aden" " " \
+"right/Asia/Almaty" " " \
+"right/Asia/Amman" " " \
+"right/Asia/Anadyr" " " \
+"right/Asia/Aqtau" " " \
+"right/Asia/Aqtobe" " " \
+"right/Asia/Ashgabat" " " \
+"right/Asia/Ashkhabad" " " \
+"right/Asia/Baghdad" " " \
+"right/Asia/Bahrain" " " \
+"right/Asia/Baku" " " \
+"right/Asia/Bangkok" " " \
+"right/Asia/Beirut" " " \
+"right/Asia/Bishkek" " " \
+"right/Asia/Brunei" " " \
+"right/Asia/Calcutta" " " \
+"right/Asia/Chita" " " \
+"right/Asia/Choibalsan" " " \
+"right/Asia/Chongqing" " " \
+"right/Asia/Chungking" " " \
+"right/Asia/Colombo" " " \
+"right/Asia/Dacca" " " \
+"right/Asia/Damascus" " " \
+"right/Asia/Dhaka" " " \
+"right/Asia/Dili" " " \
+"right/Asia/Dubai" " " \
+"right/Asia/Dushanbe" " " \
+"right/Asia/Gaza" " " \
+"right/Asia/Harbin" " " \
+"right/Asia/Hebron" " " \
+"right/Asia/Ho_Chi_Minh" " " \
+"right/Asia/Hong_Kong" " " \
+"right/Asia/Hovd" " " \
+"right/Asia/Irkutsk" " " \
+"right/Asia/Istanbul" " " \
+"right/Asia/Jakarta" " " \
+"right/Asia/Jayapura" " " \
+"right/Asia/Jerusalem" " " \
+"right/Asia/Kabul" " " \
+"right/Asia/Kamchatka" " " \
+"right/Asia/Karachi" " " \
+"right/Asia/Kashgar" " " \
+"right/Asia/Kathmandu" " " \
+"right/Asia/Katmandu" " " \
+"right/Asia/Khandyga" " " \
+"right/Asia/Kolkata" " " \
+"right/Asia/Krasnoyarsk" " " \
+"right/Asia/Kuala_Lumpur" " " \
+"right/Asia/Kuching" " " \
+"right/Asia/Kuwait" " " \
+"right/Asia/Macao" " " \
+"right/Asia/Macau" " " \
+"right/Asia/Magadan" " " \
+"right/Asia/Makassar" " " \
+"right/Asia/Manila" " " \
+"right/Asia/Muscat" " " \
+"right/Asia/Nicosia" " " \
+"right/Asia/Novokuznetsk" " " \
+"right/Asia/Novosibirsk" " " \
+"right/Asia/Omsk" " " \
+"right/Asia/Oral" " " \
+"right/Asia/Phnom_Penh" " " \
+"right/Asia/Pontianak" " " \
+"right/Asia/Pyongyang" " " \
+"right/Asia/Qatar" " " \
+"right/Asia/Qyzylorda" " " \
+"right/Asia/Rangoon" " " \
+"right/Asia/Riyadh" " " \
+"right/Asia/Saigon" " " \
+"right/Asia/Sakhalin" " " \
+"right/Asia/Samarkand" " " \
+"right/Asia/Seoul" " " \
+"right/Asia/Shanghai" " " \
+"right/Asia/Singapore" " " \
+"right/Asia/Srednekolymsk" " " \
+"right/Asia/Taipei" " " \
+"right/Asia/Tashkent" " " \
+"right/Asia/Tbilisi" " " \
+"right/Asia/Tehran" " " \
+"right/Asia/Tel_Aviv" " " \
+"right/Asia/Thimbu" " " \
+"right/Asia/Thimphu" " " \
+"right/Asia/Tokyo" " " \
+"right/Asia/Ujung_Pandang" " " \
+"right/Asia/Ulaanbaatar" " " \
+"right/Asia/Ulan_Bator" " " \
+"right/Asia/Urumqi" " " \
+"right/Asia/Ust-Nera" " " \
+"right/Asia/Vientiane" " " \
+"right/Asia/Vladivostok" " " \
+"right/Asia/Yakutsk" " " \
+"right/Asia/Yekaterinburg" " " \
+"right/Asia/Yerevan" " " \
+"right/Atlantic/Azores" " " \
+"right/Atlantic/Bermuda" " " \
+"right/Atlantic/Canary" " " \
+"right/Atlantic/Cape_Verde" " " \
+"right/Atlantic/Faeroe" " " \
+"right/Atlantic/Faroe" " " \
+"right/Atlantic/Jan_Mayen" " " \
+"right/Atlantic/Madeira" " " \
+"right/Atlantic/Reykjavik" " " \
+"right/Atlantic/South_Georgia" " " \
+"right/Atlantic/St_Helena" " " \
+"right/Atlantic/Stanley" " " \
+"right/Australia/ACT" " " \
+"right/Australia/Adelaide" " " \
+"right/Australia/Brisbane" " " \
+"right/Australia/Broken_Hill" " " \
+"right/Australia/Canberra" " " \
+"right/Australia/Currie" " " \
+"right/Australia/Darwin" " " \
+"right/Australia/Eucla" " " \
+"right/Australia/Hobart" " " \
+"right/Australia/LHI" " " \
+"right/Australia/Lindeman" " " \
+"right/Australia/Lord_Howe" " " \
+"right/Australia/Melbourne" " " \
+"right/Australia/NSW" " " \
+"right/Australia/North" " " \
+"right/Australia/Perth" " " \
+"right/Australia/Queensland" " " \
+"right/Australia/South" " " \
+"right/Australia/Sydney" " " \
+"right/Australia/Tasmania" " " \
+"right/Australia/Victoria" " " \
+"right/Australia/West" " " \
+"right/Australia/Yancowinna" " " \
+"right/Brazil/Acre" " " \
+"right/Brazil/DeNoronha" " " \
+"right/Brazil/East" " " \
+"right/Brazil/West" " " \
+"right/CET" " " \
+"right/CST6CDT" " " \
+"right/Canada/Atlantic" " " \
+"right/Canada/Central" " " \
+"right/Canada/East-Saskatchewan" " " \
+"right/Canada/Eastern" " " \
+"right/Canada/Mountain" " " \
+"right/Canada/Newfoundland" " " \
+"right/Canada/Pacific" " " \
+"right/Canada/Saskatchewan" " " \
+"right/Canada/Yukon" " " \
+"right/Chile/Continental" " " \
+"right/Chile/EasterIsland" " " \
+"right/Cuba" " " \
+"right/EET" " " \
+"right/EST" " " \
+"right/EST5EDT" " " \
+"right/Egypt" " " \
+"right/Eire" " " \
+"right/Etc/GMT" " " \
+"right/Etc/GMT+0" " " \
+"right/Etc/GMT+1" " " \
+"right/Etc/GMT+10" " " \
+"right/Etc/GMT+11" " " \
+"right/Etc/GMT+12" " " \
+"right/Etc/GMT+2" " " \
+"right/Etc/GMT+3" " " \
+"right/Etc/GMT+4" " " \
+"right/Etc/GMT+5" " " \
+"right/Etc/GMT+6" " " \
+"right/Etc/GMT+7" " " \
+"right/Etc/GMT+8" " " \
+"right/Etc/GMT+9" " " \
+"right/Etc/GMT-0" " " \
+"right/Etc/GMT-1" " " \
+"right/Etc/GMT-10" " " \
+"right/Etc/GMT-11" " " \
+"right/Etc/GMT-12" " " \
+"right/Etc/GMT-13" " " \
+"right/Etc/GMT-14" " " \
+"right/Etc/GMT-2" " " \
+"right/Etc/GMT-3" " " \
+"right/Etc/GMT-4" " " \
+"right/Etc/GMT-5" " " \
+"right/Etc/GMT-6" " " \
+"right/Etc/GMT-7" " " \
+"right/Etc/GMT-8" " " \
+"right/Etc/GMT-9" " " \
+"right/Etc/GMT0" " " \
+"right/Etc/Greenwich" " " \
+"right/Etc/UCT" " " \
+"right/Etc/UTC" " " \
+"right/Etc/Universal" " " \
+"right/Etc/Zulu" " " \
+"right/Europe/Amsterdam" " " \
+"right/Europe/Andorra" " " \
+"right/Europe/Athens" " " \
+"right/Europe/Belfast" " " \
+"right/Europe/Belgrade" " " \
+"right/Europe/Berlin" " " \
+"right/Europe/Bratislava" " " \
+"right/Europe/Brussels" " " \
+"right/Europe/Bucharest" " " \
+"right/Europe/Budapest" " " \
+"right/Europe/Busingen" " " \
+"right/Europe/Chisinau" " " \
+"right/Europe/Copenhagen" " " \
+"right/Europe/Dublin" " " \
+"right/Europe/Gibraltar" " " \
+"right/Europe/Guernsey" " " \
+"right/Europe/Helsinki" " " \
+"right/Europe/Isle_of_Man" " " \
+"right/Europe/Istanbul" " " \
+"right/Europe/Jersey" " " \
+"right/Europe/Kaliningrad" " " \
+"right/Europe/Kiev" " " \
+"right/Europe/Lisbon" " " \
+"right/Europe/Ljubljana" " " \
+"right/Europe/London" " " \
+"right/Europe/Luxembourg" " " \
+"right/Europe/Madrid" " " \
+"right/Europe/Malta" " " \
+"right/Europe/Mariehamn" " " \
+"right/Europe/Minsk" " " \
+"right/Europe/Monaco" " " \
+"right/Europe/Moscow" " " \
+"right/Europe/Nicosia" " " \
+"right/Europe/Oslo" " " \
+"right/Europe/Paris" " " \
+"right/Europe/Podgorica" " " \
+"right/Europe/Prague" " " \
+"right/Europe/Riga" " " \
+"right/Europe/Rome" " " \
+"right/Europe/Samara" " " \
+"right/Europe/San_Marino" " " \
+"right/Europe/Sarajevo" " " \
+"right/Europe/Simferopol" " " \
+"right/Europe/Skopje" " " \
+"right/Europe/Sofia" " " \
+"right/Europe/Stockholm" " " \
+"right/Europe/Tallinn" " " \
+"right/Europe/Tirane" " " \
+"right/Europe/Tiraspol" " " \
+"right/Europe/Uzhgorod" " " \
+"right/Europe/Vaduz" " " \
+"right/Europe/Vatican" " " \
+"right/Europe/Vienna" " " \
+"right/Europe/Vilnius" " " \
+"right/Europe/Volgograd" " " \
+"right/Europe/Warsaw" " " \
+"right/Europe/Zagreb" " " \
+"right/Europe/Zaporozhye" " " \
+"right/Europe/Zurich" " " \
+"right/Factory" " " \
+"right/GB" " " \
+"right/GB-Eire" " " \
+"right/GMT" " " \
+"right/GMT+0" " " \
+"right/GMT-0" " " \
+"right/GMT0" " " \
+"right/Greenwich" " " \
+"right/HST" " " \
+"right/Hongkong" " " \
+"right/Iceland" " " \
+"right/Indian/Antananarivo" " " \
+"right/Indian/Chagos" " " \
+"right/Indian/Christmas" " " \
+"right/Indian/Cocos" " " \
+"right/Indian/Comoro" " " \
+"right/Indian/Kerguelen" " " \
+"right/Indian/Mahe" " " \
+"right/Indian/Maldives" " " \
+"right/Indian/Mauritius" " " \
+"right/Indian/Mayotte" " " \
+"right/Indian/Reunion" " " \
+"right/Iran" " " \
+"right/Israel" " " \
+"right/Jamaica" " " \
+"right/Japan" " " \
+"right/Kwajalein" " " \
+"right/Libya" " " \
+"right/MET" " " \
+"right/MST" " " \
+"right/MST7MDT" " " \
+"right/Mexico/BajaNorte" " " \
+"right/Mexico/BajaSur" " " \
+"right/Mexico/General" " " \
+"right/NZ" " " \
+"right/NZ-CHAT" " " \
+"right/Navajo" " " \
+"right/PRC" " " \
+"right/PST8PDT" " " \
+"right/Pacific/Apia" " " \
+"right/Pacific/Auckland" " " \
+"right/Pacific/Bougainville" " " \
+"right/Pacific/Chatham" " " \
+"right/Pacific/Chuuk" " " \
+"right/Pacific/Easter" " " \
+"right/Pacific/Efate" " " \
+"right/Pacific/Enderbury" " " \
+"right/Pacific/Fakaofo" " " \
+"right/Pacific/Fiji" " " \
+"right/Pacific/Funafuti" " " \
+"right/Pacific/Galapagos" " " \
+"right/Pacific/Gambier" " " \
+"right/Pacific/Guadalcanal" " " \
+"right/Pacific/Guam" " " \
+"right/Pacific/Honolulu" " " \
+"right/Pacific/Johnston" " " \
+"right/Pacific/Kiritimati" " " \
+"right/Pacific/Kosrae" " " \
+"right/Pacific/Kwajalein" " " \
+"right/Pacific/Majuro" " " \
+"right/Pacific/Marquesas" " " \
+"right/Pacific/Midway" " " \
+"right/Pacific/Nauru" " " \
+"right/Pacific/Niue" " " \
+"right/Pacific/Norfolk" " " \
+"right/Pacific/Noumea" " " \
+"right/Pacific/Pago_Pago" " " \
+"right/Pacific/Palau" " " \
+"right/Pacific/Pitcairn" " " \
+"right/Pacific/Pohnpei" " " \
+"right/Pacific/Ponape" " " \
+"right/Pacific/Port_Moresby" " " \
+"right/Pacific/Rarotonga" " " \
+"right/Pacific/Saipan" " " \
+"right/Pacific/Samoa" " " \
+"right/Pacific/Tahiti" " " \
+"right/Pacific/Tarawa" " " \
+"right/Pacific/Tongatapu" " " \
+"right/Pacific/Truk" " " \
+"right/Pacific/Wake" " " \
+"right/Pacific/Wallis" " " \
+"right/Pacific/Yap" " " \
+"right/Poland" " " \
+"right/Portugal" " " \
+"right/ROC" " " \
+"right/ROK" " " \
+"right/Singapore" " " \
+"right/Turkey" " " \
+"right/UCT" " " \
+"right/US/Alaska" " " \
+"right/US/Aleutian" " " \
+"right/US/Arizona" " " \
+"right/US/Central" " " \
+"right/US/East-Indiana" " " \
+"right/US/Eastern" " " \
+"right/US/Hawaii" " " \
+"right/US/Indiana-Starke" " " \
+"right/US/Michigan" " " \
+"right/US/Mountain" " " \
+"right/US/Pacific" " " \
+"right/US/Pacific-New" " " \
+"right/US/Samoa" " " \
+"right/UTC" " " \
+"right/Universal" " " \
+"right/W-SU" " " \
+"right/WET" " " \
+"right/Zulu" " " \
+ 2> $TMP/tz
+
+ if [ $? = 1 -o $? = 255 ]; then
+ rm -f $TMP/tz
+ exit
+ fi
+
+ TIMEZONE="`cat $TMP/tz`"
+ rm -f $TMP/tz
+
+ setzone $TIMEZONE
+ exit
+else
+ ###
+ ### use text prompts
+ ###
+ while [ 0 ]; do
+ echo -n "Would you like to configure your timezone ([y]es, [n]o)? "
+ read TIMECONF;
+ echo
+
+ if [ "$TIMECONF" = "n" ]; then
+ break
+ fi
+
+ cat << EOF
+Select one of these timezones:
+
+US/Alaska
+US/Aleutian
+US/Arizona
+US/Central
+US/East-Indiana
+US/Eastern
+US/Hawaii
+US/Indiana-Starke
+US/Michigan
+US/Mountain
+US/Pacific
+US/Pacific-New
+US/Samoa
+Africa/Abidjan
+Africa/Accra
+Africa/Addis_Ababa
+Africa/Algiers
+Africa/Asmara
+Africa/Asmera
+Africa/Bamako
+Africa/Bangui
+Africa/Banjul
+Africa/Bissau
+Africa/Blantyre
+Africa/Brazzaville
+Africa/Bujumbura
+Africa/Cairo
+Africa/Casablanca
+Africa/Ceuta
+Africa/Conakry
+Africa/Dakar
+Africa/Dar_es_Salaam
+Africa/Djibouti
+Africa/Douala
+Africa/El_Aaiun
+Africa/Freetown
+Africa/Gaborone
+Africa/Harare
+Africa/Johannesburg
+Africa/Juba
+Africa/Kampala
+Africa/Khartoum
+Africa/Kigali
+Africa/Kinshasa
+Africa/Lagos
+Africa/Libreville
+Africa/Lome
+Africa/Luanda
+Africa/Lubumbashi
+Africa/Lusaka
+Africa/Malabo
+Africa/Maputo
+Africa/Maseru
+Africa/Mbabane
+Africa/Mogadishu
+Africa/Monrovia
+Africa/Nairobi
+Africa/Ndjamena
+Africa/Niamey
+Africa/Nouakchott
+Africa/Ouagadougou
+Africa/Porto-Novo
+Africa/Sao_Tome
+Africa/Timbuktu
+Africa/Tripoli
+Africa/Tunis
+Africa/Windhoek
+America/Adak
+America/Anchorage
+America/Anguilla
+America/Antigua
+America/Araguaina
+America/Argentina/Buenos_Aires
+America/Argentina/Catamarca
+America/Argentina/ComodRivadavia
+America/Argentina/Cordoba
+America/Argentina/Jujuy
+America/Argentina/La_Rioja
+America/Argentina/Mendoza
+America/Argentina/Rio_Gallegos
+America/Argentina/Salta
+America/Argentina/San_Juan
+America/Argentina/San_Luis
+America/Argentina/Tucuman
+America/Argentina/Ushuaia
+America/Aruba
+America/Asuncion
+America/Atikokan
+America/Atka
+America/Bahia
+America/Bahia_Banderas
+America/Barbados
+America/Belem
+America/Belize
+America/Blanc-Sablon
+America/Boa_Vista
+America/Bogota
+America/Boise
+America/Buenos_Aires
+America/Cambridge_Bay
+America/Campo_Grande
+America/Cancun
+America/Caracas
+America/Catamarca
+America/Cayenne
+America/Cayman
+America/Chicago
+America/Chihuahua
+America/Coral_Harbour
+America/Cordoba
+America/Costa_Rica
+America/Creston
+America/Cuiaba
+America/Curacao
+America/Danmarkshavn
+America/Dawson
+America/Dawson_Creek
+America/Denver
+America/Detroit
+America/Dominica
+America/Edmonton
+America/Eirunepe
+America/El_Salvador
+America/Ensenada
+America/Fort_Wayne
+America/Fortaleza
+America/Glace_Bay
+America/Godthab
+America/Goose_Bay
+America/Grand_Turk
+America/Grenada
+America/Guadeloupe
+America/Guatemala
+America/Guayaquil
+America/Guyana
+America/Halifax
+America/Havana
+America/Hermosillo
+America/Indiana/Indianapolis
+America/Indiana/Knox
+America/Indiana/Marengo
+America/Indiana/Petersburg
+America/Indiana/Tell_City
+America/Indiana/Vevay
+America/Indiana/Vincennes
+America/Indiana/Winamac
+America/Indianapolis
+America/Inuvik
+America/Iqaluit
+America/Jamaica
+America/Jujuy
+America/Juneau
+America/Kentucky/Louisville
+America/Kentucky/Monticello
+America/Knox_IN
+America/Kralendijk
+America/La_Paz
+America/Lima
+America/Los_Angeles
+America/Louisville
+America/Lower_Princes
+America/Maceio
+America/Managua
+America/Manaus
+America/Marigot
+America/Martinique
+America/Matamoros
+America/Mazatlan
+America/Mendoza
+America/Menominee
+America/Merida
+America/Metlakatla
+America/Mexico_City
+America/Miquelon
+America/Moncton
+America/Monterrey
+America/Montevideo
+America/Montreal
+America/Montserrat
+America/Nassau
+America/New_York
+America/Nipigon
+America/Nome
+America/Noronha
+America/North_Dakota/Beulah
+America/North_Dakota/Center
+America/North_Dakota/New_Salem
+America/Ojinaga
+America/Panama
+America/Pangnirtung
+America/Paramaribo
+America/Phoenix
+America/Port-au-Prince
+America/Port_of_Spain
+America/Porto_Acre
+America/Porto_Velho
+America/Puerto_Rico
+America/Rainy_River
+America/Rankin_Inlet
+America/Recife
+America/Regina
+America/Resolute
+America/Rio_Branco
+America/Rosario
+America/Santa_Isabel
+America/Santarem
+America/Santiago
+America/Santo_Domingo
+America/Sao_Paulo
+America/Scoresbysund
+America/Shiprock
+America/Sitka
+America/St_Barthelemy
+America/St_Johns
+America/St_Kitts
+America/St_Lucia
+America/St_Thomas
+America/St_Vincent
+America/Swift_Current
+America/Tegucigalpa
+America/Thule
+America/Thunder_Bay
+America/Tijuana
+America/Toronto
+America/Tortola
+America/Vancouver
+America/Virgin
+America/Whitehorse
+America/Winnipeg
+America/Yakutat
+America/Yellowknife
+Antarctica/Casey
+Antarctica/Davis
+Antarctica/DumontDUrville
+Antarctica/Macquarie
+Antarctica/Mawson
+Antarctica/McMurdo
+Antarctica/Palmer
+Antarctica/Rothera
+Antarctica/South_Pole
+Antarctica/Syowa
+Antarctica/Troll
+Antarctica/Vostok
+Arctic/Longyearbyen
+Asia/Aden
+Asia/Almaty
+Asia/Amman
+Asia/Anadyr
+Asia/Aqtau
+Asia/Aqtobe
+Asia/Ashgabat
+Asia/Ashkhabad
+Asia/Baghdad
+Asia/Bahrain
+Asia/Baku
+Asia/Bangkok
+Asia/Beirut
+Asia/Bishkek
+Asia/Brunei
+Asia/Calcutta
+Asia/Chita
+Asia/Choibalsan
+Asia/Chongqing
+Asia/Chungking
+Asia/Colombo
+Asia/Dacca
+Asia/Damascus
+Asia/Dhaka
+Asia/Dili
+Asia/Dubai
+Asia/Dushanbe
+Asia/Gaza
+Asia/Harbin
+Asia/Hebron
+Asia/Ho_Chi_Minh
+Asia/Hong_Kong
+Asia/Hovd
+Asia/Irkutsk
+Asia/Istanbul
+Asia/Jakarta
+Asia/Jayapura
+Asia/Jerusalem
+Asia/Kabul
+Asia/Kamchatka
+Asia/Karachi
+Asia/Kashgar
+Asia/Kathmandu
+Asia/Katmandu
+Asia/Khandyga
+Asia/Kolkata
+Asia/Krasnoyarsk
+Asia/Kuala_Lumpur
+Asia/Kuching
+Asia/Kuwait
+Asia/Macao
+Asia/Macau
+Asia/Magadan
+Asia/Makassar
+Asia/Manila
+Asia/Muscat
+Asia/Nicosia
+Asia/Novokuznetsk
+Asia/Novosibirsk
+Asia/Omsk
+Asia/Oral
+Asia/Phnom_Penh
+Asia/Pontianak
+Asia/Pyongyang
+Asia/Qatar
+Asia/Qyzylorda
+Asia/Rangoon
+Asia/Riyadh
+Asia/Saigon
+Asia/Sakhalin
+Asia/Samarkand
+Asia/Seoul
+Asia/Shanghai
+Asia/Singapore
+Asia/Srednekolymsk
+Asia/Taipei
+Asia/Tashkent
+Asia/Tbilisi
+Asia/Tehran
+Asia/Tel_Aviv
+Asia/Thimbu
+Asia/Thimphu
+Asia/Tokyo
+Asia/Ujung_Pandang
+Asia/Ulaanbaatar
+Asia/Ulan_Bator
+Asia/Urumqi
+Asia/Ust-Nera
+Asia/Vientiane
+Asia/Vladivostok
+Asia/Yakutsk
+Asia/Yekaterinburg
+Asia/Yerevan
+Atlantic/Azores
+Atlantic/Bermuda
+Atlantic/Canary
+Atlantic/Cape_Verde
+Atlantic/Faeroe
+Atlantic/Faroe
+Atlantic/Jan_Mayen
+Atlantic/Madeira
+Atlantic/Reykjavik
+Atlantic/South_Georgia
+Atlantic/St_Helena
+Atlantic/Stanley
+Australia/ACT
+Australia/Adelaide
+Australia/Brisbane
+Australia/Broken_Hill
+Australia/Canberra
+Australia/Currie
+Australia/Darwin
+Australia/Eucla
+Australia/Hobart
+Australia/LHI
+Australia/Lindeman
+Australia/Lord_Howe
+Australia/Melbourne
+Australia/NSW
+Australia/North
+Australia/Perth
+Australia/Queensland
+Australia/South
+Australia/Sydney
+Australia/Tasmania
+Australia/Victoria
+Australia/West
+Australia/Yancowinna
+Brazil/Acre
+Brazil/DeNoronha
+Brazil/East
+Brazil/West
+CET
+CST6CDT
+Canada/Atlantic
+Canada/Central
+Canada/East-Saskatchewan
+Canada/Eastern
+Canada/Mountain
+Canada/Newfoundland
+Canada/Pacific
+Canada/Saskatchewan
+Canada/Yukon
+Chile/Continental
+Chile/EasterIsland
+Cuba
+EET
+EST
+EST5EDT
+Egypt
+Eire
+Etc/GMT
+Etc/GMT+0
+Etc/GMT+1
+Etc/GMT+10
+Etc/GMT+11
+Etc/GMT+12
+Etc/GMT+2
+Etc/GMT+3
+Etc/GMT+4
+Etc/GMT+5
+Etc/GMT+6
+Etc/GMT+7
+Etc/GMT+8
+Etc/GMT+9
+Etc/GMT-0
+Etc/GMT-1
+Etc/GMT-10
+Etc/GMT-11
+Etc/GMT-12
+Etc/GMT-13
+Etc/GMT-14
+Etc/GMT-2
+Etc/GMT-3
+Etc/GMT-4
+Etc/GMT-5
+Etc/GMT-6
+Etc/GMT-7
+Etc/GMT-8
+Etc/GMT-9
+Etc/GMT0
+Etc/Greenwich
+Etc/UCT
+Etc/UTC
+Etc/Universal
+Etc/Zulu
+Europe/Amsterdam
+Europe/Andorra
+Europe/Athens
+Europe/Belfast
+Europe/Belgrade
+Europe/Berlin
+Europe/Bratislava
+Europe/Brussels
+Europe/Bucharest
+Europe/Budapest
+Europe/Busingen
+Europe/Chisinau
+Europe/Copenhagen
+Europe/Dublin
+Europe/Gibraltar
+Europe/Guernsey
+Europe/Helsinki
+Europe/Isle_of_Man
+Europe/Istanbul
+Europe/Jersey
+Europe/Kaliningrad
+Europe/Kiev
+Europe/Lisbon
+Europe/Ljubljana
+Europe/London
+Europe/Luxembourg
+Europe/Madrid
+Europe/Malta
+Europe/Mariehamn
+Europe/Minsk
+Europe/Monaco
+Europe/Moscow
+Europe/Nicosia
+Europe/Oslo
+Europe/Paris
+Europe/Podgorica
+Europe/Prague
+Europe/Riga
+Europe/Rome
+Europe/Samara
+Europe/San_Marino
+Europe/Sarajevo
+Europe/Simferopol
+Europe/Skopje
+Europe/Sofia
+Europe/Stockholm
+Europe/Tallinn
+Europe/Tirane
+Europe/Tiraspol
+Europe/Uzhgorod
+Europe/Vaduz
+Europe/Vatican
+Europe/Vienna
+Europe/Vilnius
+Europe/Volgograd
+Europe/Warsaw
+Europe/Zagreb
+Europe/Zaporozhye
+Europe/Zurich
+Factory
+GB
+GB-Eire
+GMT
+GMT+0
+GMT-0
+GMT0
+Greenwich
+HST
+Hongkong
+Iceland
+Indian/Antananarivo
+Indian/Chagos
+Indian/Christmas
+Indian/Cocos
+Indian/Comoro
+Indian/Kerguelen
+Indian/Mahe
+Indian/Maldives
+Indian/Mauritius
+Indian/Mayotte
+Indian/Reunion
+Iran
+Israel
+Jamaica
+Japan
+Kwajalein
+Libya
+MET
+MST
+MST7MDT
+Mexico/BajaNorte
+Mexico/BajaSur
+Mexico/General
+NZ
+NZ-CHAT
+Navajo
+PRC
+PST8PDT
+Pacific/Apia
+Pacific/Auckland
+Pacific/Bougainville
+Pacific/Chatham
+Pacific/Chuuk
+Pacific/Easter
+Pacific/Efate
+Pacific/Enderbury
+Pacific/Fakaofo
+Pacific/Fiji
+Pacific/Funafuti
+Pacific/Galapagos
+Pacific/Gambier
+Pacific/Guadalcanal
+Pacific/Guam
+Pacific/Honolulu
+Pacific/Johnston
+Pacific/Kiritimati
+Pacific/Kosrae
+Pacific/Kwajalein
+Pacific/Majuro
+Pacific/Marquesas
+Pacific/Midway
+Pacific/Nauru
+Pacific/Niue
+Pacific/Norfolk
+Pacific/Noumea
+Pacific/Pago_Pago
+Pacific/Palau
+Pacific/Pitcairn
+Pacific/Pohnpei
+Pacific/Ponape
+Pacific/Port_Moresby
+Pacific/Rarotonga
+Pacific/Saipan
+Pacific/Samoa
+Pacific/Tahiti
+Pacific/Tarawa
+Pacific/Tongatapu
+Pacific/Truk
+Pacific/Wake
+Pacific/Wallis
+Pacific/Yap
+Poland
+Portugal
+ROC
+ROK
+Singapore
+Turkey
+UCT
+UTC
+Universal
+W-SU
+WET
+Zulu
+posix/Africa/Abidjan
+posix/Africa/Accra
+posix/Africa/Addis_Ababa
+posix/Africa/Algiers
+posix/Africa/Asmara
+posix/Africa/Asmera
+posix/Africa/Bamako
+posix/Africa/Bangui
+posix/Africa/Banjul
+posix/Africa/Bissau
+posix/Africa/Blantyre
+posix/Africa/Brazzaville
+posix/Africa/Bujumbura
+posix/Africa/Cairo
+posix/Africa/Casablanca
+posix/Africa/Ceuta
+posix/Africa/Conakry
+posix/Africa/Dakar
+posix/Africa/Dar_es_Salaam
+posix/Africa/Djibouti
+posix/Africa/Douala
+posix/Africa/El_Aaiun
+posix/Africa/Freetown
+posix/Africa/Gaborone
+posix/Africa/Harare
+posix/Africa/Johannesburg
+posix/Africa/Juba
+posix/Africa/Kampala
+posix/Africa/Khartoum
+posix/Africa/Kigali
+posix/Africa/Kinshasa
+posix/Africa/Lagos
+posix/Africa/Libreville
+posix/Africa/Lome
+posix/Africa/Luanda
+posix/Africa/Lubumbashi
+posix/Africa/Lusaka
+posix/Africa/Malabo
+posix/Africa/Maputo
+posix/Africa/Maseru
+posix/Africa/Mbabane
+posix/Africa/Mogadishu
+posix/Africa/Monrovia
+posix/Africa/Nairobi
+posix/Africa/Ndjamena
+posix/Africa/Niamey
+posix/Africa/Nouakchott
+posix/Africa/Ouagadougou
+posix/Africa/Porto-Novo
+posix/Africa/Sao_Tome
+posix/Africa/Timbuktu
+posix/Africa/Tripoli
+posix/Africa/Tunis
+posix/Africa/Windhoek
+posix/America/Adak
+posix/America/Anchorage
+posix/America/Anguilla
+posix/America/Antigua
+posix/America/Araguaina
+posix/America/Argentina/Buenos_Aires
+posix/America/Argentina/Catamarca
+posix/America/Argentina/ComodRivadavia
+posix/America/Argentina/Cordoba
+posix/America/Argentina/Jujuy
+posix/America/Argentina/La_Rioja
+posix/America/Argentina/Mendoza
+posix/America/Argentina/Rio_Gallegos
+posix/America/Argentina/Salta
+posix/America/Argentina/San_Juan
+posix/America/Argentina/San_Luis
+posix/America/Argentina/Tucuman
+posix/America/Argentina/Ushuaia
+posix/America/Aruba
+posix/America/Asuncion
+posix/America/Atikokan
+posix/America/Atka
+posix/America/Bahia
+posix/America/Bahia_Banderas
+posix/America/Barbados
+posix/America/Belem
+posix/America/Belize
+posix/America/Blanc-Sablon
+posix/America/Boa_Vista
+posix/America/Bogota
+posix/America/Boise
+posix/America/Buenos_Aires
+posix/America/Cambridge_Bay
+posix/America/Campo_Grande
+posix/America/Cancun
+posix/America/Caracas
+posix/America/Catamarca
+posix/America/Cayenne
+posix/America/Cayman
+posix/America/Chicago
+posix/America/Chihuahua
+posix/America/Coral_Harbour
+posix/America/Cordoba
+posix/America/Costa_Rica
+posix/America/Creston
+posix/America/Cuiaba
+posix/America/Curacao
+posix/America/Danmarkshavn
+posix/America/Dawson
+posix/America/Dawson_Creek
+posix/America/Denver
+posix/America/Detroit
+posix/America/Dominica
+posix/America/Edmonton
+posix/America/Eirunepe
+posix/America/El_Salvador
+posix/America/Ensenada
+posix/America/Fort_Wayne
+posix/America/Fortaleza
+posix/America/Glace_Bay
+posix/America/Godthab
+posix/America/Goose_Bay
+posix/America/Grand_Turk
+posix/America/Grenada
+posix/America/Guadeloupe
+posix/America/Guatemala
+posix/America/Guayaquil
+posix/America/Guyana
+posix/America/Halifax
+posix/America/Havana
+posix/America/Hermosillo
+posix/America/Indiana/Indianapolis
+posix/America/Indiana/Knox
+posix/America/Indiana/Marengo
+posix/America/Indiana/Petersburg
+posix/America/Indiana/Tell_City
+posix/America/Indiana/Vevay
+posix/America/Indiana/Vincennes
+posix/America/Indiana/Winamac
+posix/America/Indianapolis
+posix/America/Inuvik
+posix/America/Iqaluit
+posix/America/Jamaica
+posix/America/Jujuy
+posix/America/Juneau
+posix/America/Kentucky/Louisville
+posix/America/Kentucky/Monticello
+posix/America/Knox_IN
+posix/America/Kralendijk
+posix/America/La_Paz
+posix/America/Lima
+posix/America/Los_Angeles
+posix/America/Louisville
+posix/America/Lower_Princes
+posix/America/Maceio
+posix/America/Managua
+posix/America/Manaus
+posix/America/Marigot
+posix/America/Martinique
+posix/America/Matamoros
+posix/America/Mazatlan
+posix/America/Mendoza
+posix/America/Menominee
+posix/America/Merida
+posix/America/Metlakatla
+posix/America/Mexico_City
+posix/America/Miquelon
+posix/America/Moncton
+posix/America/Monterrey
+posix/America/Montevideo
+posix/America/Montreal
+posix/America/Montserrat
+posix/America/Nassau
+posix/America/New_York
+posix/America/Nipigon
+posix/America/Nome
+posix/America/Noronha
+posix/America/North_Dakota/Beulah
+posix/America/North_Dakota/Center
+posix/America/North_Dakota/New_Salem
+posix/America/Ojinaga
+posix/America/Panama
+posix/America/Pangnirtung
+posix/America/Paramaribo
+posix/America/Phoenix
+posix/America/Port-au-Prince
+posix/America/Port_of_Spain
+posix/America/Porto_Acre
+posix/America/Porto_Velho
+posix/America/Puerto_Rico
+posix/America/Rainy_River
+posix/America/Rankin_Inlet
+posix/America/Recife
+posix/America/Regina
+posix/America/Resolute
+posix/America/Rio_Branco
+posix/America/Rosario
+posix/America/Santa_Isabel
+posix/America/Santarem
+posix/America/Santiago
+posix/America/Santo_Domingo
+posix/America/Sao_Paulo
+posix/America/Scoresbysund
+posix/America/Shiprock
+posix/America/Sitka
+posix/America/St_Barthelemy
+posix/America/St_Johns
+posix/America/St_Kitts
+posix/America/St_Lucia
+posix/America/St_Thomas
+posix/America/St_Vincent
+posix/America/Swift_Current
+posix/America/Tegucigalpa
+posix/America/Thule
+posix/America/Thunder_Bay
+posix/America/Tijuana
+posix/America/Toronto
+posix/America/Tortola
+posix/America/Vancouver
+posix/America/Virgin
+posix/America/Whitehorse
+posix/America/Winnipeg
+posix/America/Yakutat
+posix/America/Yellowknife
+posix/Antarctica/Casey
+posix/Antarctica/Davis
+posix/Antarctica/DumontDUrville
+posix/Antarctica/Macquarie
+posix/Antarctica/Mawson
+posix/Antarctica/McMurdo
+posix/Antarctica/Palmer
+posix/Antarctica/Rothera
+posix/Antarctica/South_Pole
+posix/Antarctica/Syowa
+posix/Antarctica/Troll
+posix/Antarctica/Vostok
+posix/Arctic/Longyearbyen
+posix/Asia/Aden
+posix/Asia/Almaty
+posix/Asia/Amman
+posix/Asia/Anadyr
+posix/Asia/Aqtau
+posix/Asia/Aqtobe
+posix/Asia/Ashgabat
+posix/Asia/Ashkhabad
+posix/Asia/Baghdad
+posix/Asia/Bahrain
+posix/Asia/Baku
+posix/Asia/Bangkok
+posix/Asia/Beirut
+posix/Asia/Bishkek
+posix/Asia/Brunei
+posix/Asia/Calcutta
+posix/Asia/Chita
+posix/Asia/Choibalsan
+posix/Asia/Chongqing
+posix/Asia/Chungking
+posix/Asia/Colombo
+posix/Asia/Dacca
+posix/Asia/Damascus
+posix/Asia/Dhaka
+posix/Asia/Dili
+posix/Asia/Dubai
+posix/Asia/Dushanbe
+posix/Asia/Gaza
+posix/Asia/Harbin
+posix/Asia/Hebron
+posix/Asia/Ho_Chi_Minh
+posix/Asia/Hong_Kong
+posix/Asia/Hovd
+posix/Asia/Irkutsk
+posix/Asia/Istanbul
+posix/Asia/Jakarta
+posix/Asia/Jayapura
+posix/Asia/Jerusalem
+posix/Asia/Kabul
+posix/Asia/Kamchatka
+posix/Asia/Karachi
+posix/Asia/Kashgar
+posix/Asia/Kathmandu
+posix/Asia/Katmandu
+posix/Asia/Khandyga
+posix/Asia/Kolkata
+posix/Asia/Krasnoyarsk
+posix/Asia/Kuala_Lumpur
+posix/Asia/Kuching
+posix/Asia/Kuwait
+posix/Asia/Macao
+posix/Asia/Macau
+posix/Asia/Magadan
+posix/Asia/Makassar
+posix/Asia/Manila
+posix/Asia/Muscat
+posix/Asia/Nicosia
+posix/Asia/Novokuznetsk
+posix/Asia/Novosibirsk
+posix/Asia/Omsk
+posix/Asia/Oral
+posix/Asia/Phnom_Penh
+posix/Asia/Pontianak
+posix/Asia/Pyongyang
+posix/Asia/Qatar
+posix/Asia/Qyzylorda
+posix/Asia/Rangoon
+posix/Asia/Riyadh
+posix/Asia/Saigon
+posix/Asia/Sakhalin
+posix/Asia/Samarkand
+posix/Asia/Seoul
+posix/Asia/Shanghai
+posix/Asia/Singapore
+posix/Asia/Srednekolymsk
+posix/Asia/Taipei
+posix/Asia/Tashkent
+posix/Asia/Tbilisi
+posix/Asia/Tehran
+posix/Asia/Tel_Aviv
+posix/Asia/Thimbu
+posix/Asia/Thimphu
+posix/Asia/Tokyo
+posix/Asia/Ujung_Pandang
+posix/Asia/Ulaanbaatar
+posix/Asia/Ulan_Bator
+posix/Asia/Urumqi
+posix/Asia/Ust-Nera
+posix/Asia/Vientiane
+posix/Asia/Vladivostok
+posix/Asia/Yakutsk
+posix/Asia/Yekaterinburg
+posix/Asia/Yerevan
+posix/Atlantic/Azores
+posix/Atlantic/Bermuda
+posix/Atlantic/Canary
+posix/Atlantic/Cape_Verde
+posix/Atlantic/Faeroe
+posix/Atlantic/Faroe
+posix/Atlantic/Jan_Mayen
+posix/Atlantic/Madeira
+posix/Atlantic/Reykjavik
+posix/Atlantic/South_Georgia
+posix/Atlantic/St_Helena
+posix/Atlantic/Stanley
+posix/Australia/ACT
+posix/Australia/Adelaide
+posix/Australia/Brisbane
+posix/Australia/Broken_Hill
+posix/Australia/Canberra
+posix/Australia/Currie
+posix/Australia/Darwin
+posix/Australia/Eucla
+posix/Australia/Hobart
+posix/Australia/LHI
+posix/Australia/Lindeman
+posix/Australia/Lord_Howe
+posix/Australia/Melbourne
+posix/Australia/NSW
+posix/Australia/North
+posix/Australia/Perth
+posix/Australia/Queensland
+posix/Australia/South
+posix/Australia/Sydney
+posix/Australia/Tasmania
+posix/Australia/Victoria
+posix/Australia/West
+posix/Australia/Yancowinna
+posix/Brazil/Acre
+posix/Brazil/DeNoronha
+posix/Brazil/East
+posix/Brazil/West
+posix/CET
+posix/CST6CDT
+posix/Canada/Atlantic
+posix/Canada/Central
+posix/Canada/East-Saskatchewan
+posix/Canada/Eastern
+posix/Canada/Mountain
+posix/Canada/Newfoundland
+posix/Canada/Pacific
+posix/Canada/Saskatchewan
+posix/Canada/Yukon
+posix/Chile/Continental
+posix/Chile/EasterIsland
+posix/Cuba
+posix/EET
+posix/EST
+posix/EST5EDT
+posix/Egypt
+posix/Eire
+posix/Etc/GMT
+posix/Etc/GMT+0
+posix/Etc/GMT+1
+posix/Etc/GMT+10
+posix/Etc/GMT+11
+posix/Etc/GMT+12
+posix/Etc/GMT+2
+posix/Etc/GMT+3
+posix/Etc/GMT+4
+posix/Etc/GMT+5
+posix/Etc/GMT+6
+posix/Etc/GMT+7
+posix/Etc/GMT+8
+posix/Etc/GMT+9
+posix/Etc/GMT-0
+posix/Etc/GMT-1
+posix/Etc/GMT-10
+posix/Etc/GMT-11
+posix/Etc/GMT-12
+posix/Etc/GMT-13
+posix/Etc/GMT-14
+posix/Etc/GMT-2
+posix/Etc/GMT-3
+posix/Etc/GMT-4
+posix/Etc/GMT-5
+posix/Etc/GMT-6
+posix/Etc/GMT-7
+posix/Etc/GMT-8
+posix/Etc/GMT-9
+posix/Etc/GMT0
+posix/Etc/Greenwich
+posix/Etc/UCT
+posix/Etc/UTC
+posix/Etc/Universal
+posix/Etc/Zulu
+posix/Europe/Amsterdam
+posix/Europe/Andorra
+posix/Europe/Athens
+posix/Europe/Belfast
+posix/Europe/Belgrade
+posix/Europe/Berlin
+posix/Europe/Bratislava
+posix/Europe/Brussels
+posix/Europe/Bucharest
+posix/Europe/Budapest
+posix/Europe/Busingen
+posix/Europe/Chisinau
+posix/Europe/Copenhagen
+posix/Europe/Dublin
+posix/Europe/Gibraltar
+posix/Europe/Guernsey
+posix/Europe/Helsinki
+posix/Europe/Isle_of_Man
+posix/Europe/Istanbul
+posix/Europe/Jersey
+posix/Europe/Kaliningrad
+posix/Europe/Kiev
+posix/Europe/Lisbon
+posix/Europe/Ljubljana
+posix/Europe/London
+posix/Europe/Luxembourg
+posix/Europe/Madrid
+posix/Europe/Malta
+posix/Europe/Mariehamn
+posix/Europe/Minsk
+posix/Europe/Monaco
+posix/Europe/Moscow
+posix/Europe/Nicosia
+posix/Europe/Oslo
+posix/Europe/Paris
+posix/Europe/Podgorica
+posix/Europe/Prague
+posix/Europe/Riga
+posix/Europe/Rome
+posix/Europe/Samara
+posix/Europe/San_Marino
+posix/Europe/Sarajevo
+posix/Europe/Simferopol
+posix/Europe/Skopje
+posix/Europe/Sofia
+posix/Europe/Stockholm
+posix/Europe/Tallinn
+posix/Europe/Tirane
+posix/Europe/Tiraspol
+posix/Europe/Uzhgorod
+posix/Europe/Vaduz
+posix/Europe/Vatican
+posix/Europe/Vienna
+posix/Europe/Vilnius
+posix/Europe/Volgograd
+posix/Europe/Warsaw
+posix/Europe/Zagreb
+posix/Europe/Zaporozhye
+posix/Europe/Zurich
+posix/Factory
+posix/GB
+posix/GB-Eire
+posix/GMT
+posix/GMT+0
+posix/GMT-0
+posix/GMT0
+posix/Greenwich
+posix/HST
+posix/Hongkong
+posix/Iceland
+posix/Indian/Antananarivo
+posix/Indian/Chagos
+posix/Indian/Christmas
+posix/Indian/Cocos
+posix/Indian/Comoro
+posix/Indian/Kerguelen
+posix/Indian/Mahe
+posix/Indian/Maldives
+posix/Indian/Mauritius
+posix/Indian/Mayotte
+posix/Indian/Reunion
+posix/Iran
+posix/Israel
+posix/Jamaica
+posix/Japan
+posix/Kwajalein
+posix/Libya
+posix/MET
+posix/MST
+posix/MST7MDT
+posix/Mexico/BajaNorte
+posix/Mexico/BajaSur
+posix/Mexico/General
+posix/NZ
+posix/NZ-CHAT
+posix/Navajo
+posix/PRC
+posix/PST8PDT
+posix/Pacific/Apia
+posix/Pacific/Auckland
+posix/Pacific/Bougainville
+posix/Pacific/Chatham
+posix/Pacific/Chuuk
+posix/Pacific/Easter
+posix/Pacific/Efate
+posix/Pacific/Enderbury
+posix/Pacific/Fakaofo
+posix/Pacific/Fiji
+posix/Pacific/Funafuti
+posix/Pacific/Galapagos
+posix/Pacific/Gambier
+posix/Pacific/Guadalcanal
+posix/Pacific/Guam
+posix/Pacific/Honolulu
+posix/Pacific/Johnston
+posix/Pacific/Kiritimati
+posix/Pacific/Kosrae
+posix/Pacific/Kwajalein
+posix/Pacific/Majuro
+posix/Pacific/Marquesas
+posix/Pacific/Midway
+posix/Pacific/Nauru
+posix/Pacific/Niue
+posix/Pacific/Norfolk
+posix/Pacific/Noumea
+posix/Pacific/Pago_Pago
+posix/Pacific/Palau
+posix/Pacific/Pitcairn
+posix/Pacific/Pohnpei
+posix/Pacific/Ponape
+posix/Pacific/Port_Moresby
+posix/Pacific/Rarotonga
+posix/Pacific/Saipan
+posix/Pacific/Samoa
+posix/Pacific/Tahiti
+posix/Pacific/Tarawa
+posix/Pacific/Tongatapu
+posix/Pacific/Truk
+posix/Pacific/Wake
+posix/Pacific/Wallis
+posix/Pacific/Yap
+posix/Poland
+posix/Portugal
+posix/ROC
+posix/ROK
+posix/Singapore
+posix/Turkey
+posix/UCT
+posix/US/Alaska
+posix/US/Aleutian
+posix/US/Arizona
+posix/US/Central
+posix/US/East-Indiana
+posix/US/Eastern
+posix/US/Hawaii
+posix/US/Indiana-Starke
+posix/US/Michigan
+posix/US/Mountain
+posix/US/Pacific
+posix/US/Pacific-New
+posix/US/Samoa
+posix/UTC
+posix/Universal
+posix/W-SU
+posix/WET
+posix/Zulu
+posix/localtime
+posix/posixrules
+posixrules
+right/Africa/Abidjan
+right/Africa/Accra
+right/Africa/Addis_Ababa
+right/Africa/Algiers
+right/Africa/Asmara
+right/Africa/Asmera
+right/Africa/Bamako
+right/Africa/Bangui
+right/Africa/Banjul
+right/Africa/Bissau
+right/Africa/Blantyre
+right/Africa/Brazzaville
+right/Africa/Bujumbura
+right/Africa/Cairo
+right/Africa/Casablanca
+right/Africa/Ceuta
+right/Africa/Conakry
+right/Africa/Dakar
+right/Africa/Dar_es_Salaam
+right/Africa/Djibouti
+right/Africa/Douala
+right/Africa/El_Aaiun
+right/Africa/Freetown
+right/Africa/Gaborone
+right/Africa/Harare
+right/Africa/Johannesburg
+right/Africa/Juba
+right/Africa/Kampala
+right/Africa/Khartoum
+right/Africa/Kigali
+right/Africa/Kinshasa
+right/Africa/Lagos
+right/Africa/Libreville
+right/Africa/Lome
+right/Africa/Luanda
+right/Africa/Lubumbashi
+right/Africa/Lusaka
+right/Africa/Malabo
+right/Africa/Maputo
+right/Africa/Maseru
+right/Africa/Mbabane
+right/Africa/Mogadishu
+right/Africa/Monrovia
+right/Africa/Nairobi
+right/Africa/Ndjamena
+right/Africa/Niamey
+right/Africa/Nouakchott
+right/Africa/Ouagadougou
+right/Africa/Porto-Novo
+right/Africa/Sao_Tome
+right/Africa/Timbuktu
+right/Africa/Tripoli
+right/Africa/Tunis
+right/Africa/Windhoek
+right/America/Adak
+right/America/Anchorage
+right/America/Anguilla
+right/America/Antigua
+right/America/Araguaina
+right/America/Argentina/Buenos_Aires
+right/America/Argentina/Catamarca
+right/America/Argentina/ComodRivadavia
+right/America/Argentina/Cordoba
+right/America/Argentina/Jujuy
+right/America/Argentina/La_Rioja
+right/America/Argentina/Mendoza
+right/America/Argentina/Rio_Gallegos
+right/America/Argentina/Salta
+right/America/Argentina/San_Juan
+right/America/Argentina/San_Luis
+right/America/Argentina/Tucuman
+right/America/Argentina/Ushuaia
+right/America/Aruba
+right/America/Asuncion
+right/America/Atikokan
+right/America/Atka
+right/America/Bahia
+right/America/Bahia_Banderas
+right/America/Barbados
+right/America/Belem
+right/America/Belize
+right/America/Blanc-Sablon
+right/America/Boa_Vista
+right/America/Bogota
+right/America/Boise
+right/America/Buenos_Aires
+right/America/Cambridge_Bay
+right/America/Campo_Grande
+right/America/Cancun
+right/America/Caracas
+right/America/Catamarca
+right/America/Cayenne
+right/America/Cayman
+right/America/Chicago
+right/America/Chihuahua
+right/America/Coral_Harbour
+right/America/Cordoba
+right/America/Costa_Rica
+right/America/Creston
+right/America/Cuiaba
+right/America/Curacao
+right/America/Danmarkshavn
+right/America/Dawson
+right/America/Dawson_Creek
+right/America/Denver
+right/America/Detroit
+right/America/Dominica
+right/America/Edmonton
+right/America/Eirunepe
+right/America/El_Salvador
+right/America/Ensenada
+right/America/Fort_Wayne
+right/America/Fortaleza
+right/America/Glace_Bay
+right/America/Godthab
+right/America/Goose_Bay
+right/America/Grand_Turk
+right/America/Grenada
+right/America/Guadeloupe
+right/America/Guatemala
+right/America/Guayaquil
+right/America/Guyana
+right/America/Halifax
+right/America/Havana
+right/America/Hermosillo
+right/America/Indiana/Indianapolis
+right/America/Indiana/Knox
+right/America/Indiana/Marengo
+right/America/Indiana/Petersburg
+right/America/Indiana/Tell_City
+right/America/Indiana/Vevay
+right/America/Indiana/Vincennes
+right/America/Indiana/Winamac
+right/America/Indianapolis
+right/America/Inuvik
+right/America/Iqaluit
+right/America/Jamaica
+right/America/Jujuy
+right/America/Juneau
+right/America/Kentucky/Louisville
+right/America/Kentucky/Monticello
+right/America/Knox_IN
+right/America/Kralendijk
+right/America/La_Paz
+right/America/Lima
+right/America/Los_Angeles
+right/America/Louisville
+right/America/Lower_Princes
+right/America/Maceio
+right/America/Managua
+right/America/Manaus
+right/America/Marigot
+right/America/Martinique
+right/America/Matamoros
+right/America/Mazatlan
+right/America/Mendoza
+right/America/Menominee
+right/America/Merida
+right/America/Metlakatla
+right/America/Mexico_City
+right/America/Miquelon
+right/America/Moncton
+right/America/Monterrey
+right/America/Montevideo
+right/America/Montreal
+right/America/Montserrat
+right/America/Nassau
+right/America/New_York
+right/America/Nipigon
+right/America/Nome
+right/America/Noronha
+right/America/North_Dakota/Beulah
+right/America/North_Dakota/Center
+right/America/North_Dakota/New_Salem
+right/America/Ojinaga
+right/America/Panama
+right/America/Pangnirtung
+right/America/Paramaribo
+right/America/Phoenix
+right/America/Port-au-Prince
+right/America/Port_of_Spain
+right/America/Porto_Acre
+right/America/Porto_Velho
+right/America/Puerto_Rico
+right/America/Rainy_River
+right/America/Rankin_Inlet
+right/America/Recife
+right/America/Regina
+right/America/Resolute
+right/America/Rio_Branco
+right/America/Rosario
+right/America/Santa_Isabel
+right/America/Santarem
+right/America/Santiago
+right/America/Santo_Domingo
+right/America/Sao_Paulo
+right/America/Scoresbysund
+right/America/Shiprock
+right/America/Sitka
+right/America/St_Barthelemy
+right/America/St_Johns
+right/America/St_Kitts
+right/America/St_Lucia
+right/America/St_Thomas
+right/America/St_Vincent
+right/America/Swift_Current
+right/America/Tegucigalpa
+right/America/Thule
+right/America/Thunder_Bay
+right/America/Tijuana
+right/America/Toronto
+right/America/Tortola
+right/America/Vancouver
+right/America/Virgin
+right/America/Whitehorse
+right/America/Winnipeg
+right/America/Yakutat
+right/America/Yellowknife
+right/Antarctica/Casey
+right/Antarctica/Davis
+right/Antarctica/DumontDUrville
+right/Antarctica/Macquarie
+right/Antarctica/Mawson
+right/Antarctica/McMurdo
+right/Antarctica/Palmer
+right/Antarctica/Rothera
+right/Antarctica/South_Pole
+right/Antarctica/Syowa
+right/Antarctica/Troll
+right/Antarctica/Vostok
+right/Arctic/Longyearbyen
+right/Asia/Aden
+right/Asia/Almaty
+right/Asia/Amman
+right/Asia/Anadyr
+right/Asia/Aqtau
+right/Asia/Aqtobe
+right/Asia/Ashgabat
+right/Asia/Ashkhabad
+right/Asia/Baghdad
+right/Asia/Bahrain
+right/Asia/Baku
+right/Asia/Bangkok
+right/Asia/Beirut
+right/Asia/Bishkek
+right/Asia/Brunei
+right/Asia/Calcutta
+right/Asia/Chita
+right/Asia/Choibalsan
+right/Asia/Chongqing
+right/Asia/Chungking
+right/Asia/Colombo
+right/Asia/Dacca
+right/Asia/Damascus
+right/Asia/Dhaka
+right/Asia/Dili
+right/Asia/Dubai
+right/Asia/Dushanbe
+right/Asia/Gaza
+right/Asia/Harbin
+right/Asia/Hebron
+right/Asia/Ho_Chi_Minh
+right/Asia/Hong_Kong
+right/Asia/Hovd
+right/Asia/Irkutsk
+right/Asia/Istanbul
+right/Asia/Jakarta
+right/Asia/Jayapura
+right/Asia/Jerusalem
+right/Asia/Kabul
+right/Asia/Kamchatka
+right/Asia/Karachi
+right/Asia/Kashgar
+right/Asia/Kathmandu
+right/Asia/Katmandu
+right/Asia/Khandyga
+right/Asia/Kolkata
+right/Asia/Krasnoyarsk
+right/Asia/Kuala_Lumpur
+right/Asia/Kuching
+right/Asia/Kuwait
+right/Asia/Macao
+right/Asia/Macau
+right/Asia/Magadan
+right/Asia/Makassar
+right/Asia/Manila
+right/Asia/Muscat
+right/Asia/Nicosia
+right/Asia/Novokuznetsk
+right/Asia/Novosibirsk
+right/Asia/Omsk
+right/Asia/Oral
+right/Asia/Phnom_Penh
+right/Asia/Pontianak
+right/Asia/Pyongyang
+right/Asia/Qatar
+right/Asia/Qyzylorda
+right/Asia/Rangoon
+right/Asia/Riyadh
+right/Asia/Saigon
+right/Asia/Sakhalin
+right/Asia/Samarkand
+right/Asia/Seoul
+right/Asia/Shanghai
+right/Asia/Singapore
+right/Asia/Srednekolymsk
+right/Asia/Taipei
+right/Asia/Tashkent
+right/Asia/Tbilisi
+right/Asia/Tehran
+right/Asia/Tel_Aviv
+right/Asia/Thimbu
+right/Asia/Thimphu
+right/Asia/Tokyo
+right/Asia/Ujung_Pandang
+right/Asia/Ulaanbaatar
+right/Asia/Ulan_Bator
+right/Asia/Urumqi
+right/Asia/Ust-Nera
+right/Asia/Vientiane
+right/Asia/Vladivostok
+right/Asia/Yakutsk
+right/Asia/Yekaterinburg
+right/Asia/Yerevan
+right/Atlantic/Azores
+right/Atlantic/Bermuda
+right/Atlantic/Canary
+right/Atlantic/Cape_Verde
+right/Atlantic/Faeroe
+right/Atlantic/Faroe
+right/Atlantic/Jan_Mayen
+right/Atlantic/Madeira
+right/Atlantic/Reykjavik
+right/Atlantic/South_Georgia
+right/Atlantic/St_Helena
+right/Atlantic/Stanley
+right/Australia/ACT
+right/Australia/Adelaide
+right/Australia/Brisbane
+right/Australia/Broken_Hill
+right/Australia/Canberra
+right/Australia/Currie
+right/Australia/Darwin
+right/Australia/Eucla
+right/Australia/Hobart
+right/Australia/LHI
+right/Australia/Lindeman
+right/Australia/Lord_Howe
+right/Australia/Melbourne
+right/Australia/NSW
+right/Australia/North
+right/Australia/Perth
+right/Australia/Queensland
+right/Australia/South
+right/Australia/Sydney
+right/Australia/Tasmania
+right/Australia/Victoria
+right/Australia/West
+right/Australia/Yancowinna
+right/Brazil/Acre
+right/Brazil/DeNoronha
+right/Brazil/East
+right/Brazil/West
+right/CET
+right/CST6CDT
+right/Canada/Atlantic
+right/Canada/Central
+right/Canada/East-Saskatchewan
+right/Canada/Eastern
+right/Canada/Mountain
+right/Canada/Newfoundland
+right/Canada/Pacific
+right/Canada/Saskatchewan
+right/Canada/Yukon
+right/Chile/Continental
+right/Chile/EasterIsland
+right/Cuba
+right/EET
+right/EST
+right/EST5EDT
+right/Egypt
+right/Eire
+right/Etc/GMT
+right/Etc/GMT+0
+right/Etc/GMT+1
+right/Etc/GMT+10
+right/Etc/GMT+11
+right/Etc/GMT+12
+right/Etc/GMT+2
+right/Etc/GMT+3
+right/Etc/GMT+4
+right/Etc/GMT+5
+right/Etc/GMT+6
+right/Etc/GMT+7
+right/Etc/GMT+8
+right/Etc/GMT+9
+right/Etc/GMT-0
+right/Etc/GMT-1
+right/Etc/GMT-10
+right/Etc/GMT-11
+right/Etc/GMT-12
+right/Etc/GMT-13
+right/Etc/GMT-14
+right/Etc/GMT-2
+right/Etc/GMT-3
+right/Etc/GMT-4
+right/Etc/GMT-5
+right/Etc/GMT-6
+right/Etc/GMT-7
+right/Etc/GMT-8
+right/Etc/GMT-9
+right/Etc/GMT0
+right/Etc/Greenwich
+right/Etc/UCT
+right/Etc/UTC
+right/Etc/Universal
+right/Etc/Zulu
+right/Europe/Amsterdam
+right/Europe/Andorra
+right/Europe/Athens
+right/Europe/Belfast
+right/Europe/Belgrade
+right/Europe/Berlin
+right/Europe/Bratislava
+right/Europe/Brussels
+right/Europe/Bucharest
+right/Europe/Budapest
+right/Europe/Busingen
+right/Europe/Chisinau
+right/Europe/Copenhagen
+right/Europe/Dublin
+right/Europe/Gibraltar
+right/Europe/Guernsey
+right/Europe/Helsinki
+right/Europe/Isle_of_Man
+right/Europe/Istanbul
+right/Europe/Jersey
+right/Europe/Kaliningrad
+right/Europe/Kiev
+right/Europe/Lisbon
+right/Europe/Ljubljana
+right/Europe/London
+right/Europe/Luxembourg
+right/Europe/Madrid
+right/Europe/Malta
+right/Europe/Mariehamn
+right/Europe/Minsk
+right/Europe/Monaco
+right/Europe/Moscow
+right/Europe/Nicosia
+right/Europe/Oslo
+right/Europe/Paris
+right/Europe/Podgorica
+right/Europe/Prague
+right/Europe/Riga
+right/Europe/Rome
+right/Europe/Samara
+right/Europe/San_Marino
+right/Europe/Sarajevo
+right/Europe/Simferopol
+right/Europe/Skopje
+right/Europe/Sofia
+right/Europe/Stockholm
+right/Europe/Tallinn
+right/Europe/Tirane
+right/Europe/Tiraspol
+right/Europe/Uzhgorod
+right/Europe/Vaduz
+right/Europe/Vatican
+right/Europe/Vienna
+right/Europe/Vilnius
+right/Europe/Volgograd
+right/Europe/Warsaw
+right/Europe/Zagreb
+right/Europe/Zaporozhye
+right/Europe/Zurich
+right/Factory
+right/GB
+right/GB-Eire
+right/GMT
+right/GMT+0
+right/GMT-0
+right/GMT0
+right/Greenwich
+right/HST
+right/Hongkong
+right/Iceland
+right/Indian/Antananarivo
+right/Indian/Chagos
+right/Indian/Christmas
+right/Indian/Cocos
+right/Indian/Comoro
+right/Indian/Kerguelen
+right/Indian/Mahe
+right/Indian/Maldives
+right/Indian/Mauritius
+right/Indian/Mayotte
+right/Indian/Reunion
+right/Iran
+right/Israel
+right/Jamaica
+right/Japan
+right/Kwajalein
+right/Libya
+right/MET
+right/MST
+right/MST7MDT
+right/Mexico/BajaNorte
+right/Mexico/BajaSur
+right/Mexico/General
+right/NZ
+right/NZ-CHAT
+right/Navajo
+right/PRC
+right/PST8PDT
+right/Pacific/Apia
+right/Pacific/Auckland
+right/Pacific/Bougainville
+right/Pacific/Chatham
+right/Pacific/Chuuk
+right/Pacific/Easter
+right/Pacific/Efate
+right/Pacific/Enderbury
+right/Pacific/Fakaofo
+right/Pacific/Fiji
+right/Pacific/Funafuti
+right/Pacific/Galapagos
+right/Pacific/Gambier
+right/Pacific/Guadalcanal
+right/Pacific/Guam
+right/Pacific/Honolulu
+right/Pacific/Johnston
+right/Pacific/Kiritimati
+right/Pacific/Kosrae
+right/Pacific/Kwajalein
+right/Pacific/Majuro
+right/Pacific/Marquesas
+right/Pacific/Midway
+right/Pacific/Nauru
+right/Pacific/Niue
+right/Pacific/Norfolk
+right/Pacific/Noumea
+right/Pacific/Pago_Pago
+right/Pacific/Palau
+right/Pacific/Pitcairn
+right/Pacific/Pohnpei
+right/Pacific/Ponape
+right/Pacific/Port_Moresby
+right/Pacific/Rarotonga
+right/Pacific/Saipan
+right/Pacific/Samoa
+right/Pacific/Tahiti
+right/Pacific/Tarawa
+right/Pacific/Tongatapu
+right/Pacific/Truk
+right/Pacific/Wake
+right/Pacific/Wallis
+right/Pacific/Yap
+right/Poland
+right/Portugal
+right/ROC
+right/ROK
+right/Singapore
+right/Turkey
+right/UCT
+right/US/Alaska
+right/US/Aleutian
+right/US/Arizona
+right/US/Central
+right/US/East-Indiana
+right/US/Eastern
+right/US/Hawaii
+right/US/Indiana-Starke
+right/US/Michigan
+right/US/Mountain
+right/US/Pacific
+right/US/Pacific-New
+right/US/Samoa
+right/UTC
+right/Universal
+right/W-SU
+right/WET
+right/Zulu
+
+Type it at the prompt below exactly as it appears above. (NOTE: If you don't
+see your timezone, use "timeconfig" again after booting for the verbose list)
+
+EOF
+ echo -n "Timezone? "
+ read TIMEZONE;
+ echo
+
+ if [ -r $T_PX/usr/share/zoneinfo/$TIMEZONE -o \
+ -r /var/log/mount/usr/share/zoneinfo/$TIMEZONE -o \
+ -L $T_PX/usr/share/zoneinfo/$TIMEZONE -o \
+ -L /var/log/mount/usr/share/zoneinfo/$TIMEZONE ]; then
+ echo "Creating link from $TIMEZONE to localtime in /etc..."
+ echo
+ setzone $TIMEZONE
+ exit
+ else
+ cat << EOF
+
+Timezone $TIMEZONE could not be found. You may try again if you wish.
+Make sure you type the name exactly as it appears - this configuration script
+is case sensitive.
+
+Press [enter] to continue.
+
+EOF
+ read JUNK;
+ fi
+ done
+fi
+
diff --git a/patches/source/gnupg/gnupg.SlackBuild b/patches/source/gnupg/gnupg.SlackBuild
new file mode 100755
index 000000000..2e7ef9267
--- /dev/null
+++ b/patches/source/gnupg/gnupg.SlackBuild
@@ -0,0 +1,115 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2013, 2015 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=gnupg
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-gnupg
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
+rm -rf $PKG
+mkdir -p $PKG $PKG
+
+cd $TMP
+rm -rf gnupg-$VERSION
+tar xvf $CWD/gnupg-$VERSION.tar.?z* || exit 1
+cd gnupg-$VERSION
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+rm -f $PKG/usr/info/dir
+gzip -9 $PKG/usr/info/*
+
+gzip -9 $PKG/usr/man/*/*
+
+mkdir -p $PKG/usr/doc/gnupg-$VERSION
+cp -a \
+ ABOUT-NLS AUTHORS BUGS COPYING* INSTALL NEWS PROJECTS README* THANKS TODO VERSION \
+ $PKG/usr/doc/gnupg-$VERSION
+if [ -r $PKG/usr/share/gnupg/FAQ ]; then
+ ( cd $PKG/usr/doc/gnupg-$VERSION
+ ln -sf /usr/share/gnupg/FAQ . )
+fi
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+# Add slack-desc files:
+mkdir -p $PKG/install
+cat $CWD/slack-desc.gnupg > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/gnupg-$VERSION-$ARCH-$BUILD.txz
+
+# Clean up the extra stuff:
+if [ "$1" = "--cleanup" ]; then
+ rm -rf $TMP/gnupg-$VERSION
+ rm -rf $PKG
+fi
diff --git a/patches/source/gnupg/slack-desc.gnupg b/patches/source/gnupg/slack-desc.gnupg
new file mode 100644
index 000000000..496005e9b
--- /dev/null
+++ b/patches/source/gnupg/slack-desc.gnupg
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+gnupg: gnupg (The GNU Privacy Guard)
+gnupg:
+gnupg: GnuPG is GNU's tool for secure communication and data storage. It can
+gnupg: be used to encrypt data and to create digital signatures. It includes
+gnupg: an advanced key management facility and is compliant with the proposed
+gnupg: OpenPGP Internet standard as described in RFC2440.
+gnupg:
+gnupg:
+gnupg:
+gnupg:
+gnupg:
diff --git a/patches/source/gnupg2/gnupg2.SlackBuild b/patches/source/gnupg2/gnupg2.SlackBuild
new file mode 100755
index 000000000..30c99f00d
--- /dev/null
+++ b/patches/source/gnupg2/gnupg2.SlackBuild
@@ -0,0 +1,163 @@
+#!/bin/sh
+
+# Copyright 2006-2010 Robby Workman, Northport, AL, USA
+# Copyright 2007-2010 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SCRIPT IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SCRIPT, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=gnupg2
+VERSION=${VERSION:-$(echo gnupg-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-gnupg
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf gnupg-$VERSION
+tar xvf $CWD/gnupg-$VERSION.tar.?z* || exit 1
+cd gnupg-$VERSION
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --docdir=/usr/doc/gnupg2-$VERSION \
+ --program-prefix="" \
+ --program-suffix="" \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Create directory for global gpg.conf:
+mkdir -p $PKG/etc/gnupg
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+rm -f $PKG/usr/info/dir
+gzip -9 $PKG/usr/info/*
+
+mkdir -p $PKG/usr/doc/gnupg2-$VERSION
+cp -a \
+ AUTHORS COPYING* INSTALL NEWS README* THANKS TODO VERSION \
+ $PKG/usr/doc/gnupg2-$VERSION
+# Build html docs
+( cd doc
+ make gnupg.html
+ mv gnupg.html $PKG/usr/doc/gnupg2-$VERSION/html
+)
+# Fix some filenames in the html directory
+( cd $PKG/usr/doc/gnupg2-$VERSION/html
+mv how_002dto_002dspecify_002da_002duser_002did.html howto_specify_user_id.html
+mv GnuPG_002d1-and-GnuPG_002d2.html GnuPG_1-and-GnuPG_2.html
+mv gpg_002dpreset_002dpassphrase.html gpg_preset_passphrase.html
+mv gpgsm_002dgencert_002esh.html gpgsm_gencert_sh.html
+mv Invoking-gpg_002dpreset_002dpassphrase.html Invoking-gpg_preset_passphrase.html
+mv Invoking-gpg_002dconnect_002dagent.html Invoking-gpg_connect_agent.html
+mv gpg_002dconnect_002dagent.html gpg_connect_agent.html
+mv Agent-GET_005fCONFIRMATION.html Agent-GET_CONFIRMATION.html
+mv option-_002d_002denable_002dssh_002dsupport.html option-enable_ssh_support.html
+mv option-_002d_002doptions.html option-options.html
+mv Invoking-GPG_002dAGENT.html Invoking-GPG_AGENT.html
+mv gpg_002dzip.html gpg_zip.html
+mv option-_002d_002dp12_002dcharset.html option-p12_charset.html
+mv option-_002d_002dallow_002dmark_002dtrusted.html option-allow_mark_trusted.html
+mv Controlling-gpg_002dconnect_002dagent.html Controlling-gpg_connect_agent.html
+mv Agent-GET_005fPASSPHRASE.html Agent-GET_PASSPHRASE.html
+mv option-_002d_002dhomedir.html option-homedir.html
+mv PKCS_002315-Card.html PKCS-15-Card.html
+mv option-_002d_002dexport_002downertrust.html option-export_ownertrust.html
+mv option-_002d_002dlog_002dfile.html option-logfile.html
+mv option-watchgnupg-_002d_002dtcp.html option-watchgnupg-tcp.html
+)
+# Move html doc to the proper location
+mv $PKG/usr/doc/gnupg2-$VERSION/faq.html $PKG/usr/doc/gnupg2-$VERSION/html/
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/gnupg2/slack-desc b/patches/source/gnupg2/slack-desc
new file mode 100644
index 000000000..c64d7fb67
--- /dev/null
+++ b/patches/source/gnupg2/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+gnupg2: GnuPG2 (The GNU Privacy Guard version 2.x)
+gnupg2:
+gnupg2: GnuPG is GNU's tool for secure communication and data storage. It can
+gnupg2: be used to encrypt data and to create digital signatures. It includes
+gnupg2: an advanced key management facility and is compliant with the proposed
+gnupg2: OpenPGP Internet standard as described in RFC2440 and the S/MIME
+gnupg2: standard as described by several RFCs.
+gnupg2:
+gnupg2: GnuPG 2.0 is the stable version of GnuPG integrating support for
+gnupg2: OpenPGP and S/MIME. It does not conflict with an installed 1.4.x
+gnupg2: OpenPGP-only version.
diff --git a/patches/source/gnutls/gnutls.SlackBuild b/patches/source/gnutls/gnutls.SlackBuild
new file mode 100755
index 000000000..b10b75fe5
--- /dev/null
+++ b/patches/source/gnutls/gnutls.SlackBuild
@@ -0,0 +1,150 @@
+#!/bin/sh
+
+# Copyright 2007, 2008, 2009, 2010 Patrick Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=gnutls
+VERSION=${VERSION:-$(echo gnutls-*.tar.?z* | rev | cut -f 4- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+
+rm -rf $PKGNAM-$VERSION
+if [ -r $CWD/$PKGNAM-$VERSION.tar.gz ]; then
+ tar xf $CWD/$PKGNAM-$VERSION.tar.gz || exit 1
+elif [ -r $CWD/$PKGNAM-$VERSION.tar.bz2 ]; then
+ tar xf $CWD/$PKGNAM-$VERSION.tar.bz2 || exit 1
+elif [ -r $CWD/$PKGNAM-$VERSION.tar.xz ]; then
+ tar xf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
+elif [ -r $CWD/$PKGNAM-$VERSION.tar.lzma ]; then
+ tar xf $CWD/$PKGNAM-$VERSION.tar.lzma || exit 1
+else
+ exit 1
+fi
+
+
+cd $PKGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --enable-static=no \
+ --disable-rpath \
+ --with-included-libtasn1 \
+ --build=$ARCH-slackware-linux \
+ --host=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+( cd $PKG/usr/info
+ rm -f dir
+ gzip -9 *.info*
+)
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING* INSTALL NEWS README* THANKS \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+# Likewise for the bloated NEWS:
+if [ -r NEWS ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat NEWS | head -n 1000 > $DOCSDIR/NEWS
+ touch -r NEWS $DOCSDIR/NEWS
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n -p $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/gnutls/slack-desc b/patches/source/gnutls/slack-desc
new file mode 100644
index 000000000..49fdb9f0c
--- /dev/null
+++ b/patches/source/gnutls/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+gnutls: gnutls (GNU TLS library)
+gnutls:
+gnutls: This is a TLS (Transport Layer Security) 1.0 and SSL (Secure Sockets
+gnutls: Layer) 3.0 implementation. In brief, GnuTLS can be described as a
+gnutls: library which offers an API to access secure communication protocols.
+gnutls: These protocols provide privacy over insecure lines, and were designed
+gnutls: to prevent eavesdropping, tampering, or message forgery.
+gnutls:
+gnutls: Homepage: http://www.gnu.org/software/gnutls/
+gnutls:
+gnutls:
diff --git a/patches/source/grub/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch b/patches/source/grub/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch
new file mode 100644
index 000000000..5701b5475
--- /dev/null
+++ b/patches/source/grub/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch
@@ -0,0 +1,45 @@
+From 88c9657960a6c5d3673a25c266781e876c181add Mon Sep 17 00:00:00 2001
+From: Hector Marco-Gisbert <hecmargi@upv.es>
+Date: Fri, 13 Nov 2015 16:21:09 +0100
+Subject: [PATCH] Fix security issue when reading username and password
+
+ This patch fixes two integer underflows at:
+ * grub-core/lib/crypto.c
+ * grub-core/normal/auth.c
+
+Signed-off-by: Hector Marco-Gisbert <hecmargi@upv.es>
+Signed-off-by: Ismael Ripoll-Ripoll <iripoll@disca.upv.es>
+---
+ grub-core/lib/crypto.c | 2 +-
+ grub-core/normal/auth.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/grub-core/lib/crypto.c b/grub-core/lib/crypto.c
+index 010e550..524a3d8 100644
+--- a/grub-core/lib/crypto.c
++++ b/grub-core/lib/crypto.c
+@@ -468,7 +468,7 @@ grub_password_get (char buf[], unsigned buf_size)
+ break;
+ }
+
+- if (key == '\b')
++ if (key == '\b' && cur_len)
+ {
+ cur_len--;
+ continue;
+diff --git a/grub-core/normal/auth.c b/grub-core/normal/auth.c
+index c6bd96e..5782ec5 100644
+--- a/grub-core/normal/auth.c
++++ b/grub-core/normal/auth.c
+@@ -172,7 +172,7 @@ grub_username_get (char buf[], unsigned buf_size)
+ break;
+ }
+
+- if (key == '\b')
++ if (key == '\b' && cur_len)
+ {
+ cur_len--;
+ grub_printf ("\b");
+--
+1.9.1
+
diff --git a/patches/source/grub/doinst.sh b/patches/source/grub/doinst.sh
new file mode 100644
index 000000000..20b6c34e2
--- /dev/null
+++ b/patches/source/grub/doinst.sh
@@ -0,0 +1,16 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/grub.d/40_custom.new
+rm -f etc/grub.d/40_custom.new
+config etc/default/grub.new
diff --git a/patches/source/grub/etc.default.grub b/patches/source/grub/etc.default.grub
new file mode 100644
index 000000000..f612a35a7
--- /dev/null
+++ b/patches/source/grub/etc.default.grub
@@ -0,0 +1,28 @@
+# If you change this file, run grub-mkconfig -o /boot/grub/grub.cfg
+# afterwards to update /boot/grub/grub.cfg.
+
+GRUB_DEFAULT=0
+#GRUB_HIDDEN_TIMEOUT=0
+GRUB_HIDDEN_TIMEOUT_QUIET=false
+GRUB_TIMEOUT=10
+GRUB_DISTRIBUTOR=$( sed 's/Slackware /Slackware-/' /etc/slackware-version )
+GRUB_CMDLINE_LINUX_DEFAULT=""
+GRUB_CMDLINE_LINUX=""
+
+# Uncomment to disable graphical terminal (grub-pc only)
+#GRUB_TERMINAL=console
+
+# The resolution used on graphical terminal
+# note that you can use only modes which your graphic card supports via VBE
+# you can see them in real GRUB with the command `vbeinfo'
+#GRUB_GFXMODE=640x480
+#GRUB_GFXMODE=1024x768x32
+
+# Font used on the graphical terminal:
+#GRUB_FONT=/usr/share/grub/dejavusansmono.pf2
+
+# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
+#GRUB_DISABLE_LINUX_UUID=true
+
+# Uncomment to disable generation of recovery mode menu entrys
+#GRUB_DISABLE_LINUX_RECOVERY="true"
diff --git a/patches/source/grub/grub.SlackBuild b/patches/source/grub/grub.SlackBuild
new file mode 100755
index 000000000..641ea5f7d
--- /dev/null
+++ b/patches/source/grub/grub.SlackBuild
@@ -0,0 +1,195 @@
+#!/bin/sh
+
+# Copyright 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=grub
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-3_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i486 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2"
+ EFI_FLAGS=" --with-platform=efi --target=x86_64 --program-prefix= "
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+cd $PKGNAM-$VERSION
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Use /boot/initrd.gz as a valid initrd name:
+zcat $CWD/initrd_naming.patch | patch -p1 --verbose || exit 1
+
+# Patch for recent glibc:
+zcat $CWD/txtHRnXiHYUrM.txt.gz | patch -p0 --verbose || exit 1
+
+# Support DejaVuSansMono font (dejavusansmono.pf2) by default:
+zcat $CWD/grub.dejavusansmono.gfxterm.font.diff.gz | patch -p1 --verbose || exit 1
+
+# Terminate EFI several times. This is a workaround for broken UEFI firmware.
+zcat $CWD/grub.e75fdee420a7ad95e9a465c9699adc2e2e970440.terminate.efi.several.times.diff.gz | patch -p1 --verbose || exit 1
+
+# Fix security issue when reading username and password:
+zcat $CWD/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch.gz | patch -p1 --verbose || exit 1
+
+for i in 1 2 ; do
+ # Skip to regular build if EFI support is not requested:
+ if [ i = 1 -a -z "$EFI_FLAGS" ]; then
+ continue;
+ fi
+
+ # Configure:
+ CFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --disable-werror \
+ $EFI_FLAGS
+
+ # Build and install:
+ make clean
+ make $NUMJOBS || make || exit 1
+ make install DESTDIR=$PKG || exit 1
+
+ # Clear $EFI_FLAGS for a regular build:
+ unset EFI_FLAGS
+done
+
+# Preserve the contents of /etc/grub.d/40_custom:
+mv $PKG/etc/grub.d/40_custom $PKG/etc/grub.d/40_custom.new
+
+# Strip binaries:
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+mkdir -p $PKG/etc/default
+cat $CWD/etc.default.grub > $PKG/etc/default/grub.new
+
+# Add fonts, if found on the system:
+FONT_SIZE=${FONT_SIZE:-19}
+if [ -r /usr/share/fonts/TTF/unifont.ttf ]; then
+ $PKG/usr/bin/grub-mkfont -o $PKG/usr/share/grub/unifont.pf2 -abv \
+ -s $FONT_SIZE /usr/share/fonts/TTF/unifont.ttf
+fi
+if [ -r /usr/share/fonts/TTF/DejaVuSansMono.ttf ]; then
+ $PKG/usr/bin/grub-mkfont -o $PKG/usr/share/grub/dejavusansmono.pf2 -abv \
+ -s $FONT_SIZE /usr/share/fonts/TTF/DejaVuSansMono.ttf
+fi
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+cp -a \
+ AUTHORS BUGS COPYING* INSTALL NEWS README* THANKS TODO \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+
+# Compress and if needed symlink the man pages:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# Compress info files, if any:
+if [ -d $PKG/usr/info ]; then
+ ( cd $PKG/usr/info
+ rm -f dir
+ gzip -9 *
+ )
+fi
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/grub/grub.dejavusansmono.gfxterm.font.diff b/patches/source/grub/grub.dejavusansmono.gfxterm.font.diff
new file mode 100644
index 000000000..53c21ba8e
--- /dev/null
+++ b/patches/source/grub/grub.dejavusansmono.gfxterm.font.diff
@@ -0,0 +1,43 @@
+--- ./util/grub.d/00_header.in.orig 2012-05-03 18:04:39.000000000 -0500
++++ ./util/grub.d/00_header.in 2013-09-17 01:43:37.870841064 -0500
+@@ -143,7 +143,7 @@
+ EOF
+ else
+ for dir in "${pkgdatadir}" "`echo '/@bootdirname@/@grubdirname@' | sed "s,//*,/,g"`" /usr/share/grub ; do
+- for basename in unicode unifont ascii; do
++ for basename in unicode unifont dejavusansmono ascii; do
+ path="${dir}/${basename}.pf2"
+ if is_path_readable_by_grub "${path}" > /dev/null ; then
+ font_path="${path}"
+@@ -156,7 +156,7 @@
+ if [ -n "${font_path}" ] ; then
+ cat << EOF
+ if [ x\$feature_default_font_path = xy ] ; then
+- font=unicode
++ font=dejavusansmono
+ else
+ EOF
+ # Make the font accessible
+@@ -169,7 +169,7 @@
+ EOF
+ else
+ cat << EOF
+-if loadfont unicode ; then
++if loadfont dejavusansmono ; then
+ EOF
+ fi
+ fi
+--- ./util/grub-install.in.orig 2012-06-26 16:31:03.000000000 -0500
++++ ./util/grub-install.in 2013-09-17 01:42:02.678834196 -0500
+@@ -552,6 +552,11 @@
+ cp "${pkgdatadir}"/themes/starfield/* "${grubdir}"/themes/starfield
+ fi
+
++if test -f "${pkgdatadir}"/dejavusansmono.pf2; then
++ mkdir -p "${grubdir}"/fonts
++ cp "${pkgdatadir}"/dejavusansmono.pf2 "${grubdir}"/fonts
++fi
++
+ if test -f "${pkgdatadir}"/unicode.pf2; then
+ mkdir -p "${grubdir}"/fonts
+ cp "${pkgdatadir}"/unicode.pf2 "${grubdir}"/fonts
diff --git a/patches/source/grub/grub.e75fdee420a7ad95e9a465c9699adc2e2e970440.terminate.efi.several.times.diff b/patches/source/grub/grub.e75fdee420a7ad95e9a465c9699adc2e2e970440.terminate.efi.several.times.diff
new file mode 100644
index 000000000..d45528488
--- /dev/null
+++ b/patches/source/grub/grub.e75fdee420a7ad95e9a465c9699adc2e2e970440.terminate.efi.several.times.diff
@@ -0,0 +1,75 @@
+From e75fdee420a7ad95e9a465c9699adc2e2e970440 Mon Sep 17 00:00:00 2001
+From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
+Date: Tue, 26 Mar 2013 10:34:56 +0000
+Subject: * grub-core/kern/efi/mm.c (grub_efi_finish_boot_services):
+
+ Try terminating EFI services several times due to quirks in some
+ implementations.
+---
+(limited to 'grub-core/kern/efi/mm.c')
+
+diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
+index 351317b..77c9384 100644
+--- a/grub-core/kern/efi/mm.c
++++ b/grub-core/kern/efi/mm.c
+@@ -160,27 +160,41 @@ grub_efi_finish_boot_services (grub_efi_uintn_t *outbuf_size, void *outbuf,
+ apple, sizeof (apple)) == 0);
+ #endif
+
+- if (grub_efi_get_memory_map (&finish_mmap_size, finish_mmap_buf, &finish_key,
+- &finish_desc_size, &finish_desc_version) < 0)
+- return grub_error (GRUB_ERR_IO, "couldn't retrieve memory map");
++ while (1)
++ {
++ if (grub_efi_get_memory_map (&finish_mmap_size, finish_mmap_buf, &finish_key,
++ &finish_desc_size, &finish_desc_version) < 0)
++ return grub_error (GRUB_ERR_IO, "couldn't retrieve memory map");
+
+- if (outbuf && *outbuf_size < finish_mmap_size)
+- return grub_error (GRUB_ERR_IO, "memory map buffer is too small");
++ if (outbuf && *outbuf_size < finish_mmap_size)
++ return grub_error (GRUB_ERR_IO, "memory map buffer is too small");
+
+- finish_mmap_buf = grub_malloc (finish_mmap_size);
+- if (!finish_mmap_buf)
+- return grub_errno;
++ finish_mmap_buf = grub_malloc (finish_mmap_size);
++ if (!finish_mmap_buf)
++ return grub_errno;
+
+- if (grub_efi_get_memory_map (&finish_mmap_size, finish_mmap_buf, &finish_key,
+- &finish_desc_size, &finish_desc_version) <= 0)
+- return grub_error (GRUB_ERR_IO, "couldn't retrieve memory map");
++ if (grub_efi_get_memory_map (&finish_mmap_size, finish_mmap_buf, &finish_key,
++ &finish_desc_size, &finish_desc_version) <= 0)
++ {
++ grub_free (finish_mmap_buf);
++ return grub_error (GRUB_ERR_IO, "couldn't retrieve memory map");
++ }
+
+- b = grub_efi_system_table->boot_services;
+- status = efi_call_2 (b->exit_boot_services, grub_efi_image_handle,
+- finish_key);
+- if (status != GRUB_EFI_SUCCESS)
+- return grub_error (GRUB_ERR_IO, "couldn't terminate EFI services");
++ b = grub_efi_system_table->boot_services;
++ status = efi_call_2 (b->exit_boot_services, grub_efi_image_handle,
++ finish_key);
++ if (status == GRUB_EFI_SUCCESS)
++ break;
+
++ if (status != GRUB_EFI_INVALID_PARAMETER)
++ {
++ grub_free (finish_mmap_buf);
++ return grub_error (GRUB_ERR_IO, "couldn't terminate EFI services");
++ }
++
++ grub_free (finish_mmap_buf);
++ grub_printf ("Trying to terminate EFI services again\n");
++ }
+ grub_efi_is_finished = 1;
+ if (outbuf_size)
+ *outbuf_size = finish_mmap_size;
+--
+cgit v0.9.0.2
+
diff --git a/patches/source/grub/initrd_naming.patch b/patches/source/grub/initrd_naming.patch
new file mode 100644
index 000000000..6b62778b0
--- /dev/null
+++ b/patches/source/grub/initrd_naming.patch
@@ -0,0 +1,13 @@
+diff -Naur grub-2.00.orig/util/grub.d/10_linux.in grub-2.00/util/grub.d/10_linux.in
+--- grub-2.00.orig/util/grub.d/10_linux.in 2012-04-18 23:24:38.000000000 +0200
++++ grub-2.00/util/grub.d/10_linux.in 2012-06-30 07:53:03.765625589 +0200
+@@ -198,7 +198,8 @@
+ "initramfs-genkernel-${version}" \
+ "initramfs-genkernel-${alt_version}" \
+ "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \
+- "initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}"; do
++ "initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}" \
++ "initrd.gz"; do
+ if test -e "${dirname}/${i}" ; then
+ initrd="$i"
+ break
diff --git a/patches/source/grub/slack-desc b/patches/source/grub/slack-desc
new file mode 100644
index 000000000..a8159e64e
--- /dev/null
+++ b/patches/source/grub/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+grub: GRUB (the GRand Unified Bootloader)
+grub:
+grub: GNU GRUB is a multiboot boot loader.
+grub:
+grub: Website: http://www.gnu.org/software/grub/
+grub:
+grub:
+grub:
+grub:
+grub:
+grub:
diff --git a/patches/source/grub/txtHRnXiHYUrM.txt b/patches/source/grub/txtHRnXiHYUrM.txt
new file mode 100644
index 000000000..b67251f1c
--- /dev/null
+++ b/patches/source/grub/txtHRnXiHYUrM.txt
@@ -0,0 +1,49 @@
+# Bazaar merge directive format 2 (Bazaar 0.90)
+# revision_id: address@hidden
+# target_branch: http://bzr.savannah.gnu.org/r/grub/trunk/grub/
+# testament_sha1: 1c14caf607a0200c0f6c4357baa520d6d5a0297b
+# timestamp: 2012-07-04 17:30:47 +0200
+# base_revision_id: address@hidden
+#
+# Begin patch
+=== modified file 'grub-core/gnulib/stdio.in.h'
+--- grub-core/gnulib/stdio.in.h 2010-09-20 10:35:33 +0000
++++ grub-core/gnulib/stdio.in.h 2012-07-04 15:18:15 +0000
+@@ -140,8 +140,10 @@
+ /* It is very rare that the developer ever has full control of stdin,
+ so any use of gets warrants an unconditional warning. Assume it is
+ always declared, since it is required by C89. */
++#if defined gets
+ #undef gets
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
++#endif
+
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
+
+# Begin bundle
+IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWaToPesAAfhfgAAQ2Pf/91s2
+2kq////wUAUNaebQdnLC2nS7GCUQQJiaT0xMVPAFPSHqeSPUekDT1DxIMkmp4CMjQKYIZTQaBkAA
+AAlCBJmmkGEGqP1QDQBkyeoyAAHMAmAmRgBGJiYTCYIaYmmAkhETaU2jKeiaaMo00ybTRAMhoAZE
+8tJd05M/VpkKqZr1UWlZidFLnZHIFGBpA6iFmCP+enOp6RDhNhWZylIRZ+P1Oc1VUs/HzCkLPAxt
+XwunBn7vOjjziSdUxqx9ub8/jEdn54odK76GXxknCKa3994J9cFbmU0TjYVx4PuSkX45S7lsu6fB
+11tpevByhSKUFgynati1fZO2qnwXbsOnRj3eSMVDcR01oxGDH70eZVV8eHKuG/16A8oZX4GRA3HY
+WkgOtgkaVTSP2e+4fqq+AdFSyaWzqIMSbODi0FMCs5i4tK754ns80FDKZDi7pJaux5hYGJNNqZJP
+zqB04nTwgmOMnWmSaSehwVSt8isXiDIhjFH3WwPkYZoYudtHD1+dli7GkDvrkbPDnlQzcO42UIST
+ZBHIlFlQKJxbulrJVwmiKz1E4kmKcvEYpUpWUIESBoc5sXKigHQ1wWB1DoXUYiExOCWCbUEDIz2X
+B0mZugsLQzU7eyo5iF2J3SEDscqwFBNGo+8Ls4birmk8x/MQ3O7kfHfekQWJbuJUC5O1osgKvlDY
+HaYcZFabX2SSVlVC06WUWBiM+xtOEiAk+vIHJhu4hU5zOaC7UMuUKogM8IIrIP2RuFu6UXzmu6CE
+b0KkW+dLcUWvCemnZbAq4967czYKS2OjhUyjmIskEaKwNQQvWngeNMePErVz/fXjStE+PWKVRVXn
+OefXfA5O8TDavj6OOyu79pepI9rcDfrmZdffAht1uGQNDMfM2MuwQon23kn00U6rilRZzBWI7an9
+r1YNKrA7PHvE0dMjOj49RZHkOLjYjhfgemY9+IYMMacxhAYnRVZBHcNG1jejWHLdmKD5e7Q/DwM+
+o8NN1T4cVciq3yGD/Yk4hXYQpFALHFoUHjMZUxk+rbkak6tSdY6Ukgasy2OCsE6LyS+GJiEZE5Y9
+9YC3sznc2z5s9SLjlLQkVO4EI39Hi177Ba51BYWkaaO3QuL1V+xn8M92bnq+oFjESvXvXs/LGspc
+ftjWvcipQN+TJtvzlXlJzZ58oLZxRLQrIJCRLY28qKLY9g4tKxzyI2rydlUlTbtztcOv6tS41I9p
+DZdILnAmv2yXiI8O0yJhUpubNtN6frcf0hLBMEzLZEc55HAGOONL0RzW3h1ostOibFK8hC4mg1Rd
+UzNgmFEbwqV/23fvbpnnCloMFq0is6wj8G67yyY0FgLQY6x+fRLWEicxF4UCjhmqJnXx7IRG6S3g
+bbqtsYeWBBaJBT4AhDyHMJvvLlSGr8Y5hrQoN11iyQm72Nmp1IQ1CjmeUNoHHBybqbKXo87gTSky
+xTqMvhw55hsy6lPPBngJJFQTZHr4yYWBHRwj1BZ4lhQdmR5PbUqECl+1EOivQsYqELAwpwFvcvug
+4CbjkVYIDKqMVFC1rY3A6yWDFaxCbY4ickntghlpplCdtpl/NKNQZwH1JMqLaTwaOmUVSDoLh1NJ
+toHJWULox5WMMVOgRQ5mpxVvixydLNaFbQaDtvYvvzSIJvsLLzgyaK3CqqMy02jpRbS4YDWsJtBo
+A2QEyiKmT5i9Z6YW9BV/giVaTrhSp1GNpiaC9jXVDSx2AHUDgCsYj04hhF59vBUI0Hq0eO+H/F3J
+FOFCQpOg96w=
diff --git a/patches/source/gtk+2/doinst.sh b/patches/source/gtk+2/doinst.sh
new file mode 100644
index 000000000..18d5fb272
--- /dev/null
+++ b/patches/source/gtk+2/doinst.sh
@@ -0,0 +1,28 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/gtk-2.0/gtkrc.new
+config etc/gtk-2.0/im-multipress.conf.new
+rm -f etc/gtk-2.0/gtkrc.new
+
+chroot . rm -f /usr/share/icons/*/icon-theme.cache 1> /dev/null 2> /dev/null
+
+# Run this if we are on an installed system. Otherwise it will be
+# handled on first boot.
+if [ -x /usr/bin/update-gtk-immodules-2.0 ]; then
+ /usr/bin/update-gtk-immodules
+fi
+
+# In case this is the first run installing the standalone gdk-pixbuf,
+# we will run this a second time to fix machines that will not reboot.
+chroot . /usr/bin/update-gdk-pixbuf-loaders 1> /dev/null 2> /dev/null
+
diff --git a/patches/source/gtk+2/fix_build_issues_on_tutorial_and_faq.diff b/patches/source/gtk+2/fix_build_issues_on_tutorial_and_faq.diff
new file mode 100644
index 000000000..6d6ad4d23
--- /dev/null
+++ b/patches/source/gtk+2/fix_build_issues_on_tutorial_and_faq.diff
@@ -0,0 +1,26 @@
+diff -Nur gtk+-2.24.0.orig/docs/faq/Makefile.am gtk+-2.24.0/docs/faq/Makefile.am
+--- gtk+-2.24.0.orig/docs/faq/Makefile.am 2011-01-05 09:51:19.000000000 -0600
++++ gtk+-2.24.0/docs/faq/Makefile.am 2011-02-11 10:41:13.383824443 -0600
+@@ -9,7 +9,8 @@
+ (cd $(srcdir); \
+ db2html gtk-faq.sgml; \
+ test -d html && rm -r html; \
+- mv gtk-faq html); \
++ mkdir html; \
++ mv *.html html); \
+ fi
+
+ pdf:
+diff -Nur gtk+-2.24.0.orig/docs/tutorial/Makefile.am gtk+-2.24.0/docs/tutorial/Makefile.am
+--- gtk+-2.24.0.orig/docs/tutorial/Makefile.am 2011-01-05 09:51:20.000000000 -0600
++++ gtk+-2.24.0/docs/tutorial/Makefile.am 2011-02-11 10:42:04.541622883 -0600
+@@ -42,7 +42,8 @@
+ (cd $(srcdir); \
+ db2html gtk-tut.sgml; \
+ test -d html && rm -r html; \
+- mv gtk-tut html; \
++ mkdir html; \
++ mv *.html html; \
+ mkdir html/images; \
+ cp images/*.png html/images); \
+ fi
diff --git a/patches/source/gtk+2/gtk+-2.24.x.icon-compat.am.diff b/patches/source/gtk+2/gtk+-2.24.x.icon-compat.am.diff
new file mode 100644
index 000000000..3fc35dcab
--- /dev/null
+++ b/patches/source/gtk+2/gtk+-2.24.x.icon-compat.am.diff
@@ -0,0 +1,264 @@
+--- gtk+-2.24.14.orig/gtk/Makefile.am 2012-08-24 18:38:09.000000000 -0500
++++ gtk+-2.24.14/gtk/Makefile.am 2012-12-12 19:03:36.039889640 -0600
+@@ -1339,7 +1339,171 @@
+ stock-icons/24/document-save.png \
+ stock-icons/24/folder-remote.png \
+ stock-icons/24/user-home.png \
+- stock-icons/24/user-desktop.png
++ stock-icons/24/user-desktop.png \
++ stock-icons/16/gtk-quit.png \
++ stock-icons/16/gtk-info.png \
++ stock-icons/16/gtk-file.png \
++ stock-icons/16/gtk-open.png \
++ stock-icons/16/gtk-print-preview.png \
++ stock-icons/16/gtk-print.png \
++ stock-icons/16/gtk-properties.png \
++ stock-icons/16/gtk-revert-to-saved-ltr.png \
++ stock-icons/16/gtk-revert-to-saved-rtl.png \
++ stock-icons/16/gtk-save-as.png \
++ stock-icons/16/gtk-new.png \
++ stock-icons/16/gtk-harddisk.png \
++ stock-icons/16/gtk-clear.png \
++ stock-icons/16/gtk-copy.png \
++ stock-icons/16/gtk-cut.png \
++ stock-icons/16/gtk-delete.png \
++ stock-icons/16/gtk-find-and-replace.png \
++ stock-icons/16/gtk-find.png \
++ stock-icons/16/gtk-paste.png \
++ stock-icons/16/gtk-redo-ltr.png \
++ stock-icons/16/gtk-redo-rtl.png \
++ stock-icons/16/gtk-select-all.png \
++ stock-icons/16/gtk-undo-ltr.png \
++ stock-icons/16/gtk-undo-rtl.png \
++ stock-icons/16/gtk-directory.png \
++ stock-icons/16/gtk-unindent-ltr.png \
++ stock-icons/16/gtk-unindent-rtl.png \
++ stock-icons/16/gtk-indent-ltr.png \
++ stock-icons/16/gtk-indent-rtl.png \
++ stock-icons/16/gtk-justify-center.png \
++ stock-icons/16/gtk-justify-fill.png \
++ stock-icons/16/gtk-justify-left.png \
++ stock-icons/16/gtk-justify-right.png \
++ stock-icons/16/gtk-bold.png \
++ stock-icons/16/gtk-italic.png \
++ stock-icons/16/gtk-strikethrough.png \
++ stock-icons/16/gtk-underline.png \
++ stock-icons/16/gtk-goto-bottom.png \
++ stock-icons/16/gtk-go-down.png \
++ stock-icons/16/gtk-goto-first-ltr.png \
++ stock-icons/16/gtk-home.png \
++ stock-icons/16/gtk-jump-to-ltr.png \
++ stock-icons/16/gtk-jump-to-rtl.png \
++ stock-icons/16/gtk-goto-last-ltr.png \
++ stock-icons/16/gtk-go-forward-ltr.png \
++ stock-icons/16/gtk-go-back-ltr.png \
++ stock-icons/16/gtk-goto-top.png \
++ stock-icons/16/gtk-go-up.png \
++ stock-icons/16/gtk-about.png \
++ stock-icons/16/gtk-help.png \
++ stock-icons/16/gtk-missing-image.png \
++ stock-icons/16/gtk-add.png \
++ stock-icons/16/gtk-remove.png \
++ stock-icons/16/gtk-floppy.png \
++ stock-icons/16/gtk-cdrom.png \
++ stock-icons/16/gtk-media-pause.png \
++ stock-icons/16/gtk-media-play-ltr.png \
++ stock-icons/16/gtk-media-play-rtl.png \
++ stock-icons/16/gtk-media-stop.png \
++ stock-icons/16/gtk-media-record.png \
++ stock-icons/16/gtk-media-rewind-ltr.png \
++ stock-icons/16/gtk-media-forward-ltr.png \
++ stock-icons/16/gtk-media-previous-ltr.png \
++ stock-icons/16/gtk-media-next-ltr.png \
++ stock-icons/16/gtk-network.png \
++ stock-icons/16/gtk-print-error.png \
++ stock-icons/16/gtk-print-report.png \
++ stock-icons/16/gtk-print-paused.png \
++ stock-icons/16/gtk-print-warning.png \
++ stock-icons/16/gtk-stop.png \
++ stock-icons/16/gtk-execute.png \
++ stock-icons/16/gtk-spell-check.png \
++ stock-icons/16/gtk-fullscreen.png \
++ stock-icons/16/gtk-refresh.png \
++ stock-icons/16/gtk-leave-fullscreen.png \
++ stock-icons/16/gtk-sort-ascending.png \
++ stock-icons/16/gtk-sort-descending.png \
++ stock-icons/16/gtk-close.png \
++ stock-icons/16/gtk-zoom-fit.png \
++ stock-icons/16/gtk-zoom-in.png \
++ stock-icons/16/gtk-zoom-100.png \
++ stock-icons/16/gtk-zoom-out.png \
++ stock-icons/24/gtk-quit.png \
++ stock-icons/24/gtk-info.png \
++ stock-icons/24/gtk-file.png \
++ stock-icons/24/gtk-open.png \
++ stock-icons/24/gtk-print-preview.png \
++ stock-icons/24/gtk-print.png \
++ stock-icons/24/gtk-properties.png \
++ stock-icons/24/gtk-revert-to-saved-ltr.png \
++ stock-icons/24/gtk-revert-to-saved-rtl.png \
++ stock-icons/24/gtk-save-as.png \
++ stock-icons/24/gtk-new.png \
++ stock-icons/24/gtk-harddisk.png \
++ stock-icons/24/gtk-clear.png \
++ stock-icons/24/gtk-copy.png \
++ stock-icons/24/gtk-cut.png \
++ stock-icons/24/gtk-delete.png \
++ stock-icons/24/gtk-find-and-replace.png \
++ stock-icons/24/gtk-find.png \
++ stock-icons/24/gtk-paste.png \
++ stock-icons/24/gtk-redo-ltr.png \
++ stock-icons/24/gtk-redo-rtl.png \
++ stock-icons/24/gtk-select-all.png \
++ stock-icons/24/gtk-undo-ltr.png \
++ stock-icons/24/gtk-undo-rtl.png \
++ stock-icons/24/gtk-directory.png \
++ stock-icons/24/gtk-unindent-ltr.png \
++ stock-icons/24/gtk-unindent-rtl.png \
++ stock-icons/24/gtk-indent-ltr.png \
++ stock-icons/24/gtk-indent-rtl.png \
++ stock-icons/24/gtk-justify-center.png \
++ stock-icons/24/gtk-justify-fill.png \
++ stock-icons/24/gtk-justify-left.png \
++ stock-icons/24/gtk-justify-right.png \
++ stock-icons/24/gtk-bold.png \
++ stock-icons/24/gtk-italic.png \
++ stock-icons/24/gtk-strikethrough.png \
++ stock-icons/24/gtk-underline.png \
++ stock-icons/24/gtk-goto-bottom.png \
++ stock-icons/24/gtk-go-down.png \
++ stock-icons/24/gtk-goto-first-ltr.png \
++ stock-icons/24/gtk-home.png \
++ stock-icons/24/gtk-jump-to-ltr.png \
++ stock-icons/24/gtk-jump-to-rtl.png \
++ stock-icons/24/gtk-goto-last-ltr.png \
++ stock-icons/24/gtk-go-forward-ltr.png \
++ stock-icons/24/gtk-go-back-ltr.png \
++ stock-icons/24/gtk-goto-top.png \
++ stock-icons/24/gtk-go-up.png \
++ stock-icons/24/gtk-about.png \
++ stock-icons/24/gtk-help.png \
++ stock-icons/24/gtk-missing-image.png \
++ stock-icons/24/gtk-add.png \
++ stock-icons/24/gtk-remove.png \
++ stock-icons/24/gtk-floppy.png \
++ stock-icons/24/gtk-cdrom.png \
++ stock-icons/24/gtk-media-pause.png \
++ stock-icons/24/gtk-media-play-ltr.png \
++ stock-icons/24/gtk-media-play-rtl.png \
++ stock-icons/24/gtk-media-stop.png \
++ stock-icons/24/gtk-media-record.png \
++ stock-icons/24/gtk-media-rewind-ltr.png \
++ stock-icons/24/gtk-media-forward-ltr.png \
++ stock-icons/24/gtk-media-previous-ltr.png \
++ stock-icons/24/gtk-media-next-ltr.png \
++ stock-icons/24/gtk-network.png \
++ stock-icons/24/gtk-print-error.png \
++ stock-icons/24/gtk-print-report.png \
++ stock-icons/24/gtk-print-paused.png \
++ stock-icons/24/gtk-print-warning.png \
++ stock-icons/24/gtk-stop.png \
++ stock-icons/24/gtk-execute.png \
++ stock-icons/24/gtk-spell-check.png \
++ stock-icons/24/gtk-fullscreen.png \
++ stock-icons/24/gtk-refresh.png \
++ stock-icons/24/gtk-leave-fullscreen.png \
++ stock-icons/24/gtk-sort-ascending.png \
++ stock-icons/24/gtk-sort-descending.png \
++ stock-icons/24/gtk-close.png \
++ stock-icons/24/gtk-zoom-fit.png \
++ stock-icons/24/gtk-zoom-in.png \
++ stock-icons/24/gtk-zoom-100.png \
++ stock-icons/24/gtk-zoom-out.png
+
+ # need to copy the icons so that we can replace the generated ones with
+ # symlinks, even in the readonly srcdir case
+@@ -1379,6 +1543,88 @@
+ && $(LN_S) folder.png user-desktop.png \
+ && $(RM) user-home.png \
+ && $(LN_S) folder.png user-home.png \
++ && $(LN_S) application-exit.png gtk-quit.png \
++ && $(LN_S) dialog-info.png gtk-info.png \
++ && $(LN_S) document-new.png gtk-file.png \
++ && $(LN_S) document-open.png gtk-open.png \
++ && $(LN_S) document-print-preview.png gtk-print-preview.png \
++ && $(LN_S) document-print.png gtk-print.png \
++ && $(LN_S) document-properties.png gtk-properties.png \
++ && $(LN_S) document-revert-ltr.png gtk-revert-to-saved-ltr.png \
++ && $(LN_S) document-revert-rtl.png gtk-revert-to-saved-rtl.png \
++ && $(LN_S) document-save-as.png gtk-save-as.png \
++ && $(LN_S) document-x-generic.png gtk-new.png \
++ && $(LN_S) drive-harddisk.png gtk-harddisk.png \
++ && $(LN_S) edit-clear.png gtk-clear.png \
++ && $(LN_S) edit-copy.png gtk-copy.png \
++ && $(LN_S) edit-cut.png gtk-cut.png \
++ && $(LN_S) edit-delete.png gtk-delete.png \
++ && $(LN_S) edit-find-replace.png gtk-find-and-replace.png \
++ && $(LN_S) edit-find.png gtk-find.png \
++ && $(LN_S) edit-paste.png gtk-paste.png \
++ && $(LN_S) edit-redo-ltr.png gtk-redo-ltr.png \
++ && $(LN_S) edit-redo-rtl.png gtk-redo-rtl.png \
++ && $(LN_S) edit-select-all.png gtk-select-all.png \
++ && $(LN_S) edit-undo-ltr.png gtk-undo-ltr.png \
++ && $(LN_S) edit-undo-rtl.png gtk-undo-rtl.png \
++ && $(LN_S) folder.png gtk-directory.png \
++ && $(LN_S) format-indent-less-ltr.png gtk-unindent-ltr.png \
++ && $(LN_S) format-indent-less-rtl.png gtk-unindent-rtl.png \
++ && $(LN_S) format-indent-more-ltr.png gtk-indent-ltr.png \
++ && $(LN_S) format-indent-more-rtl.png gtk-indent-rtl.png \
++ && $(LN_S) format-justify-center.png gtk-justify-center.png \
++ && $(LN_S) format-justify-fill.png gtk-justify-fill.png \
++ && $(LN_S) format-justify-left.png gtk-justify-left.png \
++ && $(LN_S) format-justify-right.png gtk-justify-right.png \
++ && $(LN_S) format-text-bold.png gtk-bold.png \
++ && $(LN_S) format-text-italic.png gtk-italic.png \
++ && $(LN_S) format-text-strikethrough.png gtk-strikethrough.png \
++ && $(LN_S) format-text-underline.png gtk-underline.png \
++ && $(LN_S) go-bottom.png gtk-goto-bottom.png \
++ && $(LN_S) go-down.png gtk-go-down.png \
++ && $(LN_S) go-first-ltr.png gtk-goto-first-ltr.png \
++ && $(LN_S) go-home.png gtk-home.png \
++ && $(LN_S) go-jump-ltr.png gtk-jump-to-ltr.png \
++ && $(LN_S) go-jump-rtl.png gtk-jump-to-rtl.png \
++ && $(LN_S) go-last-ltr.png gtk-goto-last-ltr.png \
++ && $(LN_S) go-next-ltr.png gtk-go-forward-ltr.png \
++ && $(LN_S) go-previous-ltr.png gtk-go-back-ltr.png \
++ && $(LN_S) go-top.png gtk-goto-top.png \
++ && $(LN_S) go-up.png gtk-go-up.png \
++ && $(LN_S) help-about.png gtk-about.png \
++ && $(LN_S) help-contents.png gtk-help.png \
++ && $(LN_S) image-missing.png gtk-missing-image.png \
++ && $(LN_S) list-add.png gtk-add.png \
++ && $(LN_S) list-remove.png gtk-remove.png \
++ && $(LN_S) media-floppy.png gtk-floppy.png \
++ && $(LN_S) media-optical.png gtk-cdrom.png \
++ && $(LN_S) media-playback-pause.png gtk-media-pause.png \
++ && $(LN_S) media-playback-start-ltr.png gtk-media-play-ltr.png \
++ && $(LN_S) media-playback-start-rtl.png gtk-media-play-rtl.png \
++ && $(LN_S) media-playback-stop.png gtk-media-stop.png \
++ && $(LN_S) media-record.png gtk-media-record.png \
++ && $(LN_S) media-seek-backward-ltr.png gtk-media-rewind-ltr.png \
++ && $(LN_S) media-seek-forward-ltr.png gtk-media-forward-ltr.png \
++ && $(LN_S) media-skip-backward-ltr.png gtk-media-previous-ltr.png \
++ && $(LN_S) media-skip-forward-ltr.png gtk-media-next-ltr.png \
++ && $(LN_S) network-idle.png gtk-network.png \
++ && $(LN_S) printer-error.png gtk-print-error.png \
++ && $(LN_S) printer-info.png gtk-print-report.png \
++ && $(LN_S) printer-paused.png gtk-print-paused.png \
++ && $(LN_S) printer-warning.png gtk-print-warning.png \
++ && $(LN_S) process-stop.png gtk-stop.png \
++ && $(LN_S) system-run.png gtk-execute.png \
++ && $(LN_S) tools-check-spelling.png gtk-spell-check.png \
++ && $(LN_S) view-fullscreen.png gtk-fullscreen.png \
++ && $(LN_S) view-refresh.png gtk-refresh.png \
++ && $(LN_S) view-restore.png gtk-leave-fullscreen.png \
++ && $(LN_S) view-sort-ascending.png gtk-sort-ascending.png \
++ && $(LN_S) view-sort-descending.png gtk-sort-descending.png \
++ && $(LN_S) window-close.png gtk-close.png \
++ && $(LN_S) zoom-fit-best.png gtk-zoom-fit.png \
++ && $(LN_S) zoom-in.png gtk-zoom-in.png \
++ && $(LN_S) zoom-original.png gtk-zoom-100.png \
++ && $(LN_S) zoom-out.png gtk-zoom-out.png \
+ ) done \
+ && touch stamp-icons
+
diff --git a/patches/source/gtk+2/gtk+-2.24.x.icon-compat.diff b/patches/source/gtk+2/gtk+-2.24.x.icon-compat.diff
new file mode 100644
index 000000000..ff9a444b4
--- /dev/null
+++ b/patches/source/gtk+2/gtk+-2.24.x.icon-compat.diff
@@ -0,0 +1,264 @@
+--- gtk+-2.24.14.orig/gtk/Makefile.in 2012-12-05 21:46:20.000000000 -0600
++++ gtk+-2.24.14/gtk/Makefile.in 2012-12-12 18:59:17.734970161 -0600
+@@ -1938,7 +1938,171 @@
+ stock-icons/24/document-save.png \
+ stock-icons/24/folder-remote.png \
+ stock-icons/24/user-home.png \
+- stock-icons/24/user-desktop.png
++ stock-icons/24/user-desktop.png \
++ stock-icons/16/gtk-quit.png \
++ stock-icons/16/gtk-info.png \
++ stock-icons/16/gtk-file.png \
++ stock-icons/16/gtk-open.png \
++ stock-icons/16/gtk-print-preview.png \
++ stock-icons/16/gtk-print.png \
++ stock-icons/16/gtk-properties.png \
++ stock-icons/16/gtk-revert-to-saved-ltr.png \
++ stock-icons/16/gtk-revert-to-saved-rtl.png \
++ stock-icons/16/gtk-save-as.png \
++ stock-icons/16/gtk-new.png \
++ stock-icons/16/gtk-harddisk.png \
++ stock-icons/16/gtk-clear.png \
++ stock-icons/16/gtk-copy.png \
++ stock-icons/16/gtk-cut.png \
++ stock-icons/16/gtk-delete.png \
++ stock-icons/16/gtk-find-and-replace.png \
++ stock-icons/16/gtk-find.png \
++ stock-icons/16/gtk-paste.png \
++ stock-icons/16/gtk-redo-ltr.png \
++ stock-icons/16/gtk-redo-rtl.png \
++ stock-icons/16/gtk-select-all.png \
++ stock-icons/16/gtk-undo-ltr.png \
++ stock-icons/16/gtk-undo-rtl.png \
++ stock-icons/16/gtk-directory.png \
++ stock-icons/16/gtk-unindent-ltr.png \
++ stock-icons/16/gtk-unindent-rtl.png \
++ stock-icons/16/gtk-indent-ltr.png \
++ stock-icons/16/gtk-indent-rtl.png \
++ stock-icons/16/gtk-justify-center.png \
++ stock-icons/16/gtk-justify-fill.png \
++ stock-icons/16/gtk-justify-left.png \
++ stock-icons/16/gtk-justify-right.png \
++ stock-icons/16/gtk-bold.png \
++ stock-icons/16/gtk-italic.png \
++ stock-icons/16/gtk-strikethrough.png \
++ stock-icons/16/gtk-underline.png \
++ stock-icons/16/gtk-goto-bottom.png \
++ stock-icons/16/gtk-go-down.png \
++ stock-icons/16/gtk-goto-first-ltr.png \
++ stock-icons/16/gtk-home.png \
++ stock-icons/16/gtk-jump-to-ltr.png \
++ stock-icons/16/gtk-jump-to-rtl.png \
++ stock-icons/16/gtk-goto-last-ltr.png \
++ stock-icons/16/gtk-go-forward-ltr.png \
++ stock-icons/16/gtk-go-back-ltr.png \
++ stock-icons/16/gtk-goto-top.png \
++ stock-icons/16/gtk-go-up.png \
++ stock-icons/16/gtk-about.png \
++ stock-icons/16/gtk-help.png \
++ stock-icons/16/gtk-missing-image.png \
++ stock-icons/16/gtk-add.png \
++ stock-icons/16/gtk-remove.png \
++ stock-icons/16/gtk-floppy.png \
++ stock-icons/16/gtk-cdrom.png \
++ stock-icons/16/gtk-media-pause.png \
++ stock-icons/16/gtk-media-play-ltr.png \
++ stock-icons/16/gtk-media-play-rtl.png \
++ stock-icons/16/gtk-media-stop.png \
++ stock-icons/16/gtk-media-record.png \
++ stock-icons/16/gtk-media-rewind-ltr.png \
++ stock-icons/16/gtk-media-forward-ltr.png \
++ stock-icons/16/gtk-media-previous-ltr.png \
++ stock-icons/16/gtk-media-next-ltr.png \
++ stock-icons/16/gtk-network.png \
++ stock-icons/16/gtk-print-error.png \
++ stock-icons/16/gtk-print-report.png \
++ stock-icons/16/gtk-print-paused.png \
++ stock-icons/16/gtk-print-warning.png \
++ stock-icons/16/gtk-stop.png \
++ stock-icons/16/gtk-execute.png \
++ stock-icons/16/gtk-spell-check.png \
++ stock-icons/16/gtk-fullscreen.png \
++ stock-icons/16/gtk-refresh.png \
++ stock-icons/16/gtk-leave-fullscreen.png \
++ stock-icons/16/gtk-sort-ascending.png \
++ stock-icons/16/gtk-sort-descending.png \
++ stock-icons/16/gtk-close.png \
++ stock-icons/16/gtk-zoom-fit.png \
++ stock-icons/16/gtk-zoom-in.png \
++ stock-icons/16/gtk-zoom-100.png \
++ stock-icons/16/gtk-zoom-out.png \
++ stock-icons/24/gtk-quit.png \
++ stock-icons/24/gtk-info.png \
++ stock-icons/24/gtk-file.png \
++ stock-icons/24/gtk-open.png \
++ stock-icons/24/gtk-print-preview.png \
++ stock-icons/24/gtk-print.png \
++ stock-icons/24/gtk-properties.png \
++ stock-icons/24/gtk-revert-to-saved-ltr.png \
++ stock-icons/24/gtk-revert-to-saved-rtl.png \
++ stock-icons/24/gtk-save-as.png \
++ stock-icons/24/gtk-new.png \
++ stock-icons/24/gtk-harddisk.png \
++ stock-icons/24/gtk-clear.png \
++ stock-icons/24/gtk-copy.png \
++ stock-icons/24/gtk-cut.png \
++ stock-icons/24/gtk-delete.png \
++ stock-icons/24/gtk-find-and-replace.png \
++ stock-icons/24/gtk-find.png \
++ stock-icons/24/gtk-paste.png \
++ stock-icons/24/gtk-redo-ltr.png \
++ stock-icons/24/gtk-redo-rtl.png \
++ stock-icons/24/gtk-select-all.png \
++ stock-icons/24/gtk-undo-ltr.png \
++ stock-icons/24/gtk-undo-rtl.png \
++ stock-icons/24/gtk-directory.png \
++ stock-icons/24/gtk-unindent-ltr.png \
++ stock-icons/24/gtk-unindent-rtl.png \
++ stock-icons/24/gtk-indent-ltr.png \
++ stock-icons/24/gtk-indent-rtl.png \
++ stock-icons/24/gtk-justify-center.png \
++ stock-icons/24/gtk-justify-fill.png \
++ stock-icons/24/gtk-justify-left.png \
++ stock-icons/24/gtk-justify-right.png \
++ stock-icons/24/gtk-bold.png \
++ stock-icons/24/gtk-italic.png \
++ stock-icons/24/gtk-strikethrough.png \
++ stock-icons/24/gtk-underline.png \
++ stock-icons/24/gtk-goto-bottom.png \
++ stock-icons/24/gtk-go-down.png \
++ stock-icons/24/gtk-goto-first-ltr.png \
++ stock-icons/24/gtk-home.png \
++ stock-icons/24/gtk-jump-to-ltr.png \
++ stock-icons/24/gtk-jump-to-rtl.png \
++ stock-icons/24/gtk-goto-last-ltr.png \
++ stock-icons/24/gtk-go-forward-ltr.png \
++ stock-icons/24/gtk-go-back-ltr.png \
++ stock-icons/24/gtk-goto-top.png \
++ stock-icons/24/gtk-go-up.png \
++ stock-icons/24/gtk-about.png \
++ stock-icons/24/gtk-help.png \
++ stock-icons/24/gtk-missing-image.png \
++ stock-icons/24/gtk-add.png \
++ stock-icons/24/gtk-remove.png \
++ stock-icons/24/gtk-floppy.png \
++ stock-icons/24/gtk-cdrom.png \
++ stock-icons/24/gtk-media-pause.png \
++ stock-icons/24/gtk-media-play-ltr.png \
++ stock-icons/24/gtk-media-play-rtl.png \
++ stock-icons/24/gtk-media-stop.png \
++ stock-icons/24/gtk-media-record.png \
++ stock-icons/24/gtk-media-rewind-ltr.png \
++ stock-icons/24/gtk-media-forward-ltr.png \
++ stock-icons/24/gtk-media-previous-ltr.png \
++ stock-icons/24/gtk-media-next-ltr.png \
++ stock-icons/24/gtk-network.png \
++ stock-icons/24/gtk-print-error.png \
++ stock-icons/24/gtk-print-report.png \
++ stock-icons/24/gtk-print-paused.png \
++ stock-icons/24/gtk-print-warning.png \
++ stock-icons/24/gtk-stop.png \
++ stock-icons/24/gtk-execute.png \
++ stock-icons/24/gtk-spell-check.png \
++ stock-icons/24/gtk-fullscreen.png \
++ stock-icons/24/gtk-refresh.png \
++ stock-icons/24/gtk-leave-fullscreen.png \
++ stock-icons/24/gtk-sort-ascending.png \
++ stock-icons/24/gtk-sort-descending.png \
++ stock-icons/24/gtk-close.png \
++ stock-icons/24/gtk-zoom-fit.png \
++ stock-icons/24/gtk-zoom-in.png \
++ stock-icons/24/gtk-zoom-100.png \
++ stock-icons/24/gtk-zoom-out.png
+
+ @CROSS_COMPILING_FALSE@gtk_update_icon_cache_program = \
+ @CROSS_COMPILING_FALSE@ ./gtk-update-icon-cache
+@@ -5401,6 +5565,88 @@
+ && $(LN_S) folder.png user-desktop.png \
+ && $(RM) user-home.png \
+ && $(LN_S) folder.png user-home.png \
++ && $(LN_S) application-exit.png gtk-quit.png \
++ && $(LN_S) dialog-info.png gtk-info.png \
++ && $(LN_S) document-new.png gtk-file.png \
++ && $(LN_S) document-open.png gtk-open.png \
++ && $(LN_S) document-print-preview.png gtk-print-preview.png \
++ && $(LN_S) document-print.png gtk-print.png \
++ && $(LN_S) document-properties.png gtk-properties.png \
++ && $(LN_S) document-revert-ltr.png gtk-revert-to-saved-ltr.png \
++ && $(LN_S) document-revert-rtl.png gtk-revert-to-saved-rtl.png \
++ && $(LN_S) document-save-as.png gtk-save-as.png \
++ && $(LN_S) document-x-generic.png gtk-new.png \
++ && $(LN_S) drive-harddisk.png gtk-harddisk.png \
++ && $(LN_S) edit-clear.png gtk-clear.png \
++ && $(LN_S) edit-copy.png gtk-copy.png \
++ && $(LN_S) edit-cut.png gtk-cut.png \
++ && $(LN_S) edit-delete.png gtk-delete.png \
++ && $(LN_S) edit-find-replace.png gtk-find-and-replace.png \
++ && $(LN_S) edit-find.png gtk-find.png \
++ && $(LN_S) edit-paste.png gtk-paste.png \
++ && $(LN_S) edit-redo-ltr.png gtk-redo-ltr.png \
++ && $(LN_S) edit-redo-rtl.png gtk-redo-rtl.png \
++ && $(LN_S) edit-select-all.png gtk-select-all.png \
++ && $(LN_S) edit-undo-ltr.png gtk-undo-ltr.png \
++ && $(LN_S) edit-undo-rtl.png gtk-undo-rtl.png \
++ && $(LN_S) folder.png gtk-directory.png \
++ && $(LN_S) format-indent-less-ltr.png gtk-unindent-ltr.png \
++ && $(LN_S) format-indent-less-rtl.png gtk-unindent-rtl.png \
++ && $(LN_S) format-indent-more-ltr.png gtk-indent-ltr.png \
++ && $(LN_S) format-indent-more-rtl.png gtk-indent-rtl.png \
++ && $(LN_S) format-justify-center.png gtk-justify-center.png \
++ && $(LN_S) format-justify-fill.png gtk-justify-fill.png \
++ && $(LN_S) format-justify-left.png gtk-justify-left.png \
++ && $(LN_S) format-justify-right.png gtk-justify-right.png \
++ && $(LN_S) format-text-bold.png gtk-bold.png \
++ && $(LN_S) format-text-italic.png gtk-italic.png \
++ && $(LN_S) format-text-strikethrough.png gtk-strikethrough.png \
++ && $(LN_S) format-text-underline.png gtk-underline.png \
++ && $(LN_S) go-bottom.png gtk-goto-bottom.png \
++ && $(LN_S) go-down.png gtk-go-down.png \
++ && $(LN_S) go-first-ltr.png gtk-goto-first-ltr.png \
++ && $(LN_S) go-home.png gtk-home.png \
++ && $(LN_S) go-jump-ltr.png gtk-jump-to-ltr.png \
++ && $(LN_S) go-jump-rtl.png gtk-jump-to-rtl.png \
++ && $(LN_S) go-last-ltr.png gtk-goto-last-ltr.png \
++ && $(LN_S) go-next-ltr.png gtk-go-forward-ltr.png \
++ && $(LN_S) go-previous-ltr.png gtk-go-back-ltr.png \
++ && $(LN_S) go-top.png gtk-goto-top.png \
++ && $(LN_S) go-up.png gtk-go-up.png \
++ && $(LN_S) help-about.png gtk-about.png \
++ && $(LN_S) help-contents.png gtk-help.png \
++ && $(LN_S) image-missing.png gtk-missing-image.png \
++ && $(LN_S) list-add.png gtk-add.png \
++ && $(LN_S) list-remove.png gtk-remove.png \
++ && $(LN_S) media-floppy.png gtk-floppy.png \
++ && $(LN_S) media-optical.png gtk-cdrom.png \
++ && $(LN_S) media-playback-pause.png gtk-media-pause.png \
++ && $(LN_S) media-playback-start-ltr.png gtk-media-play-ltr.png \
++ && $(LN_S) media-playback-start-rtl.png gtk-media-play-rtl.png \
++ && $(LN_S) media-playback-stop.png gtk-media-stop.png \
++ && $(LN_S) media-record.png gtk-media-record.png \
++ && $(LN_S) media-seek-backward-ltr.png gtk-media-rewind-ltr.png \
++ && $(LN_S) media-seek-forward-ltr.png gtk-media-forward-ltr.png \
++ && $(LN_S) media-skip-backward-ltr.png gtk-media-previous-ltr.png \
++ && $(LN_S) media-skip-forward-ltr.png gtk-media-next-ltr.png \
++ && $(LN_S) network-idle.png gtk-network.png \
++ && $(LN_S) printer-error.png gtk-print-error.png \
++ && $(LN_S) printer-info.png gtk-print-report.png \
++ && $(LN_S) printer-paused.png gtk-print-paused.png \
++ && $(LN_S) printer-warning.png gtk-print-warning.png \
++ && $(LN_S) process-stop.png gtk-stop.png \
++ && $(LN_S) system-run.png gtk-execute.png \
++ && $(LN_S) tools-check-spelling.png gtk-spell-check.png \
++ && $(LN_S) view-fullscreen.png gtk-fullscreen.png \
++ && $(LN_S) view-refresh.png gtk-refresh.png \
++ && $(LN_S) view-restore.png gtk-leave-fullscreen.png \
++ && $(LN_S) view-sort-ascending.png gtk-sort-ascending.png \
++ && $(LN_S) view-sort-descending.png gtk-sort-descending.png \
++ && $(LN_S) window-close.png gtk-close.png \
++ && $(LN_S) zoom-fit-best.png gtk-zoom-fit.png \
++ && $(LN_S) zoom-in.png gtk-zoom-in.png \
++ && $(LN_S) zoom-original.png gtk-zoom-100.png \
++ && $(LN_S) zoom-out.png gtk-zoom-out.png \
+ ) done \
+ && touch stamp-icons
+
diff --git a/patches/source/gtk+2/gtk+2.SlackBuild b/patches/source/gtk+2/gtk+2.SlackBuild
new file mode 100755
index 000000000..001706c0e
--- /dev/null
+++ b/patches/source/gtk+2/gtk+2.SlackBuild
@@ -0,0 +1,198 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+VERSION=${VERSION:-$(echo gtk+-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-2_slack14.1}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-gtk2
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG/usr
+cd $TMP
+rm -rf gtk+-$VERSION
+tar xvf $CWD/gtk+-$VERSION.tar.?z* || exit 1
+cd gtk+-$VERSION
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Fix CVE-2013-7447:
+zcat $CWD/gtk.CVE-2013-7447.diff.gz | patch -p1 --verbose || exit 1
+
+# Fix build errors
+zcat $CWD/fix_build_issues_on_tutorial_and_faq.diff.gz | patch -p1 --verbose || exit 1
+
+# Do not flood the console or .xsession-errors with "trouble ahead"
+# warnings (most noticable when using Firefox and Flash):
+zcat $CWD/gtk.xid.nowarningflood.diff.gz | patch -p1 --verbose || exit 1
+
+# Patch to restore commonly used icon names, otherwise everything breaks.
+# I fail to see the point of this "cleanup"
+zcat $CWD/gtk+-2.24.x.icon-compat.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/gtk+-2.24.x.icon-compat.am.diff.gz | patch -p1 --verbose || exit 1
+
+# Regenerate ./configure:
+libtoolize --force
+autoreconf -vif
+
+# Autoconf changes linux to linux-gnu.
+# Our host is $ARCH-slackware-linux not $ARCH-slackware-linux-gnu:
+sed -i -e 's#linux|linux-gnu|#linux|linux|#' config.sub
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --with-xinput=yes \
+ --enable-xkb \
+ --enable-introspection \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+
+# Check the host value that is passed to the compile to the one in this script:
+host="$ARCH-slackware-linux"
+compile_host=$(grep 'host_triplet =' gtk/Makefile | sed -e "s/.* = //")
+if [ "x$compile_host" != "x$host" ]; then
+ echo "Host mismatch: compile='$compile_host', SlackBuild='$host'" && exit 1
+fi
+
+make install \
+ RUN_QUERY_IMMODULES_TEST=false RUN_QUERY_LOADER_TEST=false \
+ DESTDIR=$PKG \
+ || exit 1
+
+# Don't clobber im-multipress.conf
+mv $PKG/etc/gtk-2.0/im-multipress.conf $PKG/etc/gtk-2.0/im-multipress.conf.new || exit 1
+
+# Install a "starter" gtkrc
+echo 'gtk-theme-name="GTK+"' > $PKG/etc/gtk-2.0/gtkrc.new
+
+# We need to have separate 32-bit and 64-bit binaries
+# for places where we have two copies of the GTK+ package installed.
+# (we might have x86_64 and i486 packages on the same system, for example.)
+case "$host" in
+ s390x*|x86_64*)
+ mv $PKG/usr/bin/gtk-query-immodules-2.0{,-64}
+ ( cd $PKG/usr/bin
+ ln -sf gtk-query-immodules-2.0-64 gtk-query-immodules-2.0
+ )
+ ;;
+ *)
+ mv $PKG/usr/bin/gtk-query-immodules-2.0{,-32}
+ ( cd $PKG/usr/bin
+ ln -sf gtk-query-immodules-2.0-32 gtk-query-immodules-2.0
+ )
+ ;;
+esac
+
+# Install wrappers for the binaries:
+cp -a $CWD/update-gtk-immodules* $PKG/usr/bin
+chown root:root $PKG/usr/bin/update-*
+chmod 0755 $PKG/usr/bin/update-*
+
+# Add profile scripts to set up GTK+ environment:
+mkdir -p $PKG/etc/profile.d
+cp -a $CWD/profile.d/* $PKG/etc/profile.d
+chmod 0755 $PKG/etc/profile.d/*
+
+# Strip binaries:
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Compress and if needed symlink the man pages:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+mkdir -p $PKG/usr/doc/gtk+-$VERSION
+cp -a \
+ AUTHORS COPYING* NEWS README* TODO \
+ $PKG/usr/doc/gtk+-$VERSION
+( cd $PKG/usr/doc/gtk+-$VERSION
+ ln -s ../../share/gtk-doc/html/gail-libgail-util .
+ ln -s ../../share/gtk-doc/html/gdk .
+ ln -s ../../share/gtk-doc/html/gtk .
+)
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/gtk+2-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/gtk+2/gtk.CVE-2013-7447.diff b/patches/source/gtk+2/gtk.CVE-2013-7447.diff
new file mode 100644
index 000000000..5d24a98db
--- /dev/null
+++ b/patches/source/gtk+2/gtk.CVE-2013-7447.diff
@@ -0,0 +1,29 @@
+From 894b1ae76a32720f4bb3d39cf460402e3ce331d6 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Sat, 29 Jun 2013 22:06:54 -0400
+Subject: Avoid integer overflow
+
+Use g_malloc_n in gdk_cairo_set_source_pixbuf when allocating
+a large block of memory, to avoid integer overflow.
+
+Pointed out by Bert Massop in
+https://bugzilla.gnome.org/show_bug.cgi?id=703220
+---
+ gdk/gdkcairo.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gdk/gdkcairo.c b/gdk/gdkcairo.c
+index 19bed04..2e1d8dc 100644
+--- a/gdk/gdkcairo.c
++++ b/gdk/gdkcairo.c
+@@ -213,7 +213,7 @@ gdk_cairo_set_source_pixbuf (cairo_t *cr,
+ format = CAIRO_FORMAT_ARGB32;
+
+ cairo_stride = cairo_format_stride_for_width (format, width);
+- cairo_pixels = g_malloc (height * cairo_stride);
++ cairo_pixels = g_malloc_n (height, cairo_stride);
+ surface = cairo_image_surface_create_for_data ((unsigned char *)cairo_pixels,
+ format,
+ width, height, cairo_stride);
+--
+cgit v0.12
diff --git a/patches/source/gtk+2/gtk.xid.nowarningflood.diff b/patches/source/gtk+2/gtk.xid.nowarningflood.diff
new file mode 100644
index 000000000..6b8c854d8
--- /dev/null
+++ b/patches/source/gtk+2/gtk.xid.nowarningflood.diff
@@ -0,0 +1,12 @@
+--- ./gdk/x11/gdkxid.c.orig 2009-12-18 20:54:50.000000000 -0600
++++ ./gdk/x11/gdkxid.c 2010-02-08 14:42:50.000000000 -0600
+@@ -57,9 +57,6 @@
+ display_x11->xid_ht = g_hash_table_new ((GHashFunc) gdk_xid_hash,
+ (GEqualFunc) gdk_xid_equal);
+
+- if (g_hash_table_lookup (display_x11->xid_ht, xid))
+- g_warning ("XID collision, trouble ahead");
+-
+ g_hash_table_insert (display_x11->xid_ht, xid, data);
+ }
+
diff --git a/patches/source/gtk+2/profile.d/gtk+.csh b/patches/source/gtk+2/profile.d/gtk+.csh
new file mode 100755
index 000000000..c9ea5acb5
--- /dev/null
+++ b/patches/source/gtk+2/profile.d/gtk+.csh
@@ -0,0 +1,2 @@
+#!/bin/csh
+setenv GDK_USE_XFT 1
diff --git a/patches/source/gtk+2/profile.d/gtk+.sh b/patches/source/gtk+2/profile.d/gtk+.sh
new file mode 100755
index 000000000..ff3d4927b
--- /dev/null
+++ b/patches/source/gtk+2/profile.d/gtk+.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+GDK_USE_XFT=1
+export GDK_USE_XFT
diff --git a/patches/source/gtk+2/slack-desc b/patches/source/gtk+2/slack-desc
new file mode 100644
index 000000000..bd800ade8
--- /dev/null
+++ b/patches/source/gtk+2/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+gtk+2: GTK+ version 2 (multi-platform GUI toolkit)
+gtk+2:
+gtk+2: This is GTK+, a multi-platform toolkit for creating graphical user
+gtk+2: interfaces. Offering a complete set of widgets, GTK+ is suitable for
+gtk+2: projects ranging from small one-off projects to complete application
+gtk+2: suites.
+gtk+2:
+gtk+2:
+gtk+2:
+gtk+2:
+gtk+2:
diff --git a/patches/source/gtk+2/update-gtk-immodules b/patches/source/gtk+2/update-gtk-immodules
new file mode 100644
index 000000000..a56b3fdcb
--- /dev/null
+++ b/patches/source/gtk+2/update-gtk-immodules
@@ -0,0 +1,12 @@
+#! /bin/sh
+#
+# This is a wrapper script that calls update-gtk-immodules-2.0 (GTK+2)
+# and/or update-gtk-immodules-3.0 (GTK+3) to do the actual updating.
+
+if [ -x /usr/bin/update-gtk-immodules-2.0 ]; then
+ /usr/bin/update-gtk-immodules-2.0 $*
+fi
+if [ -x /usr/bin/update-gtk-immodules-3.0 ]; then
+ /usr/bin/update-gtk-immodules-3.0 $*
+fi
+
diff --git a/patches/source/gtk+2/update-gtk-immodules-2.0 b/patches/source/gtk+2/update-gtk-immodules-2.0
new file mode 100644
index 000000000..f12353fb8
--- /dev/null
+++ b/patches/source/gtk+2/update-gtk-immodules-2.0
@@ -0,0 +1,48 @@
+#! /bin/sh
+# Updates the immodules cache at /usr/lib(64)/gtk-2.0/2.10.0/immodules.cache
+
+umask 022
+
+# Get the machine type from uname:
+host=$(uname -m)-slackware-linux
+
+# Fix $host for arm arch:
+case "$host" in
+ arm*) host=arm-slackware-linux-gnueabi ;;
+esac
+
+case "$host" in
+ s390x*|x86_64*)
+ if [ -x /usr/bin/gtk-query-immodules-2.0-64 ]; then
+ if [ "$1" = "--verbose" ]; then
+ echo "Updating gtk.immodules for ${host}:"
+ echo " /usr/bin/gtk-query-immodules-2.0-64 --update-cache"
+ fi
+ /usr/bin/gtk-query-immodules-2.0-64 --update-cache 2>/dev/null
+ # Check for multilib
+ if [ -x /usr/bin/gtk-query-immodules-2.0-32 ]; then
+ if [ "$1" = "--verbose" ]; then
+ echo "Updating 32bit gtk.immodules: "
+ echo " /usr/bin/gtk-query-immodules-2.0-32 --update-cache"
+ fi
+ /usr/bin/gtk-query-immodules-2.0-32 --update-cache 2>/dev/null
+ fi
+ fi
+ ;;
+ *)
+ if [ -x /usr/bin/gtk-query-immodules-2.0-32 ]; then
+ if [ "$1" = "--verbose" ]; then
+ echo "Updating gtk.immodules for ${host}:"
+ echo " /usr/bin/gtk-query-immodules-2.0-32 --update-cache"
+ fi
+ /usr/bin/gtk-query-immodules-2.0-32 --update-cache 2>/dev/null
+ else
+ if [ "$1" = "--verbose" ]; then
+ echo "Updating gtk.immodules for ${host}:"
+ echo " /usr/bin/gtk-query-immodules-2.0 --update-cache"
+ fi
+ /usr/bin/gtk-query-immodules-2.0 --update-cache 2>/dev/null
+ fi
+ ;;
+esac
+
diff --git a/patches/source/httpd/apache-2.4.CVE-2017-9798.optionsbleed.patch b/patches/source/httpd/apache-2.4.CVE-2017-9798.optionsbleed.patch
new file mode 100644
index 000000000..be590f294
--- /dev/null
+++ b/patches/source/httpd/apache-2.4.CVE-2017-9798.optionsbleed.patch
@@ -0,0 +1,15 @@
+--- httpd/httpd/branches/2.4.x/server/core.c 2017/08/16 16:50:29 1805223
++++ httpd/httpd/branches/2.4.x/server/core.c 2017/09/08 13:13:11 1807754
+@@ -2266,6 +2266,12 @@
+ /* method has not been registered yet, but resource restriction
+ * is always checked before method handling, so register it.
+ */
++ if (cmd->pool == cmd->temp_pool) {
++ /* In .htaccess, we can't globally register new methods. */
++ return apr_psprintf(cmd->pool, "Could not register method '%s' "
++ "for %s from .htaccess configuration",
++ method, cmd->cmd->name);
++ }
+ methnum = ap_method_register(cmd->pool,
+ apr_pstrdup(cmd->pool, method));
+ }
diff --git a/patches/source/httpd/doinst.sh b/patches/source/httpd/doinst.sh
new file mode 100644
index 000000000..e233c362b
--- /dev/null
+++ b/patches/source/httpd/doinst.sh
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname ${NEW})/$(basename ${NEW} .new)"
+ if [ -e ${OLD} ]; then
+ cp -a ${OLD} ${NEW}.incoming
+ cat ${NEW} > ${NEW}.incoming
+ mv ${NEW}.incoming ${NEW}
+ fi
+ # Don't use config() -- we always want to install this, changed or unchanged.
+ #config ${NEW}
+}
+
+if [ ! -e var/log/httpd ]; then
+ mkdir -p var/log/httpd
+ chmod 755 var/log/httpd
+fi
+
+# Don't wipe out an existing document root with symlinks. If someone has
+# replaced the symlinks that are created on a fresh installation, assume
+# that they know what they are doing and leave things as-is.
+if [ ! -e srv/www ]; then
+ ( cd srv ; ln -sf /var/www www )
+fi
+if [ ! -e srv/httpd ]; then
+ ( cd srv ; ln -sf /var/www httpd )
+fi
+
+# Once again, our intent is not to wipe out anyone's
+# site, but building in Apache's docs tree is not as
+# good an idea as picking a unique DocumentRoot.
+#
+# Still, we will do what we can here to mitigate
+# possible site damage:
+if [ -r var/www/htdocs/index.html ]; then
+ if [ ! -r "var/log/packages/httpd-*upgraded*" ]; then
+ if [ var/www/htdocs/index.html -nt var/log/packages/httpd-*-? ]; then
+ cp -a var/www/htdocs/index.html var/www/htdocs/index.html.bak.$$
+ fi
+ fi
+fi
+
+# Keep same perms when installing rc.httpd.new:
+preserve_perms etc/rc.d/rc.httpd.new
+# Always install the new rc.httpd:
+mv etc/rc.d/rc.httpd.new etc/rc.d/rc.httpd
+
+# Handle config files. Unless this is a fresh installation, the
+# admin will have to move the .new files into place to complete
+# the package installation, as we don't want to clobber files that
+# may contain local customizations.
+config etc/httpd/httpd.conf.new
+config etc/logrotate.d/httpd.new
+for conf_file in etc/httpd/extra/*.new; do
+ config $conf_file
+done
+config var/www/htdocs/index.html.new
+
diff --git a/patches/source/httpd/httpd.SlackBuild b/patches/source/httpd/httpd.SlackBuild
new file mode 100755
index 000000000..19ae0defe
--- /dev/null
+++ b/patches/source/httpd/httpd.SlackBuild
@@ -0,0 +1,246 @@
+#!/bin/sh
+
+# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# This script was written using the one from slackbuilds.org as a reference,
+# so thanks to Adis Nezirovic ( adis _at_ linux.org.ba ) for the original work.
+
+
+PKGNAM=httpd
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.bz2 | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-${PKGNAM}
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+cd $TMP
+rm -rf ${PKGNAM}-${VERSION}
+tar xvf $CWD/${PKGNAM}-$VERSION.tar.bz2 || exit 1
+cd ${PKGNAM}-$VERSION || exit 1
+
+# Make sure ownerships and permissions are sane:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# A brief note about mpms:
+#
+# "prefork" is the legacy forked mpm, used with mod_php. Starting with httpd
+# 2.4.0, new threaded mpms are available, and previously experimental mpms are
+# now stable
+#
+# Non-threaded mpms are no longer required, since php applications can now be
+# deployed with the help of mod_fcgid, essentially a set of fixed dedicated cgi
+# processes spawned for the whole purpose of executing dynamic applications
+#
+# Threaded mpms, by their very nature, are far more scalable than the
+# traditional preforking solution. They consume less memory for the same
+# workload, when serving the same amount of clients. httpd 2.4 ships with two
+# options, "event" and "worker", where the former is the default mpm used if
+# none is specified at the ./configure line
+#
+# Lastly, the "prefork" mpm can be used with mod_php as of version 5.4.0,
+# which yields a much improved stability, even with most mod_php extensions
+# loaded.
+#
+# The running mpm can be changed by simply loading the module. Here is a sample:
+# LoadModule mpm_event_module lib(64)/httpd/modules/mod_mpm_event.so
+#
+# When upgrading from 2.2, please make sure to stop the deamon first, or your
+# new instance may segfault.
+
+# Fix config.layout to use lib${LIBDIRSUFFIX}:
+sed -i -e "s#lib/httpd#lib${LIBDIRSUFFIX}/httpd#" config.layout
+
+# If /var/run becomes a tmpfs or a link to /run, subdirectories could be a problem.
+# Just use /var/run rather than /var/run/httpd.
+sed -i -e "s#/run/httpd#/run#" config.layout
+
+# Configure:
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --enable-layout=Slackware-FHS \
+ --with-apr=/usr \
+ --with-apr-util=/usr \
+ --enable-mods-shared=all \
+ --enable-so \
+ --enable-mpms-shared=all \
+ --enable-pie \
+ --enable-cgi \
+ --with-pcre \
+ --enable-ssl \
+ --enable-rewrite \
+ --enable-vhost-alias \
+ --enable-proxy \
+ --enable-proxy-http \
+ --enable-proxy-ftp \
+ --enable-cache \
+ --enable-mem-cache \
+ --enable-file-cache \
+ --enable-disk-cache \
+ --enable-dav \
+ --enable-ldap \
+ --enable-authnz-ldap \
+ --enable-authn-anon \
+ --enable-authn-alias \
+ --build=$ARCH-slackware-linux || exit 1
+
+# Build and install:
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+rmdir $PKG/usr/bin
+
+# Tweak default apache configuration
+( cd $PKG
+ zcat $CWD/httpd.runasapache.diff.gz | patch -p1 --verbose || exit 1
+ # mod_proxy_balancer should be commented out, as otherwise httpd
+ # will not start without additional configuration:
+ sed -i "s/^LoadModule proxy_balancer_module/#LoadModule proxy_balancer_module/g" $PKG/etc/httpd/httpd.conf
+ # This module issues a warning unless some non-default modules are loaded:
+ sed -i "s/^LoadModule lbmethod_heartbeat_module/#LoadModule lbmethod_heartbeat_module/g" $PKG/etc/httpd/httpd.conf
+ rm -f $PKG/etc/httpd/httpd.conf~ $PKG/etc/httpd/httpd.conf.orig
+) || exit 1
+# Change config files to .new:
+( cd $PKG/etc/httpd
+ mv httpd.conf httpd.conf.new
+ for file in extra/*; do
+ mv $file "${file}.new"
+ done
+)
+
+cat << EOF >> $PKG/etc/httpd/httpd.conf.new
+
+# Uncomment the following line to enable PHP:
+#
+#Include /etc/httpd/mod_php.conf
+
+# Uncomment the following lines (and mod_dav above) to enable svn support:
+#
+#LoadModule dav_svn_module lib${LIBDIRSUFFIX}/httpd/modules/mod_dav_svn.so
+#LoadModule authz_svn_module lib${LIBDIRSUFFIX}/httpd/modules/mod_authz_svn.so
+
+EOF
+
+rmdir $PKG/var/log/httpd
+
+mkdir -p $PKG/etc/rc.d
+cat $CWD/rc.httpd > $PKG/etc/rc.d/rc.httpd.new
+
+mkdir -p $PKG/etc/logrotate.d
+cat $CWD/logrotate.httpd > $PKG/etc/logrotate.d/httpd.new
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION/
+cp -a \
+ ABOUT_APACHE Apache.dsw BuildBin.dsp CHANGES INSTALL InstallBin.dsp LAYOUT LICENSE NOTICE NWGNUmakefile README* ROADMAP VERSIONING \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# Other distributions also strip the manual down to just English.
+# If this isn't your language of choice, mea culpa.
+( cd $PKG/srv/httpd/htdocs/manual
+ for file in $(find . -type f -name "*.html") ; do
+ if [ -f ${file}.en ]; then
+ cp ${file}.en ${file}
+ rm -f ${file}.*
+ fi
+ done
+)
+
+# On Slackware, the traditional location for the Apache document root has always
+# been "/var/www/htdocs/". We can avoid an unpleasant surprise for people by
+# leaving things where they've always been, and comply with the FHS by providing
+# symlinks allowing access through the FHS-approved pathnames. KDE, for example,
+# will look for htdig's htsearch here: /var/www/cgi-bin/htsearch
+mv $PKG/srv/httpd $PKG/var/www
+
+## DISABLED. Don't make these symlinks prior to packaging any more, as it is
+## possibly dangerous to an existing document root created in the place where
+## these symlinks are normally found. Instead, we make them in the install
+## script (only if nothing exists there already)
+#( cd $PKG/srv
+# ln -sf /var/www .
+# ln -sf /var/www httpd
+#)
+
+# OK, it's just not generally good form to put your web site in /var/www/htdocs,
+# but people do it every day. Like all new .new files, this won't save them this
+# time, but if they don't learn their lesson now then it will the next time:
+mv $PKG/var/www/htdocs/index.html $PKG/var/www/htdocs/index.html.new
+
+# Strip binaries:
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.*
+ )
+ done
+ )
+fi
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/httpd/httpd.runasapache.diff b/patches/source/httpd/httpd.runasapache.diff
new file mode 100644
index 000000000..c1954ec33
--- /dev/null
+++ b/patches/source/httpd/httpd.runasapache.diff
@@ -0,0 +1,13 @@
+--- ./etc/httpd/httpd.conf.orig 2008-02-14 15:24:21.000000000 -0600
++++ ./etc/httpd/httpd.conf 2008-02-14 15:34:58.000000000 -0600
+@@ -125,8 +125,8 @@
+ # It is usually good practice to create a dedicated user and group for
+ # running httpd, as with most system services.
+ #
+-User daemon
+-Group daemon
++User apache
++Group apache
+
+ </IfModule>
+ </IfModule>
diff --git a/patches/source/httpd/httpd.url b/patches/source/httpd/httpd.url
new file mode 100644
index 000000000..b86771d42
--- /dev/null
+++ b/patches/source/httpd/httpd.url
@@ -0,0 +1,2 @@
+http://www.apache.org/dist/httpd/httpd-2.4.29.tar.bz2
+http://www.apache.org/dist/httpd/httpd-2.4.29.tar.bz2.asc
diff --git a/patches/source/httpd/logrotate.httpd b/patches/source/httpd/logrotate.httpd
new file mode 100644
index 000000000..cc6383674
--- /dev/null
+++ b/patches/source/httpd/logrotate.httpd
@@ -0,0 +1,12 @@
+/var/log/httpd/*_log {
+ rotate 10
+ notifempty
+ missingok
+ size=5M
+ compress
+ delaycompress
+ sharedscripts
+ postrotate
+ /etc/rc.d/rc.httpd restart
+ endscript
+}
diff --git a/patches/source/httpd/rc.httpd b/patches/source/httpd/rc.httpd
new file mode 100644
index 000000000..81189098f
--- /dev/null
+++ b/patches/source/httpd/rc.httpd
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# /etc/rc.d/rc.httpd
+#
+# Start/stop/restart/graceful[ly restart]/graceful[ly]-stop
+# the Apache (httpd) web server.
+#
+# To make Apache start automatically at boot, make this
+# file executable: chmod 755 /etc/rc.d/rc.httpd
+#
+# For information on these options, "man apachectl".
+
+case "$1" in
+ 'start')
+ /usr/sbin/apachectl -k start
+ ;;
+ 'stop')
+ /usr/sbin/apachectl -k stop
+ killall httpd
+ # Remove both old and new .pid locations:
+ rm -f /var/run/httpd.pid /var/run/httpd/httpd.pid
+ ;;
+ 'force-restart')
+ # Because sometimes restarting through apachectl just doesn't do the trick...
+ /usr/sbin/apachectl -k stop
+ killall httpd
+ # Remove both old and new .pid locations:
+ rm -f /var/run/httpd.pid /var/run/httpd/httpd.pid
+ /usr/sbin/apachectl -k start
+ ;;
+ 'restart')
+ /usr/sbin/apachectl -k restart
+ ;;
+ 'graceful')
+ /usr/sbin/apachectl -k graceful
+ ;;
+ 'graceful-stop')
+ /usr/sbin/apachectl -k graceful-stop
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|graceful|graceful-stop}"
+ ;;
+esac
+
diff --git a/patches/source/httpd/slack-desc b/patches/source/httpd/slack-desc
new file mode 100644
index 000000000..38d240b6b
--- /dev/null
+++ b/patches/source/httpd/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+httpd: httpd (The Apache HTTP Server)
+httpd:
+httpd: Apache is an HTTP server designed as a plug-in replacement for the
+httpd: NCSA HTTP server. It fixes numerous bugs in the NCSA server and
+httpd: includes many frequently requested new features, and has an API which
+httpd: allows it to be extended to meet users' needs more easily.
+httpd:
+httpd: Apache is the most popular web server in the known universe; over
+httpd: half of the servers on the Internet are running Apache or one of
+httpd: its variants.
+httpd:
diff --git a/patches/source/imagemagick/blob.c.undef.have_popen.diff b/patches/source/imagemagick/blob.c.undef.have_popen.diff
new file mode 100644
index 000000000..9e33cab77
--- /dev/null
+++ b/patches/source/imagemagick/blob.c.undef.have_popen.diff
@@ -0,0 +1,10 @@
+--- ./magick/blob.c.orig 2016-05-30 06:55:02.000000000 -0500
++++ ./magick/blob.c 2016-05-30 14:48:36.139925266 -0500
+@@ -80,6 +80,7 @@
+ Define declarations.
+ */
+ #define MagickMaxBlobExtent 65541
++#undef MAGICKCORE_HAVE_POPEN
+ #if !defined(MAP_ANONYMOUS) && defined(MAP_ANON)
+ # define MAP_ANONYMOUS MAP_ANON
+ #endif
diff --git a/patches/source/imagemagick/imagemagick.SlackBuild b/patches/source/imagemagick/imagemagick.SlackBuild
new file mode 100755
index 000000000..77ed0d4b9
--- /dev/null
+++ b/patches/source/imagemagick/imagemagick.SlackBuild
@@ -0,0 +1,183 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2016 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+BUILD=${BUILD:-3_slack14.1}
+
+# NOTE: This is to cope with ImageMagick version numbers such as 5.4.7-4,
+# which occur fairly often (but not always). If these numbers are all the same,
+# then this is not one of those versions.
+
+# This is a bit messy, so we'll explain it well. :-)
+
+# This is the base version number, which is needed to cd into the source tree
+BASEVER=6.8.6-10
+
+# This is the version number used in the source tarball filename
+FILEVER=6.8.6-10
+
+# This is the version number used in the package, where a version number cannot
+# contain a '-'
+PKGVER=6.8.6_10
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-imagemagick
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+# --with-x or not --with-x, that is the question. It seems many other
+# distributions don't compile with X support, but it's been traditional
+# here. I am moving the prefix to /usr (instead of /usr/X11R6) though,
+# because many X-linked things are put into /usr now (like GNOME), and
+# I've heard a few reports of compile failures when this isn't in /usr.
+# Everyone else does it -- time to follow the path of least resistance.
+
+cd $TMP
+rm -rf ImageMagick-$BASEVER
+tar xvf $CWD/ImageMagick-$FILEVER.tar.?z* || exit 1
+cd ImageMagick-$BASEVER || exit 1
+
+# Harden the default settings in policy.xml to prevent security issues:
+zcat $CWD/policy.xml.diff.gz | patch -p1 --verbose || exit 1
+
+# undef HAVE_POPEN as additional hardening against shell injection:
+zcat $CWD/blob.c.undef.have_popen.diff.gz | patch -p1 --verbose || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# --without-modules seems to avoid a segfault when identifying
+# or converting ps or eps files...
+
+# --disable-openmp seems to keep the perl Image::Magick from
+# eating up all RAM, and may help other script bindings.
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --sysconfdir=/etc \
+ --program-prefix= \
+ --with-x \
+ --with-frozenpaths=no \
+ --without-modules \
+ --disable-openmp \
+ --enable-static=no \
+ --enable-shared \
+ --with-perl \
+ --with-rsvg \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS INSTALLDIRS=vendor || make INSTALLDIRS=vendor || exit 1
+# First, spam the running development system, as ImageMagick is unable to
+# properly link the utilities against a new shared library major version
+# otherwise which has led to several broken packages over the years:
+make install INSTALLDIRS=vendor || exit 1
+/sbin/ldconfig
+
+# Now build again against the new libraries and headers:
+make clean
+make $NUMJOBS INSTALLDIRS=vendor || make INSTALLDIRS=vendor || exit 1
+make install INSTALLDIRS=vendor DESTDIR=$PKG || exit 1
+
+# This should certainly not be included.
+# It stomps on the libtool package.
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libltdl.*
+
+# .la files in /usr/lib${LIBDIRSUFFIX}/ should be removed.
+# Other .la files should be left alone, as ImageMagick uses them internally
+# to locate modules.
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la
+
+( cd $PKG
+ # Nothing but a perl upgrade should replace this (and maybe not even that)
+ find . -name perllocal.pod | xargs rm -f
+)
+
+# DESTDIR is still broken about this, but works well enough otherwise:
+chmod 644 $PKG/usr/share/man/man3/*
+mv $PKG/usr/share/man/man3 $PKG/usr/man
+rmdir $PKG/usr/share/man
+
+( cd $PKG/usr/lib${LIBDIRSUFFIX}/perl5
+ # Ditch empty dirs:
+ rmdir */* 2> /dev/null
+ rmdir * 2> /dev/null
+)
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+gzip -9 $PKG/usr/man/man?/*.?
+
+mkdir -p $PKG/usr
+mv $PKG/usr/share/doc $PKG/usr
+cp -a \
+ AUTHORS LICENSE NEWS NOTICE Platforms.txt QuickStart.txt README.txt \
+ $PKG/usr/doc/Imag*
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/imagemagick-$PKGVER-$ARCH-$BUILD.txz
+
diff --git a/patches/source/imagemagick/policy.xml.diff b/patches/source/imagemagick/policy.xml.diff
new file mode 100644
index 000000000..dd5ebc522
--- /dev/null
+++ b/patches/source/imagemagick/policy.xml.diff
@@ -0,0 +1,26 @@
+--- ./config/policy.xml.orig 2013-01-14 07:57:39.000000000 -0600
++++ ./config/policy.xml 2016-05-10 16:01:48.603227954 -0500
+@@ -45,6 +45,17 @@
+ exceeds policy maximum so memory limit is 1GB).
+ -->
+ <policymap>
++ <policy domain="cache" name="shared-secret" value="passphrase"/>
++ <!-- SECURITY: disable potentially insecure coders: -->
++ <policy domain="coder" rights="none" pattern="EPHEMERAL" />
++ <policy domain="coder" rights="none" pattern="HTTPS" />
++ <policy domain="coder" rights="none" pattern="MVG" />
++ <policy domain="coder" rights="none" pattern="MSL" />
++ <policy domain="coder" rights="none" pattern="TEXT" />
++ <policy domain="coder" rights="none" pattern="SHOW" />
++ <policy domain="coder" rights="none" pattern="WIN" />
++ <policy domain="coder" rights="none" pattern="PLT" />
++ <!-- Some examples: -->
+ <!-- <policy domain="resource" name="temporary-path" value="/tmp"/> -->
+ <!-- <policy domain="resource" name="memory" value="2GiB"/> -->
+ <!-- <policy domain="resource" name="map" value="4GiB"/> -->
+@@ -55,5 +66,4 @@
+ <!-- <policy domain="resource" name="throttle" value="0"/> -->
+ <!-- <policy domain="resource" name="time" value="3600"/> -->
+ <!-- <policy domain="system" name="precision" value="6"/> -->
+- <policy domain="cache" name="shared-secret" value="passphrase"/>
+ </policymap>
diff --git a/patches/source/imagemagick/slack-desc b/patches/source/imagemagick/slack-desc
new file mode 100644
index 000000000..80ac9a678
--- /dev/null
+++ b/patches/source/imagemagick/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+imagemagick: imagemagick (a robust collection of image processing tools)
+imagemagick:
+imagemagick: ImageMagick is a collection of tools for manipulating and displaying
+imagemagick: digital images. It can merge images, transform image dimensions,
+imagemagick: do screen captures, create animation sequences, and convert between
+imagemagick: many different image formats.
+imagemagick:
+imagemagick: ImageMagick was written by John Cristy of ImageMagick Studio.
+imagemagick:
+imagemagick: Home page: http://www.imagemagick.org/
+imagemagick:
diff --git a/patches/source/inputproto/arch.use.flags b/patches/source/inputproto/arch.use.flags
new file mode 100644
index 000000000..11087c884
--- /dev/null
+++ b/patches/source/inputproto/arch.use.flags
@@ -0,0 +1,9 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/inputproto/build/inputproto b/patches/source/inputproto/build/inputproto
new file mode 100644
index 000000000..a55e8cfcf
--- /dev/null
+++ b/patches/source/inputproto/build/inputproto
@@ -0,0 +1 @@
+1_slack14.1
diff --git a/patches/source/inputproto/configure/configure b/patches/source/inputproto/configure/configure
new file mode 100644
index 000000000..dcb1109bd
--- /dev/null
+++ b/patches/source/inputproto/configure/configure
@@ -0,0 +1,13 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --with-udev-rules-dir=/lib/udev/rules.d \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/inputproto/inputproto.SlackBuild b/patches/source/inputproto/inputproto.SlackBuild
new file mode 100755
index 000000000..d5fe7abae
--- /dev/null
+++ b/patches/source/inputproto/inputproto.SlackBuild
@@ -0,0 +1,2 @@
+UPGRADE_PACKAGES=no ./x11.SlackBuild proto inputproto
+mv /tmp/x11-build/inputproto*txz /tmp
diff --git a/patches/source/inputproto/modularize b/patches/source/inputproto/modularize
new file mode 100644
index 000000000..8a28ed93e
--- /dev/null
+++ b/patches/source/inputproto/modularize
@@ -0,0 +1,279 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+dri3proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glamor-egl
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXpresent
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+libxshmfence
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+presentproto
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-errors
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-amdgpu
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/inputproto/noarch b/patches/source/inputproto/noarch
new file mode 100644
index 000000000..8785ee527
--- /dev/null
+++ b/patches/source/inputproto/noarch
@@ -0,0 +1,75 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/inputproto/package-blacklist b/patches/source/inputproto/package-blacklist
new file mode 100644
index 000000000..603b8c31f
--- /dev/null
+++ b/patches/source/inputproto/package-blacklist
@@ -0,0 +1,44 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+xf86-video-modesetting
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/inputproto/slack-desc/inputproto b/patches/source/inputproto/slack-desc/inputproto
new file mode 100644
index 000000000..d5e586792
--- /dev/null
+++ b/patches/source/inputproto/slack-desc/inputproto
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+inputproto: inputproto (C prototypes for X Input extension)
+inputproto:
+inputproto: inputproto is part of X11.
+inputproto:
+inputproto: For more information about the X.Org Foundation (the providers of the
+inputproto: X.Org implementation of the X Window System), see their website:
+inputproto:
+inputproto: http://www.x.org
+inputproto:
+inputproto:
+inputproto:
diff --git a/patches/source/inputproto/x11.SlackBuild b/patches/source/inputproto/x11.SlackBuild
new file mode 100755
index 000000000..c3887dff2
--- /dev/null
+++ b/patches/source/inputproto/x11.SlackBuild
@@ -0,0 +1,381 @@
+#!/bin/sh
+# Copyright 2007-2014 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ chown -R root:root .
+ find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.*
+ )
+ done
+ )
+ fi
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+
+ # If there's a ChangeLog, installing at least part of the recent history
+ # is useful, but don't let it get totally out of control:
+ if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # Strip binaries:
+ ( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/irssi/doinst.sh b/patches/source/irssi/doinst.sh
new file mode 100644
index 000000000..197eddcef
--- /dev/null
+++ b/patches/source/irssi/doinst.sh
@@ -0,0 +1,12 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+config etc/irssi.conf.new
diff --git a/patches/source/irssi/irssi.SlackBuild b/patches/source/irssi/irssi.SlackBuild
new file mode 100755
index 000000000..f8b46e3dc
--- /dev/null
+++ b/patches/source/irssi/irssi.SlackBuild
@@ -0,0 +1,143 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2016, 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-irssi
+
+VERSION=${VERSION:-$(echo irssi-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+DIRCD=${VERSION}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf irssi-$VERSION
+tar xvf $CWD/irssi-$VERSION.tar.xz || exit 1
+cd irssi-$DIRCD
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 -o -perm 2777 -o -perm 2775 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --sysconfdir=/etc \
+ --docdir=/usr/doc/irssi-$VERSION \
+ --enable-true-color \
+ --with-textui \
+ --with-perl-lib=vendor \
+ --with-proxy \
+ --build=$ARCH-slackware-linux || exit 1
+
+make \
+ docdir=/usr/doc/irssi-$VERSION \
+ $NUMJOBS || make || exit 1
+make install \
+ docdir=/usr/doc/irssi-$VERSION \
+ DESTDIR=$PKG || exit 1
+
+# This removes our DESTDIR from the packlist filenames, to keep perl's
+# internal inventories consistent and correct.
+find $PKG -name .packlist | while read plist ; do
+ sed -e "s%$PKG%%g" \
+ -e "s%/share/man%/man%g" \
+ -re "s%\.([1-9]n?|3pm)$%&.gz%g # extend man filenames for .gz" \
+ ${plist} > ${plist}.new
+ mv -f ${plist}.new ${plist}
+done
+
+mv $PKG/etc/irssi.conf $PKG/etc/irssi.conf.new
+
+find $PKG -name perllocal.pod | xargs rm -f
+eval $(perl '-V:archlib') ; rmdir -p $PKG/$archlib 2> /dev/null
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Compress and if needed symlink the man pages:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+cp -a \
+ AUTHORS COPYING* INSTALL NEWS README* TODO \
+ $PKG/usr/doc/irssi-$VERSION
+( cd $PKG/usr/doc/irssi-$VERSION ; ln -sf /usr/share/irssi/help . )
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/irssi-$VERSION-$ARCH-$BUILD.txz
diff --git a/patches/source/irssi/slack-desc b/patches/source/irssi/slack-desc
new file mode 100644
index 000000000..2a0578921
--- /dev/null
+++ b/patches/source/irssi/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+irssi: irssi (Internet Relay Chat client)
+irssi:
+irssi: Irssi is an Internet Relay Chat client. Designed to be both secure
+irssi: and expandable, irssi is easily customized using modules and scripts.
+irssi:
+irssi: For more information, visit: http://irssi.org
+irssi:
+irssi: irssi was written by Timo Sirainen.
+irssi:
+irssi:
+irssi:
diff --git a/patches/source/jasper/jasper.SlackBuild b/patches/source/jasper/jasper.SlackBuild
new file mode 100755
index 000000000..f037f2af9
--- /dev/null
+++ b/patches/source/jasper/jasper.SlackBuild
@@ -0,0 +1,137 @@
+#!/bin/sh
+
+# Copyright 2007, 2008 Eric Hameleers, Eijdhoven, NL
+# Copyright 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+
+
+PKGNAM=jasper
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-4_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+case "$ARCH" in
+ i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+ ;;
+ s390) SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ ;;
+ powerpc) SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ ;;
+ x86_64) SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ ;;
+ athlon-xp) SLKCFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
+ LIBDIRSUFFIX=""
+ ;;
+ *) SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ ;;
+esac
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+cd $PKGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Taken from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=469786
+zcat $CWD/patches/jpc_dec.c.patch.gz | patch -p1 --verbose || exit 1
+
+# Taken from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=413041;msg=88
+zcat $CWD/patches/patch-libjasper-stepsizes-overflow.diff.gz | patch -p1 --verbose || exit 1
+
+# Apply security fixes - taken from fedora
+zcat $CWD/patches/jasper-1.900.1-CVE-2008-3520.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/jasper-1.900.1-CVE-2008-3522.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/jasper-1.900.1-CVE-2011-4516-CVE-2011-4517-CERT-VU-887409.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/jasper-CVE-2014-8138.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/jasper-CVE-2014-8157.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/jasper-CVE-2014-8158.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/jasper-CVE-2014-8137.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/jasper-CVE-2014-9029.patch.gz | patch -p1 --verbose || exit 1
+
+# Apply fixes for issues discovered by coverity - taken from fedora
+zcat $CWD/patches/jasper-1.900.1-Coverity-BAD_SIZEOF.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/jasper-1.900.1-Coverity-CHECKED_RETURN.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/jasper-1.900.1-Coverity-FORWARD_NULL.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/jasper-1.900.1-Coverity-NULL_RETURNS.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/jasper-1.900.1-Coverity-RESOURCE_LEAKS.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/jasper-1.900.1-Coverity-UNREACHABLE.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/jasper-1.900.1-Coverity-UNUSED_VALUE.patch.gz | patch -p1 --verbose || exit 1
+
+CFLAGS="$SLKCFLAGS -fno-strict-overflow" \
+CXXFLAGS="$SLKCFLAGS -fno-strict-overflow" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --enable-shared \
+ --disable-static \
+ --program-prefix= \
+ --program-suffix= \
+ --build=$ARCH-slackware-linux
+
+make || exit 1
+make DESTDIR=$PKG install
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ COPYRIGHT INSTALL LICENSE NEWS README \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+find $PKG/usr/doc -type f -exec chmod 644 {} \;
+
+find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
+for i in $(find $PKG/usr/man -type l -name "*.?") ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/${PKGNAM}-${VERSION}-${ARCH}-${BUILD}.txz
+
diff --git a/patches/source/jasper/patches/jasper-1.900.1-CVE-2008-3520.patch b/patches/source/jasper/patches/jasper-1.900.1-CVE-2008-3520.patch
new file mode 100644
index 000000000..0f5e3b746
--- /dev/null
+++ b/patches/source/jasper/patches/jasper-1.900.1-CVE-2008-3520.patch
@@ -0,0 +1,928 @@
+https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2008-3520
+
+OpenBSD jas_malloc hardening patches
+
+diff -pruN jasper-1.900.1.orig/src/libjasper/base/jas_cm.c jasper-1.900.1/src/libjasper/base/jas_cm.c
+--- jasper-1.900.1.orig/src/libjasper/base/jas_cm.c 2007-01-19 22:43:05.000000000 +0100
++++ jasper-1.900.1/src/libjasper/base/jas_cm.c 2009-10-22 10:27:45.000000000 +0200
+@@ -704,8 +704,7 @@ static int jas_cmpxformseq_resize(jas_cm
+ {
+ jas_cmpxform_t **p;
+ assert(n >= pxformseq->numpxforms);
+- p = (!pxformseq->pxforms) ? jas_malloc(n * sizeof(jas_cmpxform_t *)) :
+- jas_realloc(pxformseq->pxforms, n * sizeof(jas_cmpxform_t *));
++ p = jas_realloc2(pxformseq->pxforms, n, sizeof(jas_cmpxform_t *));
+ if (!p) {
+ return -1;
+ }
+@@ -889,13 +888,13 @@ static int jas_cmshapmatlut_set(jas_cmsh
+ jas_cmshapmatlut_cleanup(lut);
+ if (curv->numents == 0) {
+ lut->size = 2;
+- if (!(lut->data = jas_malloc(lut->size * sizeof(jas_cmreal_t))))
++ if (!(lut->data = jas_alloc2(lut->size, sizeof(jas_cmreal_t))))
+ goto error;
+ lut->data[0] = 0.0;
+ lut->data[1] = 1.0;
+ } else if (curv->numents == 1) {
+ lut->size = 256;
+- if (!(lut->data = jas_malloc(lut->size * sizeof(jas_cmreal_t))))
++ if (!(lut->data = jas_alloc2(lut->size, sizeof(jas_cmreal_t))))
+ goto error;
+ gamma = curv->ents[0] / 256.0;
+ for (i = 0; i < lut->size; ++i) {
+@@ -903,7 +902,7 @@ static int jas_cmshapmatlut_set(jas_cmsh
+ }
+ } else {
+ lut->size = curv->numents;
+- if (!(lut->data = jas_malloc(lut->size * sizeof(jas_cmreal_t))))
++ if (!(lut->data = jas_alloc2(lut->size, sizeof(jas_cmreal_t))))
+ goto error;
+ for (i = 0; i < lut->size; ++i) {
+ lut->data[i] = curv->ents[i] / 65535.0;
+@@ -953,7 +952,7 @@ static int jas_cmshapmatlut_invert(jas_c
+ return -1;
+ }
+ }
+- if (!(invlut->data = jas_malloc(n * sizeof(jas_cmreal_t))))
++ if (!(invlut->data = jas_alloc2(n, sizeof(jas_cmreal_t))))
+ return -1;
+ invlut->size = n;
+ for (i = 0; i < invlut->size; ++i) {
+diff -pruN jasper-1.900.1.orig/src/libjasper/base/jas_icc.c jasper-1.900.1/src/libjasper/base/jas_icc.c
+--- jasper-1.900.1.orig/src/libjasper/base/jas_icc.c 2007-01-19 22:43:05.000000000 +0100
++++ jasper-1.900.1/src/libjasper/base/jas_icc.c 2009-10-22 10:27:45.000000000 +0200
+@@ -373,7 +373,7 @@ int jas_iccprof_save(jas_iccprof_t *prof
+ jas_icctagtab_t *tagtab;
+
+ tagtab = &prof->tagtab;
+- if (!(tagtab->ents = jas_malloc(prof->attrtab->numattrs *
++ if (!(tagtab->ents = jas_alloc2(prof->attrtab->numattrs,
+ sizeof(jas_icctagtabent_t))))
+ goto error;
+ tagtab->numents = prof->attrtab->numattrs;
+@@ -522,7 +522,7 @@ static int jas_iccprof_gettagtab(jas_str
+ }
+ if (jas_iccgetuint32(in, &tagtab->numents))
+ goto error;
+- if (!(tagtab->ents = jas_malloc(tagtab->numents *
++ if (!(tagtab->ents = jas_alloc2(tagtab->numents,
+ sizeof(jas_icctagtabent_t))))
+ goto error;
+ tagtabent = tagtab->ents;
+@@ -743,8 +743,7 @@ static int jas_iccattrtab_resize(jas_icc
+ {
+ jas_iccattr_t *newattrs;
+ assert(maxents >= tab->numattrs);
+- newattrs = tab->attrs ? jas_realloc(tab->attrs, maxents *
+- sizeof(jas_iccattr_t)) : jas_malloc(maxents * sizeof(jas_iccattr_t));
++ newattrs = jas_realloc2(tab->attrs, maxents, sizeof(jas_iccattr_t));
+ if (!newattrs)
+ return -1;
+ tab->attrs = newattrs;
+@@ -999,7 +998,7 @@ static int jas_icccurv_input(jas_iccattr
+
+ if (jas_iccgetuint32(in, &curv->numents))
+ goto error;
+- if (!(curv->ents = jas_malloc(curv->numents * sizeof(jas_iccuint16_t))))
++ if (!(curv->ents = jas_alloc2(curv->numents, sizeof(jas_iccuint16_t))))
+ goto error;
+ for (i = 0; i < curv->numents; ++i) {
+ if (jas_iccgetuint16(in, &curv->ents[i]))
+@@ -1100,7 +1099,7 @@ static int jas_icctxtdesc_input(jas_icca
+ if (jas_iccgetuint32(in, &txtdesc->uclangcode) ||
+ jas_iccgetuint32(in, &txtdesc->uclen))
+ goto error;
+- if (!(txtdesc->ucdata = jas_malloc(txtdesc->uclen * 2)))
++ if (!(txtdesc->ucdata = jas_alloc2(txtdesc->uclen, 2)))
+ goto error;
+ if (jas_stream_read(in, txtdesc->ucdata, txtdesc->uclen * 2) !=
+ JAS_CAST(int, txtdesc->uclen * 2))
+@@ -1292,17 +1291,17 @@ static int jas_icclut8_input(jas_iccattr
+ jas_iccgetuint16(in, &lut8->numouttabents))
+ goto error;
+ clutsize = jas_iccpowi(lut8->clutlen, lut8->numinchans) * lut8->numoutchans;
+- if (!(lut8->clut = jas_malloc(clutsize * sizeof(jas_iccuint8_t))) ||
+- !(lut8->intabsbuf = jas_malloc(lut8->numinchans *
+- lut8->numintabents * sizeof(jas_iccuint8_t))) ||
+- !(lut8->intabs = jas_malloc(lut8->numinchans *
++ if (!(lut8->clut = jas_alloc2(clutsize, sizeof(jas_iccuint8_t))) ||
++ !(lut8->intabsbuf = jas_alloc3(lut8->numinchans,
++ lut8->numintabents, sizeof(jas_iccuint8_t))) ||
++ !(lut8->intabs = jas_alloc2(lut8->numinchans,
+ sizeof(jas_iccuint8_t *))))
+ goto error;
+ for (i = 0; i < lut8->numinchans; ++i)
+ lut8->intabs[i] = &lut8->intabsbuf[i * lut8->numintabents];
+- if (!(lut8->outtabsbuf = jas_malloc(lut8->numoutchans *
+- lut8->numouttabents * sizeof(jas_iccuint8_t))) ||
+- !(lut8->outtabs = jas_malloc(lut8->numoutchans *
++ if (!(lut8->outtabsbuf = jas_alloc3(lut8->numoutchans,
++ lut8->numouttabents, sizeof(jas_iccuint8_t))) ||
++ !(lut8->outtabs = jas_alloc2(lut8->numoutchans,
+ sizeof(jas_iccuint8_t *))))
+ goto error;
+ for (i = 0; i < lut8->numoutchans; ++i)
+@@ -1461,17 +1460,17 @@ static int jas_icclut16_input(jas_iccatt
+ jas_iccgetuint16(in, &lut16->numouttabents))
+ goto error;
+ clutsize = jas_iccpowi(lut16->clutlen, lut16->numinchans) * lut16->numoutchans;
+- if (!(lut16->clut = jas_malloc(clutsize * sizeof(jas_iccuint16_t))) ||
+- !(lut16->intabsbuf = jas_malloc(lut16->numinchans *
+- lut16->numintabents * sizeof(jas_iccuint16_t))) ||
+- !(lut16->intabs = jas_malloc(lut16->numinchans *
++ if (!(lut16->clut = jas_alloc2(clutsize, sizeof(jas_iccuint16_t))) ||
++ !(lut16->intabsbuf = jas_alloc3(lut16->numinchans,
++ lut16->numintabents, sizeof(jas_iccuint16_t))) ||
++ !(lut16->intabs = jas_alloc2(lut16->numinchans,
+ sizeof(jas_iccuint16_t *))))
+ goto error;
+ for (i = 0; i < lut16->numinchans; ++i)
+ lut16->intabs[i] = &lut16->intabsbuf[i * lut16->numintabents];
+- if (!(lut16->outtabsbuf = jas_malloc(lut16->numoutchans *
+- lut16->numouttabents * sizeof(jas_iccuint16_t))) ||
+- !(lut16->outtabs = jas_malloc(lut16->numoutchans *
++ if (!(lut16->outtabsbuf = jas_alloc3(lut16->numoutchans,
++ lut16->numouttabents, sizeof(jas_iccuint16_t))) ||
++ !(lut16->outtabs = jas_alloc2(lut16->numoutchans,
+ sizeof(jas_iccuint16_t *))))
+ goto error;
+ for (i = 0; i < lut16->numoutchans; ++i)
+diff -pruN jasper-1.900.1.orig/src/libjasper/base/jas_image.c jasper-1.900.1/src/libjasper/base/jas_image.c
+--- jasper-1.900.1.orig/src/libjasper/base/jas_image.c 2007-01-19 22:43:05.000000000 +0100
++++ jasper-1.900.1/src/libjasper/base/jas_image.c 2009-10-22 10:27:45.000000000 +0200
+@@ -142,7 +142,7 @@ jas_image_t *jas_image_create(int numcmp
+ image->inmem_ = true;
+
+ /* Allocate memory for the per-component information. */
+- if (!(image->cmpts_ = jas_malloc(image->maxcmpts_ *
++ if (!(image->cmpts_ = jas_alloc2(image->maxcmpts_,
+ sizeof(jas_image_cmpt_t *)))) {
+ jas_image_destroy(image);
+ return 0;
+@@ -774,8 +774,7 @@ static int jas_image_growcmpts(jas_image
+ jas_image_cmpt_t **newcmpts;
+ int cmptno;
+
+- newcmpts = (!image->cmpts_) ? jas_malloc(maxcmpts * sizeof(jas_image_cmpt_t *)) :
+- jas_realloc(image->cmpts_, maxcmpts * sizeof(jas_image_cmpt_t *));
++ newcmpts = jas_realloc2(image->cmpts_, maxcmpts, sizeof(jas_image_cmpt_t *));
+ if (!newcmpts) {
+ return -1;
+ }
+diff -pruN jasper-1.900.1.orig/src/libjasper/base/jas_malloc.c jasper-1.900.1/src/libjasper/base/jas_malloc.c
+--- jasper-1.900.1.orig/src/libjasper/base/jas_malloc.c 2007-01-19 22:43:05.000000000 +0100
++++ jasper-1.900.1/src/libjasper/base/jas_malloc.c 2009-10-22 10:27:45.000000000 +0200
+@@ -76,6 +76,9 @@
+
+ /* We need the prototype for memset. */
+ #include <string.h>
++#include <limits.h>
++#include <errno.h>
++#include <stdint.h>
+
+ #include "jasper/jas_malloc.h"
+
+@@ -113,18 +116,50 @@ void jas_free(void *ptr)
+
+ void *jas_realloc(void *ptr, size_t size)
+ {
+- return realloc(ptr, size);
++ return ptr ? realloc(ptr, size) : malloc(size);
+ }
+
+-void *jas_calloc(size_t nmemb, size_t size)
++void *jas_realloc2(void *ptr, size_t nmemb, size_t size)
++{
++ if (!ptr)
++ return jas_alloc2(nmemb, size);
++ if (nmemb && SIZE_MAX / nmemb < size) {
++ errno = ENOMEM;
++ return NULL;
++ }
++ return jas_realloc(ptr, nmemb * size);
++
++}
++
++void *jas_alloc2(size_t nmemb, size_t size)
++{
++ if (nmemb && SIZE_MAX / nmemb < size) {
++ errno = ENOMEM;
++ return NULL;
++ }
++
++ return jas_malloc(nmemb * size);
++}
++
++void *jas_alloc3(size_t a, size_t b, size_t c)
+ {
+- void *ptr;
+ size_t n;
+- n = nmemb * size;
+- if (!(ptr = jas_malloc(n * sizeof(char)))) {
+- return 0;
++
++ if (a && SIZE_MAX / a < b) {
++ errno = ENOMEM;
++ return NULL;
+ }
+- memset(ptr, 0, n);
++
++ return jas_alloc2(a*b, c);
++}
++
++void *jas_calloc(size_t nmemb, size_t size)
++{
++ void *ptr;
++
++ ptr = jas_alloc2(nmemb, size);
++ if (ptr)
++ memset(ptr, 0, nmemb*size);
+ return ptr;
+ }
+
+diff -pruN jasper-1.900.1.orig/src/libjasper/base/jas_seq.c jasper-1.900.1/src/libjasper/base/jas_seq.c
+--- jasper-1.900.1.orig/src/libjasper/base/jas_seq.c 2007-01-19 22:43:05.000000000 +0100
++++ jasper-1.900.1/src/libjasper/base/jas_seq.c 2009-10-22 10:27:45.000000000 +0200
+@@ -114,7 +114,7 @@ jas_matrix_t *jas_matrix_create(int numr
+ matrix->datasize_ = numrows * numcols;
+
+ if (matrix->maxrows_ > 0) {
+- if (!(matrix->rows_ = jas_malloc(matrix->maxrows_ *
++ if (!(matrix->rows_ = jas_alloc2(matrix->maxrows_,
+ sizeof(jas_seqent_t *)))) {
+ jas_matrix_destroy(matrix);
+ return 0;
+@@ -122,7 +122,7 @@ jas_matrix_t *jas_matrix_create(int numr
+ }
+
+ if (matrix->datasize_ > 0) {
+- if (!(matrix->data_ = jas_malloc(matrix->datasize_ *
++ if (!(matrix->data_ = jas_alloc2(matrix->datasize_,
+ sizeof(jas_seqent_t)))) {
+ jas_matrix_destroy(matrix);
+ return 0;
+@@ -220,7 +220,7 @@ void jas_matrix_bindsub(jas_matrix_t *ma
+ mat0->numrows_ = r1 - r0 + 1;
+ mat0->numcols_ = c1 - c0 + 1;
+ mat0->maxrows_ = mat0->numrows_;
+- mat0->rows_ = jas_malloc(mat0->maxrows_ * sizeof(jas_seqent_t *));
++ mat0->rows_ = jas_alloc2(mat0->maxrows_, sizeof(jas_seqent_t *));
+ for (i = 0; i < mat0->numrows_; ++i) {
+ mat0->rows_[i] = mat1->rows_[r0 + i] + c0;
+ }
+diff -pruN jasper-1.900.1.orig/src/libjasper/base/jas_stream.c jasper-1.900.1/src/libjasper/base/jas_stream.c
+--- jasper-1.900.1.orig/src/libjasper/base/jas_stream.c 2007-01-19 22:43:05.000000000 +0100
++++ jasper-1.900.1/src/libjasper/base/jas_stream.c 2009-10-22 10:27:45.000000000 +0200
+@@ -212,7 +212,7 @@ jas_stream_t *jas_stream_memopen(char *b
+ if (buf) {
+ obj->buf_ = (unsigned char *) buf;
+ } else {
+- obj->buf_ = jas_malloc(obj->bufsize_ * sizeof(char));
++ obj->buf_ = jas_malloc(obj->bufsize_);
+ obj->myalloc_ = 1;
+ }
+ if (!obj->buf_) {
+@@ -992,7 +992,7 @@ static int mem_resize(jas_stream_memobj_
+ unsigned char *buf;
+
+ assert(m->buf_);
+- if (!(buf = jas_realloc(m->buf_, bufsize * sizeof(unsigned char)))) {
++ if (!(buf = jas_realloc(m->buf_, bufsize))) {
+ return -1;
+ }
+ m->buf_ = buf;
+diff -pruN jasper-1.900.1.orig/src/libjasper/bmp/bmp_dec.c jasper-1.900.1/src/libjasper/bmp/bmp_dec.c
+--- jasper-1.900.1.orig/src/libjasper/bmp/bmp_dec.c 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/bmp/bmp_dec.c 2009-10-22 10:27:45.000000000 +0200
+@@ -283,7 +283,7 @@ static bmp_info_t *bmp_getinfo(jas_strea
+ }
+
+ if (info->numcolors > 0) {
+- if (!(info->palents = jas_malloc(info->numcolors *
++ if (!(info->palents = jas_alloc2(info->numcolors,
+ sizeof(bmp_palent_t)))) {
+ bmp_info_destroy(info);
+ return 0;
+diff -pruN jasper-1.900.1.orig/src/libjasper/include/jasper/jas_malloc.h jasper-1.900.1/src/libjasper/include/jasper/jas_malloc.h
+--- jasper-1.900.1.orig/src/libjasper/include/jasper/jas_malloc.h 2007-01-19 22:43:04.000000000 +0100
++++ jasper-1.900.1/src/libjasper/include/jasper/jas_malloc.h 2009-10-22 10:27:45.000000000 +0200
+@@ -95,6 +95,9 @@ extern "C" {
+ #define jas_free MEMFREE
+ #define jas_realloc MEMREALLOC
+ #define jas_calloc MEMCALLOC
++#define jas_alloc2(a, b) MEMALLOC((a)*(b))
++#define jas_alloc3(a, b, c) MEMALLOC((a)*(b)*(c))
++#define jas_realloc2(p, a, b) MEMREALLOC((p), (a)*(b))
+ #endif
+
+ /******************************************************************************\
+@@ -115,6 +118,12 @@ void *jas_realloc(void *ptr, size_t size
+ /* Allocate a block of memory and initialize the contents to zero. */
+ void *jas_calloc(size_t nmemb, size_t size);
+
++/* size-checked double allocation .*/
++void *jas_alloc2(size_t, size_t);
++
++void *jas_alloc3(size_t, size_t, size_t);
++
++void *jas_realloc2(void *, size_t, size_t);
+ #endif
+
+ #ifdef __cplusplus
+diff -pruN jasper-1.900.1.orig/src/libjasper/jp2/jp2_cod.c jasper-1.900.1/src/libjasper/jp2/jp2_cod.c
+--- jasper-1.900.1.orig/src/libjasper/jp2/jp2_cod.c 2007-01-19 22:43:05.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jp2/jp2_cod.c 2009-10-22 10:30:24.000000000 +0200
+@@ -247,7 +247,7 @@ jp2_box_t *jp2_box_get(jas_stream_t *in)
+ box = 0;
+ tmpstream = 0;
+
+- if (!(box = jas_malloc(sizeof(jp2_box_t)))) {
++ if (!(box = jas_calloc(1, sizeof(jp2_box_t)))) {
+ goto error;
+ }
+ box->ops = &jp2_boxinfo_unk.ops;
+@@ -372,7 +372,7 @@ static int jp2_bpcc_getdata(jp2_box_t *b
+ jp2_bpcc_t *bpcc = &box->data.bpcc;
+ unsigned int i;
+ bpcc->numcmpts = box->datalen;
+- if (!(bpcc->bpcs = jas_malloc(bpcc->numcmpts * sizeof(uint_fast8_t)))) {
++ if (!(bpcc->bpcs = jas_alloc2(bpcc->numcmpts, sizeof(uint_fast8_t)))) {
+ return -1;
+ }
+ for (i = 0; i < bpcc->numcmpts; ++i) {
+@@ -416,7 +416,7 @@ static int jp2_colr_getdata(jp2_box_t *b
+ break;
+ case JP2_COLR_ICC:
+ colr->iccplen = box->datalen - 3;
+- if (!(colr->iccp = jas_malloc(colr->iccplen * sizeof(uint_fast8_t)))) {
++ if (!(colr->iccp = jas_alloc2(colr->iccplen, sizeof(uint_fast8_t)))) {
+ return -1;
+ }
+ if (jas_stream_read(in, colr->iccp, colr->iccplen) != colr->iccplen) {
+@@ -453,7 +453,7 @@ static int jp2_cdef_getdata(jp2_box_t *b
+ if (jp2_getuint16(in, &cdef->numchans)) {
+ return -1;
+ }
+- if (!(cdef->ents = jas_malloc(cdef->numchans * sizeof(jp2_cdefchan_t)))) {
++ if (!(cdef->ents = jas_alloc2(cdef->numchans, sizeof(jp2_cdefchan_t)))) {
+ return -1;
+ }
+ for (channo = 0; channo < cdef->numchans; ++channo) {
+@@ -766,7 +766,7 @@ static int jp2_cmap_getdata(jp2_box_t *b
+ unsigned int i;
+
+ cmap->numchans = (box->datalen) / 4;
+- if (!(cmap->ents = jas_malloc(cmap->numchans * sizeof(jp2_cmapent_t)))) {
++ if (!(cmap->ents = jas_alloc2(cmap->numchans, sizeof(jp2_cmapent_t)))) {
+ return -1;
+ }
+ for (i = 0; i < cmap->numchans; ++i) {
+@@ -828,10 +828,10 @@ static int jp2_pclr_getdata(jp2_box_t *b
+ return -1;
+ }
+ lutsize = pclr->numlutents * pclr->numchans;
+- if (!(pclr->lutdata = jas_malloc(lutsize * sizeof(int_fast32_t)))) {
++ if (!(pclr->lutdata = jas_alloc2(lutsize, sizeof(int_fast32_t)))) {
+ return -1;
+ }
+- if (!(pclr->bpc = jas_malloc(pclr->numchans * sizeof(uint_fast8_t)))) {
++ if (!(pclr->bpc = jas_alloc2(pclr->numchans, sizeof(uint_fast8_t)))) {
+ return -1;
+ }
+ for (i = 0; i < pclr->numchans; ++i) {
+diff -pruN jasper-1.900.1.orig/src/libjasper/jp2/jp2_dec.c jasper-1.900.1/src/libjasper/jp2/jp2_dec.c
+--- jasper-1.900.1.orig/src/libjasper/jp2/jp2_dec.c 2007-01-19 22:43:05.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jp2/jp2_dec.c 2009-10-22 10:27:45.000000000 +0200
+@@ -336,7 +336,7 @@ jas_image_t *jp2_decode(jas_stream_t *in
+ }
+
+ /* Allocate space for the channel-number to component-number LUT. */
+- if (!(dec->chantocmptlut = jas_malloc(dec->numchans * sizeof(uint_fast16_t)))) {
++ if (!(dec->chantocmptlut = jas_alloc2(dec->numchans, sizeof(uint_fast16_t)))) {
+ jas_eprintf("error: no memory\n");
+ goto error;
+ }
+@@ -354,7 +354,7 @@ jas_image_t *jp2_decode(jas_stream_t *in
+ if (cmapent->map == JP2_CMAP_DIRECT) {
+ dec->chantocmptlut[channo] = channo;
+ } else if (cmapent->map == JP2_CMAP_PALETTE) {
+- lutents = jas_malloc(pclrd->numlutents * sizeof(int_fast32_t));
++ lutents = jas_alloc2(pclrd->numlutents, sizeof(int_fast32_t));
+ for (i = 0; i < pclrd->numlutents; ++i) {
+ lutents[i] = pclrd->lutdata[cmapent->pcol + i * pclrd->numchans];
+ }
+diff -pruN jasper-1.900.1.orig/src/libjasper/jp2/jp2_enc.c jasper-1.900.1/src/libjasper/jp2/jp2_enc.c
+--- jasper-1.900.1.orig/src/libjasper/jp2/jp2_enc.c 2007-01-19 22:43:05.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jp2/jp2_enc.c 2009-10-22 10:27:45.000000000 +0200
+@@ -191,7 +191,7 @@ int sgnd;
+ }
+ bpcc = &box->data.bpcc;
+ bpcc->numcmpts = jas_image_numcmpts(image);
+- if (!(bpcc->bpcs = jas_malloc(bpcc->numcmpts *
++ if (!(bpcc->bpcs = jas_alloc2(bpcc->numcmpts,
+ sizeof(uint_fast8_t)))) {
+ goto error;
+ }
+@@ -285,7 +285,7 @@ int sgnd;
+ }
+ cdef = &box->data.cdef;
+ cdef->numchans = jas_image_numcmpts(image);
+- cdef->ents = jas_malloc(cdef->numchans * sizeof(jp2_cdefchan_t));
++ cdef->ents = jas_alloc2(cdef->numchans, sizeof(jp2_cdefchan_t));
+ for (i = 0; i < jas_image_numcmpts(image); ++i) {
+ cdefchanent = &cdef->ents[i];
+ cdefchanent->channo = i;
+diff -pruN jasper-1.900.1.orig/src/libjasper/jpc/jpc_cs.c jasper-1.900.1/src/libjasper/jpc/jpc_cs.c
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_cs.c 2009-10-22 09:58:16.000000000 +0200
++++ jasper-1.900.1/src/libjasper/jpc/jpc_cs.c 2009-10-22 10:27:45.000000000 +0200
+@@ -502,7 +502,7 @@ static int jpc_siz_getparms(jpc_ms_t *ms
+ !siz->tileheight || !siz->numcomps) {
+ return -1;
+ }
+- if (!(siz->comps = jas_malloc(siz->numcomps * sizeof(jpc_sizcomp_t)))) {
++ if (!(siz->comps = jas_alloc2(siz->numcomps, sizeof(jpc_sizcomp_t)))) {
+ return -1;
+ }
+ for (i = 0; i < siz->numcomps; ++i) {
+@@ -986,7 +986,7 @@ static int jpc_qcx_getcompparms(jpc_qcxc
+ jpc_qcx_destroycompparms(compparms);
+ return -1;
+ } else if (compparms->numstepsizes > 0) {
+- compparms->stepsizes = jas_malloc(compparms->numstepsizes *
++ compparms->stepsizes = jas_alloc2(compparms->numstepsizes,
+ sizeof(uint_fast16_t));
+ assert(compparms->stepsizes);
+ for (i = 0; i < compparms->numstepsizes; ++i) {
+@@ -1094,7 +1094,7 @@ static int jpc_ppm_getparms(jpc_ms_t *ms
+
+ ppm->len = ms->len - 1;
+ if (ppm->len > 0) {
+- if (!(ppm->data = jas_malloc(ppm->len * sizeof(unsigned char)))) {
++ if (!(ppm->data = jas_malloc(ppm->len))) {
+ goto error;
+ }
+ if (JAS_CAST(uint, jas_stream_read(in, ppm->data, ppm->len)) != ppm->len) {
+@@ -1163,7 +1163,7 @@ static int jpc_ppt_getparms(jpc_ms_t *ms
+ }
+ ppt->len = ms->len - 1;
+ if (ppt->len > 0) {
+- if (!(ppt->data = jas_malloc(ppt->len * sizeof(unsigned char)))) {
++ if (!(ppt->data = jas_malloc(ppt->len))) {
+ goto error;
+ }
+ if (jas_stream_read(in, (char *) ppt->data, ppt->len) != JAS_CAST(int, ppt->len)) {
+@@ -1226,7 +1226,7 @@ static int jpc_poc_getparms(jpc_ms_t *ms
+ uint_fast8_t tmp;
+ poc->numpchgs = (cstate->numcomps > 256) ? (ms->len / 9) :
+ (ms->len / 7);
+- if (!(poc->pchgs = jas_malloc(poc->numpchgs * sizeof(jpc_pocpchg_t)))) {
++ if (!(poc->pchgs = jas_alloc2(poc->numpchgs, sizeof(jpc_pocpchg_t)))) {
+ goto error;
+ }
+ for (pchgno = 0, pchg = poc->pchgs; pchgno < poc->numpchgs; ++pchgno,
+@@ -1331,7 +1331,7 @@ static int jpc_crg_getparms(jpc_ms_t *ms
+ jpc_crgcomp_t *comp;
+ uint_fast16_t compno;
+ crg->numcomps = cstate->numcomps;
+- if (!(crg->comps = jas_malloc(cstate->numcomps * sizeof(uint_fast16_t)))) {
++ if (!(crg->comps = jas_alloc2(cstate->numcomps, sizeof(uint_fast16_t)))) {
+ return -1;
+ }
+ for (compno = 0, comp = crg->comps; compno < cstate->numcomps;
+@@ -1470,7 +1470,7 @@ static int jpc_unk_getparms(jpc_ms_t *ms
+ cstate = 0;
+
+ if (ms->len > 0) {
+- if (!(unk->data = jas_malloc(ms->len * sizeof(unsigned char)))) {
++ if (!(unk->data = jas_malloc(ms->len))) {
+ return -1;
+ }
+ if (jas_stream_read(in, (char *) unk->data, ms->len) != JAS_CAST(int, ms->len)) {
+diff -pruN jasper-1.900.1.orig/src/libjasper/jpc/jpc_dec.c jasper-1.900.1/src/libjasper/jpc/jpc_dec.c
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_dec.c 2009-10-22 09:58:16.000000000 +0200
++++ jasper-1.900.1/src/libjasper/jpc/jpc_dec.c 2009-10-22 10:30:50.000000000 +0200
+@@ -449,7 +449,7 @@ static int jpc_dec_process_sot(jpc_dec_t
+
+ if (dec->state == JPC_MH) {
+
+- compinfos = jas_malloc(dec->numcomps * sizeof(jas_image_cmptparm_t));
++ compinfos = jas_alloc2(dec->numcomps, sizeof(jas_image_cmptparm_t));
+ assert(compinfos);
+ for (cmptno = 0, cmpt = dec->cmpts, compinfo = compinfos;
+ cmptno < dec->numcomps; ++cmptno, ++cmpt, ++compinfo) {
+@@ -692,7 +692,7 @@ static int jpc_dec_tileinit(jpc_dec_t *d
+ tile->realmode = 1;
+ }
+ tcomp->numrlvls = ccp->numrlvls;
+- if (!(tcomp->rlvls = jas_malloc(tcomp->numrlvls *
++ if (!(tcomp->rlvls = jas_alloc2(tcomp->numrlvls,
+ sizeof(jpc_dec_rlvl_t)))) {
+ return -1;
+ }
+@@ -764,7 +764,7 @@ rlvl->bands = 0;
+ rlvl->cbgheightexpn);
+
+ rlvl->numbands = (!rlvlno) ? 1 : 3;
+- if (!(rlvl->bands = jas_malloc(rlvl->numbands *
++ if (!(rlvl->bands = jas_alloc2(rlvl->numbands,
+ sizeof(jpc_dec_band_t)))) {
+ return -1;
+ }
+@@ -797,7 +797,7 @@ rlvl->bands = 0;
+
+ assert(rlvl->numprcs);
+
+- if (!(band->prcs = jas_malloc(rlvl->numprcs * sizeof(jpc_dec_prc_t)))) {
++ if (!(band->prcs = jas_alloc2(rlvl->numprcs, sizeof(jpc_dec_prc_t)))) {
+ return -1;
+ }
+
+@@ -834,7 +834,7 @@ rlvl->bands = 0;
+ if (!(prc->numimsbstagtree = jpc_tagtree_create(prc->numhcblks, prc->numvcblks))) {
+ return -1;
+ }
+- if (!(prc->cblks = jas_malloc(prc->numcblks * sizeof(jpc_dec_cblk_t)))) {
++ if (!(prc->cblks = jas_alloc2(prc->numcblks, sizeof(jpc_dec_cblk_t)))) {
+ return -1;
+ }
+
+@@ -1181,7 +1181,7 @@ static int jpc_dec_process_siz(jpc_dec_t
+ return -1;
+ }
+
+- if (!(dec->cmpts = jas_malloc(dec->numcomps * sizeof(jpc_dec_cmpt_t)))) {
++ if (!(dec->cmpts = jas_alloc2(dec->numcomps, sizeof(jpc_dec_cmpt_t)))) {
+ return -1;
+ }
+
+@@ -1204,7 +1204,7 @@ static int jpc_dec_process_siz(jpc_dec_t
+ dec->numhtiles = JPC_CEILDIV(dec->xend - dec->tilexoff, dec->tilewidth);
+ dec->numvtiles = JPC_CEILDIV(dec->yend - dec->tileyoff, dec->tileheight);
+ dec->numtiles = dec->numhtiles * dec->numvtiles;
+- if (!(dec->tiles = jas_malloc(dec->numtiles * sizeof(jpc_dec_tile_t)))) {
++ if (!(dec->tiles = jas_calloc(dec->numtiles, sizeof(jpc_dec_tile_t)))) {
+ return -1;
+ }
+
+@@ -1228,7 +1228,7 @@ static int jpc_dec_process_siz(jpc_dec_t
+ tile->pkthdrstreampos = 0;
+ tile->pptstab = 0;
+ tile->cp = 0;
+- if (!(tile->tcomps = jas_malloc(dec->numcomps *
++ if (!(tile->tcomps = jas_calloc(dec->numcomps,
+ sizeof(jpc_dec_tcomp_t)))) {
+ return -1;
+ }
+@@ -1489,7 +1489,7 @@ static jpc_dec_cp_t *jpc_dec_cp_create(u
+ cp->numlyrs = 0;
+ cp->mctid = 0;
+ cp->csty = 0;
+- if (!(cp->ccps = jas_malloc(cp->numcomps * sizeof(jpc_dec_ccp_t)))) {
++ if (!(cp->ccps = jas_alloc2(cp->numcomps, sizeof(jpc_dec_ccp_t)))) {
+ return 0;
+ }
+ if (!(cp->pchglist = jpc_pchglist_create())) {
+@@ -2048,7 +2048,7 @@ jpc_streamlist_t *jpc_streamlist_create(
+ }
+ streamlist->numstreams = 0;
+ streamlist->maxstreams = 100;
+- if (!(streamlist->streams = jas_malloc(streamlist->maxstreams *
++ if (!(streamlist->streams = jas_alloc2(streamlist->maxstreams,
+ sizeof(jas_stream_t *)))) {
+ jas_free(streamlist);
+ return 0;
+@@ -2068,8 +2068,8 @@ int jpc_streamlist_insert(jpc_streamlist
+ /* Grow the array of streams if necessary. */
+ if (streamlist->numstreams >= streamlist->maxstreams) {
+ newmaxstreams = streamlist->maxstreams + 1024;
+- if (!(newstreams = jas_realloc(streamlist->streams,
+- (newmaxstreams + 1024) * sizeof(jas_stream_t *)))) {
++ if (!(newstreams = jas_realloc2(streamlist->streams,
++ (newmaxstreams + 1024), sizeof(jas_stream_t *)))) {
+ return -1;
+ }
+ for (i = streamlist->numstreams; i < streamlist->maxstreams; ++i) {
+@@ -2155,8 +2155,7 @@ int jpc_ppxstab_grow(jpc_ppxstab_t *tab,
+ {
+ jpc_ppxstabent_t **newents;
+ if (tab->maxents < maxents) {
+- newents = (tab->ents) ? jas_realloc(tab->ents, maxents *
+- sizeof(jpc_ppxstabent_t *)) : jas_malloc(maxents * sizeof(jpc_ppxstabent_t *));
++ newents = jas_realloc2(tab->ents, maxents, sizeof(jpc_ppxstabent_t *));
+ if (!newents) {
+ return -1;
+ }
+diff -pruN jasper-1.900.1.orig/src/libjasper/jpc/jpc_enc.c jasper-1.900.1/src/libjasper/jpc/jpc_enc.c
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_enc.c 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_enc.c 2009-10-22 10:27:45.000000000 +0200
+@@ -403,7 +403,7 @@ static jpc_enc_cp_t *cp_create(char *opt
+ vsteplcm *= jas_image_cmptvstep(image, cmptno);
+ }
+
+- if (!(cp->ccps = jas_malloc(cp->numcmpts * sizeof(jpc_enc_ccp_t)))) {
++ if (!(cp->ccps = jas_alloc2(cp->numcmpts, sizeof(jpc_enc_ccp_t)))) {
+ goto error;
+ }
+ for (cmptno = 0, ccp = cp->ccps; cmptno < JAS_CAST(int, cp->numcmpts); ++cmptno,
+@@ -656,7 +656,7 @@ static jpc_enc_cp_t *cp_create(char *opt
+
+ if (ilyrrates && numilyrrates > 0) {
+ tcp->numlyrs = numilyrrates + 1;
+- if (!(tcp->ilyrrates = jas_malloc((tcp->numlyrs - 1) *
++ if (!(tcp->ilyrrates = jas_alloc2((tcp->numlyrs - 1),
+ sizeof(jpc_fix_t)))) {
+ goto error;
+ }
+@@ -940,7 +940,7 @@ startoff = jas_stream_getrwcount(enc->ou
+ siz->tilewidth = cp->tilewidth;
+ siz->tileheight = cp->tileheight;
+ siz->numcomps = cp->numcmpts;
+- siz->comps = jas_malloc(siz->numcomps * sizeof(jpc_sizcomp_t));
++ siz->comps = jas_alloc2(siz->numcomps, sizeof(jpc_sizcomp_t));
+ assert(siz->comps);
+ for (i = 0; i < JAS_CAST(int, cp->numcmpts); ++i) {
+ siz->comps[i].prec = cp->ccps[i].prec;
+@@ -977,7 +977,7 @@ startoff = jas_stream_getrwcount(enc->ou
+ return -1;
+ }
+ crg = &enc->mrk->parms.crg;
+- crg->comps = jas_malloc(crg->numcomps * sizeof(jpc_crgcomp_t));
++ crg->comps = jas_alloc2(crg->numcomps, sizeof(jpc_crgcomp_t));
+ if (jpc_putms(enc->out, enc->cstate, enc->mrk)) {
+ jas_eprintf("cannot write CRG marker\n");
+ return -1;
+@@ -1955,7 +1955,7 @@ jpc_enc_tile_t *jpc_enc_tile_create(jpc_
+ tile->mctid = cp->tcp.mctid;
+
+ tile->numlyrs = cp->tcp.numlyrs;
+- if (!(tile->lyrsizes = jas_malloc(tile->numlyrs *
++ if (!(tile->lyrsizes = jas_alloc2(tile->numlyrs,
+ sizeof(uint_fast32_t)))) {
+ goto error;
+ }
+@@ -1964,7 +1964,7 @@ jpc_enc_tile_t *jpc_enc_tile_create(jpc_
+ }
+
+ /* Allocate an array for the per-tile-component information. */
+- if (!(tile->tcmpts = jas_malloc(cp->numcmpts * sizeof(jpc_enc_tcmpt_t)))) {
++ if (!(tile->tcmpts = jas_alloc2(cp->numcmpts, sizeof(jpc_enc_tcmpt_t)))) {
+ goto error;
+ }
+ /* Initialize a few members critical for error recovery. */
+@@ -2110,7 +2110,7 @@ static jpc_enc_tcmpt_t *tcmpt_create(jpc
+ jas_seq2d_ystart(tcmpt->data), jas_seq2d_xend(tcmpt->data),
+ jas_seq2d_yend(tcmpt->data), bandinfos);
+
+- if (!(tcmpt->rlvls = jas_malloc(tcmpt->numrlvls * sizeof(jpc_enc_rlvl_t)))) {
++ if (!(tcmpt->rlvls = jas_alloc2(tcmpt->numrlvls, sizeof(jpc_enc_rlvl_t)))) {
+ goto error;
+ }
+ for (rlvlno = 0, rlvl = tcmpt->rlvls; rlvlno < tcmpt->numrlvls;
+@@ -2213,7 +2213,7 @@ static jpc_enc_rlvl_t *rlvl_create(jpc_e
+ rlvl->numvprcs = JPC_FLOORDIVPOW2(brprcbry - tlprctly, rlvl->prcheightexpn);
+ rlvl->numprcs = rlvl->numhprcs * rlvl->numvprcs;
+
+- if (!(rlvl->bands = jas_malloc(rlvl->numbands * sizeof(jpc_enc_band_t)))) {
++ if (!(rlvl->bands = jas_alloc2(rlvl->numbands, sizeof(jpc_enc_band_t)))) {
+ goto error;
+ }
+ for (bandno = 0, band = rlvl->bands; bandno < rlvl->numbands;
+@@ -2290,7 +2290,7 @@ if (bandinfo->xstart != bandinfo->xend &
+ band->synweight = bandinfo->synenergywt;
+
+ if (band->data) {
+- if (!(band->prcs = jas_malloc(rlvl->numprcs * sizeof(jpc_enc_prc_t)))) {
++ if (!(band->prcs = jas_alloc2(rlvl->numprcs, sizeof(jpc_enc_prc_t)))) {
+ goto error;
+ }
+ for (prcno = 0, prc = band->prcs; prcno < rlvl->numprcs; ++prcno,
+@@ -2422,7 +2422,7 @@ if (!rlvlno) {
+ goto error;
+ }
+
+- if (!(prc->cblks = jas_malloc(prc->numcblks * sizeof(jpc_enc_cblk_t)))) {
++ if (!(prc->cblks = jas_alloc2(prc->numcblks, sizeof(jpc_enc_cblk_t)))) {
+ goto error;
+ }
+ for (cblkno = 0, cblk = prc->cblks; cblkno < prc->numcblks;
+diff -pruN jasper-1.900.1.orig/src/libjasper/jpc/jpc_mqdec.c jasper-1.900.1/src/libjasper/jpc/jpc_mqdec.c
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_mqdec.c 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_mqdec.c 2009-10-22 10:27:45.000000000 +0200
+@@ -118,7 +118,7 @@ jpc_mqdec_t *jpc_mqdec_create(int maxctx
+ mqdec->in = in;
+ mqdec->maxctxs = maxctxs;
+ /* Allocate memory for the per-context state information. */
+- if (!(mqdec->ctxs = jas_malloc(mqdec->maxctxs * sizeof(jpc_mqstate_t *)))) {
++ if (!(mqdec->ctxs = jas_alloc2(mqdec->maxctxs, sizeof(jpc_mqstate_t *)))) {
+ goto error;
+ }
+ /* Set the current context to the first context. */
+diff -pruN jasper-1.900.1.orig/src/libjasper/jpc/jpc_mqenc.c jasper-1.900.1/src/libjasper/jpc/jpc_mqenc.c
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_mqenc.c 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_mqenc.c 2009-10-22 10:27:45.000000000 +0200
+@@ -197,7 +197,7 @@ jpc_mqenc_t *jpc_mqenc_create(int maxctx
+ mqenc->maxctxs = maxctxs;
+
+ /* Allocate memory for the per-context state information. */
+- if (!(mqenc->ctxs = jas_malloc(mqenc->maxctxs * sizeof(jpc_mqstate_t *)))) {
++ if (!(mqenc->ctxs = jas_alloc2(mqenc->maxctxs, sizeof(jpc_mqstate_t *)))) {
+ goto error;
+ }
+
+diff -pruN jasper-1.900.1.orig/src/libjasper/jpc/jpc_qmfb.c jasper-1.900.1/src/libjasper/jpc/jpc_qmfb.c
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_qmfb.c 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_qmfb.c 2009-10-22 10:27:45.000000000 +0200
+@@ -321,7 +321,7 @@ void jpc_qmfb_split_row(jpc_fix_t *a, in
+ #if !defined(HAVE_VLA)
+ /* Get a buffer. */
+ if (bufsize > QMFB_SPLITBUFSIZE) {
+- if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) {
++ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
+ /* We have no choice but to commit suicide in this case. */
+ abort();
+ }
+@@ -389,7 +389,7 @@ void jpc_qmfb_split_col(jpc_fix_t *a, in
+ #if !defined(HAVE_VLA)
+ /* Get a buffer. */
+ if (bufsize > QMFB_SPLITBUFSIZE) {
+- if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) {
++ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
+ /* We have no choice but to commit suicide in this case. */
+ abort();
+ }
+@@ -460,7 +460,7 @@ void jpc_qmfb_split_colgrp(jpc_fix_t *a,
+ #if !defined(HAVE_VLA)
+ /* Get a buffer. */
+ if (bufsize > QMFB_SPLITBUFSIZE) {
+- if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) {
++ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
+ /* We have no choice but to commit suicide in this case. */
+ abort();
+ }
+@@ -549,7 +549,7 @@ void jpc_qmfb_split_colres(jpc_fix_t *a,
+ #if !defined(HAVE_VLA)
+ /* Get a buffer. */
+ if (bufsize > QMFB_SPLITBUFSIZE) {
+- if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) {
++ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
+ /* We have no choice but to commit suicide in this case. */
+ abort();
+ }
+@@ -633,7 +633,7 @@ void jpc_qmfb_join_row(jpc_fix_t *a, int
+ #if !defined(HAVE_VLA)
+ /* Allocate memory for the join buffer from the heap. */
+ if (bufsize > QMFB_JOINBUFSIZE) {
+- if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) {
++ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
+ /* We have no choice but to commit suicide. */
+ abort();
+ }
+@@ -698,7 +698,7 @@ void jpc_qmfb_join_col(jpc_fix_t *a, int
+ #if !defined(HAVE_VLA)
+ /* Allocate memory for the join buffer from the heap. */
+ if (bufsize > QMFB_JOINBUFSIZE) {
+- if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) {
++ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
+ /* We have no choice but to commit suicide. */
+ abort();
+ }
+@@ -766,7 +766,7 @@ void jpc_qmfb_join_colgrp(jpc_fix_t *a,
+ #if !defined(HAVE_VLA)
+ /* Allocate memory for the join buffer from the heap. */
+ if (bufsize > QMFB_JOINBUFSIZE) {
+- if (!(buf = jas_malloc(bufsize * JPC_QMFB_COLGRPSIZE * sizeof(jpc_fix_t)))) {
++ if (!(buf = jas_alloc2(bufsize, JPC_QMFB_COLGRPSIZE * sizeof(jpc_fix_t)))) {
+ /* We have no choice but to commit suicide. */
+ abort();
+ }
+@@ -852,7 +852,7 @@ void jpc_qmfb_join_colres(jpc_fix_t *a,
+ #if !defined(HAVE_VLA)
+ /* Allocate memory for the join buffer from the heap. */
+ if (bufsize > QMFB_JOINBUFSIZE) {
+- if (!(buf = jas_malloc(bufsize * numcols * sizeof(jpc_fix_t)))) {
++ if (!(buf = jas_alloc3(bufsize, numcols, sizeof(jpc_fix_t)))) {
+ /* We have no choice but to commit suicide. */
+ abort();
+ }
+diff -pruN jasper-1.900.1.orig/src/libjasper/jpc/jpc_t1enc.c jasper-1.900.1/src/libjasper/jpc/jpc_t1enc.c
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_t1enc.c 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_t1enc.c 2009-10-22 10:27:45.000000000 +0200
+@@ -219,7 +219,7 @@ int jpc_enc_enccblk(jpc_enc_t *enc, jas_
+
+ cblk->numpasses = (cblk->numbps > 0) ? (3 * cblk->numbps - 2) : 0;
+ if (cblk->numpasses > 0) {
+- cblk->passes = jas_malloc(cblk->numpasses * sizeof(jpc_enc_pass_t));
++ cblk->passes = jas_alloc2(cblk->numpasses, sizeof(jpc_enc_pass_t));
+ assert(cblk->passes);
+ } else {
+ cblk->passes = 0;
+diff -pruN jasper-1.900.1.orig/src/libjasper/jpc/jpc_t2cod.c jasper-1.900.1/src/libjasper/jpc/jpc_t2cod.c
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_t2cod.c 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_t2cod.c 2009-10-22 10:27:45.000000000 +0200
+@@ -573,7 +573,7 @@ int jpc_pchglist_insert(jpc_pchglist_t *
+ }
+ if (pchglist->numpchgs >= pchglist->maxpchgs) {
+ newmaxpchgs = pchglist->maxpchgs + 128;
+- if (!(newpchgs = jas_realloc(pchglist->pchgs, newmaxpchgs * sizeof(jpc_pchg_t *)))) {
++ if (!(newpchgs = jas_realloc2(pchglist->pchgs, newmaxpchgs, sizeof(jpc_pchg_t *)))) {
+ return -1;
+ }
+ pchglist->maxpchgs = newmaxpchgs;
+diff -pruN jasper-1.900.1.orig/src/libjasper/jpc/jpc_t2dec.c jasper-1.900.1/src/libjasper/jpc/jpc_t2dec.c
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_t2dec.c 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_t2dec.c 2009-10-22 10:27:45.000000000 +0200
+@@ -478,7 +478,7 @@ jpc_pi_t *jpc_dec_pi_create(jpc_dec_t *d
+ return 0;
+ }
+ pi->numcomps = dec->numcomps;
+- if (!(pi->picomps = jas_malloc(pi->numcomps * sizeof(jpc_picomp_t)))) {
++ if (!(pi->picomps = jas_alloc2(pi->numcomps, sizeof(jpc_picomp_t)))) {
+ jpc_pi_destroy(pi);
+ return 0;
+ }
+@@ -490,7 +490,7 @@ jpc_pi_t *jpc_dec_pi_create(jpc_dec_t *d
+ for (compno = 0, tcomp = tile->tcomps, picomp = pi->picomps;
+ compno < pi->numcomps; ++compno, ++tcomp, ++picomp) {
+ picomp->numrlvls = tcomp->numrlvls;
+- if (!(picomp->pirlvls = jas_malloc(picomp->numrlvls *
++ if (!(picomp->pirlvls = jas_alloc2(picomp->numrlvls,
+ sizeof(jpc_pirlvl_t)))) {
+ jpc_pi_destroy(pi);
+ return 0;
+@@ -503,7 +503,7 @@ jpc_pi_t *jpc_dec_pi_create(jpc_dec_t *d
+ rlvlno < picomp->numrlvls; ++rlvlno, ++pirlvl, ++rlvl) {
+ /* XXX sizeof(long) should be sizeof different type */
+ pirlvl->numprcs = rlvl->numprcs;
+- if (!(pirlvl->prclyrnos = jas_malloc(pirlvl->numprcs *
++ if (!(pirlvl->prclyrnos = jas_alloc2(pirlvl->numprcs,
+ sizeof(long)))) {
+ jpc_pi_destroy(pi);
+ return 0;
+diff -pruN jasper-1.900.1.orig/src/libjasper/jpc/jpc_t2enc.c jasper-1.900.1/src/libjasper/jpc/jpc_t2enc.c
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_t2enc.c 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_t2enc.c 2009-10-22 10:27:45.000000000 +0200
+@@ -565,7 +565,7 @@ jpc_pi_t *jpc_enc_pi_create(jpc_enc_cp_t
+ }
+ pi->pktno = -1;
+ pi->numcomps = cp->numcmpts;
+- if (!(pi->picomps = jas_malloc(pi->numcomps * sizeof(jpc_picomp_t)))) {
++ if (!(pi->picomps = jas_alloc2(pi->numcomps, sizeof(jpc_picomp_t)))) {
+ jpc_pi_destroy(pi);
+ return 0;
+ }
+@@ -577,7 +577,7 @@ jpc_pi_t *jpc_enc_pi_create(jpc_enc_cp_t
+ for (compno = 0, tcomp = tile->tcmpts, picomp = pi->picomps;
+ compno < pi->numcomps; ++compno, ++tcomp, ++picomp) {
+ picomp->numrlvls = tcomp->numrlvls;
+- if (!(picomp->pirlvls = jas_malloc(picomp->numrlvls *
++ if (!(picomp->pirlvls = jas_alloc2(picomp->numrlvls,
+ sizeof(jpc_pirlvl_t)))) {
+ jpc_pi_destroy(pi);
+ return 0;
+@@ -591,7 +591,7 @@ jpc_pi_t *jpc_enc_pi_create(jpc_enc_cp_t
+ /* XXX sizeof(long) should be sizeof different type */
+ pirlvl->numprcs = rlvl->numprcs;
+ if (rlvl->numprcs) {
+- if (!(pirlvl->prclyrnos = jas_malloc(pirlvl->numprcs *
++ if (!(pirlvl->prclyrnos = jas_alloc2(pirlvl->numprcs,
+ sizeof(long)))) {
+ jpc_pi_destroy(pi);
+ return 0;
+diff -pruN jasper-1.900.1.orig/src/libjasper/jpc/jpc_tagtree.c jasper-1.900.1/src/libjasper/jpc/jpc_tagtree.c
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_tagtree.c 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_tagtree.c 2009-10-22 10:27:45.000000000 +0200
+@@ -125,7 +125,7 @@ jpc_tagtree_t *jpc_tagtree_create(int nu
+ ++numlvls;
+ } while (n > 1);
+
+- if (!(tree->nodes_ = jas_malloc(tree->numnodes_ * sizeof(jpc_tagtreenode_t)))) {
++ if (!(tree->nodes_ = jas_alloc2(tree->numnodes_, sizeof(jpc_tagtreenode_t)))) {
+ return 0;
+ }
+
+diff -pruN jasper-1.900.1.orig/src/libjasper/jpc/jpc_util.c jasper-1.900.1/src/libjasper/jpc/jpc_util.c
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_util.c 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_util.c 2009-10-22 10:27:45.000000000 +0200
+@@ -109,7 +109,7 @@ int jpc_atoaf(char *s, int *numvalues, d
+ }
+
+ if (n) {
+- if (!(vs = jas_malloc(n * sizeof(double)))) {
++ if (!(vs = jas_alloc2(n, sizeof(double)))) {
+ return -1;
+ }
+
+diff -pruN jasper-1.900.1.orig/src/libjasper/mif/mif_cod.c jasper-1.900.1/src/libjasper/mif/mif_cod.c
+--- jasper-1.900.1.orig/src/libjasper/mif/mif_cod.c 2007-01-19 22:43:05.000000000 +0100
++++ jasper-1.900.1/src/libjasper/mif/mif_cod.c 2009-10-22 10:27:45.000000000 +0200
+@@ -438,8 +438,7 @@ static int mif_hdr_growcmpts(mif_hdr_t *
+ int cmptno;
+ mif_cmpt_t **newcmpts;
+ assert(maxcmpts >= hdr->numcmpts);
+- newcmpts = (!hdr->cmpts) ? jas_malloc(maxcmpts * sizeof(mif_cmpt_t *)) :
+- jas_realloc(hdr->cmpts, maxcmpts * sizeof(mif_cmpt_t *));
++ newcmpts = jas_realloc2(hdr->cmpts, maxcmpts, sizeof(mif_cmpt_t *));
+ if (!newcmpts) {
+ return -1;
+ }
diff --git a/patches/source/jasper/patches/jasper-1.900.1-CVE-2008-3522.patch b/patches/source/jasper/patches/jasper-1.900.1-CVE-2008-3522.patch
new file mode 100644
index 000000000..4bf2e9b52
--- /dev/null
+++ b/patches/source/jasper/patches/jasper-1.900.1-CVE-2008-3522.patch
@@ -0,0 +1,14 @@
+https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2008-3522
+
+diff -pruN jasper-1.900.1.orig/src/libjasper/base/jas_stream.c jasper-1.900.1/src/libjasper/base/jas_stream.c
+--- jasper-1.900.1.orig/src/libjasper/base/jas_stream.c 2009-10-22 10:27:45.000000000 +0200
++++ jasper-1.900.1/src/libjasper/base/jas_stream.c 2009-10-22 10:35:53.000000000 +0200
+@@ -553,7 +553,7 @@ int jas_stream_printf(jas_stream_t *stre
+ int ret;
+
+ va_start(ap, fmt);
+- ret = vsprintf(buf, fmt, ap);
++ ret = vsnprintf(buf, sizeof buf, fmt, ap);
+ jas_stream_puts(stream, buf);
+ va_end(ap);
+ return ret;
diff --git a/patches/source/jasper/patches/jasper-1.900.1-CVE-2011-4516-CVE-2011-4517-CERT-VU-887409.patch b/patches/source/jasper/patches/jasper-1.900.1-CVE-2011-4516-CVE-2011-4517-CERT-VU-887409.patch
new file mode 100644
index 000000000..f753080a3
--- /dev/null
+++ b/patches/source/jasper/patches/jasper-1.900.1-CVE-2011-4516-CVE-2011-4517-CERT-VU-887409.patch
@@ -0,0 +1,23 @@
+diff -up jasper-1.900.1/src/libjasper/jpc/jpc_cs.c.CERT-VU-887409 jasper-1.900.1/src/libjasper/jpc/jpc_cs.c
+--- jasper-1.900.1/src/libjasper/jpc/jpc_cs.c.CERT-VU-887409 2011-10-25 17:25:39.000000000 +0200
++++ jasper-1.900.1/src/libjasper/jpc/jpc_cs.c 2011-10-25 17:29:14.379371908 +0200
+@@ -744,6 +744,10 @@ static int jpc_cox_getcompparms(jpc_ms_t
+ return -1;
+ }
+ compparms->numrlvls = compparms->numdlvls + 1;
++ if (compparms->numrlvls > JPC_MAXRLVLS) {
++ jpc_cox_destroycompparms(compparms);
++ return -1;
++ }
+ if (prtflag) {
+ for (i = 0; i < compparms->numrlvls; ++i) {
+ if (jpc_getuint8(in, &tmp)) {
+@@ -1331,7 +1335,7 @@ static int jpc_crg_getparms(jpc_ms_t *ms
+ jpc_crgcomp_t *comp;
+ uint_fast16_t compno;
+ crg->numcomps = cstate->numcomps;
+- if (!(crg->comps = jas_alloc2(cstate->numcomps, sizeof(uint_fast16_t)))) {
++ if (!(crg->comps = jas_alloc2(cstate->numcomps, sizeof(jpc_crgcomp_t)))) {
+ return -1;
+ }
+ for (compno = 0, comp = crg->comps; compno < cstate->numcomps;
diff --git a/patches/source/jasper/patches/jasper-1.900.1-Coverity-BAD_SIZEOF.patch b/patches/source/jasper/patches/jasper-1.900.1-Coverity-BAD_SIZEOF.patch
new file mode 100644
index 000000000..197740057
--- /dev/null
+++ b/patches/source/jasper/patches/jasper-1.900.1-Coverity-BAD_SIZEOF.patch
@@ -0,0 +1,17 @@
+Error: BAD_SIZEOF
+jpc/jpc_enc.c:2105: bad_sizeof: Taking the size of binary expression "tcmpt->numstepsizes * sizeof (uint_fast16_t) /*8*/" is suspicious.
+ Did you intend "sizeof(tcmpt->numstepsizes) * sizeof (uint_fast16_t) /*8*/"?
+
+diff -up jasper-1.900.1/src/libjasper/jpc/jpc_enc.c.bad_sizeof jasper-1.900.1/src/libjasper/jpc/jpc_enc.c
+--- jasper-1.900.1/src/libjasper/jpc/jpc_enc.c.bad_sizeof 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_enc.c 2011-06-23 17:28:17.085690561 +0200
+@@ -2102,8 +2102,7 @@ static jpc_enc_tcmpt_t *tcmpt_create(jpc
+
+ tcmpt->numstepsizes = tcmpt->numbands;
+ assert(tcmpt->numstepsizes <= JPC_MAXBANDS);
+- memset(tcmpt->stepsizes, 0, sizeof(tcmpt->numstepsizes *
+- sizeof(uint_fast16_t)));
++ memset(tcmpt->stepsizes, 0, tcmpt->numstepsizes * sizeof(uint_fast16_t));
+
+ /* Retrieve information about the various bands. */
+ jpc_tsfb_getbands(tcmpt->tsfb, jas_seq2d_xstart(tcmpt->data),
diff --git a/patches/source/jasper/patches/jasper-1.900.1-Coverity-CHECKED_RETURN.patch b/patches/source/jasper/patches/jasper-1.900.1-Coverity-CHECKED_RETURN.patch
new file mode 100644
index 000000000..ea330f2c1
--- /dev/null
+++ b/patches/source/jasper/patches/jasper-1.900.1-Coverity-CHECKED_RETURN.patch
@@ -0,0 +1,141 @@
+Error: CHECKED_RETURN
+jpc/jpc_cs.c:924: check_return: Calling function "jpc_putuint16" without checking return value (as is done elsewhere 11 out of 13 times).
+jpc/jpc_cs.c:924: unchecked_value: No check of the return value of "jpc_putuint16(out, qcc->compno)".
+
+jpc/jpc_cs.c:1021: check_return: Calling function "jpc_putuint16" without checking return value (as is done elsewhere 11 out of 13 times).
+jpc/jpc_cs.c:1021: unchecked_value: No check of the return value of "jpc_putuint16(out, compparms->stepsizes[i])".
+
+jpc/jpc_cs.c:994: check_return: Calling function "jpc_getuint16" without checking return value (as is done elsewhere 14 out of 16 times).
+jpc/jpc_cs.c:994: unchecked_value: No check of the return value of "jpc_getuint16(in, compparms->stepsizes + i)".
+
+jpc/jpc_cs.c:905: check_return: Calling function "jpc_getuint16" without checking return value (as is done elsewhere 14 out of 16 times).
+jpc/jpc_cs.c:905: unchecked_value: No check of the return value of "jpc_getuint16(in, &qcc->compno)".
+
+jpc/jpc_cs.c:969: check_return: Calling function "jpc_getuint8" without checking return value (as is done elsewhere 17 out of 20 times).
+jpc/jpc_cs.c:969: unchecked_value: No check of the return value of "jpc_getuint8(in, &tmp)".
+
+jpc/jpc_cs.c:991: check_return: Calling function "jpc_getuint8" without checking return value (as is done elsewhere 17 out of 20 times).
+jpc/jpc_cs.c:991: unchecked_value: No check of the return value of "jpc_getuint8(in, &tmp)".
+
+jpc/jpc_cs.c:901: check_return: Calling function "jpc_getuint8" without checking return value (as is done elsewhere 17 out of 20 times).
+jpc/jpc_cs.c:901: unchecked_value: No check of the return value of "jpc_getuint8(in, &tmp)".
+
+jpc/jpc_t2enc.c:338: check_return: Calling function "jpc_putms" without checking return value (as is done elsewhere 12 out of 13 times).
+jpc/jpc_t2enc.c:338: unchecked_value: No check of the return value of "jpc_putms(out, enc->cstate, ms)".
+
+ras/ras_enc.c:245: check_return: Calling function "jas_image_readcmpt" without checking return value (as is done elsewhere 9 out of 10 times).
+ras/ras_enc.c:245: unchecked_value: No check of the return value of "jas_image_readcmpt(image, cmpts[i], 0L, y, image->brx_ - image->tlx_, 1L, data[i])".
+
+diff -up jasper-1.900.1/src/libjasper/jpc/jpc_cs.c.checked_return jasper-1.900.1/src/libjasper/jpc/jpc_cs.c
+--- jasper-1.900.1/src/libjasper/jpc/jpc_cs.c.checked_return 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_cs.c 2011-06-24 13:52:25.636551844 +0200
+@@ -898,11 +898,15 @@ static int jpc_qcc_getparms(jpc_ms_t *ms
+ int len;
+ len = ms->len;
+ if (cstate->numcomps <= 256) {
+- jpc_getuint8(in, &tmp);
++ if (jpc_getuint8(in, &tmp)) {
++ return -1;
++ }
+ qcc->compno = tmp;
+ --len;
+ } else {
+- jpc_getuint16(in, &qcc->compno);
++ if (jpc_getuint16(in, &qcc->compno)) {
++ return -1;
++ }
+ len -= 2;
+ }
+ if (jpc_qcx_getcompparms(&qcc->compparms, cstate, in, len)) {
+@@ -919,9 +923,13 @@ static int jpc_qcc_putparms(jpc_ms_t *ms
+ {
+ jpc_qcc_t *qcc = &ms->parms.qcc;
+ if (cstate->numcomps <= 256) {
+- jpc_putuint8(out, qcc->compno);
++ if (jpc_putuint8(out, qcc->compno)) {
++ return -1;
++ }
+ } else {
+- jpc_putuint16(out, qcc->compno);
++ if (jpc_putuint16(out, qcc->compno)) {
++ return -1;
++ }
+ }
+ if (jpc_qcx_putcompparms(&qcc->compparms, cstate, out)) {
+ return -1;
+@@ -966,7 +974,9 @@ static int jpc_qcx_getcompparms(jpc_qcxc
+ cstate = 0;
+
+ n = 0;
+- jpc_getuint8(in, &tmp);
++ if (jpc_getuint8(in, &tmp)) {
++ return -1;
++ }
+ ++n;
+ compparms->qntsty = tmp & 0x1f;
+ compparms->numguard = (tmp >> 5) & 7;
+@@ -988,10 +998,14 @@ static int jpc_qcx_getcompparms(jpc_qcxc
+ assert(compparms->stepsizes);
+ for (i = 0; i < compparms->numstepsizes; ++i) {
+ if (compparms->qntsty == JPC_QCX_NOQNT) {
+- jpc_getuint8(in, &tmp);
++ if (jpc_getuint8(in, &tmp)) {
++ return -1;
++ }
+ compparms->stepsizes[i] = JPC_QCX_EXPN(tmp >> 3);
+ } else {
+- jpc_getuint16(in, &compparms->stepsizes[i]);
++ if (jpc_getuint16(in, &compparms->stepsizes[i])) {
++ return -1;
++ }
+ }
+ }
+ } else {
+@@ -1015,10 +1029,14 @@ static int jpc_qcx_putcompparms(jpc_qcxc
+ jpc_putuint8(out, ((compparms->numguard & 7) << 5) | compparms->qntsty);
+ for (i = 0; i < compparms->numstepsizes; ++i) {
+ if (compparms->qntsty == JPC_QCX_NOQNT) {
+- jpc_putuint8(out, JPC_QCX_GETEXPN(
+- compparms->stepsizes[i]) << 3);
++ if (jpc_putuint8(out, JPC_QCX_GETEXPN(
++ compparms->stepsizes[i]) << 3)) {
++ return -1;
++ }
+ } else {
+- jpc_putuint16(out, compparms->stepsizes[i]);
++ if (jpc_putuint16(out, compparms->stepsizes[i])) {
++ return -1;
++ }
+ }
+ }
+ return 0;
+diff -up jasper-1.900.1/src/libjasper/jpc/jpc_t2enc.c.checked_return jasper-1.900.1/src/libjasper/jpc/jpc_t2enc.c
+--- jasper-1.900.1/src/libjasper/jpc/jpc_t2enc.c.checked_return 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_t2enc.c 2011-06-24 12:29:32.069578992 +0200
+@@ -335,7 +335,9 @@ assert(jpc_firstone(datalen) < cblk->num
+ if (!(ms = jpc_ms_create(JPC_MS_EPH))) {
+ return -1;
+ }
+- jpc_putms(out, enc->cstate, ms);
++ if (jpc_putms(out, enc->cstate, ms)) {
++ return -1;
++ }
+ jpc_ms_destroy(ms);
+ }
+
+diff -up jasper-1.900.1/src/libjasper/ras/ras_enc.c.checked_return jasper-1.900.1/src/libjasper/ras/ras_enc.c
+--- jasper-1.900.1/src/libjasper/ras/ras_enc.c.checked_return 2007-01-19 22:43:04.000000000 +0100
++++ jasper-1.900.1/src/libjasper/ras/ras_enc.c 2011-06-24 14:05:31.233482612 +0200
+@@ -242,8 +242,10 @@ static int ras_putdatastd(jas_stream_t *
+
+ for (y = 0; y < hdr->height; y++) {
+ for (i = 0; i < numcmpts; ++i) {
+- jas_image_readcmpt(image, cmpts[i], 0, y, jas_image_width(image),
+- 1, data[i]);
++ if (jas_image_readcmpt(image, cmpts[i], 0, y,
++ jas_image_width(image), 1, data[i])) {
++ return -1;
++ }
+ }
+ z = 0;
+ nz = 0;
diff --git a/patches/source/jasper/patches/jasper-1.900.1-Coverity-FORWARD_NULL.patch b/patches/source/jasper/patches/jasper-1.900.1-Coverity-FORWARD_NULL.patch
new file mode 100644
index 000000000..ff526b4d1
--- /dev/null
+++ b/patches/source/jasper/patches/jasper-1.900.1-Coverity-FORWARD_NULL.patch
@@ -0,0 +1,44 @@
+Error: FORWARD_NULL
+jpc/jpc_dec.c:2207: var_compare_op: Comparing "streams" to null implies that "streams" might be null.
+jpc/jpc_dec.c:2270: var_deref_model: Passing null variable "streams" to function "jpc_streamlist_destroy", which dereferences it.
+jpc/jpc_dec.c:2108: deref_parm: Directly dereferencing parameter "streamlist".
+
+jpc/jpc_t1enc.c:225: assign_zero: Assigning: "cblk->passes" = 0.
+jpc/jpc_t1enc.c:228: alias_transfer: Assigning null: "pass" = "cblk->passes".
+jpc/jpc_t1enc.c:229: var_deref_op: Dereferencing null variable "pass".
+
+diff -up jasper-1.900.1/src/libjasper/jpc/jpc_dec.c.forward_null jasper-1.900.1/src/libjasper/jpc/jpc_dec.c
+--- jasper-1.900.1/src/libjasper/jpc/jpc_dec.c.forward_null 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_dec.c 2011-06-24 15:01:39.200600146 +0200
+@@ -2267,7 +2267,9 @@ jpc_streamlist_t *jpc_ppmstabtostreams(j
+ return streams;
+
+ error:
+- jpc_streamlist_destroy(streams);
++ if (streams) {
++ jpc_streamlist_destroy(streams);
++ }
+ return 0;
+ }
+
+diff -up jasper-1.900.1/src/libjasper/jpc/jpc_t1enc.c.forward_null jasper-1.900.1/src/libjasper/jpc/jpc_t1enc.c
+--- jasper-1.900.1/src/libjasper/jpc/jpc_t1enc.c.forward_null 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_t1enc.c 2011-06-24 14:58:33.061248133 +0200
+@@ -224,7 +224,7 @@ int jpc_enc_enccblk(jpc_enc_t *enc, jas_
+ } else {
+ cblk->passes = 0;
+ }
+- endpasses = &cblk->passes[cblk->numpasses];
++ endpasses = (cblk->passes) ? &cblk->passes[cblk->numpasses] : 0;
+ for (pass = cblk->passes; pass != endpasses; ++pass) {
+ pass->start = 0;
+ pass->end = 0;
+@@ -352,7 +352,7 @@ dump_passes(cblk->passes, cblk->numpasse
+ #endif
+
+ n = 0;
+- endpasses = &cblk->passes[cblk->numpasses];
++ endpasses = (cblk->passes) ? &cblk->passes[cblk->numpasses] : 0;
+ for (pass = cblk->passes; pass != endpasses; ++pass) {
+ if (pass->start < n) {
+ pass->start = n;
diff --git a/patches/source/jasper/patches/jasper-1.900.1-Coverity-NULL_RETURNS.patch b/patches/source/jasper/patches/jasper-1.900.1-Coverity-NULL_RETURNS.patch
new file mode 100644
index 000000000..4c7227028
--- /dev/null
+++ b/patches/source/jasper/patches/jasper-1.900.1-Coverity-NULL_RETURNS.patch
@@ -0,0 +1,61 @@
+Error: NULL_RETURNS
+base/jas_image.c:213: returned_null: Function "jas_image_create0" returns null (checked 6 out of 7 times).
+base/jas_image.c:213: var_assigned: Assigning: "newimage" = null return value from "jas_image_create0".
+base/jas_image.c:214: dereference: Dereferencing a pointer that might be null "newimage" when calling "jas_image_growcmpts".
+base/jas_image.c:777: deref_parm: Directly dereferencing parameter "image".
+
+base/jas_seq.c:223: returned_null: Function "jas_malloc" returns null (checked 110 out of 119 times).
+base/jas_seq.c:223: var_assigned: Assigning: "mat0->rows_" = null return value from "jas_malloc".
+base/jas_seq.c:225: dereference: Dereferencing a null pointer "mat0->rows_".
+
+jp2/jp2_cod.c:484: returned_null: Function "jas_stream_memopen" returns null (checked 12 out of 15 times).
+jp2/jp2_cod.c:484: var_assigned: Assigning: "tmpstream" = null return value from "jas_stream_memopen".
+jp2/jp2_cod.c:490: dereference: Dereferencing a pointer that might be null "tmpstream" when calling "jas_stream_tell".
+base/jas_stream.c:677: deref_parm: Directly dereferencing parameter "stream".
+
+
+diff -up jasper-1.900.1/src/libjasper/base/jas_image.c.NULL_RETURNS jasper-1.900.1/src/libjasper/base/jas_image.c
+--- jasper-1.900.1/src/libjasper/base/jas_image.c.NULL_RETURNS 2011-12-08 14:00:05.350020869 +0100
++++ jasper-1.900.1/src/libjasper/base/jas_image.c 2011-12-08 14:00:06.638004766 +0100
+@@ -210,7 +210,10 @@ jas_image_t *jas_image_copy(jas_image_t
+ jas_image_t *newimage;
+ int cmptno;
+
+- newimage = jas_image_create0();
++ if (!(newimage = jas_image_create0())) {
++ goto error;
++ }
++
+ if (jas_image_growcmpts(newimage, image->numcmpts_)) {
+ goto error;
+ }
+diff -up jasper-1.900.1/src/libjasper/base/jas_seq.c.NULL_RETURNS jasper-1.900.1/src/libjasper/base/jas_seq.c
+--- jasper-1.900.1/src/libjasper/base/jas_seq.c.NULL_RETURNS 2011-12-08 14:00:05.000000000 +0100
++++ jasper-1.900.1/src/libjasper/base/jas_seq.c 2011-12-08 14:15:12.449680562 +0100
+@@ -220,7 +220,11 @@ void jas_matrix_bindsub(jas_matrix_t *ma
+ mat0->numrows_ = r1 - r0 + 1;
+ mat0->numcols_ = c1 - c0 + 1;
+ mat0->maxrows_ = mat0->numrows_;
+- mat0->rows_ = jas_alloc2(mat0->maxrows_, sizeof(jas_seqent_t *));
++ if (!(mat0->rows_ = jas_alloc2(mat0->maxrows_, sizeof(jas_seqent_t *)))) {
++ jas_matrix_destroy(mat0);
++ return;
++ }
++
+ for (i = 0; i < mat0->numrows_; ++i) {
+ mat0->rows_[i] = mat1->rows_[r0 + i] + c0;
+ }
+diff -up jasper-1.900.1/src/libjasper/jp2/jp2_cod.c.NULL_RETURNS jasper-1.900.1/src/libjasper/jp2/jp2_cod.c
+--- jasper-1.900.1/src/libjasper/jp2/jp2_cod.c.NULL_RETURNS 2011-12-08 14:00:05.633017331 +0100
++++ jasper-1.900.1/src/libjasper/jp2/jp2_cod.c 2011-12-08 14:00:06.677004279 +0100
+@@ -481,7 +481,9 @@ int jp2_box_put(jp2_box_t *box, jas_stre
+ dataflag = !(box->info->flags & (JP2_BOX_SUPER | JP2_BOX_NODATA));
+
+ if (dataflag) {
+- tmpstream = jas_stream_memopen(0, 0);
++ if (!(tmpstream = jas_stream_memopen(0, 0))) {
++ goto error;
++ }
+ if (box->ops->putdata) {
+ if ((*box->ops->putdata)(box, tmpstream)) {
+ goto error;
diff --git a/patches/source/jasper/patches/jasper-1.900.1-Coverity-RESOURCE_LEAK.patch b/patches/source/jasper/patches/jasper-1.900.1-Coverity-RESOURCE_LEAK.patch
new file mode 100644
index 000000000..76f5da77f
--- /dev/null
+++ b/patches/source/jasper/patches/jasper-1.900.1-Coverity-RESOURCE_LEAK.patch
@@ -0,0 +1,202 @@
+Error: RESOURCE_LEAK
+src/appl/imgcmp.c:504: var_assign: Assigning: "diffimage" = storage returned from "jas_image_create(3, compparms, 1025)".
+src/appl/imgcmp.c:511: leaked_storage: Variable "diffimage" going out of scope leaks the storage it points to.
+src/appl/imgcmp.c:537: leaked_storage: Variable "diffimage" going out of scope leaks the storage it points to.
+
+base/jas_image.c:254: var_assign: Assigning: "newcmpt" = storage returned from "jas_image_cmpt_create0()".
+base/jas_image.c:268: leaked_storage: Variable "newcmpt" going out of scope leaks the storage it points to.
+base/jas_image.c:271: leaked_storage: Variable "newcmpt" going out of scope leaks the storage it points to.
+base/jas_image.c:274: leaked_storage: Variable "newcmpt" going out of scope leaks the storage it points to.
+base/jas_image.c:277: leaked_storage: Variable "newcmpt" going out of scope leaks the storage it points to.
+
+base/jas_cm.c:611: var_assign: Assigning: "newpxformseq" = storage returned from "jas_cmpxformseq_create()".
+base/jas_cm.c:617: leaked_storage: Variable "newpxformseq" going out of scope leaks the storage it points to.
+
+base/jas_cm.c:343: var_assign: Assigning: "newprof" = storage returned from "jas_cmprof_create()".
+base/jas_cm.c:358: leaked_storage: Variable "newprof" going out of scope leaks the storage it points to.
+
+base/jas_cm.c:380: var_assign: Assigning: "xform" = storage returned from "jas_malloc(sizeof (jas_cmxform_t) /*16*/)".
+base/jas_cm.c:461: leaked_storage: Variable "xform" going out of scope leaks the storage it points to.
+
+base/jas_image.c:1379: var_assign: Assigning: "xform" = storage returned from "jas_cmxform_create(inprof, outprof, NULL, 0, intent, 0)".
+base/jas_image.c:1444: leaked_storage: Variable "xform" going out of scope leaks the storage it points to.
+
+base/jas_image.c:1306: var_assign: Assigning: "inimage" = storage returned from "jas_image_copy(image)".
+base/jas_image.c:1444: leaked_storage: Variable "inimage" going out of scope leaks the storage it points to.
+
+base/jas_image.c:1345: var_assign: Assigning: "outimage" = storage returned from "jas_image_create0()".
+base/jas_image.c:1444: leaked_storage: Variable "outimage" going out of scope leaks the storage it points to.
+
+bmp/bmp_enc.c:187: var_assign: Assigning: "info" = storage returned from "bmp_info_create()".
+bmp/bmp_enc.c:208: leaked_storage: Variable "info" going out of scope leaks the storage it points to.
+
+jpc/jpc_tagtree.c:111: var_assign: Assigning: "tree" = storage returned from "jpc_tagtree_alloc()".
+jpc/jpc_tagtree.c:129: leaked_storage: Variable "tree" going out of scope leaks the storage it points to.
+
+jpc/jpc_dec.c:452: var_assign: Assigning: "compinfos" = storage returned from "jas_malloc(dec->numcomps * sizeof (jas_image_cmptparm_t) /*56*/)".
+jpc/jpc_dec.c:468: leaked_storage: Variable "compinfos" going out of scope leaks the storage it points to.
+
+jpc/jpc_dec.c:1483: var_assign: Assigning: "cp" = storage returned from "jas_malloc(sizeof (jpc_dec_cp_t) /*48*/)".
+jpc/jpc_dec.c:1493: leaked_storage: Variable "cp" going out of scope leaks the storage it points to.
+jpc/jpc_dec.c:1497: leaked_storage: Variable "cp" going out of scope leaks the storage it points to.
+
+mif/mif_cod.c:523: var_assign: Assigning: "cmpt" = storage returned from "mif_cmpt_create()".
+mif/mif_cod.c:568: leaked_storage: Variable "cmpt" going out of scope leaks the storage it points to.
+
+mif/mif_cod.c:568: leaked_storage: Variable "tvp" going out of scope leaks the storage it points to.
+
+
+diff -up jasper-1.900.1/src/appl/imgcmp.c.RESOURCE_LEAK jasper-1.900.1/src/appl/imgcmp.c
+--- jasper-1.900.1/src/appl/imgcmp.c.RESOURCE_LEAK 2007-01-19 22:43:08.000000000 +0100
++++ jasper-1.900.1/src/appl/imgcmp.c 2011-12-08 14:16:04.727027007 +0100
+@@ -507,6 +507,7 @@ jas_image_t *makediffimage(jas_matrix_t
+
+ for (i = 0; i < 3; ++i) {
+ if (!(diffdata[i] = jas_matrix_create(height, width))) {
++ jas_image_destroy(diffimage);
+ fprintf(stderr, "internal error\n");
+ return 0;
+ }
+@@ -534,6 +535,7 @@ jas_image_t *makediffimage(jas_matrix_t
+
+ for (i = 0; i < 3; ++i) {
+ if (jas_image_writecmpt(diffimage, i, 0, 0, width, height, diffdata[i])) {
++ jas_image_destroy(diffimage);
+ return 0;
+ }
+ }
+diff -up jasper-1.900.1/src/libjasper/base/jas_cm.c.RESOURCE_LEAK jasper-1.900.1/src/libjasper/base/jas_cm.c
+--- jasper-1.900.1/src/libjasper/base/jas_cm.c.RESOURCE_LEAK 2011-12-08 14:16:03.387043758 +0100
++++ jasper-1.900.1/src/libjasper/base/jas_cm.c 2011-12-08 14:16:04.728026994 +0100
+@@ -355,6 +355,8 @@ jas_cmprof_t *jas_cmprof_copy(jas_cmprof
+ }
+ return newprof;
+ error:
++ if (newprof)
++ jas_cmprof_destroy(newprof);
+ return 0;
+ }
+
+@@ -458,6 +460,8 @@ jas_cmxform_t *jas_cmxform_create(jas_cm
+ }
+ return xform;
+ error:
++ if (xform)
++ jas_cmxform_destroy(xform);
+ return 0;
+ }
+
+@@ -614,6 +618,8 @@ static jas_cmpxformseq_t *jas_cmpxformse
+ goto error;
+ return newpxformseq;
+ error:
++ if (newpxformseq)
++ jas_cmpxformseq_destroy(newpxformseq);
+ return 0;
+ }
+
+diff -up jasper-1.900.1/src/libjasper/base/jas_image.c.RESOURCE_LEAK jasper-1.900.1/src/libjasper/base/jas_image.c
+--- jasper-1.900.1/src/libjasper/base/jas_image.c.RESOURCE_LEAK 2011-12-08 14:16:04.635028156 +0100
++++ jasper-1.900.1/src/libjasper/base/jas_image.c 2011-12-08 14:16:04.776026394 +0100
+@@ -268,15 +268,19 @@ static jas_image_cmpt_t *jas_image_cmpt_
+ newcmpt->cps_ = cmpt->cps_;
+ newcmpt->type_ = cmpt->type_;
+ if (!(newcmpt->stream_ = jas_stream_memopen(0, 0))) {
++ jas_image_cmpt_destroy(newcmpt);
+ return 0;
+ }
+ if (jas_stream_seek(cmpt->stream_, 0, SEEK_SET)) {
++ jas_image_cmpt_destroy(newcmpt);
+ return 0;
+ }
+ if (jas_stream_copy(newcmpt->stream_, cmpt->stream_, -1)) {
++ jas_image_cmpt_destroy(newcmpt);
+ return 0;
+ }
+ if (jas_stream_seek(newcmpt->stream_, 0, SEEK_SET)) {
++ jas_image_cmpt_destroy(newcmpt);
+ return 0;
+ }
+ return newcmpt;
+@@ -1443,5 +1447,11 @@ jas_image_dump(outimage, stderr);
+ #endif
+ return outimage;
+ error:
++ if (xform)
++ jas_cmxform_destroy(xform);
++ if (inimage)
++ jas_image_destroy(inimage);
++ if (outimage)
++ jas_image_destroy(outimage);
+ return 0;
+ }
+diff -up jasper-1.900.1/src/libjasper/bmp/bmp_enc.c.RESOURCE_LEAK jasper-1.900.1/src/libjasper/bmp/bmp_enc.c
+--- jasper-1.900.1/src/libjasper/bmp/bmp_enc.c.RESOURCE_LEAK 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/bmp/bmp_enc.c 2011-12-08 14:16:04.826025768 +0100
+@@ -205,16 +205,19 @@ int bmp_encode(jas_image_t *image, jas_s
+
+ /* Write the bitmap header. */
+ if (bmp_puthdr(out, &hdr)) {
++ bmp_info_destroy(info);
+ return -1;
+ }
+
+ /* Write the bitmap information. */
+ if (bmp_putinfo(out, info)) {
++ bmp_info_destroy(info);
+ return -1;
+ }
+
+ /* Write the bitmap data. */
+ if (bmp_putdata(out, info, image, enc->cmpts)) {
++ bmp_info_destroy(info);
+ return -1;
+ }
+
+diff -up jasper-1.900.1/src/libjasper/jpc/jpc_dec.c.RESOURCE_LEAK jasper-1.900.1/src/libjasper/jpc/jpc_dec.c
+--- jasper-1.900.1/src/libjasper/jpc/jpc_dec.c.RESOURCE_LEAK 2011-12-08 14:16:04.594028668 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_dec.c 2011-12-08 14:17:25.677014992 +0100
+@@ -465,6 +465,7 @@ static int jpc_dec_process_sot(jpc_dec_t
+
+ if (!(dec->image = jas_image_create(dec->numcomps, compinfos,
+ JAS_CLRSPC_UNKNOWN))) {
++ jas_free(compinfos);
+ return -1;
+ }
+ jas_free(compinfos);
+@@ -1490,10 +1491,11 @@ static jpc_dec_cp_t *jpc_dec_cp_create(u
+ cp->mctid = 0;
+ cp->csty = 0;
+ if (!(cp->ccps = jas_alloc2(cp->numcomps, sizeof(jpc_dec_ccp_t)))) {
++ jpc_dec_cp_destroy(cp);
+ return 0;
+ }
+ if (!(cp->pchglist = jpc_pchglist_create())) {
+- jas_free(cp->ccps);
++ jpc_dec_cp_destroy(cp);
+ return 0;
+ }
+ for (compno = 0, ccp = cp->ccps; compno < cp->numcomps;
+diff -up jasper-1.900.1/src/libjasper/jpc/jpc_tagtree.c.RESOURCE_LEAK jasper-1.900.1/src/libjasper/jpc/jpc_tagtree.c
+--- jasper-1.900.1/src/libjasper/jpc/jpc_tagtree.c.RESOURCE_LEAK 2011-12-08 14:16:04.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_tagtree.c 2011-12-08 14:17:55.905637082 +0100
+@@ -126,6 +126,7 @@ jpc_tagtree_t *jpc_tagtree_create(int nu
+ } while (n > 1);
+
+ if (!(tree->nodes_ = jas_alloc2(tree->numnodes_, sizeof(jpc_tagtreenode_t)))) {
++ jpc_tagtree_destroy(tree);
+ return 0;
+ }
+
+diff -up jasper-1.900.1/src/libjasper/mif/mif_cod.c.RESOURCE_LEAK jasper-1.900.1/src/libjasper/mif/mif_cod.c
+--- jasper-1.900.1/src/libjasper/mif/mif_cod.c.RESOURCE_LEAK 2011-12-08 14:16:04.250032970 +0100
++++ jasper-1.900.1/src/libjasper/mif/mif_cod.c 2011-12-08 14:16:04.967024005 +0100
+@@ -564,7 +564,7 @@ static int mif_process_cmpt(mif_hdr_t *h
+ break;
+ case MIF_DATA:
+ if (!(cmpt->data = jas_strdup(jas_tvparser_getval(tvp)))) {
+- return -1;
++ goto error;
+ }
+ break;
+ }
diff --git a/patches/source/jasper/patches/jasper-1.900.1-Coverity-UNREACHABLE.patch b/patches/source/jasper/patches/jasper-1.900.1-Coverity-UNREACHABLE.patch
new file mode 100644
index 000000000..3cae29403
--- /dev/null
+++ b/patches/source/jasper/patches/jasper-1.900.1-Coverity-UNREACHABLE.patch
@@ -0,0 +1,37 @@
+Error: UNREACHABLE
+jp2/jp2_cod.c:304: unreachable: This code cannot be reached: "abort();".
+
+jp2/jp2_cod.c:514: unreachable: This code cannot be reached: "abort();".
+
+jp2/jp2_enc.c:354: unreachable: This code cannot be reached: "abort();".
+
+diff -up jasper-1.900.1/src/libjasper/jp2/jp2_cod.c.unreachable jasper-1.900.1/src/libjasper/jp2/jp2_cod.c
+--- jasper-1.900.1/src/libjasper/jp2/jp2_cod.c.unreachable 2007-01-19 22:43:05.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jp2/jp2_cod.c 2011-06-27 15:28:13.083137952 +0200
+@@ -301,7 +301,6 @@ jp2_box_t *jp2_box_get(jas_stream_t *in)
+ }
+
+ return box;
+- abort();
+
+ error:
+ if (box) {
+@@ -511,7 +510,6 @@ int jp2_box_put(jp2_box_t *box, jas_stre
+ }
+
+ return 0;
+- abort();
+
+ error:
+
+diff -up jasper-1.900.1/src/libjasper/jp2/jp2_enc.c.unreachable jasper-1.900.1/src/libjasper/jp2/jp2_enc.c
+--- jasper-1.900.1/src/libjasper/jp2/jp2_enc.c.unreachable 2007-01-19 22:43:05.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jp2/jp2_enc.c 2011-06-27 15:27:58.858353979 +0200
+@@ -351,7 +351,6 @@ int sgnd;
+ }
+
+ return 0;
+- abort();
+
+ error:
+
diff --git a/patches/source/jasper/patches/jasper-1.900.1-Coverity-UNUSED_VALUE.patch b/patches/source/jasper/patches/jasper-1.900.1-Coverity-UNUSED_VALUE.patch
new file mode 100644
index 000000000..e7d4cb591
--- /dev/null
+++ b/patches/source/jasper/patches/jasper-1.900.1-Coverity-UNUSED_VALUE.patch
@@ -0,0 +1,41 @@
+Error: UNUSED_VALUE
+base/jas_icc.c:328: returned_pointer: Pointer "attrvalinfo" returned by "jas_iccattrvalinfo_lookup(type)" is never used.
+
+jpc/jpc_enc.c:788: returned_pointer: Pointer "cp" returned by "strchr(s, 66)" is never used.
+
+diff -up jasper-1.900.1/src/libjasper/base/jas_icc.c.unused_value jasper-1.900.1/src/libjasper/base/jas_icc.c
+--- jasper-1.900.1/src/libjasper/base/jas_icc.c.unused_value 2007-01-19 22:43:05.000000000 +0100
++++ jasper-1.900.1/src/libjasper/base/jas_icc.c 2011-06-27 15:35:52.815263000 +0200
+@@ -266,7 +266,6 @@ jas_iccprof_t *jas_iccprof_load(jas_stre
+ jas_iccattrval_t *attrval;
+ jas_iccattrval_t *prevattrval;
+ jas_icctagtabent_t *tagtabent;
+- jas_iccattrvalinfo_t *attrvalinfo;
+ int i;
+ int len;
+
+@@ -325,7 +324,7 @@ jas_iccprof_t *jas_iccprof_load(jas_stre
+ goto error;
+ }
+ curoff += 8;
+- if (!(attrvalinfo = jas_iccattrvalinfo_lookup(type))) {
++ if (!jas_iccattrvalinfo_lookup(type)) {
+ #if 0
+ jas_eprintf("warning: skipping unknown tag type\n");
+ #endif
+diff -up jasper-1.900.1/src/libjasper/jpc/jpc_enc.c.unused_value jasper-1.900.1/src/libjasper/jpc/jpc_enc.c
+--- jasper-1.900.1/src/libjasper/jpc/jpc_enc.c.unused_value 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_enc.c 2011-06-27 15:36:17.437900180 +0200
+@@ -781,11 +781,10 @@ void jpc_enc_cp_destroy(jpc_enc_cp_t *cp
+
+ int ratestrtosize(char *s, uint_fast32_t rawsize, uint_fast32_t *size)
+ {
+- char *cp;
+ jpc_flt_t f;
+
+ /* Note: This function must not modify output size on failure. */
+- if ((cp = strchr(s, 'B'))) {
++ if (strchr(s, 'B')) {
+ *size = atoi(s);
+ } else {
+ f = atof(s);
diff --git a/patches/source/jasper/patches/jasper-CVE-2014-8137.patch b/patches/source/jasper/patches/jasper-CVE-2014-8137.patch
new file mode 100644
index 000000000..9600cd323
--- /dev/null
+++ b/patches/source/jasper/patches/jasper-CVE-2014-8137.patch
@@ -0,0 +1,57 @@
+--- jasper-1.900.1.orig/src/libjasper/base/jas_icc.c 2014-12-11 14:06:44.000000000 +0100
++++ jasper-1.900.1/src/libjasper/base/jas_icc.c 2014-12-11 15:16:37.971272386 +0100
+@@ -1009,7 +1009,6 @@ static int jas_icccurv_input(jas_iccattr
+ return 0;
+
+ error:
+- jas_icccurv_destroy(attrval);
+ return -1;
+ }
+
+@@ -1127,7 +1126,6 @@ static int jas_icctxtdesc_input(jas_icca
+ #endif
+ return 0;
+ error:
+- jas_icctxtdesc_destroy(attrval);
+ return -1;
+ }
+
+@@ -1206,8 +1204,6 @@ static int jas_icctxt_input(jas_iccattrv
+ goto error;
+ return 0;
+ error:
+- if (txt->string)
+- jas_free(txt->string);
+ return -1;
+ }
+
+@@ -1328,7 +1324,6 @@ static int jas_icclut8_input(jas_iccattr
+ goto error;
+ return 0;
+ error:
+- jas_icclut8_destroy(attrval);
+ return -1;
+ }
+
+@@ -1497,7 +1492,6 @@ static int jas_icclut16_input(jas_iccatt
+ goto error;
+ return 0;
+ error:
+- jas_icclut16_destroy(attrval);
+ return -1;
+ }
+
+--- jasper-1.900.1.orig/src/libjasper/jp2/jp2_dec.c 2014-12-11 14:30:54.193209780 +0100
++++ jasper-1.900.1/src/libjasper/jp2/jp2_dec.c 2014-12-11 14:36:46.313217814 +0100
+@@ -291,7 +291,10 @@ jas_image_t *jp2_decode(jas_stream_t *in
+ case JP2_COLR_ICC:
+ iccprof = jas_iccprof_createfrombuf(dec->colr->data.colr.iccp,
+ dec->colr->data.colr.iccplen);
+- assert(iccprof);
++ if (!iccprof) {
++ jas_eprintf("error: failed to parse ICC profile\n");
++ goto error;
++ }
+ jas_iccprof_gethdr(iccprof, &icchdr);
+ jas_eprintf("ICC Profile CS %08x\n", icchdr.colorspc);
+ jas_image_setclrspc(dec->image, fromiccpcs(icchdr.colorspc));
diff --git a/patches/source/jasper/patches/jasper-CVE-2014-8138.patch b/patches/source/jasper/patches/jasper-CVE-2014-8138.patch
new file mode 100644
index 000000000..5aaf8abb1
--- /dev/null
+++ b/patches/source/jasper/patches/jasper-CVE-2014-8138.patch
@@ -0,0 +1,14 @@
+--- jasper-1.900.1.orig/src/libjasper/jp2/jp2_dec.c 2014-12-11 14:06:44.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jp2/jp2_dec.c 2014-12-11 14:06:26.000000000 +0100
+@@ -386,6 +386,11 @@ jas_image_t *jp2_decode(jas_stream_t *in
+ /* Determine the type of each component. */
+ if (dec->cdef) {
+ for (i = 0; i < dec->numchans; ++i) {
++ /* Is the channel number reasonable? */
++ if (dec->cdef->data.cdef.ents[i].channo >= dec->numchans) {
++ jas_eprintf("error: invalid channel number in CDEF box\n");
++ goto error;
++ }
+ jas_image_setcmpttype(dec->image,
+ dec->chantocmptlut[dec->cdef->data.cdef.ents[i].channo],
+ jp2_getct(jas_image_clrspc(dec->image),
diff --git a/patches/source/jasper/patches/jasper-CVE-2014-8157.patch b/patches/source/jasper/patches/jasper-CVE-2014-8157.patch
new file mode 100644
index 000000000..ebfc1b2d0
--- /dev/null
+++ b/patches/source/jasper/patches/jasper-CVE-2014-8157.patch
@@ -0,0 +1,12 @@
+diff -up jasper-1.900.1/src/libjasper/jpc/jpc_dec.c.CVE-2014-8157 jasper-1.900.1/src/libjasper/jpc/jpc_dec.c
+--- jasper-1.900.1/src/libjasper/jpc/jpc_dec.c.CVE-2014-8157 2015-01-19 16:59:36.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_dec.c 2015-01-19 17:07:41.609863268 +0100
+@@ -489,7 +489,7 @@ static int jpc_dec_process_sot(jpc_dec_t
+ dec->curtileendoff = 0;
+ }
+
+- if (JAS_CAST(int, sot->tileno) > dec->numtiles) {
++ if (JAS_CAST(int, sot->tileno) >= dec->numtiles) {
+ jas_eprintf("invalid tile number in SOT marker segment\n");
+ return -1;
+ }
diff --git a/patches/source/jasper/patches/jasper-CVE-2014-8158.patch b/patches/source/jasper/patches/jasper-CVE-2014-8158.patch
new file mode 100644
index 000000000..ce9e4b497
--- /dev/null
+++ b/patches/source/jasper/patches/jasper-CVE-2014-8158.patch
@@ -0,0 +1,329 @@
+diff -up jasper-1.900.1/src/libjasper/jpc/jpc_qmfb.c.CVE-2014-8158 jasper-1.900.1/src/libjasper/jpc/jpc_qmfb.c
+--- jasper-1.900.1/src/libjasper/jpc/jpc_qmfb.c.CVE-2014-8158 2015-01-19 17:25:28.730195502 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_qmfb.c 2015-01-19 17:27:20.214663127 +0100
+@@ -306,11 +306,7 @@ void jpc_qmfb_split_row(jpc_fix_t *a, in
+ {
+
+ int bufsize = JPC_CEILDIVPOW2(numcols, 1);
+-#if !defined(HAVE_VLA)
+ jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE];
+-#else
+- jpc_fix_t splitbuf[bufsize];
+-#endif
+ jpc_fix_t *buf = splitbuf;
+ register jpc_fix_t *srcptr;
+ register jpc_fix_t *dstptr;
+@@ -318,7 +314,6 @@ void jpc_qmfb_split_row(jpc_fix_t *a, in
+ register int m;
+ int hstartcol;
+
+-#if !defined(HAVE_VLA)
+ /* Get a buffer. */
+ if (bufsize > QMFB_SPLITBUFSIZE) {
+ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
+@@ -326,7 +321,6 @@ void jpc_qmfb_split_row(jpc_fix_t *a, in
+ abort();
+ }
+ }
+-#endif
+
+ if (numcols >= 2) {
+ hstartcol = (numcols + 1 - parity) >> 1;
+@@ -360,12 +354,10 @@ void jpc_qmfb_split_row(jpc_fix_t *a, in
+ }
+ }
+
+-#if !defined(HAVE_VLA)
+ /* If the split buffer was allocated on the heap, free this memory. */
+ if (buf != splitbuf) {
+ jas_free(buf);
+ }
+-#endif
+
+ }
+
+@@ -374,11 +366,7 @@ void jpc_qmfb_split_col(jpc_fix_t *a, in
+ {
+
+ int bufsize = JPC_CEILDIVPOW2(numrows, 1);
+-#if !defined(HAVE_VLA)
+ jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE];
+-#else
+- jpc_fix_t splitbuf[bufsize];
+-#endif
+ jpc_fix_t *buf = splitbuf;
+ register jpc_fix_t *srcptr;
+ register jpc_fix_t *dstptr;
+@@ -386,7 +374,6 @@ void jpc_qmfb_split_col(jpc_fix_t *a, in
+ register int m;
+ int hstartcol;
+
+-#if !defined(HAVE_VLA)
+ /* Get a buffer. */
+ if (bufsize > QMFB_SPLITBUFSIZE) {
+ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
+@@ -394,7 +381,6 @@ void jpc_qmfb_split_col(jpc_fix_t *a, in
+ abort();
+ }
+ }
+-#endif
+
+ if (numrows >= 2) {
+ hstartcol = (numrows + 1 - parity) >> 1;
+@@ -428,12 +414,10 @@ void jpc_qmfb_split_col(jpc_fix_t *a, in
+ }
+ }
+
+-#if !defined(HAVE_VLA)
+ /* If the split buffer was allocated on the heap, free this memory. */
+ if (buf != splitbuf) {
+ jas_free(buf);
+ }
+-#endif
+
+ }
+
+@@ -442,11 +426,7 @@ void jpc_qmfb_split_colgrp(jpc_fix_t *a,
+ {
+
+ int bufsize = JPC_CEILDIVPOW2(numrows, 1);
+-#if !defined(HAVE_VLA)
+ jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE * JPC_QMFB_COLGRPSIZE];
+-#else
+- jpc_fix_t splitbuf[bufsize * JPC_QMFB_COLGRPSIZE];
+-#endif
+ jpc_fix_t *buf = splitbuf;
+ jpc_fix_t *srcptr;
+ jpc_fix_t *dstptr;
+@@ -457,7 +437,6 @@ void jpc_qmfb_split_colgrp(jpc_fix_t *a,
+ int m;
+ int hstartcol;
+
+-#if !defined(HAVE_VLA)
+ /* Get a buffer. */
+ if (bufsize > QMFB_SPLITBUFSIZE) {
+ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
+@@ -465,7 +444,6 @@ void jpc_qmfb_split_colgrp(jpc_fix_t *a,
+ abort();
+ }
+ }
+-#endif
+
+ if (numrows >= 2) {
+ hstartcol = (numrows + 1 - parity) >> 1;
+@@ -517,12 +495,10 @@ void jpc_qmfb_split_colgrp(jpc_fix_t *a,
+ }
+ }
+
+-#if !defined(HAVE_VLA)
+ /* If the split buffer was allocated on the heap, free this memory. */
+ if (buf != splitbuf) {
+ jas_free(buf);
+ }
+-#endif
+
+ }
+
+@@ -531,11 +507,7 @@ void jpc_qmfb_split_colres(jpc_fix_t *a,
+ {
+
+ int bufsize = JPC_CEILDIVPOW2(numrows, 1);
+-#if !defined(HAVE_VLA)
+ jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE * JPC_QMFB_COLGRPSIZE];
+-#else
+- jpc_fix_t splitbuf[bufsize * numcols];
+-#endif
+ jpc_fix_t *buf = splitbuf;
+ jpc_fix_t *srcptr;
+ jpc_fix_t *dstptr;
+@@ -546,7 +518,6 @@ void jpc_qmfb_split_colres(jpc_fix_t *a,
+ int m;
+ int hstartcol;
+
+-#if !defined(HAVE_VLA)
+ /* Get a buffer. */
+ if (bufsize > QMFB_SPLITBUFSIZE) {
+ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
+@@ -554,7 +525,6 @@ void jpc_qmfb_split_colres(jpc_fix_t *a,
+ abort();
+ }
+ }
+-#endif
+
+ if (numrows >= 2) {
+ hstartcol = (numrows + 1 - parity) >> 1;
+@@ -606,12 +576,10 @@ void jpc_qmfb_split_colres(jpc_fix_t *a,
+ }
+ }
+
+-#if !defined(HAVE_VLA)
+ /* If the split buffer was allocated on the heap, free this memory. */
+ if (buf != splitbuf) {
+ jas_free(buf);
+ }
+-#endif
+
+ }
+
+@@ -619,18 +587,13 @@ void jpc_qmfb_join_row(jpc_fix_t *a, int
+ {
+
+ int bufsize = JPC_CEILDIVPOW2(numcols, 1);
+-#if !defined(HAVE_VLA)
+ jpc_fix_t joinbuf[QMFB_JOINBUFSIZE];
+-#else
+- jpc_fix_t joinbuf[bufsize];
+-#endif
+ jpc_fix_t *buf = joinbuf;
+ register jpc_fix_t *srcptr;
+ register jpc_fix_t *dstptr;
+ register int n;
+ int hstartcol;
+
+-#if !defined(HAVE_VLA)
+ /* Allocate memory for the join buffer from the heap. */
+ if (bufsize > QMFB_JOINBUFSIZE) {
+ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
+@@ -638,7 +601,6 @@ void jpc_qmfb_join_row(jpc_fix_t *a, int
+ abort();
+ }
+ }
+-#endif
+
+ hstartcol = (numcols + 1 - parity) >> 1;
+
+@@ -670,12 +632,10 @@ void jpc_qmfb_join_row(jpc_fix_t *a, int
+ ++srcptr;
+ }
+
+-#if !defined(HAVE_VLA)
+ /* If the join buffer was allocated on the heap, free this memory. */
+ if (buf != joinbuf) {
+ jas_free(buf);
+ }
+-#endif
+
+ }
+
+@@ -684,18 +644,13 @@ void jpc_qmfb_join_col(jpc_fix_t *a, int
+ {
+
+ int bufsize = JPC_CEILDIVPOW2(numrows, 1);
+-#if !defined(HAVE_VLA)
+ jpc_fix_t joinbuf[QMFB_JOINBUFSIZE];
+-#else
+- jpc_fix_t joinbuf[bufsize];
+-#endif
+ jpc_fix_t *buf = joinbuf;
+ register jpc_fix_t *srcptr;
+ register jpc_fix_t *dstptr;
+ register int n;
+ int hstartcol;
+
+-#if !defined(HAVE_VLA)
+ /* Allocate memory for the join buffer from the heap. */
+ if (bufsize > QMFB_JOINBUFSIZE) {
+ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
+@@ -703,7 +658,6 @@ void jpc_qmfb_join_col(jpc_fix_t *a, int
+ abort();
+ }
+ }
+-#endif
+
+ hstartcol = (numrows + 1 - parity) >> 1;
+
+@@ -735,12 +689,10 @@ void jpc_qmfb_join_col(jpc_fix_t *a, int
+ ++srcptr;
+ }
+
+-#if !defined(HAVE_VLA)
+ /* If the join buffer was allocated on the heap, free this memory. */
+ if (buf != joinbuf) {
+ jas_free(buf);
+ }
+-#endif
+
+ }
+
+@@ -749,11 +701,7 @@ void jpc_qmfb_join_colgrp(jpc_fix_t *a,
+ {
+
+ int bufsize = JPC_CEILDIVPOW2(numrows, 1);
+-#if !defined(HAVE_VLA)
+ jpc_fix_t joinbuf[QMFB_JOINBUFSIZE * JPC_QMFB_COLGRPSIZE];
+-#else
+- jpc_fix_t joinbuf[bufsize * JPC_QMFB_COLGRPSIZE];
+-#endif
+ jpc_fix_t *buf = joinbuf;
+ jpc_fix_t *srcptr;
+ jpc_fix_t *dstptr;
+@@ -763,7 +711,6 @@ void jpc_qmfb_join_colgrp(jpc_fix_t *a,
+ register int i;
+ int hstartcol;
+
+-#if !defined(HAVE_VLA)
+ /* Allocate memory for the join buffer from the heap. */
+ if (bufsize > QMFB_JOINBUFSIZE) {
+ if (!(buf = jas_alloc2(bufsize, JPC_QMFB_COLGRPSIZE * sizeof(jpc_fix_t)))) {
+@@ -771,7 +718,6 @@ void jpc_qmfb_join_colgrp(jpc_fix_t *a,
+ abort();
+ }
+ }
+-#endif
+
+ hstartcol = (numrows + 1 - parity) >> 1;
+
+@@ -821,12 +767,10 @@ void jpc_qmfb_join_colgrp(jpc_fix_t *a,
+ srcptr += JPC_QMFB_COLGRPSIZE;
+ }
+
+-#if !defined(HAVE_VLA)
+ /* If the join buffer was allocated on the heap, free this memory. */
+ if (buf != joinbuf) {
+ jas_free(buf);
+ }
+-#endif
+
+ }
+
+@@ -835,11 +779,7 @@ void jpc_qmfb_join_colres(jpc_fix_t *a,
+ {
+
+ int bufsize = JPC_CEILDIVPOW2(numrows, 1);
+-#if !defined(HAVE_VLA)
+ jpc_fix_t joinbuf[QMFB_JOINBUFSIZE * JPC_QMFB_COLGRPSIZE];
+-#else
+- jpc_fix_t joinbuf[bufsize * numcols];
+-#endif
+ jpc_fix_t *buf = joinbuf;
+ jpc_fix_t *srcptr;
+ jpc_fix_t *dstptr;
+@@ -849,7 +789,6 @@ void jpc_qmfb_join_colres(jpc_fix_t *a,
+ register int i;
+ int hstartcol;
+
+-#if !defined(HAVE_VLA)
+ /* Allocate memory for the join buffer from the heap. */
+ if (bufsize > QMFB_JOINBUFSIZE) {
+ if (!(buf = jas_alloc3(bufsize, numcols, sizeof(jpc_fix_t)))) {
+@@ -857,7 +796,6 @@ void jpc_qmfb_join_colres(jpc_fix_t *a,
+ abort();
+ }
+ }
+-#endif
+
+ hstartcol = (numrows + 1 - parity) >> 1;
+
+@@ -907,12 +845,10 @@ void jpc_qmfb_join_colres(jpc_fix_t *a,
+ srcptr += numcols;
+ }
+
+-#if !defined(HAVE_VLA)
+ /* If the join buffer was allocated on the heap, free this memory. */
+ if (buf != joinbuf) {
+ jas_free(buf);
+ }
+-#endif
+
+ }
+
diff --git a/patches/source/jasper/patches/jasper-CVE-2014-9029.patch b/patches/source/jasper/patches/jasper-CVE-2014-9029.patch
new file mode 100644
index 000000000..98a203599
--- /dev/null
+++ b/patches/source/jasper/patches/jasper-CVE-2014-9029.patch
@@ -0,0 +1,29 @@
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_dec.c 2014-11-27 12:45:44.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_dec.c 2014-11-27 12:44:58.000000000 +0100
+@@ -1281,7 +1281,7 @@ static int jpc_dec_process_coc(jpc_dec_t
+ jpc_coc_t *coc = &ms->parms.coc;
+ jpc_dec_tile_t *tile;
+
+- if (JAS_CAST(int, coc->compno) > dec->numcomps) {
++ if (JAS_CAST(int, coc->compno) >= dec->numcomps) {
+ jas_eprintf("invalid component number in COC marker segment\n");
+ return -1;
+ }
+@@ -1307,7 +1307,7 @@ static int jpc_dec_process_rgn(jpc_dec_t
+ jpc_rgn_t *rgn = &ms->parms.rgn;
+ jpc_dec_tile_t *tile;
+
+- if (JAS_CAST(int, rgn->compno) > dec->numcomps) {
++ if (JAS_CAST(int, rgn->compno) >= dec->numcomps) {
+ jas_eprintf("invalid component number in RGN marker segment\n");
+ return -1;
+ }
+@@ -1356,7 +1356,7 @@ static int jpc_dec_process_qcc(jpc_dec_t
+ jpc_qcc_t *qcc = &ms->parms.qcc;
+ jpc_dec_tile_t *tile;
+
+- if (JAS_CAST(int, qcc->compno) > dec->numcomps) {
++ if (JAS_CAST(int, qcc->compno) >= dec->numcomps) {
+ jas_eprintf("invalid component number in QCC marker segment\n");
+ return -1;
+ }
diff --git a/patches/source/jasper/patches/jpc_dec.c.patch b/patches/source/jasper/patches/jpc_dec.c.patch
new file mode 100644
index 000000000..ae1cd0617
--- /dev/null
+++ b/patches/source/jasper/patches/jpc_dec.c.patch
@@ -0,0 +1,18 @@
+diff -urN jasper-1.900.1/src/libjasper/jpc/jpc_dec.c jasper-1.900.1-fix/src/libjasper/jpc/jpc_dec.c
+--- jasper-1.900.1/src/libjasper/jpc/jpc_dec.c 2007-01-19 14:43:07.000000000 -0700
++++ jasper-1.900.1-fix/src/libjasper/jpc/jpc_dec.c 2008-03-06 16:51:12.000000000 -0700
+@@ -1069,12 +1069,12 @@
+ /* Apply an inverse intercomponent transform if necessary. */
+ switch (tile->cp->mctid) {
+ case JPC_MCT_RCT:
+- assert(dec->numcomps == 3);
++ assert(dec->numcomps >= 3);
+ jpc_irct(tile->tcomps[0].data, tile->tcomps[1].data,
+ tile->tcomps[2].data);
+ break;
+ case JPC_MCT_ICT:
+- assert(dec->numcomps == 3);
++ assert(dec->numcomps >= 3);
+ jpc_iict(tile->tcomps[0].data, tile->tcomps[1].data,
+ tile->tcomps[2].data);
+ break;
diff --git a/patches/source/jasper/patches/patch-libjasper-stepsizes-overflow.diff b/patches/source/jasper/patches/patch-libjasper-stepsizes-overflow.diff
new file mode 100644
index 000000000..097559f68
--- /dev/null
+++ b/patches/source/jasper/patches/patch-libjasper-stepsizes-overflow.diff
@@ -0,0 +1,14 @@
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_cs.c 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_cs.c 2007-04-06 01:29:02.000000000 +0200
+@@ -982,7 +982,10 @@ static int jpc_qcx_getcompparms(jpc_qcxc
+ compparms->numstepsizes = (len - n) / 2;
+ break;
+ }
+- if (compparms->numstepsizes > 0) {
++ if (compparms->numstepsizes > 3 * JPC_MAXRLVLS + 1) {
++ jpc_qcx_destroycompparms(compparms);
++ return -1;
++ } else if (compparms->numstepsizes > 0) {
+ compparms->stepsizes = jas_malloc(compparms->numstepsizes *
+ sizeof(uint_fast16_t));
+ assert(compparms->stepsizes);
diff --git a/patches/source/jasper/slack-desc b/patches/source/jasper/slack-desc
new file mode 100644
index 000000000..c79751af3
--- /dev/null
+++ b/patches/source/jasper/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+jasper: jasper (free implementation of the JPEG-2000 standard)
+jasper:
+jasper: The JasPer Project is an open-source initiative to provide a free
+jasper: software-based reference implementation of the codec specified in the
+jasper: JPEG-2000 Part-1 standard (i.e., ISO/IEC 15444-1).jasper:
+jasper:
+jasper: jasper home: http://www.ece.uvic.ca/~mdadams/jasper/
+jasper:
+jasper:
+jasper:
+jasper:
diff --git a/patches/source/kdelibs/KDE.SlackBuild b/patches/source/kdelibs/KDE.SlackBuild
new file mode 100755
index 000000000..ea663a694
--- /dev/null
+++ b/patches/source/kdelibs/KDE.SlackBuild
@@ -0,0 +1,532 @@
+#!/bin/sh
+# Copyright 2011, 2012 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Adapted by Eric Hameleers <alien@slackware.com> from the modular x.org build.
+
+# To build only a single package group, specify it as $1, like:
+# ./KDE.SlackBuild kdeedu
+# To build only a single package, specify both the group name
+# and the name of the package, like:
+# ./KDE.SlackBuild kdeedu:marble
+# ./KDE.SlackBuild kdebindings:perlqt,perlkde
+
+
+CLEANUP=${CLEANUP:-"yes"} # clean up build directory after successful build.
+PRECHECK=${PRECHECK:-"no"} # don't let the script check the available sources.
+CHECKOUT=${CHECKOUT:-"no"} # don't let the script checkout missing sources.
+
+KDEGITURI="git://anongit.kde.org"
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Set up a few useful functions:
+
+fix_perms() {
+ target_dir=$1
+ [ -z "$target_dir" ] && target_dir='.'
+
+ chown -R root:root $target_dir
+ find $target_dir \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+}
+
+strip_binaries() {
+ target_dir=$1
+ [ -z "$target_dir" ] && target_dir='.'
+
+ find $target_dir | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find $target_dir | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find $target_dir | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.*
+ )
+ done
+ )
+ fi
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+precheck() {
+ # See if the sources we have match the module components we want to build:
+ RETVAL=0
+
+ for SRCFILE in $(find $CWD/src -name "*.tar.?z*") ; do
+ if cat modules/* |grep "^ *#" |grep -wq $(echo $(basename $SRCFILE) | rev | cut -f2- -d- | rev)$ ; then
+ echo "Source file '$(basename $SRCFILE)' is commented out in 'modules' !"
+ elif ! cat modules/* |grep -v "^ *#" |grep -wq $(echo $(basename $SRCFILE) | rev | cut -f2- -d- | rev) ; then
+ echo "Source file '$(basename $SRCFILE)' is not mentioned in 'modules' !"
+ RETVAL=1
+ fi
+ done
+
+ for MODULE in $(cat $CWD/modules/* | grep -v "^#") ; do
+ #if [ -z "$(find $CWD/src -name ${MODULE}-*)" ] ; then
+ if [ -z "$(find $CWD/src -name $MODULE-*.tar.* |grep -E "$MODULE-[^-]+.tar.*$|$MODULE-[0-9].+.tar.*$")" ] ; then
+ echo "Module '$MODULE' does not have a matching source tarball !"
+ if [ "$CHECKOUT" = "yes" -o "$CHECKOUT" = "YES" ]; then
+ echo "Checking out KDE component at branch '$VERSION'."
+ git archive --format=tar --prefix {$MODULE}-${VERSION}/ --remote ${KDEGITURI}/${MODULE}.git v${VERSION} | xz -c > $CWD/src/${MODULE}-${VERSION}.tar.xz
+ RETVAL=$?
+ if [ $RETVAL -ne 0 ]; then
+ echo "Error while checking out '$MODULE' !"
+ mv $CWD/src/${MODULE}-${VERSION}.tar.xz $CWD/src/${MODULE}-${VERSION}.tar.xz.failed
+ fi
+ else
+ RETVAL=1
+ fi
+ fi
+ # A missing slack-desc counts as fatal even if the program may end up
+ # inside the big meta-package.
+ if [ -z "$(find $CWD/slack-desc -name ${MODULE})" ] ; then
+ echo "Module '$MODULE' does not have a slack-desc file !"
+ RETVAL=1
+ fi
+ done
+
+ if [ $RETVAL -eq 0 ]; then
+ echo "Check complete, build starts in 5 seconds"
+ sleep 5
+ else
+ exit 1
+ fi
+}
+
+# Support function builds one complete module (like 'kdelibs'), or
+# exactly one package which is part of a module (like 'okular'):
+build_mod_pkg () {
+ kde_module=$1
+ kde_pkg=$2
+
+ cd $CWD/modules
+
+ # See if $kde_module is a module name like "kdeadmin":
+ if [ ! -z "$kde_module" ]; then
+ if [ ! -f "$kde_module" ]; then
+ return
+ fi
+ fi
+ PKG=${SLACK_KDE_BUILD_DIR}/${kde_module}/package-${kde_module}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( for PKGNAME in $(cat $kde_module |grep -v "^$" |grep -v "^#") ; do
+ # Find the full source filename - yeah ugly, but I had two goals:
+ # 1- source tarball can be in a random subdirectory of src/
+ # 2- differentiate between e.g. 'kdepim' and 'kdepim-runtime'
+ kde_src=$(basename $(find $CWD/src -name "$PKGNAME-*.tar.?z*" |grep -E "$PKGNAME-[^-]+.tar.*$|$PKGNAME-[0-9].+.tar.*$") 2>/dev/null)
+ if [ "x$kde_src" = "x" ]; then
+ echo "** Did not find '$PKGNAME' in src"
+ continue
+ fi
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_KDE_BUILD_DIR/${kde_module}
+ # If $kde_pkg is set, we only want to build one package:
+ if [ ! -z "$kde_pkg" ]; then
+ if [ "$kde_pkg" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_KDE_BUILD_DIR/${kde_module}/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${kde_src}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_KDE_BUILD_DIR/${kde_module}/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $kde_src | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $kde_src)
+ tar xf $(find $CWD/src -name ${kde_src}) || exit 1
+ cd $(pkgbase $kde_src) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch || exit 1
+ fi
+
+ # If there's any pre-install things to do, do them:
+ if [ -r $CWD/pre-install/${PKGNAME}.pre-install ]; then
+ . $CWD/pre-install/${PKGNAME}.pre-install
+ fi
+
+ # Run cmake, using custom cmake script if needed:
+ if [ -r $CWD/cmake/${PKGNAME} ]; then
+ . $CWD/cmake/${PKGNAME}
+ elif [ -r $CWD/cmake/${kde_module} ]; then
+ . $CWD/cmake/${kde_module}
+ else
+ # This is the default configure script:
+ . $CWD/cmake/cmake
+ fi
+
+ make $NUMJOBS || make || exit 1
+ make install DESTDIR=$PKG || exit 1
+
+ # Back to source toplevel builddir, since cmake may have run in a subdir:
+ cd $SLACK_KDE_BUILD_DIR/${kde_module}/$(pkgbase $kde_src)
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ # Use specific documentation files if available, else use a default set:
+ if [ -r $CWD/docs/${PKGNAME} ]; then
+ cp -a $(cat $CWD/docs/${PKGNAME}) \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ else
+ cp -a \
+ AUTHORS* CONTRIBUTING* COPYING* HACKING* \
+ INSTALL* MAINTAINERS README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ # If there's a ChangeLog, installing at least part of the recent
+ # history is useful, but don't let it get totally out of control:
+ if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # Strip binaries:
+ strip_binaries $PKG
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ . $CWD/post-install/${PKGNAME}.post-install
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_KDE_BUILD_DIR/${kde_module}/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_KDE_BUILD_DIR}/${kde_module}/${PKGNAME}-$(echo $MODULAR_PACKAGE_VERSION |tr - _)-${PKGARCH}-${MODBUILD}.txz
+ fi
+ # We will continue with the fresh packages installed:
+ upgradepkg --install-new --reinstall ${SLACK_KDE_BUILD_DIR}/${kde_module}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ # Keep MIME database current:
+ /usr/bin/update-mime-database /usr/share/mime 1>/dev/null 2>/dev/null &
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_KDE_BUILD_DIR}/${kde_module}/package-${kde_module}
+
+ done
+
+ # At this point, we have left the loop to build modular packages.
+ # We might need to build a package for the "<kde_module>", but to
+ # avoid needlessly repacking if there happens to be a package with
+ # the same name as "<kde_module>", we'll do some checks first.
+
+ # If every package listed in modules/"<kde_module>" is also listed
+ # in the modularize file, then there's no need to make a package
+ # for "<kde_module>":
+ echo
+ echo "Searching for packages in ${kde_module} that were not built modular:"
+ cat $CWD/modules/${kde_module} | grep -v "^#" | grep -v -w "^" | while read checkpackage ; do
+ if ! grep -wq "^$checkpackage" ${CWD}/modularize ; then
+ # Non-modular package found, so we'll have to build the package below.
+ # It might already have been built once, but in that case it is likely
+ # that more things have been added to the package directory since then.
+ echo "Found non-modular package $checkpackage."
+ exit 99
+ fi
+ done
+
+ # Exit if everything in "<kde_module>" was built modular:
+ if [ ! $? = 99 ]; then
+ echo "No non-modular components found in ${kde_module}."
+ echo "Not building catch-all package for ${kde_module}."
+ echo
+ return
+ fi
+
+ # If there's no /usr directory in the "<kde_module>" package directory,
+ # then skip it. There's nothing present worth packing up.
+ if [ ! -d ${SLACK_KDE_BUILD_DIR}/${kde_module}/package-${kde_module}/usr ]; then
+ echo "No /usr directory found in package-${kde_module}."
+ echo "Not building catch-all package for ${kde_module}."
+ echo
+ return
+ fi
+
+ # Build a "<kde_module>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+
+ # Put up a bit of a black-box warning, in case this was a mistake where
+ # something was meant to be listed in the modularize file and wasn't:
+ echo
+ echo "**************************************************************************"
+ echo "* Building combined package for non-modular parts of ${kde_module}"
+ echo "**************************************************************************"
+ echo
+
+ PKGARCH=$ARCH
+ cd $PKG
+
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/${kde_module}.post-install ]; then
+ . $CWD/post-install/${kde_module}.post-install
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${kde_module} ]; then
+ cat $CWD/slack-desc/${kde_module} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/${kde_module} ]; then
+ cat $CWD/doinst.sh/${kde_module} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/${kde_module} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/${kde_module})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${kde_module} ]; then
+ BUILD=$SRCDIRBUILD . $CWD/makepkg/${kde_module}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_KDE_BUILD_DIR}/${kde_module}/${kde_module}-$(echo $VERSION |tr - _)-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ # We will continue with the fresh packages installed:
+ upgradepkg --install-new --reinstall ${SLACK_KDE_BUILD_DIR}/${kde_module}/${kde_module}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ # Keep MIME database current:
+ /usr/bin/update-mime-database /usr/share/mime 1>/dev/null 2>/dev/null &
+ )
+}
+
+# Process the module queue. Format is:
+# module[:subpackage[,subpackage]] [module...]
+deterministic_build() {
+ RET=0
+ for ENTRY in $1 ; do
+ KDE_MOD=$(echo "$ENTRY": | cut -f1 -d:)
+ KDE_PKGS=$(echo "$ENTRY": | cut -f2 -d:)
+ if [ -z "$KDE_PKGS" ]; then
+ build_mod_pkg $KDE_MOD
+ let RET=$RET+$?
+ else
+ for KDE_PKG in $(echo $KDE_PKGS |tr ',' ' ') ; do
+ build_mod_pkg $KDE_MOD $KDE_PKG
+ let RET=$RET+$?
+ done
+ fi
+ done
+
+ return $RET
+}
+
+# MAIN PART #
+
+# Import the build configuration options for as far as they are not already set:
+[ -r ./KDE.options ] && . ./KDE.options
+
+# This avoids compiling a version number into KDE's .la files:
+QTDIR=/usr/lib${LIBDIRSUFFIX}/qt ; export QTDIR
+
+# Get the kde environment variables
+[ -d post-install/kdebase ] && eval $(sed -e "s#/lib#/lib${LIBDIRSUFFIX}#" ./post-install/kdebase/profile.d/kde.sh)
+
+# Where we are going to do all the hard labour:
+SLACK_KDE_BUILD_DIR=$TMP/kde_build
+mkdir -p $SLACK_KDE_BUILD_DIR
+
+# Yes, we know kde-workspace is built twice. kdebase needs the
+# plasma bits from it, and then we build it again for good measure...
+# Same goes for kdelibs (at least during KDE 4.8.x) kdeutils:ksecrets needs
+# kdelibs and then kdelibs needs a rebuild to pick up ksecretservice
+# (this will no longer be required in KDE 4.9).
+# And kde-baseapps is rebuilt after kdewebdev because it can then pickup
+# libtidy and enable the Konqueror validators plugin to validate HTML.
+KDEMODS=" \
+ kdelibs \
+ kdebase:nepomuk-core \
+ kdepimlibs \
+ kdebase \
+ kdesdk \
+ extragear:libkscreen \
+ kdegraphics \
+ kdebindings \
+ kdebase:kde-workspace \
+ kdeaccessibility \
+ kdeutils \
+ kdelibs \
+ kdemultimedia \
+ extragear:libktorrent \
+ kdenetwork \
+ oxygen-icons \
+ kdeadmin \
+ kdeartwork \
+ kdegames \
+ kdetoys \
+ kdepim \
+ kdepim-runtime \
+ kdenetwork:kopete \
+ kdeedu \
+ kdewebdev \
+ kdebase:kde-baseapps \
+ kdeplasma-addons \
+ polkit-kde \
+ extragear \
+ "
+
+# Allow for specification of individual packages to be built:
+if [ -z "$1" ]; then
+ MODQUEUE=$KDEMODS
+else
+ MODQUEUE="$*"
+fi
+
+# If requested, check if
+# sources, module definitions and slack-desc are complete and matching:
+if [ "$PRECHECK" = "yes" -o "$PRECHECK" = "YES" ]; then
+ precheck
+fi
+
+# And finally, start working!
+for module in \
+ $MODQUEUE ;
+do
+ echo "SlackBuild processing module '$module'"
+ deterministic_build $module
+ if [ $? = 0 ]; then
+ # Move the created packages up into the KDE build directory:
+ mv ${SLACK_KDE_BUILD_DIR}/$(echo $module |cut -f1 -d:)/*.t?z ${SLACK_KDE_BUILD_DIR}/
+ if [ "$CLEANUP" = "yes" -o "$CLEANUP" = "YES" ]; then
+ # Clean out package and build directories:
+ rm -rf ${SLACK_KDE_BUILD_DIR}/$(echo $module |cut -f1 -d:)
+ fi
+ else
+ echo "${module} failed to build."
+ exit 1
+ fi
+ cd - ;
+done
+
+exit 0
+
+
diff --git a/patches/source/kdelibs/KDE.options b/patches/source/kdelibs/KDE.options
new file mode 100644
index 000000000..30ec64c2b
--- /dev/null
+++ b/patches/source/kdelibs/KDE.options
@@ -0,0 +1,58 @@
+# Set default version/arch/build. You can override these settings
+# in the SlackBuild scripts for each package (koffice, for example,
+# usually has a different version number), or by setting your own
+# environment variables.
+
+[ -z $VERSION ] && export VERSION=4.10.5
+[ -z $BUILD ] && export BUILD=1
+
+# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
+if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i486 ;;
+ armv7hl) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+fi
+
+[ -z $PKGARCH ] && export PKGARCH=$ARCH
+
+# Use this as CFLAGS and CXXFLAGS:
+if [ -z "$SLKCFLAGS" ]; then
+ if [ "$ARCH" = "i486" ]; then
+ export SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ export LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "s390" ]; then
+ export SLKCFLAGS="-O2"
+ export LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "x86_64" ]; then
+ export SLKCFLAGS="-O2 -fPIC"
+ export LIBDIRSUFFIX="64"
+ elif [ "$ARCH" = "arm" ]; then
+ export SLKCFLAGS="-O2 -march=armv4 -mtune=xscale"
+ export LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "armel" ]; then
+ export SLKCFLAGS="-O2 -march=armv4t"
+ export LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "armv7hl" ]; then
+ export SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ export LIBDIRSUFFIX=""
+ else
+ export SLKCFLAGS="-O2"
+ export LIBDIRSUFFIX=""
+ fi
+fi
+
+# Use this to set the number of parallel make jobs:
+if [ -z "$NUMJOBS" ]; then
+ export NUMJOBS="-j7"
+fi
+
+# Additional cmake flags that are spanned across the KDE modules
+# Do not use "final build" unless we build an actual release.
+#export KDE_OPT_ARGS=" -DKDE4_ENABLE_FINAL=\"ON\" -DSITE=\"slackware.com\" "
+export KDE_OPT_ARGS=" -DKDE4_BUILD_TESTS=OFF -DSITE=\"slackware.com\" -DKDE_DISTRIBUTION_TEXT=\"volkerdi@slackware.com\" "
+
diff --git a/patches/source/kdelibs/build/kdelibs b/patches/source/kdelibs/build/kdelibs
new file mode 100644
index 000000000..26ea681e1
--- /dev/null
+++ b/patches/source/kdelibs/build/kdelibs
@@ -0,0 +1 @@
+3_slack14.1
diff --git a/patches/source/kdelibs/cmake/kdelibs b/patches/source/kdelibs/cmake/kdelibs
new file mode 100644
index 000000000..92015a911
--- /dev/null
+++ b/patches/source/kdelibs/cmake/kdelibs
@@ -0,0 +1,17 @@
+mkdir -p build
+cd build
+ cmake \
+ $KDE_OPT_ARGS \
+ -DWITH_HAL=OFF \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DMAN_INSTALL_DIR=/usr/man \
+ -DSYSCONF_INSTALL_DIR=/etc/kde \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DKDE_DISTRIBUTION_TEXT="volkerdi@slackware.com" \
+ ..
+
diff --git a/patches/source/kdelibs/doinst.sh/kdelibs b/patches/source/kdelibs/doinst.sh/kdelibs
new file mode 100644
index 000000000..d7006c70a
--- /dev/null
+++ b/patches/source/kdelibs/doinst.sh/kdelibs
@@ -0,0 +1,9 @@
+
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database /usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -x usr/bin/update-mime-database ]; then
+ /usr/bin/update-mime-database /usr/share/mime >/dev/null 2>&1
+fi
+
diff --git a/patches/source/kdelibs/kdelibs.SlackBuild b/patches/source/kdelibs/kdelibs.SlackBuild
new file mode 100755
index 000000000..542ddb604
--- /dev/null
+++ b/patches/source/kdelibs/kdelibs.SlackBuild
@@ -0,0 +1,2 @@
+./KDE.SlackBuild kdelibs:kdelibs
+mv /tmp/kde_build/kdelibs*txz /tmp
diff --git a/patches/source/kdelibs/modularize b/patches/source/kdelibs/modularize
new file mode 100644
index 000000000..4dd401b5a
--- /dev/null
+++ b/patches/source/kdelibs/modularize
@@ -0,0 +1,268 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+#
+# Things to note:
+#
+# Listing a package here will not cause it to be built. To do that,
+# make sure it is added to one of the files in the modules/ directory
+# that is built by the main KDE.SlackBuild script.
+#
+# If a subpackage name happens to be the same as the "grab bag" package
+# that contains it, you need to be a bit careful. Unless everything
+# in that collection will be built modular, *do not* list that name
+# here! If you do, first the module by that name will be built, and
+# then everything that's not modular in that collection will be built
+# into a "grab bag" that will replace that first package.
+#
+# If the goal is to build the most combined packages possible, the
+# easiest way to accomplish that is just to move this file out of the
+# way and replace it with an empty one before building.
+
+# kdeaccessibility
+jovie
+kaccessible
+kmouth
+kmousetool
+kmag
+
+# kdelibs:
+kdelibs
+
+# kdebase:
+baloo
+baloo-widgets
+nepomuk-core
+nepomuk-widgets
+kfilemetadata
+kde-baseapps
+kactivities
+konsole
+kate
+kde-wallpapers
+kde-workspace
+kde-runtime
+kde-base-artwork
+
+# kdeedu:
+libkdeedu
+analitza
+artikulate
+blinken
+cantor
+kalgebra
+kalzium
+kanagram
+kbruch
+kgeography
+khangman
+kig
+kiten
+klettres
+kmplot
+kqtquickcharts
+kstars
+ktouch
+kturtle
+kwordquiz
+marble
+parley
+pairs
+rocs
+step
+
+# kdeadmin
+kcron
+ksystemlog
+kuser
+#kdeadmin
+
+# kdeartwork
+kdeartwork
+
+# kdegraphics:
+libkipi
+libkexiv2
+libkdcraw
+libksane
+okular
+kdegraphics-mobipocket
+kdegraphics-strigi-analyzer
+kdegraphics-thumbnailers
+gwenview
+kamera
+kcolorchooser
+kgamma
+kolourpaint
+kruler
+ksaneplugin
+ksnapshot
+svgpart
+
+# kdebindings
+smokegen
+smokeqt
+qtruby
+perlqt
+smokekde
+korundum
+perlkde
+pykde4
+kross-interpreters
+kimono
+qyoto
+
+# kdemultimedia
+libkcddb
+libkcompactdisc
+audiocd-kio
+dragon
+ffmpegthumbs
+mplayerthumbs
+juk
+kmix
+kscd
+
+# kdenetwork
+kdenetwork-filesharing
+kdenetwork-strigi-analyzers
+#kdnssd
+zeroconf-ioslave
+kget
+kopete
+kppp
+krdc
+krfb
+#kdenetwork
+
+# kdeutils
+ark
+filelight
+kcalc
+kcharselect
+kdf
+kfloppy
+kgpg
+#printer-applet
+print-manager
+kremotecontrol
+ktimer
+kwalletmanager
+superkaramba
+sweeper
+
+# kdegames
+libkdegames
+libkmahjongg
+klickety
+ksudoku
+ksquares
+kpat
+klines
+ksnakeduel
+kollision
+kshisen
+kblocks
+lskat
+kreversi
+bovo
+kajongg
+granatier
+kmines
+kiriki
+kigo
+bomber
+kolf
+kdiamond
+kbounce
+konquest
+kapman
+knavalbattle
+killbots
+kubrick
+kgoldrunner
+knetwalk
+kbreakout
+ksirk
+kfourinline
+picmi
+kblackbox
+palapeli
+katomic
+ktuberling
+kjumpingcube
+kmahjongg
+kspaceduel
+
+# kdewebdev
+kdewebdev
+
+# kdepim
+kdepim
+kdepim-runtime
+
+# kdepimlibs
+kdepimlibs
+
+# kdeplasma-addons
+kdeplasma-addons
+
+# kdesdk
+cervisia
+dolphin-plugins
+kapptemplate
+kcachegrind
+kde-dev-scripts
+kde-dev-utils
+kdesdk-kioslaves
+kdesdk-strigi-analyzers
+kdesdk-thumbnailers
+libkomparediff2
+kompare
+lokalize
+okteta
+poxml
+umbrello
+#kdesdk
+
+# kdetoys
+amor
+kteatime
+ktux
+#kdetoys
+
+# oxygen-icons
+oxygen-icons
+
+# polkit-kde
+polkit-kde-agent-1
+polkit-kde-kcmodules-1
+
+# extragear
+bluedevil
+k3b
+kaudiocreator
+kplayer
+kwebkitpart
+oxygen-gtk2
+kdevplatform
+kdevelop-pg-qt
+kdevelop
+kdev-python
+kdevelop-php
+kdevelop-php-docs
+#quanta
+wicd-kde
+libmm-qt
+libnm-qt
+plasma-nm
+skanlite
+kio-mtp
+libktorrent
+ktorrent
+amarok
+calligra
+libkscreen
+kscreen
+partitionmanager
+kdeconnect-kde
+
diff --git a/patches/source/kdelibs/modules/kdelibs b/patches/source/kdelibs/modules/kdelibs
new file mode 100644
index 000000000..473159785
--- /dev/null
+++ b/patches/source/kdelibs/modules/kdelibs
@@ -0,0 +1 @@
+kdelibs
diff --git a/patches/source/kdelibs/noarch b/patches/source/kdelibs/noarch
new file mode 100644
index 000000000..0c1318f12
--- /dev/null
+++ b/patches/source/kdelibs/noarch
@@ -0,0 +1,5 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+
+kde-wallpapers
+
diff --git a/patches/source/kdelibs/package-blacklist b/patches/source/kdelibs/package-blacklist
new file mode 100644
index 000000000..71e99c40c
--- /dev/null
+++ b/patches/source/kdelibs/package-blacklist
@@ -0,0 +1,9 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+## kdebindings:
+# needs c-sharp:
+kimono
+qyoto
+
diff --git a/patches/source/kdelibs/patch/kdelibs.patch b/patches/source/kdelibs/patch/kdelibs.patch
new file mode 100644
index 000000000..2e31daee4
--- /dev/null
+++ b/patches/source/kdelibs/patch/kdelibs.patch
@@ -0,0 +1,17 @@
+# Slackware ships a different version of XML DTDs:
+zcat $CWD/patch/kdelibs/kdelibs.docbook.patch.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
+# Make uPnP support depend on the environment variable SOLID_UPNP,
+# e.g. by creating an /etc/profile.d/upnp.sh file with the following contents:
+# export SOLID_UPNP=1
+zcat $CWD/patch/kdelibs/kdelibs.upnp_conditional.patch.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
+# Revert 3 patches which (although they probably follow the FDo spec better),
+# cause incorrect icon overrides:
+zcat $CWD/patch/kdelibs/return-not-break.-copy-paste-error.patch.gz | patch -R -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/kdelibs/coding-style-fixes.patch.gz | patch -R -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/kdelibs/return-application-icons-properly.patch.gz | patch -R -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
+# Fix KAuth local root security issue:
+zcat $CWD/patch/kdelibs/kdelibs.CVE-2017-8422.diff.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/patches/source/kdelibs/patch/kdelibs/coding-style-fixes.patch b/patches/source/kdelibs/patch/kdelibs/coding-style-fixes.patch
new file mode 100644
index 000000000..11108f0a4
--- /dev/null
+++ b/patches/source/kdelibs/patch/kdelibs/coding-style-fixes.patch
@@ -0,0 +1,62 @@
+From 2173580f070e806d4715e13048c697c49ec262e2 Mon Sep 17 00:00:00 2001
+From: Aaron Seigo <aseigo@kde.org>
+Date: Thu, 21 Feb 2013 17:59:58 +0100
+Subject: [PATCH 047/111] coding style fixes
+
+---
+ kdeui/icons/kiconloader.cpp | 27 ++++++++++++---------------
+ 1 file changed, 12 insertions(+), 15 deletions(-)
+
+diff --git a/kdeui/icons/kiconloader.cpp b/kdeui/icons/kiconloader.cpp
+index 6fed667..dba474d 100644
+--- a/kdeui/icons/kiconloader.cpp
++++ b/kdeui/icons/kiconloader.cpp
+@@ -938,32 +938,29 @@ K3Icon KIconLoaderPrivate::findMatchingIcon(const QString& name, int size) const
+ }
+ }
+
+- foreach (KIconThemeNode *themeNode, links)
+- {
++ foreach (KIconThemeNode *themeNode, links) {
+ QString currentName = name;
+
+- while (!currentName.isEmpty())
+- {
+-
++ while (!currentName.isEmpty()) {
+ //kDebug(264) << "Looking up" << currentName;
+
+-// The following code has been commented out because the Qt SVG renderer needs
+-// to be improved. If you are going to change/remove some code from this part,
+-// please contact me before (ereslibre@kde.org), or kde-core-devel@kde.org. (ereslibre)
+- for (int i = 0 ; i < 4 ; i++)
+- {
++ for (int i = 0 ; i < 4 ; i++) {
+ icon = themeNode->theme->iconPath(currentName + ext[i], size, KIconLoader::MatchExact);
+- if (icon.isValid())
+- return icon;
++ if (icon.isValid()) {
++ break;
++ }
+
+ icon = themeNode->theme->iconPath(currentName + ext[i], size, KIconLoader::MatchBest);
+- if (icon.isValid())
+- return icon;
++ if (icon.isValid()) {
++ break;
++ }
+ }
++ //kDebug(264) << "Looking up" << currentName;
+
+- if (genericFallback)
++ if (genericFallback) {
+ // we already tested the base name
+ break;
++ }
+
+ int rindex = currentName.lastIndexOf('-');
+ if (rindex > 1) { // > 1 so that we don't split x-content or x-epoc
+--
+1.8.1.4
+
+
diff --git a/patches/source/kdelibs/patch/kdelibs/kdelibs.CVE-2017-8422.diff b/patches/source/kdelibs/patch/kdelibs/kdelibs.CVE-2017-8422.diff
new file mode 100644
index 000000000..221dc8f98
--- /dev/null
+++ b/patches/source/kdelibs/patch/kdelibs/kdelibs.CVE-2017-8422.diff
@@ -0,0 +1,201 @@
+From 264e97625abe2e0334f97de17f6ffb52582888ab Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid@kde.org>
+Date: Wed, 10 May 2017 10:06:07 +0200
+Subject: Verify that whoever is calling us is actually who he says he is
+
+CVE-2017-8422
+---
+ kdecore/auth/AuthBackend.cpp | 5 ++++
+ kdecore/auth/AuthBackend.h | 7 ++++++
+ kdecore/auth/backends/dbus/DBusHelperProxy.cpp | 27 ++++++++++++++++++++--
+ kdecore/auth/backends/dbus/DBusHelperProxy.h | 6 ++++-
+ .../auth/backends/policykit/PolicyKitBackend.cpp | 5 ++++
+ kdecore/auth/backends/policykit/PolicyKitBackend.h | 1 +
+ kdecore/auth/backends/polkit-1/Polkit1Backend.cpp | 5 ++++
+ kdecore/auth/backends/polkit-1/Polkit1Backend.h | 1 +
+ 8 files changed, 54 insertions(+), 3 deletions(-)
+
+diff --git a/kdecore/auth/AuthBackend.cpp b/kdecore/auth/AuthBackend.cpp
+index c953b81..0ba4650 100644
+--- a/kdecore/auth/AuthBackend.cpp
++++ b/kdecore/auth/AuthBackend.cpp
+@@ -54,6 +54,11 @@ void AuthBackend::setCapabilities(AuthBackend::Capabilities capabilities)
+ d->capabilities = capabilities;
+ }
+
++AuthBackend::ExtraCallerIDVerificationMethod AuthBackend::extraCallerIDVerificationMethod() const
++{
++ return NoExtraCallerIDVerificationMethod;
++}
++
+ bool AuthBackend::actionExists(const QString& action)
+ {
+ Q_UNUSED(action);
+diff --git a/kdecore/auth/AuthBackend.h b/kdecore/auth/AuthBackend.h
+index a86732e..6f4b1bc 100644
+--- a/kdecore/auth/AuthBackend.h
++++ b/kdecore/auth/AuthBackend.h
+@@ -43,6 +43,12 @@ public:
+ };
+ Q_DECLARE_FLAGS(Capabilities, Capability)
+
++ enum ExtraCallerIDVerificationMethod {
++ NoExtraCallerIDVerificationMethod,
++ VerifyAgainstDBusServiceName,
++ VerifyAgainstDBusServicePid,
++ };
++
+ AuthBackend();
+ virtual ~AuthBackend();
+ virtual void setupAction(const QString &action) = 0;
+@@ -50,6 +56,7 @@ public:
+ virtual Action::AuthStatus authorizeAction(const QString &action) = 0;
+ virtual Action::AuthStatus actionStatus(const QString &action) = 0;
+ virtual QByteArray callerID() const = 0;
++ virtual ExtraCallerIDVerificationMethod extraCallerIDVerificationMethod() const;
+ virtual bool isCallerAuthorized(const QString &action, QByteArray callerID) = 0;
+ virtual bool actionExists(const QString &action);
+
+diff --git a/kdecore/auth/backends/dbus/DBusHelperProxy.cpp b/kdecore/auth/backends/dbus/DBusHelperProxy.cpp
+index 9557a0f..ca59f1c 100644
+--- a/kdecore/auth/backends/dbus/DBusHelperProxy.cpp
++++ b/kdecore/auth/backends/dbus/DBusHelperProxy.cpp
+@@ -271,6 +271,29 @@ void DBusHelperProxy::performActions(QByteArray blob, const QByteArray &callerID
+ }
+ }
+
++bool DBusHelperProxy::isCallerAuthorized(const QString &action, const QByteArray &callerID)
++{
++ // Check the caller is really who it says it is
++ switch (BackendsManager::authBackend()->extraCallerIDVerificationMethod()) {
++ case AuthBackend::NoExtraCallerIDVerificationMethod:
++ break;
++
++ case AuthBackend::VerifyAgainstDBusServiceName:
++ if (message().service().toUtf8() != callerID) {
++ return false;
++ }
++ break;
++
++ case AuthBackend::VerifyAgainstDBusServicePid:
++ if (connection().interface()->servicePid(message().service()).value() != callerID.toUInt()) {
++ return false;
++ }
++ break;
++ }
++
++ return BackendsManager::authBackend()->isCallerAuthorized(action, callerID);
++}
++
+ QByteArray DBusHelperProxy::performAction(const QString &action, const QByteArray &callerID, QByteArray arguments)
+ {
+ if (!responder) {
+@@ -295,7 +318,7 @@ QByteArray DBusHelperProxy::performAction(const QString &action, const QByteArra
+ QTimer *timer = responder->property("__KAuth_Helper_Shutdown_Timer").value<QTimer*>();
+ timer->stop();
+
+- if (BackendsManager::authBackend()->isCallerAuthorized(action, callerID)) {
++ if (isCallerAuthorized(action, callerID)) {
+ QString slotname = action;
+ if (slotname.startsWith(m_name + QLatin1Char('.'))) {
+ slotname = slotname.right(slotname.length() - m_name.length() - 1);
+@@ -338,7 +361,7 @@ uint DBusHelperProxy::authorizeAction(const QString& action, const QByteArray& c
+ QTimer *timer = responder->property("__KAuth_Helper_Shutdown_Timer").value<QTimer*>();
+ timer->stop();
+
+- if (BackendsManager::authBackend()->isCallerAuthorized(action, callerID)) {
++ if (isCallerAuthorized(action, callerID)) {
+ retVal = static_cast<uint>(Action::Authorized);
+ } else {
+ retVal = static_cast<uint>(Action::Denied);
+diff --git a/kdecore/auth/backends/dbus/DBusHelperProxy.h b/kdecore/auth/backends/dbus/DBusHelperProxy.h
+index 455cf51..264f6cc 100644
+--- a/kdecore/auth/backends/dbus/DBusHelperProxy.h
++++ b/kdecore/auth/backends/dbus/DBusHelperProxy.h
+@@ -21,6 +21,7 @@
+ #ifndef DBUS_HELPER_PROXY_H
+ #define DBUS_HELPER_PROXY_H
+
++#include <QDBusContext>
+ #include <QVariant>
+ #include "HelperProxy.h"
+ #include "kauthactionreply.h"
+@@ -28,7 +29,7 @@
+ namespace KAuth
+ {
+
+-class DBusHelperProxy : public HelperProxy
++class DBusHelperProxy : public HelperProxy, protected QDBusContext
+ {
+ Q_OBJECT
+ Q_INTERFACES(KAuth::HelperProxy)
+@@ -73,6 +74,9 @@ signals:
+
+ private slots:
+ void remoteSignalReceived(int type, const QString &action, QByteArray blob);
++
++private:
++ bool isCallerAuthorized(const QString &action, const QByteArray &callerID);
+ };
+
+ } // namespace Auth
+diff --git a/kdecore/auth/backends/policykit/PolicyKitBackend.cpp b/kdecore/auth/backends/policykit/PolicyKitBackend.cpp
+index 3be97f2..9d041d1 100644
+--- a/kdecore/auth/backends/policykit/PolicyKitBackend.cpp
++++ b/kdecore/auth/backends/policykit/PolicyKitBackend.cpp
+@@ -78,6 +78,11 @@ QByteArray PolicyKitBackend::callerID() const
+ return a;
+ }
+
++AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
++{
++ return VerifyAgainstDBusServicePid;
++}
++
+ bool PolicyKitBackend::isCallerAuthorized(const QString &action, QByteArray callerID)
+ {
+ QDataStream s(&callerID, QIODevice::ReadOnly);
+diff --git a/kdecore/auth/backends/policykit/PolicyKitBackend.h b/kdecore/auth/backends/policykit/PolicyKitBackend.h
+index 7154e93..0d3d8f9 100644
+--- a/kdecore/auth/backends/policykit/PolicyKitBackend.h
++++ b/kdecore/auth/backends/policykit/PolicyKitBackend.h
+@@ -40,6 +40,7 @@ public:
+ virtual Action::AuthStatus authorizeAction(const QString&);
+ virtual Action::AuthStatus actionStatus(const QString&);
+ virtual QByteArray callerID() const;
++ virtual ExtraCallerIDVerificationMethod extraCallerIDVerificationMethod() const;
+ virtual bool isCallerAuthorized(const QString &action, QByteArray callerID);
+
+ private Q_SLOTS:
+diff --git a/kdecore/auth/backends/polkit-1/Polkit1Backend.cpp b/kdecore/auth/backends/polkit-1/Polkit1Backend.cpp
+index 732d2cb..63c0e1e 100644
+--- a/kdecore/auth/backends/polkit-1/Polkit1Backend.cpp
++++ b/kdecore/auth/backends/polkit-1/Polkit1Backend.cpp
+@@ -163,6 +163,11 @@ QByteArray Polkit1Backend::callerID() const
+ return QDBusConnection::systemBus().baseService().toUtf8();
+ }
+
++AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
++{
++ return VerifyAgainstDBusServiceName;
++}
++
+ bool Polkit1Backend::isCallerAuthorized(const QString &action, QByteArray callerID)
+ {
+ PolkitQt1::SystemBusNameSubject subject(QString::fromUtf8(callerID));
+diff --git a/kdecore/auth/backends/polkit-1/Polkit1Backend.h b/kdecore/auth/backends/polkit-1/Polkit1Backend.h
+index 18ed1a2..d579da2 100644
+--- a/kdecore/auth/backends/polkit-1/Polkit1Backend.h
++++ b/kdecore/auth/backends/polkit-1/Polkit1Backend.h
+@@ -48,6 +48,7 @@ public:
+ virtual Action::AuthStatus authorizeAction(const QString&);
+ virtual Action::AuthStatus actionStatus(const QString&);
+ virtual QByteArray callerID() const;
++ virtual ExtraCallerIDVerificationMethod extraCallerIDVerificationMethod() const;
+ virtual bool isCallerAuthorized(const QString &action, QByteArray callerID);
+ virtual bool actionExists(const QString& action);
+
+--
+cgit v0.11.2
+
+
diff --git a/patches/source/kdelibs/patch/kdelibs/kdelibs.docbook.patch b/patches/source/kdelibs/patch/kdelibs/kdelibs.docbook.patch
new file mode 100644
index 000000000..6a20cd279
--- /dev/null
+++ b/patches/source/kdelibs/patch/kdelibs/kdelibs.docbook.patch
@@ -0,0 +1,11 @@
+--- kdelibs-4.4.85/cmake/modules/FindDocBookXML.cmake.orig 2010-05-27 19:25:00.000000000 +0200
++++ kdelibs-4.4.85/cmake/modules/FindDocBookXML.cmake 2010-06-07 16:18:35.000000000 +0200
+@@ -12,7 +12,7 @@
+ # Redistribution and use is allowed according to the terms of the BSD license.
+ # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+-set (DOCBOOKXML_CURRENTDTD_VERSION "4.2"
++set (DOCBOOKXML_CURRENTDTD_VERSION "4.5"
+ CACHE INTERNAL "Required version of XML DTDs")
+
+ set (DTD_PATH_LIST
diff --git a/patches/source/kdelibs/patch/kdelibs/kdelibs.upnp_conditional.patch b/patches/source/kdelibs/patch/kdelibs/kdelibs.upnp_conditional.patch
new file mode 100644
index 000000000..3a1944774
--- /dev/null
+++ b/patches/source/kdelibs/patch/kdelibs/kdelibs.upnp_conditional.patch
@@ -0,0 +1,15 @@
+--- kdelibs-4.8.0/solid/solid/managerbase.cpp.orig 2011-07-27 20:34:39.000000000 +0200
++++ kdelibs-4.8.0/solid/solid/managerbase.cpp 2012-01-26 09:17:49.409993419 +0100
+@@ -90,7 +90,11 @@
+ # endif
+
+ # if defined (HUPNP_FOUND)
+- m_backends << new Solid::Backends::UPnP::UPnPDeviceManager(0);
++ bool solidUpnpEnabled
++ = QString::fromLocal8Bit(qgetenv("SOLID_UPNP")).toInt()==1;
++ if (solidUpnpEnabled) {
++ m_backends << new Solid::Backends::UPnP::UPnPDeviceManager(0);
++ }
+ # endif
+ }
+ }
diff --git a/patches/source/kdelibs/patch/kdelibs/return-application-icons-properly.patch b/patches/source/kdelibs/patch/kdelibs/return-application-icons-properly.patch
new file mode 100644
index 000000000..2bdb53adf
--- /dev/null
+++ b/patches/source/kdelibs/patch/kdelibs/return-application-icons-properly.patch
@@ -0,0 +1,56 @@
+From 613c951a1157df0d8a907a155a5eaa706816d5f9 Mon Sep 17 00:00:00 2001
+From: Aaron Seigo <aseigo@kde.org>
+Date: Thu, 21 Feb 2013 17:58:11 +0100
+Subject: return application icons properly
+
+BUG:315578
+---
+ kdeui/icons/kiconloader.cpp | 31 ++++++++++++++++++++++++++++++-
+ 1 file changed, 30 insertions(+), 1 deletion(-)
+
+diff --git a/kdeui/icons/kiconloader.cpp b/kdeui/icons/kiconloader.cpp
+index f65e941..6fed667 100644
+--- a/kdeui/icons/kiconloader.cpp
++++ b/kdeui/icons/kiconloader.cpp
+@@ -909,7 +909,36 @@ K3Icon KIconLoaderPrivate::findMatchingIcon(const QString& name, int size) const
+ const char * const ext[4] = { ".png", ".svgz", ".svg", ".xpm" };
+ bool genericFallback = name.endsWith(QLatin1String("-x-generic"));
+
+- foreach(KIconThemeNode *themeNode, links)
++ // Do two passes through themeNodes.
++ //
++ // The first pass looks for an exact match in each themeNode one after the other.
++ // If one is found and it is an app icon then return that icon.
++ //
++ // In the next pass (assuming the first pass failed), it looks for exact matches
++ // and then generic fallbacks in each themeNode one after the other
++ //
++ // The reasoning is that application icons should always match exactly, all other
++ // icons may fallback. Since we do not know what the context is here when we start
++ // looking for it, we can only go by the path found.
++ foreach (KIconThemeNode *themeNode, links) {
++ for (int i = 0 ; i < 4 ; i++) {
++ icon = themeNode->theme->iconPath(name + ext[i], size, KIconLoader::MatchExact);
++ if (icon.isValid()) {
++ break;
++ }
++
++ icon = themeNode->theme->iconPath(name + ext[i], size, KIconLoader::MatchBest);
++ if (icon.isValid()) {
++ break;
++ }
++ }
++
++ if (icon.isValid() && icon.path.contains("/apps/")) {
++ return icon;
++ }
++ }
++
++ foreach (KIconThemeNode *themeNode, links)
+ {
+ QString currentName = name;
+
+--
+1.8.1.4
+
+
diff --git a/patches/source/kdelibs/patch/kdelibs/return-not-break.-copy-paste-error.patch b/patches/source/kdelibs/patch/kdelibs/return-not-break.-copy-paste-error.patch
new file mode 100644
index 000000000..b62818ed6
--- /dev/null
+++ b/patches/source/kdelibs/patch/kdelibs/return-not-break.-copy-paste-error.patch
@@ -0,0 +1,31 @@
+From 0edfd42151ad57322a10a24ab4971b638e220e6e Mon Sep 17 00:00:00 2001
+From: Aaron Seigo <aseigo@kde.org>
+Date: Thu, 21 Feb 2013 18:14:54 +0100
+Subject: [PATCH 049/111] return, not break. copy/paste error
+
+---
+ kdeui/icons/kiconloader.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/kdeui/icons/kiconloader.cpp b/kdeui/icons/kiconloader.cpp
+index dba474d..ce6aeea 100644
+--- a/kdeui/icons/kiconloader.cpp
++++ b/kdeui/icons/kiconloader.cpp
+@@ -947,12 +947,12 @@ K3Icon KIconLoaderPrivate::findMatchingIcon(const QString& name, int size) const
+ for (int i = 0 ; i < 4 ; i++) {
+ icon = themeNode->theme->iconPath(currentName + ext[i], size, KIconLoader::MatchExact);
+ if (icon.isValid()) {
+- break;
++ return icon;
+ }
+
+ icon = themeNode->theme->iconPath(currentName + ext[i], size, KIconLoader::MatchBest);
+ if (icon.isValid()) {
+- break;
++ return icon;
+ }
+ }
+ //kDebug(264) << "Looking up" << currentName;
+--
+1.8.1.4
+
diff --git a/patches/source/kdelibs/post-install/kdelibs.post-install b/patches/source/kdelibs/post-install/kdelibs.post-install
new file mode 100644
index 000000000..9239a3e5f
--- /dev/null
+++ b/patches/source/kdelibs/post-install/kdelibs.post-install
@@ -0,0 +1,2 @@
+# Move the polkit dbus configuration files to the proper place:
+mv $PKG/etc/kde/dbus-1 $PKG/etc/
diff --git a/patches/source/kdelibs/slack-desc/kdelibs b/patches/source/kdelibs/slack-desc/kdelibs
new file mode 100644
index 000000000..a89ea3c8a
--- /dev/null
+++ b/patches/source/kdelibs/slack-desc/kdelibs
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+kdelibs: kdelibs (KDE libraries)
+kdelibs:
+kdelibs: System libraries and other resources required for the KDE Platform.
+kdelibs:
+kdelibs:
+kdelibs:
+kdelibs:
+kdelibs:
+kdelibs:
+kdelibs:
+kdelibs:
diff --git a/patches/source/libX11/arch.use.flags b/patches/source/libX11/arch.use.flags
new file mode 100644
index 000000000..11087c884
--- /dev/null
+++ b/patches/source/libX11/arch.use.flags
@@ -0,0 +1,9 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/libX11/build/libX11 b/patches/source/libX11/build/libX11
new file mode 100644
index 000000000..a55e8cfcf
--- /dev/null
+++ b/patches/source/libX11/build/libX11
@@ -0,0 +1 @@
+1_slack14.1
diff --git a/patches/source/libX11/configure/libX11 b/patches/source/libX11/configure/libX11
new file mode 100644
index 000000000..cf85e58d4
--- /dev/null
+++ b/patches/source/libX11/configure/libX11
@@ -0,0 +1,12 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/libX11/libX11.SlackBuild b/patches/source/libX11/libX11.SlackBuild
new file mode 100755
index 000000000..6db227798
--- /dev/null
+++ b/patches/source/libX11/libX11.SlackBuild
@@ -0,0 +1,2 @@
+UPGRADE_PACKAGES=no ./x11.SlackBuild lib libX11
+mv /tmp/x11-build/libX11*txz /tmp
diff --git a/patches/source/libX11/modularize b/patches/source/libX11/modularize
new file mode 100644
index 000000000..8a28ed93e
--- /dev/null
+++ b/patches/source/libX11/modularize
@@ -0,0 +1,279 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+dri3proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glamor-egl
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXpresent
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+libxshmfence
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+presentproto
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-errors
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-amdgpu
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/libX11/noarch b/patches/source/libX11/noarch
new file mode 100644
index 000000000..8785ee527
--- /dev/null
+++ b/patches/source/libX11/noarch
@@ -0,0 +1,75 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/libX11/package-blacklist b/patches/source/libX11/package-blacklist
new file mode 100644
index 000000000..603b8c31f
--- /dev/null
+++ b/patches/source/libX11/package-blacklist
@@ -0,0 +1,44 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+xf86-video-modesetting
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/libX11/post-install/libX11.post-install b/patches/source/libX11/post-install/libX11.post-install
new file mode 100644
index 000000000..7232b6802
--- /dev/null
+++ b/patches/source/libX11/post-install/libX11.post-install
@@ -0,0 +1,2 @@
+mkdir -p $PKG/usr/share/X11
+zcat $CWD/post-install/libX11/XKeysymDB.gz > $PKG/usr/share/X11/XKeysymDB
diff --git a/patches/source/libX11/slack-desc/libX11 b/patches/source/libX11/slack-desc/libX11
new file mode 100644
index 000000000..2ec4f39a3
--- /dev/null
+++ b/patches/source/libX11/slack-desc/libX11
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libX11: libX11 (Core X11 protocol client library)
+libX11:
+libX11: libX11 is part of X11.
+libX11:
+libX11: For more information about the X.Org Foundation (the providers of the
+libX11: X.Org implementation of the X Window System), see their website:
+libX11:
+libX11: http://www.x.org
+libX11:
+libX11:
+libX11:
diff --git a/patches/source/libX11/x11.SlackBuild b/patches/source/libX11/x11.SlackBuild
new file mode 100755
index 000000000..c3887dff2
--- /dev/null
+++ b/patches/source/libX11/x11.SlackBuild
@@ -0,0 +1,381 @@
+#!/bin/sh
+# Copyright 2007-2014 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ chown -R root:root .
+ find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.*
+ )
+ done
+ )
+ fi
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+
+ # If there's a ChangeLog, installing at least part of the recent history
+ # is useful, but don't let it get totally out of control:
+ if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # Strip binaries:
+ ( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/libXcursor/arch.use.flags b/patches/source/libXcursor/arch.use.flags
new file mode 100644
index 000000000..f28a6ccab
--- /dev/null
+++ b/patches/source/libXcursor/arch.use.flags
@@ -0,0 +1,7 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/libXcursor/build/increment.sh b/patches/source/libXcursor/build/increment.sh
new file mode 100755
index 000000000..6de5d0da6
--- /dev/null
+++ b/patches/source/libXcursor/build/increment.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+# A script to increment build numbers.
+# Call it with the list of the build numbers to increase by one:
+#
+# ./increment.sh xf86-input-acecad xf86-input-aiptek xf86-input-joystick
+#
+# If a build file does not exist, it will be created with a value of 2.
+
+for build in $* ; do
+ if [ ! -r $build ]; then
+ echo "Creating $build with value 2"
+ echo 2 > $build
+ else
+ echo "Incrementing $build $(cat $build) -> $(expr $(cat $build) + 1)"
+ echo $(expr $(cat $build) + 1) > $build
+ fi
+done
diff --git a/patches/source/libXcursor/build/libXcursor b/patches/source/libXcursor/build/libXcursor
new file mode 100644
index 000000000..a55e8cfcf
--- /dev/null
+++ b/patches/source/libXcursor/build/libXcursor
@@ -0,0 +1 @@
+1_slack14.1
diff --git a/patches/source/libXcursor/configure/configure b/patches/source/libXcursor/configure/configure
new file mode 100644
index 000000000..0f3bccf24
--- /dev/null
+++ b/patches/source/libXcursor/configure/configure
@@ -0,0 +1,12 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/libXcursor/libXcursor.SlackBuild b/patches/source/libXcursor/libXcursor.SlackBuild
new file mode 100755
index 000000000..4d4f81d27
--- /dev/null
+++ b/patches/source/libXcursor/libXcursor.SlackBuild
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Copyright 2017 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+UPGRADE_PACKAGES=no sh x11-build-script.sh lib libXcursor
+mv --verbose /tmp/x11-build/*.txz /tmp
+
diff --git a/patches/source/libXcursor/modularize b/patches/source/libXcursor/modularize
new file mode 100644
index 000000000..38762ffda
--- /dev/null
+++ b/patches/source/libXcursor/modularize
@@ -0,0 +1,272 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/libXcursor/noarch b/patches/source/libXcursor/noarch
new file mode 100644
index 000000000..480ffc26c
--- /dev/null
+++ b/patches/source/libXcursor/noarch
@@ -0,0 +1,76 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-cf-files
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/libXcursor/package-blacklist b/patches/source/libXcursor/package-blacklist
new file mode 100644
index 000000000..8e2f3eb5c
--- /dev/null
+++ b/patches/source/libXcursor/package-blacklist
@@ -0,0 +1,43 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/libXcursor/slack-desc/libXcursor b/patches/source/libXcursor/slack-desc/libXcursor
new file mode 100644
index 000000000..2906c6aaf
--- /dev/null
+++ b/patches/source/libXcursor/slack-desc/libXcursor
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libXcursor: libXcursor (X Window System Cursor management library)
+libXcursor:
+libXcursor: libXcursor is part of X11.
+libXcursor:
+libXcursor: For more information about the X.Org Foundation (the providers of the
+libXcursor: X.Org implementation of the X Window System), see their website:
+libXcursor:
+libXcursor: http://www.x.org
+libXcursor:
+libXcursor:
+libXcursor:
diff --git a/patches/source/libXcursor/x11-build-script.sh b/patches/source/libXcursor/x11-build-script.sh
new file mode 100755
index 000000000..6da53346f
--- /dev/null
+++ b/patches/source/libXcursor/x11-build-script.sh
@@ -0,0 +1,374 @@
+#!/bin/sh
+# Copyright 2007-2013 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# This is default. To not upgrade, pass UPGRADE_PACKAGES=no (or anything else).
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ chown -R root:root .
+ find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.*
+ )
+ done
+ )
+ fi
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+
+ # If there's a ChangeLog, installing at least part of the recent history
+ # is useful, but don't let it get totally out of control:
+ if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # Strip binaries:
+ ( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/libXext/arch.use.flags b/patches/source/libXext/arch.use.flags
new file mode 100644
index 000000000..11087c884
--- /dev/null
+++ b/patches/source/libXext/arch.use.flags
@@ -0,0 +1,9 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/libXext/build/libXext b/patches/source/libXext/build/libXext
new file mode 100644
index 000000000..a55e8cfcf
--- /dev/null
+++ b/patches/source/libXext/build/libXext
@@ -0,0 +1 @@
+1_slack14.1
diff --git a/patches/source/libXext/configure/configure b/patches/source/libXext/configure/configure
new file mode 100644
index 000000000..dcb1109bd
--- /dev/null
+++ b/patches/source/libXext/configure/configure
@@ -0,0 +1,13 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --with-udev-rules-dir=/lib/udev/rules.d \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/libXext/libXext.SlackBuild b/patches/source/libXext/libXext.SlackBuild
new file mode 100755
index 000000000..1f6fdb31a
--- /dev/null
+++ b/patches/source/libXext/libXext.SlackBuild
@@ -0,0 +1,2 @@
+UPGRADE_PACKAGES=no ./x11.SlackBuild lib libXext
+mv /tmp/x11-build/libXext*txz /tmp
diff --git a/patches/source/libXext/modularize b/patches/source/libXext/modularize
new file mode 100644
index 000000000..8a28ed93e
--- /dev/null
+++ b/patches/source/libXext/modularize
@@ -0,0 +1,279 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+dri3proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glamor-egl
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXpresent
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+libxshmfence
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+presentproto
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-errors
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-amdgpu
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/libXext/noarch b/patches/source/libXext/noarch
new file mode 100644
index 000000000..8785ee527
--- /dev/null
+++ b/patches/source/libXext/noarch
@@ -0,0 +1,75 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/libXext/package-blacklist b/patches/source/libXext/package-blacklist
new file mode 100644
index 000000000..603b8c31f
--- /dev/null
+++ b/patches/source/libXext/package-blacklist
@@ -0,0 +1,44 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+xf86-video-modesetting
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/libXext/slack-desc/libXext b/patches/source/libXext/slack-desc/libXext
new file mode 100644
index 000000000..a636363a5
--- /dev/null
+++ b/patches/source/libXext/slack-desc/libXext
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libXext: libXext (library for common extensions to the X11 protocol)
+libXext:
+libXext: libXext is part of X11.
+libXext:
+libXext: For more information about the X.Org Foundation (the providers of the
+libXext: X.Org implementation of the X Window System), see their website:
+libXext:
+libXext: http://www.x.org
+libXext:
+libXext:
+libXext:
diff --git a/patches/source/libXext/x11.SlackBuild b/patches/source/libXext/x11.SlackBuild
new file mode 100755
index 000000000..c3887dff2
--- /dev/null
+++ b/patches/source/libXext/x11.SlackBuild
@@ -0,0 +1,381 @@
+#!/bin/sh
+# Copyright 2007-2014 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ chown -R root:root .
+ find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.*
+ )
+ done
+ )
+ fi
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+
+ # If there's a ChangeLog, installing at least part of the recent history
+ # is useful, but don't let it get totally out of control:
+ if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # Strip binaries:
+ ( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/libXfixes/arch.use.flags b/patches/source/libXfixes/arch.use.flags
new file mode 100644
index 000000000..11087c884
--- /dev/null
+++ b/patches/source/libXfixes/arch.use.flags
@@ -0,0 +1,9 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/libXfixes/build/libXfixes b/patches/source/libXfixes/build/libXfixes
new file mode 100644
index 000000000..a55e8cfcf
--- /dev/null
+++ b/patches/source/libXfixes/build/libXfixes
@@ -0,0 +1 @@
+1_slack14.1
diff --git a/patches/source/libXfixes/configure/configure b/patches/source/libXfixes/configure/configure
new file mode 100644
index 000000000..dcb1109bd
--- /dev/null
+++ b/patches/source/libXfixes/configure/configure
@@ -0,0 +1,13 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --with-udev-rules-dir=/lib/udev/rules.d \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/libXfixes/libXfixes.SlackBuild b/patches/source/libXfixes/libXfixes.SlackBuild
new file mode 100755
index 000000000..8d5116f4e
--- /dev/null
+++ b/patches/source/libXfixes/libXfixes.SlackBuild
@@ -0,0 +1,2 @@
+UPGRADE_PACKAGES=no ./x11.SlackBuild lib libXfixes
+mv /tmp/x11-build/libXfixes*txz /tmp
diff --git a/patches/source/libXfixes/modularize b/patches/source/libXfixes/modularize
new file mode 100644
index 000000000..8a28ed93e
--- /dev/null
+++ b/patches/source/libXfixes/modularize
@@ -0,0 +1,279 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+dri3proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glamor-egl
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXpresent
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+libxshmfence
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+presentproto
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-errors
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-amdgpu
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/libXfixes/noarch b/patches/source/libXfixes/noarch
new file mode 100644
index 000000000..8785ee527
--- /dev/null
+++ b/patches/source/libXfixes/noarch
@@ -0,0 +1,75 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/libXfixes/package-blacklist b/patches/source/libXfixes/package-blacklist
new file mode 100644
index 000000000..603b8c31f
--- /dev/null
+++ b/patches/source/libXfixes/package-blacklist
@@ -0,0 +1,44 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+xf86-video-modesetting
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/libXfixes/slack-desc/libXfixes b/patches/source/libXfixes/slack-desc/libXfixes
new file mode 100644
index 000000000..3c44fa46f
--- /dev/null
+++ b/patches/source/libXfixes/slack-desc/libXfixes
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libXfixes: libXfixes (client library for the Xfixes extension)
+libXfixes:
+libXfixes: libXfixes is part of X11.
+libXfixes:
+libXfixes: For more information about the X.Org Foundation (the providers of the
+libXfixes: X.Org implementation of the X Window System), see their website:
+libXfixes:
+libXfixes: http://www.x.org
+libXfixes:
+libXfixes:
+libXfixes:
diff --git a/patches/source/libXfixes/x11.SlackBuild b/patches/source/libXfixes/x11.SlackBuild
new file mode 100755
index 000000000..c3887dff2
--- /dev/null
+++ b/patches/source/libXfixes/x11.SlackBuild
@@ -0,0 +1,381 @@
+#!/bin/sh
+# Copyright 2007-2014 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ chown -R root:root .
+ find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.*
+ )
+ done
+ )
+ fi
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+
+ # If there's a ChangeLog, installing at least part of the recent history
+ # is useful, but don't let it get totally out of control:
+ if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # Strip binaries:
+ ( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/libXfont/arch.use.flags b/patches/source/libXfont/arch.use.flags
new file mode 100644
index 000000000..f28a6ccab
--- /dev/null
+++ b/patches/source/libXfont/arch.use.flags
@@ -0,0 +1,7 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/libXfont/build/increment.sh b/patches/source/libXfont/build/increment.sh
new file mode 100755
index 000000000..6de5d0da6
--- /dev/null
+++ b/patches/source/libXfont/build/increment.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+# A script to increment build numbers.
+# Call it with the list of the build numbers to increase by one:
+#
+# ./increment.sh xf86-input-acecad xf86-input-aiptek xf86-input-joystick
+#
+# If a build file does not exist, it will be created with a value of 2.
+
+for build in $* ; do
+ if [ ! -r $build ]; then
+ echo "Creating $build with value 2"
+ echo 2 > $build
+ else
+ echo "Incrementing $build $(cat $build) -> $(expr $(cat $build) + 1)"
+ echo $(expr $(cat $build) + 1) > $build
+ fi
+done
diff --git a/patches/source/libXfont/build/libXfont b/patches/source/libXfont/build/libXfont
new file mode 100644
index 000000000..8f2043645
--- /dev/null
+++ b/patches/source/libXfont/build/libXfont
@@ -0,0 +1 @@
+2_slack14.1
diff --git a/patches/source/libXfont/configure/configure b/patches/source/libXfont/configure/configure
new file mode 100644
index 000000000..0f3bccf24
--- /dev/null
+++ b/patches/source/libXfont/configure/configure
@@ -0,0 +1,12 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/libXfont/libXfont.SlackBuild b/patches/source/libXfont/libXfont.SlackBuild
new file mode 100755
index 000000000..25821f171
--- /dev/null
+++ b/patches/source/libXfont/libXfont.SlackBuild
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Copyright 2014 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+UPGRADE_PACKAGES=no sh x11-build-script.sh lib libXfont
+mv --verbose /tmp/x11-build/*.txz /tmp
+
diff --git a/patches/source/libXfont/modularize b/patches/source/libXfont/modularize
new file mode 100644
index 000000000..38762ffda
--- /dev/null
+++ b/patches/source/libXfont/modularize
@@ -0,0 +1,272 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/libXfont/noarch b/patches/source/libXfont/noarch
new file mode 100644
index 000000000..480ffc26c
--- /dev/null
+++ b/patches/source/libXfont/noarch
@@ -0,0 +1,76 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-cf-files
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/libXfont/package-blacklist b/patches/source/libXfont/package-blacklist
new file mode 100644
index 000000000..8e2f3eb5c
--- /dev/null
+++ b/patches/source/libXfont/package-blacklist
@@ -0,0 +1,43 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/libXfont/patch/libXfont.patch b/patches/source/libXfont/patch/libXfont.patch
new file mode 100644
index 000000000..7b6e24570
--- /dev/null
+++ b/patches/source/libXfont/patch/libXfont.patch
@@ -0,0 +1 @@
+zcat $CWD/patch/libXfont/libXfont.CVE-2017-16611.diff.gz | patch -p1 || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
diff --git a/patches/source/libXfont/patch/libXfont/libXfont.CVE-2017-16611.diff b/patches/source/libXfont/patch/libXfont/libXfont.CVE-2017-16611.diff
new file mode 100644
index 000000000..352d00f03
--- /dev/null
+++ b/patches/source/libXfont/patch/libXfont/libXfont.CVE-2017-16611.diff
@@ -0,0 +1,85 @@
+--- ./src/fontfile/fileio.c.orig 2014-01-07 10:25:08.000000000 -0600
++++ ./src/fontfile/fileio.c 2017-11-29 00:37:05.450068487 -0600
+@@ -36,6 +36,9 @@
+ #ifndef O_BINARY
+ #define O_BINARY O_RDONLY
+ #endif
++#ifndef O_NOFOLLOW
++#define O_NOFOLLOW 0
++#endif
+
+ FontFilePtr
+ FontFileOpen (const char *name)
+@@ -44,7 +47,7 @@
+ int len;
+ BufFilePtr raw, cooked;
+
+- fd = open (name, O_BINARY);
++ fd = open (name, O_BINARY|O_CLOEXEC|O_NOFOLLOW);
+ if (fd < 0)
+ return 0;
+ raw = BufFileOpenRead (fd);
+--- ./src/fontfile/dirfile.c.orig 2014-01-07 10:25:08.000000000 -0600
++++ ./src/fontfile/dirfile.c 2017-11-29 00:35:44.400069349 -0600
+@@ -41,6 +41,7 @@
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <fcntl.h>
+ #include <errno.h>
+
+ static Bool AddFileNameAliases ( FontDirectoryPtr dir );
+@@ -57,8 +58,9 @@
+ char dir_file[MAXFONTFILENAMELEN];
+ char dir_path[MAXFONTFILENAMELEN];
+ char *ptr;
+- FILE *file;
+- int count,
++ FILE *file = 0;
++ int file_fd,
++ count,
+ num_fonts,
+ status;
+ struct stat statb;
+@@ -88,7 +90,14 @@
+ if (dir_file[strlen(dir_file) - 1] != '/')
+ strcat(dir_file, "/");
+ strcat(dir_file, FontDirFile);
++#ifndef WIN32
++ file_fd = open(dir_file, O_RDONLY | O_NOFOLLOW);
++ if (file_fd >= 0) {
++ file = fdopen(file_fd, "rt");
++ }
++#else
+ file = fopen(dir_file, "rt");
++#endif
+ if (file) {
+ #ifndef WIN32
+ if (fstat (fileno(file), &statb) == -1)
+@@ -258,7 +267,8 @@
+ char alias[MAXFONTNAMELEN];
+ char font_name[MAXFONTNAMELEN];
+ char alias_file[MAXFONTFILENAMELEN];
+- FILE *file;
++ int file_fd;
++ FILE *file = 0;
+ FontDirectoryPtr dir;
+ int token;
+ char *lexToken;
+@@ -276,7 +286,16 @@
+ strcat(alias_file, "/");
+ strcat(alias_file, FontAliasFile);
+ }
++
++#ifndef WIN32
++ file_fd = open(alias_file, O_RDONLY | O_NOFOLLOW);
++ if (file_fd >= 0) {
++ file = fdopen(file_fd, "rt");
++ }
++#else
+ file = fopen(alias_file, "rt");
++#endif
++
+ if (!file)
+ return ((errno == ENOENT) ? Successful : BadFontPath);
+ if (!dir)
diff --git a/patches/source/libXfont/slack-desc/libXfont b/patches/source/libXfont/slack-desc/libXfont
new file mode 100644
index 000000000..d78d6a0e9
--- /dev/null
+++ b/patches/source/libXfont/slack-desc/libXfont
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libXfont: libXfont (library for legacy X11 font system)
+libXfont:
+libXfont: libXfont provides the core of the legacy X11 font system, handling the
+libXfont: index files (fonts.dir, fonts.alias, fonts.scale), the various font
+libXfont: file formats, and rasterizing them. It is used by the X servers, the
+libXfont: X Font Server (xfs), and some font utilities (bdftopcf for instance),
+libXfont: but should not be used by normal X11 clients. X11 clients access fonts
+libXfont: via either the new API's in libXft, or the legacy API's in libX11.
+libXfont:
+libXfont:
+libXfont:
diff --git a/patches/source/libXfont/x11-build-script.sh b/patches/source/libXfont/x11-build-script.sh
new file mode 100755
index 000000000..6da53346f
--- /dev/null
+++ b/patches/source/libXfont/x11-build-script.sh
@@ -0,0 +1,374 @@
+#!/bin/sh
+# Copyright 2007-2013 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# This is default. To not upgrade, pass UPGRADE_PACKAGES=no (or anything else).
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ chown -R root:root .
+ find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.*
+ )
+ done
+ )
+ fi
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+
+ # If there's a ChangeLog, installing at least part of the recent history
+ # is useful, but don't let it get totally out of control:
+ if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # Strip binaries:
+ ( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/libXi/arch.use.flags b/patches/source/libXi/arch.use.flags
new file mode 100644
index 000000000..11087c884
--- /dev/null
+++ b/patches/source/libXi/arch.use.flags
@@ -0,0 +1,9 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/libXi/build/libXi b/patches/source/libXi/build/libXi
new file mode 100644
index 000000000..a55e8cfcf
--- /dev/null
+++ b/patches/source/libXi/build/libXi
@@ -0,0 +1 @@
+1_slack14.1
diff --git a/patches/source/libXi/configure/configure b/patches/source/libXi/configure/configure
new file mode 100644
index 000000000..dcb1109bd
--- /dev/null
+++ b/patches/source/libXi/configure/configure
@@ -0,0 +1,13 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --with-udev-rules-dir=/lib/udev/rules.d \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/libXi/libXi.SlackBuild b/patches/source/libXi/libXi.SlackBuild
new file mode 100755
index 000000000..eea1be6d5
--- /dev/null
+++ b/patches/source/libXi/libXi.SlackBuild
@@ -0,0 +1,2 @@
+UPGRADE_PACKAGES=no ./x11.SlackBuild lib libXi
+mv /tmp/x11-build/libXi*txz /tmp
diff --git a/patches/source/libXi/modularize b/patches/source/libXi/modularize
new file mode 100644
index 000000000..8a28ed93e
--- /dev/null
+++ b/patches/source/libXi/modularize
@@ -0,0 +1,279 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+dri3proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glamor-egl
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXpresent
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+libxshmfence
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+presentproto
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-errors
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-amdgpu
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/libXi/noarch b/patches/source/libXi/noarch
new file mode 100644
index 000000000..8785ee527
--- /dev/null
+++ b/patches/source/libXi/noarch
@@ -0,0 +1,75 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/libXi/package-blacklist b/patches/source/libXi/package-blacklist
new file mode 100644
index 000000000..603b8c31f
--- /dev/null
+++ b/patches/source/libXi/package-blacklist
@@ -0,0 +1,44 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+xf86-video-modesetting
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/libXi/slack-desc/libXi b/patches/source/libXi/slack-desc/libXi
new file mode 100644
index 000000000..4585f82e1
--- /dev/null
+++ b/patches/source/libXi/slack-desc/libXi
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libXi: libXi (library for the X Input Extension)
+libXi:
+libXi: libXi is part of X11.
+libXi:
+libXi: For more information about the X.Org Foundation (the providers of the
+libXi: X.Org implementation of the X Window System), see their website:
+libXi:
+libXi: http://www.x.org
+libXi:
+libXi:
+libXi:
diff --git a/patches/source/libXi/slack-desc/libXinerama b/patches/source/libXi/slack-desc/libXinerama
new file mode 100644
index 000000000..3b16b81f7
--- /dev/null
+++ b/patches/source/libXi/slack-desc/libXinerama
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libXinerama: libXinerama (library for Xinerama extension to X11 Protocol)
+libXinerama:
+libXinerama: libXinerama is part of X11.
+libXinerama:
+libXinerama: For more information about the X.Org Foundation (the providers of the
+libXinerama: X.Org implementation of the X Window System), see their website:
+libXinerama:
+libXinerama: http://www.x.org
+libXinerama:
+libXinerama:
+libXinerama:
diff --git a/patches/source/libXi/x11.SlackBuild b/patches/source/libXi/x11.SlackBuild
new file mode 100755
index 000000000..c3887dff2
--- /dev/null
+++ b/patches/source/libXi/x11.SlackBuild
@@ -0,0 +1,381 @@
+#!/bin/sh
+# Copyright 2007-2014 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ chown -R root:root .
+ find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.*
+ )
+ done
+ )
+ fi
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+
+ # If there's a ChangeLog, installing at least part of the recent history
+ # is useful, but don't let it get totally out of control:
+ if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # Strip binaries:
+ ( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/libXrandr/arch.use.flags b/patches/source/libXrandr/arch.use.flags
new file mode 100644
index 000000000..11087c884
--- /dev/null
+++ b/patches/source/libXrandr/arch.use.flags
@@ -0,0 +1,9 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/libXrandr/build/libXrandr b/patches/source/libXrandr/build/libXrandr
new file mode 100644
index 000000000..a55e8cfcf
--- /dev/null
+++ b/patches/source/libXrandr/build/libXrandr
@@ -0,0 +1 @@
+1_slack14.1
diff --git a/patches/source/libXrandr/configure/configure b/patches/source/libXrandr/configure/configure
new file mode 100644
index 000000000..dcb1109bd
--- /dev/null
+++ b/patches/source/libXrandr/configure/configure
@@ -0,0 +1,13 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --with-udev-rules-dir=/lib/udev/rules.d \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/libXrandr/libXrandr.SlackBuild b/patches/source/libXrandr/libXrandr.SlackBuild
new file mode 100755
index 000000000..8bc75df35
--- /dev/null
+++ b/patches/source/libXrandr/libXrandr.SlackBuild
@@ -0,0 +1,2 @@
+UPGRADE_PACKAGES=no ./x11.SlackBuild lib libXrandr
+mv /tmp/x11-build/libXrandr*txz /tmp
diff --git a/patches/source/libXrandr/modularize b/patches/source/libXrandr/modularize
new file mode 100644
index 000000000..8a28ed93e
--- /dev/null
+++ b/patches/source/libXrandr/modularize
@@ -0,0 +1,279 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+dri3proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glamor-egl
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXpresent
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+libxshmfence
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+presentproto
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-errors
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-amdgpu
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/libXrandr/noarch b/patches/source/libXrandr/noarch
new file mode 100644
index 000000000..8785ee527
--- /dev/null
+++ b/patches/source/libXrandr/noarch
@@ -0,0 +1,75 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/libXrandr/package-blacklist b/patches/source/libXrandr/package-blacklist
new file mode 100644
index 000000000..603b8c31f
--- /dev/null
+++ b/patches/source/libXrandr/package-blacklist
@@ -0,0 +1,44 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+xf86-video-modesetting
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/libXrandr/slack-desc/libXrandr b/patches/source/libXrandr/slack-desc/libXrandr
new file mode 100644
index 000000000..ad2e243b8
--- /dev/null
+++ b/patches/source/libXrandr/slack-desc/libXrandr
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libXrandr: libXrandr (X Resize, Rotate and Reflection extension library)
+libXrandr:
+libXrandr: libXrandr is part of X11.
+libXrandr:
+libXrandr: For more information about the X.Org Foundation (the providers of the
+libXrandr: X.Org implementation of the X Window System), see their website:
+libXrandr:
+libXrandr: http://www.x.org
+libXrandr:
+libXrandr:
+libXrandr:
diff --git a/patches/source/libXrandr/x11.SlackBuild b/patches/source/libXrandr/x11.SlackBuild
new file mode 100755
index 000000000..c3887dff2
--- /dev/null
+++ b/patches/source/libXrandr/x11.SlackBuild
@@ -0,0 +1,381 @@
+#!/bin/sh
+# Copyright 2007-2014 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ chown -R root:root .
+ find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.*
+ )
+ done
+ )
+ fi
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+
+ # If there's a ChangeLog, installing at least part of the recent history
+ # is useful, but don't let it get totally out of control:
+ if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # Strip binaries:
+ ( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/libXrender/arch.use.flags b/patches/source/libXrender/arch.use.flags
new file mode 100644
index 000000000..11087c884
--- /dev/null
+++ b/patches/source/libXrender/arch.use.flags
@@ -0,0 +1,9 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/libXrender/build/libXrender b/patches/source/libXrender/build/libXrender
new file mode 100644
index 000000000..a55e8cfcf
--- /dev/null
+++ b/patches/source/libXrender/build/libXrender
@@ -0,0 +1 @@
+1_slack14.1
diff --git a/patches/source/libXrender/configure/configure b/patches/source/libXrender/configure/configure
new file mode 100644
index 000000000..dcb1109bd
--- /dev/null
+++ b/patches/source/libXrender/configure/configure
@@ -0,0 +1,13 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --with-udev-rules-dir=/lib/udev/rules.d \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/libXrender/libXrender.SlackBuild b/patches/source/libXrender/libXrender.SlackBuild
new file mode 100755
index 000000000..b18aef0ea
--- /dev/null
+++ b/patches/source/libXrender/libXrender.SlackBuild
@@ -0,0 +1,2 @@
+UPGRADE_PACKAGES=no ./x11.SlackBuild lib libXrender
+mv /tmp/x11-build/libXrender*txz /tmp
diff --git a/patches/source/libXrender/modularize b/patches/source/libXrender/modularize
new file mode 100644
index 000000000..8a28ed93e
--- /dev/null
+++ b/patches/source/libXrender/modularize
@@ -0,0 +1,279 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+dri3proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glamor-egl
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXpresent
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+libxshmfence
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+presentproto
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-errors
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-amdgpu
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/libXrender/noarch b/patches/source/libXrender/noarch
new file mode 100644
index 000000000..8785ee527
--- /dev/null
+++ b/patches/source/libXrender/noarch
@@ -0,0 +1,75 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/libXrender/package-blacklist b/patches/source/libXrender/package-blacklist
new file mode 100644
index 000000000..603b8c31f
--- /dev/null
+++ b/patches/source/libXrender/package-blacklist
@@ -0,0 +1,44 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+xf86-video-modesetting
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/libXrender/slack-desc/libXrender b/patches/source/libXrender/slack-desc/libXrender
new file mode 100644
index 000000000..c5fe72697
--- /dev/null
+++ b/patches/source/libXrender/slack-desc/libXrender
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libXrender: libXrender (library for the Render Extension to the X11 protocol)
+libXrender:
+libXrender: libXrender is part of X11.
+libXrender:
+libXrender: For more information about the X.Org Foundation (the providers of the
+libXrender: X.Org implementation of the X Window System), see their website:
+libXrender:
+libXrender: http://www.x.org
+libXrender:
+libXrender:
+libXrender:
diff --git a/patches/source/libXrender/x11.SlackBuild b/patches/source/libXrender/x11.SlackBuild
new file mode 100755
index 000000000..c3887dff2
--- /dev/null
+++ b/patches/source/libXrender/x11.SlackBuild
@@ -0,0 +1,381 @@
+#!/bin/sh
+# Copyright 2007-2014 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ chown -R root:root .
+ find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.*
+ )
+ done
+ )
+ fi
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+
+ # If there's a ChangeLog, installing at least part of the recent history
+ # is useful, but don't let it get totally out of control:
+ if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # Strip binaries:
+ ( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/libXres/arch.use.flags b/patches/source/libXres/arch.use.flags
new file mode 100644
index 000000000..11087c884
--- /dev/null
+++ b/patches/source/libXres/arch.use.flags
@@ -0,0 +1,9 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/libXres/build/libXres b/patches/source/libXres/build/libXres
new file mode 100644
index 000000000..a55e8cfcf
--- /dev/null
+++ b/patches/source/libXres/build/libXres
@@ -0,0 +1 @@
+1_slack14.1
diff --git a/patches/source/libXres/configure/configure b/patches/source/libXres/configure/configure
new file mode 100644
index 000000000..dcb1109bd
--- /dev/null
+++ b/patches/source/libXres/configure/configure
@@ -0,0 +1,13 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --with-udev-rules-dir=/lib/udev/rules.d \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/libXres/libXres.SlackBuild b/patches/source/libXres/libXres.SlackBuild
new file mode 100755
index 000000000..e0207968f
--- /dev/null
+++ b/patches/source/libXres/libXres.SlackBuild
@@ -0,0 +1,2 @@
+UPGRADE_PACKAGES=no ./x11.SlackBuild lib libXres
+mv /tmp/x11-build/libXres*txz /tmp
diff --git a/patches/source/libXres/modularize b/patches/source/libXres/modularize
new file mode 100644
index 000000000..8a28ed93e
--- /dev/null
+++ b/patches/source/libXres/modularize
@@ -0,0 +1,279 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+dri3proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glamor-egl
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXpresent
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+libxshmfence
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+presentproto
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-errors
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-amdgpu
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/libXres/noarch b/patches/source/libXres/noarch
new file mode 100644
index 000000000..8785ee527
--- /dev/null
+++ b/patches/source/libXres/noarch
@@ -0,0 +1,75 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/libXres/package-blacklist b/patches/source/libXres/package-blacklist
new file mode 100644
index 000000000..603b8c31f
--- /dev/null
+++ b/patches/source/libXres/package-blacklist
@@ -0,0 +1,44 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+xf86-video-modesetting
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/libXres/slack-desc/libXres b/patches/source/libXres/slack-desc/libXres
new file mode 100644
index 000000000..4582cd5f9
--- /dev/null
+++ b/patches/source/libXres/slack-desc/libXres
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libXres: libXres (X-Resource extension client library)
+libXres:
+libXres: libXres is part of X11.
+libXres:
+libXres: For more information about the X.Org Foundation (the providers of the
+libXres: X.Org implementation of the X Window System), see their website:
+libXres:
+libXres: http://www.x.org
+libXres:
+libXres:
+libXres:
diff --git a/patches/source/libXres/x11.SlackBuild b/patches/source/libXres/x11.SlackBuild
new file mode 100755
index 000000000..c3887dff2
--- /dev/null
+++ b/patches/source/libXres/x11.SlackBuild
@@ -0,0 +1,381 @@
+#!/bin/sh
+# Copyright 2007-2014 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ chown -R root:root .
+ find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.*
+ )
+ done
+ )
+ fi
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+
+ # If there's a ChangeLog, installing at least part of the recent history
+ # is useful, but don't let it get totally out of control:
+ if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # Strip binaries:
+ ( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/libXtst/arch.use.flags b/patches/source/libXtst/arch.use.flags
new file mode 100644
index 000000000..11087c884
--- /dev/null
+++ b/patches/source/libXtst/arch.use.flags
@@ -0,0 +1,9 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/libXtst/build/libXtst b/patches/source/libXtst/build/libXtst
new file mode 100644
index 000000000..a55e8cfcf
--- /dev/null
+++ b/patches/source/libXtst/build/libXtst
@@ -0,0 +1 @@
+1_slack14.1
diff --git a/patches/source/libXtst/configure/configure b/patches/source/libXtst/configure/configure
new file mode 100644
index 000000000..dcb1109bd
--- /dev/null
+++ b/patches/source/libXtst/configure/configure
@@ -0,0 +1,13 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --with-udev-rules-dir=/lib/udev/rules.d \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/libXtst/libXtst.SlackBuild b/patches/source/libXtst/libXtst.SlackBuild
new file mode 100755
index 000000000..0a4bb9400
--- /dev/null
+++ b/patches/source/libXtst/libXtst.SlackBuild
@@ -0,0 +1,2 @@
+UPGRADE_PACKAGES=no ./x11.SlackBuild lib libXtst
+mv /tmp/x11-build/libXtst*txz /tmp
diff --git a/patches/source/libXtst/modularize b/patches/source/libXtst/modularize
new file mode 100644
index 000000000..8a28ed93e
--- /dev/null
+++ b/patches/source/libXtst/modularize
@@ -0,0 +1,279 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+dri3proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glamor-egl
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXpresent
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+libxshmfence
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+presentproto
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-errors
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-amdgpu
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/libXtst/noarch b/patches/source/libXtst/noarch
new file mode 100644
index 000000000..8785ee527
--- /dev/null
+++ b/patches/source/libXtst/noarch
@@ -0,0 +1,75 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/libXtst/package-blacklist b/patches/source/libXtst/package-blacklist
new file mode 100644
index 000000000..603b8c31f
--- /dev/null
+++ b/patches/source/libXtst/package-blacklist
@@ -0,0 +1,44 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+xf86-video-modesetting
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/libXtst/slack-desc/libXtst b/patches/source/libXtst/slack-desc/libXtst
new file mode 100644
index 000000000..63b93c019
--- /dev/null
+++ b/patches/source/libXtst/slack-desc/libXtst
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libXtst: libXtst (client library for the XTEST & RECORD extensions)
+libXtst:
+libXtst: libXtst is part of X11.
+libXtst:
+libXtst: For more information about the X.Org Foundation (the providers of the
+libXtst: X.Org implementation of the X Window System), see their website:
+libXtst:
+libXtst: http://www.x.org
+libXtst:
+libXtst:
+libXtst:
diff --git a/patches/source/libXtst/x11.SlackBuild b/patches/source/libXtst/x11.SlackBuild
new file mode 100755
index 000000000..c3887dff2
--- /dev/null
+++ b/patches/source/libXtst/x11.SlackBuild
@@ -0,0 +1,381 @@
+#!/bin/sh
+# Copyright 2007-2014 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ chown -R root:root .
+ find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.*
+ )
+ done
+ )
+ fi
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+
+ # If there's a ChangeLog, installing at least part of the recent history
+ # is useful, but don't let it get totally out of control:
+ if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # Strip binaries:
+ ( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/libXv/arch.use.flags b/patches/source/libXv/arch.use.flags
new file mode 100644
index 000000000..11087c884
--- /dev/null
+++ b/patches/source/libXv/arch.use.flags
@@ -0,0 +1,9 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/libXv/build/libXv b/patches/source/libXv/build/libXv
new file mode 100644
index 000000000..a55e8cfcf
--- /dev/null
+++ b/patches/source/libXv/build/libXv
@@ -0,0 +1 @@
+1_slack14.1
diff --git a/patches/source/libXv/configure/configure b/patches/source/libXv/configure/configure
new file mode 100644
index 000000000..dcb1109bd
--- /dev/null
+++ b/patches/source/libXv/configure/configure
@@ -0,0 +1,13 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --with-udev-rules-dir=/lib/udev/rules.d \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/libXv/libXv.SlackBuild b/patches/source/libXv/libXv.SlackBuild
new file mode 100755
index 000000000..b4a99f6c8
--- /dev/null
+++ b/patches/source/libXv/libXv.SlackBuild
@@ -0,0 +1,2 @@
+UPGRADE_PACKAGES=no ./x11.SlackBuild lib libXv
+mv /tmp/x11-build/libXv*txz /tmp
diff --git a/patches/source/libXv/modularize b/patches/source/libXv/modularize
new file mode 100644
index 000000000..8a28ed93e
--- /dev/null
+++ b/patches/source/libXv/modularize
@@ -0,0 +1,279 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+dri3proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glamor-egl
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXpresent
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+libxshmfence
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+presentproto
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-errors
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-amdgpu
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/libXv/noarch b/patches/source/libXv/noarch
new file mode 100644
index 000000000..8785ee527
--- /dev/null
+++ b/patches/source/libXv/noarch
@@ -0,0 +1,75 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/libXv/package-blacklist b/patches/source/libXv/package-blacklist
new file mode 100644
index 000000000..603b8c31f
--- /dev/null
+++ b/patches/source/libXv/package-blacklist
@@ -0,0 +1,44 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+xf86-video-modesetting
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/libXv/slack-desc/libXv b/patches/source/libXv/slack-desc/libXv
new file mode 100644
index 000000000..d72865bf0
--- /dev/null
+++ b/patches/source/libXv/slack-desc/libXv
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libXv: libXv (library for the X Video (Xv) extension to the X Window System)
+libXv:
+libXv: libXv is part of X11.
+libXv:
+libXv: For more information about the X.Org Foundation (the providers of the
+libXv: X.Org implementation of the X Window System), see their website:
+libXv:
+libXv: http://www.x.org
+libXv:
+libXv:
+libXv:
diff --git a/patches/source/libXv/slack-desc/libXvMC b/patches/source/libXv/slack-desc/libXvMC
new file mode 100644
index 000000000..aecd7f3aa
--- /dev/null
+++ b/patches/source/libXv/slack-desc/libXvMC
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libXvMC: libXvMC (X.Org X11 libXvMC runtime library)
+libXvMC:
+libXvMC: libXvMC is part of X11.
+libXvMC:
+libXvMC: For more information about the X.Org Foundation (the providers of the
+libXvMC: X.Org implementation of the X Window System), see their website:
+libXvMC:
+libXvMC: http://www.x.org
+libXvMC:
+libXvMC:
+libXvMC:
diff --git a/patches/source/libXv/x11.SlackBuild b/patches/source/libXv/x11.SlackBuild
new file mode 100755
index 000000000..c3887dff2
--- /dev/null
+++ b/patches/source/libXv/x11.SlackBuild
@@ -0,0 +1,381 @@
+#!/bin/sh
+# Copyright 2007-2014 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ chown -R root:root .
+ find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.*
+ )
+ done
+ )
+ fi
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+
+ # If there's a ChangeLog, installing at least part of the recent history
+ # is useful, but don't let it get totally out of control:
+ if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # Strip binaries:
+ ( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/libXvMC/arch.use.flags b/patches/source/libXvMC/arch.use.flags
new file mode 100644
index 000000000..11087c884
--- /dev/null
+++ b/patches/source/libXvMC/arch.use.flags
@@ -0,0 +1,9 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/libXvMC/build/libXvMC b/patches/source/libXvMC/build/libXvMC
new file mode 100644
index 000000000..a55e8cfcf
--- /dev/null
+++ b/patches/source/libXvMC/build/libXvMC
@@ -0,0 +1 @@
+1_slack14.1
diff --git a/patches/source/libXvMC/configure/configure b/patches/source/libXvMC/configure/configure
new file mode 100644
index 000000000..dcb1109bd
--- /dev/null
+++ b/patches/source/libXvMC/configure/configure
@@ -0,0 +1,13 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --with-udev-rules-dir=/lib/udev/rules.d \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/libXvMC/libXvMC.SlackBuild b/patches/source/libXvMC/libXvMC.SlackBuild
new file mode 100755
index 000000000..2b6579726
--- /dev/null
+++ b/patches/source/libXvMC/libXvMC.SlackBuild
@@ -0,0 +1,2 @@
+UPGRADE_PACKAGES=no ./x11.SlackBuild lib libXvMC
+mv /tmp/x11-build/libXvMC*txz /tmp
diff --git a/patches/source/libXvMC/modularize b/patches/source/libXvMC/modularize
new file mode 100644
index 000000000..8a28ed93e
--- /dev/null
+++ b/patches/source/libXvMC/modularize
@@ -0,0 +1,279 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+dri3proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glamor-egl
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXpresent
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+libxshmfence
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+presentproto
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-errors
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-amdgpu
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/libXvMC/noarch b/patches/source/libXvMC/noarch
new file mode 100644
index 000000000..8785ee527
--- /dev/null
+++ b/patches/source/libXvMC/noarch
@@ -0,0 +1,75 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/libXvMC/package-blacklist b/patches/source/libXvMC/package-blacklist
new file mode 100644
index 000000000..603b8c31f
--- /dev/null
+++ b/patches/source/libXvMC/package-blacklist
@@ -0,0 +1,44 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+xf86-video-modesetting
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/libXvMC/slack-desc/libXvMC b/patches/source/libXvMC/slack-desc/libXvMC
new file mode 100644
index 000000000..aecd7f3aa
--- /dev/null
+++ b/patches/source/libXvMC/slack-desc/libXvMC
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libXvMC: libXvMC (X.Org X11 libXvMC runtime library)
+libXvMC:
+libXvMC: libXvMC is part of X11.
+libXvMC:
+libXvMC: For more information about the X.Org Foundation (the providers of the
+libXvMC: X.Org implementation of the X Window System), see their website:
+libXvMC:
+libXvMC: http://www.x.org
+libXvMC:
+libXvMC:
+libXvMC:
diff --git a/patches/source/libXvMC/x11.SlackBuild b/patches/source/libXvMC/x11.SlackBuild
new file mode 100755
index 000000000..c3887dff2
--- /dev/null
+++ b/patches/source/libXvMC/x11.SlackBuild
@@ -0,0 +1,381 @@
+#!/bin/sh
+# Copyright 2007-2014 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ chown -R root:root .
+ find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.*
+ )
+ done
+ )
+ fi
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+
+ # If there's a ChangeLog, installing at least part of the recent history
+ # is useful, but don't let it get totally out of control:
+ if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # Strip binaries:
+ ( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/libarchive/libarchive.SlackBuild b/patches/source/libarchive/libarchive.SlackBuild
new file mode 100755
index 000000000..06f7edd4e
--- /dev/null
+++ b/patches/source/libarchive/libarchive.SlackBuild
@@ -0,0 +1,108 @@
+#!/bin/sh
+
+# Copyright 2008 Heinz Wiesinger <hmwiesinger@gmx.at>
+# Copyright 2008, 2009, 2010, 2016 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Modified by Robby Workman <rworkman@slackware.com>
+
+PKGNAM=libarchive
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:--j6}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+cd $PKGNAM-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --disable-static \
+ --build=$ARCH-slackware-linux || exit 1
+
+# Slackware 14.1 uses a version of liblzma that lacks this support, but
+# ./configure fails to identify that:
+sed -i "s,#define HAVE_LZMA_STREAM_ENCODER_MT 1,/* #undef HAVE_LZMA_STREAM_ENCODER_MT */,g" config.h
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Strip binaries:
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a COPYING* INSTALL NEWS README* $PKG/usr/doc/$PKGNAM-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/libarchive/slack-desc b/patches/source/libarchive/slack-desc
new file mode 100644
index 000000000..b08c61b22
--- /dev/null
+++ b/patches/source/libarchive/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler--------------------------------------------------|
+libarchive: libarchive (archive reading library)
+libarchive:
+libarchive: Libarchive is a programming library that can create and read
+libarchive: several different streaming archive formats, including most
+libarchive: popular TAR variants and several CPIO formats. It can also
+libarchive: write SHAR archives.
+libarchive:
+libarchive: Homepage: http://libarchive.org
+libarchive:
+libarchive:
+libarchive:
diff --git a/patches/source/libevent/libevent.SlackBuild b/patches/source/libevent/libevent.SlackBuild
new file mode 100755
index 000000000..2d75a5159
--- /dev/null
+++ b/patches/source/libevent/libevent.SlackBuild
@@ -0,0 +1,154 @@
+#!/bin/sh
+
+# Copyright 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=libevent
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | cut -f 2 -d -)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i486 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7lh ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf $PKGNAM-${VERSION}-stable
+tar xvf $CWD/$PKGNAM-${VERSION}-stable.tar.xz || exit 1
+cd $PKGNAM-${VERSION}-stable || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Configure:
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --disable-static \
+ --build=$ARCH-slackware-linux
+
+# Build and install:
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la
+
+# Strip binaries:
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+cp -a \
+ LICENSE README* \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+
+# Compress and if needed symlink the man pages:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# Compress info files, if any:
+if [ -d $PKG/usr/info ]; then
+ ( cd $PKG/usr/info
+ rm -f dir
+ gzip -9 *
+ )
+fi
+
+# PKGNAM version:
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/libevent/slack-desc b/patches/source/libevent/slack-desc
new file mode 100644
index 000000000..78604b843
--- /dev/null
+++ b/patches/source/libevent/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libevent: libevent (event loop library)
+libevent:
+libevent: libevent is meant to replace the event loop found in event driven
+libevent: network servers. An application just needs to call event_dispatch()
+libevent: and then add or remove events dynamically without having to change the
+libevent: event loop. The libevent API provides a mechanism to execute a
+libevent: callback function when a specific event occurs on a file descriptor or
+libevent: after a timeout has been reached.
+libevent:
+libevent: Homepage: http://libevent.org
+libevent:
diff --git a/patches/source/libgcrypt/libgcrypt.SlackBuild b/patches/source/libgcrypt/libgcrypt.SlackBuild
new file mode 100755
index 000000000..0a84d3f11
--- /dev/null
+++ b/patches/source/libgcrypt/libgcrypt.SlackBuild
@@ -0,0 +1,124 @@
+#!/bin/sh
+
+# Copyright 2006-2009 Robby Workman, Northport, AL, USA
+# Copyright 2007, 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=libgcrypt
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.bz2 | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.bz2 || exit 1
+cd $PKGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --infodir=/usr/info \
+ --docdir=/usr/doc/libgcrypt-$VERSION \
+ --enable-shared=yes \
+ --enable-static=no \
+ --program-prefix="" \
+ --program-suffix="" \
+ --build=$ARCH-slackware-linux \
+ --host=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG
+
+# Move the shared library to $PKG/lib${LIBDIRSUFFIX}:
+mkdir -p $PKG/lib${LIBDIRSUFFIX}
+( cd $PKG/usr/lib${LIBDIRSUFFIX}
+ for file in lib*.so.??.* ; do
+ mv $file ../../lib${LIBDIRSUFFIX}
+ ln -sf ../../lib${LIBDIRSUFFIX}/$file .
+ done
+ cp -a lib*.so.?? ../../lib${LIBDIRSUFFIX}
+)
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+rm -f $PKG/usr/info/dir
+gzip -9 $PKG/usr/info/*
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS BUGS COPYING* ChangeLog INSTALL NEWS \
+ README* THANKS TODO VERSION \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/libgcrypt/slack-desc b/patches/source/libgcrypt/slack-desc
new file mode 100644
index 000000000..365fab642
--- /dev/null
+++ b/patches/source/libgcrypt/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libgcrypt: libgcrypt (General purpose crypto library)
+libgcrypt:
+libgcrypt: Libgcrypt is a general purpose crypto library based on the code
+libgcrypt: used in GnuPG.
+libgcrypt:
+libgcrypt:
+libgcrypt:
+libgcrypt:
+libgcrypt:
+libgcrypt:
+libgcrypt:
diff --git a/patches/source/libidn/libidn.SlackBuild b/patches/source/libidn/libidn.SlackBuild
new file mode 100755
index 000000000..7219bd8bd
--- /dev/null
+++ b/patches/source/libidn/libidn.SlackBuild
@@ -0,0 +1,137 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PKGNAM=libidn
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-libidn
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf libidn-$VERSION
+tar xvf $CWD/libidn-$VERSION.tar.?z || exit 1
+cd libidn-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --disable-static \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Compress and if needed symlink the man pages:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# Compress info pages and purge "dir" file from the package:
+if [ -d $PKG/usr/info ]; then
+ ( cd $PKG/usr/info
+ rm -f dir
+ gzip -9 *
+ )
+fi
+
+mkdir -p $PKG/usr/doc/libidn-$VERSION
+cp -a \
+ ABOUT-NLS AUTHORS COPYING* FAQ INSTALL NEWS README* THANKS TODO \
+ contrib \
+ libidn/libidn.html \
+ $PKG/usr/doc/libidn-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/libidn-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/libidn/slack-desc b/patches/source/libidn/slack-desc
new file mode 100644
index 000000000..a10cfe7b5
--- /dev/null
+++ b/patches/source/libidn/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libidn: libidn (GNU Internationalized Domain Name library)
+libidn:
+libidn: GNU Libidn is an implementation of the Stringprep, Punycode and IDNA
+libidn: specifications defined by the IETF Internationalized Domain Names
+libidn: (IDN) working group, used for internationalized domain names.
+libidn:
+libidn:
+libidn:
+libidn:
+libidn:
+libidn:
diff --git a/patches/source/libiodbc/libiodbc.SlackBuild b/patches/source/libiodbc/libiodbc.SlackBuild
new file mode 100755
index 000000000..5c8a0fec6
--- /dev/null
+++ b/patches/source/libiodbc/libiodbc.SlackBuild
@@ -0,0 +1,126 @@
+#!/bin/sh
+
+# Copyright 2009, 2010 Eric Hameleers, Eindhoven, NL
+# Copyright 2009, 2010, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=libiodbc
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+NUMJOBS=${NUMJOBS:--j6}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-libiodbc
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf libiodbc-$VERSION
+tar xvf $CWD/libiodbc-$VERSION.tar.?z* || exit 1
+cd libiodbc-$VERSION || exit 1
+
+# Make sure ownerships and permissions are sane:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Configure:
+# We add '--disable-libodbc'. This way, a libodbc.so library does not get
+# installed so that this package won't clash with an already present unixodbc.
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/libiodbc-$VERSION \
+ --disable-static \
+ --disable-libodbc \
+ --program-prefix= \
+ --program-suffix= \
+ --build=$ARCH-slackware-linux
+
+# Disable rpath:
+zcat $CWD/libiodbc.disable.rpath.diff.gz | patch -p1 --verbose || exit 1
+
+# Build and install:
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Strip binaries:
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.*
+ )
+ done
+ )
+fi
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/libiodbc-$VERSION
+cp -a \
+ AUTHORS COPYING* ChangeLog INSTALL README TODO \
+ $PKG/usr/doc/libiodbc-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/libiodbc-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/libiodbc/libiodbc.disable.rpath.diff b/patches/source/libiodbc/libiodbc.disable.rpath.diff
new file mode 100644
index 000000000..a5f9701db
--- /dev/null
+++ b/patches/source/libiodbc/libiodbc.disable.rpath.diff
@@ -0,0 +1,11 @@
+--- ./libtool.orig 2013-12-11 17:33:25.828622889 -0600
++++ ./libtool 2013-12-11 17:39:28.910619029 -0600
+@@ -363,7 +363,7 @@
+
+ # Flag to hardcode $libdir into a binary during linking.
+ # This must work even if $libdir does not exist
+-hardcode_libdir_flag_spec="\${wl}-rpath \${wl}\$libdir"
++hardcode_libdir_flag_spec=""
+
+ # If ld is used when linking, flag to hardcode $libdir into a binary
+ # during linking. This must work even if $libdir does not exist.
diff --git a/patches/source/libiodbc/slack-desc b/patches/source/libiodbc/slack-desc
new file mode 100644
index 000000000..6844c9274
--- /dev/null
+++ b/patches/source/libiodbc/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler-----------------------------------------------------|
+libiodbc: libiodbc (Independent Open DataBase Connectivity)
+libiodbc:
+libiodbc: iODBC is the acronym for Independent Open DataBase Connectivity,
+libiodbc: an Open Source platform independent implementation of both the ODBC
+libiodbc: and X/Open specifications. It allows for developing solutions
+libiodbc: that are language, platform and database independent.
+libiodbc:
+libiodbc:
+libiodbc:
+libiodbc: Homepage: http://iodbc.org/
+libiodbc:
diff --git a/patches/source/libjpeg/jpeg.CVE-2013-6629.diff b/patches/source/libjpeg/jpeg.CVE-2013-6629.diff
new file mode 100644
index 000000000..37c267a1d
--- /dev/null
+++ b/patches/source/libjpeg/jpeg.CVE-2013-6629.diff
@@ -0,0 +1,32 @@
+From f457207b57d0e234cf7a174d20a7db424b82173d Mon Sep 17 00:00:00 2001
+From: mancha <mancha1@hush.com>
+Date: Fri, 22 Nov 2013
+Subject: CVE-2013-6629
+
+get_sos() in jdmarker.c does not check for duplication of component data
+while reading segments following Start Of Scan (SOS) JPEG markers. This
+allows remote attackers to obtain sensitive information from uninitialized
+memory locations via crafted JPEG images.
+
+Adapted from:
+https://codereview.chromium.org/download/issue31603002_1.diff
+
+---
+ jdmarker.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/jdmarker.c
++++ b/jdmarker.c
+@@ -347,6 +347,12 @@ get_sos (j_decompress_ptr cinfo)
+
+ TRACEMS3(cinfo, 1, JTRC_SOS_COMPONENT, cc,
+ compptr->dc_tbl_no, compptr->ac_tbl_no);
++
++ /* This CSi (cc) should differ from the previous CSi */
++ for (ci = 0; ci < i; ci++) {
++ if (cinfo->cur_comp_info[ci] == compptr)
++ ERREXIT1(cinfo, JERR_BAD_COMPONENT_ID, cc);
++ }
+ }
+
+ /* Collect the additional scan parameters Ss, Se, Ah/Al. */
diff --git a/patches/source/libjpeg/libjpeg.SlackBuild b/patches/source/libjpeg/libjpeg.SlackBuild
new file mode 100755
index 000000000..37b9f67f6
--- /dev/null
+++ b/patches/source/libjpeg/libjpeg.SlackBuild
@@ -0,0 +1,112 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+VERSION=${VERSION:-v8a}
+BUILD=${BUILD:-2_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-libjpeg
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf jpeg-$(echo $VERSION | cut -f 2 -d v)
+tar xvf $CWD/jpegsrc.${VERSION}.tar.?z* || exit 1
+cd jpeg-$(echo $VERSION | cut -f 2 -d v)
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+zcat $CWD/jpeg.CVE-2013-6629.diff.gz | patch -p1 --verbose || exit 1
+
+export CFLAGS="$SLKCFLAGS"
+./configure \
+ --prefix=/usr \
+ --mandir=/usr/man \
+ --libdir=/usr/lib${LIBDIRSUFFIX}
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG
+
+# Strip binaries:
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+mkdir -p $PKG/usr/doc/libjpeg-$VERSION
+cp -a README $PKG/usr/doc/libjpeg-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+makepkg -c y -l y $TMP/libjpeg-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/libjpeg/slack-desc b/patches/source/libjpeg/slack-desc
new file mode 100644
index 000000000..d1add7fdf
--- /dev/null
+++ b/patches/source/libjpeg/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libjpeg: libjpeg (Independent JPEG Group's JPEG software)
+libjpeg:
+libjpeg: Software to implement JPEG image compression and decompression. JPEG
+libjpeg: (pronounced 'jay-peg') is a standardized compression method for
+libjpeg: full-color and gray-scale images. JPEG is intended for compressing
+libjpeg: 'real-world' scenes; cartoons and other non-realistic images are not
+libjpeg: its strong suit. JPEG is lossy, however, on typical images of
+libjpeg: real-world scenes, very good compression levels can be obtained with
+libjpeg: no visible change, and amazingly high compression levels are possible
+libjpeg: if you can tolerate a low-quality image.
+libjpeg:
diff --git a/patches/source/libpcap/libpcap.SlackBuild b/patches/source/libpcap/libpcap.SlackBuild
new file mode 100755
index 000000000..39e116faa
--- /dev/null
+++ b/patches/source/libpcap/libpcap.SlackBuild
@@ -0,0 +1,128 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2012 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=libpcap
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.gz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-libpcap
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf libpcap-$VERSION
+tar xvf $CWD/libpcap-$VERSION.tar.gz || exit 1
+cd libpcap-$VERSION || exit 1
+
+find . -type d -name CVS -depth -exec rm -rf {} \;
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$(getconf LFS_CFLAGS)" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/libpcap-$VERSION \
+ --enable-ipv6 \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make shared $NUMJOBS || make || exit 1
+
+mkdir -p $PKG/usr/bin # otherwise it errors out on install
+make install DESTDIR=$PKG || exit 1
+
+strip --strip-debug libpcap.so.1.?.?
+
+mkdir -p $PKG/usr/doc/libpcap-$VERSION
+cp -a \
+ CHANGES CREDITS INSTALL.txt LICENSE README* TODO VERSION \
+ $PKG/usr/doc/libpcap-$VERSION
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Use symbolic links in the man pages:
+( cd $PKG/usr/man/man3
+ ln -sf pcap_datalink_val_to_name.3pcap pcap_datalink_val_to_description.3pcap
+ ln -sf pcap_dump_open.3pcap pcap_dump_fopen.3pcap
+ ln -sf pcap_geterr.3pcap pcap_perror.3pcap
+ ln -sf pcap_inject.3pcap pcap_sendpacket.3pcap
+ ln -sf pcap_loop.3pcap pcap_dispatch.3pcap
+ ln -sf pcap_major_version.3pcap pcap_minor_version.3pcap
+ ln -sf pcap_next_ex.3pcap pcap_next.3pcap
+ ln -sf pcap_open_offline.3pcap pcap_fopen_offline.3pcap
+ ln -sf pcap_setnonblock.3pcap pcap_getnonblock.3pcap
+ ln -sf pcap_findalldevs.3pcap pcap_freealldevs.3pcap
+ ln -sf pcap_free_tstamp_types.3pcap pcap_list_tstamp_types.3pcap
+ ln -sf pcap_free_datalinks.3pcap pcap_list_datalinks.3pcap
+)
+
+# Compress and if needed symlink the man pages:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ gzip -9 *.?pcap
+ )
+ done
+ )
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/libpcap/slack-desc b/patches/source/libpcap/slack-desc
new file mode 100644
index 000000000..63fb98760
--- /dev/null
+++ b/patches/source/libpcap/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libpcap: libpcap (packet capture library)
+libpcap:
+libpcap: libpcap is a library for user-level packet capture. libpcap provides
+libpcap: a portable framework for low-level network monitoring. Applications
+libpcap: include network statistics collection, security monitoring, network
+libpcap: debugging, etc. The tcpdump utility uses libpcap.
+libpcap:
+libpcap: Project homepage: http://www.tcpdump.org
+libpcap:
+libpcap:
+libpcap:
diff --git a/patches/source/libpng/libpng.SlackBuild b/patches/source/libpng/libpng.SlackBuild
new file mode 100755
index 000000000..ad53ca5b8
--- /dev/null
+++ b/patches/source/libpng/libpng.SlackBuild
@@ -0,0 +1,134 @@
+#!/bin/sh
+
+# Copyright 2005-2012 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+VERSION_OLD=1.2.57
+VERSION_NEW=1.4.20
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-libpng
+rm -rf $PKG
+mkdir -p $TMP $PKG/usr
+
+build_source() {
+
+cd $TMP
+rm -rf libpng-$VERSION
+tar xvf $CWD/libpng-$VERSION.tar.?z* || exit 1
+cd libpng-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Look like using ./configure is the only way that works now...
+./configure --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man
+
+make -j4 prefix=/usr LIBPATH=/usr/lib${LIBDIRSUFFIX} ZLIBLIB="-L/usr/lib${LIBDIRSUFFIX} -lm -lz" || exit 1
+make install prefix=/usr LIBPATH=/usr/lib${LIBDIRSUFFIX} ZLIBLIB="-L/usr/lib${LIBDIRSUFFIX} -lm -lz" DESTDIR=$PKG
+
+# I'm ditching this to see if anyone cares.
+#
+## This symlink is needed to keep old applications running:
+## I guess the real lib used the major number 3, then 0 for
+## a short while, and now .3 again. Hopefully it will stay
+## this way as it was .3 in Slackware 10.2. One can hope.
+#( cd $PKG/usr/lib${LIBDIRSUFFIX}
+# if [ ! -e libpng.so.0 -a -e libpng.so.3 ]; then
+# ln -sf libpng.so.3 libpng.so.0
+# fi
+#)
+
+# Well, glad I got rid of the above, but <someone> upstream still does not
+# grok shared libraries on Linux it seems -- libpng-1.4.0 caused all the
+# newly compiled binaries to want libpng.so.14, and now libpng-1.4.1
+# wants to change that to libpng14.so.14. Searching online finds that
+# we are not the only ones with binaries that want libpng.so.14, so we
+# are forced to provide a compatibility symlink again... :-/
+#
+# We'll try to remove this in 5 to 10 years, just like before.
+( cd $PKG/usr/lib${LIBDIRSUFFIX}
+ if [ ! -e libpng.so.14 -a -e libpng14.so.14 ]; then
+ ln -sf libpng14.so.14 libpng.so.14
+ fi
+)
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+gzip -9 --force $PKG/usr/man/man?/*.?
+
+mkdir -p $PKG/usr/doc/libpng-$VERSION
+cp -a \
+ ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO \
+ libpng*.txt example.c \
+ $PKG/usr/doc/libpng-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/libpng-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+}
+
+# Build the 1.2 version:
+VERSION=$VERSION_OLD
+build_source
+
+# Build the 1.4 version:
+VERSION=$VERSION_NEW
+build_source
+
+# Default the includes to version 1.4.x:
+( cd $PKG/usr/include ; ln -sf libpng14 libpng )
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/libpng-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/libpng/libpng.url b/patches/source/libpng/libpng.url
new file mode 100644
index 000000000..f50d42755
--- /dev/null
+++ b/patches/source/libpng/libpng.url
@@ -0,0 +1 @@
+ftp://ftp.simplesystems.org/pub/libpng/png/src/
diff --git a/patches/source/libpng/slack-desc b/patches/source/libpng/slack-desc
new file mode 100644
index 000000000..54d1d0f92
--- /dev/null
+++ b/patches/source/libpng/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libpng: libpng (Portable Network Graphics library)
+libpng:
+libpng: PNG (Portable Network Graphics) is an extensible file format for the
+libpng: lossless, portable, well-compressed storage of raster images. PNG
+libpng: provides a patent-free replacement for GIF and can also replace many
+libpng: common uses of TIFF. Indexed-color, grayscale, and truecolor images
+libpng: are supported, plus an optional alpha channel. Sample depths range
+libpng: from 1 to 16 bits.
+libpng:
+libpng:
+libpng:
diff --git a/patches/source/libsndfile/libsndfile.SlackBuild b/patches/source/libsndfile/libsndfile.SlackBuild
new file mode 100755
index 000000000..b811cd49c
--- /dev/null
+++ b/patches/source/libsndfile/libsndfile.SlackBuild
@@ -0,0 +1,106 @@
+#!/bin/sh
+
+# Slackware build script for libsndfile
+
+# Copyright 2010 paul wisehart, Hyattsville, MD, USA
+# Copyright 2010 Robby Workman, Northport, Alabama, USA
+# Copyright 2011 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=libsndfile
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP || exit 1
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+cd $PKGNAM-$VERSION || exit 1
+
+chown -R root:root .
+chmod -R a-s,u+w,go+r-w .
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --htmldir=/usr/doc/$PKGNAM-$VERSION/html \
+ --disable-static \
+ --build=$ARCH-slackware-linux
+
+make htmldocdir=/usr/doc/$PKGNAM-$VERSION/html || exit 1
+make htmldocdir=/usr/doc/$PKGNAM-$VERSION/html DESTDIR=$PKG install
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING* INSTALL NEWS README* \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/libsndfile/slack-desc b/patches/source/libsndfile/slack-desc
new file mode 100644
index 000000000..2b84cb2db
--- /dev/null
+++ b/patches/source/libsndfile/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler---------------------------------------------------|
+libsndfile: libsndfile (C library for reading and writing wav files)
+libsndfile:
+libsndfile: Libsndfile is a C library for reading and writing files containing
+libsndfile: sampled sound (such as MS Windows WAV and Apple/SGI AIFF format).
+libsndfile:
+libsndfile: Homepage: http://www.mega-nerd.com/libsndfile/
+libsndfile:
+libsndfile:
+libsndfile:
+libsndfile:
+libsndfile:
diff --git a/patches/source/libsoup/libsoup.CVE-2017-2885.diff b/patches/source/libsoup/libsoup.CVE-2017-2885.diff
new file mode 100644
index 000000000..e0c318a2a
--- /dev/null
+++ b/patches/source/libsoup/libsoup.CVE-2017-2885.diff
@@ -0,0 +1,43 @@
+--- libsoup-2.58.1/libsoup/soup-filter-input-stream.c 2016-12-03 08:59:41.000000000 -0600
++++ libsoup-2.58.2/libsoup/soup-filter-input-stream.c 2017-08-10 07:06:09.000000000 -0500
+@@ -198,7 +198,7 @@
+ GCancellable *cancellable,
+ GError **error)
+ {
+- gssize nread;
++ gssize nread, read_length;
+ guint8 *p, *buf, *end;
+ gboolean eof = FALSE;
+ GError *my_error = NULL;
+@@ -251,10 +251,11 @@
+ } else
+ buf = fstream->priv->buf->data;
+
+- /* Scan for the boundary */
+- end = buf + fstream->priv->buf->len;
+- if (!eof)
+- end -= boundary_length;
++ /* Scan for the boundary within the range we can possibly return. */
++ if (include_boundary)
++ end = buf + MIN (fstream->priv->buf->len, length) - boundary_length;
++ else
++ end = buf + MIN (fstream->priv->buf->len - boundary_length, length);
+ for (p = buf; p <= end; p++) {
+ if (*p == *(guint8*)boundary &&
+ !memcmp (p, boundary, boundary_length)) {
+@@ -268,10 +269,9 @@
+ if (!*got_boundary && fstream->priv->buf->len < length && !eof)
+ goto fill_buffer;
+
+- /* Return everything up to 'p' (which is either just after the boundary if
+- * include_boundary is TRUE, just before the boundary if include_boundary is
+- * FALSE, @boundary_len - 1 bytes before the end of the buffer, or end-of-
+- * file).
+- */
+- return read_from_buf (fstream, buffer, p - buf);
++ if (eof && !*got_boundary)
++ read_length = MIN (fstream->priv->buf->len, length);
++ else
++ read_length = p - buf;
++ return read_from_buf (fstream, buffer, read_length);
+ }
diff --git a/patches/source/libsoup/libsoup.SlackBuild b/patches/source/libsoup/libsoup.SlackBuild
new file mode 100755
index 000000000..e4405b032
--- /dev/null
+++ b/patches/source/libsoup/libsoup.SlackBuild
@@ -0,0 +1,100 @@
+#!/bin/sh
+#
+# Slackware build script for libsoup
+#
+# Copyright 2009-2010 Erik W. Hanson, Minneapolis, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=libsoup
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-2_slack14.1}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
+cd $PKGNAM-$VERSION || exit 1
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+zcat $CWD/libsoup.CVE-2017-2885.diff.gz | patch -p1 --verbose || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var/lib \
+ --disable-static \
+ --with-gnome \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install-strip DESTDIR=$PKG || exit 1
+
+## NOTE: These _should_ go eventually, but for now it causes problems.
+## Don't ship .la files:
+#rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a COPYING* AUTHORS NEWS README* $PKG/usr/doc/$PKGNAM-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/patches/source/libsoup/slack-desc b/patches/source/libsoup/slack-desc
new file mode 100644
index 000000000..80cd6ef03
--- /dev/null
+++ b/patches/source/libsoup/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libsoup: libsoup (an HTTP client/server library)
+libsoup:
+libsoup: Soup is an HTTP client/server library implementation in C. It uses
+libsoup: GObjects and the glib main loop to integrate well with GTK+
+libsoup: applications, and has a synchronous API suitable for use in threaded
+libsoup: applications.
+libsoup:
+libsoup:
+libsoup:
+libsoup:
+libsoup:
diff --git a/patches/source/libssh/libssh.SlackBuild b/patches/source/libssh/libssh.SlackBuild
new file mode 100755
index 000000000..d69e0971a
--- /dev/null
+++ b/patches/source/libssh/libssh.SlackBuild
@@ -0,0 +1,113 @@
+#!/bin/sh
+
+# Copyright 2011, 2012 Eric Hameleers, Eindhoven, NL
+# Copyright 2011, 2012 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=libssh
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
+if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i486 ;;
+ armv7hl) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-${PKGNAM}
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf ${PKGNAM}-${VERSION}
+tar xvf $CWD/${PKGNAM}-$VERSION.tar.xz || exit 1
+cd ${PKGNAM}-$VERSION || exit 1
+
+# Make sure ownerships and permissions are sane:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Build and install:
+mkdir build
+cd build
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DWITH_GCRYPT=1 \
+ -DWITH_SSH1=1 \
+ -DWITH_PCAP=1 \
+ -DWITH_SFTP=1 \
+ -DWITH_SERVER=1 \
+ -DWITH_STATIC_LIB=0 \
+ ..
+ make $NUMJOBS VERBOSE=1 || make || exit 1
+ make install DESTDIR=$PKG || exit 1
+cd -
+
+# Strip binaries:
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS BSD ChangeLog COPYING INSTALL README doc/{API*,libssh*.txt} \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/libssh/slack-desc b/patches/source/libssh/slack-desc
new file mode 100644
index 000000000..12a1c1922
--- /dev/null
+++ b/patches/source/libssh/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libssh: libssh (library implementing ssh protocols)
+libssh:
+libssh: libssh is a mulitplatform C library implementing the SSHv2 and SSHv1
+libssh: protocol on client and server side. With libssh, you can remotely
+libssh: execute programs, transfer files, and use a secure and transparent
+libssh: tunnel for your remote applications.
+libssh:
+libssh: Homepage: http://www.libssh.org/
+libssh:
+libssh:
+libssh:
diff --git a/patches/source/libtasn1/libtasn1.SlackBuild b/patches/source/libtasn1/libtasn1.SlackBuild
new file mode 100755
index 000000000..43feb9c26
--- /dev/null
+++ b/patches/source/libtasn1/libtasn1.SlackBuild
@@ -0,0 +1,124 @@
+#!/bin/sh
+
+# Slackware build script for libtasn1
+
+# Copyright 2010-2012 Robby Workman, Northport, Alabama, USA
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=libtasn1
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:--j6}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
+cd $PKGNAM-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --enable-shared \
+ --disable-static \
+ --build=$ARCH-slackware-linux || exit 1
+ #--disable-gtk-doc \
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Don't ship .la files:
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+rm -f $PKG/usr/info/dir
+gzip -9 $PKG/usr/info/*
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING* NEWS README* THANKS \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/patches/source/libtasn1/slack-desc b/patches/source/libtasn1/slack-desc
new file mode 100644
index 000000000..da00dacb8
--- /dev/null
+++ b/patches/source/libtasn1/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler-----------------------------------------------------|
+libtasn1: libtasn1 (ASN.1 library)
+libtasn1:
+libtasn1: Libtasn1 is the GNU ASN.1 library. Abstract Syntax Notation One
+libtasn1: (ASN.1) is a standard and flexible notation that describes rules and
+libtasn1: structures for representing, encoding, transmitting, and decoding
+libtasn1: data in telecommunications and computer networking.
+libtasn1:
+libtasn1: Libtasn1 was written by Fabio Fiorina.
+libtasn1:
+libtasn1:
+libtasn1:
diff --git a/patches/source/libvorbis/libvorbis.SlackBuild b/patches/source/libvorbis/libvorbis.SlackBuild
new file mode 100755
index 000000000..597151f13
--- /dev/null
+++ b/patches/source/libvorbis/libvorbis.SlackBuild
@@ -0,0 +1,102 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+VERSION=${VERSION:-$(echo libvorbis-*.tar.?z* | cut -d - -f 2 | rev | cut -f 3- -d . | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-libvorbis
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf libvorbis-$VERSION
+tar xvf $CWD/libvorbis-$VERSION.tar.?z* || exit 1
+cd libvorbis-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --disable-static \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mv $PKG/usr/share/doc $PKG/usr
+cp -a \
+ AUTHORS COPYING HACKING README \
+ $PKG/usr/doc/libvorbis-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/libvorbis-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/libvorbis/slack-desc b/patches/source/libvorbis/slack-desc
new file mode 100644
index 000000000..2a3bb8f78
--- /dev/null
+++ b/patches/source/libvorbis/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libvorbis: libvorbis (Ogg Vorbis library)
+libvorbis:
+libvorbis: This library supports the Vorbis General Audio Compression Codec
+libvorbis: (commonly known as Ogg Vorbis). Ogg Vorbis is a fully open,
+libvorbis: non-proprietary, patent-and-royalty-free, general-purpose compressed
+libvorbis: audio format for audio and music at fixed and variable bitrates.
+libvorbis:
+libvorbis: The libvorbis library requires libao and libogg. You'll find some
+libvorbis: basic tools for creating and using Ogg Vorbis files in the
+libvorbis: vorbis-tools package.
+libvorbis:
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2004-0941.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2004-0941.patch
new file mode 100644
index 000000000..581e4e091
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2004-0941.patch
@@ -0,0 +1,17 @@
+--- libwmf-0.2.8.4/src/extra/gd/gd_png.c 2004-11-11 14:02:37.407589824 -0500
++++ libwmf-0.2.8.4/src/extra/gd/gd_png.c 2004-11-11 14:04:29.672522960 -0500
+@@ -188,6 +188,14 @@
+
+ png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
+ &interlace_type, NULL, NULL);
++ if (overflow2(sizeof (int), width))
++ {
++ return NULL;
++ }
++ if (overflow2(sizeof (int) * width, height))
++ {
++ return NULL;
++ }
+ if ((color_type == PNG_COLOR_TYPE_RGB) ||
+ (color_type == PNG_COLOR_TYPE_RGB_ALPHA))
+ {
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2006-3376.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2006-3376.patch
new file mode 100644
index 000000000..507fe6622
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2006-3376.patch
@@ -0,0 +1,27 @@
+--- libwmf-0.2.8.4.orig/src/player.c 2002-12-10 19:30:26.000000000 +0000
++++ libwmf-0.2.8.4/src/player.c 2006-07-12 15:12:52.000000000 +0100
+@@ -42,6 +42,7 @@
+ #include "player/defaults.h" /* Provides: default settings */
+ #include "player/record.h" /* Provides: parameter mechanism */
+ #include "player/meta.h" /* Provides: record interpreters */
++#include <stdint.h>
+
+ /**
+ * @internal
+@@ -132,8 +134,14 @@
+ }
+ }
+
+-/* P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API)-3) * 2 * sizeof (unsigned char));
+- */ P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API) ) * 2 * sizeof (unsigned char));
++ if (MAX_REC_SIZE(API) > UINT32_MAX / 2)
++ {
++ API->err = wmf_E_InsMem;
++ WMF_DEBUG (API,"bailing...");
++ return (API->err);
++ }
++
++ P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API) ) * 2 * sizeof (unsigned char));
+
+ if (ERR (API))
+ { WMF_DEBUG (API,"bailing...");
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-0455.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-0455.patch
new file mode 100644
index 000000000..0cc5abc71
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-0455.patch
@@ -0,0 +1,11 @@
+--- libwmf-0.2.8.4/src/extra/gd/gdft.c 2010-12-06 11:18:26.000000000 +0000
++++ libwmf-0.2.8.4/src/extra/gd/gdft.c 2010-12-06 11:21:09.000000000 +0000
+@@ -811,7 +811,7 @@
+ {
+ ch = c & 0xFF; /* don't extend sign */
+ }
+- next++;
++ if (*next) next++;
+ }
+ else
+ {
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-2756.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-2756.patch
new file mode 100644
index 000000000..eba8fac25
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-2756.patch
@@ -0,0 +1,16 @@
+--- libwmf-0.2.8.4/src/extra/gd/gd_png.c 1 Apr 2007 20:41:01 -0000 1.21.2.1
++++ libwmf-0.2.8.4/src/extra/gd/gd_png.c 16 May 2007 19:06:11 -0000
+@@ -78,8 +78,11 @@
+ gdPngReadData (png_structp png_ptr,
+ png_bytep data, png_size_t length)
+ {
+- gdGetBuf (data, length, (gdIOCtx *)
+- png_get_io_ptr (png_ptr));
++ int check;
++ check = gdGetBuf (data, length, (gdIOCtx *) png_get_io_ptr (png_ptr));
++ if (check != length) {
++ png_error(png_ptr, "Read Error: truncated data");
++ }
+ }
+
+ static void
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-3472.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-3472.patch
new file mode 100644
index 000000000..ac1ead5a8
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-3472.patch
@@ -0,0 +1,61 @@
+--- libwmf-0.2.8.4/src/extra/gd/gd.c
++++ libwmf-0.2.8.4/src/extra/gd/gd.c
+@@ -106,6 +106,18 @@
+ gdImagePtr im;
+ unsigned long cpa_size;
+
++ if (overflow2(sx, sy)) {
++ return NULL;
++ }
++
++ if (overflow2(sizeof (int *), sy)) {
++ return NULL;
++ }
++
++ if (overflow2(sizeof(int), sx)) {
++ return NULL;
++ }
++
+ im = (gdImage *) gdMalloc (sizeof (gdImage));
+ if (im == 0) return 0;
+ memset (im, 0, sizeof (gdImage));
+--- libwmf-0.2.8.4/src/extra/gd/gdhelpers.c 2010-12-06 11:47:31.000000000 +0000
++++ libwmf-0.2.8.4/src/extra/gd/gdhelpers.c 2010-12-06 11:48:04.000000000 +0000
+@@ -2,6 +2,7 @@
+ #include "gdhelpers.h"
+ #include <stdlib.h>
+ #include <string.h>
++#include <limits.h>
+
+ /* TBB: gd_strtok_r is not portable; provide an implementation */
+
+@@ -94,3 +95,18 @@
+ {
+ free (ptr);
+ }
++
++int overflow2(int a, int b)
++{
++ if(a < 0 || b < 0) {
++ fprintf(stderr, "gd warning: one parameter to a memory allocation multiplication is negative, failing operation gracefully\n");
++ return 1;
++ }
++ if(b == 0)
++ return 0;
++ if(a > INT_MAX / b) {
++ fprintf(stderr, "gd warning: product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully\n");
++ return 1;
++ }
++ return 0;
++}
+--- libwmf-0.2.8.4/src/extra/gd/gdhelpers.h 2010-12-06 11:47:17.000000000 +0000
++++ libwmf-0.2.8.4/src/extra/gd/gdhelpers.h 2010-12-06 11:48:36.000000000 +0000
+@@ -15,6 +15,8 @@
+ void *gdMalloc(size_t size);
+ void *gdRealloc(void *ptr, size_t size);
+
++int overflow2(int a, int b);
++
+ #pragma GCC visibility pop
+
+ #endif /* GDHELPERS_H */
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-3473.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-3473.patch
new file mode 100644
index 000000000..590189969
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-3473.patch
@@ -0,0 +1,13 @@
+--- libwmf-0.2.8.4/src/extra/gd/gd.c
++++ libwmf-0.2.8.4/src/extra/gd/gd.c
+@@ -2483,6 +2483,10 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromXbm (FILE * fd)
+ }
+ bytes = (w * h / 8) + 1;
+ im = gdImageCreate (w, h);
++ if (!im) {
++ return 0;
++ }
++
+ gdImageColorAllocate (im, 255, 255, 255);
+ gdImageColorAllocate (im, 0, 0, 0);
+ x = 0;
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-3477.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-3477.patch
new file mode 100644
index 000000000..81ac03853
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-3477.patch
@@ -0,0 +1,38 @@
+--- libwmf-0.2.8.4/src/extra/gd/gd.c
++++ libwmf-0.2.8.4/src/extra/gd/gd.c
+@@ -1335,10 +1335,31 @@
+ int w2, h2;
+ w2 = w / 2;
+ h2 = h / 2;
+- while (e < s)
+- {
+- e += 360;
+- }
++
++ if ((s % 360) == (e % 360)) {
++ s = 0; e = 360;
++ } else {
++ if (s > 360) {
++ s = s % 360;
++ }
++
++ if (e > 360) {
++ e = e % 360;
++ }
++
++ while (s < 0) {
++ s += 360;
++ }
++
++ while (e < s) {
++ e += 360;
++ }
++
++ if (s == e) {
++ s = 0; e = 360;
++ }
++ }
++
+ for (i = s; (i <= e); i++)
+ {
+ int x, y;
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2009-3546.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2009-3546.patch
new file mode 100644
index 000000000..d718976ad
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2009-3546.patch
@@ -0,0 +1,13 @@
+--- libwmf-0.2.8.4/src/extra/gd/gd_gd.c 2010-12-06 14:56:06.000000000 +0000
++++ libwmf-0.2.8.4/src/extra/gd/gd_gd.c 2010-12-06 14:57:04.000000000 +0000
+@@ -42,6 +42,10 @@
+ {
+ goto fail1;
+ }
++ if (&im->colorsTotal > gdMaxColors)
++ {
++ goto fail1;
++ }
+ }
+ /* Int to accommodate truecolor single-color transparency */
+ if (!gdGetInt (&im->transparent, in))
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2015-0848+CVE-2015-4588.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2015-0848+CVE-2015-4588.patch
new file mode 100644
index 000000000..e8ba8db1e
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2015-0848+CVE-2015-4588.patch
@@ -0,0 +1,118 @@
+--- libwmf-0.2.8.4/src/ipa/ipa/bmp.h 2015-06-08 14:46:24.591876404 +0100
++++ libwmf-0.2.8.4/src/ipa/ipa/bmp.h 2015-06-08 14:46:35.345993247 +0100
+@@ -859,7 +859,7 @@
+ %
+ %
+ */
+-static void DecodeImage (wmfAPI* API,wmfBMP* bmp,BMPSource* src,unsigned int compression,unsigned char* pixels)
++static int DecodeImage (wmfAPI* API,wmfBMP* bmp,BMPSource* src,unsigned int compression,unsigned char* pixels)
+ { int byte;
+ int count;
+ int i;
+@@ -870,12 +870,14 @@
+ U32 u;
+
+ unsigned char* q;
++ unsigned char* end;
+
+ for (u = 0; u < ((U32) bmp->width * (U32) bmp->height); u++) pixels[u] = 0;
+
+ byte = 0;
+ x = 0;
+ q = pixels;
++ end = pixels + bmp->width * bmp->height;
+
+ for (y = 0; y < bmp->height; )
+ { count = ReadBlobByte (src);
+@@ -884,7 +886,10 @@
+ { /* Encoded mode. */
+ byte = ReadBlobByte (src);
+ for (i = 0; i < count; i++)
+- { if (compression == 1)
++ {
++ if (q == end)
++ return 0;
++ if (compression == 1)
+ { (*(q++)) = (unsigned char) byte;
+ }
+ else
+@@ -896,13 +901,15 @@
+ else
+ { /* Escape mode. */
+ count = ReadBlobByte (src);
+- if (count == 0x01) return;
++ if (count == 0x01) return 1;
+ switch (count)
+ {
+ case 0x00:
+ { /* End of line. */
+ x = 0;
+ y++;
++ if (y >= bmp->height)
++ return 0;
+ q = pixels + y * bmp->width;
+ break;
+ }
+@@ -910,13 +917,20 @@
+ { /* Delta mode. */
+ x += ReadBlobByte (src);
+ y += ReadBlobByte (src);
++ if (y >= bmp->height)
++ return 0;
++ if (x >= bmp->width)
++ return 0;
+ q = pixels + y * bmp->width + x;
+ break;
+ }
+ default:
+ { /* Absolute mode. */
+ for (i = 0; i < count; i++)
+- { if (compression == 1)
++ {
++ if (q == end)
++ return 0;
++ if (compression == 1)
+ { (*(q++)) = ReadBlobByte (src);
+ }
+ else
+@@ -943,7 +957,7 @@
+ byte = ReadBlobByte (src); /* end of line */
+ byte = ReadBlobByte (src);
+
+- return;
++ return 1;
+ }
+
+ /*
+@@ -1143,8 +1157,18 @@
+ }
+ }
+ else
+- { /* Convert run-length encoded raster pixels. */
+- DecodeImage (API,bmp,src,(unsigned int) bmp_info.compression,data->image);
++ {
++ if (bmp_info.bits_per_pixel == 8) /* Convert run-length encoded raster pixels. */
++ {
++ if (!DecodeImage (API,bmp,src,(unsigned int) bmp_info.compression,data->image))
++ { WMF_ERROR (API,"corrupt bmp");
++ API->err = wmf_E_BadFormat;
++ }
++ }
++ else
++ { WMF_ERROR (API,"Unexpected pixel depth");
++ API->err = wmf_E_BadFormat;
++ }
+ }
+
+ if (ERR (API))
+--- libwmf-0.2.8.4/src/ipa/ipa.h 2015-06-08 14:46:24.590876393 +0100
++++ libwmf-0.2.8.4/src/ipa/ipa.h 2015-06-08 14:46:35.345993247 +0100
+@@ -48,7 +48,7 @@
+ static unsigned short ReadBlobLSBShort (BMPSource*);
+ static unsigned long ReadBlobLSBLong (BMPSource*);
+ static long TellBlob (BMPSource*);
+-static void DecodeImage (wmfAPI*,wmfBMP*,BMPSource*,unsigned int,unsigned char*);
++static int DecodeImage (wmfAPI*,wmfBMP*,BMPSource*,unsigned int,unsigned char*);
+ static void ReadBMPImage (wmfAPI*,wmfBMP*,BMPSource*);
+ static int ExtractColor (wmfAPI*,wmfBMP*,wmfRGB*,unsigned int,unsigned int);
+ static void SetColor (wmfAPI*,wmfBMP*,wmfRGB*,unsigned char,unsigned int,unsigned int);
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2015-4695.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2015-4695.patch
new file mode 100644
index 000000000..b6d499da9
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2015-4695.patch
@@ -0,0 +1,56 @@
+--- libwmf-0.2.8.4/src/player/meta.h
++++ libwmf-0.2.8.4/src/player/meta.h
+@@ -1565,7 +1565,7 @@ static int meta_rgn_create (wmfAPI* API,
+ objects = P->objects;
+
+ i = 0;
+- while (objects[i].type && (i < NUM_OBJECTS (API))) i++;
++ while ((i < NUM_OBJECTS (API)) && objects[i].type) i++;
+
+ if (i == NUM_OBJECTS (API))
+ { WMF_ERROR (API,"Object out of range!");
+@@ -2142,7 +2142,7 @@ static int meta_dib_brush (wmfAPI* API,w
+ objects = P->objects;
+
+ i = 0;
+- while (objects[i].type && (i < NUM_OBJECTS (API))) i++;
++ while ((i < NUM_OBJECTS (API)) && objects[i].type) i++;
+
+ if (i == NUM_OBJECTS (API))
+ { WMF_ERROR (API,"Object out of range!");
+@@ -3067,7 +3067,7 @@ static int meta_pen_create (wmfAPI* API,
+ objects = P->objects;
+
+ i = 0;
+- while (objects[i].type && (i < NUM_OBJECTS (API))) i++;
++ while ((i < NUM_OBJECTS (API)) && objects[i].type) i++;
+
+ if (i == NUM_OBJECTS (API))
+ { WMF_ERROR (API,"Object out of range!");
+@@ -3181,7 +3181,7 @@ static int meta_brush_create (wmfAPI* AP
+ objects = P->objects;
+
+ i = 0;
+- while (objects[i].type && (i < NUM_OBJECTS (API))) i++;
++ while ((i < NUM_OBJECTS (API)) && objects[i].type) i++;
+
+ if (i == NUM_OBJECTS (API))
+ { WMF_ERROR (API,"Object out of range!");
+@@ -3288,7 +3288,7 @@ static int meta_font_create (wmfAPI* API
+ objects = P->objects;
+
+ i = 0;
+- while (objects[i].type && (i < NUM_OBJECTS (API))) i++;
++ while ((i < NUM_OBJECTS (API)) && objects[i].type) i++;
+
+ if (i == NUM_OBJECTS (API))
+ { WMF_ERROR (API,"Object out of range!");
+@@ -3396,7 +3396,7 @@ static int meta_palette_create (wmfAPI*
+ objects = P->objects;
+
+ i = 0;
+- while (objects[i].type && (i < NUM_OBJECTS (API))) i++;
++ while ((i < NUM_OBJECTS (API)) && objects[i].type) i++;
+
+ if (i == NUM_OBJECTS (API))
+ { WMF_ERROR (API,"Object out of range!");
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2015-4696.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2015-4696.patch
new file mode 100644
index 000000000..331284125
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2015-4696.patch
@@ -0,0 +1,23 @@
+--- libwmf-0.2.8.4/src/player/meta.h
++++ libwmf-0.2.8.4/src/player/meta.h
+@@ -2585,6 +2585,8 @@
+ polyrect.BR[i] = clip->rects[i].BR;
+ }
+
++ if (FR->region_clip) FR->region_clip (API,&polyrect);
++
+ wmf_free (API,polyrect.TL);
+ wmf_free (API,polyrect.BR);
+ }
+@@ -2593,9 +2595,10 @@
+ polyrect.BR = 0;
+
+ polyrect.count = 0;
++
++ if (FR->region_clip) FR->region_clip (API,&polyrect);
+ }
+
+- if (FR->region_clip) FR->region_clip (API,&polyrect);
+
+ return (changed);
+ }
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-10167.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-10167.patch
new file mode 100644
index 000000000..5e2819743
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-10167.patch
@@ -0,0 +1,30 @@
+--- libwmf-0.2.8.4/src/extra/gd/gd_gd2.c
++++ libwmf-0.2.8.4/src/extra/gd/gd_gd2.c
+@@ -362,10 +362,9 @@
+ {
+ if (!gdGetInt (&im->tpixels[y][x], in))
+ {
+- /*printf("EOF while reading\n"); */
+- /*gdImageDestroy(im); */
+- /*return 0; */
+- im->tpixels[y][x] = 0;
++ fprintf(stderr, "gd2: EOF while reading\n");
++ gdImageDestroy(im);
++ return NULL;
+ }
+ }
+ else
+@@ -373,10 +372,9 @@
+ int ch;
+ if (!gdGetByte (&ch, in))
+ {
+- /*printf("EOF while reading\n"); */
+- /*gdImageDestroy(im); */
+- /*return 0; */
+- ch = 0;
++ fprintf(stderr, "gd2: EOF while reading\n");
++ gdImageDestroy(im);
++ return NULL;
+ }
+ im->pixels[y][x] = ch;
+ }
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-10168.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-10168.patch
new file mode 100644
index 000000000..f08b1f1e5
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-10168.patch
@@ -0,0 +1,14 @@
+--- libwmf-0.2.8.4/src/extra/gd/gd_gd2.c
++++ libwmf-0.2.8.4/src/extra/gd/gd_gd2.c
+@@ -145,6 +145,11 @@
+
+ if ((*fmt) == GD2_FMT_COMPRESSED)
+ {
++ if (*ncx <= 0 || *ncy <= 0 || *ncx > INT_MAX / *ncy) {
++ GD2_DBG(printf ("Illegal chunk counts: %d * %d\n", *ncx, *ncy));
++ goto fail1;
++ }
++
+ nc = (*ncx) * (*ncy);
+ GD2_DBG (printf ("Reading %d chunk index entries\n", nc));
+ sidx = sizeof (t_chunk_info) * nc;
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-9011.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-9011.patch
new file mode 100644
index 000000000..c6bd017c2
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-9011.patch
@@ -0,0 +1,36 @@
+--- libwmf-0.2.8.4/src/player.c
++++ libwmf-0.2.8.4/src/player.c
+@@ -139,8 +139,31 @@
+ WMF_DEBUG (API,"bailing...");
+ return (API->err);
+ }
+-
+- P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API) ) * 2 * sizeof (unsigned char));
++
++ U32 nMaxRecordSize = (MAX_REC_SIZE(API) ) * 2 * sizeof (unsigned char);
++ if (nMaxRecordSize)
++ {
++ //before allocating memory do a sanity check on size by seeking
++ //to claimed end to see if its possible. We're constrained here
++ //by the api and existing implementations to not simply seeking
++ //to SEEK_END. So use what we have to skip to the last byte and
++ //try and read it.
++ const long nPos = WMF_TELL (API);
++ WMF_SEEK (API, nPos + nMaxRecordSize - 1);
++ if (ERR (API))
++ { WMF_DEBUG (API,"bailing...");
++ return (API->err);
++ }
++ int byte = WMF_READ (API);
++ if (byte == (-1))
++ { WMF_ERROR (API,"Unexpected EOF!");
++ API->err = wmf_E_EOF;
++ return (API->err);
++ }
++ WMF_SEEK (API, nPos);
++ }
++
++ P->Parameters = (unsigned char*) wmf_malloc (API, nMaxRecordSize);
+
+ if (ERR (API))
+ { WMF_DEBUG (API,"bailing...");
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-9317.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-9317.patch
new file mode 100644
index 000000000..cf57734ed
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-9317.patch
@@ -0,0 +1,21 @@
+--- libwmf-0.2.8.4/src/extra/gd/gd.c
++++ libwmf-0.2.8.4/src/extra/gd/gd.c
+@@ -65,6 +65,18 @@
+ {
+ int i;
+ gdImagePtr im;
++
++ if (overflow2(sx, sy)) {
++ return NULL;
++ }
++
++ if (overflow2(sizeof (unsigned char *), sy)) {
++ return NULL;
++ }
++ if (overflow2(sizeof (unsigned char), sx)) {
++ return NULL;
++ }
++
+ im = (gdImage *) gdMalloc (sizeof (gdImage));
+ memset (im, 0, sizeof (gdImage));
+ /* Row-major ever since gd 1.3 */
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2017-6362.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2017-6362.patch
new file mode 100644
index 000000000..2ad180d97
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2017-6362.patch
@@ -0,0 +1,32 @@
+--- libwmf-0.2.8.4/src/extra/gd/gd_png.c
++++ libwmf-0.2.8.4/src/extra/gd/gd_png.c
+@@ -435,17 +435,6 @@
+ out->free (out);
+ }
+
+-void *
+-gdImagePngPtr (gdImagePtr im, int *size)
+-{
+- void *rv;
+- gdIOCtx *out = gdNewDynamicCtx (2048, NULL);
+- gdImagePngCtx (im, out);
+- rv = gdDPExtractData (out, size);
+- out->free (out);
+- return rv;
+-}
+-
+ /* This routine is based in part on code from Dale Lutz (Safe Software Inc.)
+ * and in part on demo code from Chapter 15 of "PNG: The Definitive Guide"
+ * (http://www.cdrom.com/pub/png/pngbook.html).
+--- libwmf-0.2.8.4/src/extra/gd/gd.h
++++ libwmf-0.2.8.4/src/extra/gd/gd.h
+@@ -373,9 +373,6 @@
+ void gdImageGd2(gdImagePtr im, FILE *out, int cs, int fmt);
+
+ /* Best to free this memory with gdFree(), not free() */
+-void* gdImagePngPtr(gdImagePtr im, int *size);
+-
+-/* Best to free this memory with gdFree(), not free() */
+ void* gdImageGdPtr(gdImagePtr im, int *size);
+
+ /* Best to free this memory with gdFree(), not free() */
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-fallbackfont.patch b/patches/source/libwmf/libwmf-0.2.8.4-fallbackfont.patch
new file mode 100644
index 000000000..83383138a
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-fallbackfont.patch
@@ -0,0 +1,18 @@
+diff -ru libwmf-0.2.8.4.orig/src/font.c libwmf-0.2.8.4/src/font.c
+--- libwmf-0.2.8.4.orig/src/font.c 2005-07-27 21:35:06.000000000 +0100
++++ libwmf-0.2.8.4/src/font.c 2006-01-03 12:53:38.000000000 +0000
+@@ -1429,11 +1429,9 @@
+ if (GS->len == 0) return (0);
+
+ name = font->lfFaceName;
+- if (name == 0)
+- { WMF_DEBUG (API,"No font name?");
+- API->err = wmf_E_Glitch;
+- return (0);
+- }
++
++ if (name == 0 || name[0] == 0)
++ name = "Times";
+
+ /* Find first white-space character or eol
+ */
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-pixbufloaderdir.patch b/patches/source/libwmf/libwmf-0.2.8.4-pixbufloaderdir.patch
new file mode 100644
index 000000000..a03578581
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-pixbufloaderdir.patch
@@ -0,0 +1,14 @@
+diff -up libwmf-0.2.8.4/configure.in.pixbufloaderdir libwmf-0.2.8.4/configure.in
+--- libwmf-0.2.8.4/configure.in.pixbufloaderdir 2010-06-28 23:35:06.227167269 -0400
++++ libwmf-0.2.8.4/configure.in 2010-06-28 23:36:00.948420306 -0400
+@@ -741,8 +741,8 @@
+
+ if test $LIBWMF_BUILDSTYLE != lite; then
+ PKG_CHECK_MODULES(GDK_PIXBUF,gdk-pixbuf-2.0 >= 2.1.2,[
+- GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
+- GDK_PIXBUF_DIR="gtk-2.0/$GTK_VERSION/loaders"
++ GDK_PIXBUF_VERSION=`$PKG_CONFIG --variable=gdk_pixbuf_binary_version gdk-pixbuf-2.0`
++ GDK_PIXBUF_DIR="gdk-pixbuf-2.0/$GDK_PIXBUF_VERSION/loaders"
+ wmf_gdk_pixbuf=yes
+ ],[ wmf_gdk_pixbuf=no
+ ])
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-reducesymbols.patch b/patches/source/libwmf/libwmf-0.2.8.4-reducesymbols.patch
new file mode 100644
index 000000000..45d82b327
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-reducesymbols.patch
@@ -0,0 +1,520 @@
+diff -ru libwmf-0.2.8.4/src/extra/gd/gd.c libwmf-0.2.8.4.symbols/src/extra/gd/gd.c
+--- libwmf-0.2.8.4/src/extra/gd/gd.c 2005-07-27 21:35:05.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gd.c 2006-11-16 12:27:05.000000000 +0000
+@@ -249,6 +249,7 @@
+ }
+ HWBType;
+
++#if 0
+ static HWBType *
+ RGB_to_HWB (RGBType RGB, HWBType * HWB)
+ {
+@@ -308,7 +309,6 @@
+ return diff;
+ }
+
+-#if 0
+ /*
+ * This is not actually used, but is here for completeness, in case someone wants to
+ * use the HWB stuff for anything else...
+@@ -355,6 +355,7 @@
+ }
+ #endif
+
++#if 0
+ int
+ gdImageColorClosestHWB (gdImagePtr im, int r, int g, int b)
+ {
+@@ -384,6 +385,7 @@
+ }
+ return ct;
+ }
++#endif
+
+ int
+ gdImageColorExact (gdImagePtr im, int r, int g, int b)
+@@ -677,7 +679,7 @@
+ }
+ }
+
+-int
++static int
+ gdImageGetTrueColorPixel (gdImagePtr im, int x, int y)
+ {
+ int p = gdImageGetPixel (im, x, y);
+@@ -1286,11 +1288,11 @@
+ return len;
+ }
+
+-#ifndef HAVE_LSQRT
++#if 0
+ /* If you don't have a nice square root function for longs, you can use
+ ** this hack
+ */
+-long
++static long
+ lsqrt (long n)
+ {
+ long result = (long) sqrt ((double) n);
+@@ -2250,7 +2252,7 @@
+ }
+ }
+
+-int gdCompareInt (const void *a, const void *b);
++static int gdCompareInt (const void *a, const void *b);
+
+ /* THANKS to Kirsten Schulz for the polygon fixes! */
+
+diff -ru libwmf-0.2.8.4/src/extra/gd/gdcache.h libwmf-0.2.8.4.symbols/src/extra/gd/gdcache.h
+--- libwmf-0.2.8.4/src/extra/gd/gdcache.h 2001-08-21 15:40:33.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gdcache.h 2006-11-16 12:13:40.000000000 +0000
+@@ -41,6 +41,9 @@
+ /*********************************************************/
+
+ /* #include <malloc.h> */
++
++#pragma GCC visibility push(hidden)
++
+ #ifndef NULL
+ #define NULL (void *)0
+ #endif
+@@ -81,3 +84,5 @@
+
+ void *
+ gdCacheGet( gdCache_head_t *head, void *keydata );
++
++#pragma GCC visibility pop
+diff -ru libwmf-0.2.8.4/src/extra/gd/gd_clip.h libwmf-0.2.8.4.symbols/src/extra/gd/gd_clip.h
+--- libwmf-0.2.8.4/src/extra/gd/gd_clip.h 2001-03-28 10:37:30.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_clip.h 2006-11-16 12:11:49.000000000 +0000
+@@ -1,6 +1,8 @@
+ #ifndef GD_CLIP_H
+ #define GD_CLIP_H 1
+
++#pragma GCC visibility push(hidden)
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+@@ -23,4 +25,6 @@
+ }
+ #endif
+
++#pragma GCC visibility pop
++
+ #endif /* GD_CLIP_H */
+diff -ru libwmf-0.2.8.4/src/extra/gd/gdfontg.h libwmf-0.2.8.4.symbols/src/extra/gd/gdfontg.h
+--- libwmf-0.2.8.4/src/extra/gd/gdfontg.h 2001-03-28 10:37:30.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gdfontg.h 2006-11-16 12:12:03.000000000 +0000
+@@ -2,6 +2,8 @@
+ #ifndef _GDFONTG_H_
+ #define _GDFONTG_H_ 1
+
++#pragma GCC visibility push(hidden)
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+@@ -25,5 +27,7 @@
+ }
+ #endif
+
++#pragma GCC visibility pop
++
+ #endif
+
+diff -ru libwmf-0.2.8.4/src/extra/gd/gdfontl.h libwmf-0.2.8.4.symbols/src/extra/gd/gdfontl.h
+--- libwmf-0.2.8.4/src/extra/gd/gdfontl.h 2001-03-28 10:37:30.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gdfontl.h 2006-11-16 12:12:11.000000000 +0000
+@@ -2,6 +2,8 @@
+ #ifndef _GDFONTL_H_
+ #define _GDFONTL_H_ 1
+
++#pragma GCC visibility push(hidden)
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+@@ -26,5 +28,7 @@
+ }
+ #endif
+
++#pragma GCC visibility pop
++
+ #endif
+
+diff -ru libwmf-0.2.8.4/src/extra/gd/gdfontmb.h libwmf-0.2.8.4.symbols/src/extra/gd/gdfontmb.h
+--- libwmf-0.2.8.4/src/extra/gd/gdfontmb.h 2001-03-28 10:37:30.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gdfontmb.h 2006-11-16 12:12:19.000000000 +0000
+@@ -2,6 +2,8 @@
+ #ifndef _GDFONTMB_H_
+ #define _GDFONTMB_H_ 1
+
++#pragma GCC visibility push(hidden)
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+@@ -24,5 +26,7 @@
+ }
+ #endif
+
++#pragma GCC visibility pop
++
+ #endif
+
+diff -ru libwmf-0.2.8.4/src/extra/gd/gdfonts.h libwmf-0.2.8.4.symbols/src/extra/gd/gdfonts.h
+--- libwmf-0.2.8.4/src/extra/gd/gdfonts.h 2001-03-28 10:37:30.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gdfonts.h 2006-11-16 12:12:28.000000000 +0000
+@@ -2,6 +2,8 @@
+ #ifndef _GDFONTS_H_
+ #define _GDFONTS_H_ 1
+
++#pragma GCC visibility push(hidden)
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+@@ -24,5 +26,7 @@
+ }
+ #endif
+
++#pragma GCC visibility pop
++
+ #endif
+
+diff -ru libwmf-0.2.8.4/src/extra/gd/gdfontt.h libwmf-0.2.8.4.symbols/src/extra/gd/gdfontt.h
+--- libwmf-0.2.8.4/src/extra/gd/gdfontt.h 2001-03-28 10:37:30.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gdfontt.h 2006-11-16 12:12:36.000000000 +0000
+@@ -2,6 +2,8 @@
+ #ifndef _GDFONTT_H_
+ #define _GDFONTT_H_ 1
+
++#pragma GCC visibility push(hidden)
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+@@ -25,5 +27,7 @@
+ }
+ #endif
+
++#pragma GCC visibility pop
++
+ #endif
+
+diff -ru libwmf-0.2.8.4/src/extra/gd/gdft.c libwmf-0.2.8.4.symbols/src/extra/gd/gdft.c
+--- libwmf-0.2.8.4/src/extra/gd/gdft.c 2005-07-27 21:35:05.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gdft.c 2006-11-16 12:24:50.000000000 +0000
+@@ -533,7 +533,7 @@
+ }
+
+ /* draw_bitmap - transfers glyph bitmap to GD image */
+-/* static */ char *
++static char *
+ gdft_draw_bitmap (gdImage * im, int fg, FT_Bitmap bitmap, int pen_x, int pen_y)
+ {
+ unsigned char *pixel = 0;
+@@ -643,7 +643,7 @@
+ return (char *) NULL;
+ }
+
+-int
++static int
+ gdroundupdown (FT_F26Dot6 v1, int updown)
+ {
+ return (!updown)
+@@ -651,7 +651,9 @@
+ : (v1 > 0 ? ((v1 + 63) >> 6) : v1 >> 6);
+ }
+
++#pragma GCC visibility push(hidden)
+ extern int any2eucjp (char *, char *, unsigned int);
++#pragma GCC visibility pop
+
+ /********************************************************************/
+ /* gdImageStringFT - render a utf8 string onto a gd image */
+diff -ru libwmf-0.2.8.4/src/extra/gd/gd_gd2.c libwmf-0.2.8.4.symbols/src/extra/gd/gd_gd2.c
+--- libwmf-0.2.8.4/src/extra/gd/gd_gd2.c 2005-07-27 21:35:05.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_gd2.c 2006-11-16 12:21:28.000000000 +0000
+@@ -34,8 +34,10 @@
+ }
+ t_chunk_info;
+
++#pragma GCC visibility push(hidden)
+ extern int _gdGetColors (gdIOCtx * in, gdImagePtr im, int gd2xFlag);
+ extern void _gdPutColors (gdImagePtr im, gdIOCtx * out);
++#pragma GCC visibility pop
+
+ /* */
+ /* Read the extra info in the gd2 header. */
+diff -ru libwmf-0.2.8.4/src/extra/gd/gd_gd.c libwmf-0.2.8.4.symbols/src/extra/gd/gd_gd.c
+--- libwmf-0.2.8.4/src/extra/gd/gd_gd.c 2005-07-27 21:35:05.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_gd.c 2006-11-16 12:21:43.000000000 +0000
+@@ -11,6 +11,11 @@
+ /* Exported functions: */
+ extern void gdImageGd (gdImagePtr im, FILE * out);
+
++#pragma GCC visibility push(hidden)
++int _gdGetColors (gdIOCtx * in, gdImagePtr im, int gd2xFlag);
++void _gdPutColors (gdImagePtr im, gdIOCtx * out);
++#pragma GCC visibility pop
++
+
+ /* Use this for commenting out debug-print statements. */
+ /* Just use the first '#define' to allow all the prints... */
+diff -ru libwmf-0.2.8.4/src/extra/gd/gd.h libwmf-0.2.8.4.symbols/src/extra/gd/gd.h
+--- libwmf-0.2.8.4/src/extra/gd/gd.h 2002-12-05 20:09:11.000000000 +0000
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gd.h 2006-11-16 12:14:11.000000000 +0000
+@@ -25,6 +25,8 @@
+ #include <gd_io.h>
+ #include <gd_clip.h>
+
++#pragma GCC visibility push(hidden)
++
+ /* The maximum number of palette entries in palette-based images.
+ In the wonderful new world of gd 2.0, you can of course have
+ many more colors when using truecolor mode. */
+@@ -497,6 +499,8 @@
+ /* resolution affects ttf font rendering, particularly hinting */
+ #define GD_RESOLUTION 96 /* pixels per inch */
+
++#pragma GCC visibility pop
++
+ #ifdef __cplusplus
+ }
+ #endif
+diff -ru libwmf-0.2.8.4/src/extra/gd/gdhelpers.h libwmf-0.2.8.4.symbols/src/extra/gd/gdhelpers.h
+--- libwmf-0.2.8.4/src/extra/gd/gdhelpers.h 2001-03-28 10:37:31.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gdhelpers.h 2006-11-16 12:12:55.000000000 +0000
+@@ -1,6 +1,8 @@
+ #ifndef GDHELPERS_H
+ #define GDHELPERS_H 1
+
++#pragma GCC visibility push(hidden)
++
+ /* TBB: strtok_r is not universal; provide an implementation of it. */
+
+ extern char *gd_strtok_r(char *s, char *sep, char **state);
+@@ -13,5 +15,7 @@
+ void *gdMalloc(size_t size);
+ void *gdRealloc(void *ptr, size_t size);
+
++#pragma GCC visibility pop
++
+ #endif /* GDHELPERS_H */
+
+diff -ru libwmf-0.2.8.4/src/extra/gd/gd_io.h libwmf-0.2.8.4.symbols/src/extra/gd/gd_io.h
+--- libwmf-0.2.8.4/src/extra/gd/gd_io.h 2001-03-28 10:37:30.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_io.h 2006-11-16 12:13:08.000000000 +0000
+@@ -2,6 +2,8 @@
+ #define GD_IO_H 1
+
+ #include <stdio.h>
++
++#pragma GCC visibility push(hidden)
+
+ typedef struct gdIOCtx {
+ int (*getC)(struct gdIOCtx*);
+@@ -36,4 +38,6 @@
+ int gdSeek(gdIOCtx *ctx, const int);
+ long gdTell(gdIOCtx *ctx);
+
++#pragma GCC visibility pop
++
+ #endif
+diff -ru libwmf-0.2.8.4/src/extra/gd/gd_jpeg.c libwmf-0.2.8.4.symbols/src/extra/gd/gd_jpeg.c
+--- libwmf-0.2.8.4/src/extra/gd/gd_jpeg.c 2005-07-27 21:35:06.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_jpeg.c 2006-11-16 12:28:13.000000000 +0000
+@@ -99,7 +99,7 @@
+ return rv;
+ }
+
+-void jpeg_gdIOCtx_dest (j_compress_ptr cinfo, gdIOCtx * outfile);
++static void jpeg_gdIOCtx_dest (j_compress_ptr cinfo, gdIOCtx * outfile);
+
+ void
+ gdImageJpegCtx (gdImagePtr im, gdIOCtx * outfile, int quality)
+@@ -266,7 +266,7 @@
+ return im;
+ }
+
+-void
++static void
+ jpeg_gdIOCtx_src (j_decompress_ptr cinfo,
+ gdIOCtx * infile);
+
+@@ -511,7 +511,7 @@
+ * before any data is actually read.
+ */
+
+-void
++static void
+ init_source (j_decompress_ptr cinfo)
+ {
+ my_src_ptr src = (my_src_ptr) cinfo->src;
+@@ -559,7 +559,7 @@
+
+ #define END_JPEG_SEQUENCE "\r\n[*]--:END JPEG:--[*]\r\n"
+
+-safeboolean
++static safeboolean
+ fill_input_buffer (j_decompress_ptr cinfo)
+ {
+ my_src_ptr src = (my_src_ptr) cinfo->src;
+@@ -627,7 +627,7 @@
+ * buffer is the application writer's problem.
+ */
+
+-void
++static void
+ skip_input_data (j_decompress_ptr cinfo, long num_bytes)
+ {
+ my_src_ptr src = (my_src_ptr) cinfo->src;
+@@ -669,7 +669,7 @@
+ * for error exit.
+ */
+
+-void
++static void
+ term_source (j_decompress_ptr cinfo)
+ {
+
+@@ -742,7 +742,7 @@
+ * before any data is actually written.
+ */
+
+-void
++static void
+ init_destination (j_compress_ptr cinfo)
+ {
+ my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
+@@ -780,7 +780,7 @@
+ * write it out when emptying the buffer externally.
+ */
+
+-safeboolean
++static safeboolean
+ empty_output_buffer (j_compress_ptr cinfo)
+ {
+ my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
+@@ -805,7 +805,7 @@
+ * for error exit.
+ */
+
+-void
++static void
+ term_destination (j_compress_ptr cinfo)
+ {
+ my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
+diff -ru libwmf-0.2.8.4/src/extra/gd/gdkanji.c libwmf-0.2.8.4.symbols/src/extra/gd/gdkanji.c
+--- libwmf-0.2.8.4/src/extra/gd/gdkanji.c 2001-05-19 14:09:34.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gdkanji.c 2006-11-16 12:29:42.000000000 +0000
+@@ -555,6 +555,11 @@
+ return kanji;
+ }
+
++#pragma GCC visibility push(hidden)
++int
++any2eucjp (unsigned char *dest, unsigned char *src, unsigned int dest_max);
++#pragma GCC visibility pop
++
+ int
+ any2eucjp (unsigned char *dest, unsigned char *src, unsigned int dest_max)
+ {
+diff -ru libwmf-0.2.8.4/src/extra/gd/gd_topal.c libwmf-0.2.8.4.symbols/src/extra/gd/gd_topal.c
+--- libwmf-0.2.8.4/src/extra/gd/gd_topal.c 2005-07-27 21:35:06.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_topal.c 2006-11-16 12:25:45.000000000 +0000
+@@ -1129,7 +1129,7 @@
+ * Map some rows of pixels to the output colormapped representation.
+ */
+
+-void
++static void
+ pass2_no_dither (gdImagePtr im, my_cquantize_ptr cquantize)
+ /* This version performs no dithering */
+ {
+@@ -1217,7 +1217,7 @@
+ #endif
+
+
+-void
++static void
+ pass2_fs_dither (gdImagePtr im, my_cquantize_ptr cquantize)
+
+ /* This version performs Floyd-Steinberg dithering */
+diff -ru libwmf-0.2.8.4/src/extra/gd/gd_wbmp.c libwmf-0.2.8.4.symbols/src/extra/gd/gd_wbmp.c
+--- libwmf-0.2.8.4/src/extra/gd/gd_wbmp.c 2001-05-19 14:09:34.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_wbmp.c 2006-11-16 12:28:33.000000000 +0000
+@@ -67,7 +67,7 @@
+ ** Wrapper around gdPutC for use with writewbmp
+ **
+ */
+-void
++static void
+ gd_putout (int i, void *out)
+ {
+ gdPutC (i, (gdIOCtx *) out);
+@@ -79,7 +79,7 @@
+ ** Wrapper around gdGetC for use with readwbmp
+ **
+ */
+-int
++static int
+ gd_getin (void *in)
+ {
+ return (gdGetC ((gdIOCtx *) in));
+diff -ru libwmf-0.2.8.4/src/extra/gd/gdxpm.c libwmf-0.2.8.4.symbols/src/extra/gd/gdxpm.c
+--- libwmf-0.2.8.4/src/extra/gd/gdxpm.c 2001-05-19 14:09:34.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gdxpm.c 2006-11-16 12:18:29.000000000 +0000
+@@ -10,6 +10,7 @@
+ #include "gd.h"
+ #include "gdhelpers.h"
+
++#if 0
+ #ifndef HAVE_XPM
+ gdImagePtr
+ gdImageCreateFromXpm (char *filename)
+@@ -146,3 +147,4 @@
+ return (im);
+ }
+ #endif
++#endif
+diff -ru libwmf-0.2.8.4/src/extra/gd/jisx0208.h libwmf-0.2.8.4.symbols/src/extra/gd/jisx0208.h
+--- libwmf-0.2.8.4/src/extra/gd/jisx0208.h 2001-03-28 10:37:35.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/jisx0208.h 2006-11-16 12:13:19.000000000 +0000
+@@ -1,5 +1,8 @@
+ #ifndef JISX0208_H
+ #define JISX0208_H
++
++#pragma GCC visibility push(hidden)
++
+ /* This file was derived from "src/VF_Ftype.c" in VFlib2-2.24.2
+ by Dr. Kakugawa */
+
+@@ -1202,4 +1205,6 @@
+ 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177,
+ 0x2178, 0x2179, 0xFFE2, 0xFFE4, 0xFF07, 0xFF02}};
+
++#pragma GCC visibility pop
++
+ #endif /* JISX0208_H */
+diff -ru libwmf-0.2.8.4/src/extra/gd/wbmp.h libwmf-0.2.8.4.symbols/src/extra/gd/wbmp.h
+--- libwmf-0.2.8.4/src/extra/gd/wbmp.h 2001-03-28 10:37:37.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/wbmp.h 2006-11-16 12:14:19.000000000 +0000
+@@ -12,6 +12,8 @@
+ #ifndef __WBMP_H
+ #define __WBMP_H 1
+
++#pragma GCC visibility push(hidden)
++
+
+ /* WBMP struct
+ ** -----------
+@@ -44,4 +46,6 @@
+ void freewbmp( Wbmp *wbmp );
+ void printwbmp( Wbmp *wbmp );
+
++#pragma GCC visibility pop
++
+ #endif
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-useafterfree.patch b/patches/source/libwmf/libwmf-0.2.8.4-useafterfree.patch
new file mode 100644
index 000000000..328c5411f
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-useafterfree.patch
@@ -0,0 +1,10 @@
+--- libwmf-0.2.8.4/src/extra/gd/gd_clip.c.CVE-2009-1364-im-clip-list 2009-04-24 04:06:44.000000000 -0400
++++ libwmf-0.2.8.4/src/extra/gd/gd_clip.c 2009-04-24 04:08:30.000000000 -0400
+@@ -70,6 +70,7 @@ void gdClipSetAdd(gdImagePtr im,gdClipRe
+ { more = gdRealloc (im->clip->list,(im->clip->max + 8) * sizeof (gdClipRectangle));
+ if (more == 0) return;
+ im->clip->max += 8;
++ im->clip->list = more;
+ }
+ im->clip->list[im->clip->count] = (*rect);
+ im->clip->count++;
diff --git a/patches/source/libwmf/libwmf.SlackBuild b/patches/source/libwmf/libwmf.SlackBuild
new file mode 100755
index 000000000..3f12178f1
--- /dev/null
+++ b/patches/source/libwmf/libwmf.SlackBuild
@@ -0,0 +1,142 @@
+#!/bin/bash
+
+# Copyright 2008, 2009, 2010, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PKGNAM=libwmf
+VERSION=0.2.8.4
+BUILD=${BUILD:-6_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+TMP=${TMP:-/tmp}
+
+PKG=$TMP/package-libwmf
+
+rm -rf $PKG
+mkdir -p $PKG
+
+cd $TMP
+rm -rf libwmf-$VERSION
+tar xvf $CWD/libwmf-$VERSION.tar.?z* || exit 1
+cd libwmf-$VERSION || exit 1
+
+zcat $CWD/libwmf.png14.diff.gz | patch -p1 --verbose || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Miscellaneous patches from Fedora:
+zcat $CWD/libwmf-0.2.8.4-fallbackfont.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-pixbufloaderdir.patch.gz | patch -p1 --verbose || exit 1
+
+# Don't export the modified embedded GD library symbols, to avoid conflicts with
+# the system libgd:
+zcat $CWD/libwmf-0.2.8.4-reducesymbols.patch.gz | patch -p1 --verbose || exit 1
+
+# Patch security issues:
+zcat $CWD/libwmf-0.2.8.4-useafterfree.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2006-3376.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2004-0941.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2007-0455.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2007-2756.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2007-3472.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2007-3473.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2007-3477.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2009-3546.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2015-0848+CVE-2015-4588.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2015-4695.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2015-4696.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2016-10167.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2016-10168.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2016-9011.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2016-9317.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2017-6362.patch.gz | patch -p1 --verbose || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --enable-static=no \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/usr/doc
+mv $PKG/usr/share/doc/libwmf $PKG/usr/doc/libwmf-$VERSION
+rmdir $PKG/usr/share/doc
+cp -a \
+ AUTHORS BUILDING COPYING CREDITS NEWS README TODO \
+ $PKG/usr/doc/libwmf-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/libwmf-$VERSION-$ARCH-$BUILD.txz
diff --git a/patches/source/libwmf/libwmf.png14.diff b/patches/source/libwmf/libwmf.png14.diff
new file mode 100644
index 000000000..c55b143c8
--- /dev/null
+++ b/patches/source/libwmf/libwmf.png14.diff
@@ -0,0 +1,11 @@
+--- ./src/extra/gd/gd_png.c.orig 2005-07-27 15:35:06.000000000 -0500
++++ ./src/extra/gd/gd_png.c 2010-02-14 18:24:19.000000000 -0600
+@@ -136,7 +136,7 @@
+ /* first do a quick check that the file really is a PNG image; could
+ * have used slightly more general png_sig_cmp() function instead */
+ gdGetBuf (sig, 8, infile);
+- if (!png_check_sig (sig, 8))
++ if (!(png_sig_cmp(sig, 0, 8) == 0))
+ return NULL; /* bad signature */
+
+ #ifndef PNG_SETJMP_NOT_SUPPORTED
diff --git a/patches/source/libwmf/slack-desc b/patches/source/libwmf/slack-desc
new file mode 100644
index 000000000..19f99a7de
--- /dev/null
+++ b/patches/source/libwmf/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libwmf: libwmf (WMF graphics format library)
+libwmf:
+libwmf: libwmf is a library for interpreting metafile images and either
+libwmf: displaying them using X or converting them to standard formats such
+libwmf: as PNG, JPEG, PS, EPS and SVG.
+libwmf:
+libwmf:
+libwmf:
+libwmf:
+libwmf:
+libwmf:
diff --git a/patches/source/libxcb/arch.use.flags b/patches/source/libxcb/arch.use.flags
new file mode 100644
index 000000000..11087c884
--- /dev/null
+++ b/patches/source/libxcb/arch.use.flags
@@ -0,0 +1,9 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/libxcb/build/libxcb b/patches/source/libxcb/build/libxcb
new file mode 100644
index 000000000..8f2043645
--- /dev/null
+++ b/patches/source/libxcb/build/libxcb
@@ -0,0 +1 @@
+2_slack14.1
diff --git a/patches/source/libxcb/configure/libxcb b/patches/source/libxcb/configure/libxcb
new file mode 100644
index 000000000..0c8a4a8c8
--- /dev/null
+++ b/patches/source/libxcb/configure/libxcb
@@ -0,0 +1,14 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --disable-static \
+ --enable-xinput \
+ --enable-xkb \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/libxcb/libxcb.SlackBuild b/patches/source/libxcb/libxcb.SlackBuild
new file mode 100755
index 000000000..1c0b31650
--- /dev/null
+++ b/patches/source/libxcb/libxcb.SlackBuild
@@ -0,0 +1,2 @@
+UPGRADE_PACKAGES=no ./x11.SlackBuild xcb libxcb
+mv /tmp/x11-build/libxcb*txz /tmp
diff --git a/patches/source/libxcb/modularize b/patches/source/libxcb/modularize
new file mode 100644
index 000000000..8a28ed93e
--- /dev/null
+++ b/patches/source/libxcb/modularize
@@ -0,0 +1,279 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+dri3proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glamor-egl
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXpresent
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+libxshmfence
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+presentproto
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-errors
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-amdgpu
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/libxcb/noarch b/patches/source/libxcb/noarch
new file mode 100644
index 000000000..8785ee527
--- /dev/null
+++ b/patches/source/libxcb/noarch
@@ -0,0 +1,75 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/libxcb/package-blacklist b/patches/source/libxcb/package-blacklist
new file mode 100644
index 000000000..603b8c31f
--- /dev/null
+++ b/patches/source/libxcb/package-blacklist
@@ -0,0 +1,44 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+xf86-video-modesetting
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/libxcb/post-install/libxcb.post-install b/patches/source/libxcb/post-install/libxcb.post-install
new file mode 100644
index 000000000..481ca730e
--- /dev/null
+++ b/patches/source/libxcb/post-install/libxcb.post-install
@@ -0,0 +1,66 @@
+
+# Copyright 2009 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+# Add documentation:
+mkdir -p $PKG/usr/doc/libxcb-$MODULAR_PACKAGE_VERSION
+cp -a \
+ COPYING INSTALL NEWS README \
+ $PKG/usr/doc/libxcb-$MODULAR_PACKAGE_VERSION
+mv $PKG/usr/share/doc/libxcb/tutorial $PKG/usr/doc/libxcb-$MODULAR_PACKAGE_VERSION
+# The manual isn't building for now, so...
+rm -rf $PKG/usr/share/doc/libxcb
+rmdir $PKG/usr/share/doc
+rmdir $PKG/usr/share
+
+# Older versions of libxcb shipped a poorly libtooled .la file that caused
+# the now-gone libxcb-xlib.so module to be incorrectly linked with many
+# binaries and libraries, and cause the module to be listed (again,
+# incorrectly) in a lot of .la files. Rather than breaking a large amount
+# of existing X programs, we will use this simple trick to allow old binaries
+# to keep running, and new things to compile even if a bogus .la file
+# referencing libxcb-xlib is in the development environment.
+#
+# References to libxcb-xlib will go away as things are recompiled in the
+# future (we've eliminated any remaining references in Slackware itself).
+#
+# It's like letting a sliver work out instead of cutting off the finger.
+
+( cd $PKG/usr/lib
+ ln -sf libxcb.so.1 libxcb-xlib.so.0
+ ln -sf libxcb-xlib.so.0 libxcb-xlib.so
+ ln -sf libxcb.la libxcb-xlib.la
+)
+
+# Changes to the .soname versions have caused a few binaries to break when
+# libxcb was updated to facilitate security fixes. While the old library
+# versions could be included in the package to fix this, that might result
+# in a binary loading both library versions at the same time. Past
+# experience has shown that to cause segfaults or other issues. So, we'll
+# add a few compatibility symlinks so that old binaries will load. If
+# it turns out to be required, we'll recompile anything that happens to run
+# into an ABI issue due to this, but the testing seems to indicate that it
+# won't break anything. At least there will be less breakage with this
+# fix. If anyone notices any, please let us know.
+( cd $PKG/usr/lib
+ ln -sf libxcb-sync.so.1 libxcb-sync.so.0
+)
+
diff --git a/patches/source/libxcb/slack-desc/libxcb b/patches/source/libxcb/slack-desc/libxcb
new file mode 100644
index 000000000..35182210a
--- /dev/null
+++ b/patches/source/libxcb/slack-desc/libxcb
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libxcb: libxcb (X protocol C-language Binding)
+libxcb:
+libxcb: The XCB library provides an interface to the X Window System protocol
+libxcb: which is fully capable of replacing Xlib. In fact, libX11 makes use
+libxcb: of libxcb as much as possible. :-) Porting to XCB has several
+libxcb: advantages such as a smaller memory footprint, latency hiding, direct
+libxcb: protocol access, and improved thread support.
+libxcb:
+libxcb:
+libxcb:
+libxcb:
diff --git a/patches/source/libxcb/x11.SlackBuild b/patches/source/libxcb/x11.SlackBuild
new file mode 100755
index 000000000..c3887dff2
--- /dev/null
+++ b/patches/source/libxcb/x11.SlackBuild
@@ -0,0 +1,381 @@
+#!/bin/sh
+# Copyright 2007-2014 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ chown -R root:root .
+ find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.*
+ )
+ done
+ )
+ fi
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+
+ # If there's a ChangeLog, installing at least part of the recent history
+ # is useful, but don't let it get totally out of control:
+ if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # Strip binaries:
+ ( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/libxml2/libxml2.SlackBuild b/patches/source/libxml2/libxml2.SlackBuild
new file mode 100755
index 000000000..63eeacab3
--- /dev/null
+++ b/patches/source/libxml2/libxml2.SlackBuild
@@ -0,0 +1,112 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=libxml2
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-libxml2
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf libxml2-$VERSION
+tar xvf $CWD/libxml2-$VERSION.tar.?z* || exit 1
+cd libxml2-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+zcat $CWD/libxml2.do-not-check-crc.diff.gz | patch -p1 --verbose || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --disable-static \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+#echo
+#echo "Only the python bindings in /usr/lib/python__/site-packages/ should"
+#echo "be kept... toss the other stuff"
+#echo
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mv $PKG/usr/share/doc $PKG/usr
+mv $PKG/usr/doc/libxml2-python-$VERSION $PKG/usr/doc/libxml2-$VERSION
+cp -a \
+ AUTHORS COPYING* INSTALL NEWS README \
+ $PKG/usr/doc/libxml2-$VERSION
+find $PKG/usr/doc/libxml2-$VERSION -type f | xargs chmod 644
+
+gzip -9 $PKG/usr/man/man?/*.?
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+# Be sure to clobber any .pyc files that might have been generated so that
+# the new .py files will be used instead of the already compiled copies
+cat << EOF > $PKG/install/doinst.sh
+rm -f /usr/lib${LIBDIRSUFFIX}/python2.7/site-packages/libxml2.pyc
+rm -f /usr/lib${LIBDIRSUFFIX}/python2.7/site-packages/drv_libxml2.pyc
+EOF
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/libxml2-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/libxml2/libxml2.do-not-check-crc.diff b/patches/source/libxml2/libxml2.do-not-check-crc.diff
new file mode 100644
index 000000000..3e6507764
--- /dev/null
+++ b/patches/source/libxml2/libxml2.do-not-check-crc.diff
@@ -0,0 +1,35 @@
+diff -up libxml2-2.9.0/xzlib.c.do-not-check-crc libxml2-2.9.0/xzlib.c
+--- libxml2-2.9.0/xzlib.c.do-not-check-crc 2012-09-11 05:52:46.000000000 +0200
++++ libxml2-2.9.0/xzlib.c 2012-11-19 19:28:42.431700534 +0100
+@@ -552,17 +552,20 @@ xz_decomp(xz_statep state)
+ #ifdef HAVE_ZLIB_H
+ if (state->how == GZIP) {
+ if (gz_next4(state, &crc) == -1 || gz_next4(state, &len) == -1) {
+- xz_error(state, LZMA_DATA_ERROR, "unexpected end of file");
+- return -1;
+- }
+- if (crc != state->zstrm.adler) {
+- xz_error(state, LZMA_DATA_ERROR, "incorrect data check");
+- return -1;
+- }
+- if (len != (state->zstrm.total_out & 0xffffffffL)) {
+- xz_error(state, LZMA_DATA_ERROR, "incorrect length check");
+- return -1;
+- }
++ /*
++ xz_error(state, LZMA_DATA_ERROR, "unexpected end of file");
++ return -1;
++ */
++ } else {
++ if (crc != state->zstrm.adler) {
++ xz_error(state, LZMA_DATA_ERROR, "incorrect data check");
++ return -1;
++ }
++ if (len != (state->zstrm.total_out & 0xffffffffL)) {
++ xz_error(state, LZMA_DATA_ERROR, "incorrect length check");
++ return -1;
++ }
++ }
+ state->strm.avail_in = 0;
+ state->strm.next_in = NULL;
+ state->strm.avail_out = 0;
diff --git a/patches/source/libxml2/slack-desc b/patches/source/libxml2/slack-desc
new file mode 100644
index 000000000..dfbc38dc3
--- /dev/null
+++ b/patches/source/libxml2/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libxml2: libxml2 (XML parser library)
+libxml2:
+libxml2: Libxml2 is the XML C parser library and toolkit. XML itself is a
+libxml2: metalanguage to design markup languages -- i.e. a text language where
+libxml2: structures are added to the content using extra "markup" information
+libxml2: enclosed between angle brackets. HTML is the most well-known markup
+libxml2: language. Though the library is written in C, a variety of language
+libxml2: bindings make it available in other environments.
+libxml2:
+libxml2:
+libxml2:
diff --git a/patches/source/libxslt/libxslt.SlackBuild b/patches/source/libxslt/libxslt.SlackBuild
new file mode 100755
index 000000000..f8a7865fd
--- /dev/null
+++ b/patches/source/libxslt/libxslt.SlackBuild
@@ -0,0 +1,100 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2012, 2013, 2016 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=libxslt
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-libxslt
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf libxslt-$VERSION
+tar xvf $CWD/libxslt-$VERSION.tar.?z* || exit 1
+cd libxslt-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --disable-static \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+mv $PKG/usr/share/doc $PKG/usr
+mv $PKG/usr/doc/libxslt-python-$VERSION $PKG/usr/doc/libxslt-$VERSION
+cp -a \
+ AUTHORS COPYING* Copyright FEATURES INSTALL IPR NEWS README TODO libxslt.spec \
+ $PKG/usr/doc/libxslt-$VERSION
+find $PKG/usr/doc/libxslt-$VERSION -type f | xargs chmod 644
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+gzip -9 $PKG/usr/man/man?/*.?
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+#echo
+#echo "Only the python bindings in /usr/lib/python__/site-packages/ should"
+#echo "be kept... toss the other stuff"
+#echo
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/libxslt-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/libxslt/slack-desc b/patches/source/libxslt/slack-desc
new file mode 100644
index 000000000..d758d08d3
--- /dev/null
+++ b/patches/source/libxslt/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libxslt: libxslt (XML transformation library)
+libxslt:
+libxslt: XSLT support for libxml2. (XSLT is a language used for transforming
+libxslt: XML documents)
+libxslt:
+libxslt:
+libxslt:
+libxslt:
+libxslt:
+libxslt:
+libxslt:
diff --git a/patches/source/libyaml/libyaml.SlackBuild b/patches/source/libyaml/libyaml.SlackBuild
new file mode 100755
index 000000000..938c084e8
--- /dev/null
+++ b/patches/source/libyaml/libyaml.SlackBuild
@@ -0,0 +1,114 @@
+#!/bin/sh
+
+# Copyright 2011 Vincent Batts, Vienna, VA, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=libyaml
+SRCNAM=yaml
+VERSION=$(echo $SRCNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i486 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7lh ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.?z* || exit 1
+cd $SRCNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --disable-static \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ README LICENSE doc \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+#cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/libyaml/libyaml.url b/patches/source/libyaml/libyaml.url
new file mode 100644
index 000000000..0ee34d3f2
--- /dev/null
+++ b/patches/source/libyaml/libyaml.url
@@ -0,0 +1 @@
+http://pyyaml.org/wiki/LibYAML
diff --git a/patches/source/libyaml/slack-desc b/patches/source/libyaml/slack-desc
new file mode 100644
index 000000000..8965634dd
--- /dev/null
+++ b/patches/source/libyaml/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libyaml: libyaml (YAML parser, written in C)
+libyaml:
+libyaml: YAML Ain't Markup Language. It is a human friendly data serialization
+libyaml: standard for all programming languages.
+libyaml:
+libyaml: Homepage: http://pyyaml.org/wiki/LibYAML
+libyaml:
+libyaml:
+libyaml:
+libyaml:
+libyaml:
diff --git a/patches/source/llvm/llvm.SlackBuild b/patches/source/llvm/llvm.SlackBuild
new file mode 100755
index 000000000..0fa91cc8b
--- /dev/null
+++ b/patches/source/llvm/llvm.SlackBuild
@@ -0,0 +1,173 @@
+#!/bin/sh
+
+# Slackware build script for llvm
+
+# Copyright 2008-2013 Heinz Wiesinger, Amsterdam, The Netherlands
+# Copyright 2012, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=llvm
+VERSION=3.3
+BUILD=${BUILD:-3_slack14.1}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-${VERSION}.src
+tar xvf $CWD/$PKGNAM-$VERSION.src.tar.xz || exit 1
+
+cd $PKGNAM-${VERSION}.src/tools
+ tar xvf $CWD/cfe-$VERSION.src.tar.xz || exit 1
+ mv cfe-${VERSION}.src clang || exit 1
+cd ../
+
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+# Disable RPATH usage:
+zcat $CWD/llvm.rpath.fix.diff.gz | patch -p1 --verbose || exit 1
+
+# --mandir doesn't work currently
+# need to disable assertions to make llvm thread-safe
+# clang resource dir is a relative path based on the location of the clang binary
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib$LIBDIRSUFFIX \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --enable-optimized \
+ --disable-assertions \
+ --enable-pic \
+ --enable-experimental-targets=R600 \
+ --with-clang-resource-dir="../lib${LIBDIRSUFFIX}/clang/${VERSION}" \
+ --build=$ARCH-slackware-linux \
+ --host=$ARCH-slackware-linux || exit 1
+
+# Fix hardcoded libdir
+sed -i "s|\$(PROJ_prefix)/lib|\$(PROJ_prefix)/lib$LIBDIRSUFFIX|" \
+ Makefile.config
+sed -i "s|\$(PROJ_prefix)/lib|\$(PROJ_prefix)/lib$LIBDIRSUFFIX|" \
+ tools/clang/lib/Headers/Makefile
+sed -i "s|\"lib\"|\"lib${LIBDIRSUFFIX}\"|" \
+ tools/clang/lib/Frontend/CompilerInvocation.cpp
+sed -i "s|\"lib\"|\"lib${LIBDIRSUFFIX}\"|" \
+ tools/clang/lib/Driver/Tools.cpp
+sed -i "s|ActiveLibDir = ActivePrefix + \"/lib\"|ActiveLibDir = ActivePrefix + \"/lib${LIBDIRSUFFIX}\"|g" \
+ tools/llvm-config/llvm-config.cpp
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Add symlinks for $ARCH-slackware-linux-{clang,clang++}:
+( cd $PKG/usr/bin
+ ln -sf clang $ARCH-slackware-linux-clang
+ ln -sf clang++ $ARCH-slackware-linux-clang++
+)
+
+# install clang-static-analyzer
+mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer
+cp -pr tools/clang/tools/scan-{build,view} \
+ $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer/ || exit 1
+for i in scan-{build,view}; do
+ ln -s /usr/lib$LIBDIRSUFFIX/clang-analyzer/$i/$i \
+ $PKG/usr/bin/$i || exit 1
+done
+for i in ccc c++; do
+ ln -s /usr/lib$LIBDIRSUFFIX/clang-analyzer/scan-build/$i-analyzer \
+ $PKG/usr/bin/$i-analyzer || exit 1
+done
+
+# Fix paths in scan-build
+sed -i "s|\$RealBin/bin|/usr/bin|" \
+ $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer/scan-build/scan-build
+sed -i "s|\$RealBin/sorttable.js|/usr/lib${LIBDIRSUFFIX}/clang-analyzer/scan-build/sorttable.js|" \
+ $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer/scan-build/scan-build
+sed -i "s|\$RealBin/scanview.css|/usr/lib${LIBDIRSUFFIX}/clang-analyzer/scan-build/scanview.css|" \
+ $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer/scan-build/scan-build
+
+# Remove example libraries
+rm -f $PKG/usr/lib$LIBDIRSUFFIX/LLVMHello*
+
+# Move man page directory:
+mv $PKG/usr/share/man $PKG/usr/
+# Try to remove /usr/share, which should be empty now. If it's not, fine.
+rmdir $PKG/usr/share
+
+# Move scan-build man-page into place
+mv $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer/scan-build/scan-build.1 \
+ $PKG/usr/man/man1/
+
+# Strip binaries:
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Compress manual pages:
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do
+ ln -s $( readlink $i ).gz $i.gz
+ rm $i
+done
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION/clang
+cp -a CREDITS* LICENSE* README* $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a tools/clang/{INSTALL,LICENSE,NOTES,README}* \
+ $PKG/usr/doc/$PKGNAM-$VERSION/clang
+mv $PKG/usr/docs/llvm/* $PKG/usr/doc/$PKGNAM-$VERSION
+rm -rf $PKG/usr/docs
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/llvm/llvm.rpath.fix.diff b/patches/source/llvm/llvm.rpath.fix.diff
new file mode 100644
index 000000000..d2041ff5e
--- /dev/null
+++ b/patches/source/llvm/llvm.rpath.fix.diff
@@ -0,0 +1,14 @@
+--- ./Makefile.rules.orig 2013-05-03 16:53:50.000000000 -0500
++++ ./Makefile.rules 2013-12-11 15:35:52.461697869 -0600
+@@ -641,9 +641,9 @@
+ ifdef TOOLNAME
+ LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib'
+ ifdef EXAMPLE_TOOL
+- LD.Flags += $(RPATH) -Wl,$(ExmplDir) $(DynamicFlag)
++ LD.Flags += $(DynamicFlag)
+ else
+- LD.Flags += $(RPATH) -Wl,$(ToolDir) $(DynamicFlag)
++ LD.Flags += $(DynamicFlag)
+ endif
+ endif
+ else
diff --git a/patches/source/llvm/llvm.url b/patches/source/llvm/llvm.url
new file mode 100644
index 000000000..96e8fd581
--- /dev/null
+++ b/patches/source/llvm/llvm.url
@@ -0,0 +1,2 @@
+http://llvm.org/releases/3.3/llvm-3.3.tar.gz
+http://llvm.org/releases/3.3/cfe-3.3.tar.gz
diff --git a/patches/source/llvm/slack-desc b/patches/source/llvm/slack-desc
new file mode 100644
index 000000000..b466d361a
--- /dev/null
+++ b/patches/source/llvm/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+llvm: llvm (LLVM compiler toolkit)
+llvm:
+llvm: Low Level Virtual Machine is a toolkit for the construction of highly
+llvm: optimized compilers, optimizers, and runtime environments.
+llvm:
+llvm: This package also includes the clang frontend for the C family of
+llvm: languages: C, C++, Objective-C, and Objective-C++
+llvm:
+llvm:
+llvm: Homepage: http://llvm.org/
+llvm:
diff --git a/patches/source/loudmouth/loudmouth.SlackBuild b/patches/source/loudmouth/loudmouth.SlackBuild
new file mode 100755
index 000000000..f34b0a569
--- /dev/null
+++ b/patches/source/loudmouth/loudmouth.SlackBuild
@@ -0,0 +1,133 @@
+#!/bin/sh
+# Copyright 2009 Eric Hameleers, Eindhoven, NL
+# Copyright 2012, 2016 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# -----------------------------------------------------------------------------
+
+PKGNAM=loudmouth
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+NUMJOBS=${NUMJOBS:" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+cd $PKGNAM-$VERSION || exit 1
+
+# Make sure ownerships and permissions are sane:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Configure:
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+LDFLAGS="$SLKLDFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --with-ssl=gnutls \
+ --enable-debug=yes \
+ --enable-static=no \
+ --disable-gtk-doc \
+ --program-prefix= \
+ --program-suffix= \
+ --build=$ARCH-slackware-linux \
+ --host=$ARCH-slackware-linux || exit 1
+
+##
+## NOTE: For some reason --enable-debug=yes actually _disables_ verbose debug
+## messages to the console. Don't mess with it!
+##
+
+# Build and install:
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG
+
+# --enable-static is often ignored
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/lib*.a
+
+# Strip binaries:
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS CONTRIBUTORS COPYING* NEWS README* \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+# Add a package description:
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz
diff --git a/patches/source/loudmouth/slack-desc b/patches/source/loudmouth/slack-desc
new file mode 100644
index 000000000..ca3c4b702
--- /dev/null
+++ b/patches/source/loudmouth/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+loudmouth: loudmouth (XMPP C programming library)
+loudmouth:
+loudmouth: Loudmouth is a lightweight and easy-to-use C library for programming
+loudmouth: with the Jabber protocol. It is designed to be easy to get started
+loudmouth: with, and yet extensible enough to allow you to do anything that the
+loudmouth: Jabber protocol allows.
+loudmouth:
+loudmouth: loudmouth home: https://github.com/mcabber/loudmouth
+loudmouth:
+loudmouth:
+loudmouth:
diff --git a/patches/source/lynx/doinst.sh b/patches/source/lynx/doinst.sh
new file mode 100644
index 000000000..79c367133
--- /dev/null
+++ b/patches/source/lynx/doinst.sh
@@ -0,0 +1,13 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+config etc/lynx.cfg.new
diff --git a/patches/source/lynx/lynx.SlackBuild b/patches/source/lynx/lynx.SlackBuild
new file mode 100755
index 000000000..4b8c85347
--- /dev/null
+++ b/patches/source/lynx/lynx.SlackBuild
@@ -0,0 +1,155 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2012, 2016, 2017 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGVER=2.8.8rel.2
+DIRVER=2-8-8
+BUILD=${BUILD:-1_slack14.1}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-lynx
+
+rm -rf $PKG
+mkdir -p $TMP $PKG/usr/lib${LIBDIRSUFFIX}/lynx
+cd $TMP
+rm -rf lynx$DIRVER
+tar xvf $CWD/lynx${PKGVER}.tar.?z* || exit 1
+cd lynx$DIRVER || exit 1
+
+find . -name "*~" -exec rm -f {} \;
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Change default colors and STARTFILE setting since the old site is gone:
+zcat $CWD/lynx.cfg.diff.gz | patch -p1 --verbose --backup || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --libdir=/usr/lib${LIBDIRSUFFIX}/lynx \
+ --datadir=/usr/share/lynx \
+ --mandir=/usr/man \
+ --enable-default-colors \
+ --with-screen=ncursesw \
+ --enable-widec \
+ --enable-gzip-help \
+ --with-zlib \
+ --enable-read-eta \
+ --enable-scrollbar \
+ --with-ssl \
+ --enable-ipv6 \
+ --enable-color-style \
+ --enable-prettysrc \
+ --enable-source-cache \
+ --enable-nsl-fork \
+ --enable-nls \
+ --enable-persistent-cookies \
+ --enable-vertrace \
+ --disable-full-paths \
+ --enable-addrlist-page \
+ --enable-charset-choice \
+ --enable-cjk \
+ --enable-htmlized-cfg \
+ --enable-justify-elts \
+ --enable-locale-charset \
+ --enable-externs \
+ --enable-cgi-links \
+ --enable-change-exec \
+ --enable-exec-links \
+ --enable-exec-scripts \
+ --enable-internal-links \
+ --with-bzlib \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+make install-help DESTDIR=$PKG || exit 1
+make install-doc DESTDIR=$PKG || exit 1
+
+# Make lynx.cfg a preserved config file:
+mv $PKG/etc/lynx.cfg $PKG/etc/lynx.cfg.new
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Correct $DESTDIR brokenness:
+( cd $PKG/usr/share/lynx/lynx_help
+ rm -f COPYHEADER COPYING
+ ln -sf ../lynx_doc/COPYHEADER .
+ ln -sf ../lynx_doc/COPYING .
+)
+# Add documentation symlinks:
+( mkdir -p $PKG/usr/doc/lynx-$PKGVER
+ cd $PKG/usr/doc/lynx-$PKGVER
+ ln -sf /usr/share/lynx/lynx_doc .
+ ln -sf /usr/share/lynx/lynx_help .
+)
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r CHANGES ]; then
+ DOCSDIR=$(echo $PKG/usr/share/lynx/lynx_doc)
+ cat CHANGES | head -n 1000 > $DOCSDIR/CHANGES
+ touch -r CHANGES $DOCSDIR/CHANGES
+fi
+
+gzip -9 $PKG/usr/man/man?/*.?
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/lynx-$PKGVER-$ARCH-$BUILD.txz
+
diff --git a/patches/source/lynx/lynx.cfg.diff b/patches/source/lynx/lynx.cfg.diff
new file mode 100644
index 000000000..c2ecefd80
--- /dev/null
+++ b/patches/source/lynx/lynx.cfg.diff
@@ -0,0 +1,31 @@
+--- ./lynx.cfg.orig 2014-03-09 16:43:10.000000000 -0500
++++ ./lynx.cfg 2017-05-29 14:35:52.629203408 -0500
+@@ -90,7 +90,7 @@
+ #
+ # Normally we expect you will connect to a remote site, e.g., the Lynx starting
+ # site:
+-STARTFILE:http://lynx.isc.org/
++STARTFILE:http://lynx.invisible-island.net/
+ #
+ # As an alternative, you may want to use a local URL. A good choice for this is
+ # the user's home directory:
+@@ -2969,8 +2969,18 @@
+ #COLOR:4:magenta:white
+ #COLOR:5:blue:white
+ #COLOR:6:red:white
+-COLOR:6:brightred:black
++#COLOR:6:brightred:black
+ #COLOR:7:magenta:cyan
++COLOR:0:black:white
++COLOR:1:blue:white
++COLOR:2:yellow:blue
++COLOR:3:green:white
++COLOR:4:magenta:white
++COLOR:5:blue:white
++# This makes links a *lot* more visible. The default settings are like
++# "let's torture the color-blind" :^)
++COLOR:6:brightred:black
++COLOR:7:magenta:cyan
+
+ .h2 COLOR_STYLE
+ # Also known as "lss" (lynx style-sheet), the color-style file assigns color
diff --git a/patches/source/lynx/slack-desc b/patches/source/lynx/slack-desc
new file mode 100644
index 000000000..c9209d298
--- /dev/null
+++ b/patches/source/lynx/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+lynx: Lynx (text mode browser)
+lynx:
+lynx: Lynx is a distributed hypertext browser with full World Wide Web
+lynx: capabilities. Lynx can be used to access information on the World
+lynx: Wide Web, or to build information systems intended primarily for local
+lynx: access. For example, Lynx has been used to build several Campus Wide
+lynx: Information Systems (CWIS).
+lynx:
+lynx: Lynx's authors include Lou Montulli, Garrett Blythe, Craig Lavender,
+lynx: Michael Grobe, and Charles Rezac.
+lynx:
diff --git a/patches/source/mailx/doinst.sh b/patches/source/mailx/doinst.sh
new file mode 100644
index 000000000..62c288b48
--- /dev/null
+++ b/patches/source/mailx/doinst.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+config etc/nail.rc.new
+# Make symlinks:
diff --git a/patches/source/mailx/heirloom-mailx-12.5-fixes-1.patch b/patches/source/mailx/heirloom-mailx-12.5-fixes-1.patch
new file mode 100644
index 000000000..fa6d51197
--- /dev/null
+++ b/patches/source/mailx/heirloom-mailx-12.5-fixes-1.patch
@@ -0,0 +1,232 @@
+Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
+Date: 2014-12-27
+Initial Package Version: 12.5
+Upstream Status: Unknown
+Origin: Changes to remove SSL2 found at debian, remainder from redhat.
+Description: Removes support for SSL2 (openssl no longer supports it)
+and fixes CVE-2004-2771 [sic] and CVE-2014-7844.
+
+diff -Naur heirloom-mailx-12.5/extern.h heirloom-mailx-12.5-patched/extern.h
+--- heirloom-mailx-12.5/extern.h 2011-04-26 22:23:22.000000000 +0100
++++ heirloom-mailx-12.5-patched/extern.h 2014-12-27 01:26:59.654169487 +0000
+@@ -396,7 +396,7 @@
+ int is_fileaddr(char *name);
+ struct name *usermap(struct name *names);
+ struct name *cat(struct name *n1, struct name *n2);
+-char **unpack(struct name *np);
++char **unpack(struct name *smopts, struct name *np);
+ struct name *elide(struct name *names);
+ int count(struct name *np);
+ struct name *delete_alternates(struct name *np);
+diff -Naur heirloom-mailx-12.5/fio.c heirloom-mailx-12.5-patched/fio.c
+--- heirloom-mailx-12.5/fio.c 2011-04-26 22:23:22.000000000 +0100
++++ heirloom-mailx-12.5-patched/fio.c 2014-12-27 01:27:15.634561413 +0000
+@@ -43,12 +43,15 @@
+ #endif /* not lint */
+
+ #include "rcv.h"
++
++#ifndef HAVE_WORDEXP
++#error wordexp support is required
++#endif
++
+ #include <sys/stat.h>
+ #include <sys/file.h>
+ #include <sys/wait.h>
+-#ifdef HAVE_WORDEXP
+ #include <wordexp.h>
+-#endif /* HAVE_WORDEXP */
+ #include <unistd.h>
+
+ #if defined (USE_NSS)
+@@ -481,7 +484,6 @@
+ static char *
+ globname(char *name)
+ {
+-#ifdef HAVE_WORDEXP
+ wordexp_t we;
+ char *cp;
+ sigset_t nset;
+@@ -495,7 +497,7 @@
+ sigemptyset(&nset);
+ sigaddset(&nset, SIGCHLD);
+ sigprocmask(SIG_BLOCK, &nset, NULL);
+- i = wordexp(name, &we, 0);
++ i = wordexp(name, &we, WRDE_NOCMD);
+ sigprocmask(SIG_UNBLOCK, &nset, NULL);
+ switch (i) {
+ case 0:
+@@ -527,65 +529,6 @@
+ }
+ wordfree(&we);
+ return cp;
+-#else /* !HAVE_WORDEXP */
+- char xname[PATHSIZE];
+- char cmdbuf[PATHSIZE]; /* also used for file names */
+- int pid, l;
+- char *cp, *shell;
+- int pivec[2];
+- extern int wait_status;
+- struct stat sbuf;
+-
+- if (pipe(pivec) < 0) {
+- perror("pipe");
+- return name;
+- }
+- snprintf(cmdbuf, sizeof cmdbuf, "echo %s", name);
+- if ((shell = value("SHELL")) == NULL)
+- shell = SHELL;
+- pid = start_command(shell, 0, -1, pivec[1], "-c", cmdbuf, NULL);
+- if (pid < 0) {
+- close(pivec[0]);
+- close(pivec[1]);
+- return NULL;
+- }
+- close(pivec[1]);
+-again:
+- l = read(pivec[0], xname, sizeof xname);
+- if (l < 0) {
+- if (errno == EINTR)
+- goto again;
+- perror("read");
+- close(pivec[0]);
+- return NULL;
+- }
+- close(pivec[0]);
+- if (wait_child(pid) < 0 && WTERMSIG(wait_status) != SIGPIPE) {
+- fprintf(stderr, catgets(catd, CATSET, 81,
+- "\"%s\": Expansion failed.\n"), name);
+- return NULL;
+- }
+- if (l == 0) {
+- fprintf(stderr, catgets(catd, CATSET, 82,
+- "\"%s\": No match.\n"), name);
+- return NULL;
+- }
+- if (l == sizeof xname) {
+- fprintf(stderr, catgets(catd, CATSET, 83,
+- "\"%s\": Expansion buffer overflow.\n"), name);
+- return NULL;
+- }
+- xname[l] = 0;
+- for (cp = &xname[l-1]; *cp == '\n' && cp > xname; cp--)
+- ;
+- cp[1] = '\0';
+- if (strchr(xname, ' ') && stat(xname, &sbuf) < 0) {
+- fprintf(stderr, catgets(catd, CATSET, 84,
+- "\"%s\": Ambiguous.\n"), name);
+- return NULL;
+- }
+- return savestr(xname);
+-#endif /* !HAVE_WORDEXP */
+ }
+
+ /*
+diff -Naur heirloom-mailx-12.5/mailx.1 heirloom-mailx-12.5-patched/mailx.1
+--- heirloom-mailx-12.5/mailx.1 2011-04-26 22:23:22.000000000 +0100
++++ heirloom-mailx-12.5-patched/mailx.1 2014-12-27 01:26:53.838026857 +0000
+@@ -656,6 +656,14 @@
+ will have the system wide alias expanded
+ as all mail goes through sendmail.
+ .SS "Recipient address specifications"
++If the
++.I expandaddr
++option is not set (the default), recipient addresses must be names of
++local mailboxes or Internet mail addresses.
++.PP
++If the
++.I expandaddr
++option is set, the following rules apply:
+ When an address is used to name a recipient
+ (in any of To, Cc, or Bcc),
+ names of local mail folders
+@@ -2391,6 +2399,12 @@
+ If this option is set,
+ \fImailx\fR starts even with an empty mailbox.
+ .TP
++.B expandaddr
++Causes
++.I mailx
++to expand message recipient addresses, as explained in the section,
++Recipient address specifications.
++.TP
+ .B flipr
+ Exchanges the
+ .I Respond
+@@ -3575,7 +3589,7 @@
+ .TP
+ .B ssl-method
+ Selects a SSL/TLS protocol version;
+-valid values are `ssl2', `ssl3', and `tls1'.
++valid values are `ssl3', and `tls1'.
+ If unset, the method is selected automatically,
+ if possible.
+ .TP
+diff -Naur heirloom-mailx-12.5/names.c heirloom-mailx-12.5-patched/names.c
+--- heirloom-mailx-12.5/names.c 2011-04-26 22:23:22.000000000 +0100
++++ heirloom-mailx-12.5-patched/names.c 2014-12-27 01:26:59.654169487 +0000
+@@ -268,6 +268,9 @@
+ FILE *fout, *fin;
+ int ispipe;
+
++ if (value("expandaddr") == NULL)
++ return names;
++
+ top = names;
+ np = names;
+ time(&now);
+@@ -546,7 +549,7 @@
+ * Return an error if the name list won't fit.
+ */
+ char **
+-unpack(struct name *np)
++unpack(struct name *smopts, struct name *np)
+ {
+ char **ap, **top;
+ struct name *n;
+@@ -561,7 +564,7 @@
+ * the terminating 0 pointer. Additional spots may be needed
+ * to pass along -f to the host mailer.
+ */
+- extra = 2;
++ extra = 3 + count(smopts);
+ extra++;
+ metoo = value("metoo") != NULL;
+ if (metoo)
+@@ -578,6 +581,10 @@
+ *ap++ = "-m";
+ if (verbose)
+ *ap++ = "-v";
++ for (; smopts != NULL; smopts = smopts->n_flink)
++ if ((smopts->n_type & GDEL) == 0)
++ *ap++ = smopts->n_name;
++ *ap++ = "--";
+ for (; n != NULL; n = n->n_flink)
+ if ((n->n_type & GDEL) == 0)
+ *ap++ = n->n_name;
+diff -Naur heirloom-mailx-12.5/openssl.c heirloom-mailx-12.5-patched/openssl.c
+--- heirloom-mailx-12.5/openssl.c 2011-04-26 22:23:22.000000000 +0100
++++ heirloom-mailx-12.5-patched/openssl.c 2014-12-27 01:26:34.385549867 +0000
+@@ -216,9 +216,7 @@
+
+ cp = ssl_method_string(uhp);
+ if (cp != NULL) {
+- if (equal(cp, "ssl2"))
+- method = SSLv2_client_method();
+- else if (equal(cp, "ssl3"))
++ if (equal(cp, "ssl3"))
+ method = SSLv3_client_method();
+ else if (equal(cp, "tls1"))
+ method = TLSv1_client_method();
+diff -Naur heirloom-mailx-12.5/sendout.c heirloom-mailx-12.5-patched/sendout.c
+--- heirloom-mailx-12.5/sendout.c 2011-04-26 22:23:22.000000000 +0100
++++ heirloom-mailx-12.5-patched/sendout.c 2014-12-27 01:26:59.654169487 +0000
+@@ -835,7 +835,7 @@
+ #endif /* HAVE_SOCKETS */
+
+ if ((smtp = value("smtp")) == NULL) {
+- args = unpack(cat(mailargs, to));
++ args = unpack(mailargs, to);
+ if (debug || value("debug")) {
+ printf(catgets(catd, CATSET, 181,
+ "Sendmail arguments:"));
diff --git a/patches/source/mailx/mailx.SlackBuild b/patches/source/mailx/mailx.SlackBuild
new file mode 100755
index 000000000..b87fcab2f
--- /dev/null
+++ b/patches/source/mailx/mailx.SlackBuild
@@ -0,0 +1,142 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2016 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+VERSION=12.5
+BUILD=${BUILD:-2_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-mailx
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf mailx-$VERSION
+tar xvf $CWD/mailx-$VERSION.tar.?z* || exit 1
+cd mailx-$VERSION || exit 1
+
+zcat $CWD/heirloom-mailx-12.5-fixes-1.patch.gz | patch -p1 --verbose || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+make CFLAGS="$SLKCFLAGS" \
+ PREFIX=/usr \
+ MANDIR=/usr/man \
+ MAILSPOOL=/var/spool/mail \
+ UCBINSTALL=/usr/bin/install \
+ SENDMAIL=/usr/sbin/sendmail
+
+make install DESTDIR=$PKG \
+ CFLAGS="$SLKCFLAGS" \
+ PREFIX=/usr \
+ MANDIR=/usr/man \
+ MAILSPOOL=/var/spool/mail \
+ UCBINSTALL=/usr/bin/install \
+ SENDMAIL=/usr/sbin/sendmail
+
+# We put symlinks in /bin since some things still expect '/bin/mail' or '/bin/Mail':
+mkdir -p $PKG/bin
+( cd $PKG/bin
+ ln -sf /usr/bin/mailx Mail
+ ln -sf /usr/bin/mailx mail
+ ln -sf /usr/bin/mailx nail
+)
+# Likewise, we make some compat symlinks in /usr/bin:
+( cd $PKG/usr/bin
+ ln -sf mailx Mail
+ ln -sf mailx mail
+ ln -sf mailx nail
+)
+mv $PKG/etc/nail.rc $PKG/etc/nail.rc.new
+strip $PKG/usr/bin/mailx
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# Manpage links:
+( cd $PKG/usr/man/man1
+ ln -sf mailx.1.gz mail.1.gz
+ ln -sf mailx.1.gz nail.1.gz
+ ln -sf mailx.1.gz Mail.1.gz
+)
+
+mkdir -p $PKG/usr/doc/mailx-$VERSION
+cp -a \
+ AUTHORS COPYING* INSTALL README TODO \
+ $PKG/usr/doc/mailx-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/mailx-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/mailx/slack-desc b/patches/source/mailx/slack-desc
new file mode 100644
index 000000000..d02c6f03f
--- /dev/null
+++ b/patches/source/mailx/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+mailx: mailx (a simple mail client)
+mailx:
+mailx: Mailx is derived from Berkeley Mail and is intended provide the
+mailx: functionality of the POSIX mailx command with additional support
+mailx: for MIME, IMAP, POP3, SMTP, and S/MIME. It provides enhanced
+mailx: features for interactive use, such as caching and disconnected
+mailx: operation for IMAP, message threading, scoring, and filtering.
+mailx: It is also usable as a mail batch language, both for sending
+mailx: and receiving mail.
+mailx:
+mailx: The maintainer and primary developer of mailx is Gunnar Ritter.
diff --git a/patches/source/mariadb/doinst.sh b/patches/source/mariadb/doinst.sh
new file mode 100644
index 000000000..0defd2fe1
--- /dev/null
+++ b/patches/source/mariadb/doinst.sh
@@ -0,0 +1,28 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+# Keep same perms on rc.mysqld.new:
+if [ -e etc/rc.d/rc.mysqld ]; then
+ cp -a etc/rc.d/rc.mysqld etc/rc.d/rc.mysqld.new.incoming
+ cat etc/rc.d/rc.mysqld.new > etc/rc.d/rc.mysqld.new.incoming
+ mv etc/rc.d/rc.mysqld.new.incoming etc/rc.d/rc.mysqld.new
+fi
+
+config etc/rc.d/rc.mysqld.new
+config etc/mysqlaccess.conf.new
+config etc/my.cnf.new
+config etc/my.cnf.d/client.cnf.new
+config etc/my.cnf.d/mysql-clients.cnf.new
+config etc/my.cnf.d/server.cnf.new
+config etc/logrotate.d/mysql.new
+
diff --git a/patches/source/mariadb/mariadb.SlackBuild b/patches/source/mariadb/mariadb.SlackBuild
new file mode 100755
index 000000000..1978c406d
--- /dev/null
+++ b/patches/source/mariadb/mariadb.SlackBuild
@@ -0,0 +1,190 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2012, 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2011, 2012, 2013 Heinz Wiesinger, Amsterdam, The Netherlands
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Build and install MySQL on Slackware
+# by: David Cantrell <david@slackware.com>
+# MariaDB conversion by: Heinz Wiesinger <pprkut@liwjatan.at>
+# Also maintained by: Patrick Volkerding <volkerdi@slackware.com>
+
+PKGNAM=mariadb
+VERSION=${VERSION:-$(echo ${PKGNAM}-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# To reduce the package size, the embedded server my be omitted. Currently
+# only amarok uses this. To build without embedded support, set this to NO.
+EMBEDDED=${EMBEDDED:-YES}
+
+# Add a description tag to the $BUILD. This is used by
+# "build_embedded_package.sh" to mark packages containing the embedded server,
+# but can optionally be used with any kind of custom tag desired.
+TAG=${TAG:-}
+
+# Don't keep the large static libraries by default:
+KEEPSTATIC=${KEEPSTATIC:-NO}
+
+# Don't keep the test suite by default:
+KEEPTESTS=${KEEPTESTS:-NO}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-${PKGNAM}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf ${PKGNAM}-$VERSION
+tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1
+cd ${PKGNAM}-$VERSION
+
+if ls $CWD/*.diff.gz 1> /dev/null 2> /dev/null ; then
+ for patch in $CWD/*.diff.gz ; do
+ zcat $patch | patch -p1 --verbose || exit 1
+ done
+fi
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+mkdir build
+cd build
+cmake \
+ -DCMAKE_C_FLAGS="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS="$SLKCFLAGS -felide-constructors -fno-exceptions -fno-rtti" \
+ -DBUILD_CONFIG=mysql_release \
+ -DFEATURE_SET="community" \
+ -DINSTALL_LAYOUT="RPM" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DINSTALL_LIBDIR="lib${LIBDIRSUFFIX}" \
+ -DINSTALL_SBINDIR=libexec \
+ -DINSTALL_INCLUDEDIR=include/mysql \
+ -DINSTALL_MYSQLSHAREDIR=share/mysql \
+ -DINSTALL_SQLBENCHDIR= \
+ -DINSTALL_MYSQLTESTDIR=mysql-test \
+ -DINSTALL_MANDIR=man \
+ -DINSTALL_PLUGINDIR="lib${LIBDIRSUFFIX}/mysql/plugin" \
+ -DINSTALL_SCRIPTDIR=bin \
+ -DINSTALL_SUPPORTFILESDIR=share/mysql \
+ -DINSTALL_MYSQLDATADIR="/var/lib/mysql" \
+ -DINSTALL_DOCREADMEDIR="doc/${PKGNAM}-$VERSION" \
+ -DINSTALL_DOCDIR="doc/${PKGNAM}-$VERSION" \
+ -DMYSQL_DATADIR="/var/lib/mysql" \
+ -DMYSQL_UNIX_ADDR="/var/run/mysql/mysql.sock" \
+ -DWITH_EXTRA_CHARSETS=complex \
+ -DWITH_INNOBASE_STORAGE_ENGINE=1 \
+ -DENABLED_LOCAL_INFILE=ON \
+ -DWITH_EMBEDDED_SERVER=${EMBEDDED} \
+ -DWITH_JEMALLOC=no \
+ -DWITH_READLINE=ON \
+ -DWITH_SSL=system \
+ -DWITH_ZLIB=system \
+ -DUSE_ARIA_FOR_TMP_TABLES=ON \
+ -DMANUFACTURER="Slackware" \
+ ..
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG
+
+# Leave build directory:
+cd ..
+
+if [ "$KEEPSTATIC" = "NO" ]; then
+ # Remove large static libraries:
+ rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libmysqlclient.a
+ rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libmysqlclient_r.a
+ rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libmysqld.a
+fi
+
+if [ "$KEEPTESTS" = "NO" ]; then
+ # Do not include the test suite:
+ rm -rf $PKG/usr/mysql-test
+fi
+
+# The ./configure option to omit this has gone away, so we'll omit it
+# the old-fashioned way. It's all in the source tarball if you need it.
+rm -rf $PKG/usr/sql-bench
+
+# This is the directory where databases are stored
+mkdir -p $PKG/var/lib/mysql
+chown mysql.mysql $PKG/var/lib/mysql
+chmod 0750 $PKG/var/lib/mysql
+
+# This is where the socket is stored
+mkdir -p $PKG/var/run/mysql
+chown mysql.mysql $PKG/var/run/mysql
+chmod 0755 $PKG/var/run/mysql
+
+# Add init script:
+mkdir -p $PKG/etc/rc.d
+# This is installed chmod 644 so that the server does not run by default.
+zcat $CWD/rc.mysqld.gz > $PKG/etc/rc.d/rc.mysqld.new
+rm -rf $PKG/etc/init.d
+
+# Install mysqlaccess.conf
+install -m 644 scripts/mysqlaccess.conf $PKG/etc/mysqlaccess.conf.new
+
+# Mark config files under /etc as .new
+mv $PKG/etc/my.cnf $PKG/etc/my.cnf.new
+mv $PKG/etc/logrotate.d/mysql $PKG/etc/logrotate.d/mysql.new
+for i in client mysql-clients server; do
+ mv $PKG/etc/my.cnf.d/$i.cnf $PKG/etc/my.cnf.d/$i.cnf.new
+done
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-${BUILD}${TAG}.txz
+
diff --git a/patches/source/mariadb/mirror.url b/patches/source/mariadb/mirror.url
new file mode 100644
index 000000000..173543014
--- /dev/null
+++ b/patches/source/mariadb/mirror.url
@@ -0,0 +1 @@
+ftp://ftp.osuosl.org/pub/mariadb/
diff --git a/patches/source/mariadb/rc.mysqld b/patches/source/mariadb/rc.mysqld
new file mode 100644
index 000000000..7c42d03cc
--- /dev/null
+++ b/patches/source/mariadb/rc.mysqld
@@ -0,0 +1,89 @@
+#!/bin/sh
+# Start/stop/restart mysqld.
+#
+# Copyright 2003 Patrick J. Volkerding, Concord, CA
+# Copyright 2003 Slackware Linux, Inc., Concord, CA
+# Copyright 2008, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+#
+# This program comes with NO WARRANTY, to the extent permitted by law.
+# You may redistribute copies of this program under the terms of the
+# GNU General Public License.
+
+# To start MariaDB automatically at boot, be sure this script is executable:
+# chmod 755 /etc/rc.d/rc.mysqld
+
+# Before you can run MariaDB, you must have a database. To install an initial
+# database, do this as root:
+#
+# mysql_install_db --user=mysql
+#
+# Note that the mysql user must exist in /etc/passwd, and the created files
+# will be owned by this dedicated user. This is important, or else mysql
+# (which runs as user "mysql") will not be able to write to the database
+# later (this can be fixed with 'chown -R mysql.mysql /var/lib/mysql').
+#
+# To increase system security, consider using "mysql_secure_installation"
+# as well. For more information on this tool, please read:
+# man mysql_secure_installation
+
+# To allow outside connections to the database comment out the next line.
+# If you don't need incoming network connections, then leave the line
+# uncommented to improve system security.
+SKIP="--skip-networking"
+
+# Uncomment the next line to use Oracle's InnoDB plugin instead of the included XtraDB
+#INNODB="--ignore-builtin-innodb --plugin-load=innodb=ha_innodb.so"
+
+# Start mysqld:
+mysqld_start() {
+ if [ -x /usr/bin/mysqld_safe ]; then
+ # If there is an old PID file (no mysqld running), clean it up:
+ if [ -r /var/run/mysql/mysql.pid ]; then
+ if ! ps axc | grep mysqld 1> /dev/null 2> /dev/null ; then
+ echo "Cleaning up old /var/run/mysql/mysql.pid."
+ rm -f /var/run/mysql/mysql.pid
+ fi
+ fi
+ /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/run/mysql/mysql.pid $SKIP $INNODB &
+ fi
+}
+
+# Stop mysqld:
+mysqld_stop() {
+ # If there is no PID file, ignore this request...
+ if [ -r /var/run/mysql/mysql.pid ]; then
+ killall mysqld
+ # Wait at least one minute for it to exit, as we don't know how big the DB is...
+ for second in 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 \
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 60 ; do
+ if [ ! -r /var/run/mysql/mysql.pid ]; then
+ break;
+ fi
+ sleep 1
+ done
+ if [ "$second" = "60" ]; then
+ echo "WARNING: Gave up waiting for mysqld to exit!"
+ sleep 15
+ fi
+ fi
+}
+
+# Restart mysqld:
+mysqld_restart() {
+ mysqld_stop
+ mysqld_start
+}
+
+case "$1" in
+'start')
+ mysqld_start
+ ;;
+'stop')
+ mysqld_stop
+ ;;
+'restart')
+ mysqld_restart
+ ;;
+*)
+ echo "usage $0 start|stop|restart"
+esac
diff --git a/patches/source/mariadb/slack-desc b/patches/source/mariadb/slack-desc
new file mode 100644
index 000000000..867765fa4
--- /dev/null
+++ b/patches/source/mariadb/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+mariadb: mariadb (Drop-in replacement for the MySQL Database Server)
+mariadb:
+mariadb: MariaDB is a backward compatible, drop-in replacement branch of the
+mariadb: MySQL(R) Database Server. It includes all major open source storage
+mariadb: engines, including the Aria storage engine.
+mariadb:
+mariadb: Homepage: http://mariadb.org/
+mariadb:
+mariadb:
+mariadb:
+mariadb:
diff --git a/patches/source/mcabber/mcabber.SlackBuild b/patches/source/mcabber/mcabber.SlackBuild
new file mode 100755
index 000000000..271cdb376
--- /dev/null
+++ b/patches/source/mcabber/mcabber.SlackBuild
@@ -0,0 +1,128 @@
+#!/bin/sh
+
+# Copyright 2006, 2007, 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=mcabber
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-${PKGNAM}
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+cd $TMP
+rm -rf ${PKGNAM}-${VERSION}
+tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1
+cd ${PKGNAM}-$VERSION
+
+# Make sure ownerships and permissions are sane:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Configure:
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --build=$ARCH-slackware-linux
+
+# Build and install:
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Strip binaries:
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.*
+ )
+ done
+ )
+fi
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+cp -a \
+ AUTHORS COPYING* NEWS README* TODO mcabberrc.example \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+#zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/mcabber/slack-desc b/patches/source/mcabber/slack-desc
new file mode 100644
index 000000000..e8cfe6653
--- /dev/null
+++ b/patches/source/mcabber/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+mcabber: mcabber (Jabber console client)
+mcabber:
+mcabber: mcabber is a small Jabber console client for Linux, maintained by
+mcabber: Mikael Berthe. Mcabber includes features such as SSL support,
+mcabber: multi-user chat (MUC), history logging, commands completion, and
+mcabber: external actions triggers.
+mcabber:
+mcabber: mcabber project home is: http://www.lilotux.net/~mikael/mcabber/
+mcabber:
+mcabber:
+mcabber:
diff --git a/patches/source/mercurial/doinst.sh b/patches/source/mercurial/doinst.sh
new file mode 100644
index 000000000..4cefcc343
--- /dev/null
+++ b/patches/source/mercurial/doinst.sh
@@ -0,0 +1,13 @@
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+config etc/mercurial/hgrc.d/hgk.rc.new
+rm -f etc/mercurial/hgrc.d/hgk.rc.new
diff --git a/patches/source/mercurial/mercurial.SlackBuild b/patches/source/mercurial/mercurial.SlackBuild
new file mode 100755
index 000000000..2624b460b
--- /dev/null
+++ b/patches/source/mercurial/mercurial.SlackBuild
@@ -0,0 +1,109 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+VERSION=${VERSION:-$(echo mercurial-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-mercurial
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf mercurial-$VERSION
+tar xvf $CWD/mercurial-$VERSION.tar.?z* || exit 1
+cd mercurial-$VERSION
+chown -R root.root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+python setup.py build install --root=$PKG || exit 1
+
+# Ordinarily we will not add stuff that's not installed through the normal
+# default installation method, but we've had a lot of requests, and it appears
+# that installing at least the hgk extension is the ad-hoc standard.
+mkdir -p $PKG/usr/libexec/mercurial
+cp -a contrib/hgk $PKG/usr/libexec/mercurial
+chmod 0755 $PKG/usr/libexec/mercurial/hgk
+
+mkdir -p $PKG/etc/mercurial/hgrc.d
+cat << EOF > $PKG/etc/mercurial/hgrc.d/hgk.rc.new
+[extensions]
+# enable hgk extension ('hg help' shows 'view' as a command)
+hgk =
+[hgk]
+
+path=/usr/libexec/mercurial/hgk
+EOF
+
+# Bash and zsh completion:
+mkdir -p $PKG/usr/share/bash-completion/completions/
+cp -a contrib/bash_completion $PKG/usr/share/bash-completion/completions/hg
+chmod 644 $PKG/usr/share/bash-completion/completions/hg
+mkdir -p $PKG/usr/share/zsh/site-functions
+cp -a contrib/zsh_completion $PKG/usr/share/zsh/site-functions/_mercurial
+chmod 644 $PKG/usr/share/zsh/site-functions/_mercurial
+
+# Emacs Lisp extensions:
+mkdir -p $PKG/usr/share/emacs/site-lisp
+cp -a contrib/mercurial.el contrib/mq.el $PKG/usr/share/emacs/site-lisp
+chmod 644 $PKG/usr/share/emacs/site-lisp/*
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+( cd doc
+ for dir in 1 5 ; do
+ mkdir -p $PKG/usr/man/man${dir}
+ for file in *.${dir} ; do
+ cat $file | gzip -9c > $PKG/usr/man/man${dir}/${file}.gz
+ done
+ done
+)
+
+mkdir -p $PKG/usr/doc/mercurial-$VERSION
+cp -a \
+ CONTRIBUTORS COPYING* PKG-INFO README* \
+ $PKG/usr/doc/mercurial-$VERSION
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/mercurial-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/mercurial/slack-desc b/patches/source/mercurial/slack-desc
new file mode 100644
index 000000000..e770f6c31
--- /dev/null
+++ b/patches/source/mercurial/slack-desc
@@ -0,0 +1,22 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+# This article is licensed under the GNU Free Documentation License.
+# It uses material from the Wikipedia article "Mercurial".
+
+ |-----handy-ruler------------------------------------------------------|
+mercurial: mercurial (a distributed source management system)
+mercurial:
+mercurial: Mercurial is a cross-platform, distributed source management tool for
+mercurial: software developers. It is written in Python, with a binary diff
+mercurial: implementation written in C. Its major features include high-
+mercurial: performance; serverless, fully distributed collaborative development;
+mercurial: robust handling of both plain text and binary files; advanced
+mercurial: branching and merging capabilities; and full source code available
+mercurial: under the terms of the LGPL.
+mercurial:
+mercurial: Mercurial was written by Matt Mackall and other contributors.
diff --git a/patches/source/minicom/config.sub-x86_64.diff b/patches/source/minicom/config.sub-x86_64.diff
new file mode 100644
index 000000000..fa89bb3c1
--- /dev/null
+++ b/patches/source/minicom/config.sub-x86_64.diff
@@ -0,0 +1,20 @@
+--- ./config.sub.orig 1998-04-26 17:20:59.000000000 +0400
++++ ./config.sub 2007-08-30 09:48:46.000000000 +0400
+@@ -129,7 +129,7 @@
+ case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+- tahoe | i[345]86 | i860 | m68k | m68000 | m88k | ns32k | arm \
++ tahoe | i[345]86 | x86_64 | i860 | m68k | m68000 | m88k | ns32k | arm \
+ | arme[lb] | pyramid \
+ | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \
+ | alpha | we32k | ns16k | clipper | sparclite | i370 | sh \
+@@ -144,7 +144,7 @@
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+- vax-* | tahoe-* | i[345]86-* | i860-* | m68k-* | m68000-* | m88k-* \
++ vax-* | tahoe-* | i[345]86-* | x86_64-* | i860-* | m68k-* | m68000-* | m88k-* \
+ | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
+ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \
+ | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
diff --git a/patches/source/minicom/doinst.sh b/patches/source/minicom/doinst.sh
new file mode 100644
index 000000000..5961829bc
--- /dev/null
+++ b/patches/source/minicom/doinst.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+config etc/minicom.users.new
+config etc/minirc.dfl.new
+rm -f etc/minicom.users.new etc/minirc.dfl.new
diff --git a/patches/source/minicom/lrzsz_0.12.21-5.diff b/patches/source/minicom/lrzsz_0.12.21-5.diff
new file mode 100644
index 000000000..b2541a91b
--- /dev/null
+++ b/patches/source/minicom/lrzsz_0.12.21-5.diff
@@ -0,0 +1,4194 @@
+--- lrzsz-0.12.21.orig/po/de.po
++++ lrzsz-0.12.21/po/de.po
+@@ -28,21 +28,21 @@
+
+ #: src/lsz.c:422
+ msgid "packetlength"
+-msgstr "Paketlänge"
++msgstr "Paketl?nge"
+
+ #: src/lsz.c:427
+ #, c-format
+ msgid "packetlength out of range 24..%ld"
+-msgstr "Argument der Option L außerhalb des Bereichs 24..%ld"
++msgstr "Argument der Option L au?erhalb des Bereichs 24..%ld"
+
+ #: src/lsz.c:436
+ msgid "framelength"
+-msgstr "Framelänge"
++msgstr "Framel?nge"
+
+ #: src/lsz.c:441
+ #, c-format
+ msgid "framelength out of range 32..%ld"
+-msgstr "Argument der Option l außerhalb des Bereichs 32..%ld"
++msgstr "Argument der Option l au?erhalb des Bereichs 32..%ld"
+
+ #: src/lrz.c:318 src/lsz.c:450
+ msgid "min_bps"
+@@ -50,7 +50,7 @@
+
+ #: src/lsz.c:452
+ msgid "min_bps must be >= 0"
+-msgstr "minimale BPS-Rate muß >= 0 sein"
++msgstr "minimale BPS-Rate mu? >= 0 sein"
+
+ #: src/lrz.c:324 src/lsz.c:458
+ msgid "min_bps_time"
+@@ -58,7 +58,7 @@
+
+ #: src/lrz.c:326 src/lsz.c:460
+ msgid "min_bps_time must be > 1"
+-msgstr "Zeitfenster für minimale BPS-Rate muß > 1 Sekunde sein"
++msgstr "Zeitfenster f?r minimale BPS-Rate mu? > 1 Sekunde sein"
+
+ #: src/lrz.c:342 src/lsz.c:484
+ msgid "hour to large (0..23)"
+@@ -70,7 +70,7 @@
+
+ #: src/lrz.c:348 src/lsz.c:490
+ msgid "minute to large (0..59)"
+-msgstr "Minute zu groß (0..59)"
++msgstr "Minute zu gro? (0..59)"
+
+ #: src/lrz.c:358 src/lrz.c:365 src/lsz.c:500 src/lsz.c:507
+ msgid "stop time to small"
+@@ -86,15 +86,15 @@
+
+ #: src/lrz.c:396 src/lsz.c:518
+ msgid "timeout out of range 10..1000"
+-msgstr "Argument der Option t außerhalb des Bereichs 10..1000"
++msgstr "Argument der Option t au?erhalb des Bereichs 10..1000"
+
+ #: src/lrz.c:412 src/lsz.c:526
+ msgid "security violation: can't do that under restricted shell\n"
+-msgstr "Sicherheitsverstoß: Ausführung unter eingeschränkter Shell verboten\n"
++msgstr "Sicherheitsversto?: Ausf?hrung unter eingeschr?nkter Shell verboten\n"
+
+ #: src/lrz.c:402 src/lsz.c:533
+ msgid "window size"
+-msgstr "Fenstergröße"
++msgstr "Fenstergr??e"
+
+ #: src/lrz.c:427 src/lrz.c:434 src/lsz.c:556 src/lsz.c:563
+ msgid "cannot turnoff syslog"
+@@ -102,7 +102,7 @@
+
+ #: src/lrz.c:449 src/lsz.c:571
+ msgid "startup delay"
+-msgstr "Startverzögerung"
++msgstr "Startverz?gerung"
+
+ #: src/lrz.c:465 src/lrz.c:483 src/lrz.c:760 src/lrz.c:1122 src/lrz.c:1244
+ #: src/lrz.c:1292 src/lrz.c:1309 src/lrz.c:1324 src/lrz.c:1423 src/lsz.c:580
+@@ -117,11 +117,11 @@
+
+ #: src/lsz.c:612 src/lsz.c:627
+ msgid "need at least one file to send"
+-msgstr "es muß mindestens ein Name einer zu sendenden Datei angegeben werden"
++msgstr "es mu? mindestens ein Name einer zu sendenden Datei angegeben werden"
+
+ #: src/lsz.c:629
+ msgid "Can't send command in restricted mode\n"
+-msgstr "Im eingeschränkten Modus ist das Senden von Kommandos verboten\n"
++msgstr "Im eingeschr?nkten Modus ist das Senden von Kommandos verboten\n"
+
+ #: src/lrz.c:527 src/lsz.c:656
+ msgid "hostname too long\n"
+@@ -137,21 +137,21 @@
+
+ #: src/lrz.c:574 src/lsz.c:803
+ msgid "Transfer incomplete\n"
+-msgstr "Übertragung nicht abgeschlossen\n"
++msgstr "?bertragung nicht abgeschlossen\n"
+
+ #: src/lrz.c:576 src/lsz.c:805
+ msgid "Transfer complete\n"
+-msgstr "Übertragung abgeschlossen\n"
++msgstr "?bertragung abgeschlossen\n"
+
+ #: src/lsz.c:838
+ #, c-format
+ msgid "send_pseudo %s: cannot open tmpfile %s: %s"
+-msgstr "send_pseudo %s: kann temporäre Datei %s nicht öffnen: %s"
++msgstr "send_pseudo %s: kann tempor?re Datei %s nicht ?ffnen: %s"
+
+ #: src/lsz.c:851
+ #, c-format
+ msgid "send_pseudo %s: cannot lstat tmpfile %s: %s"
+-msgstr "send_pseudo %s: kann lstat nicht auf temporäre Datei %s anwenden: %s"
++msgstr "send_pseudo %s: kann lstat nicht auf tempor?re Datei %s anwenden: %s"
+
+ #: src/lsz.c:859
+ #, c-format
+@@ -161,7 +161,7 @@
+ #: src/lsz.c:870
+ #, c-format
+ msgid "send_pseudo %s: cannot write to tmpfile %s: %s"
+-msgstr "send_pseudo %s: kann nicht in temporäre Datei %s schreiben: %s"
++msgstr "send_pseudo %s: kann nicht in tempor?re Datei %s schreiben: %s"
+
+ #: src/lsz.c:879
+ #, c-format
+@@ -188,17 +188,17 @@
+
+ #: src/lsz.c:953
+ msgid "Can't open any requested files."
+-msgstr "Kann keine der angeforderten Dateien öffnen"
++msgstr "Kann keine der angeforderten Dateien ?ffnen"
+
+ #: src/lsz.c:1009
+ #, c-format
+ msgid "security violation: not allowed to upload from %s"
+-msgstr "Sicherheitsverstoß: Ausführung unter eingeschränkter Shell verboten"
++msgstr "Sicherheitsversto?: Ausf?hrung unter eingeschr?nkter Shell verboten"
+
+ #: src/lrz.c:1384 src/lsz.c:1027
+ #, c-format
+ msgid "cannot open %s"
+-msgstr "kann %s nicht öffnen"
++msgstr "kann %s nicht ?ffnen"
+
+ #: src/lsz.c:1082
+ #, c-format
+@@ -213,12 +213,12 @@
+ #: src/lsz.c:1119
+ #, c-format
+ msgid "skipped: %s"
+-msgstr "übersprungen: %s"
++msgstr "?bersprungen: %s"
+
+ #: src/lsz.c:1122
+ #, c-format
+ msgid "%s/%s: skipped"
+-msgstr "%s/%s: übersprungen"
++msgstr "%s/%s: ?bersprungen"
+
+ #: src/lsz.c:1149
+ #, c-format
+@@ -228,7 +228,7 @@
+ #: src/lsz.c:1178
+ #, c-format
+ msgid "Sending %s, %ld blocks: "
+-msgstr "Sende %s, %ld Blöcke:"
++msgstr "Sende %s, %ld Bl?cke:"
+
+ #: src/lsz.c:1181
+ msgid "Give your local XMODEM receive command now."
+@@ -245,11 +245,11 @@
+
+ #: src/lsz.c:1314
+ msgid "Receiver Cancelled"
+-msgstr "Empfänger brach ab"
++msgstr "Empf?nger brach ab"
+
+ #: src/lsz.c:1340
+ msgid "No ACK on EOT"
+-msgstr "Keine Bestätigung für Übertragungsende erhalten"
++msgstr "Keine Best?tigung f?r ?bertragungsende erhalten"
+
+ #: src/lsz.c:1361
+ #, c-format
+@@ -267,11 +267,11 @@
+
+ #: src/lsz.c:1399
+ msgid "Timeout on sector ACK"
+-msgstr "Timeout bei Sektorbestätigung"
++msgstr "Timeout bei Sektorbest?tigung"
+
+ #: src/lsz.c:1404
+ msgid "NAK on sector"
+-msgstr "Sektor nicht bestätigt"
++msgstr "Sektor nicht best?tigt"
+
+ #: src/lsz.c:1410
+ msgid "Got burst for sector ACK"
+@@ -280,11 +280,11 @@
+ #: src/lsz.c:1412
+ #, c-format
+ msgid "Got %02x for sector ACK"
+-msgstr "Erhielt %02x als Sektorbestätigung"
++msgstr "Erhielt %02x als Sektorbest?tigung"
+
+ #: src/lsz.c:1424
+ msgid "Retry Count Exceeded"
+-msgstr "Maximale Wiederholungsanzahl überschritten"
++msgstr "Maximale Wiederholungsanzahl ?berschritten"
+
+ #: src/lrz.c:596 src/lsz.c:1502
+ #, c-format
+@@ -308,7 +308,7 @@
+
+ #: src/lsz.c:1513
+ msgid "Send file(s) with ZMODEM/YMODEM/XMODEM protocol\n"
+-msgstr "Dateien mit ZMODEM/YMODEM/XMODEM übertragen\n"
++msgstr "Dateien mit ZMODEM/YMODEM/XMODEM ?bertragen\n"
+
+ # src/lrz.c:475 src/lsz.c:1330 xx
+ #: src/lrz.c:607 src/lsz.c:1515
+@@ -317,9 +317,9 @@
+ " (Y) = option applies to YMODEM only\n"
+ " (Z) = option applies to ZMODEM only\n"
+ msgstr ""
+-" (X) = Option gilt nur für XMODEM\n"
+-" (Y) = Option gilt nur für YMODEM\n"
+-" (Z) = Option gilt nur für ZMODEM\n"
++" (X) = Option gilt nur f?r XMODEM\n"
++" (Y) = Option gilt nur f?r YMODEM\n"
++" (Z) = Option gilt nur f?r ZMODEM\n"
+
+ #: src/lsz.c:1521
+ msgid ""
+@@ -347,32 +347,32 @@
+ " -m, --min-bps N stop transmission if BPS below N\n"
+ " -M, --min-bps-time N for at least N seconds (default: 120)\n"
+ msgstr ""
+-" -+, --append an existierende Dateien anhängen (Z)\n"
++" -+, --append an existierende Dateien anh?ngen (Z)\n"
+ " -2, --twostop zwei Stopbits verwenden\n"
+-" -4, --try-4k bis zu 4K Blockgröße verwenden\n"
+-" --start-4k mit 4K Blockgröße starten (versucht nicht 8)\n"
+-" -8, --try-8k bis zu 8K Blockgröße verwenden\n"
+-" --start-8k mit 8K Blockgröße starten\n"
++" -4, --try-4k bis zu 4K Blockgr??e verwenden\n"
++" --start-4k mit 4K Blockgr??e starten (versucht nicht 8)\n"
++" -8, --try-8k bis zu 8K Blockgr??e verwenden\n"
++" --start-8k mit 8K Blockgr??e starten\n"
+ " -a, --ascii ASCII: NL nach CR/LF wandeln\n"
+-" -b, --binary Binärübertragung erzwingen\n"
++" -b, --binary Bin?r?bertragung erzwingen\n"
+ " -B, --bufsize N N Bytes puffern (auto: ganze Datei puffern)\n"
+-" -c, --command COMMAND Kommando KOMMANDO auf Gegenseite ausführen "
++" -c, --command COMMAND Kommando KOMMANDO auf Gegenseite ausf?hren "
+ "(Z)\n"
+-" -C, --command-tries N N mal Kommandoausführung versuchen (Z)\n"
++" -C, --command-tries N N mal Kommandoausf?hrung versuchen (Z)\n"
+ " -d, --dot-to-slash C '.' in Dateinamen nach '/' wandeln (Y/Z)\n"
+ " --delay-startup N Bei Programmstart N Sek. schlafen (Debugging)\n"
+ " -e, --escape alle Steuerzeichen escapen (Z)\n"
+-" -E, --rename Empfänger soll Datei umbenennen falls\n"
++" -E, --rename Empf?nger soll Datei umbenennen falls\n"
+ " Zieldatei schon existiert\n"
+ " -f, --full-path Dateien mit vollen Pfaden senden (Y/Z)\n"
+-" -i, --immediate-command CMD wie `c', aber sofort zurückkehren (Z)\n"
++" -i, --immediate-command CMD wie `c', aber sofort zur?ckkehren (Z)\n"
+ " -h, --help diesen Hilfetext ausgeben\n"
+ " -k, --1k 1024 Bytes Pakete senden (Y)\n"
+-" -L, --packetlen N Unterpaketlänge auf N Bytes beschränken (Z)\n"
+-" -l, --framelen N Rahmenlänge auf N Bytes beschränken (l>=L) "
++" -L, --packetlen N Unterpaketl?nge auf N Bytes beschr?nken (Z)\n"
++" -l, --framelen N Rahmenl?nge auf N Bytes beschr?nken (l>=L) "
+ "(Z)\n"
+-" -m, --min-bps N Übertragung abbrechen bei weniger als N BPS\n"
+-" -M, --min-bps-time N für mindestens N Sekunden (Default: 120)\n"
++" -m, --min-bps N ?bertragung abbrechen bei weniger als N BPS\n"
++" -M, --min-bps-time N f?r mindestens N Sekunden (Default: 120)\n"
+
+ #: src/lsz.c:1546
+ msgid ""
+@@ -400,28 +400,28 @@
+ "short options use the same arguments as the long ones\n"
+ msgstr ""
+ " -n, --newer Datei senden wenn sie neuer ist (Z)\n"
+-" -N, --newer-or-longer Datei senden wenn neuer oder länger (Z)\n"
++" -N, --newer-or-longer Datei senden wenn neuer oder l?nger (Z)\n"
+ " -o, --16-bit-crc 16Bit CRC statt 32Bit CRC verwenden (Z)\n"
+ " -O, --disable-timeouts Timeoutbehandlung abschalten\n"
+-" -p, --protect existierende Dateien nicht verändern\n"
+-" -r, --resume unterbrochene Übertragungen fortsetzen (Z)\n"
+-" -R, --restricted eingeschränkter, sichererer Modus\n"
++" -p, --protect existierende Dateien nicht ver?ndern\n"
++" -r, --resume unterbrochene ?bertragungen fortsetzen (Z)\n"
++" -R, --restricted eingeschr?nkter, sichererer Modus\n"
+ " -q, --quiet leise, keine Ausgaben machen\n"
+-" -s, --stop-at {HH:MM|+N} Übertragung um HH:MM oder in N Sek. abbrechen\n"
+-" --tcp-server Socket öffnen und auf Verbindung warten\n"
+-" --tcp-client ADDR:PORT Socket öffnen und verbindung mit ...\n"
+-" -u, --unlink Datei nach Übertragung löschen\n"
+-" -U, --unrestrict eingeschränkten Modus aufheben (falls "
++" -s, --stop-at {HH:MM|+N} ?bertragung um HH:MM oder in N Sek. abbrechen\n"
++" --tcp-server Socket ?ffnen und auf Verbindung warten\n"
++" --tcp-client ADDR:PORT Socket ?ffnen und verbindung mit ...\n"
++" -u, --unlink Datei nach ?bertragung l?schen\n"
++" -U, --unrestrict eingeschr?nkten Modus aufheben (falls "
+ "erlaubt)\n"
+ " -v, --verbose mehr ausgeben\n"
+-" -w, --windowsize N Fenstergröße auf N Bytes setzen (Z)\n"
++" -w, --windowsize N Fenstergr??e auf N Bytes setzen (Z)\n"
+ " -X --xmodem XMODEM-Protokoll benutzen\n"
+-" -y, --overwrite existierende Dateien überschreiben\n"
+-" -Y, --overwrite-or-skip wie `y', aber nicht existierende überspringen\n"
++" -y, --overwrite existierende Dateien ?berschreiben\n"
++" -Y, --overwrite-or-skip wie `y', aber nicht existierende ?berspringen\n"
+ " --ymodem YMODEM-Protokoll benutzen\n"
+ " -Z, --zmodem ZMODEM-Protokoll benutzen\n"
+ "\n"
+-"Kurze Optionen benötigen dieselben Argumente wie Lange.\n"
++"Kurze Optionen ben?tigen dieselben Argumente wie Lange.\n"
+
+ #: src/lsz.c:1768
+ msgid "got ZRQINIT"
+@@ -434,7 +434,7 @@
+ #: src/lsz.c:1991
+ #, c-format
+ msgid "blklen now %d\n"
+-msgstr "Blockgröße nun %d\n"
++msgstr "Blockgr??e nun %d\n"
+
+ #: src/lsz.c:2053
+ #, c-format
+@@ -453,7 +453,7 @@
+ #: src/lsz.c:2223
+ #, c-format
+ msgid "calc_blklen: reduced to %d due to error\n"
+-msgstr "calc_blklen: Blockgrösse auf %d reduziert wegen Fehler\n"
++msgstr "calc_blklen: Blockgr?sse auf %d reduziert wegen Fehler\n"
+
+ #: src/lsz.c:2256
+ #, c-format
+@@ -473,7 +473,7 @@
+ #: src/lsz.c:2278
+ #, c-format
+ msgid "calc_blklen: blklen %d, ok %ld, failed %ld -> %lu\n"
+-msgstr "calc_blklen: Blocklänge %d, ok %ld, fehlgeschlagen %ld -> %lu\n"
++msgstr "calc_blklen: Blockl?nge %d, ok %ld, fehlgeschlagen %ld -> %lu\n"
+
+ #: src/lsz.c:2290
+ #, c-format
+@@ -512,7 +512,7 @@
+
+ #: src/zm.c:712
+ msgid "Garbage count exceeded"
+-msgstr "Maximale Wiederholungsanzahl überschritten"
++msgstr "Maximale Wiederholungsanzahl ?berschritten"
+
+ #: src/zm.c:773
+ #, c-format
+@@ -526,11 +526,11 @@
+
+ #: src/lrz.c:382
+ msgid "don't have settimeofday, will not set time\n"
+-msgstr "Zeitsynchronisation nicht ausführbar, settimeofday() fehlt\n"
++msgstr "Zeitsynchronisation nicht ausf?hrbar, settimeofday() fehlt\n"
+
+ #: src/lrz.c:386
+ msgid "not running as root (this is good!), can not set time\n"
+-msgstr "Zeitsynchronisation mangels Superuserrechten nicht ausführbar\n"
++msgstr "Zeitsynchronisation mangels Superuserrechten nicht ausf?hrbar\n"
+
+ #: src/lrz.c:441
+ msgid "bytes_per_error"
+@@ -542,16 +542,16 @@
+
+ #: src/lrz.c:455
+ msgid "O_SYNC not supported by the kernel"
+-msgstr "O_SYNC vom Kernel nicht unterstützt"
++msgstr "O_SYNC vom Kernel nicht unterst?tzt"
+
+ #: src/lrz.c:497 src/lrz.c:499
+ msgid "garbage on commandline"
+-msgstr "Müll auf der Kommandozeile"
++msgstr "M?ll auf der Kommandozeile"
+
+ #: src/lrz.c:604
+ #, c-format
+ msgid "Usage: %s [options] [filename.if.xmodem]\n"
+-msgstr "Benutzung: %s [Optionen] [Dateiname.für.xmodem]\n"
++msgstr "Benutzung: %s [Optionen] [Dateiname.f?r.xmodem]\n"
+
+ #: src/lrz.c:605
+ msgid "Receive files with ZMODEM/YMODEM/XMODEM protocol\n"
+@@ -596,44 +596,44 @@
+ "\n"
+ "short options use the same arguments as the long ones\n"
+ msgstr ""
+-" -+, --append an existierende Dateien anhängen\n"
+-" -a, --ascii ASCII-Übertragung (CR/LF nach LF wandeln)\n"
+-" -b, --binary Binärübertragung (keine Umwandlungen)\n"
++" -+, --append an existierende Dateien anh?ngen\n"
++" -a, --ascii ASCII-?bertragung (CR/LF nach LF wandeln)\n"
++" -b, --binary Bin?r?bertragung (keine Umwandlungen)\n"
+ " -B, --bufsize N N Bytes puffern (auto: ganze Datei puffern)\n"
+-" -c, --with-crc 16bit CRC statt Prüfsumme verwenden (X)\n"
+-" -C, --allow-remote-commands Ausführung von Kommandos erlauben (Z)\n"
++" -c, --with-crc 16bit CRC statt Pr?fsumme verwenden (X)\n"
++" -C, --allow-remote-commands Ausf?hrung von Kommandos erlauben (Z)\n"
+ " -D, --null empfangene Daten nach /dev/null schreiben\n"
+ " --delay-startup N Bei Programmstart N Sek. schlafen (Debugging)\n"
+ " -e, --escape Alle Steuerzeichen escapen (Z)\n"
+-" -E, --rename Empfänger soll Datei umbenennen falls\n"
++" -E, --rename Empf?nger soll Datei umbenennen falls\n"
+ " Zieldatei schon existiert\n"
+ " --errors N Einen CRC-Fehler alle N Bytes erzeugen\n"
+ " -h, --help Diesen Hilfstext ausgeben\n"
+-" -m, --min-bps N Übertragung abbrechen bei weniger als N BPS\n"
+-" -M, --min-bps-time N für mindestens N Sekunden (Default: 120)\n"
++" -m, --min-bps N ?bertragung abbrechen bei weniger als N BPS\n"
++" -M, --min-bps-time N f?r mindestens N Sekunden (Default: 120)\n"
+ " -O, --disable-timeouts Timeoutbehandlung abschalten\n"
+ " --o-sync Ausgabedatei(en) im synchron schreiben\n"
+-" -p, --protect existierende Dateien nicht verändern\n"
++" -p, --protect existierende Dateien nicht ver?ndern\n"
+ " -q, --quiet leise, keine Ausgaben machen\n"
+-" -r, --resume unterbrochene Übertragungen fortsetzen (Z)\n"
+-" -R, --restricted eingeschränkter, sichererer Modus\n"
+-" -s, --stop-at {HH:MM|+N} Übertragung um HH:MM oder in N Sek. abbrechen\n"
++" -r, --resume unterbrochene ?bertragungen fortsetzen (Z)\n"
++" -R, --restricted eingeschr?nkter, sichererer Modus\n"
++" -s, --stop-at {HH:MM|+N} ?bertragung um HH:MM oder in N Sek. abbrechen\n"
+ " -S, --timesync Zeit anfordern (doppelt: lokale Zeit setzen)\n"
+-" --syslog[=off] syslog an- oder ausschalten, wenn möglich\n"
++" --syslog[=off] syslog an- oder ausschalten, wenn m?glich\n"
+ " -t, --timeout N Timeout auf N Zehntelsekungen setzen\n"
+-" --tcp-server Socket öffnen und auf Verbindung warten\n"
+-" --tcp-client ADDR:PORT Socket öffnen und verbindung mit ...\n"
++" --tcp-server Socket ?ffnen und auf Verbindung warten\n"
++" --tcp-client ADDR:PORT Socket ?ffnen und verbindung mit ...\n"
+ " -u, --keep-uppercase GROSS geschrieben Dateinamen beibehalten\n"
+-" -U, --unrestrict eingeschränkten Modus aufheben (falls "
++" -U, --unrestrict eingeschr?nkten Modus aufheben (falls "
+ "erlaubt)\n"
+ " -v, --verbose mehr ausgeben\n"
+-" -w, --windowsize N Fenstergröße auf N Bytes setzen (Z)\n"
++" -w, --windowsize N Fenstergr??e auf N Bytes setzen (Z)\n"
+ " -X --xmodem XMODEM-Protokoll benutzen\n"
+-" -y, --overwrite existierende Dateien überschreiben\n"
++" -y, --overwrite existierende Dateien ?berschreiben\n"
+ " --ymodem YMODEM-Protokoll benutzen\n"
+ " -Z, --zmodem ZMODEM-Protokoll benutzen\n"
+ "\n"
+-"Kurze Optionen benötigen dieselben Argumente wie Lange.\n"
++"Kurze Optionen ben?tigen dieselben Argumente wie Lange.\n"
+
+ #: src/lrz.c:676
+ #, c-format
+@@ -662,11 +662,11 @@
+ "%s: %s removed.\r\n"
+ msgstr ""
+ "\r\n"
+-"%s: %s gelöscht\r\n"
++"%s: %s gel?scht\r\n"
+
+ #: src/lrz.c:856
+ msgid "Pathname fetch returned EOT"
+-msgstr "Ende der Übertragung beim Warten auf Dateinamen"
++msgstr "Ende der ?bertragung beim Warten auf Dateinamen"
+
+ #: src/lrz.c:903
+ msgid "Received dup Sector"
+@@ -682,7 +682,7 @@
+
+ #: src/lrz.c:976
+ msgid "Checksum"
+-msgstr "Prüfsummenfehler"
++msgstr "Pr?fsummenfehler"
+
+ #: src/lrz.c:979
+ msgid "Sector number garbled"
+@@ -695,12 +695,12 @@
+ #: src/lrz.c:1005
+ #, c-format
+ msgid "Got 0%o sector header"
+-msgstr "Erhielt %02x als Sektorbestätigung"
++msgstr "Erhielt %02x als Sektorbest?tigung"
+
+ #: src/lrz.c:1113
+ #, c-format
+ msgid "file name ends with a /, skipped: %s\n"
+-msgstr "Dateiname endet mit /, übersprungen: %s\n"
++msgstr "Dateiname endet mit /, ?bersprungen: %s\n"
+
+ #: src/lrz.c:1127
+ #, c-format
+@@ -715,7 +715,7 @@
+ #: src/lrz.c:1192 src/lrz.c:1226
+ #, c-format
+ msgid "file exists, skipped: %s\n"
+-msgstr "Datei existiert, übersprungen: %s\n"
++msgstr "Datei existiert, ?bersprungen: %s\n"
+
+ #: src/lrz.c:1267
+ #, c-format
+@@ -739,7 +739,7 @@
+ #: src/lrz.c:1545
+ #, c-format
+ msgid "Blocks received: %d"
+-msgstr "Blöcke empfangen: %d"
++msgstr "Bl?cke empfangen: %d"
+
+ #: src/lrz.c:1599
+ #, c-format
+@@ -749,15 +749,15 @@
+ #: src/lrz.c:1612 src/lrz.c:1620
+ #, c-format
+ msgid "%s:\tSecurity Violation"
+-msgstr "%s:\tSicherheitsverstoß"
++msgstr "%s:\tSicherheitsversto?"
+
+ #: src/lrz.c:1730
+ msgid "remote command execution requested"
+-msgstr "Gegenseite versucht Kommandoausführung"
++msgstr "Gegenseite versucht Kommandoausf?hrung"
+
+ #: src/lrz.c:1737
+ msgid "not executed"
+-msgstr "nicht ausgeführt"
++msgstr "nicht ausgef?hrt"
+
+ #: src/lrz.c:1768
+ msgid "got ZRINIT"
+@@ -765,7 +765,7 @@
+
+ #: src/lrz.c:1817
+ msgid "Skipped"
+-msgstr "Übersprungen"
++msgstr "?bersprungen"
+
+ #. too bad
+ #: src/lrz.c:2049
+@@ -785,7 +785,7 @@
+
+ #: src/lrz.c:2215
+ msgid "file close error"
+-msgstr "Fehler beim Schließen der Datei"
++msgstr "Fehler beim Schlie?en der Datei"
+
+ #~ msgid "tcp protocol init failed\n"
+ #~ msgstr "TCP Protokoll Initialisierung fehlgeschlagen\n"
+@@ -797,7 +797,7 @@
+ #~ msgstr "fgets() bei tcp Protokoll Synchronisation fehlgeschlagen: "
+
+ #~ msgid "Transfer complete."
+-#~ msgstr "Übertragung abgeschlossen"
++#~ msgstr "?bertragung abgeschlossen"
+
+ #~ msgid "at"
+ #~ msgstr "um"
+@@ -809,4 +809,4 @@
+ #~ msgstr "Zeitsynchronisation: ok\n"
+
+ #~ msgid "Falldown to %ld blklen"
+-#~ msgstr "Blockgröße auf %ld gesenkt"
++#~ msgstr "Blockgr??e auf %ld gesenkt"
+--- lrzsz-0.12.21.orig/debian/copyright
++++ lrzsz-0.12.21/debian/copyright
+@@ -0,0 +1,31 @@
++This is the lrzsz Debian GNU/Linux package. It was first maintained by
++Michael Alan Dorman <mdorman@debian.org>, with help of Martin Mitchell
++and current upstream maintainer, Uwe Ohse <uwe@ohse.de>.
++
++Current maintainer is Josip Rodin <jrodin@jagor.srce.hr>
++
++Original source was downloaded from: ftp://tirka.ohse.de/uwe/
++
++Copyright (C) until 1988 Chuck Forsberg (Omen Technology INC)
++Copyright (C) 1994 Matt Porter, Michael D. Black
++Copyright (C) 1996, 1997 Uwe Ohse
++
++Please note that credit should be given to Chuck Forsberg (rzsz) and
++Stephen Satchell/Satchell Evaluations (crc routines) for this package.
++
++ 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; version 2 dated June, 1991.
++
++ 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, write to the Free Software
++ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
++ MA 02110-1301, USA.
++
++On Debian systems, the complete text of the GNU General Public License
++can be found in /usr/share/common-licenses/GPL file.
+--- lrzsz-0.12.21.orig/debian/control
++++ lrzsz-0.12.21/debian/control
+@@ -0,0 +1,18 @@
++Source: lrzsz
++Section: comm
++Priority: optional
++Maintainer: Martin A. Godisch <godisch@debian.org>
++Standards-Version: 3.8.3
++Build-Depends: autotools-dev, gettext
++
++Package: lrzsz
++Architecture: any
++Depends: ${shlibs:Depends}
++Suggests: minicom
++Description: Tools for zmodem/xmodem/ymodem file transfer
++ Lrzsz is a cosmetically modified zmodem/ymodem/xmodem package built
++ from the public-domain version of Chuck Forsberg's rzsz package.
++ .
++ These programs use error correcting protocols ({z,x,y}modem) to send
++ (sz, sx, sb) and receive (rz, rx, rb) files over a dial-in serial port
++ from a variety of programs running under various operating systems.
+--- lrzsz-0.12.21.orig/debian/changelog
++++ lrzsz-0.12.21/debian/changelog
+@@ -0,0 +1,104 @@
++lrzsz (0.12.21-5) unstable; urgency=low
++
++ * New maintainer upload, closes: #556238.
++ Thanks to Josip Rodin for his work.
++ * Removed build-dependency on debhelper.
++ * Added build-dependency on autotools-dev.
++ * Cut Debian diff.gz into pieces.
++ * Updated FSF address in copyright file.
++ * Updated German po file, added build-dependency on gettext.
++ Closes: #313992, thanks to Jens Seidel and Tobias Toedter.
++ * Fixed missing includes (compiler warnings).
++ * Fixed typo in sz manpage.
++ * Fixed linking to libnsl.
++ * Removed changelog emacs settings.
++ * Updated standards version.
++
++ -- Martin A. Godisch <godisch@debian.org> Sun, 22 Nov 2009 09:35:13 +0100
++
++lrzsz (0.12.21-4.1) unstable; urgency=low
++
++ * Non-maintainer upload.
++ * Rebuilt with current debhelper, finishing the /usr/doc transition.
++ Closes: #322762
++ * Rebuilt with a current toolchain, now it's prelinkable.
++ Closes: #288084
++ * Appled man page typo fix patch from A Costa. Closes: #311459
++
++ -- Joey Hess <joeyh@debian.org> Tue, 10 Jan 2006 01:35:00 -0500
++
++lrzsz (0.12.21-4) unstable; urgency=low
++
++ * Updated for Standards-Version: 3.5.2.
++ * Added touch stamp-h.in before make invocation in order to stop
++ autoheader from running.
++
++ -- Josip Rodin <jrodin@jagor.srce.hr> Sun, 25 Mar 2001 19:48:18 +0200
++
++lrzsz (0.12.21-3) unstable; urgency=low
++
++ * Newish upstream version, (990823 in CVS).
++ * Updated for Policy 3.x.
++ * Misc. fixes for debian/*.
++
++ -- Josip Rodin <jrodin@jagor.srce.hr> Sun, 19 Sep 1999 17:55:38 +0200
++
++lrzsz (0.12.21-2) unstable; urgency=low
++
++ * Removed definition of strstr, advised by upstream maintainer, to
++ get it to compile on glibc2.1, as John Goerzen and Bart Warmerdam
++ noticed (fixes: #39429 #39812).
++
++ -- Josip Rodin <jrodin@jagor.srce.hr> Sun, 20 Jun 1999 21:38:07 +0200
++
++lrzsz (0.12.21-1) unstable; urgency=low
++
++ * New upstream version (990604 in CVS).
++ * Cleaned up the diff by removing unneeded .deps/ files and not changing
++ aclocal et al.
++
++ -- Josip Rodin <jrodin@jagor.srce.hr> Sun, 6 Jun 1999 21:01:50 +0200
++
++lrzsz (0.12.20-2) unstable; urgency=low
++
++ * Don't install ansi2knr.1 manpage, closing bug #33121
++
++ -- Josip Rodin <jrodin@jagor.srce.hr> Sun, 7 Feb 1999 01:32:31 +0100
++
++lrzsz (0.12.20-1) unstable; urgency=low
++
++ * New maintainer.
++ * Althought version number doesn't indicate that, this version is
++ today's CVS snapshot from ftp://tirka.ohse.de/uwe/cvs-trees
++ * This release fixes following bugs: #8373 #11208 #16170 #16744 #17210.
++ * Package is lintian clean.
++
++ -- Josip Rodin <jrodin@jagor.srce.hr> Sun, 7 Feb 1999 01:32:31 +0100
++
++lrzsz (0.12.17) unstable; urgency=low
++
++ * sorry, see ../ChangeLog. automagically generated debian/changelog
++
++ -- Uwe Ohse <uwe@ohse.de> Mon, 02 Jun 1997 10:06:05 +0200
++
++lrzsz (0.12.16) unstable; urgency=low
++
++ * sorry, see ../ChangeLog. changelog is here just to make
++ dpkg happy.
++ * initial release
++
++ -- Uwe Ohse <uwe@ohse.de> Sun, 2 Jun 1997 21:00:00 +0200
++
++lrzsz (0.12b-1.1) unstable; urgency=low
++
++ * Non-maintainer release.
++ * Libc6 compile.
++
++ -- Martin Mitchell <martin@debian.org> Sat, 18 Oct 1997 01:58:54 +1000
++
++lrzsz (0.12b-1) unstable; urgency=low
++
++ * Converted to new source packaging format.
++ * New upstream version.
++
++ -- Michael Alan Dorman <mdorman@calder.med.miami.edu> Tue, 17 Sep 1996 13:39:23 -0400
+--- lrzsz-0.12.21.orig/debian/rules
++++ lrzsz-0.12.21/debian/rules
+@@ -0,0 +1,80 @@
++#!/usr/bin/make -f
++
++testdir = test -f src/lrz.c && test -f debian/rules
++testroot = test x`whoami` = xroot
++
++# FOR AUTOCONF 2.13 ONLY
++ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
++ confflags += $(DEB_HOST_GNU_TYPE)
++else
++ $(error Cannot cross-compile this package out-of-the-box)
++endif
++
++CFLAGS = -Wall -g
++ifneq "$(findstring noopt,$(DEB_BUILD_OPTIONS))" ""
++ CFLAGS += -O0
++else
++ CFLAGS += -O2
++endif
++export CFLAGS
++
++build: build-stamp
++build-stamp:
++ $(testdir)
++ cp -f /usr/share/misc/config.guess /usr/share/misc/config.sub .
++ -cat debian/patches/*.diff | patch -Ntp1 -r debian/rejected --no-backup-if-mismatch
++ ./configure $(CONFFLAGS) --prefix=/usr --mandir='$${prefix}/share/man' --program-transform-name=s/l//
++ touch stamp-h.in # to stop autoheader from running
++ touch -d yesterday aclocal.m4 # to stop automake from running
++ $(MAKE)
++ touch $@
++
++clean:
++ $(testdir)
++ $(testroot)
++ cp -f /usr/share/misc/config.guess /usr/share/misc/config.sub .
++ touch stamp-h.in # to stop autoheader from running
++ touch -d yesterday aclocal.m4 # to stop automake from running
++ [ ! -f Makefile ] || $(MAKE) distclean
++ -cat `ls -r debian/patches/*.diff` /dev/null | patch -RNtp1 -r debian/rejected --no-backup-if-mismatch
++ rm -rf debian/tmp
++ rm -f build-stamp config.guess config.sub po/lrzsz.pot po/*.gmo debian/files debian/rejected debian/substvars
++
++binary: binary-arch
++
++binary-indep:
++
++binary-arch: build
++ $(testdir)
++ $(testroot)
++ rm -rf debian/tmp
++
++ $(MAKE) prefix=$(CURDIR)/debian/tmp/usr install
++
++ifeq "$(findstring nostrip,$(DEB_BUILD_OPTIONS))" ""
++ strip -R .comment -R .note debian/tmp/usr/bin/*
++endif
++
++ install -d -m 0755 debian/tmp/usr/share/doc/lrzsz
++ install -p -m 0644 NEWS README README.cvs README.isdn4linux TODO debian/copyright debian/tmp/usr/share/doc/lrzsz
++ install -p -m 0644 -D ChangeLog debian/tmp/usr/share/doc/lrzsz/changelog
++ install -p -m 0644 -D debian/changelog debian/tmp/usr/share/doc/lrzsz/changelog.Debian
++
++ find debian/tmp/usr/share/man -type f -print0 | xargs -0 gzip -9
++ find debian/tmp/usr/share/doc -type f ! -name copyright ! -name '*.html' \
++ \( -name 'changelog*' -o -size +8 \) -print0 | xargs -0 gzip -9
++
++ ln -s rz.1.gz debian/tmp/usr/share/man/man1/rb.1.gz
++ ln -s rz.1.gz debian/tmp/usr/share/man/man1/rx.1.gz
++ ln -s sz.1.gz debian/tmp/usr/share/man/man1/sb.1.gz
++ ln -s sz.1.gz debian/tmp/usr/share/man/man1/sx.1.gz
++
++ install -d -m 0755 debian/tmp/DEBIAN
++ install -p -m 0644 debian/control debian/tmp/DEBIAN
++ cd debian/tmp && find usr -type f -print0 | xargs -0 md5sum > DEBIAN/md5sums
++
++ dpkg-shlibdeps debian/tmp/usr/bin/*
++ dpkg-gencontrol -isp -plrzsz
++ dpkg --build debian/tmp ..
++
++.PHONY: build clean binary binary-indep binary-arch
+--- lrzsz-0.12.21.orig/debian/patches/206648_dszlog.diff.unchecked
++++ lrzsz-0.12.21/debian/patches/206648_dszlog.diff.unchecked
+@@ -0,0 +1,311 @@
++diff -ur lrzsz-0.12.21/src/lrz.c newlrzsz/src/lrz.c
++--- lrzsz-0.12.21/src/lrz.c 2003-08-21 16:22:01.000000000 -0500
+++++ newlrzsz/src/lrz.c 2003-08-21 17:05:53.000000000 -0500
++@@ -68,6 +68,7 @@
++ unsigned Baudrate = 2400;
++
++ FILE *fout;
+++char *dszlogpath;
++
++
++ int Lastrx;
++@@ -192,6 +193,9 @@
++ zmputs(Attn);
++ canit(STDOUT_FILENO);
++ io_mode(0,0);
+++ if (dszlogpath) {
+++ dszlog(dszlogpath, 'L', 0, 0, 0, errors, 0, 0);
+++ }
++ error(128+n,0,_("caught signal %d; exiting"), n);
++ }
++
++@@ -265,6 +269,13 @@
++ if ((cp=getenv("ZMODEM_RESTRICTED"))!=NULL)
++ Restricted=2;
++
+++ dszlogpath = getenv("DSZLOG");
+++ if (access(dszlogpath, F_OK) == 0) {
+++ if (unlink(dszlogpath) != 0) {
+++ perror("unlink dszlog");
+++ }
+++ }
+++
++ /* make temporary and unfinished files */
++ umask(0077);
++
++@@ -559,6 +570,7 @@
++ signal(SIGINT, bibi);
++ signal(SIGTERM, bibi);
++ signal(SIGPIPE, bibi);
+++ signal(SIGHUP, bibi);
++ if (wcreceive(npats, patts)==ERROR) {
++ exitcode=0200;
++ canit(STDOUT_FILENO);
++@@ -685,9 +697,9 @@
++ #endif
++ if (c)
++ goto fubar;
++- } else {
+++ } else { /* Not Xmodem, not Zmodem, so Ymodem */
++ for (;;) {
++- if (Verbose > 1
+++ if (Verbose > 1 || dszlogpath
++ #ifdef ENABLE_SYSLOG
++ || enable_syslog
++ #endif
++@@ -712,7 +724,7 @@
++ if (wcrx(&zi)==ERROR)
++ goto fubar;
++
++- if (Verbose > 1
+++ if (Verbose > 1 || dszlogpath
++ #ifdef ENABLE_SYSLOG
++ || enable_syslog
++ #endif
++@@ -734,16 +746,19 @@
++ lsyslog(LOG_INFO,"%s/%s: %ld Bytes, %ld BPS",
++ shortname,protname(),zi.bytes_received, bps);
++ #endif
+++ if (dszlogpath) dszlog(dszlogpath, 'R',
+++ zi.bytes_received, zi.fname,
+++ bps, errors, 0, 0);
++ }
++ }
++ }
++- } else {
+++ } else { /* Xmodem */
++ char dummy[128];
++ dummy[0]='\0'; /* pre-ANSI HPUX cc demands this */
++ dummy[1]='\0'; /* procheader uses name + 1 + strlen(name) */
++ zi.bytes_total = DEFBYTL;
++
++- if (Verbose > 1
+++ if (Verbose > 1 || dszlogpath
++ #ifdef ENABLE_SYSLOG
++ || enable_syslog
++ #endif
++@@ -782,7 +797,7 @@
++ if (wcrx(&zi)==ERROR) {
++ goto fubar;
++ }
++- if (Verbose > 1
+++ if (Verbose > 1 || dszlogpath
++ #ifdef ENABLE_SYSLOG
++ || enable_syslog
++ #endif
++@@ -803,6 +818,10 @@
++ lsyslog(LOG_INFO,"%s/%s: %ld Bytes, %ld BPS",
++ shortname,protname(),zi.bytes_received, bps);
++ #endif
+++ if (dszlogpath) dszlog(dszlogpath, 'R',
+++ zi.bytes_received, zi.fname,
+++ bps, errors, 0, 0);
+++
++ }
++ }
++ return OK;
++@@ -812,6 +831,13 @@
++ lsyslog(LOG_ERR,"%s/%s: got error",
++ shortname ? shortname : "no.name", protname());
++ #endif
+++ if (dszlogpath) {
+++ double d = timing(0,NULL);
+++ dszlog(dszlogpath, 'E', zi.bytes_received, zi.fname,
+++ (zi.bytes_received-zi.bytes_skipped)/((d) ? d : 0.5),
+++ errors, 0, 0);
+++ }
+++
++ canit(STDOUT_FILENO);
++ if (Topipe && fout) {
++ pclose(fout); return ERROR;
++@@ -1783,10 +1809,18 @@
++ rzfiles(struct zm_fileinfo *zi)
++ {
++ register int c;
+++ long bps;
++
++ for (;;) {
++ timing(1,NULL);
++ c = rzfile(zi);
+++ {
+++ double d;
+++ d=timing(0,NULL);
+++ if (d==0)
+++ d=0.5; /* can happen if timing uses time() */
+++ bps=(zi->bytes_received-zi->bytes_skipped)/d;
+++ }
++ switch (c) {
++ case ZEOF:
++ if (Verbose > 1
++@@ -1794,12 +1828,6 @@
++ || enable_syslog
++ #endif
++ ) {
++- double d;
++- long bps;
++- d=timing(0,NULL);
++- if (d==0)
++- d=0.5; /* can happen if timing uses time() */
++- bps=(zi->bytes_received-zi->bytes_skipped)/d;
++ if (Verbose > 1) {
++ vstringf(
++ _("\rBytes received: %7ld/%7ld BPS:%-6ld \r\n"),
++@@ -1807,6 +1835,8 @@
++ }
++ DO_SYSLOG_FNAME((LOG_INFO, "%s/%s: %ld Bytes, %ld BPS",shortname,
++ protname(), (long) zi->bytes_total,bps));
+++ if (dszlogpath) dszlog(dszlogpath, 'z', zi->bytes_received,
+++ zi->fname, bps, errors, 0, 0);
++ }
++ /* FALL THROUGH */
++ case ZSKIP:
++@@ -1815,6 +1845,8 @@
++ if (Verbose)
++ vstringf(_("Skipped"));
++ DO_SYSLOG_FNAME((LOG_INFO, "%s/%s: skipped",shortname,protname()));
+++ if (dszlogpath) dszlog(dszlogpath, 'E', zi->bytes_received,
+++ zi->fname, bps, errors, 0, 0);
++ }
++ switch (tryz()) {
++ case ZCOMPL:
++@@ -1829,6 +1861,8 @@
++ return c;
++ case ERROR:
++ DO_SYSLOG_FNAME((LOG_INFO, "%s/%s: error",shortname,protname()));
+++ if (dszlogpath) dszlog(dszlogpath, 'E', zi->bytes_received,
+++ zi->fname, bps, errors, 0, 0);
++ return ERROR;
++ }
++ }
++diff -ur lrzsz-0.12.21/src/lsyslog.c newlrzsz/src/lsyslog.c
++--- lrzsz-0.12.21/src/lsyslog.c 1998-12-29 11:27:55.000000000 -0600
+++++ newlrzsz/src/lsyslog.c 2003-08-21 16:47:53.000000000 -0500
++@@ -26,6 +26,8 @@
++ #include <string.h>
++ #endif
++
+++#include <stdio.h>
+++
++ #if __STDC__
++ # include <stdarg.h>
++ # define VA_START(args, lastarg) va_start(args, lastarg)
++@@ -79,3 +81,23 @@
++ #endif
++ }
++
+++void dszlog(char *logname, char status, unsigned long num_bytes, char *fname,
+++ int cps, int retry_events, int flow_events, int blocksize) {
+++
+++ FILE *mylog;
+++ if ((mylog = fopen(logname, "a"))) {
+++ fprintf(mylog, "%c %6ld %5ld bps %4ld cps %3d errors %5u %4d %s %ld\r\n",
+++ status,
+++ num_bytes,
+++ cps*8, /* XXX where to get DTE from? */
+++ cps,
+++ retry_events,
+++ flow_events, /* XXX where is flow_control? */
+++ blocksize,
+++ fname,
+++ -1 /* serial number */
+++ );
+++ fclose(mylog);
+++ }
+++}
+++
++diff -ur lrzsz-0.12.21/src/lsz.c newlrzsz/src/lsz.c
++--- lrzsz-0.12.21/src/lsz.c 2003-08-21 16:22:01.000000000 -0500
+++++ newlrzsz/src/lsz.c 2003-08-21 17:02:18.000000000 -0500
++@@ -59,6 +59,8 @@
++ extern int errno;
++ #endif
++
+++char *dszlogpath;
+++
++ unsigned Baudrate=2400; /* Default, should be set by first mode() call */
++ unsigned Txwindow; /* Control the size of the transmitted window */
++ unsigned Txwspac; /* Spacing between zcrcq requests */
++@@ -223,6 +225,9 @@
++ canit(STDOUT_FILENO);
++ fflush (stdout);
++ io_mode (io_mode_fd,0);
+++ if (dszlogpath) {
+++ dszlog(dszlogpath, 'L', 0, 0, 0, errors, 0, 0);
+++ }
++ if (n == 99)
++ error (0, 0, _ ("io_mode(,2) in rbsb.c not implemented\n"));
++ else
++@@ -332,6 +337,14 @@
++ }
++ if ((cp=getenv("ZMODEM_RESTRICTED"))!=NULL)
++ Restricted=1;
+++
+++ dszlogpath = getenv("DSZLOG");
+++ if (access(dszlogpath, F_OK) == 0) {
+++ if (unlink(dszlogpath) != 0) {
+++ perror("unlink dszlog");
+++ }
+++ }
+++
++ from_cu();
++ chkinvok(argv[0]);
++
++@@ -1113,6 +1126,12 @@
++ if (enable_syslog)
++ lsyslog(LOG_INFO, _("%s/%s: error occured"),protname(),shortname);
++ #endif
+++ if (dszlogpath) {
+++ double d = timing(0,NULL);
+++ dszlog(dszlogpath, 'E', zi.bytes_sent, zi.fname,
+++ zi.bytes_sent/((d) ? d : 0.5),
+++ errors, 0, blklen);
+++ }
++ return ERROR;
++ case ZSKIP:
++ error(0,0, _("skipped: %s"),name);
++@@ -1120,6 +1139,13 @@
++ if (enable_syslog)
++ lsyslog(LOG_INFO, _("%s/%s: skipped"),protname(),shortname);
++ #endif
+++ if (dszlogpath) {
+++ double d = timing(0,NULL);
+++ /* XXX is Zmodem skip really deserving a 'E' ? */
+++ dszlog(dszlogpath, 'E', zi.bytes_sent, zi.fname,
+++ zi.bytes_sent/((d) ? d : 0.5),
+++ errors, 0, blklen);
+++ }
++ return OK;
++ }
++ if (!zmodem_requested && wctx(&zi)==ERROR)
++@@ -1128,12 +1154,18 @@
++ if (enable_syslog)
++ lsyslog(LOG_INFO, _("%s/%s: error occured"),protname(),shortname);
++ #endif
+++ if (dszlogpath) {
+++ double d = timing(0,NULL);
+++ dszlog(dszlogpath, 'E', zi.bytes_sent, zi.fname,
+++ zi.bytes_sent/((d) ? d : 0.5),
+++ errors, 0, blklen);
+++ }
++ return ERROR;
++ }
++ if (Unlinkafter)
++ unlink(oname);
++
++- if (Verbose > 1
+++ if (Verbose > 1 || dszlogpath
++ #ifdef ENABLE_SYSLOG
++ || enable_syslog
++ #endif
++@@ -1152,6 +1184,11 @@
++ lsyslog(LOG_INFO, "%s/%s: %ld Bytes, %ld BPS",shortname,
++ protname(), (long) zi.bytes_sent,bps);
++ #endif
+++ if (dszlogpath) {
+++ char whichprot = (protocol==ZM_ZMODEM)? 'Z' : 'S';
+++ dszlog(dszlogpath, whichprot, zi.bytes_sent,
+++ zi.fname, bps, errors, 0, blklen);
+++ }
++ }
++ return 0;
++ }
+--- lrzsz-0.12.21.orig/debian/patches/include.diff
++++ lrzsz-0.12.21/debian/patches/include.diff
+@@ -0,0 +1,20 @@
++--- lrzsz-0.12.21.orig/lib/long-options.c
+++++ lrzsz-0.12.21/lib/long-options.c
++@@ -22,6 +22,7 @@
++ #endif
++
++ #include <stdio.h>
+++#include <stdlib.h>
++ #include <getopt.h>
++ #include "long-options.h"
++
++--- lrzsz-0.12.21.orig/src/lsyslog.c
+++++ lrzsz-0.12.21/src/lsyslog.c
++@@ -22,6 +22,7 @@
++ #ifdef ENABLE_SYSLOG
++ #include "zglobal.h"
++ #include <pwd.h>
+++#include <stdio.h>
++ #include <stdlib.h>
++ #include <string.h>
++ #endif
+--- lrzsz-0.12.21.orig/debian/patches/mantypos.diff
++++ lrzsz-0.12.21/debian/patches/mantypos.diff
+@@ -0,0 +1,49 @@
++--- lrzsz-0.12.21.orig/man/lsz.1
+++++ lrzsz-0.12.21/man/lsz.1
++@@ -247,7 +247,7 @@
++ Escape all control characters;
++ normally XON, XOFF, DLE, CR-@-CR, and Ctrl-X are escaped.
++ .TP
++-.B"-E, --rename"
+++.B "-E, --rename"
++ Force the sender to rename the new file if a file with the same
++ name already exists.
++ .TP
++@@ -265,7 +265,7 @@
++ .TP
++ .B "-i COMMAND, --immediate-command COMMAND"
++ Send COMMAND to the receiver for execution, return immediately
++-upon the receiving program's successful recption of the command.
+++upon the receiving program's successful reception of the command.
++ .TP
++ .B "-k, --1k"
++ (XMODEM/YMODEM) Send files using 1024 byte blocks
++@@ -509,7 +509,7 @@
++ .RB ( \-a )
++ to end of line conventions appropriate to the receiving environment.
++ With ZMODEM AutoDownload enabled, Professional-YAM and ZCOMM
++-will automatically recieve
+++will automatically receive
++ the files after performing a security check.
++
++ .br
++@@ -592,8 +592,8 @@
++ the source file.
++ .SH "VMS VERSION"
++ The VMS version does not support wild cards.
++-Because of VMS DCL, upper case option letters muse be represented
++-by \\ proceding the letter.
+++Because of VMS DCL, upper case option letters must be represented
+++by \\ preceding the letter.
++
++ The current VMS version does not support XMODEM, XMODEM-1k, or YMODEM.
++
++@@ -682,7 +682,7 @@
++ The test mode leaves a zero length file on the receiving system.
++
++ A few high speed modems have a firmware bug that drops characters when the
++-direction of high speed transmissson is reversed.
+++direction of high speed transmission is reversed.
++ The environment variable ZNULLS may be used to specify the number of nulls to
++ send before a ZDATA frame.
++ Values of 101 for a 4.77 mHz PC and 124 for an AT are typical.
+--- lrzsz-0.12.21.orig/debian/patches/strstr.diff
++++ lrzsz-0.12.21/debian/patches/strstr.diff
+@@ -0,0 +1,20 @@
++--- lrzsz-0.12.21.orig/src/lrz.c
+++++ lrzsz-0.12.21/src/lrz.c
++@@ -44,7 +44,6 @@
++ #ifndef STRICT_PROTOTYPES
++ extern time_t time();
++ extern char *strerror();
++-extern char *strstr();
++ #endif
++
++ #ifndef HAVE_ERRNO_DECLARATION
++--- lrzsz-0.12.21.orig/src/lsz.c
+++++ lrzsz-0.12.21/src/lsz.c
++@@ -53,7 +53,6 @@
++ #ifndef STRICT_PROTOTYPES
++ extern time_t time();
++ extern char *strerror();
++-extern char *strstr();
++ #endif
++
++ #ifndef HAVE_ERRNO_DECLARATION
+--- lrzsz-0.12.21.orig/debian/patches/build.diff
++++ lrzsz-0.12.21/debian/patches/build.diff
+@@ -0,0 +1,2115 @@
++--- lrzsz-0.12.21.orig/Makefile.in
+++++ lrzsz-0.12.21/Makefile.in
++@@ -1,4 +1,4 @@
++-# Makefile.in generated automatically by automake 1.4a from Makefile.am
+++# Makefile.in generated automatically by automake 1.4 from Makefile.am
++
++ # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
++ # This Makefile.in is free software; the Free Software Foundation
++@@ -46,10 +46,9 @@
++ AUTOHEADER = @AUTOHEADER@
++
++ INSTALL = @INSTALL@
++-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+++INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
++ INSTALL_DATA = @INSTALL_DATA@
++ INSTALL_SCRIPT = @INSTALL_SCRIPT@
++-INSTALL_STRIP_FLAG =
++ transform = @program_transform_name@
++
++ NORMAL_INSTALL = :
++@@ -106,13 +105,13 @@
++
++ DIST_COMMON = README ./stamp-h.in ABOUT-NLS AUTHORS COPYING ChangeLog \
++ INSTALL Makefile.am Makefile.in NEWS Specfile.in THANKS TODO acconfig.h \
++-acinclude.m4 aclocal.m4 config.guess config.h.in configure configure.in \
++-install-sh missing mkinstalldirs systype.in
+++acinclude.m4 aclocal.m4 config.guess config.h.in config.sub configure \
+++configure.in install-sh missing mkinstalldirs systype.in
++
++
++ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
++
++-TAR = gtar
+++TAR = tar
++ GZIP_ENV = --best
++ all: all-redirect
++ .SUFFIXES:
++@@ -298,7 +297,7 @@
++ @for file in $(DISTFILES); do \
++ d=$(srcdir); \
++ if test -d $$d/$$file; then \
++- cp -pr $$d/$$file $(distdir)/$$file; \
+++ cp -pr $$/$$file $(distdir)/$$file; \
++ else \
++ test -f $(distdir)/$$file \
++ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
++@@ -340,7 +339,7 @@
++ all-am: Makefile $(SCRIPTS) config.h
++ all-redirect: all-recursive-am
++ install-strip:
++- $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
+++ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
++ installdirs: installdirs-recursive
++ installdirs-am:
++
++--- lrzsz-0.12.21.orig/aclocal.m4
+++++ lrzsz-0.12.21/aclocal.m4
++@@ -1,4 +1,4 @@
++-dnl aclocal.m4 generated automatically by aclocal 1.4a
+++dnl aclocal.m4 generated automatically by aclocal 1.4
++
++ dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
++ dnl This file is free software; the Free Software Foundation
++@@ -117,8 +117,6 @@
++
++ AC_DEFUN(AM_INIT_AUTOMAKE,
++ [AC_REQUIRE([AC_PROG_INSTALL])
++-dnl We require 2.13 because we rely on SHELL being computed by configure.
++-AC_PREREQ([2.13])
++ PACKAGE=[$1]
++ AC_SUBST(PACKAGE)
++ VERSION=[$2]
++--- lrzsz-0.12.21.orig/configure
+++++ lrzsz-0.12.21/configure
++@@ -703,7 +703,6 @@
++ fi
++
++
++-
++ PACKAGE=lrzsz
++
++ VERSION=0.12.21rc
++@@ -723,7 +722,7 @@
++
++ missing_dir=`cd $ac_aux_dir && pwd`
++ echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
++-echo "configure:727: checking for working aclocal" >&5
+++echo "configure:726: checking for working aclocal" >&5
++ # Run test in a subshell; some versions of sh will print an error if
++ # an executable is not found, even if stderr is redirected.
++ # Redirect stdin to placate older versions of autoconf. Sigh.
++@@ -736,7 +735,7 @@
++ fi
++
++ echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
++-echo "configure:740: checking for working autoconf" >&5
+++echo "configure:739: checking for working autoconf" >&5
++ # Run test in a subshell; some versions of sh will print an error if
++ # an executable is not found, even if stderr is redirected.
++ # Redirect stdin to placate older versions of autoconf. Sigh.
++@@ -749,7 +748,7 @@
++ fi
++
++ echo $ac_n "checking for working automake""... $ac_c" 1>&6
++-echo "configure:753: checking for working automake" >&5
+++echo "configure:752: checking for working automake" >&5
++ # Run test in a subshell; some versions of sh will print an error if
++ # an executable is not found, even if stderr is redirected.
++ # Redirect stdin to placate older versions of autoconf. Sigh.
++@@ -762,7 +761,7 @@
++ fi
++
++ echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
++-echo "configure:766: checking for working autoheader" >&5
+++echo "configure:765: checking for working autoheader" >&5
++ # Run test in a subshell; some versions of sh will print an error if
++ # an executable is not found, even if stderr is redirected.
++ # Redirect stdin to placate older versions of autoconf. Sigh.
++@@ -775,7 +774,7 @@
++ fi
++
++ echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
++-echo "configure:779: checking for working makeinfo" >&5
+++echo "configure:778: checking for working makeinfo" >&5
++ # Run test in a subshell; some versions of sh will print an error if
++ # an executable is not found, even if stderr is redirected.
++ # Redirect stdin to placate older versions of autoconf. Sigh.
++@@ -926,7 +925,7 @@
++ # Extract the first word of "gcc", so it can be a program name with args.
++ set dummy gcc; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:930: checking for $ac_word" >&5
+++echo "configure:929: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -956,7 +955,7 @@
++ # Extract the first word of "cc", so it can be a program name with args.
++ set dummy cc; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:960: checking for $ac_word" >&5
+++echo "configure:959: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -1007,7 +1006,7 @@
++ # Extract the first word of "cl", so it can be a program name with args.
++ set dummy cl; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:1011: checking for $ac_word" >&5
+++echo "configure:1010: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -1039,7 +1038,7 @@
++ fi
++
++ echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
++-echo "configure:1043: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+++echo "configure:1042: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
++
++ ac_ext=c
++ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++@@ -1050,12 +1049,12 @@
++
++ cat > conftest.$ac_ext << EOF
++
++-#line 1054 "configure"
+++#line 1053 "configure"
++ #include "confdefs.h"
++
++ main(){return(0);}
++ EOF
++-if { (eval echo configure:1059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:1058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ ac_cv_prog_cc_works=yes
++ # If we can't run a trivial program, we are probably using a cross compiler.
++ if (./conftest; exit) 2>/dev/null; then
++@@ -1081,12 +1080,12 @@
++ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
++ fi
++ echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
++-echo "configure:1085: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+++echo "configure:1084: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
++ echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
++ cross_compiling=$ac_cv_prog_cc_cross
++
++ echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
++-echo "configure:1090: checking whether we are using GNU C" >&5
+++echo "configure:1089: checking whether we are using GNU C" >&5
++ if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -1095,7 +1094,7 @@
++ yes;
++ #endif
++ EOF
++-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+++if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
++ ac_cv_prog_gcc=yes
++ else
++ ac_cv_prog_gcc=no
++@@ -1114,7 +1113,7 @@
++ ac_save_CFLAGS="$CFLAGS"
++ CFLAGS=
++ echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
++-echo "configure:1118: checking whether ${CC-cc} accepts -g" >&5
+++echo "configure:1117: checking whether ${CC-cc} accepts -g" >&5
++ if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -1146,7 +1145,7 @@
++ fi
++
++ echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
++-echo "configure:1150: checking how to run the C preprocessor" >&5
+++echo "configure:1149: checking how to run the C preprocessor" >&5
++ # On Suns, sometimes $CPP names a directory.
++ if test -n "$CPP" && test -d "$CPP"; then
++ CPP=
++@@ -1161,13 +1160,13 @@
++ # On the NeXT, cc -E runs the code through the compiler's parser,
++ # not just through cpp.
++ cat > conftest.$ac_ext <<EOF
++-#line 1165 "configure"
+++#line 1164 "configure"
++ #include "confdefs.h"
++ #include <assert.h>
++ Syntax Error
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:1171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:1170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ :
++@@ -1178,13 +1177,13 @@
++ rm -rf conftest*
++ CPP="${CC-cc} -E -traditional-cpp"
++ cat > conftest.$ac_ext <<EOF
++-#line 1182 "configure"
+++#line 1181 "configure"
++ #include "confdefs.h"
++ #include <assert.h>
++ Syntax Error
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:1188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:1187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ :
++@@ -1195,13 +1194,13 @@
++ rm -rf conftest*
++ CPP="${CC-cc} -nologo -E"
++ cat > conftest.$ac_ext <<EOF
++-#line 1199 "configure"
+++#line 1198 "configure"
++ #include "confdefs.h"
++ #include <assert.h>
++ Syntax Error
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:1205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:1204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ :
++@@ -1235,13 +1234,13 @@
++ fi
++ if test $ac_cv_prog_gcc = yes; then
++ echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
++-echo "configure:1239: checking whether ${CC-cc} needs -traditional" >&5
+++echo "configure:1238: checking whether ${CC-cc} needs -traditional" >&5
++ if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ ac_pattern="Autoconf.*'x'"
++ cat > conftest.$ac_ext <<EOF
++-#line 1245 "configure"
+++#line 1244 "configure"
++ #include "confdefs.h"
++ #include <sgtty.h>
++ Autoconf TIOCGETP
++@@ -1259,7 +1258,7 @@
++
++ if test $ac_cv_prog_gcc_traditional = no; then
++ cat > conftest.$ac_ext <<EOF
++-#line 1263 "configure"
+++#line 1262 "configure"
++ #include "confdefs.h"
++ #include <termio.h>
++ Autoconf TCGETA
++@@ -1283,7 +1282,7 @@
++ # Extract the first word of "ranlib", so it can be a program name with args.
++ set dummy ranlib; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:1287: checking for $ac_word" >&5
+++echo "configure:1286: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -1311,7 +1310,7 @@
++ fi
++
++ echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
++-echo "configure:1315: checking for POSIXized ISC" >&5
+++echo "configure:1314: checking for POSIXized ISC" >&5
++ if test -d /etc/conf/kconfig.d &&
++ grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
++ then
++@@ -1332,9 +1331,9 @@
++ fi
++
++ echo $ac_n "checking for AIX""... $ac_c" 1>&6
++-echo "configure:1336: checking for AIX" >&5
+++echo "configure:1335: checking for AIX" >&5
++ cat > conftest.$ac_ext <<EOF
++-#line 1338 "configure"
+++#line 1337 "configure"
++ #include "confdefs.h"
++ #ifdef _AIX
++ yes
++@@ -1357,17 +1356,17 @@
++
++ ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
++ echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
++-echo "configure:1361: checking for minix/config.h" >&5
+++echo "configure:1360: checking for minix/config.h" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 1366 "configure"
+++#line 1365 "configure"
++ #include "confdefs.h"
++ #include <minix/config.h>
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:1371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:1370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ rm -rf conftest*
++@@ -1408,7 +1407,7 @@
++
++
++ echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
++-echo "configure:1412: checking for ${CC-cc} option to accept ANSI C" >&5
+++echo "configure:1411: checking for ${CC-cc} option to accept ANSI C" >&5
++ if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -1424,7 +1423,7 @@
++ do
++ CC="$ac_save_CC $ac_arg"
++ cat > conftest.$ac_ext <<EOF
++-#line 1428 "configure"
+++#line 1427 "configure"
++ #include "confdefs.h"
++ #include <stdarg.h>
++ #include <stdio.h>
++@@ -1461,7 +1460,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:1465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+++if { (eval echo configure:1464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++ rm -rf conftest*
++ am_cv_prog_cc_stdc="$ac_arg"; break
++ else
++@@ -1487,7 +1486,7 @@
++
++
++ echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
++-echo "configure:1491: checking for function prototypes" >&5
+++echo "configure:1490: checking for function prototypes" >&5
++ if test "$am_cv_prog_cc_stdc" != no; then
++ echo "$ac_t""yes" 1>&6
++ cat >> confdefs.h <<\EOF
++@@ -1500,12 +1499,12 @@
++ U=_ ANSI2KNR=./ansi2knr
++ # Ensure some checks needed by ansi2knr itself.
++ echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
++-echo "configure:1504: checking for ANSI C header files" >&5
+++echo "configure:1503: checking for ANSI C header files" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 1509 "configure"
+++#line 1508 "configure"
++ #include "confdefs.h"
++ #include <stdlib.h>
++ #include <stdarg.h>
++@@ -1513,7 +1512,7 @@
++ #include <float.h>
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:1517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:1516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ rm -rf conftest*
++@@ -1530,7 +1529,7 @@
++ if test $ac_cv_header_stdc = yes; then
++ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
++ cat > conftest.$ac_ext <<EOF
++-#line 1534 "configure"
+++#line 1533 "configure"
++ #include "confdefs.h"
++ #include <string.h>
++ EOF
++@@ -1548,7 +1547,7 @@
++ if test $ac_cv_header_stdc = yes; then
++ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
++ cat > conftest.$ac_ext <<EOF
++-#line 1552 "configure"
+++#line 1551 "configure"
++ #include "confdefs.h"
++ #include <stdlib.h>
++ EOF
++@@ -1569,7 +1568,7 @@
++ :
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 1573 "configure"
+++#line 1572 "configure"
++ #include "confdefs.h"
++ #include <ctype.h>
++ #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
++@@ -1580,7 +1579,7 @@
++ exit (0); }
++
++ EOF
++-if { (eval echo configure:1584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+++if { (eval echo configure:1583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++ then
++ :
++ else
++@@ -1607,17 +1606,17 @@
++ do
++ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
++ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
++-echo "configure:1611: checking for $ac_hdr" >&5
+++echo "configure:1610: checking for $ac_hdr" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 1616 "configure"
+++#line 1615 "configure"
++ #include "confdefs.h"
++ #include <$ac_hdr>
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:1621: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:1620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ rm -rf conftest*
++@@ -1646,12 +1645,12 @@
++ fi
++
++ echo $ac_n "checking for working const""... $ac_c" 1>&6
++-echo "configure:1650: checking for working const" >&5
+++echo "configure:1649: checking for working const" >&5
++ if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 1655 "configure"
+++#line 1654 "configure"
++ #include "confdefs.h"
++
++ int main() {
++@@ -1700,7 +1699,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:1704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+++if { (eval echo configure:1703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++ rm -rf conftest*
++ ac_cv_c_const=yes
++ else
++@@ -1721,21 +1720,21 @@
++ fi
++
++ echo $ac_n "checking for inline""... $ac_c" 1>&6
++-echo "configure:1725: checking for inline" >&5
+++echo "configure:1724: checking for inline" >&5
++ if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ ac_cv_c_inline=no
++ for ac_kw in inline __inline__ __inline; do
++ cat > conftest.$ac_ext <<EOF
++-#line 1732 "configure"
+++#line 1731 "configure"
++ #include "confdefs.h"
++
++ int main() {
++ } $ac_kw foo() {
++ ; return 0; }
++ EOF
++-if { (eval echo configure:1739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+++if { (eval echo configure:1738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++ rm -rf conftest*
++ ac_cv_c_inline=$ac_kw; break
++ else
++@@ -1786,7 +1785,7 @@
++ esac
++
++ echo $ac_n "checking for syslog in -lsocket""... $ac_c" 1>&6
++-echo "configure:1790: checking for syslog in -lsocket" >&5
+++echo "configure:1789: checking for syslog in -lsocket" >&5
++ ac_lib_var=`echo socket'_'syslog | sed 'y%./+-%__p_%'`
++ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++@@ -1794,7 +1793,7 @@
++ ac_save_LIBS="$LIBS"
++ LIBS="-lsocket $LIBS"
++ cat > conftest.$ac_ext <<EOF
++-#line 1798 "configure"
+++#line 1797 "configure"
++ #include "confdefs.h"
++ /* Override any gcc2 internal prototype to avoid an error. */
++ /* We use char because int might match the return type of a gcc2
++@@ -1805,7 +1804,7 @@
++ syslog()
++ ; return 0; }
++ EOF
++-if { (eval echo configure:1809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:1808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_lib_$ac_lib_var=yes"
++ else
++@@ -1832,108 +1831,14 @@
++ echo "$ac_t""no" 1>&6
++ fi
++
++-echo $ac_n "checking for syslog in -lbe""... $ac_c" 1>&6
++-echo "configure:1837: checking for syslog in -lbe" >&5
++-ac_lib_var=`echo be'_'syslog | sed 'y%./+-%__p_%'`
++-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
++- echo $ac_n "(cached) $ac_c" 1>&6
++-else
++- ac_save_LIBS="$LIBS"
++-LIBS="-lbe $LIBS"
++-cat > conftest.$ac_ext <<EOF
++-#line 1845 "configure"
++-#include "confdefs.h"
++-/* Override any gcc2 internal prototype to avoid an error. */
++-/* We use char because int might match the return type of a gcc2
++- builtin and then its argument prototype would still apply. */
++-char syslog();
++-
++-int main() {
++-syslog()
++-; return 0; }
++-EOF
++-if { (eval echo configure:1856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++- rm -rf conftest*
++- eval "ac_cv_lib_$ac_lib_var=yes"
++-else
++- echo "configure: failed program was:" >&5
++- cat conftest.$ac_ext >&5
++- rm -rf conftest*
++- eval "ac_cv_lib_$ac_lib_var=no"
++-fi
++-rm -f conftest*
++-LIBS="$ac_save_LIBS"
++-
++-fi
++-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
++- echo "$ac_t""yes" 1>&6
++- ac_tr_lib=HAVE_LIB`echo be | sed -e 's/[^a-zA-Z0-9_]/_/g' \
++- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
++- cat >> confdefs.h <<EOF
++-#define $ac_tr_lib 1
++-EOF
++-
++- LIBS="-lbe $LIBS"
++-
++-else
++- echo "$ac_t""no" 1>&6
++-fi
++-
++-echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
++-echo "configure:1884: checking for gethostbyname in -lnsl" >&5
++-ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
++-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
++- echo $ac_n "(cached) $ac_c" 1>&6
++-else
++- ac_save_LIBS="$LIBS"
++-LIBS="-lnsl $LIBS"
++-cat > conftest.$ac_ext <<EOF
++-#line 1892 "configure"
++-#include "confdefs.h"
++-/* Override any gcc2 internal prototype to avoid an error. */
++-/* We use char because int might match the return type of a gcc2
++- builtin and then its argument prototype would still apply. */
++-char gethostbyname();
++-
++-int main() {
++-gethostbyname()
++-; return 0; }
++-EOF
++-if { (eval echo configure:1903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++- rm -rf conftest*
++- eval "ac_cv_lib_$ac_lib_var=yes"
++-else
++- echo "configure: failed program was:" >&5
++- cat conftest.$ac_ext >&5
++- rm -rf conftest*
++- eval "ac_cv_lib_$ac_lib_var=no"
++-fi
++-rm -f conftest*
++-LIBS="$ac_save_LIBS"
++-
++-fi
++-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
++- echo "$ac_t""yes" 1>&6
++- ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
++- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
++- cat >> confdefs.h <<EOF
++-#define $ac_tr_lib 1
++-EOF
++-
++- LIBS="-lnsl $LIBS"
++-
++-else
++- echo "$ac_t""no" 1>&6
++-fi
++-
++
++ echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
++-echo "configure:1932: checking for ANSI C header files" >&5
+++echo "configure:1931: checking for ANSI C header files" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 1937 "configure"
+++#line 1936 "configure"
++ #include "confdefs.h"
++ #include <stdlib.h>
++ #include <stdarg.h>
++@@ -1941,7 +1846,7 @@
++ #include <float.h>
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:1945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:1944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ rm -rf conftest*
++@@ -1958,7 +1863,7 @@
++ if test $ac_cv_header_stdc = yes; then
++ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
++ cat > conftest.$ac_ext <<EOF
++-#line 1962 "configure"
+++#line 1961 "configure"
++ #include "confdefs.h"
++ #include <string.h>
++ EOF
++@@ -1976,7 +1881,7 @@
++ if test $ac_cv_header_stdc = yes; then
++ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
++ cat > conftest.$ac_ext <<EOF
++-#line 1980 "configure"
+++#line 1979 "configure"
++ #include "confdefs.h"
++ #include <stdlib.h>
++ EOF
++@@ -1997,7 +1902,7 @@
++ :
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2001 "configure"
+++#line 2000 "configure"
++ #include "confdefs.h"
++ #include <ctype.h>
++ #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
++@@ -2008,7 +1913,7 @@
++ exit (0); }
++
++ EOF
++-if { (eval echo configure:2012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+++if { (eval echo configure:2011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++ then
++ :
++ else
++@@ -2035,17 +1940,17 @@
++ do
++ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
++ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
++-echo "configure:2039: checking for $ac_hdr" >&5
+++echo "configure:2038: checking for $ac_hdr" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2044 "configure"
+++#line 2043 "configure"
++ #include "confdefs.h"
++ #include <$ac_hdr>
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:2049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:2048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ rm -rf conftest*
++@@ -2076,17 +1981,17 @@
++ do
++ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
++ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
++-echo "configure:2080: checking for $ac_hdr" >&5
+++echo "configure:2079: checking for $ac_hdr" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2085 "configure"
+++#line 2084 "configure"
++ #include "confdefs.h"
++ #include <$ac_hdr>
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:2090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:2089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ rm -rf conftest*
++@@ -2116,17 +2021,17 @@
++ do
++ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
++ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
++-echo "configure:2120: checking for $ac_hdr" >&5
+++echo "configure:2119: checking for $ac_hdr" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2125 "configure"
+++#line 2124 "configure"
++ #include "confdefs.h"
++ #include <$ac_hdr>
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:2130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:2129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ rm -rf conftest*
++@@ -2156,17 +2061,17 @@
++ do
++ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
++ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
++-echo "configure:2160: checking for $ac_hdr" >&5
+++echo "configure:2159: checking for $ac_hdr" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2165 "configure"
+++#line 2164 "configure"
++ #include "confdefs.h"
++ #include <$ac_hdr>
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:2170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:2169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ rm -rf conftest*
++@@ -2196,17 +2101,17 @@
++ do
++ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
++ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
++-echo "configure:2200: checking for $ac_hdr" >&5
+++echo "configure:2199: checking for $ac_hdr" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2205 "configure"
+++#line 2204 "configure"
++ #include "confdefs.h"
++ #include <$ac_hdr>
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:2210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:2209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ rm -rf conftest*
++@@ -2234,12 +2139,12 @@
++
++
++ echo $ac_n "checking for size_t""... $ac_c" 1>&6
++-echo "configure:2238: checking for size_t" >&5
+++echo "configure:2237: checking for size_t" >&5
++ if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2243 "configure"
+++#line 2242 "configure"
++ #include "confdefs.h"
++ #include <sys/types.h>
++ #if STDC_HEADERS
++@@ -2267,12 +2172,12 @@
++ fi
++
++ echo $ac_n "checking for mode_t""... $ac_c" 1>&6
++-echo "configure:2271: checking for mode_t" >&5
+++echo "configure:2270: checking for mode_t" >&5
++ if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2276 "configure"
+++#line 2275 "configure"
++ #include "confdefs.h"
++ #include <sys/types.h>
++ #if STDC_HEADERS
++@@ -2300,12 +2205,12 @@
++ fi
++
++ echo $ac_n "checking for off_t""... $ac_c" 1>&6
++-echo "configure:2304: checking for off_t" >&5
+++echo "configure:2303: checking for off_t" >&5
++ if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2309 "configure"
+++#line 2308 "configure"
++ #include "confdefs.h"
++ #include <sys/types.h>
++ #if STDC_HEADERS
++@@ -2334,12 +2239,12 @@
++
++
++ echo $ac_n "checking for speed_t""... $ac_c" 1>&6
++-echo "configure:2338: checking for speed_t" >&5
+++echo "configure:2337: checking for speed_t" >&5
++ if eval "test \"`echo '$''{'ac_cv_type_speed_t'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2343 "configure"
+++#line 2342 "configure"
++ #include "confdefs.h"
++ #include <sys/types.h>
++ #if STDC_HEADERS
++@@ -2389,12 +2294,12 @@
++ fi
++
++ echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
++-echo "configure:2393: checking for st_rdev in struct stat" >&5
+++echo "configure:2392: checking for st_rdev in struct stat" >&5
++ if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2398 "configure"
+++#line 2397 "configure"
++ #include "confdefs.h"
++ #include <sys/types.h>
++ #include <sys/stat.h>
++@@ -2402,7 +2307,7 @@
++ struct stat s; s.st_rdev;
++ ; return 0; }
++ EOF
++-if { (eval echo configure:2406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+++if { (eval echo configure:2405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++ rm -rf conftest*
++ ac_cv_struct_st_rdev=yes
++ else
++@@ -2423,12 +2328,12 @@
++ fi
++
++ echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
++-echo "configure:2427: checking whether time.h and sys/time.h may both be included" >&5
+++echo "configure:2426: checking whether time.h and sys/time.h may both be included" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2432 "configure"
+++#line 2431 "configure"
++ #include "confdefs.h"
++ #include <sys/types.h>
++ #include <sys/time.h>
++@@ -2437,7 +2342,7 @@
++ struct tm *tp;
++ ; return 0; }
++ EOF
++-if { (eval echo configure:2441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+++if { (eval echo configure:2440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++ rm -rf conftest*
++ ac_cv_header_time=yes
++ else
++@@ -2459,12 +2364,12 @@
++
++
++ echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
++-echo "configure:2463: checking for socklen_t" >&5
+++echo "configure:2462: checking for socklen_t" >&5
++ if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2468 "configure"
+++#line 2467 "configure"
++ #include "confdefs.h"
++
++ #include "confdefs.h"
++@@ -2480,7 +2385,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:2484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+++if { (eval echo configure:2483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++ rm -rf conftest*
++ ac_cv_type_socklen_t=yes
++ else
++@@ -2505,12 +2410,12 @@
++ fi
++
++ echo $ac_n "checking whether sys/time.h and sys/select.h may both be included""... $ac_c" 1>&6
++-echo "configure:2509: checking whether sys/time.h and sys/select.h may both be included" >&5
+++echo "configure:2508: checking whether sys/time.h and sys/select.h may both be included" >&5
++ if eval "test \"`echo '$''{'lrzsz_cv_header_sys_select'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2514 "configure"
+++#line 2513 "configure"
++ #include "confdefs.h"
++ #include <sys/types.h>
++ #include <sys/time.h>
++@@ -2519,7 +2424,7 @@
++ struct tm *tp;
++ ; return 0; }
++ EOF
++-if { (eval echo configure:2523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+++if { (eval echo configure:2522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++ rm -rf conftest*
++ lrzsz_cv_header_sys_select=yes
++ else
++@@ -2540,12 +2445,12 @@
++ fi
++
++ echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
++-echo "configure:2544: checking whether struct tm is in sys/time.h or time.h" >&5
+++echo "configure:2543: checking whether struct tm is in sys/time.h or time.h" >&5
++ if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2549 "configure"
+++#line 2548 "configure"
++ #include "confdefs.h"
++ #include <sys/types.h>
++ #include <time.h>
++@@ -2553,7 +2458,7 @@
++ struct tm *tp; tp->tm_sec;
++ ; return 0; }
++ EOF
++-if { (eval echo configure:2557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+++if { (eval echo configure:2556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++ rm -rf conftest*
++ ac_cv_struct_tm=time.h
++ else
++@@ -2575,19 +2480,19 @@
++
++
++ echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
++-echo "configure:2579: checking for errno declaration" >&5
+++echo "configure:2578: checking for errno declaration" >&5
++ if eval "test \"`echo '$''{'lrzsz_cv_decl_errno'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2584 "configure"
+++#line 2583 "configure"
++ #include "confdefs.h"
++ #include <errno.h>
++ int main() {
++ int i = errno; errno = 1;
++ ; return 0; }
++ EOF
++-if { (eval echo configure:2591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+++if { (eval echo configure:2590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++ rm -rf conftest*
++ lrzsz_cv_decl_errno=yes
++ else
++@@ -2610,7 +2515,7 @@
++
++ if test $cross_compiling = no ; then
++ echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6
++-echo "configure:2614: checking whether setvbuf arguments are reversed" >&5
+++echo "configure:2613: checking whether setvbuf arguments are reversed" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -2618,7 +2523,7 @@
++ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2622 "configure"
+++#line 2621 "configure"
++ #include "confdefs.h"
++ #include <stdio.h>
++ /* If setvbuf has the reversed format, exit 0. */
++@@ -2632,7 +2537,7 @@
++ exit(0); /* Non-reversed systems segv here. */
++ }
++ EOF
++-if { (eval echo configure:2636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+++if { (eval echo configure:2635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++ then
++ ac_cv_func_setvbuf_reversed=yes
++ else
++@@ -2657,12 +2562,12 @@
++
++ fi
++ echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
++-echo "configure:2661: checking return type of signal handlers" >&5
+++echo "configure:2660: checking return type of signal handlers" >&5
++ if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2666 "configure"
+++#line 2665 "configure"
++ #include "confdefs.h"
++ #include <sys/types.h>
++ #include <signal.h>
++@@ -2679,7 +2584,7 @@
++ int i;
++ ; return 0; }
++ EOF
++-if { (eval echo configure:2683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+++if { (eval echo configure:2682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++ rm -rf conftest*
++ ac_cv_type_signal=void
++ else
++@@ -2701,17 +2606,17 @@
++ do
++ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
++ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
++-echo "configure:2705: checking for $ac_hdr" >&5
+++echo "configure:2704: checking for $ac_hdr" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2710 "configure"
+++#line 2709 "configure"
++ #include "confdefs.h"
++ #include <$ac_hdr>
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:2715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:2714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ rm -rf conftest*
++@@ -2740,12 +2645,12 @@
++ for ac_func in getpagesize
++ do
++ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
++-echo "configure:2744: checking for $ac_func" >&5
+++echo "configure:2743: checking for $ac_func" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2749 "configure"
+++#line 2748 "configure"
++ #include "confdefs.h"
++ /* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func(); below. */
++@@ -2768,7 +2673,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:2772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:2771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_$ac_func=yes"
++ else
++@@ -2793,7 +2698,7 @@
++ done
++
++ echo $ac_n "checking for working mmap""... $ac_c" 1>&6
++-echo "configure:2797: checking for working mmap" >&5
+++echo "configure:2796: checking for working mmap" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -2801,7 +2706,7 @@
++ ac_cv_func_mmap_fixed_mapped=no
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2805 "configure"
+++#line 2804 "configure"
++ #include "confdefs.h"
++
++ /* Thanks to Mike Haertel and Jim Avera for this test.
++@@ -2941,7 +2846,7 @@
++ }
++
++ EOF
++-if { (eval echo configure:2945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+++if { (eval echo configure:2944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++ then
++ ac_cv_func_mmap_fixed_mapped=yes
++ else
++@@ -2966,19 +2871,19 @@
++ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
++ # for constant arguments. Useless!
++ echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
++-echo "configure:2970: checking for working alloca.h" >&5
+++echo "configure:2969: checking for working alloca.h" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2975 "configure"
+++#line 2974 "configure"
++ #include "confdefs.h"
++ #include <alloca.h>
++ int main() {
++ char *p = alloca(2 * sizeof(int));
++ ; return 0; }
++ EOF
++-if { (eval echo configure:2982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:2981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ ac_cv_header_alloca_h=yes
++ else
++@@ -2999,12 +2904,12 @@
++ fi
++
++ echo $ac_n "checking for alloca""... $ac_c" 1>&6
++-echo "configure:3003: checking for alloca" >&5
+++echo "configure:3002: checking for alloca" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3008 "configure"
+++#line 3007 "configure"
++ #include "confdefs.h"
++
++ #ifdef __GNUC__
++@@ -3032,7 +2937,7 @@
++ char *p = (char *) alloca(1);
++ ; return 0; }
++ EOF
++-if { (eval echo configure:3036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:3035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ ac_cv_func_alloca_works=yes
++ else
++@@ -3064,12 +2969,12 @@
++
++
++ echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
++-echo "configure:3068: checking whether alloca needs Cray hooks" >&5
+++echo "configure:3067: checking whether alloca needs Cray hooks" >&5
++ if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3073 "configure"
+++#line 3072 "configure"
++ #include "confdefs.h"
++ #if defined(CRAY) && ! defined(CRAY2)
++ webecray
++@@ -3094,12 +2999,12 @@
++ if test $ac_cv_os_cray = yes; then
++ for ac_func in _getb67 GETB67 getb67; do
++ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
++-echo "configure:3098: checking for $ac_func" >&5
+++echo "configure:3097: checking for $ac_func" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3103 "configure"
+++#line 3102 "configure"
++ #include "confdefs.h"
++ /* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func(); below. */
++@@ -3122,7 +3027,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:3126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:3125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_$ac_func=yes"
++ else
++@@ -3149,7 +3054,7 @@
++ fi
++
++ echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
++-echo "configure:3153: checking stack direction for C alloca" >&5
+++echo "configure:3152: checking stack direction for C alloca" >&5
++ if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -3157,7 +3062,7 @@
++ ac_cv_c_stack_direction=0
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3161 "configure"
+++#line 3160 "configure"
++ #include "confdefs.h"
++ find_stack_direction ()
++ {
++@@ -3176,7 +3081,7 @@
++ exit (find_stack_direction() < 0);
++ }
++ EOF
++-if { (eval echo configure:3180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+++if { (eval echo configure:3179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++ then
++ ac_cv_c_stack_direction=1
++ else
++@@ -3198,7 +3103,7 @@
++ fi
++
++ cat > conftest.$ac_ext <<EOF
++-#line 3202 "configure"
+++#line 3201 "configure"
++ #include "confdefs.h"
++ #include <utime.h>
++ EOF
++@@ -3216,12 +3121,12 @@
++ for ac_func in gettimeofday settimeofday
++ do
++ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
++-echo "configure:3220: checking for $ac_func" >&5
+++echo "configure:3219: checking for $ac_func" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3225 "configure"
+++#line 3224 "configure"
++ #include "confdefs.h"
++ /* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func(); below. */
++@@ -3244,7 +3149,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:3248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:3247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_$ac_func=yes"
++ else
++@@ -3271,12 +3176,12 @@
++ for ac_func in strchr memcpy select vprintf
++ do
++ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
++-echo "configure:3275: checking for $ac_func" >&5
+++echo "configure:3274: checking for $ac_func" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3280 "configure"
+++#line 3279 "configure"
++ #include "confdefs.h"
++ /* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func(); below. */
++@@ -3299,7 +3204,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:3303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:3302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_$ac_func=yes"
++ else
++@@ -3326,12 +3231,12 @@
++ for ac_func in times rdchk utime syslog siginterrupt
++ do
++ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
++-echo "configure:3330: checking for $ac_func" >&5
+++echo "configure:3329: checking for $ac_func" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3335 "configure"
+++#line 3334 "configure"
++ #include "confdefs.h"
++ /* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func(); below. */
++@@ -3354,7 +3259,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:3358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:3357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_$ac_func=yes"
++ else
++@@ -3381,12 +3286,12 @@
++ for ac_func in mkdir mktime strerror strstr strdup strtoul strtol strpbrk
++ do
++ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
++-echo "configure:3385: checking for $ac_func" >&5
+++echo "configure:3384: checking for $ac_func" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3390 "configure"
+++#line 3389 "configure"
++ #include "confdefs.h"
++ /* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func(); below. */
++@@ -3409,7 +3314,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:3413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:3412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_$ac_func=yes"
++ else
++@@ -3438,12 +3343,12 @@
++ for ac_func in stpcpy strftime vasprintf
++ do
++ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
++-echo "configure:3442: checking for $ac_func" >&5
+++echo "configure:3441: checking for $ac_func" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3447 "configure"
+++#line 3446 "configure"
++ #include "confdefs.h"
++ /* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func(); below. */
++@@ -3466,7 +3371,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:3470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:3469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_$ac_func=yes"
++ else
++@@ -3494,12 +3399,12 @@
++
++
++ echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
++-echo "configure:3498: checking for getopt_long" >&5
+++echo "configure:3497: checking for getopt_long" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3503 "configure"
+++#line 3502 "configure"
++ #include "confdefs.h"
++ /* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char getopt_long(); below. */
++@@ -3522,7 +3427,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:3526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:3525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_getopt_long=yes"
++ else
++@@ -3552,12 +3457,12 @@
++
++
++ echo $ac_n "checking for ftime""... $ac_c" 1>&6
++-echo "configure:3556: checking for ftime" >&5
+++echo "configure:3555: checking for ftime" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_ftime'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3561 "configure"
+++#line 3560 "configure"
++ #include "confdefs.h"
++ /* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char ftime(); below. */
++@@ -3580,7 +3485,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:3584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:3583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_ftime=yes"
++ else
++@@ -3595,7 +3500,7 @@
++ if eval "test \"`echo '$ac_cv_func_'ftime`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ echo $ac_n "checking that ftime works correctly""... $ac_c" 1>&6
++-echo "configure:3599: checking that ftime works correctly" >&5
+++echo "configure:3598: checking that ftime works correctly" >&5
++ if eval "test \"`echo '$''{'lrzsz_cv_sys_ftime_ok'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -3603,7 +3508,7 @@
++ lrzsz_cv_sys_ftime_ok=runtime
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3607 "configure"
+++#line 3606 "configure"
++ #include "confdefs.h"
++
++ #include <sys/types.h>
++@@ -3632,7 +3537,7 @@
++ }
++
++ EOF
++-if { (eval echo configure:3636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+++if { (eval echo configure:3635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++ then
++ lrzsz_cv_sys_ftime_ok=yes
++ else
++@@ -3666,20 +3571,20 @@
++
++
++ echo $ac_n "checking for timezone variable""... $ac_c" 1>&6
++-echo "configure:3670: checking for timezone variable" >&5
+++echo "configure:3669: checking for timezone variable" >&5
++ if eval "test \"`echo '$''{'libquark_cv_var_timezone'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++
++ cat > conftest.$ac_ext <<EOF
++-#line 3676 "configure"
+++#line 3675 "configure"
++ #include "confdefs.h"
++ #include <time.h>
++ int main() {
++ return(int)(timezone/2);
++ ; return 0; }
++ EOF
++-if { (eval echo configure:3683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:3682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ libquark_cv_var_timezone=yes
++ else
++@@ -3705,13 +3610,13 @@
++ :
++ else
++ echo $ac_n "checking for $lookup_facility""... $ac_c" 1>&6
++-echo "configure:3709: checking for $lookup_facility" >&5
+++echo "configure:3708: checking for $lookup_facility" >&5
++ if eval "test \"`echo '$''{'lrzsz_cv_lookup_facility'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++
++ cat > conftest.$ac_ext <<EOF
++-#line 3715 "configure"
+++#line 3714 "configure"
++ #include "confdefs.h"
++
++ #ifdef HAVE_SYSLOG_H
++@@ -3763,17 +3668,17 @@
++ do
++ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
++ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
++-echo "configure:3767: checking for $ac_hdr" >&5
+++echo "configure:3766: checking for $ac_hdr" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3772 "configure"
+++#line 3771 "configure"
++ #include "confdefs.h"
++ #include <$ac_hdr>
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:3777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:3776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ rm -rf conftest*
++@@ -3803,12 +3708,12 @@
++ strdup __argz_count __argz_stringify __argz_next
++ do
++ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
++-echo "configure:3807: checking for $ac_func" >&5
+++echo "configure:3806: checking for $ac_func" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3812 "configure"
+++#line 3811 "configure"
++ #include "confdefs.h"
++ /* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func(); below. */
++@@ -3831,7 +3736,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:3835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:3834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_$ac_func=yes"
++ else
++@@ -3860,12 +3765,12 @@
++ for ac_func in stpcpy
++ do
++ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
++-echo "configure:3864: checking for $ac_func" >&5
+++echo "configure:3863: checking for $ac_func" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3869 "configure"
+++#line 3868 "configure"
++ #include "confdefs.h"
++ /* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func(); below. */
++@@ -3888,7 +3793,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:3892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:3891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_$ac_func=yes"
++ else
++@@ -3922,19 +3827,19 @@
++
++ if test $ac_cv_header_locale_h = yes; then
++ echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
++-echo "configure:3926: checking for LC_MESSAGES" >&5
+++echo "configure:3925: checking for LC_MESSAGES" >&5
++ if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3931 "configure"
+++#line 3930 "configure"
++ #include "confdefs.h"
++ #include <locale.h>
++ int main() {
++ return LC_MESSAGES
++ ; return 0; }
++ EOF
++-if { (eval echo configure:3938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:3937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ am_cv_val_LC_MESSAGES=yes
++ else
++@@ -3955,7 +3860,7 @@
++ fi
++ fi
++ echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
++-echo "configure:3959: checking whether NLS is requested" >&5
+++echo "configure:3958: checking whether NLS is requested" >&5
++ # Check whether --enable-nls or --disable-nls was given.
++ if test "${enable_nls+set}" = set; then
++ enableval="$enable_nls"
++@@ -3975,7 +3880,7 @@
++ EOF
++
++ echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
++-echo "configure:3979: checking whether included gettext is requested" >&5
+++echo "configure:3978: checking whether included gettext is requested" >&5
++ # Check whether --with-included-gettext or --without-included-gettext was given.
++ if test "${with_included_gettext+set}" = set; then
++ withval="$with_included_gettext"
++@@ -3994,17 +3899,17 @@
++
++ ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
++ echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
++-echo "configure:3998: checking for libintl.h" >&5
+++echo "configure:3997: checking for libintl.h" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 4003 "configure"
+++#line 4002 "configure"
++ #include "confdefs.h"
++ #include <libintl.h>
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:4008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:4007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ rm -rf conftest*
++@@ -4021,19 +3926,19 @@
++ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
++-echo "configure:4025: checking for gettext in libc" >&5
+++echo "configure:4024: checking for gettext in libc" >&5
++ if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 4030 "configure"
+++#line 4029 "configure"
++ #include "confdefs.h"
++ #include <libintl.h>
++ int main() {
++ return (int) gettext ("")
++ ; return 0; }
++ EOF
++-if { (eval echo configure:4037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:4036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ gt_cv_func_gettext_libc=yes
++ else
++@@ -4049,7 +3954,7 @@
++
++ if test "$gt_cv_func_gettext_libc" != "yes"; then
++ echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
++-echo "configure:4053: checking for bindtextdomain in -lintl" >&5
+++echo "configure:4052: checking for bindtextdomain in -lintl" >&5
++ ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
++ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++@@ -4057,7 +3962,7 @@
++ ac_save_LIBS="$LIBS"
++ LIBS="-lintl $LIBS"
++ cat > conftest.$ac_ext <<EOF
++-#line 4061 "configure"
+++#line 4060 "configure"
++ #include "confdefs.h"
++ /* Override any gcc2 internal prototype to avoid an error. */
++ /* We use char because int might match the return type of a gcc2
++@@ -4068,7 +3973,7 @@
++ bindtextdomain()
++ ; return 0; }
++ EOF
++-if { (eval echo configure:4072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:4071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_lib_$ac_lib_var=yes"
++ else
++@@ -4084,12 +3989,12 @@
++ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
++-echo "configure:4088: checking for gettext in libintl" >&5
+++echo "configure:4087: checking for gettext in libintl" >&5
++ if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
++-echo "configure:4093: checking for gettext in -lintl" >&5
+++echo "configure:4092: checking for gettext in -lintl" >&5
++ ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
++ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++@@ -4097,7 +4002,7 @@
++ ac_save_LIBS="$LIBS"
++ LIBS="-lintl $LIBS"
++ cat > conftest.$ac_ext <<EOF
++-#line 4101 "configure"
+++#line 4100 "configure"
++ #include "confdefs.h"
++ /* Override any gcc2 internal prototype to avoid an error. */
++ /* We use char because int might match the return type of a gcc2
++@@ -4108,7 +4013,7 @@
++ gettext()
++ ; return 0; }
++ EOF
++-if { (eval echo configure:4112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:4111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_lib_$ac_lib_var=yes"
++ else
++@@ -4147,7 +4052,7 @@
++ # Extract the first word of "msgfmt", so it can be a program name with args.
++ set dummy msgfmt; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:4151: checking for $ac_word" >&5
+++echo "configure:4150: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -4181,12 +4086,12 @@
++ for ac_func in dcgettext
++ do
++ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
++-echo "configure:4185: checking for $ac_func" >&5
+++echo "configure:4184: checking for $ac_func" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 4190 "configure"
+++#line 4189 "configure"
++ #include "confdefs.h"
++ /* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func(); below. */
++@@ -4209,7 +4114,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:4213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:4212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_$ac_func=yes"
++ else
++@@ -4236,7 +4141,7 @@
++ # Extract the first word of "gmsgfmt", so it can be a program name with args.
++ set dummy gmsgfmt; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:4240: checking for $ac_word" >&5
+++echo "configure:4239: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -4272,7 +4177,7 @@
++ # Extract the first word of "xgettext", so it can be a program name with args.
++ set dummy xgettext; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:4276: checking for $ac_word" >&5
+++echo "configure:4275: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -4304,7 +4209,7 @@
++ fi
++
++ cat > conftest.$ac_ext <<EOF
++-#line 4308 "configure"
+++#line 4307 "configure"
++ #include "confdefs.h"
++
++ int main() {
++@@ -4312,7 +4217,7 @@
++ return _nl_msg_cat_cntr
++ ; return 0; }
++ EOF
++-if { (eval echo configure:4316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:4315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ CATOBJEXT=.gmo
++ DATADIRNAME=share
++@@ -4335,7 +4240,7 @@
++
++ if test "$CATOBJEXT" = "NONE"; then
++ echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
++-echo "configure:4339: checking whether catgets can be used" >&5
+++echo "configure:4338: checking whether catgets can be used" >&5
++ # Check whether --with-catgets or --without-catgets was given.
++ if test "${with_catgets+set}" = set; then
++ withval="$with_catgets"
++@@ -4348,7 +4253,7 @@
++
++ if test "$nls_cv_use_catgets" = "yes"; then
++ echo $ac_n "checking for main in -li""... $ac_c" 1>&6
++-echo "configure:4352: checking for main in -li" >&5
+++echo "configure:4351: checking for main in -li" >&5
++ ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
++ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++@@ -4356,14 +4261,14 @@
++ ac_save_LIBS="$LIBS"
++ LIBS="-li $LIBS"
++ cat > conftest.$ac_ext <<EOF
++-#line 4360 "configure"
+++#line 4359 "configure"
++ #include "confdefs.h"
++
++ int main() {
++ main()
++ ; return 0; }
++ EOF
++-if { (eval echo configure:4367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:4366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_lib_$ac_lib_var=yes"
++ else
++@@ -4391,12 +4296,12 @@
++ fi
++
++ echo $ac_n "checking for catgets""... $ac_c" 1>&6
++-echo "configure:4395: checking for catgets" >&5
+++echo "configure:4394: checking for catgets" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 4400 "configure"
+++#line 4399 "configure"
++ #include "confdefs.h"
++ /* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char catgets(); below. */
++@@ -4419,7 +4324,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:4423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:4422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_catgets=yes"
++ else
++@@ -4441,7 +4346,7 @@
++ # Extract the first word of "gencat", so it can be a program name with args.
++ set dummy gencat; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:4445: checking for $ac_word" >&5
+++echo "configure:4444: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -4477,7 +4382,7 @@
++ # Extract the first word of "gmsgfmt", so it can be a program name with args.
++ set dummy gmsgfmt; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:4481: checking for $ac_word" >&5
+++echo "configure:4480: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -4514,7 +4419,7 @@
++ # Extract the first word of "msgfmt", so it can be a program name with args.
++ set dummy msgfmt; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:4518: checking for $ac_word" >&5
+++echo "configure:4517: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -4549,7 +4454,7 @@
++ # Extract the first word of "xgettext", so it can be a program name with args.
++ set dummy xgettext; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:4553: checking for $ac_word" >&5
+++echo "configure:4552: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -4607,7 +4512,7 @@
++ # Extract the first word of "msgfmt", so it can be a program name with args.
++ set dummy msgfmt; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:4611: checking for $ac_word" >&5
+++echo "configure:4610: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -4641,7 +4546,7 @@
++ # Extract the first word of "gmsgfmt", so it can be a program name with args.
++ set dummy gmsgfmt; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:4645: checking for $ac_word" >&5
+++echo "configure:4644: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -4677,7 +4582,7 @@
++ # Extract the first word of "xgettext", so it can be a program name with args.
++ set dummy xgettext; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:4681: checking for $ac_word" >&5
+++echo "configure:4680: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -4770,7 +4675,7 @@
++ LINGUAS=
++ else
++ echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
++-echo "configure:4774: checking for catalogs to be installed" >&5
+++echo "configure:4773: checking for catalogs to be installed" >&5
++ NEW_LINGUAS=
++ for lang in ${LINGUAS=$ALL_LINGUAS}; do
++ case "$ALL_LINGUAS" in
++@@ -4798,17 +4703,17 @@
++ if test "$CATOBJEXT" = ".cat"; then
++ ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
++ echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
++-echo "configure:4802: checking for linux/version.h" >&5
+++echo "configure:4801: checking for linux/version.h" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 4807 "configure"
+++#line 4806 "configure"
++ #include "confdefs.h"
++ #include <linux/version.h>
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:4812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:4811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ rm -rf conftest*
++--- lrzsz-0.12.21.orig/lib/Makefile.in
+++++ lrzsz-0.12.21/lib/Makefile.in
++@@ -1,4 +1,4 @@
++-# Makefile.in generated automatically by automake 1.4a from Makefile.am
+++# Makefile.in generated automatically by automake 1.4 from Makefile.am
++
++ # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
++ # This Makefile.in is free software; the Free Software Foundation
++@@ -46,10 +46,9 @@
++ AUTOHEADER = @AUTOHEADER@
++
++ INSTALL = @INSTALL@
++-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+++INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
++ INSTALL_DATA = @INSTALL_DATA@
++ INSTALL_SCRIPT = @INSTALL_SCRIPT@
++-INSTALL_STRIP_FLAG =
++ transform = @program_transform_name@
++
++ NORMAL_INSTALL = :
++@@ -127,7 +126,7 @@
++
++ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
++
++-TAR = gtar
+++TAR = tar
++ GZIP_ENV = --best
++ DEP_FILES = .deps/alloca.P .deps/error.P .deps/getopt.P .deps/getopt1.P \
++ .deps/long-options.P .deps/mkdir.P .deps/mktime.P .deps/stpcpy.P \
++@@ -282,7 +281,7 @@
++ @for file in $(DISTFILES); do \
++ d=$(srcdir); \
++ if test -d $$d/$$file; then \
++- cp -pr $$d/$$file $(distdir)/$$file; \
+++ cp -pr $$/$$file $(distdir)/$$file; \
++ else \
++ test -f $(distdir)/$$file \
++ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
++@@ -343,7 +342,7 @@
++ all-am: Makefile $(ANSI2KNR) $(LIBRARIES) $(HEADERS)
++ all-redirect: all-am
++ install-strip:
++- $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
+++ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
++ installdirs:
++
++
++--- lrzsz-0.12.21.orig/man/Makefile.in
+++++ lrzsz-0.12.21/man/Makefile.in
++@@ -1,4 +1,4 @@
++-# Makefile.in generated automatically by automake 1.4a from Makefile.am
+++# Makefile.in generated automatically by automake 1.4 from Makefile.am
++
++ # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
++ # This Makefile.in is free software; the Free Software Foundation
++@@ -46,10 +46,9 @@
++ AUTOHEADER = @AUTOHEADER@
++
++ INSTALL = @INSTALL@
++-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+++INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
++ INSTALL_DATA = @INSTALL_DATA@
++ INSTALL_SCRIPT = @INSTALL_SCRIPT@
++-INSTALL_STRIP_FLAG =
++ transform = @program_transform_name@
++
++ NORMAL_INSTALL = :
++@@ -106,7 +105,7 @@
++
++ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
++
++-TAR = gtar
+++TAR = tar
++ GZIP_ENV = --best
++ all: all-redirect
++ .SUFFIXES:
++@@ -173,7 +172,7 @@
++ @for file in $(DISTFILES); do \
++ d=$(srcdir); \
++ if test -d $$d/$$file; then \
++- cp -pr $$d/$$file $(distdir)/$$file; \
+++ cp -pr $$/$$file $(distdir)/$$file; \
++ else \
++ test -f $(distdir)/$$file \
++ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
++@@ -202,7 +201,7 @@
++ all-am: Makefile $(MANS)
++ all-redirect: all-am
++ install-strip:
++- $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
+++ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
++ installdirs:
++ $(mkinstalldirs) $(DESTDIR)$(mandir)/man1
++
++--- lrzsz-0.12.21.orig/src/Makefile.in
+++++ lrzsz-0.12.21/src/Makefile.in
++@@ -1,4 +1,4 @@
++-# Makefile.in generated automatically by automake 1.4a from Makefile.am
+++# Makefile.in generated automatically by automake 1.4 from Makefile.am
++
++ # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
++ # This Makefile.in is free software; the Free Software Foundation
++@@ -45,10 +45,9 @@
++ AUTOHEADER = @AUTOHEADER@
++
++ INSTALL = @INSTALL@
++-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+++INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
++ INSTALL_DATA = @INSTALL_DATA@
++ INSTALL_SCRIPT = @INSTALL_SCRIPT@
++-INSTALL_STRIP_FLAG =
++ transform = @program_transform_name@
++
++ NORMAL_INSTALL = :
++@@ -132,7 +131,7 @@
++
++ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
++
++-TAR = gtar
+++TAR = tar
++ GZIP_ENV = --best
++ DEP_FILES = .deps/canit.P .deps/crctab.P .deps/lrz.P .deps/lsyslog.P \
++ .deps/lsz.P .deps/protname.P .deps/rbsb.P .deps/tcp.P .deps/timing.P \
++@@ -167,8 +166,8 @@
++ $(mkinstalldirs) $(DESTDIR)$(bindir)
++ @list='$(bin_PROGRAMS)'; for p in $$list; do \
++ if test -f $$p; then \
++- echo " $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
++- $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+++ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+++ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
++ else :; fi; \
++ done
++
++@@ -292,7 +291,7 @@
++ @for file in $(DISTFILES); do \
++ d=$(srcdir); \
++ if test -d $$d/$$file; then \
++- cp -pr $$d/$$file $(distdir)/$$file; \
+++ cp -pr $$/$$file $(distdir)/$$file; \
++ else \
++ test -f $(distdir)/$$file \
++ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
++@@ -353,7 +352,7 @@
++ all-am: Makefile $(ANSI2KNR) $(PROGRAMS) $(HEADERS)
++ all-redirect: all-am
++ install-strip:
++- $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
+++ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
++ installdirs:
++ $(mkinstalldirs) $(DESTDIR)$(bindir)
++
++--- lrzsz-0.12.21.orig/testsuite/Makefile.in
+++++ lrzsz-0.12.21/testsuite/Makefile.in
++@@ -1,4 +1,4 @@
++-# Makefile.in generated automatically by automake 1.4a from Makefile.am
+++# Makefile.in generated automatically by automake 1.4 from Makefile.am
++
++ # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
++ # This Makefile.in is free software; the Free Software Foundation
++@@ -46,10 +46,9 @@
++ AUTOHEADER = @AUTOHEADER@
++
++ INSTALL = @INSTALL@
++-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+++INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
++ INSTALL_DATA = @INSTALL_DATA@
++ INSTALL_SCRIPT = @INSTALL_SCRIPT@
++-INSTALL_STRIP_FLAG =
++ transform = @program_transform_name@
++
++ NORMAL_INSTALL = :
++@@ -103,7 +102,7 @@
++ DIST_COMMON = Makefile.am Makefile.in
++
++
++-TAR = gtar
+++TAR = tar
++ GZIP_ENV = --best
++ EXPECT = expect
++ RUNTEST = runtest
++@@ -133,7 +132,7 @@
++ @for file in $(DISTFILES); do \
++ d=$(srcdir); \
++ if test -d $$d/$$file; then \
++- cp -pr $$d/$$file $(distdir)/$$file; \
+++ cp -pr $$/$$file $(distdir)/$$file; \
++ else \
++ test -f $(distdir)/$$file \
++ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
++@@ -192,7 +191,7 @@
++ all-am: Makefile
++ all-redirect: all-am
++ install-strip:
++- $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
+++ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
++ installdirs:
++
++
+--- lrzsz-0.12.21.orig/debian/patches/cat-id-tbl.diff
++++ lrzsz-0.12.21/debian/patches/cat-id-tbl.diff
+@@ -0,0 +1,118 @@
++--- lrzsz-0.12.21.orig/po/cat-id-tbl.c
+++++ lrzsz-0.12.21/po/cat-id-tbl.c
++@@ -141,22 +141,23 @@
++ {"\
++ \n\
++ countem: Total %d %ld\n", 84},
++- {"Bad escape sequence %x", 85},
++- {"Sender Canceled", 86},
++- {"TIMEOUT", 87},
++- {"Bad data subpacket", 88},
++- {"Data subpacket too long", 89},
++- {"Garbage count exceeded", 90},
++- {"Got %s", 91},
++- {"Retry %d: ", 92},
++- {"don't have settimeofday, will not set time\n", 93},
++- {"not running as root (this is good!), can not set time\n", 94},
++- {"bytes_per_error", 95},
++- {"bytes-per-error should be >100", 96},
++- {"O_SYNC not supported by the kernel", 97},
++- {"garbage on commandline", 98},
++- {"Usage: %s [options] [filename.if.xmodem]\n", 99},
++- {"Receive files with ZMODEM/YMODEM/XMODEM protocol\n", 100},
+++ {"Bad CRC", 85},
+++ {"Bad escape sequence %x", 86},
+++ {"Sender Canceled", 87},
+++ {"TIMEOUT", 88},
+++ {"Bad data subpacket", 89},
+++ {"Data subpacket too long", 90},
+++ {"Garbage count exceeded", 91},
+++ {"Got %s", 92},
+++ {"Retry %d: ", 93},
+++ {"don't have settimeofday, will not set time\n", 94},
+++ {"not running as root (this is good!), can not set time\n", 95},
+++ {"bytes_per_error", 96},
+++ {"bytes-per-error should be >100", 97},
+++ {"O_SYNC not supported by the kernel", 98},
+++ {"garbage on commandline", 99},
+++ {"Usage: %s [options] [filename.if.xmodem]\n", 100},
+++ {"Receive files with ZMODEM/YMODEM/XMODEM protocol\n", 101},
++ {"\
++ -+, --append append to existing files\n\
++ -a, --ascii ASCII transfer (change CR/LF to LF)\n\
++@@ -193,41 +194,41 @@
++ --ymodem use YMODEM protocol\n\
++ -Z, --zmodem use ZMODEM protocol\n\
++ \n\
++-short options use the same arguments as the long ones\n", 101},
++- {"%s waiting to receive.", 102},
++- {"\rBytes received: %7ld/%7ld BPS:%-6ld \r\n", 103},
++- {"%s: ready to receive %s", 104},
++- {"\rBytes received: %7ld BPS:%-6ld \r\n", 105},
+++short options use the same arguments as the long ones\n", 102},
+++ {"%s waiting to receive.", 103},
+++ {"\rBytes received: %7ld/%7ld BPS:%-6ld \r\n", 104},
+++ {"%s: ready to receive %s", 105},
+++ {"\rBytes received: %7ld BPS:%-6ld \r\n", 106},
++ {"\
++ \r\n\
++-%s: %s removed.\r\n", 106},
++- {"Pathname fetch returned EOT", 107},
++- {"Received dup Sector", 108},
++- {"Sync Error", 109},
++- {"CRC", 110},
++- {"Checksum", 111},
++- {"Sector number garbled", 112},
++- {"Sender Cancelled", 113},
++- {"Got 0%o sector header", 114},
++- {"file name ends with a /, skipped: %s\n", 115},
++- {"zmanag=%d, Lzmanag=%d\n", 116},
++- {"zconv=%d\n", 117},
++- {"file exists, skipped: %s\n", 118},
++- {"TIMESYNC: here %ld, remote %ld, diff %ld seconds\n", 119},
++- {"TIMESYNC: cannot set time: %s\n", 120},
++- {"Topipe", 121},
++- {"Receiving: %s\n", 122},
++- {"Blocks received: %d", 123},
++- {"%s: %s exists\n", 124},
++- {"%s:\tSecurity Violation", 125},
++- {"remote command execution requested", 126},
++- {"not executed", 127},
++- {"got ZRINIT", 128},
++- {"Skipped", 129},
++- {"rzfile: bps rate %ld below min %ld", 130},
++- {"rzfile: reached stop time", 131},
++- {"\rBytes received: %7ld/%7ld BPS:%-6ld ETA %02d:%02d ", 132},
++- {"file close error", 133},
+++%s: %s removed.\r\n", 107},
+++ {"Pathname fetch returned EOT", 108},
+++ {"Received dup Sector", 109},
+++ {"Sync Error", 110},
+++ {"CRC", 111},
+++ {"Checksum", 112},
+++ {"Sector number garbled", 113},
+++ {"Sender Cancelled", 114},
+++ {"Got 0%o sector header", 115},
+++ {"file name ends with a /, skipped: %s\n", 116},
+++ {"zmanag=%d, Lzmanag=%d\n", 117},
+++ {"zconv=%d\n", 118},
+++ {"file exists, skipped: %s\n", 119},
+++ {"TIMESYNC: here %ld, remote %ld, diff %ld seconds\n", 120},
+++ {"TIMESYNC: cannot set time: %s\n", 121},
+++ {"Topipe", 122},
+++ {"Receiving: %s\n", 123},
+++ {"Blocks received: %d", 124},
+++ {"%s: %s exists\n", 125},
+++ {"%s:\tSecurity Violation", 126},
+++ {"remote command execution requested", 127},
+++ {"not executed", 128},
+++ {"got ZRINIT", 129},
+++ {"Skipped", 130},
+++ {"rzfile: bps rate %ld below min %ld", 131},
+++ {"rzfile: reached stop time", 132},
+++ {"\rBytes received: %7ld/%7ld BPS:%-6ld ETA %02d:%02d ", 133},
+++ {"file close error", 134},
++ };
++
++-int _msg_tbl_length = 133;
+++int _msg_tbl_length = 134;
+--- lrzsz-0.12.21.orig/debian/patches/206499_ymodemg.diff.unchecked
++++ lrzsz-0.12.21/debian/patches/206499_ymodemg.diff.unchecked
+@@ -0,0 +1,70 @@
++--- org/lrz.c 1998-12-29 23:49:24.000000000 -0800
+++++ lrz.c 2003-08-21 15:15:15.000000000 -0700
++@@ -73,6 +73,7 @@
++
++ int Lastrx;
++ int Crcflg;
+++int Optiong;
++ int Firstsec;
++ int errors;
++ int Restricted=1; /* restricted; no /.. or ../ in filenames */
++@@ -211,6 +212,7 @@
++ {"allow-remote-commands", no_argument, NULL, 'C'},
++ {"escape", no_argument, NULL, 'e'},
++ {"rename", no_argument, NULL, 'E'},
+++ {"go", no_argument, NULL, 'g'},
++ {"help", no_argument, NULL, 'h'},
++ {"crc-check", no_argument, NULL, 'H'},
++ {"junk-path", no_argument, NULL, 'j'},
++@@ -288,7 +290,7 @@
++ parse_long_options (argc, argv, show_version, usage1);
++
++ while ((c = getopt_long (argc, argv,
++- "a+bB:cCDeEhm:M:OprRqs:St:uUvw:XZy",
+++ "a+bB:cCDeEghm:M:OprRqs:St:uUvw:XZy",
++ long_options, (int *) 0)) != EOF)
++ {
++ unsigned long int tmp;
++@@ -313,6 +315,7 @@
++ case 'D': Nflag = TRUE; break;
++ case 'E': Lzmanag = ZF1_ZMCHNG; break;
++ case 'e': Zctlesc = 1; break;
+++ case 'g': Optiong = 1; break;
++ case 'h': usage(0,NULL); break;
++ case 'H': Lzmanag= ZF1_ZMCRC; break;
++ case 'j': junk_path=TRUE; break;
++@@ -617,6 +620,7 @@
++ " -e, --escape Escape control characters (Z)\n"
++ " -E, --rename rename any files already existing\n"
++ " --errors N generate CRC error every N bytes (debugging)\n"
+++" -g, --go use X/YMODEM-g protocol (with CRC)\n"
++ " -h, --help Help, print this usage message\n"
++ " -m, --min-bps N stop transmission if BPS below N\n"
++ " -M, --min-bps-time N for at least N seconds (default: 120)\n"
++@@ -843,7 +847,7 @@
++ et_tu:
++ Firstsec=TRUE;
++ zi->eof_seen=FALSE;
++- sendline(Crcflg?WANTCRC:NAK);
+++ sendline(Optiong?WANTG:(Crcflg?WANTCRC:NAK));
++ flushmo();
++ purgeline(0); /* Do read next time ... */
++ while ((c = wcgetsec(&Blklen, rpn, 100)) != 0) {
++@@ -875,7 +879,7 @@
++
++ Firstsec=TRUE;sectnum=0;
++ zi->eof_seen=FALSE;
++- sendchar=Crcflg?WANTCRC:NAK;
+++ sendchar=(Optiong?WANTG:(Crcflg?WANTCRC:NAK));
++
++ for (;;) {
++ sendline(sendchar); /* send it now, we're ready! */
++@@ -1007,7 +1011,7 @@
++ ;
++ }
++ if (Firstsec) {
++- sendline(Crcflg?WANTCRC:NAK);
+++ sendline(Optiong?WANTG:(Crcflg?WANTCRC:NAK));
++ flushmo();
++ purgeline(0); /* Do read next time ... */
++ } else {
+--- lrzsz-0.12.21.orig/debian/patches/313992_de_po.diff
++++ lrzsz-0.12.21/debian/patches/313992_de_po.diff
+@@ -0,0 +1,650 @@
++--- lrzsz-0.12.21.orig/po/de.po
+++++ lrzsz-0.12.21/po/de.po
++@@ -1,17 +1,18 @@
++-# german translation of lrzsz output
++-# Copyright (C) 1997 Uwe Ohse
++-# Uwe Ohse <uwe@ohse.de>, 1997.
+++# German translation of lrzsz
+++# Copyright (C) Uwe Ohse <uwe@ohse.de>, 1997.
+++# Copyright (C) Tobias Toedter <t.toedter@gmx.net>, 2005, 2006.
++ #
++ msgid ""
++ msgstr ""
++-"Project-Id-Version: PACKAGE VERSION\n"
+++"Project-Id-Version: lrzsz 0.12.21\n"
++ "POT-Creation-Date: 1999-08-22 21:00+0200\n"
++-"PO-Revision-Date: 1997-06-01 19:00+0200\n"
++-"Last-Translator: FULL NAME <uwe@ohse.de>\n"
++-"Language-Team: none. try <uwe@ohse.de>\n"
+++"PO-Revision-Date: 2006-01-12 10:23+0100\n"
+++"Last-Translator: Tobias Toedter <t.toedter@gmx.net>\n"
+++"Language-Team: German <debian-l10n-german@lists.debian.org>\n"
++ "MIME-Version: 1.0\n"
++-"Content-Type: text/plain; charset=iso-8859-1\n"
+++"Content-Type: text/plain; charset=UTF-8\n"
++ "Content-Transfer-Encoding: 8bit\n"
+++"X-Generator: KBabel 1.10.2\n"
++
++ #: src/lsz.c:228
++ msgid "io_mode(,2) in rbsb.c not implemented\n"
++@@ -28,21 +29,21 @@
++
++ #: src/lsz.c:422
++ msgid "packetlength"
++-msgstr "Paketl?nge"
+++msgstr "Paketlänge"
++
++ #: src/lsz.c:427
++ #, c-format
++ msgid "packetlength out of range 24..%ld"
++-msgstr "Argument der Option L au?erhalb des Bereichs 24..%ld"
+++msgstr "Argument der Option L außerhalb des Bereichs 24..%ld"
++
++ #: src/lsz.c:436
++ msgid "framelength"
++-msgstr "Framel?nge"
+++msgstr "Framelänge"
++
++ #: src/lsz.c:441
++ #, c-format
++ msgid "framelength out of range 32..%ld"
++-msgstr "Argument der Option l au?erhalb des Bereichs 32..%ld"
+++msgstr "Argument der Option l außerhalb des Bereichs 32..%ld"
++
++ #: src/lrz.c:318 src/lsz.c:450
++ msgid "min_bps"
++@@ -50,27 +51,27 @@
++
++ #: src/lsz.c:452
++ msgid "min_bps must be >= 0"
++-msgstr "minimale BPS-Rate mu? >= 0 sein"
+++msgstr "minimale BPS-Rate muss >= 0 sein"
++
++ #: src/lrz.c:324 src/lsz.c:458
++ msgid "min_bps_time"
++-msgstr ""
+++msgstr "Zeitfenster für minimale BPS-Rate"
++
++ #: src/lrz.c:326 src/lsz.c:460
++ msgid "min_bps_time must be > 1"
++-msgstr "Zeitfenster f?r minimale BPS-Rate mu? > 1 Sekunde sein"
+++msgstr "Zeitfenster für minimale BPS-Rate muss > 1 Sekunde sein"
++
++ #: src/lrz.c:342 src/lsz.c:484
++ msgid "hour to large (0..23)"
++-msgstr "Stunde zu gross (0..23)"
+++msgstr "Stunde zu groß (0..23)"
++
++ #: src/lrz.c:344 src/lsz.c:486
++ msgid "unparsable stop time\n"
++-msgstr "unparsbare Endzeit\n"
+++msgstr "Endzeit nicht auszuwerten\n"
++
++ #: src/lrz.c:348 src/lsz.c:490
++ msgid "minute to large (0..59)"
++-msgstr "Minute zu gro? (0..59)"
+++msgstr "Minute zu groß (0..59)"
++
++ #: src/lrz.c:358 src/lrz.c:365 src/lsz.c:500 src/lsz.c:507
++ msgid "stop time to small"
++@@ -78,7 +79,7 @@
++
++ #: src/lrz.c:363 src/lsz.c:505
++ msgid "stop-at"
++-msgstr ""
+++msgstr "Stopp um"
++
++ #: src/lrz.c:394 src/lsz.c:516
++ msgid "timeout"
++@@ -86,15 +87,15 @@
++
++ #: src/lrz.c:396 src/lsz.c:518
++ msgid "timeout out of range 10..1000"
++-msgstr "Argument der Option t au?erhalb des Bereichs 10..1000"
+++msgstr "Argument der Option t außerhalb des Bereichs 10..1000"
++
++ #: src/lrz.c:412 src/lsz.c:526
++ msgid "security violation: can't do that under restricted shell\n"
++-msgstr "Sicherheitsversto?: Ausf?hrung unter eingeschr?nkter Shell verboten\n"
+++msgstr "Sicherheitsverstoß: Ausführung unter eingeschränkter Shell verboten\n"
++
++ #: src/lrz.c:402 src/lsz.c:533
++ msgid "window size"
++-msgstr "Fenstergr??e"
+++msgstr "Fenstergröße"
++
++ #: src/lrz.c:427 src/lrz.c:434 src/lsz.c:556 src/lsz.c:563
++ msgid "cannot turnoff syslog"
++@@ -102,7 +103,7 @@
++
++ #: src/lrz.c:449 src/lsz.c:571
++ msgid "startup delay"
++-msgstr "Startverz?gerung"
+++msgstr "Startverzögerung"
++
++ #: src/lrz.c:465 src/lrz.c:483 src/lrz.c:760 src/lrz.c:1122 src/lrz.c:1244
++ #: src/lrz.c:1292 src/lrz.c:1309 src/lrz.c:1324 src/lrz.c:1423 src/lsz.c:580
++@@ -117,11 +118,11 @@
++
++ #: src/lsz.c:612 src/lsz.c:627
++ msgid "need at least one file to send"
++-msgstr "es mu? mindestens ein Name einer zu sendenden Datei angegeben werden"
+++msgstr "es muss mindestens ein Name einer zu sendenden Datei angegeben werden"
++
++ #: src/lsz.c:629
++ msgid "Can't send command in restricted mode\n"
++-msgstr "Im eingeschr?nkten Modus ist das Senden von Kommandos verboten\n"
+++msgstr "Im eingeschränkten Modus ist das Senden von Kommandos verboten\n"
++
++ #: src/lrz.c:527 src/lsz.c:656
++ msgid "hostname too long\n"
++@@ -129,7 +130,7 @@
++
++ #: src/lrz.c:542 src/lsz.c:671
++ msgid "illegal server address\n"
++-msgstr "Illegale Serveraddresse\n"
+++msgstr "Illegale Serveradresse\n"
++
++ #: src/lsz.c:710
++ msgid "can read only one file from stdin"
++@@ -137,21 +138,21 @@
++
++ #: src/lrz.c:574 src/lsz.c:803
++ msgid "Transfer incomplete\n"
++-msgstr "?bertragung nicht abgeschlossen\n"
+++msgstr "Ãœbertragung nicht abgeschlossen\n"
++
++ #: src/lrz.c:576 src/lsz.c:805
++ msgid "Transfer complete\n"
++-msgstr "?bertragung abgeschlossen\n"
+++msgstr "Ãœbertragung abgeschlossen\n"
++
++ #: src/lsz.c:838
++ #, c-format
++ msgid "send_pseudo %s: cannot open tmpfile %s: %s"
++-msgstr "send_pseudo %s: kann tempor?re Datei %s nicht ?ffnen: %s"
+++msgstr "send_pseudo %s: kann temporäre Datei %s nicht öffnen: %s"
++
++ #: src/lsz.c:851
++ #, c-format
++ msgid "send_pseudo %s: cannot lstat tmpfile %s: %s"
++-msgstr "send_pseudo %s: kann lstat nicht auf tempor?re Datei %s anwenden: %s"
+++msgstr "send_pseudo %s: kann lstat nicht auf temporäre Datei %s anwenden: %s"
++
++ #: src/lsz.c:859
++ #, c-format
++@@ -161,7 +162,7 @@
++ #: src/lsz.c:870
++ #, c-format
++ msgid "send_pseudo %s: cannot write to tmpfile %s: %s"
++-msgstr "send_pseudo %s: kann nicht in tempor?re Datei %s schreiben: %s"
+++msgstr "send_pseudo %s: kann nicht in temporäre Datei %s schreiben: %s"
++
++ #: src/lsz.c:879
++ #, c-format
++@@ -188,17 +189,17 @@
++
++ #: src/lsz.c:953
++ msgid "Can't open any requested files."
++-msgstr "Kann keine der angeforderten Dateien ?ffnen"
+++msgstr "Kann keine der angeforderten Dateien öffnen"
++
++ #: src/lsz.c:1009
++ #, c-format
++ msgid "security violation: not allowed to upload from %s"
++-msgstr "Sicherheitsversto?: Ausf?hrung unter eingeschr?nkter Shell verboten"
+++msgstr "Sicherheitsverstoß: Hochladen von %s nicht erlaubt"
++
++ #: src/lrz.c:1384 src/lsz.c:1027
++ #, c-format
++ msgid "cannot open %s"
++-msgstr "kann %s nicht ?ffnen"
+++msgstr "kann %s nicht öffnen"
++
++ #: src/lsz.c:1082
++ #, c-format
++@@ -213,12 +214,12 @@
++ #: src/lsz.c:1119
++ #, c-format
++ msgid "skipped: %s"
++-msgstr "?bersprungen: %s"
+++msgstr "übersprungen: %s"
++
++ #: src/lsz.c:1122
++ #, c-format
++ msgid "%s/%s: skipped"
++-msgstr "%s/%s: ?bersprungen"
+++msgstr "%s/%s: übersprungen"
++
++ #: src/lsz.c:1149
++ #, c-format
++@@ -228,7 +229,7 @@
++ #: src/lsz.c:1178
++ #, c-format
++ msgid "Sending %s, %ld blocks: "
++-msgstr "Sende %s, %ld Bl?cke:"
+++msgstr "Sende %s, %ld Blöcke:"
++
++ #: src/lsz.c:1181
++ msgid "Give your local XMODEM receive command now."
++@@ -245,11 +246,11 @@
++
++ #: src/lsz.c:1314
++ msgid "Receiver Cancelled"
++-msgstr "Empf?nger brach ab"
+++msgstr "Empfänger brach ab"
++
++ #: src/lsz.c:1340
++ msgid "No ACK on EOT"
++-msgstr "Keine Best?tigung f?r ?bertragungsende erhalten"
+++msgstr "Keine Bestätigung für Übertragungsende erhalten"
++
++ #: src/lsz.c:1361
++ #, c-format
++@@ -267,24 +268,24 @@
++
++ #: src/lsz.c:1399
++ msgid "Timeout on sector ACK"
++-msgstr "Timeout bei Sektorbest?tigung"
+++msgstr "Timeout bei Sektorbestätigung"
++
++ #: src/lsz.c:1404
++ msgid "NAK on sector"
++-msgstr "Sektor nicht best?tigt"
+++msgstr "Sektor nicht bestätigt"
++
++ #: src/lsz.c:1410
++ msgid "Got burst for sector ACK"
++-msgstr ""
+++msgstr "Erhielt Bruch als Sektorbestätigung"
++
++ #: src/lsz.c:1412
++ #, c-format
++ msgid "Got %02x for sector ACK"
++-msgstr "Erhielt %02x als Sektorbest?tigung"
+++msgstr "Erhielt %02x als Sektorbestätigung"
++
++ #: src/lsz.c:1424
++ msgid "Retry Count Exceeded"
++-msgstr "Maximale Wiederholungsanzahl ?berschritten"
+++msgstr "Maximale Wiederholungsanzahl überschritten"
++
++ #: src/lrz.c:596 src/lsz.c:1502
++ #, c-format
++@@ -304,11 +305,11 @@
++ #: src/lsz.c:1512
++ #, c-format
++ msgid " or: %s [options] -{c|i} COMMAND\n"
++-msgstr " oder: %s [Optionen] -{c|i} KOMMANDO\n"
+++msgstr " oder: %s [-2Ceqv] -{c|i} KOMMANDO\n"
++
++ #: src/lsz.c:1513
++ msgid "Send file(s) with ZMODEM/YMODEM/XMODEM protocol\n"
++-msgstr "Dateien mit ZMODEM/YMODEM/XMODEM ?bertragen\n"
+++msgstr "Dateien mit ZMODEM/YMODEM/XMODEM übertragen\n"
++
++ # src/lrz.c:475 src/lsz.c:1330 xx
++ #: src/lrz.c:607 src/lsz.c:1515
++@@ -317,9 +318,9 @@
++ " (Y) = option applies to YMODEM only\n"
++ " (Z) = option applies to ZMODEM only\n"
++ msgstr ""
++-" (X) = Option gilt nur f?r XMODEM\n"
++-" (Y) = Option gilt nur f?r YMODEM\n"
++-" (Z) = Option gilt nur f?r ZMODEM\n"
+++" (X) = Option gilt nur für XMODEM\n"
+++" (Y) = Option gilt nur für YMODEM\n"
+++" (Z) = Option gilt nur für ZMODEM\n"
++
++ #: src/lsz.c:1521
++ msgid ""
++@@ -347,32 +348,32 @@
++ " -m, --min-bps N stop transmission if BPS below N\n"
++ " -M, --min-bps-time N for at least N seconds (default: 120)\n"
++ msgstr ""
++-" -+, --append an existierende Dateien anh?ngen (Z)\n"
+++" -+, --append an existierende Dateien anhängen (Z)\n"
++ " -2, --twostop zwei Stopbits verwenden\n"
++-" -4, --try-4k bis zu 4K Blockgr??e verwenden\n"
++-" --start-4k mit 4K Blockgr??e starten (versucht nicht 8)\n"
++-" -8, --try-8k bis zu 8K Blockgr??e verwenden\n"
++-" --start-8k mit 8K Blockgr??e starten\n"
+++" -4, --try-4k bis zu 4K Blockgröße verwenden\n"
+++" --start-4k mit 4K Blockgröße starten (versucht nicht 8)\n"
+++" -8, --try-8k bis zu 8K Blockgröße verwenden\n"
+++" --start-8k mit 8K Blockgröße starten\n"
++ " -a, --ascii ASCII: NL nach CR/LF wandeln\n"
++-" -b, --binary Bin?r?bertragung erzwingen\n"
+++" -b, --binary Binärübertragung erzwingen\n"
++ " -B, --bufsize N N Bytes puffern (auto: ganze Datei puffern)\n"
++-" -c, --command COMMAND Kommando KOMMANDO auf Gegenseite ausf?hren "
+++" -c, --command COMMAND Kommando KOMMANDO auf Gegenseite ausführen "
++ "(Z)\n"
++-" -C, --command-tries N N mal Kommandoausf?hrung versuchen (Z)\n"
+++" -C, --command-tries N N mal Kommandoausführung versuchen (Z)\n"
++ " -d, --dot-to-slash C '.' in Dateinamen nach '/' wandeln (Y/Z)\n"
++ " --delay-startup N Bei Programmstart N Sek. schlafen (Debugging)\n"
++ " -e, --escape alle Steuerzeichen escapen (Z)\n"
++-" -E, --rename Empf?nger soll Datei umbenennen falls\n"
+++" -E, --rename Empfänger soll Datei umbenennen falls\n"
++ " Zieldatei schon existiert\n"
++ " -f, --full-path Dateien mit vollen Pfaden senden (Y/Z)\n"
++-" -i, --immediate-command CMD wie `c', aber sofort zur?ckkehren (Z)\n"
+++" -i, --immediate-command CMD wie `c', aber sofort zurückkehren (Z)\n"
++ " -h, --help diesen Hilfetext ausgeben\n"
++ " -k, --1k 1024 Bytes Pakete senden (Y)\n"
++-" -L, --packetlen N Unterpaketl?nge auf N Bytes beschr?nken (Z)\n"
++-" -l, --framelen N Rahmenl?nge auf N Bytes beschr?nken (l>=L) "
+++" -L, --packetlen N Unterpaketlänge auf N Bytes beschränken (Z)\n"
+++" -l, --framelen N Rahmenlänge auf N Bytes beschränken (l>=L) "
++ "(Z)\n"
++-" -m, --min-bps N ?bertragung abbrechen bei weniger als N BPS\n"
++-" -M, --min-bps-time N f?r mindestens N Sekunden (Default: 120)\n"
+++" -m, --min-bps N Ãœbertragung abbrechen bei weniger als N BPS\n"
+++" -M, --min-bps-time N für mindestens N Sekunden (Default: 120)\n"
++
++ #: src/lsz.c:1546
++ msgid ""
++@@ -400,28 +401,28 @@
++ "short options use the same arguments as the long ones\n"
++ msgstr ""
++ " -n, --newer Datei senden wenn sie neuer ist (Z)\n"
++-" -N, --newer-or-longer Datei senden wenn neuer oder l?nger (Z)\n"
+++" -N, --newer-or-longer Datei senden wenn neuer oder länger (Z)\n"
++ " -o, --16-bit-crc 16Bit CRC statt 32Bit CRC verwenden (Z)\n"
++ " -O, --disable-timeouts Timeoutbehandlung abschalten\n"
++-" -p, --protect existierende Dateien nicht ver?ndern\n"
++-" -r, --resume unterbrochene ?bertragungen fortsetzen (Z)\n"
++-" -R, --restricted eingeschr?nkter, sichererer Modus\n"
+++" -p, --protect existierende Dateien nicht verändern\n"
+++" -r, --resume unterbrochene Ãœbertragungen fortsetzen (Z)\n"
+++" -R, --restricted eingeschränkter, sichererer Modus\n"
++ " -q, --quiet leise, keine Ausgaben machen\n"
++-" -s, --stop-at {HH:MM|+N} ?bertragung um HH:MM oder in N Sek. abbrechen\n"
++-" --tcp-server Socket ?ffnen und auf Verbindung warten\n"
++-" --tcp-client ADDR:PORT Socket ?ffnen und verbindung mit ...\n"
++-" -u, --unlink Datei nach ?bertragung l?schen\n"
++-" -U, --unrestrict eingeschr?nkten Modus aufheben (falls "
+++" -s, --stop-at {HH:MM|+N} Ãœbertragung um HH:MM oder in N Sek. abbrechen\n"
+++" --tcp-server Socket öffnen, Verbindung abwarten (Z)\n"
+++" --tcp-client ADDR:PORT Socket öffnen, verbinden mit ... (Z)\n"
+++" -u, --unlink Datei nach Übertragung löschen\n"
+++" -U, --unrestrict eingeschränkten Modus aufheben (falls "
++ "erlaubt)\n"
++ " -v, --verbose mehr ausgeben\n"
++-" -w, --windowsize N Fenstergr??e auf N Bytes setzen (Z)\n"
+++" -w, --windowsize N Fenstergröße auf N Bytes setzen (Z)\n"
++ " -X --xmodem XMODEM-Protokoll benutzen\n"
++-" -y, --overwrite existierende Dateien ?berschreiben\n"
++-" -Y, --overwrite-or-skip wie `y', aber nicht existierende ?berspringen\n"
+++" -y, --overwrite existierende Dateien überschreiben\n"
+++" -Y, --overwrite-or-skip wie `y', aber nicht existierende überspringen\n"
++ " --ymodem YMODEM-Protokoll benutzen\n"
++ " -Z, --zmodem ZMODEM-Protokoll benutzen\n"
++ "\n"
++-"Kurze Optionen ben?tigen dieselben Argumente wie Lange.\n"
+++"Kurze Optionen benötigen dieselben Argumente wie die langen.\n"
++
++ #: src/lsz.c:1768
++ msgid "got ZRQINIT"
++@@ -434,7 +435,7 @@
++ #: src/lsz.c:1991
++ #, c-format
++ msgid "blklen now %d\n"
++-msgstr "Blockgr??e nun %d\n"
+++msgstr "Blockgröße nun %d\n"
++
++ #: src/lsz.c:2053
++ #, c-format
++@@ -453,7 +454,7 @@
++ #: src/lsz.c:2223
++ #, c-format
++ msgid "calc_blklen: reduced to %d due to error\n"
++-msgstr "calc_blklen: Blockgr?sse auf %d reduziert wegen Fehler\n"
+++msgstr "calc_blklen: Blockgröße auf %d reduziert wegen Fehler\n"
++
++ #: src/lsz.c:2256
++ #, c-format
++@@ -468,12 +469,12 @@
++ #: src/lsz.c:2267
++ #, c-format
++ msgid "calc_blklen: calc total_bytes=%ld, bpe=%ld, ec=%ld\n"
++-msgstr "calc_blklen: kalkuliere gesamt_bytes=%ld, bpe=%le, ec=%ld\n"
+++msgstr "calc_blklen: kalkuliere gesamt_bytes=%ld, bpe=%ld, ec=%ld\n"
++
++ #: src/lsz.c:2278
++ #, c-format
++ msgid "calc_blklen: blklen %d, ok %ld, failed %ld -> %lu\n"
++-msgstr "calc_blklen: Blockl?nge %d, ok %ld, fehlgeschlagen %ld -> %lu\n"
+++msgstr "calc_blklen: Blocklänge %d, ok %ld, fehlgeschlagen %ld -> %lu\n"
++
++ #: src/lsz.c:2290
++ #, c-format
++@@ -512,7 +513,7 @@
++
++ #: src/zm.c:712
++ msgid "Garbage count exceeded"
++-msgstr "Maximale Wiederholungsanzahl ?berschritten"
+++msgstr "Maximale Wiederholungsanzahl überschritten"
++
++ #: src/zm.c:773
++ #, c-format
++@@ -526,11 +527,11 @@
++
++ #: src/lrz.c:382
++ msgid "don't have settimeofday, will not set time\n"
++-msgstr "Zeitsynchronisation nicht ausf?hrbar, settimeofday() fehlt\n"
+++msgstr "Zeitsynchronisation nicht ausführbar, settimeofday() fehlt\n"
++
++ #: src/lrz.c:386
++ msgid "not running as root (this is good!), can not set time\n"
++-msgstr "Zeitsynchronisation mangels Superuserrechten nicht ausf?hrbar\n"
+++msgstr "Zeitsynchronisation mangels Superuserrechten nicht ausführbar\n"
++
++ #: src/lrz.c:441
++ msgid "bytes_per_error"
++@@ -542,16 +543,16 @@
++
++ #: src/lrz.c:455
++ msgid "O_SYNC not supported by the kernel"
++-msgstr "O_SYNC vom Kernel nicht unterst?tzt"
+++msgstr "O_SYNC vom Kernel nicht unterstützt"
++
++ #: src/lrz.c:497 src/lrz.c:499
++ msgid "garbage on commandline"
++-msgstr "M?ll auf der Kommandozeile"
+++msgstr "Müll auf der Kommandozeile"
++
++ #: src/lrz.c:604
++ #, c-format
++ msgid "Usage: %s [options] [filename.if.xmodem]\n"
++-msgstr "Benutzung: %s [Optionen] [Dateiname.f?r.xmodem]\n"
+++msgstr "Benutzung: %s [Optionen] [Dateiname.für.xmodem]\n"
++
++ #: src/lrz.c:605
++ msgid "Receive files with ZMODEM/YMODEM/XMODEM protocol\n"
++@@ -596,44 +597,44 @@
++ "\n"
++ "short options use the same arguments as the long ones\n"
++ msgstr ""
++-" -+, --append an existierende Dateien anh?ngen\n"
++-" -a, --ascii ASCII-?bertragung (CR/LF nach LF wandeln)\n"
++-" -b, --binary Bin?r?bertragung (keine Umwandlungen)\n"
+++" -+, --append an existierende Dateien anhängen\n"
+++" -a, --ascii ASCII-Ãœbertragung (CR/LF nach LF wandeln)\n"
+++" -b, --binary Binärübertragung (keine Umwandlungen)\n"
++ " -B, --bufsize N N Bytes puffern (auto: ganze Datei puffern)\n"
++-" -c, --with-crc 16bit CRC statt Pr?fsumme verwenden (X)\n"
++-" -C, --allow-remote-commands Ausf?hrung von Kommandos erlauben (Z)\n"
+++" -c, --with-crc 16bit CRC statt Prüfsumme verwenden (X)\n"
+++" -C, --allow-remote-commands Ausführung von Kommandos erlauben (Z)\n"
++ " -D, --null empfangene Daten nach /dev/null schreiben\n"
++ " --delay-startup N Bei Programmstart N Sek. schlafen (Debugging)\n"
++ " -e, --escape Alle Steuerzeichen escapen (Z)\n"
++-" -E, --rename Empf?nger soll Datei umbenennen falls\n"
+++" -E, --rename Empfänger soll Datei umbenennen, falls\n"
++ " Zieldatei schon existiert\n"
++ " --errors N Einen CRC-Fehler alle N Bytes erzeugen\n"
++ " -h, --help Diesen Hilfstext ausgeben\n"
++-" -m, --min-bps N ?bertragung abbrechen bei weniger als N BPS\n"
++-" -M, --min-bps-time N f?r mindestens N Sekunden (Default: 120)\n"
+++" -m, --min-bps N Ãœbertragung abbrechen bei weniger als N BPS\n"
+++" -M, --min-bps-time N für mindestens N Sekunden (Default: 120)\n"
++ " -O, --disable-timeouts Timeoutbehandlung abschalten\n"
++ " --o-sync Ausgabedatei(en) im synchron schreiben\n"
++-" -p, --protect existierende Dateien nicht ver?ndern\n"
+++" -p, --protect existierende Dateien nicht verändern\n"
++ " -q, --quiet leise, keine Ausgaben machen\n"
++-" -r, --resume unterbrochene ?bertragungen fortsetzen (Z)\n"
++-" -R, --restricted eingeschr?nkter, sichererer Modus\n"
++-" -s, --stop-at {HH:MM|+N} ?bertragung um HH:MM oder in N Sek. abbrechen\n"
+++" -r, --resume unterbrochene Ãœbertragungen fortsetzen (Z)\n"
+++" -R, --restricted eingeschränkter, sichererer Modus\n"
+++" -s, --stop-at {HH:MM|+N} Ãœbertragung um HH:MM oder in N Sek. abbrechen\n"
++ " -S, --timesync Zeit anfordern (doppelt: lokale Zeit setzen)\n"
++-" --syslog[=off] syslog an- oder ausschalten, wenn m?glich\n"
++-" -t, --timeout N Timeout auf N Zehntelsekungen setzen\n"
++-" --tcp-server Socket ?ffnen und auf Verbindung warten\n"
++-" --tcp-client ADDR:PORT Socket ?ffnen und verbindung mit ...\n"
+++" --syslog[=off] syslog an- oder ausschalten, wenn möglich\n"
+++" -t, --timeout N Timeout auf N Zehntelsekunden setzen\n"
+++" --tcp-server Socket öffnen, Verbindung abwarten (Z)\n"
+++" --tcp-client ADDR:PORT Socket öffnen, verbinden mit ... (Z)\n"
++ " -u, --keep-uppercase GROSS geschrieben Dateinamen beibehalten\n"
++-" -U, --unrestrict eingeschr?nkten Modus aufheben (falls "
+++" -U, --unrestrict eingeschränkten Modus aufheben (falls "
++ "erlaubt)\n"
++ " -v, --verbose mehr ausgeben\n"
++-" -w, --windowsize N Fenstergr??e auf N Bytes setzen (Z)\n"
+++" -w, --windowsize N Fenstergröße auf N Bytes setzen (Z)\n"
++ " -X --xmodem XMODEM-Protokoll benutzen\n"
++-" -y, --overwrite existierende Dateien ?berschreiben\n"
+++" -y, --overwrite existierende Dateien überschreiben\n"
++ " --ymodem YMODEM-Protokoll benutzen\n"
++ " -Z, --zmodem ZMODEM-Protokoll benutzen\n"
++ "\n"
++-"Kurze Optionen ben?tigen dieselben Argumente wie Lange.\n"
+++"Kurze Optionen benötigen dieselben Argumente wie die langen.\n"
++
++ #: src/lrz.c:676
++ #, c-format
++@@ -662,11 +663,11 @@
++ "%s: %s removed.\r\n"
++ msgstr ""
++ "\r\n"
++-"%s: %s gel?scht\r\n"
+++"%s: %s gelöscht\r\n"
++
++ #: src/lrz.c:856
++ msgid "Pathname fetch returned EOT"
++-msgstr "Ende der ?bertragung beim Warten auf Dateinamen"
+++msgstr "Ende der Ãœbertragung beim Warten auf Dateinamen"
++
++ #: src/lrz.c:903
++ msgid "Received dup Sector"
++@@ -682,7 +683,7 @@
++
++ #: src/lrz.c:976
++ msgid "Checksum"
++-msgstr "Pr?fsummenfehler"
+++msgstr "Prüfsummenfehler"
++
++ #: src/lrz.c:979
++ msgid "Sector number garbled"
++@@ -695,27 +696,27 @@
++ #: src/lrz.c:1005
++ #, c-format
++ msgid "Got 0%o sector header"
++-msgstr "Erhielt %02x als Sektorbest?tigung"
+++msgstr "Erhielt %02x als Sektorbestätigung"
++
++ #: src/lrz.c:1113
++ #, c-format
++ msgid "file name ends with a /, skipped: %s\n"
++-msgstr "Dateiname endet mit /, ?bersprungen: %s\n"
+++msgstr "Dateiname endet mit /, übersprungen: %s\n"
++
++ #: src/lrz.c:1127
++ #, c-format
++ msgid "zmanag=%d, Lzmanag=%d\n"
++-msgstr ""
+++msgstr "zmanag=%d, Lzmanag=%d\n"
++
++ #: src/lrz.c:1128
++ #, c-format
++ msgid "zconv=%d\n"
++-msgstr ""
+++msgstr "zconv=%d\n"
++
++ #: src/lrz.c:1192 src/lrz.c:1226
++ #, c-format
++ msgid "file exists, skipped: %s\n"
++-msgstr "Datei existiert, ?bersprungen: %s\n"
+++msgstr "Datei existiert, übersprungen: %s\n"
++
++ #: src/lrz.c:1267
++ #, c-format
++@@ -739,7 +740,7 @@
++ #: src/lrz.c:1545
++ #, c-format
++ msgid "Blocks received: %d"
++-msgstr "Bl?cke empfangen: %d"
+++msgstr "Blöcke empfangen: %d"
++
++ #: src/lrz.c:1599
++ #, c-format
++@@ -749,15 +750,15 @@
++ #: src/lrz.c:1612 src/lrz.c:1620
++ #, c-format
++ msgid "%s:\tSecurity Violation"
++-msgstr "%s:\tSicherheitsversto?"
+++msgstr "%s:\tSicherheitsverstoß"
++
++ #: src/lrz.c:1730
++ msgid "remote command execution requested"
++-msgstr "Gegenseite versucht Kommandoausf?hrung"
+++msgstr "Gegenseite versucht Kommandoausführung"
++
++ #: src/lrz.c:1737
++ msgid "not executed"
++-msgstr "nicht ausgef?hrt"
+++msgstr "nicht ausgeführt"
++
++ #: src/lrz.c:1768
++ msgid "got ZRINIT"
++@@ -765,7 +766,7 @@
++
++ #: src/lrz.c:1817
++ msgid "Skipped"
++-msgstr "?bersprungen"
+++msgstr "Ãœbersprungen"
++
++ #. too bad
++ #: src/lrz.c:2049
++@@ -785,7 +786,7 @@
++
++ #: src/lrz.c:2215
++ msgid "file close error"
++-msgstr "Fehler beim Schlie?en der Datei"
+++msgstr "Fehler beim Schließen der Datei"
++
++ #~ msgid "tcp protocol init failed\n"
++ #~ msgstr "TCP Protokoll Initialisierung fehlgeschlagen\n"
++@@ -796,17 +797,3 @@
++ #~ msgid "fgets for tcp protocol synchronization failed: "
++ #~ msgstr "fgets() bei tcp Protokoll Synchronisation fehlgeschlagen: "
++
++-#~ msgid "Transfer complete."
++-#~ msgstr "?bertragung abgeschlossen"
++-
++-#~ msgid "at"
++-#~ msgstr "um"
++-
++-#~ msgid "TIMESYNC: failed\n"
++-#~ msgstr "Zeitsynchronisation: fehlgeschlagen\n"
++-
++-#~ msgid "TIMESYNC: ok\n"
++-#~ msgstr "Zeitsynchronisation: ok\n"
++-
++-#~ msgid "Falldown to %ld blklen"
++-#~ msgstr "Blockgr??e auf %ld gesenkt"
diff --git a/patches/source/minicom/minicom.SlackBuild b/patches/source/minicom/minicom.SlackBuild
new file mode 100755
index 000000000..533742e61
--- /dev/null
+++ b/patches/source/minicom/minicom.SlackBuild
@@ -0,0 +1,160 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2017 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+VERSION=2.7.1
+BUILD=${BUILD:-1_slack14.1}
+
+NUMJOBS=${NUMJOBS:--j6}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-minicom
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+# minicom
+cd $TMP
+rm -rf minicom-$VERSION
+tar xvf $CWD/minicom-$VERSION.tar.xz || exit 1
+cd minicom-$VERSION
+
+# The following command renames the internal implementation of getline
+# to g_getline as newer versions of Glibc provide an incompatible version:
+#sed -i -e "s/getline/g_&/" $(grep -lr getline *)
+
+chown -R root:root .
+find . -perm 777 -exec chmod 755 {} \;
+find . -perm 664 -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+mkdir -p $PKG/etc
+zcat $CWD/minicom.users.gz > $PKG/etc/minicom.users.new
+printf "# Machine-generated file - use \"minicom -s\" to change parameters.\n" \
+ > $PKG/etc/minirc.dfl.new
+
+mkdir -p $PKG/usr/doc/minicom-$VERSION
+cp -a \
+ AUTHORS COPYING* ChangeLog FILE_ID.DIZ INSTALL NEWS README* TODO doc \
+ $PKG/usr/doc/minicom-$VERSION
+rm -f $PKG/usr/doc/minicom-$VERSION/doc/{ChangeLog.old,Makefile*}
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+# lzrz
+
+cd $TMP
+rm -rf lrzsz-990823
+tar xvf $CWD/lrzsz_0.12.21.orig.tar.gz || exit 1
+cd lrzsz-990823
+chown -R root:root .
+
+# Make x86_64 a valid machine type (thanks to Fred Emmott)
+zcat $CWD/config.sub-x86_64.diff.gz | patch -p1 --verbose || exit 1
+
+# Apply some of the debian patches
+zcat $CWD/lrzsz_0.12.21-5.diff.gz | patch -p1 --verbose || exit 1
+rm -f debian/patches/{206499_ymodemg.diff.unchecked,206648_dszlog.diff.unchecked}
+for i in debian/patches/* ; do patch -p1 < $i || exit 1 ; done
+
+./configure \
+ --prefix=/usr \
+ --mandir=/usr/man \
+ --build=$ARCH-slackware-linux
+
+touch stamp-h.in # to stop autoheader from running
+touch -d yesterday aclocal.m4 # to stop automake from running
+
+make $NUMJOBS || make || exit 1
+
+cp src/lrz src/lsz $PKG/usr/bin
+chmod 0755 $PKG/usr/bin/{lrz,lsz}
+
+cp man/{lrz,lsz}.1 $PKG/usr/man/man1
+echo '.so man1/lrz.1' > $PKG/usr/man/man1/rz.1
+echo '.so man1/lsz.1' > $PKG/usr/man/man1/sz.1
+
+mkdir -p $PKG/usr/share/locale/de/LC_MESSAGES
+cat po/de.gmo > $PKG/usr/share/locale/de/LC_MESSAGES/lrzsz.mo
+
+mkdir -p $PKG/usr/doc/lrzsz-0.12.21
+cp -a \
+ AUTHORS COMPATABILITY COPYING* INSTALL NEWS README* THANKS TODO \
+ $PKG/usr/doc/lrzsz-0.12.21
+
+( cd $PKG/usr/bin
+ for i in lrb lrx rz ; do ln -s lrz $i ; done
+ for i in lsb lsx sz ; do ln -s lsz $i ; done
+ for i in rx rb ; do ln -s rz $i ; done
+ for i in sb sx ; do ln -s sz $i ; done
+)
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/minicom-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/minicom/minicom.users b/patches/source/minicom/minicom.users
new file mode 100644
index 000000000..509d86f41
--- /dev/null
+++ b/patches/source/minicom/minicom.users
@@ -0,0 +1,36 @@
+# $Id: minicom.users,v 1.1.1.1 1999/12/18 11:18:51 misiek Exp $
+# Minicom.users Access file for the minicom program.
+#
+# Format: Either just one username per line, or
+# a username followed by one or more
+# configuration-names. The name of the
+# default configuration is "dfl". The maximum
+# significant line length is 70 characters.
+#
+# Location: The minicom library directory, probably
+# /etc or /var/lib/minicom or whatever.
+#
+# Notes: If you don't install this file in the
+# specified location, everybody will have
+# access to minicom.
+#
+# This doesn't matter if minicom isn't installed
+# setuid root since access will then be based
+# on the permissions set on the serial port.
+#
+
+#
+# Who may use minicom?
+#
+# User [line] [..line]
+#
+
+# Everyone has access to all configurations.
+ALL
+
+## The rest are examples.
+## # Erik only has access to the default configuration
+## erik dfl
+##
+## # minicom has access to the default configuration, and configuration 'tty5'.
+## minicom dfl tty5
diff --git a/patches/source/minicom/slack-desc b/patches/source/minicom/slack-desc
new file mode 100644
index 000000000..4aa6302bd
--- /dev/null
+++ b/patches/source/minicom/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+minicom: minicom (communications package)
+minicom:
+minicom: Minicom - a full featured menu-driven communications package similar
+minicom: to the DOS program 'Telix'. Also includes sz/rz - utilities used to
+minicom: upload and download files using the Zmodem protocol.
+minicom:
+minicom: Homepage: http://alioth.debian.org/projects/minicom
+minicom:
+minicom:
+minicom:
+minicom:
diff --git a/patches/source/mkinitrd/README.initrd b/patches/source/mkinitrd/README.initrd
new file mode 100644
index 000000000..c10bb6306
--- /dev/null
+++ b/patches/source/mkinitrd/README.initrd
@@ -0,0 +1,99 @@
+
+Slackware initrd mini HOWTO
+by Patrick Volkerding, volkerdi@slackware.com
+@DATE@
+
+This document describes how to create and install an initrd, which may be
+required to use some features of the kernel. Also see "man mkinitrd".
+
+1. What is an initrd?
+2. Why to I need an initrd?
+3. How do I build the initrd?
+4. Now that I've built an initrd, how do I use it?
+
+
+1. What is an initrd?
+
+Initrd stands for "initial ramdisk". An initial ramdisk is a very small
+Linux filesystem that is loaded into RAM and mounted as the kernel boots,
+and before the main root filesystem is mounted.
+
+2. Why do I need an initrd?
+
+The usual reason to use an initrd is because you need to load kernel
+modules before mounting the root partition. Usually these modules are
+required to support the filesystem used by the root partition (ext3,
+reiserfs, xfs), or perhaps the controller that the hard drive is attached
+to (SCSI, RAID, etc). Essentially, there are so many different options
+available in modern Linux kernels that it isn't practical to try to ship
+many different kernels to try to cover everyone's needs. It's a lot more
+flexible to ship a generic kernel and a set of kernel modules for it.
+
+3. How do I build the initrd?
+
+The easiest way to make the initrd is to use the mkinitrd script included
+in Slackware's mkinitrd package. We'll walk through the process of
+upgrading to the generic @KERNEL_VERSION@ Linux kernel using the packages
+found in Slackware's slackware/a/ directory.
+
+First, make sure the kernel, kernel modules, and mkinitrd package are
+installed (the current version numbers might be a little different, so
+this is just an example):
+
+ installpkg kernel-generic-@KERNEL_VERSION@-@ARCH@-@BUILD@.tgz
+ installpkg kernel-modules-@KERNEL_VERSION@-@ARCH@-@BUILD@.tgz
+ installpkg mkinitrd-@MKINITRD_VERSION@-@ARCH@-@BUILD@.tgz
+
+Change into the /boot directory:
+
+ cd /boot
+
+Now you'll want to run "mkinitrd". I'm using ext4 for my root
+filesystem, and since mkinitrd should figure out any other modules
+it requires, I shouldn't need to specify any others:
+
+ mkinitrd -c -k @KERNEL_VERSION@ -m ext4
+
+This should do two things. First, it will create a directory
+/boot/initrd-tree containing the initrd's filesystem. Then it will
+create an initrd (/boot/initrd.gz) from this tree. If you wanted to,
+you could make some additional changes in /boot/initrd-tree/ and
+then run mkinitrd again without options to rebuild the image. That's
+optional, though, and only advanced users will need to think about that.
+
+Here's another example: Build an initrd image using Linux @KERNEL_VERSION@
+kernel modules for a system with an ext3 root partition on /dev/sdb3:
+
+ mkinitrd -c -k @KERNEL_VERSION@ -m ext3 -f ext3 -r /dev/sdb3
+
+
+4. Now that I've built an initrd, how do I use it?
+
+Now that you've got an initrd (/boot/initrd.gz), you'll want to load
+it along with the kernel at boot time. If you use LILO for your boot
+loader you'll need to edit /etc/lilo.conf and add a line to load the
+initrd. Here's an example section of lilo.conf showing how this is
+done:
+
+# Linux bootable partition config begins
+image = /boot/vmlinuz-generic-@KERNEL_VERSION@
+ initrd = /boot/initrd.gz
+ root = /dev/sda6
+ label = @LILO_KERNEL_NAME@
+ read-only
+# Linux bootable partition config ends
+
+The initrd is loaded by the "initrd = /boot/initrd.gz" line.
+Just add the line right below the line for the kernel image you use.
+Save the file, and then run LILO again ('lilo' at the command line).
+You'll need to run lilo every time you edit lilo.conf or rebuild the
+initrd.
+
+Other bootloaders such as syslinux also support the use of an initrd.
+See the documentation for those programs for details on using an
+initrd with them.
+
+
+---------
+
+Have fun!
diff --git a/patches/source/mkinitrd/busybox-dot-config b/patches/source/mkinitrd/busybox-dot-config
new file mode 120000
index 000000000..09ac6817e
--- /dev/null
+++ b/patches/source/mkinitrd/busybox-dot-config
@@ -0,0 +1 @@
+busybox-dot-config.1.20.x \ No newline at end of file
diff --git a/patches/source/mkinitrd/busybox-dot-config.1.20.x b/patches/source/mkinitrd/busybox-dot-config.1.20.x
new file mode 100644
index 000000000..93a4ea8d9
--- /dev/null
+++ b/patches/source/mkinitrd/busybox-dot-config.1.20.x
@@ -0,0 +1,1024 @@
+#
+# Automatically generated make config: don't edit
+# Busybox version: 1.20.2
+# Wed Jun 8 14:48:15 2016
+#
+CONFIG_HAVE_DOT_CONFIG=y
+
+#
+# Busybox Settings
+#
+
+#
+# General Configuration
+#
+CONFIG_DESKTOP=y
+# CONFIG_EXTRA_COMPAT is not set
+CONFIG_INCLUDE_SUSv2=y
+# CONFIG_USE_PORTABLE_CODE is not set
+CONFIG_PLATFORM_LINUX=y
+CONFIG_FEATURE_BUFFERS_USE_MALLOC=y
+# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set
+# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
+CONFIG_SHOW_USAGE=y
+CONFIG_FEATURE_VERBOSE_USAGE=y
+CONFIG_FEATURE_COMPRESS_USAGE=y
+CONFIG_FEATURE_INSTALLER=y
+CONFIG_INSTALL_NO_USR=y
+CONFIG_LOCALE_SUPPORT=y
+CONFIG_UNICODE_SUPPORT=y
+# CONFIG_UNICODE_USING_LOCALE is not set
+# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set
+CONFIG_SUBST_WCHAR=63
+CONFIG_LAST_SUPPORTED_WCHAR=767
+# CONFIG_UNICODE_COMBINING_WCHARS is not set
+# CONFIG_UNICODE_WIDE_WCHARS is not set
+# CONFIG_UNICODE_BIDI_SUPPORT is not set
+# CONFIG_UNICODE_NEUTRAL_TABLE is not set
+# CONFIG_UNICODE_PRESERVE_BROKEN is not set
+CONFIG_LONG_OPTS=y
+CONFIG_FEATURE_DEVPTS=y
+# CONFIG_FEATURE_CLEAN_UP is not set
+CONFIG_FEATURE_UTMP=y
+CONFIG_FEATURE_WTMP=y
+CONFIG_FEATURE_PIDFILE=y
+CONFIG_FEATURE_SUID=y
+CONFIG_FEATURE_SUID_CONFIG=y
+CONFIG_FEATURE_SUID_CONFIG_QUIET=y
+# CONFIG_SELINUX is not set
+# CONFIG_FEATURE_PREFER_APPLETS is not set
+CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
+CONFIG_FEATURE_SYSLOG=y
+CONFIG_FEATURE_HAVE_RPC=y
+
+#
+# Build Options
+#
+# CONFIG_STATIC is not set
+# CONFIG_PIE is not set
+# CONFIG_NOMMU is not set
+# CONFIG_BUILD_LIBBUSYBOX is not set
+# CONFIG_FEATURE_INDIVIDUAL is not set
+# CONFIG_FEATURE_SHARED_BUSYBOX is not set
+CONFIG_LFS=y
+CONFIG_CROSS_COMPILER_PREFIX=""
+CONFIG_SYSROOT=""
+CONFIG_EXTRA_CFLAGS=""
+CONFIG_EXTRA_LDFLAGS=""
+CONFIG_EXTRA_LDLIBS=""
+
+#
+# Debugging Options
+#
+# CONFIG_DEBUG is not set
+# CONFIG_DEBUG_PESSIMIZE is not set
+# CONFIG_WERROR is not set
+CONFIG_NO_DEBUG_LIB=y
+# CONFIG_DMALLOC is not set
+# CONFIG_EFENCE is not set
+
+#
+# Installation Options ("make install" behavior)
+#
+CONFIG_INSTALL_APPLET_SYMLINKS=y
+# CONFIG_INSTALL_APPLET_HARDLINKS is not set
+# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set
+# CONFIG_INSTALL_APPLET_DONT is not set
+# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set
+# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set
+# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set
+CONFIG_PREFIX="/tmp/package-mkinitrd/usr/share/mkinitrd/initrd-tree"
+
+#
+# Busybox Library Tuning
+#
+# CONFIG_FEATURE_SYSTEMD is not set
+CONFIG_FEATURE_RTMINMAX=y
+CONFIG_PASSWORD_MINLEN=6
+CONFIG_MD5_SMALL=1
+# CONFIG_FEATURE_FAST_TOP is not set
+# CONFIG_FEATURE_ETC_NETWORKS is not set
+CONFIG_FEATURE_USE_TERMIOS=y
+CONFIG_FEATURE_EDITING=y
+CONFIG_FEATURE_EDITING_MAX_LEN=1024
+CONFIG_FEATURE_EDITING_VI=y
+CONFIG_FEATURE_EDITING_HISTORY=64
+# CONFIG_FEATURE_EDITING_SAVEHISTORY is not set
+# CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is not set
+# CONFIG_FEATURE_REVERSE_SEARCH is not set
+CONFIG_FEATURE_TAB_COMPLETION=y
+# CONFIG_FEATURE_USERNAME_COMPLETION is not set
+CONFIG_FEATURE_EDITING_FANCY_PROMPT=y
+CONFIG_FEATURE_EDITING_ASK_TERMINAL=y
+# CONFIG_FEATURE_NON_POSIX_CP is not set
+CONFIG_FEATURE_VERBOSE_CP_MESSAGE=y
+CONFIG_FEATURE_COPYBUF_KB=4
+# CONFIG_FEATURE_SKIP_ROOTFS is not set
+CONFIG_MONOTONIC_SYSCALL=y
+CONFIG_IOCTL_HEX2STR_ERROR=y
+# CONFIG_FEATURE_HWIB is not set
+
+#
+# Applets
+#
+
+#
+# Archival Utilities
+#
+CONFIG_FEATURE_SEAMLESS_XZ=y
+# CONFIG_FEATURE_SEAMLESS_LZMA is not set
+CONFIG_FEATURE_SEAMLESS_BZ2=y
+CONFIG_FEATURE_SEAMLESS_GZ=y
+CONFIG_FEATURE_SEAMLESS_Z=y
+CONFIG_AR=y
+CONFIG_FEATURE_AR_LONG_FILENAMES=y
+# CONFIG_FEATURE_AR_CREATE is not set
+CONFIG_BUNZIP2=y
+CONFIG_BZIP2=y
+CONFIG_CPIO=y
+CONFIG_FEATURE_CPIO_O=y
+CONFIG_FEATURE_CPIO_P=y
+# CONFIG_DPKG is not set
+# CONFIG_DPKG_DEB is not set
+# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set
+CONFIG_GUNZIP=y
+CONFIG_GZIP=y
+CONFIG_FEATURE_GZIP_LONG_OPTIONS=y
+CONFIG_GZIP_FAST=0
+CONFIG_LZOP=y
+CONFIG_LZOP_COMPR_HIGH=y
+CONFIG_RPM2CPIO=y
+# CONFIG_RPM is not set
+CONFIG_TAR=y
+CONFIG_FEATURE_TAR_CREATE=y
+CONFIG_FEATURE_TAR_AUTODETECT=y
+CONFIG_FEATURE_TAR_FROM=y
+CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y
+# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set
+CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
+CONFIG_FEATURE_TAR_LONG_OPTIONS=y
+# CONFIG_FEATURE_TAR_TO_COMMAND is not set
+CONFIG_FEATURE_TAR_UNAME_GNAME=y
+CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y
+# CONFIG_FEATURE_TAR_SELINUX is not set
+CONFIG_UNCOMPRESS=y
+CONFIG_UNLZMA=y
+CONFIG_FEATURE_LZMA_FAST=y
+CONFIG_LZMA=y
+CONFIG_UNXZ=y
+CONFIG_XZ=y
+CONFIG_UNZIP=y
+
+#
+# Coreutils
+#
+CONFIG_BASENAME=y
+CONFIG_CAT=y
+CONFIG_DATE=y
+CONFIG_FEATURE_DATE_ISOFMT=y
+# CONFIG_FEATURE_DATE_NANO is not set
+# CONFIG_FEATURE_DATE_COMPAT is not set
+CONFIG_HOSTID=y
+CONFIG_ID=y
+# CONFIG_GROUPS is not set
+CONFIG_TEST=y
+CONFIG_FEATURE_TEST_64=y
+CONFIG_TOUCH=y
+CONFIG_FEATURE_TOUCH_SUSV3=y
+CONFIG_TR=y
+CONFIG_FEATURE_TR_CLASSES=y
+CONFIG_FEATURE_TR_EQUIV=y
+CONFIG_BASE64=y
+CONFIG_WHO=y
+CONFIG_USERS=y
+CONFIG_CAL=y
+CONFIG_CATV=y
+CONFIG_CHGRP=y
+CONFIG_CHMOD=y
+CONFIG_CHOWN=y
+# CONFIG_FEATURE_CHOWN_LONG_OPTIONS is not set
+CONFIG_CHROOT=y
+CONFIG_CKSUM=y
+CONFIG_COMM=y
+CONFIG_CP=y
+CONFIG_FEATURE_CP_LONG_OPTIONS=y
+CONFIG_CUT=y
+CONFIG_DD=y
+CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
+# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set
+CONFIG_FEATURE_DD_IBS_OBS=y
+CONFIG_DF=y
+CONFIG_FEATURE_DF_FANCY=y
+CONFIG_DIRNAME=y
+CONFIG_DOS2UNIX=y
+CONFIG_UNIX2DOS=y
+CONFIG_DU=y
+CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y
+CONFIG_ECHO=y
+CONFIG_FEATURE_FANCY_ECHO=y
+CONFIG_ENV=y
+CONFIG_FEATURE_ENV_LONG_OPTIONS=y
+CONFIG_EXPAND=y
+CONFIG_FEATURE_EXPAND_LONG_OPTIONS=y
+CONFIG_EXPR=y
+CONFIG_EXPR_MATH_SUPPORT_64=y
+CONFIG_FALSE=y
+CONFIG_FOLD=y
+CONFIG_FSYNC=y
+CONFIG_HEAD=y
+CONFIG_FEATURE_FANCY_HEAD=y
+CONFIG_INSTALL=y
+CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y
+CONFIG_LN=y
+CONFIG_LOGNAME=y
+CONFIG_LS=y
+CONFIG_FEATURE_LS_FILETYPES=y
+CONFIG_FEATURE_LS_FOLLOWLINKS=y
+CONFIG_FEATURE_LS_RECURSIVE=y
+CONFIG_FEATURE_LS_SORTFILES=y
+CONFIG_FEATURE_LS_TIMESTAMPS=y
+CONFIG_FEATURE_LS_USERNAME=y
+CONFIG_FEATURE_LS_COLOR=y
+CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y
+CONFIG_MD5SUM=y
+CONFIG_MKDIR=y
+CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y
+CONFIG_MKFIFO=y
+CONFIG_MKNOD=y
+CONFIG_MV=y
+CONFIG_FEATURE_MV_LONG_OPTIONS=y
+CONFIG_NICE=y
+CONFIG_NOHUP=y
+CONFIG_OD=y
+CONFIG_PRINTENV=y
+CONFIG_PRINTF=y
+CONFIG_PWD=y
+CONFIG_READLINK=y
+CONFIG_FEATURE_READLINK_FOLLOW=y
+CONFIG_REALPATH=y
+CONFIG_RM=y
+CONFIG_RMDIR=y
+# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set
+CONFIG_SEQ=y
+CONFIG_SHA1SUM=y
+CONFIG_SHA256SUM=y
+CONFIG_SHA512SUM=y
+CONFIG_SLEEP=y
+CONFIG_FEATURE_FANCY_SLEEP=y
+# CONFIG_FEATURE_FLOAT_SLEEP is not set
+CONFIG_SORT=y
+CONFIG_FEATURE_SORT_BIG=y
+CONFIG_SPLIT=y
+CONFIG_FEATURE_SPLIT_FANCY=y
+CONFIG_STAT=y
+CONFIG_FEATURE_STAT_FORMAT=y
+CONFIG_STTY=y
+CONFIG_SUM=y
+CONFIG_SYNC=y
+CONFIG_TAC=y
+CONFIG_TAIL=y
+CONFIG_FEATURE_FANCY_TAIL=y
+CONFIG_TEE=y
+CONFIG_FEATURE_TEE_USE_BLOCK_IO=y
+CONFIG_TRUE=y
+CONFIG_TTY=y
+CONFIG_UNAME=y
+CONFIG_UNEXPAND=y
+CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS=y
+CONFIG_UNIQ=y
+CONFIG_USLEEP=y
+CONFIG_UUDECODE=y
+CONFIG_UUENCODE=y
+CONFIG_WC=y
+CONFIG_FEATURE_WC_LARGE=y
+CONFIG_WHOAMI=y
+CONFIG_YES=y
+
+#
+# Common options for cp and mv
+#
+CONFIG_FEATURE_PRESERVE_HARDLINKS=y
+
+#
+# Common options for ls, more and telnet
+#
+CONFIG_FEATURE_AUTOWIDTH=y
+
+#
+# Common options for df, du, ls
+#
+CONFIG_FEATURE_HUMAN_READABLE=y
+
+#
+# Common options for md5sum, sha1sum, sha256sum, sha512sum
+#
+CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
+
+#
+# Console Utilities
+#
+CONFIG_CHVT=y
+CONFIG_FGCONSOLE=y
+CONFIG_CLEAR=y
+CONFIG_DEALLOCVT=y
+CONFIG_DUMPKMAP=y
+CONFIG_KBD_MODE=y
+CONFIG_LOADFONT=y
+CONFIG_LOADKMAP=y
+CONFIG_OPENVT=y
+CONFIG_RESET=y
+CONFIG_RESIZE=y
+CONFIG_FEATURE_RESIZE_PRINT=y
+CONFIG_SETCONSOLE=y
+CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS=y
+CONFIG_SETFONT=y
+CONFIG_FEATURE_SETFONT_TEXTUAL_MAP=y
+CONFIG_DEFAULT_SETFONT_DIR="/usr/share/kbd/consolefonts"
+CONFIG_SETKEYCODES=y
+CONFIG_SETLOGCONS=y
+CONFIG_SHOWKEY=y
+
+#
+# Common options for loadfont and setfont
+#
+# CONFIG_FEATURE_LOADFONT_PSF2 is not set
+CONFIG_FEATURE_LOADFONT_RAW=y
+
+#
+# Debian Utilities
+#
+CONFIG_MKTEMP=y
+CONFIG_PIPE_PROGRESS=y
+CONFIG_RUN_PARTS=y
+CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y
+CONFIG_FEATURE_RUN_PARTS_FANCY=y
+CONFIG_START_STOP_DAEMON=y
+CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
+CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y
+CONFIG_WHICH=y
+
+#
+# Editors
+#
+CONFIG_PATCH=y
+CONFIG_VI=y
+CONFIG_FEATURE_VI_MAX_LEN=1024
+CONFIG_FEATURE_VI_8BIT=y
+CONFIG_FEATURE_VI_COLON=y
+CONFIG_FEATURE_VI_YANKMARK=y
+CONFIG_FEATURE_VI_SEARCH=y
+# CONFIG_FEATURE_VI_REGEX_SEARCH is not set
+CONFIG_FEATURE_VI_USE_SIGNALS=y
+CONFIG_FEATURE_VI_DOT_CMD=y
+CONFIG_FEATURE_VI_READONLY=y
+CONFIG_FEATURE_VI_SETOPTS=y
+CONFIG_FEATURE_VI_SET=y
+CONFIG_FEATURE_VI_WIN_RESIZE=y
+CONFIG_FEATURE_VI_ASK_TERMINAL=y
+CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y
+CONFIG_AWK=y
+CONFIG_FEATURE_AWK_LIBM=y
+CONFIG_CMP=y
+CONFIG_DIFF=y
+# CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set
+CONFIG_FEATURE_DIFF_DIR=y
+CONFIG_ED=y
+CONFIG_SED=y
+CONFIG_FEATURE_ALLOW_EXEC=y
+
+#
+# Finding Utilities
+#
+CONFIG_FIND=y
+CONFIG_FEATURE_FIND_PRINT0=y
+CONFIG_FEATURE_FIND_MTIME=y
+CONFIG_FEATURE_FIND_MMIN=y
+CONFIG_FEATURE_FIND_PERM=y
+CONFIG_FEATURE_FIND_TYPE=y
+CONFIG_FEATURE_FIND_XDEV=y
+CONFIG_FEATURE_FIND_MAXDEPTH=y
+CONFIG_FEATURE_FIND_NEWER=y
+CONFIG_FEATURE_FIND_INUM=y
+CONFIG_FEATURE_FIND_EXEC=y
+CONFIG_FEATURE_FIND_USER=y
+CONFIG_FEATURE_FIND_GROUP=y
+CONFIG_FEATURE_FIND_NOT=y
+CONFIG_FEATURE_FIND_DEPTH=y
+CONFIG_FEATURE_FIND_PAREN=y
+CONFIG_FEATURE_FIND_SIZE=y
+CONFIG_FEATURE_FIND_PRUNE=y
+# CONFIG_FEATURE_FIND_DELETE is not set
+CONFIG_FEATURE_FIND_PATH=y
+CONFIG_FEATURE_FIND_REGEX=y
+# CONFIG_FEATURE_FIND_CONTEXT is not set
+CONFIG_FEATURE_FIND_LINKS=y
+CONFIG_GREP=y
+CONFIG_FEATURE_GREP_EGREP_ALIAS=y
+CONFIG_FEATURE_GREP_FGREP_ALIAS=y
+CONFIG_FEATURE_GREP_CONTEXT=y
+CONFIG_XARGS=y
+CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y
+CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
+CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y
+CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
+
+#
+# Init Utilities
+#
+# CONFIG_BOOTCHARTD is not set
+# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set
+# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set
+CONFIG_HALT=y
+# CONFIG_FEATURE_CALL_TELINIT is not set
+CONFIG_TELINIT_PATH=""
+CONFIG_INIT=y
+CONFIG_FEATURE_USE_INITTAB=y
+CONFIG_FEATURE_KILL_REMOVED=y
+CONFIG_FEATURE_KILL_DELAY=10
+CONFIG_FEATURE_INIT_SCTTY=y
+CONFIG_FEATURE_INIT_SYSLOG=y
+CONFIG_FEATURE_EXTRA_QUIET=y
+# CONFIG_FEATURE_INIT_COREDUMPS is not set
+# CONFIG_FEATURE_INITRD is not set
+CONFIG_INIT_TERMINAL_TYPE="linux"
+CONFIG_MESG=y
+CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP=y
+
+#
+# Login/Password Management Utilities
+#
+CONFIG_ADD_SHELL=y
+CONFIG_REMOVE_SHELL=y
+CONFIG_FEATURE_SHADOWPASSWDS=y
+# CONFIG_USE_BB_PWD_GRP is not set
+# CONFIG_USE_BB_SHADOW is not set
+CONFIG_USE_BB_CRYPT=y
+CONFIG_USE_BB_CRYPT_SHA=y
+CONFIG_ADDUSER=y
+# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
+CONFIG_FEATURE_CHECK_NAMES=y
+CONFIG_FIRST_SYSTEM_ID=1000
+CONFIG_LAST_SYSTEM_ID=12000
+CONFIG_ADDGROUP=y
+CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS=y
+CONFIG_FEATURE_ADDUSER_TO_GROUP=y
+CONFIG_DELUSER=y
+CONFIG_DELGROUP=y
+CONFIG_FEATURE_DEL_USER_FROM_GROUP=y
+CONFIG_GETTY=y
+CONFIG_LOGIN=y
+# CONFIG_LOGIN_SESSION_AS_CHILD is not set
+# CONFIG_PAM is not set
+CONFIG_LOGIN_SCRIPTS=y
+CONFIG_FEATURE_NOLOGIN=y
+# CONFIG_FEATURE_SECURETTY is not set
+CONFIG_PASSWD=y
+CONFIG_FEATURE_PASSWD_WEAK_CHECK=y
+CONFIG_CRYPTPW=y
+CONFIG_CHPASSWD=y
+CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="s"
+CONFIG_SU=y
+CONFIG_FEATURE_SU_SYSLOG=y
+CONFIG_FEATURE_SU_CHECKS_SHELLS=y
+CONFIG_SULOGIN=y
+CONFIG_VLOCK=y
+
+#
+# Linux Ext2 FS Progs
+#
+CONFIG_CHATTR=y
+CONFIG_FSCK=y
+CONFIG_LSATTR=y
+CONFIG_TUNE2FS=y
+
+#
+# Linux Module Utilities
+#
+CONFIG_MODINFO=y
+# CONFIG_MODPROBE_SMALL is not set
+# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set
+# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set
+CONFIG_INSMOD=y
+CONFIG_RMMOD=y
+CONFIG_LSMOD=y
+CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y
+CONFIG_MODPROBE=y
+CONFIG_FEATURE_MODPROBE_BLACKLIST=y
+CONFIG_DEPMOD=y
+
+#
+# Options common to multiple modutils
+#
+# CONFIG_FEATURE_2_4_MODULES is not set
+# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set
+# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set
+# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set
+# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set
+# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
+# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set
+CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
+CONFIG_FEATURE_MODUTILS_ALIAS=y
+CONFIG_FEATURE_MODUTILS_SYMBOLS=y
+CONFIG_DEFAULT_MODULES_DIR="/lib/modules"
+CONFIG_DEFAULT_DEPMOD_FILE="modules.dep"
+
+#
+# Linux System Utilities
+#
+CONFIG_BLOCKDEV=y
+CONFIG_MDEV=y
+CONFIG_FEATURE_MDEV_CONF=y
+CONFIG_FEATURE_MDEV_RENAME=y
+CONFIG_FEATURE_MDEV_RENAME_REGEXP=y
+CONFIG_FEATURE_MDEV_EXEC=y
+CONFIG_FEATURE_MDEV_LOAD_FIRMWARE=y
+CONFIG_REV=y
+CONFIG_ACPID=y
+CONFIG_FEATURE_ACPID_COMPAT=y
+CONFIG_BLKID=y
+CONFIG_FEATURE_BLKID_TYPE=y
+CONFIG_DMESG=y
+CONFIG_FEATURE_DMESG_PRETTY=y
+CONFIG_FBSET=y
+CONFIG_FEATURE_FBSET_FANCY=y
+CONFIG_FEATURE_FBSET_READMODE=y
+CONFIG_FDFLUSH=y
+CONFIG_FDFORMAT=y
+CONFIG_FDISK=y
+# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set
+CONFIG_FEATURE_FDISK_WRITABLE=y
+# CONFIG_FEATURE_AIX_LABEL is not set
+# CONFIG_FEATURE_SGI_LABEL is not set
+# CONFIG_FEATURE_SUN_LABEL is not set
+CONFIG_FEATURE_OSF_LABEL=y
+CONFIG_FEATURE_GPT_LABEL=y
+CONFIG_FEATURE_FDISK_ADVANCED=y
+CONFIG_FINDFS=y
+# CONFIG_FLOCK is not set
+CONFIG_FREERAMDISK=y
+CONFIG_FSCK_MINIX=y
+# CONFIG_MKFS_EXT2 is not set
+CONFIG_MKFS_MINIX=y
+CONFIG_FEATURE_MINIX2=y
+# CONFIG_MKFS_REISER is not set
+CONFIG_MKFS_VFAT=y
+CONFIG_GETOPT=y
+CONFIG_FEATURE_GETOPT_LONG=y
+CONFIG_HEXDUMP=y
+CONFIG_FEATURE_HEXDUMP_REVERSE=y
+CONFIG_HD=y
+CONFIG_HWCLOCK=y
+CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y
+CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y
+CONFIG_IPCRM=y
+CONFIG_IPCS=y
+CONFIG_LOSETUP=y
+CONFIG_LSPCI=y
+CONFIG_LSUSB=y
+CONFIG_MKSWAP=y
+CONFIG_FEATURE_MKSWAP_UUID=y
+CONFIG_MORE=y
+CONFIG_MOUNT=y
+CONFIG_FEATURE_MOUNT_FAKE=y
+# CONFIG_FEATURE_MOUNT_VERBOSE is not set
+CONFIG_FEATURE_MOUNT_HELPERS=y
+CONFIG_FEATURE_MOUNT_LABEL=y
+CONFIG_FEATURE_MOUNT_NFS=y
+CONFIG_FEATURE_MOUNT_CIFS=y
+CONFIG_FEATURE_MOUNT_FLAGS=y
+CONFIG_FEATURE_MOUNT_FSTAB=y
+CONFIG_PIVOT_ROOT=y
+CONFIG_RDATE=y
+CONFIG_RDEV=y
+CONFIG_READPROFILE=y
+CONFIG_RTCWAKE=y
+CONFIG_SCRIPT=y
+CONFIG_SCRIPTREPLAY=y
+CONFIG_SETARCH=y
+CONFIG_SWAPONOFF=y
+CONFIG_FEATURE_SWAPON_PRI=y
+CONFIG_SWITCH_ROOT=y
+CONFIG_UMOUNT=y
+CONFIG_FEATURE_UMOUNT_ALL=y
+
+#
+# Common options for mount/umount
+#
+CONFIG_FEATURE_MOUNT_LOOP=y
+CONFIG_FEATURE_MOUNT_LOOP_CREATE=y
+CONFIG_FEATURE_MTAB_SUPPORT=y
+CONFIG_VOLUMEID=y
+
+#
+# Filesystem/Volume identification
+#
+CONFIG_FEATURE_VOLUMEID_EXT=y
+# CONFIG_FEATURE_VOLUMEID_BTRFS is not set
+CONFIG_FEATURE_VOLUMEID_REISERFS=y
+CONFIG_FEATURE_VOLUMEID_FAT=y
+CONFIG_FEATURE_VOLUMEID_HFS=y
+CONFIG_FEATURE_VOLUMEID_JFS=y
+CONFIG_FEATURE_VOLUMEID_XFS=y
+CONFIG_FEATURE_VOLUMEID_NTFS=y
+CONFIG_FEATURE_VOLUMEID_ISO9660=y
+CONFIG_FEATURE_VOLUMEID_UDF=y
+CONFIG_FEATURE_VOLUMEID_LUKS=y
+CONFIG_FEATURE_VOLUMEID_LINUXSWAP=y
+CONFIG_FEATURE_VOLUMEID_CRAMFS=y
+CONFIG_FEATURE_VOLUMEID_ROMFS=y
+CONFIG_FEATURE_VOLUMEID_SYSV=y
+# CONFIG_FEATURE_VOLUMEID_OCFS2 is not set
+CONFIG_FEATURE_VOLUMEID_LINUXRAID=y
+
+#
+# Miscellaneous Utilities
+#
+# CONFIG_CONSPY is not set
+CONFIG_LESS=y
+CONFIG_FEATURE_LESS_MAXLINES=9999999
+CONFIG_FEATURE_LESS_BRACKETS=y
+CONFIG_FEATURE_LESS_FLAGS=y
+CONFIG_FEATURE_LESS_MARKS=y
+CONFIG_FEATURE_LESS_REGEXP=y
+CONFIG_FEATURE_LESS_WINCH=y
+CONFIG_FEATURE_LESS_ASK_TERMINAL=y
+CONFIG_FEATURE_LESS_DASHCMD=y
+CONFIG_FEATURE_LESS_LINENUMS=y
+# CONFIG_NANDWRITE is not set
+# CONFIG_NANDDUMP is not set
+CONFIG_SETSERIAL=y
+# CONFIG_UBIATTACH is not set
+# CONFIG_UBIDETACH is not set
+# CONFIG_UBIMKVOL is not set
+# CONFIG_UBIRMVOL is not set
+# CONFIG_UBIRSVOL is not set
+# CONFIG_UBIUPDATEVOL is not set
+CONFIG_ADJTIMEX=y
+CONFIG_BBCONFIG=y
+CONFIG_FEATURE_COMPRESS_BBCONFIG=y
+CONFIG_BEEP=y
+CONFIG_FEATURE_BEEP_FREQ=4000
+CONFIG_FEATURE_BEEP_LENGTH_MS=30
+CONFIG_CHAT=y
+CONFIG_FEATURE_CHAT_NOFAIL=y
+# CONFIG_FEATURE_CHAT_TTY_HIFI is not set
+CONFIG_FEATURE_CHAT_IMPLICIT_CR=y
+# CONFIG_FEATURE_CHAT_SWALLOW_OPTS is not set
+# CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set
+# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set
+# CONFIG_FEATURE_CHAT_CLR_ABORT is not set
+CONFIG_CHRT=y
+CONFIG_CROND=y
+CONFIG_FEATURE_CROND_D=y
+# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set
+CONFIG_FEATURE_CROND_DIR="/var/spool/cron"
+CONFIG_CRONTAB=y
+CONFIG_DC=y
+CONFIG_FEATURE_DC_LIBM=y
+# CONFIG_DEVFSD is not set
+# CONFIG_DEVFSD_MODLOAD is not set
+# CONFIG_DEVFSD_FG_NP is not set
+# CONFIG_DEVFSD_VERBOSE is not set
+# CONFIG_FEATURE_DEVFS is not set
+CONFIG_DEVMEM=y
+CONFIG_EJECT=y
+CONFIG_FEATURE_EJECT_SCSI=y
+CONFIG_FBSPLASH=y
+# CONFIG_FLASHCP is not set
+CONFIG_FLASH_LOCK=y
+CONFIG_FLASH_UNLOCK=y
+CONFIG_FLASH_ERASEALL=y
+CONFIG_IONICE=y
+CONFIG_INOTIFYD=y
+CONFIG_LAST=y
+CONFIG_FEATURE_LAST_SMALL=y
+# CONFIG_FEATURE_LAST_FANCY is not set
+CONFIG_HDPARM=y
+CONFIG_FEATURE_HDPARM_GET_IDENTITY=y
+CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF=y
+CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF=y
+CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET=y
+CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF=y
+CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA=y
+CONFIG_MAKEDEVS=y
+# CONFIG_FEATURE_MAKEDEVS_LEAF is not set
+CONFIG_FEATURE_MAKEDEVS_TABLE=y
+# CONFIG_MAN is not set
+# CONFIG_MICROCOM is not set
+CONFIG_MOUNTPOINT=y
+CONFIG_MT=y
+CONFIG_RAIDAUTORUN=y
+CONFIG_READAHEAD=y
+# CONFIG_RFKILL is not set
+CONFIG_RUNLEVEL=y
+CONFIG_RX=y
+CONFIG_SETSID=y
+CONFIG_STRINGS=y
+CONFIG_TASKSET=y
+CONFIG_FEATURE_TASKSET_FANCY=y
+CONFIG_TIME=y
+CONFIG_TIMEOUT=y
+CONFIG_TTYSIZE=y
+CONFIG_VOLNAME=y
+# CONFIG_WALL is not set
+CONFIG_WATCHDOG=y
+
+#
+# Networking Utilities
+#
+CONFIG_NAMEIF=y
+# CONFIG_FEATURE_NAMEIF_EXTENDED is not set
+CONFIG_NBDCLIENT=y
+CONFIG_NC=y
+CONFIG_NC_SERVER=y
+CONFIG_NC_EXTRA=y
+# CONFIG_NC_110_COMPAT is not set
+CONFIG_PING=y
+CONFIG_PING6=y
+CONFIG_FEATURE_FANCY_PING=y
+# CONFIG_WHOIS is not set
+CONFIG_FEATURE_IPV6=y
+CONFIG_FEATURE_UNIX_LOCAL=y
+CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
+# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
+CONFIG_ARP=y
+CONFIG_ARPING=y
+CONFIG_BRCTL=y
+# CONFIG_FEATURE_BRCTL_FANCY is not set
+# CONFIG_FEATURE_BRCTL_SHOW is not set
+CONFIG_DNSD=y
+CONFIG_ETHER_WAKE=y
+CONFIG_FAKEIDENTD=y
+CONFIG_FTPD=y
+CONFIG_FEATURE_FTP_WRITE=y
+CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST=y
+CONFIG_FTPGET=y
+CONFIG_FTPPUT=y
+CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y
+CONFIG_HOSTNAME=y
+# CONFIG_HTTPD is not set
+# CONFIG_FEATURE_HTTPD_RANGES is not set
+# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set
+# CONFIG_FEATURE_HTTPD_SETUID is not set
+# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set
+# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set
+# CONFIG_FEATURE_HTTPD_CGI is not set
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set
+# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set
+# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set
+# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set
+# CONFIG_FEATURE_HTTPD_PROXY is not set
+# CONFIG_FEATURE_HTTPD_GZIP is not set
+CONFIG_IFCONFIG=y
+CONFIG_FEATURE_IFCONFIG_STATUS=y
+CONFIG_FEATURE_IFCONFIG_SLIP=y
+CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y
+CONFIG_FEATURE_IFCONFIG_HW=y
+CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y
+CONFIG_IFENSLAVE=y
+CONFIG_IFPLUGD=y
+CONFIG_IFUPDOWN=y
+CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
+CONFIG_FEATURE_IFUPDOWN_IP=y
+CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y
+# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set
+CONFIG_FEATURE_IFUPDOWN_IPV4=y
+CONFIG_FEATURE_IFUPDOWN_IPV6=y
+CONFIG_FEATURE_IFUPDOWN_MAPPING=y
+CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP=y
+# CONFIG_INETD is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set
+# CONFIG_FEATURE_INETD_RPC is not set
+CONFIG_IP=y
+CONFIG_FEATURE_IP_ADDRESS=y
+CONFIG_FEATURE_IP_LINK=y
+CONFIG_FEATURE_IP_ROUTE=y
+CONFIG_FEATURE_IP_TUNNEL=y
+CONFIG_FEATURE_IP_RULE=y
+CONFIG_FEATURE_IP_SHORT_FORMS=y
+# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
+CONFIG_IPADDR=y
+CONFIG_IPLINK=y
+CONFIG_IPROUTE=y
+CONFIG_IPTUNNEL=y
+CONFIG_IPRULE=y
+CONFIG_IPCALC=y
+CONFIG_FEATURE_IPCALC_FANCY=y
+CONFIG_FEATURE_IPCALC_LONG_OPTIONS=y
+CONFIG_NETSTAT=y
+# CONFIG_FEATURE_NETSTAT_WIDE is not set
+CONFIG_FEATURE_NETSTAT_PRG=y
+CONFIG_NSLOOKUP=y
+# CONFIG_NTPD is not set
+# CONFIG_FEATURE_NTPD_SERVER is not set
+CONFIG_PSCAN=y
+CONFIG_ROUTE=y
+CONFIG_SLATTACH=y
+CONFIG_TCPSVD=y
+CONFIG_TELNET=y
+CONFIG_FEATURE_TELNET_TTYPE=y
+CONFIG_FEATURE_TELNET_AUTOLOGIN=y
+CONFIG_TELNETD=y
+CONFIG_FEATURE_TELNETD_STANDALONE=y
+# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set
+CONFIG_TFTP=y
+# CONFIG_TFTPD is not set
+
+#
+# Common options for tftp/tftpd
+#
+CONFIG_FEATURE_TFTP_GET=y
+CONFIG_FEATURE_TFTP_PUT=y
+CONFIG_FEATURE_TFTP_BLOCKSIZE=y
+CONFIG_FEATURE_TFTP_PROGRESS_BAR=y
+CONFIG_TFTP_DEBUG=y
+CONFIG_TRACEROUTE=y
+CONFIG_TRACEROUTE6=y
+# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set
+# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set
+# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set
+CONFIG_TUNCTL=y
+CONFIG_FEATURE_TUNCTL_UG=y
+CONFIG_UDHCPC6=y
+# CONFIG_UDHCPD is not set
+# CONFIG_DHCPRELAY is not set
+# CONFIG_DUMPLEASES is not set
+# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set
+# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set
+CONFIG_DHCPD_LEASES_FILE=""
+# CONFIG_UDHCPC is not set
+# CONFIG_FEATURE_UDHCPC_ARPING is not set
+# CONFIG_FEATURE_UDHCP_PORT is not set
+CONFIG_UDHCP_DEBUG=0
+# CONFIG_FEATURE_UDHCP_RFC3397 is not set
+# CONFIG_FEATURE_UDHCP_8021Q is not set
+CONFIG_UDHCPC_DEFAULT_SCRIPT=""
+CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=0
+CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS=""
+CONFIG_UDPSVD=y
+CONFIG_VCONFIG=y
+CONFIG_WGET=y
+CONFIG_FEATURE_WGET_STATUSBAR=y
+CONFIG_FEATURE_WGET_AUTHENTICATION=y
+CONFIG_FEATURE_WGET_LONG_OPTIONS=y
+CONFIG_FEATURE_WGET_TIMEOUT=y
+CONFIG_ZCIP=y
+
+#
+# Print Utilities
+#
+# CONFIG_LPD is not set
+CONFIG_LPR=y
+# CONFIG_LPQ is not set
+
+#
+# Mail Utilities
+#
+CONFIG_MAKEMIME=y
+CONFIG_FEATURE_MIME_CHARSET="us-ascii"
+CONFIG_POPMAILDIR=y
+CONFIG_FEATURE_POPMAILDIR_DELIVERY=y
+CONFIG_REFORMIME=y
+CONFIG_FEATURE_REFORMIME_COMPAT=y
+# CONFIG_SENDMAIL is not set
+
+#
+# Process Utilities
+#
+CONFIG_IOSTAT=y
+CONFIG_LSOF=y
+CONFIG_MPSTAT=y
+CONFIG_NMETER=y
+CONFIG_PMAP=y
+CONFIG_POWERTOP=y
+# CONFIG_PSTREE is not set
+# CONFIG_PWDX is not set
+# CONFIG_SMEMCAP is not set
+CONFIG_UPTIME=y
+# CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set
+CONFIG_FREE=y
+CONFIG_FUSER=y
+CONFIG_KILL=y
+CONFIG_KILLALL=y
+CONFIG_KILLALL5=y
+CONFIG_PGREP=y
+CONFIG_PIDOF=y
+CONFIG_FEATURE_PIDOF_SINGLE=y
+CONFIG_FEATURE_PIDOF_OMIT=y
+CONFIG_PKILL=y
+CONFIG_PS=y
+# CONFIG_FEATURE_PS_WIDE is not set
+# CONFIG_FEATURE_PS_LONG is not set
+CONFIG_FEATURE_PS_TIME=y
+CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS=y
+# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set
+CONFIG_RENICE=y
+CONFIG_BB_SYSCTL=y
+CONFIG_TOP=y
+CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
+CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
+CONFIG_FEATURE_TOP_SMP_CPU=y
+CONFIG_FEATURE_TOP_DECIMALS=y
+CONFIG_FEATURE_TOP_SMP_PROCESS=y
+CONFIG_FEATURE_TOPMEM=y
+CONFIG_FEATURE_SHOW_THREADS=y
+CONFIG_WATCH=y
+
+#
+# Runit Utilities
+#
+CONFIG_RUNSV=y
+CONFIG_RUNSVDIR=y
+CONFIG_FEATURE_RUNSVDIR_LOG=y
+CONFIG_SV=y
+CONFIG_SV_DEFAULT_SERVICE_DIR="/var/service"
+CONFIG_SVLOGD=y
+CONFIG_CHPST=y
+CONFIG_SETUIDGID=y
+CONFIG_ENVUIDGID=y
+CONFIG_ENVDIR=y
+CONFIG_SOFTLIMIT=y
+# CONFIG_CHCON is not set
+# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set
+# CONFIG_GETENFORCE is not set
+# CONFIG_GETSEBOOL is not set
+# CONFIG_LOAD_POLICY is not set
+# CONFIG_MATCHPATHCON is not set
+# CONFIG_RESTORECON is not set
+# CONFIG_RUNCON is not set
+# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set
+# CONFIG_SELINUXENABLED is not set
+# CONFIG_SETENFORCE is not set
+# CONFIG_SETFILES is not set
+# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set
+# CONFIG_SETSEBOOL is not set
+# CONFIG_SESTATUS is not set
+
+#
+# Shells
+#
+CONFIG_ASH=y
+CONFIG_ASH_BASH_COMPAT=y
+# CONFIG_ASH_IDLE_TIMEOUT is not set
+CONFIG_ASH_JOB_CONTROL=y
+CONFIG_ASH_ALIAS=y
+CONFIG_ASH_GETOPTS=y
+CONFIG_ASH_BUILTIN_ECHO=y
+CONFIG_ASH_BUILTIN_PRINTF=y
+CONFIG_ASH_BUILTIN_TEST=y
+CONFIG_ASH_CMDCMD=y
+CONFIG_ASH_MAIL=y
+CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
+CONFIG_ASH_RANDOM_SUPPORT=y
+CONFIG_ASH_EXPAND_PRMT=y
+CONFIG_CTTYHACK=y
+# CONFIG_HUSH is not set
+# CONFIG_HUSH_BASH_COMPAT is not set
+# CONFIG_HUSH_BRACE_EXPANSION is not set
+# CONFIG_HUSH_HELP is not set
+# CONFIG_HUSH_INTERACTIVE is not set
+# CONFIG_HUSH_SAVEHISTORY is not set
+# CONFIG_HUSH_JOB is not set
+# CONFIG_HUSH_TICK is not set
+# CONFIG_HUSH_IF is not set
+# CONFIG_HUSH_LOOPS is not set
+# CONFIG_HUSH_CASE is not set
+# CONFIG_HUSH_FUNCTIONS is not set
+# CONFIG_HUSH_LOCAL is not set
+# CONFIG_HUSH_RANDOM_SUPPORT is not set
+# CONFIG_HUSH_EXPORT_N is not set
+# CONFIG_HUSH_MODE_X is not set
+# CONFIG_MSH is not set
+CONFIG_FEATURE_SH_IS_ASH=y
+# CONFIG_FEATURE_SH_IS_HUSH is not set
+# CONFIG_FEATURE_SH_IS_NONE is not set
+# CONFIG_FEATURE_BASH_IS_ASH is not set
+# CONFIG_FEATURE_BASH_IS_HUSH is not set
+CONFIG_FEATURE_BASH_IS_NONE=y
+CONFIG_SH_MATH_SUPPORT=y
+CONFIG_SH_MATH_SUPPORT_64=y
+CONFIG_FEATURE_SH_EXTRA_QUIET=y
+# CONFIG_FEATURE_SH_STANDALONE is not set
+# CONFIG_FEATURE_SH_NOFORK is not set
+CONFIG_FEATURE_SH_HISTFILESIZE=y
+
+#
+# System Logging Utilities
+#
+CONFIG_SYSLOGD=y
+CONFIG_FEATURE_ROTATE_LOGFILE=y
+CONFIG_FEATURE_REMOTE_LOG=y
+# CONFIG_FEATURE_SYSLOGD_DUP is not set
+# CONFIG_FEATURE_SYSLOGD_CFG is not set
+CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256
+CONFIG_FEATURE_IPC_SYSLOG=y
+CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16
+CONFIG_LOGREAD=y
+CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y
+CONFIG_KLOGD=y
+CONFIG_FEATURE_KLOGD_KLOGCTL=y
+CONFIG_LOGGER=y
diff --git a/patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-kernel_ver.patch b/patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-kernel_ver.patch
new file mode 100644
index 000000000..456fb08e1
--- /dev/null
+++ b/patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-kernel_ver.patch
@@ -0,0 +1,25 @@
+--- busybox-1.20.2/libbb/kernel_version.c
++++ busybox-1.20.2-kernel_ver/libbb/kernel_version.c
+@@ -20,18 +20,15 @@
+ int FAST_FUNC get_linux_version_code(void)
+ {
+ struct utsname name;
+- char *s;
++ char *s, *t;
+ int i, r;
+
+- if (uname(&name) == -1) {
+- bb_perror_msg("can't get system information");
+- return 0;
+- }
+-
++ uname(&name); /* never fails */
+ s = name.release;
+ r = 0;
+ for (i = 0; i < 3; i++) {
+- r = r * 256 + atoi(strtok(s, "."));
++ t = strtok(s, ".");
++ r = r * 256 + (t ? atoi(t) : 0);
+ s = NULL;
+ }
+ return r;
diff --git a/patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-ntpd.patch b/patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-ntpd.patch
new file mode 100644
index 000000000..17fc0b1c4
--- /dev/null
+++ b/patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-ntpd.patch
@@ -0,0 +1,11 @@
+--- busybox-1.20.2/networking/ntpd.c
++++ busybox-1.20.2-ntpd/networking/ntpd.c
+@@ -1840,7 +1840,7 @@ recv_and_process_client_pkt(void /*int f
+
+ /* Build a reply packet */
+ memset(&msg, 0, sizeof(msg));
+- msg.m_status = G.stratum < MAXSTRAT ? G.ntp_status : LI_ALARM;
++ msg.m_status = G.stratum < MAXSTRAT ? (G.ntp_status & LI_MASK) : LI_ALARM;
+ msg.m_status |= (query_status & VERSION_MASK);
+ msg.m_status |= ((query_status & MODE_MASK) == MODE_CLIENT) ?
+ MODE_SERVER : MODE_SYM_PAS;
diff --git a/patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-pkg-config-selinux.patch b/patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-pkg-config-selinux.patch
new file mode 100644
index 000000000..f39250c85
--- /dev/null
+++ b/patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-pkg-config-selinux.patch
@@ -0,0 +1,67 @@
+From b1cec5003b73080a8aa7ea277621bf1c71c3e8d6 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 20 Oct 2012 15:01:26 -0400
+Subject: [PATCH] build system: use pkg-config to look up selinux libs
+
+Newer versions of libselinux has started linking against more libs.
+Rather than continuing hardcoding things, switch to using pkg-config
+to query for its dependencies.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ Makefile | 1 +
+ Makefile.flags | 12 +++++++++++-
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index fccde4a..3a0a5e1 100644
+--- a/Makefile
++++ b/Makefile
+@@ -297,6 +297,7 @@ NM = $(CROSS_COMPILE)nm
+ STRIP = $(CROSS_COMPILE)strip
+ OBJCOPY = $(CROSS_COMPILE)objcopy
+ OBJDUMP = $(CROSS_COMPILE)objdump
++PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config
+ AWK = awk
+ GENKSYMS = scripts/genksyms/genksyms
+ DEPMOD = /sbin/depmod
+diff --git a/Makefile.flags b/Makefile.flags
+index c43c8dc..15dcc1f 100644
+--- a/Makefile.flags
++++ b/Makefile.flags
+@@ -74,6 +74,12 @@ ARCH_FPIC ?= -fpic
+ ARCH_FPIE ?= -fpie
+ ARCH_PIE ?= -pie
+
++# Usage: $(eval $(call pkg_check_modules,VARIABLE-PREFIX,MODULES))
++define pkg_check_modules
++$(1)_CFLAGS := $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --cflags $(2))
++$(1)_LIBS := $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs $(2))
++endef
++
+ ifeq ($(CONFIG_BUILD_LIBBUSYBOX),y)
+ # on i386: 14% smaller libbusybox.so
+ # (code itself is 9% bigger, we save on relocs/PLT/GOT)
+@@ -85,6 +91,7 @@ endif
+
+ ifeq ($(CONFIG_STATIC),y)
+ CFLAGS_busybox += -static
++PKG_CONFIG_FLAGS += --static
+ endif
+
+ ifeq ($(CONFIG_PIE),y)
+@@ -127,7 +134,10 @@ LDLIBS += pam pam_misc pthread
+ endif
+
+ ifeq ($(CONFIG_SELINUX),y)
+-LDLIBS += selinux sepol
++SELINUX_PC_MODULES = libselinux libsepol
++$(eval $(call pkg_check_modules,SELINUX,$(SELINUX_PC_MODULES)))
++CPPFLAGS += $(SELINUX_CFLAGS)
++LDLIBS += $(if $(SELINUX_LIBS),$(SELINUX_LIBS:-l%=%),$(SELINUX_PC_MODULES:lib%=%))
+ endif
+
+ ifeq ($(CONFIG_EFENCE),y)
+--
+1.7.12
+
diff --git a/patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-sys-resource.patch b/patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-sys-resource.patch
new file mode 100644
index 000000000..7b1850084
--- /dev/null
+++ b/patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-sys-resource.patch
@@ -0,0 +1,123 @@
+From 5a5dfcad6ba96d12d68bd7b39279215a8fee70d3 Mon Sep 17 00:00:00 2001
+From: Tias Guns <tias@ulyssis.org>
+Date: Sun, 10 Jun 2012 14:19:01 +0200
+Subject: [PATCH] inetd: fix build failure in Android
+
+Signed-off-by: Tias Guns <tias@ulyssis.org>
+Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
+(cherry picked from commit 64f763b42a43cbf36e401690ff6767c25575e520)
+---
+ networking/inetd.c | 1 +
+ 1 file changed, 1 insertion(+)
+--
+1.7.12
+
+From 246ea72843d5b7e9d4cd902dc5e9d71359196303 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Thu, 5 Jul 2012 23:19:09 -0400
+Subject: [PATCH] include sys/resource.h where needed
+
+We use functions from sys/resource.h in misc applets, but don't include
+the header. This breaks building with newer glibc versions, so add the
+include where needed.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+(cherry picked from commit c5fe9f7b723f949457263ef8e22ab807d5b549ce)
+---
+ loginutils/passwd.c | 1 +
+ miscutils/time.c | 1 +
+ networking/inetd.c | 1 +
+ networking/ntpd.c | 1 +
+ networking/ntpd_simple.c | 1 +
+ runit/chpst.c | 1 +
+ shell/shell_common.c | 1 +
+ 7 files changed, 7 insertions(+)
+
+diff --git a/loginutils/passwd.c b/loginutils/passwd.c
+index b83db00..a7006f0 100644
+--- a/loginutils/passwd.c
++++ b/loginutils/passwd.c
+@@ -15,6 +15,7 @@
+
+ #include "libbb.h"
+ #include <syslog.h>
++#include <sys/resource.h> /* setrlimit */
+
+ static void nuke_str(char *str)
+ {
+diff --git a/miscutils/time.c b/miscutils/time.c
+index 945f15f..ffed386 100644
+--- a/miscutils/time.c
++++ b/miscutils/time.c
+@@ -16,6 +16,7 @@
+ //usage: "\n -v Verbose"
+
+ #include "libbb.h"
++#include <sys/resource.h> /* getrusage */
+
+ /* Information on the resources used by a child process. */
+ typedef struct {
+diff --git a/networking/inetd.c b/networking/inetd.c
+index 1308d74..00baf69 100644
+--- a/networking/inetd.c
++++ b/networking/inetd.c
+@@ -165,6 +165,8 @@
+ //usage: "\n (default: 0 - disabled)"
+
+ #include <syslog.h>
++#include <sys/resource.h> /* setrlimit */
++#include <sys/socket.h> /* un.h may need this */
+ #include <sys/un.h>
+
+ #include "libbb.h"
+diff --git a/networking/ntpd.c b/networking/ntpd.c
+index 603801e..b885215 100644
+--- a/networking/ntpd.c
++++ b/networking/ntpd.c
+@@ -46,6 +46,7 @@
+ #include "libbb.h"
+ #include <math.h>
+ #include <netinet/ip.h> /* For IPTOS_LOWDELAY definition */
++#include <sys/resource.h> /* setpriority */
+ #include <sys/timex.h>
+ #ifndef IPTOS_LOWDELAY
+ # define IPTOS_LOWDELAY 0x10
+diff --git a/networking/ntpd_simple.c b/networking/ntpd_simple.c
+index 4ad44e4..1b7c66b 100644
+--- a/networking/ntpd_simple.c
++++ b/networking/ntpd_simple.c
+@@ -7,6 +7,7 @@
+ */
+ #include "libbb.h"
+ #include <netinet/ip.h> /* For IPTOS_LOWDELAY definition */
++#include <sys/resource.h> /* setpriority */
+ #ifndef IPTOS_LOWDELAY
+ # define IPTOS_LOWDELAY 0x10
+ #endif
+diff --git a/runit/chpst.c b/runit/chpst.c
+index ac296ba..ed72c8b 100644
+--- a/runit/chpst.c
++++ b/runit/chpst.c
+@@ -91,6 +91,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ //usage: "\n a SIGXCPU after N seconds"
+
+ #include "libbb.h"
++#include <sys/resource.h> /* getrlimit */
+
+ /*
+ Five applets here: chpst, envdir, envuidgid, setuidgid, softlimit.
+diff --git a/shell/shell_common.c b/shell/shell_common.c
+index 51c92d6..780e27e 100644
+--- a/shell/shell_common.c
++++ b/shell/shell_common.c
+@@ -18,6 +18,7 @@
+ */
+ #include "libbb.h"
+ #include "shell_common.h"
++#include <sys/resource.h> /* getrlimit */
+
+ const char defifsvar[] ALIGN1 = "IFS= \t\n";
+
+--
+1.7.12
+
diff --git a/patches/source/mkinitrd/init b/patches/source/mkinitrd/init
new file mode 100755
index 000000000..7122dbc3d
--- /dev/null
+++ b/patches/source/mkinitrd/init
@@ -0,0 +1,350 @@
+#!/bin/ash
+#
+# /init: init script to load kernel modules from an initramfs
+# This requires that your kernel supports initramfs!!!
+#
+# Copyright 2004 Slackware Linux, Inc., Concord, CA, USA
+# Copyright 2007, 2008, 2009, 2010, 2012 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+##################################################################################
+# With a generic kernel, you need to load the modules needed to mount the
+# root partition. This might mean a SCSI, RAID, or other drive controller
+# module, as well as the module to support the root filesystem. Once the
+# root partition is mounted all the other modules will be available so you
+# don't need to load them here.
+#
+# Config files used by this script:
+#
+# /rootdev Contains the name of the root device, such as: /dev/hda1
+#
+# /rootfs Contains the root filesystem type, such as: xfs
+#
+# /initrd-name Contains the name of the initrd file.
+#
+# /resumedev Contains the name of the device to resume from hibernation.
+#
+# /luksdev Contains colon separated list of luks encrypted devices to
+# be unlocked.
+#
+# /lukstrim Contains colon separated list of luks encrypted devices to
+# pass '--allow-discards' when unlocking
+#
+# /lukskey Contains the path to a LUKS key-file for automatic unlock
+# Format: LABEL=<partition_label>:/path/to/file
+# UUID=<partition_uuid>:/path/to/file
+#
+# /wait-for-root Contains a number - the init script will wait this amount
+# of seconds before creating device nodes.
+#
+# /keymap Contains the name for a custom keyboard map
+#
+# Optional:
+#
+# /load_kernel_modules
+# A script that uses modprobe to load the desired modules.
+#
+# There's an example in here. To actually use it, you'll
+# need to make it executable:
+#
+# chmod 755 load_kernel_modules
+##################################################################################
+# Changelog
+# 10-Dec-2012 <mozes@slackware.com>
+# * Added support for the official Kernel parameters to select root filesystem
+# type ('rootfstype') and pause before attempting to mount the root filesystem
+# ('rootdelay'). The original parameters may continue to be used.
+##################################################################################
+
+INITRD=$(cat /initrd-name)
+ROOTDEV=$(cat /rootdev)
+ROOTFS=$(cat /rootfs)
+LUKSDEV=$(cat /luksdev)
+LUKSTRIM=$(cat /lukstrim 2>/dev/null)
+LUKSKEY=$(cat /lukskey)
+RESUMEDEV=$(cat /resumedev)
+WAIT=$(cat /wait-for-root)
+KEYMAP=$(cat /keymap)
+INIT=/sbin/init
+
+PATH="/sbin:/bin:/usr/sbin:/usr/bin"
+
+# Mount /proc and /sys:
+mount -n proc /proc -t proc
+mount -n sysfs /sys -t sysfs
+mount -n tmpfs /run -t tmpfs -o mode=0755,size=32M,nodev,nosuid,noexec
+
+if grep devtmpfs /proc/filesystems 1>/dev/null 2>/dev/null ; then
+ DEVTMPFS=1
+ mount -n devtmpfs /dev -t devtmpfs -o size=8M
+fi
+
+# Parse command line
+for ARG in $(cat /proc/cmdline); do
+ case $ARG in
+ 0|1|2|3|4|5|6|S|s|single)
+ RUNLEVEL=$ARG
+ ;;
+ init=*)
+ INIT=$(echo $ARG | cut -f2 -d=)
+ ;;
+ luksdev=/dev/*)
+ LUKSDEV=$(echo $ARG | cut -f2 -d=)
+ ;;
+ lukskey=*)
+ LUKSKEY=$(echo $ARG | cut -f2- -d=)
+ ;;
+ rescue)
+ RESCUE=1
+ ;;
+ resume=*)
+ RESUMEDEV=$(echo $ARG | cut -f2- -d=)
+ ;;
+ root=/dev/*)
+ ROOTDEV=$(echo $ARG | cut -f2 -d=)
+ ;;
+ root=LABEL=*)
+ ROOTDEV=$(echo $ARG | cut -f2- -d=)
+ ;;
+ root=UUID=*)
+ ROOTDEV=$(echo $ARG | cut -f2- -d=)
+ ;;
+ rootfs=*|rootfstype=*)
+ ROOTFS=$(echo $ARG | cut -f2 -d=)
+ ;;
+ waitforroot=*|rootdelay=*)
+ WAIT=$(echo $ARG | cut -f2 -d=)
+ ;;
+ esac
+done
+
+# If udevd is available, use it to generate block devices
+# else use mdev to read sysfs and generate the needed devices
+if [ -x /sbin/udevd -a -x /sbin/udevadm ]; then
+ /sbin/udevd --daemon --resolve-names=never
+ /sbin/udevadm trigger --subsystem-match=block --action=add
+ /sbin/udevadm settle --timeout=10
+else
+ [ "$DEVTMPFS" != "1" ] && mdev -s
+fi
+
+# Load kernel modules (ideally this was already done by udev):
+if [ ! -d /lib/modules/$(uname -r) ]; then
+ echo "No kernel modules found for Linux $(uname -r)."
+elif [ -x ./load_kernel_modules ]; then # use load_kernel_modules script:
+ echo "${INITRD}: Loading kernel modules from initrd image:"
+ . ./load_kernel_modules
+else # load modules (if any) in order:
+ if ls /lib/modules/$(uname -r)/*.*o 1> /dev/null 2> /dev/null ; then
+ echo "${INITRD}: Loading kernel modules from initrd image:"
+ for module in /lib/modules/$(uname -r)/*.*o ; do
+ /sbin/modprobe $module
+ done
+ unset module
+ fi
+fi
+
+# Sometimes the devices need extra time to be available.
+# A root filesystem on USB is a good example of that.
+sleep $WAIT
+
+# Load a custom keyboard mapping:
+if [ -n "$KEYMAP" ]; then
+ echo "${INITRD}: Loading '$KEYMAP' keyboard mapping:"
+ tar xzOf /etc/keymaps.tar.gz ${KEYMAP}.bmap | loadkmap
+fi
+
+if [ "$RESCUE" = "" ]; then
+ # Initialize RAID:
+ if [ -x /sbin/mdadm ]; then
+ # If /etc/mdadm.conf is present, udev should DTRT on its own;
+ # If not, we'll make one and go from there:
+ if [ ! -r /etc/mdadm.conf ]; then
+ /sbin/mdadm -E -s >/etc/mdadm.conf
+ /sbin/mdadm -S -s
+ /sbin/mdadm -A -s
+ # This seems to make the kernel see partitions more reliably:
+ fdisk -l /dev/md* 1> /dev/null 2> /dev/null
+ fi
+ fi
+
+ # Unlock any encrypted partitions necessary to access the
+ # root filesystem, such as encrypted LVM Physical volumes, disk
+ # partitions or mdadm arrays.
+ # Unavailable devices such as LVM Logical Volumes will need to be
+ # deferred until they become available after the vgscan.
+
+ if [ -x /sbin/cryptsetup ]; then
+
+ # Determine if we have to use a LUKS keyfile:
+ if [ ! -z "$LUKSKEY" ]; then
+ mkdir /mountkey
+ KEYPART=$(echo $LUKSKEY |cut -f1 -d:)
+ KEYNAME=$(echo $KEYPART |cut -f2 -d=)
+ LUKSPATH="/mountkey$(echo $LUKSKEY |cut -f2 -d:)"
+ # Catch possible mount failure:
+ if blkid |grep "TYPE=\"vfat\"" |grep $KEYNAME 1>/dev/null 2>&1 ; then
+ MOUNTOPTS="-t vfat -o shortname=mixed"
+ else
+ MOUNTOPTS="-t auto"
+ fi
+ mount $MOUNTOPTS $(findfs $KEYPART) /mountkey 2>/dev/null
+ # Check if we can actually use this file:
+ if [ ! -f $LUKSPATH ]; then
+ LUKSKEY=""
+ else
+ echo ">>> Using LUKS key file: '$LUKSKEY'"
+ LUKSKEY="-d $LUKSPATH"
+ fi
+ fi
+
+ LUKSLIST_DEFERRED=""
+ LUKSLIST=$(echo $LUKSDEV | tr -s ':' ' ')
+ for LUKSDEV in $LUKSLIST ; do
+ if /sbin/cryptsetup isLuks ${LUKSDEV} 1>/dev/null 2>/dev/null ; then
+ if echo $ROOTDEV | grep -q "LABEL=" || echo $ROOTDEV | grep -q "UUID=" ; then
+ CRYPTDEV="luks$(basename $LUKSDEV)"
+ elif [ "x$ROOTDEV" = "x$(basename $ROOTDEV)" ]; then
+ CRYPTDEV="$ROOTDEV"
+ else
+ CRYPTDEV="luks$(basename $LUKSDEV)"
+ fi
+ if echo $LUKSTRIM | grep -wq $LUKSDEV 2>/dev/null ; then
+ LUKSOPTS="--allow-discards"
+ else
+ LUKSOPTS=""
+ fi
+ if [ -z "${LUKSOPTS}" ]; then
+ echo "Unlocking LUKS encrypted device '${LUKSDEV}' as luks mapped device '$CRYPTDEV':"
+ else
+ echo "Unlocking LUKS encrypted device '${LUKSDEV}' as luks mapped device '$CRYPTDEV' with '$LUKSOPTS':"
+ fi
+ /sbin/cryptsetup ${LUKSOPTS} ${LUKSKEY} luksOpen ${LUKSDEV} ${CRYPTDEV} </dev/tty0 >/dev/tty0 2>&1
+ if [ "$ROOTDEV" = "$LUKSDEV" -o "$ROOTDEV" = "$CRYPTDEV" ] ; then
+ ROOTDEV="/dev/mapper/$CRYPTDEV"
+ fi
+ else
+ LUKSLIST_DEFERRED="${LUKSLIST_DEFERRED} ${LUKSDEV}"
+ fi
+ done
+ fi
+
+ # Initialize LVM:
+ if [ -x /sbin/vgchange ]; then
+ mkdir -p /var/lock/lvm # this avoids useless warnings
+ /sbin/vgchange -ay --ignorelockingfailure 2>/dev/null
+ /sbin/udevadm settle --timeout=10
+ fi
+
+ # Unlock any LUKS encrypted devices that were deferred above but have now
+ # become available due to the vgscan (i.e. filesystems on LVM Logical Volumes)
+
+ if [ -x /sbin/cryptsetup -a -n "${LUKSLIST_DEFERRED}" ]; then
+ for LUKSDEV in ${LUKSLIST_DEFERRED} ; do
+ if /sbin/cryptsetup isLuks ${LUKSDEV} 1>/dev/null 2>/dev/null ; then
+ if echo $ROOTDEV | grep -q "LABEL=" || echo $ROOTDEV | grep -q "UUID=" ; then
+ CRYPTDEV="luks$(basename $LUKSDEV)"
+ elif [ "x$ROOTDEV" = "x$(basename $ROOTDEV)" ]; then
+ CRYPTDEV="$ROOTDEV"
+ else
+ CRYPTDEV="luks$(basename $LUKSDEV)"
+ fi
+ echo "Unlocking LUKS encrypted device '${LUKSDEV}' as luks mapped device '$CRYPTDEV':"
+ /sbin/cryptsetup ${LUKSKEY} luksOpen ${LUKSDEV} ${CRYPTDEV} </dev/tty0 >/dev/tty0 2>&1
+ if [ "$ROOTDEV" = "$LUKSDEV" -o "$ROOTDEV" = "$CRYPTDEV" ] ; then
+ ROOTDEV="/dev/mapper/$CRYPTDEV"
+ fi
+ else
+ echo "LUKS device '${LUKSDEV}' unavailable for unlocking!"
+ fi
+ done
+ /sbin/udevadm settle --timeout=10
+ fi
+
+ # Scan for btrfs multi-device filesystems:
+ if [ -x /sbin/btrfs ]; then
+ /sbin/btrfs device scan
+ fi
+
+ # Find root device if a label or UUID was given:
+ if echo $ROOTDEV | grep -q "LABEL=" || \
+ echo $ROOTDEV | grep -q "UUID=" ; then
+ ROOTDEV=$(findfs $ROOTDEV)
+ fi
+
+ # Clean up after LUKS unlock using a keyfile:
+ if grep -q mountkey /proc/mounts 2>/dev/null ; then
+ umount -l /mountkey
+ rmdir /mountkey 2>/dev/null
+ fi
+
+ # Resume state from swap
+ if [ "$RESUMEDEV" != "" ]; then
+ # Find resume device if a label or UUID was given:
+ if echo $RESUMEDEV | grep -q "LABEL=" || \
+ echo $RESUMEDEV | grep -q "UUID=" ; then
+ RESUMEDEV=$(findfs $RESUMEDEV)
+ elif ls -l $RESUMEDEV | grep -q "^l" ; then
+ RESUMEDEV=$(readlink -f $RESUMEDEV)
+ fi
+ echo "Trying to resume from $RESUMEDEV"
+ RESMAJMIN=$(ls -l $RESUMEDEV | tr , : | awk '{ print $5$6 }')
+ echo $RESMAJMIN > /sys/power/resume
+ fi
+
+ # Switch to real root partition:
+ /sbin/udevadm settle --timeout=10
+ echo 0x0100 > /proc/sys/kernel/real-root-dev
+ mount -o ro -t $ROOTFS $ROOTDEV /mnt
+
+ if [ ! -r /mnt/sbin/init ]; then
+ echo "ERROR: No /sbin/init found on rootdev (or not mounted). Trouble ahead."
+ echo " You can try to fix it. Type 'exit' when things are done."
+ echo
+ /bin/sh
+ fi
+else
+ echo
+ echo "RESCUE mode"
+ echo
+ echo " You can try to fix or rescue your system now. If you want"
+ echo " to boot into your fixed system, mount your root filesystem"
+ echo " read-only under /mnt:"
+ echo
+ echo " # mount -o ro -t filesystem root_device /mnt"
+ echo
+ echo " Type 'exit' when things are done."
+ echo
+ /bin/sh
+fi
+
+# Need to make sure OPTIONS+="db_persist" exists for all dm devices
+# That should be handled in /sbin/mkinitrd now
+/sbin/udevadm info --cleanup-db
+/sbin/udevadm control --exit
+
+unset ERR
+mount -o move /proc /mnt/proc
+mount -o move /sys /mnt/sys
+mount -o move /run /mnt/run
+
+[ "$DEVTMPFS" = "1" ] && mount -o move /dev /mnt/dev
+echo "${INITRD}: exiting"
+exec switch_root /mnt $INIT $RUNLEVEL
diff --git a/patches/source/mkinitrd/mkinitrd b/patches/source/mkinitrd/mkinitrd
new file mode 100644
index 000000000..ed8f3247b
--- /dev/null
+++ b/patches/source/mkinitrd/mkinitrd
@@ -0,0 +1,740 @@
+#!/bin/sh
+# Copyright 2004 Slackware Linux, Inc., Concord, CA, USA
+# Copyright 2004 Patrick J. Volkerding, Concord, CA, USA
+# Copyright 2007, 2008, 2009, 2010, 2011, 2015, 2016, 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Modified by Robby Workman <rworkman@slackware.com> 26 November 2007
+# to add support for mkinitrd.conf - No additional license terms added
+# Modified by Alan Hicks <alan@slackware.com> 27 November 2007 to enable
+# passing arguments to kernel modules - No additional license terms added
+# volkerdi - feel free to remove these :)
+# Modified by Eric Hameleers <alien@slackware.com> 3 April 2008
+# to add support custom keymaps - No additional license terms added
+# Modified by Patrick Volkerding <volkerdi@slackware.com> 17 Dec 2008
+# Added support to bail out if kernel modules are requested for a kernel
+# version that is not installed (thanks to Eric Hameleers), be more
+# verbose about showing modules added to the initrd (thanks to
+# Ellington Santos), and if "mount" returns /dev/root as the root device,
+# use readlink to resolve the device pointed to by the /dev/root
+# symlink, changed modprobe to use --ignore-install to avoid catching
+# custom "install" lines and causing /sbin/modprobe to be copied to the
+# initrd (thanks to Ken Milmore).
+# Of course, license terms remain unchanged.
+# Modified by Eric Hameleers <alien@slackware.com> 3 March 2010
+# Add lukskey option (-K). Automatically add kernel modules listed in
+# load-kernel-modules if that file is executable.
+# Yada yada yada.
+# Modified by Patrick Volkerding <volkerdi@slackware.com> 21 August 2012
+# Add Btrfs multi-device filesystem support option (-B).
+# Modified by Robby Workman <rworkman@slackware.com> 08 March 2017
+# to add support for TRIM on LUKS root devs
+# Modified by Patrick Volkerding <volkerdi@slackware.com> 29 June 2017
+# Add support for prepending a microcode update archive (-P).
+
+MKINITRD_VERSION=1.4.10
+
+# Don't include these things from /lib/udev/ in the initrd image
+LIBUDEV_BLACKLIST="\
+ ipod-set-info \
+ iphone-set-info \
+ check-mtp-device \
+ check-ptp-camera \
+ udev-configure-printer \
+ rules.d/60-openobex.rules \
+ rules.d/85-regulatory.rules \
+ "
+
+print_usage() {
+ cat << EOF
+Usage: mkinitrd [OPTION]
+
+mkinitrd creates an initial ramdisk (actually an initramfs cpio+gzip
+archive) used to load kernel modules that are needed to mount the
+root filesystem, or other modules that might be needed before the
+root filesystem is available. Other binaries may be added to the
+initrd, and the script is easy to modify. Be creative. :-)
+
+ -F Use the contents of /etc/mkinitrd.conf (optional)
+ If this is used in conjunction with any other options passed
+ on the command line, the command-line options will override
+ the config file options. See mkinitrd.conf(5) for details.
+ -c Clear the existing initrd tree first
+ -f Filesystem to use for root partition (must be used with -r)
+ --help Display this message
+ -h Device to resume from hibernation. Needs to be the name of
+ the swap partition holding the hibernation image.
+ -k Kernel version to use
+ -l Custom keymap to load. Like, 'nl' or 'de-latin1-nodeadkeys'
+ -m A colon (:) delimited list of kernel modules to load.
+ Additional options may be added to use when loading the
+ kernel modules (but in this case the entire list must be
+ wrapped with double quotes). Any dependencies of requested
+ modules will also be added to the initrd.
+ -o Output image (default /boot/initrd.gz)
+ -r Root partition device (must be used with -f)
+ -s Initrd source tree (default /boot/initrd-tree/)
+ -u Include udev in the initrd
+ -w Time to wait until all disks are detected
+ -C A colon (:) delimited list of luks encrypted block devices to be
+ unlocked by the initrd using cryptsetup. All devices that must
+ be unlocked in order to access the root filesystem must be
+ specified. (Use with '-r' parameter).
+ -T A colon (:) delimited list of luks encrypted block devices to be
+ passed the "--allow-discards" option when unlocked by the initrd
+ using cryptsetup. This has the effect of allowing TRIM on SSD drives.
+ Be sure your SSD supports this feature (correctly) before enabling
+ it. See fstrim(8) for more information.
+ -L Add support for LVM partitions
+ -K Use a USB key (fat-formatted) to unlock the root LUKS volume
+ The parameter value is filename of a keyfile, as well as the label
+ (or uuid) of the partition this file is on. This way, you can unlock
+ your computer automatically if you have a USB stick with your LUKS
+ key inserted at boot. A passphrase will still be asked if the LUKS
+ key can not be found.
+ For example, if your USB thumb drive has a FAT partition with label
+ "TRAVELSTICK" and the actual keyfile is called "/keys/alien.luks",
+ then you need to pass: -K LABEL=TRAVELSTICK:/keys/alien.luks
+ -B Add /sbin/btrfs to enable scanning for a root filesystem that is
+ part of a Btrfs multi-device filesystem.
+ -M Add the files in /etc/modprobe.d/ and /lib/modprobe.d/ to the initrd
+ -P Prepend the output image with the microcode CPIO archive given in arguments.
+ -R Add support for RAID partitions
+ -V Display version number
+
+A simple example: Build an initrd for a reiserfs root partition:
+
+ mkinitrd -c -m reiserfs
+
+Another example: Build an initrd image using Linux 2.6.35.4-smp kernel
+modules for a system with an ext4 root partition on /dev/sdb3:
+
+ mkinitrd -c -k 2.6.35.4-smp -m mbcache:jbd:ext4 -f ext4 -r /dev/sdb3
+
+Note that if you are already logged in with /dev/sdb3 as your /
+partition, and it is running ext4, this command works just the same:
+
+ mkinitrd -c -m ext4
+
+If run without options, mkinitrd will rebuild an initrd image using
+the contents of the $SOURCE_TREE directory, or, if that directory
+does not exist it will be created and populated, and then mkinitrd
+will exit.
+
+EOF
+}
+
+create_new_source_tree() {
+ mkdir -p $SOURCE_TREE
+ # Make sure a kernel module directory exists:
+ mkdir -p $SOURCE_TREE/lib/modules/${KERNEL_VERSION}
+ # Add the initrd-tree skeleton:
+ ( cd $SOURCE_TREE ; tar xzf /usr/share/mkinitrd/initrd-tree.tar.gz )
+ # Make sure we have any block devices that might be needed:
+
+ SLOPPY_DEV_LIST=$(cat /proc/partitions)
+ for device in $SLOPPY_DEV_LIST ; do
+ if [ ! -r $SOURCE_TREE/dev/$device ]; then
+ if [ -b /dev/$device ]; then
+ if [ -L /dev/$device ]; then
+ cp -a --parents $(readlink -e /dev/$device) $SOURCE_TREE
+ fi
+ cp -a --parents /dev/$device $SOURCE_TREE
+ fi
+ fi
+ done
+}
+
+clear_source_tree() {
+ if [ -d "$SOURCE_TREE" ]; then
+ rm -rf $SOURCE_TREE
+ fi
+}
+
+build_initrd_image() {
+ # Make sure we have any block devices that might be needed:
+ SLOPPY_DEV_LIST=$(cat /proc/partitions)
+ for device in $SLOPPY_DEV_LIST ; do
+ if [ ! -r $SOURCE_TREE/dev/$device ]; then
+ if [ -b /dev/$device ]; then
+ if [ -L /dev/$device ]; then
+ cp -a --parents $(readlink -e /dev/$device) $SOURCE_TREE
+ fi
+ cp -a --parents /dev/$device $SOURCE_TREE
+ fi
+ fi
+ done
+ # Use the output image name written in the initrd-tree if present:
+ if [ ! -z "$(cat $SOURCE_TREE/initrd-name)" ]; then
+ OUTPUT_IMAGE=$(cat $SOURCE_TREE/initrd-name)
+ if [ "$OUTPUT_IMAGE" = "$(basename $OUTPUT_IMAGE)" ]; then
+ OUTPUT_IMAGE=/boot/$OUTPUT_IMAGE
+ fi
+ mkdir -p $(dirname $OUTPUT_IMAGE)
+ fi
+ # Wrap the initrd as an initramfs image and move it into place:
+ ( cd $SOURCE_TREE
+ rm -f $OUTPUT_IMAGE
+ find . | cpio -o -H newc | gzip -9c > $OUTPUT_IMAGE
+ )
+
+ if [ ! -z "${MICROCODE_ARCH}" ] ; then
+ cat ${MICROCODE_ARCH} ${OUTPUT_IMAGE} > ${OUTPUT_IMAGE}.2
+ mv ${OUTPUT_IMAGE}.2 ${OUTPUT_IMAGE}
+ fi
+ echo "$OUTPUT_IMAGE created."
+ echo "Be sure to run lilo again if you use it."
+}
+
+badconf_file() {
+ # This won't really help with what's *wrong* with the file,
+ # but it will at least give them a clue that there's a problem
+ echo "/etc/mkinitrd.conf is bad or does not exist."
+ echo "If the file does not exist, do not pass -F to mkinitrd."
+ exit 1
+}
+
+
+unify_libs() {
+ awk '/=. \// { print $3 }' | sort -u
+}
+
+copy_libs() {
+ # First copy the essential glibc files:
+ find /lib /lib64 -name "ld-*so*" -o -name "libnss_files*so*" -o -name "libnss_compat*so*" 2> /dev/null | xargs -I'{}' cp -P --parents '{}' $SOURCE_TREE/
+
+ # Then copy all remaining libs our initrd files link against:
+ COUNT=1
+ PRFX=$(tempfile --prefix ldd-)
+ TMPFILE=${PRFX}${COUNT}
+
+ find $SOURCE_TREE -type f -exec ldd {} 2>/dev/null \; | unify_libs > $TMPFILE
+ while [ "$COUNT" != "0" ]; do
+ COUNT=$((COUNT+1))
+ for i in $(cat ${TMPFILE}) ; do
+ ldd $i 2>/dev/null
+ done | unify_libs > ${PRFX}${COUNT}
+ if [ $(cat $TMPFILE ${PRFX}${COUNT} | sort |uniq -u | wc -l) -eq 0 ]; then
+ COUNT=0
+ else
+ TMPFILE=${PRFX}${COUNT}
+ fi
+ # emergency eject lever:
+ if [ "$COUNT" = "42" ]; then
+ COUNT=0
+ fi
+ done
+
+ for i in $(cat ${PRFX}* | sort -u) ; do
+ cp -P --parents ${i}* $SOURCE_TREE
+ done
+
+ (
+ cd $SOURCE_TREE
+ for i in $(find -L . -type l -exec readlink -m /{} \; 2>/dev/null ) ; do
+ cp -P --parents ${i} $SOURCE_TREE
+ done
+ )
+
+ rm ${PRFX}*
+}
+
+copy_modconf() {
+ mkdir -p $SOURCE_TREE/etc $SOURCE_TREE/lib
+ cp -a /etc/modprobe.d $SOURCE_TREE/etc
+ cp -a /lib/modprobe.d $SOURCE_TREE/lib/
+}
+
+# If --help is given, print_usage and exit:
+if echo $* | grep -wq '\--help' ; then
+ print_usage
+ exit 0
+fi
+
+# If -V given, print version and exit:
+if echo $* | grep -wq '\-V' ; then
+ echo "mkinitrd version $MKINITRD_VERSION"
+ exit 0
+fi
+
+# Default values if these aren't previously set.
+# Might be set from config file or by -s and -o options too.
+SOURCE_TREE=${SOURCE_TREE:-/boot/initrd-tree}
+OUTPUT_IMAGE=${OUTPUT_IMAGE:-""}
+KERNEL_VERSION=${KERNEL_VERSION:-"$(uname -r)"}
+# The initrd requires udev to function correctly:
+UDEV=1
+
+# Default actions without options:
+if [ -z "$1" ]; then
+ # We need a sensible default for this special case:
+ OUTPUT_IMAGE=${OUTPUT_IMAGE:-/boot/initrd.gz}
+ # If the output tree doesn't exist, create it and then exit:
+ if [ ! -d $SOURCE_TREE ]; then
+ echo "Nothing found at location $SOURCE_TREE, so we will create an"
+ echo -n "initrd directory structure there... "
+ create_new_source_tree
+ echo "done."
+ echo
+ echo "Now cd to $SOURCE_TREE and install some modules in your"
+ echo "module directory (lib/modules/${KERNEL_VERSION}). Then see init"
+ echo "for more information (there are a few other files to edit)."
+ echo "Finally, run mkinitrd again once the initrd-tree is ready,"
+ echo "and $OUTPUT_IMAGE will be created from it."
+ echo
+ exit 0
+ else
+ # If the source tree does exist, the default is to build the initrd
+ # image from it and then exit:
+ build_initrd_image
+ exit 0
+ fi
+fi # default no-option actions
+
+# Parse for the use config file option first or else the other command
+# line options can not override /etc/mkinitrd.conf.
+for opt in "$@"; do
+ if [ "$opt" = "-F" ]; then
+ if [ -e /etc/mkinitrd.conf ]; then
+ . /etc/mkinitrd.conf || badconf_file
+ else
+ badconf_file
+ fi
+ fi
+done
+
+# Parse options:
+while [ ! -z "$1" ]; do
+ case $1 in
+ -c)
+ CLEAR_TREE=1
+ shift
+ ;;
+ -f)
+ ROOTFS="$2"
+ shift 2
+ ;;
+ -h)
+ RESUMEDEV="$2"
+ shift 2
+ ;;
+ -k)
+ KERNEL_VERSION="$2"
+ shift 2
+ ;;
+ -l)
+ KEYMAP="$2"
+ shift 2
+ ;;
+ -m)
+ MODULE_LIST="$2"
+ shift 2
+ ;;
+ -o)
+ # canonicalize filename:
+ OUTPUT_IMAGE="$(readlink -m $2)"
+ shift 2
+ ;;
+ -r)
+ ROOTDEV="$2"
+ shift 2
+ ;;
+ -s)
+ # canonicalize filename:
+ SOURCE_TREE="$(readlink -m $2)"
+ shift 2
+ ;;
+ -u)
+ UDEV=1
+ shift
+ ;;
+ -w)
+ WAIT="$2"
+ shift 2
+ ;;
+ -C)
+ CRYPT=1
+ LUKSDEV="$2"
+ shift 2
+ ;;
+ -K)
+ LUKSKEY="$2"
+ shift 2
+ ;;
+ -T)
+ LUKSTRIM="$2"
+ shift 2
+ ;;
+ -L)
+ LVM=1
+ shift
+ ;;
+ -B)
+ BTRFS=1
+ shift
+ ;;
+ -M)
+ MODCONF=1
+ shift
+ ;;
+ -P)
+ # canonicalize filename:
+ MICROCODE_ARCH="$(readlink -m $2)"
+ if [ ! -e "${MICROCODE_ARCH}" ] ; then
+ echo "Error, the microcode cpio archive ${MICROCODE_ARCH} does not exist."
+ exit 1
+ fi
+ shift 2
+ ;;
+
+ -R)
+ RAID=1
+ shift
+ ;;
+ *) # unknown, prevent infinite loop
+ shift
+ ;;
+ esac
+done
+
+# If kernel modules are needed but the kernel version is absent, exit now:
+if [ ! -d /lib/modules/$KERNEL_VERSION ]; then
+ echo "ERROR: No /lib/modules/$KERNEL_VERSION kernel modules tree found for kernel \"$KERNEL_VERSION\""
+ exit 1
+fi
+
+# If clearing source tree was requested, do that first
+if [ "$CLEAR_TREE" = "1" ]; then
+ clear_source_tree
+fi
+
+# If there's no $SOURCE_TREE, make one now:
+if [ ! -d "$SOURCE_TREE" ]; then
+ create_new_source_tree
+fi
+
+# If $ROOTDEV and $ROOTFS are not set, assume we want the
+# values for the currently mounted /
+# (unless we find that values are already set in the initrd-tree):
+if [ -z "$ROOTDEV" -a -z "$(cat $SOURCE_TREE/rootdev 2>/dev/null)" ]; then
+ ROOTDEV=$(mount | grep ' on / ' | cut -f 1 -d ' ')
+ if [ "$ROOTDEV" = "/dev/root" ]; then # find real root device
+ ROOTDEV="/dev/$(readlink /dev/root)"
+ fi
+fi
+if [ -z "$ROOTFS" -a -z "$(cat $SOURCE_TREE/rootfs 2>/dev/null)" ]; then
+ ROOTFS=$(mount | grep ' on / ' | cut -f 5 -d ' ')
+fi
+# If needed, write them in the initrd-tree:
+if [ ! -z "$ROOTDEV" ]; then
+ echo $ROOTDEV > $SOURCE_TREE/rootdev
+fi
+if [ ! -z "$ROOTFS" ]; then
+ echo $ROOTFS > $SOURCE_TREE/rootfs
+fi
+
+# If $WAIT is not set, assume we need only one second
+# to have all devices done
+# (unless we find that value is already set in the initrd-tree):
+if [ -z "$WAIT" -a -z "$(cat $SOURCE_TREE/wait-for-root)" ]; then
+ WAIT=1
+ # ARM devices need even more time:
+ case "$( uname -m )" in
+ arm*) WAIT=4;;
+ esac
+fi
+if [ ! -z "$WAIT" ]; then
+ echo $WAIT > $SOURCE_TREE/wait-for-root
+fi
+
+# If no OUTPUT_IMAGE was specified, read it from the SOURCE_TREE if possible:
+OUTPUT_IMAGE=${OUTPUT_IMAGE:-"$(cat $SOURCE_TREE/initrd-name)"}
+# If we still have no value, apply the default:
+OUTPUT_IMAGE=${OUTPUT_IMAGE:-"/boot/initrd.gz"}
+# Finally, write the image name into the SOURCE_TREE:
+echo "$OUTPUT_IMAGE" > $SOURCE_TREE/initrd-name
+
+# Fill /resumedev with the swap partition holding the hibernation image
+if [ ! -z "$RESUMEDEV" ]; then
+ echo $RESUMEDEV > $SOURCE_TREE/resumedev
+fi
+
+# Add custom keymap support if one was given
+if [ ! -z "$KEYMAP" ]; then
+ echo $KEYMAP > $SOURCE_TREE/keymap
+ cp /usr/share/mkinitrd/keymaps.tar.gz $SOURCE_TREE/etc/
+fi
+
+# If LUKSDEV was set in the config file, then we need to set CRYPT=1
+if [ ! -z "$LUKSDEV" ]; then
+ CRYPT=1
+fi
+
+# Check for LUKSTRIM
+if [ ! -z "$LUKSTRIM" ]; then
+ echo $LUKSTRIM > $SOURCE_TREE/lukstrim
+fi
+
+# If LUKSKEY was set in the config file, then give it a warm welcome:
+if [ ! -z "$LUKSKEY" ]; then
+ # $SOURCE_TREE/wait-for-root may have been configured earlier in the script,
+ # but we require at least 5 seconds for the USB stick to settle
+ # after insertion :
+ if [ ! -s $SOURCE_TREE/wait-for-root ] || [ $(cat $SOURCE_TREE/wait-for-root) -lt 5 ]; then
+ echo 5 > $SOURCE_TREE/wait-for-root
+ fi
+
+ # Several extra modules are needed to support a vfat formatted USB stick...
+ # assuming here we are using a western codepage.
+ # This possibly adds doublures, but we clean up the MODULE_LIST further down!
+ MODULE_LIST="${MODULE_LIST}:xhci-pci:ohci-pci:ehci-pci:xhci-hcd:ohci-hcd:ehci-hcd:uhci-hcd:usb-storage:hid:usbhid:fat:nls_cp437:nls_iso8859-1:msdos:vfat"
+
+ # Finally, write the lukskey to the initrd-tree:
+ echo $LUKSKEY > $SOURCE_TREE/lukskey
+fi
+
+# Include RAID support in initrd
+if [ ! -z "$RAID" ]; then
+ if [ -r /sbin/mdadm -a -r /sbin/mdmon ]; then
+ mkdir -p $SOURCE_TREE/sbin
+ cp /sbin/mdadm $SOURCE_TREE/sbin/mdadm
+ cp /sbin/mdmon $SOURCE_TREE/sbin/mdmon
+ chmod 0755 $SOURCE_TREE/sbin/mdadm
+ chmod 0755 $SOURCE_TREE/sbin/mdmon
+ mkdir -p $SOURCE_TREE/lib/udev/rules.d
+ echo 'KERNEL=="dm-[0-9]*", OPTIONS+="db_persist"' > \
+ $SOURCE_TREE/lib/udev/rules.d/95-dm-initrd.rules
+ if [ -r /etc/mdadm.conf ] ; then
+ cp /etc/mdadm.conf $SOURCE_TREE/etc
+ fi
+ else
+ echo "ERROR: mdadm and/or mdmon binary is missing, RAID support not installed"
+ fi
+fi
+
+# Include Btrfs support in initrd
+if [ ! -z "$BTRFS" ]; then
+ if [ -r /sbin/btrfs ]; then
+ mkdir -p $SOURCE_TREE/sbin
+ cp /sbin/btrfs $SOURCE_TREE/sbin/btrfs
+ chmod 0755 $SOURCE_TREE/sbin/btrfs
+ else
+ echo "ERROR: btrfs binary is missing, Btrfs support not installed"
+ fi
+fi
+
+# Include udev in initrd
+if [ ! -z "$UDEV" ]; then
+ cp /sbin/udev* $SOURCE_TREE/sbin/
+ cp -a /lib/udev $SOURCE_TREE/lib/
+ # But we don't want all of /lib/udev
+ for file in $(echo $LIBUDEV_BLACKLIST) ; do
+ # Replace with a null script (avoids error spew):
+ cat << EOF > $SOURCE_TREE/lib/udev/$file
+#!/bin/ash
+# This space is intentionally left blank
+EOF
+ done
+fi
+
+# Include LVM support in initrd
+if [ ! -z "$LVM" ]; then
+ if [ -f /sbin/lvm ]; then
+ mkdir -p $SOURCE_TREE/sbin
+ cp /sbin/lvm $SOURCE_TREE/sbin/lvm
+ ( cd $SOURCE_TREE/sbin
+ ln -s lvm vgchange 2>/dev/null
+ ln -s lvm vgscan 2>/dev/null )
+ else
+ echo "LVM binary is missing, LVM support isn't installed"
+ LVM=""
+ fi
+fi
+
+# Include cryptsetup (LUKS) support in initrd
+if [ ! -z "$CRYPT" ]; then
+ if [ -e /usr/sbin/cryptsetup ]; then
+ mkdir -p $SOURCE_TREE/sbin
+ cp /usr/sbin/cryptsetup $SOURCE_TREE/sbin/cryptsetup
+ if [ ! -e $SOURCE_TREE/sbin/udevadm ]; then
+ cat << EOF > $SOURCE_TREE/sbin/udevadm
+#!/bin/sh
+sleep 3
+EOF
+ chmod 0755 $SOURCE_TREE/sbin/udevadm
+ fi
+
+ # Write the underlying luks device to the initrd-tree:
+ echo $LUKSDEV > $SOURCE_TREE/luksdev
+ else
+ echo "Cryptsetup binary is missing, CRYPT support isn't installed"
+ CRYPT=""
+ fi
+fi
+
+# Include device mapper in initrd (needed for LUKS and LVM)
+if [ ! -z "$CRYPT" -o ! -z "$LVM" ]; then
+ cp /sbin/dmsetup $SOURCE_TREE/sbin/dmsetup
+ find /lib /lib64 -name "libdevmapper*so*" 2> /dev/null | xargs -I'{}' cp -P --parents '{}' $SOURCE_TREE/
+ if [ -z "${MODULE_LIST}" ] ; then
+ MODULE_LIST="dm-mod"
+ elif ! echo ${MODULE_LIST} | grep -q dm-mod ; then
+ MODULE_LIST="$MODULE_LIST:dm-mod"
+ fi
+ mkdir -p $SOURCE_TREE/lib/udev/rules.d
+ echo 'KERNEL=="dm-[0-9]*", OPTIONS+="db_persist"' > \
+ $SOURCE_TREE/lib/udev/rules.d/95-dm-initrd.rules
+fi
+
+# Make module directory:
+if [ ! -d $SOURCE_TREE/lib/modules/$KERNEL_VERSION ]; then
+ mkdir -p $SOURCE_TREE/lib/modules/$KERNEL_VERSION
+fi
+
+# Copy kmod/modprobe stuff to initrd:
+for i in kmod depmod insmod lsmod modinfo modprobe rmmod ; do
+ rm -f $SOURCE_TREE/sbin/$i ;
+ cp -a /sbin/$i $SOURCE_TREE/sbin ;
+done
+
+# Make sure modules.builtin and modules.order are there (for kmod):
+cp /lib/modules/$KERNEL_VERSION/modules.{builtin,order} \
+ $SOURCE_TREE/lib/modules/$KERNEL_VERSION
+
+# If an executable $SOURCE_TREE/load_kernel_modules already exists, then
+# we assume you will want to load the kernel modules mentioned in there.
+# This means, you do not have to explicitly add those on the commandline:
+if [ -x $SOURCE_TREE/load_kernel_modules ]; then
+ MODULE_LIST="${MODULE_LIST}:$(cat $SOURCE_TREE/load_kernel_modules |grep "^modprobe" |rev |cut -d/ -f1 |rev |cut -d. -f1)"
+fi
+
+# If the module list is not empty, copy the modules into place:
+if [ ! -z "$MODULE_LIST" ]; then
+ if grep -q "#modprobe reiserfs" $SOURCE_TREE/load_kernel_modules ; then
+ rm -f $SOURCE_TREE/load_kernel_modules
+ touch $SOURCE_TREE/load_kernel_modules
+ chmod 755 $SOURCE_TREE/load_kernel_modules
+ echo "# This is a script used to load the kernel modules." >> $SOURCE_TREE/load_kernel_modules
+ echo "# To use it, chmod it 755, and then add the insmod" >> $SOURCE_TREE/load_kernel_modules
+ echo "# lines needed to load your modules, like this:" >> $SOURCE_TREE/load_kernel_modules
+ echo >> $SOURCE_TREE/load_kernel_modules
+ fi
+
+ # Sanitize the modules list first, before any further processing.
+ # The awk command eliminates doubles without changing the order:
+ MODULE_LIST=$(echo $MODULE_LIST |tr -s ':' '\n' |awk '!x[$0]++' |tr '\n' ':')
+ MODULE_LIST=$(echo ${MODULE_LIST%:}) # Weed out a trailing ':'
+
+ # Count number of modules
+ # This INDEX number gives us an easy way to find individual
+ # modules and their arguments, as well as tells us how many
+ # times to run through the list
+ if ! echo $MODULE_LIST | grep ':' > /dev/null ; then # only 1 module specified
+ INDEX=1
+ else
+ # Trim excess ':' which will screw this routine:
+ MODULE_LIST=$(echo $MODULE_LIST | tr -s ':')
+ INDEX=1
+ while [ ! "$(echo "$MODULE_LIST" | cut -f $INDEX -d ':' )" = "" ]; do
+ INDEX=$(expr $INDEX + 1)
+ done
+ INDEX=$(expr $INDEX - 1) # Don't include the null value
+ fi
+
+ # Wrap everything in a while loop
+ i=0
+ while [ $i -ne $INDEX ]; do
+ i=$(( $i + 1 ))
+
+ # FULL_MOD is the module plus any arguments (if any)
+ # MODULE is the module name
+ # ARGS is any optional arguments to be passed to the kernel
+ FULL_MOD="$(echo "$MODULE_LIST" | cut -d ':' -f $i)"
+ MODULE="$(echo "$FULL_MOD" | cut -d ' ' -f 1 )"
+ # Test for arguments
+ if echo "$FULL_MOD" | grep ' ' > /dev/null; then
+ ARGS=" $(echo "$FULL_MOD" | cut -d ' ' -f 2- )"
+ else
+ unset ARGS
+ fi
+
+ # Get MODULE deps and prepare modprobe lines
+ /sbin/modprobe --set-version $KERNEL_VERSION --show-depends --ignore-install $MODULE 2>/dev/null \
+ | grep "^insmod " | cut -f 2 -d ' ' | while read SRCMOD; do
+
+ if ! grep -Eq " $(basename $SRCMOD .ko)(\.| |$)" $SOURCE_TREE/load_kernel_modules 2>/dev/null ; then
+ LINE="$(echo "modprobe -v $(basename ${SRCMOD%%.gz} .ko)" )"
+
+ # Test to see if arguments should be passed
+ # Over-ride the previously defined LINE variable if so
+ if [ "$(basename $SRCMOD .ko)" = "$MODULE" ]; then
+ # SRCMOD and MODULE are same, ARGS can be passed
+ LINE="$LINE$ARGS"
+ fi
+
+ fi
+
+ if ! grep -qx "$LINE" $SOURCE_TREE/load_kernel_modules ; then
+ echo "$LINE" >> $SOURCE_TREE/load_kernel_modules
+ fi
+
+ # Try to add the module to the initrd-tree. This should be done
+ # even if it exists there already as we may have changed compilers
+ # or otherwise caused the modules in the initrd-tree to need
+ # replacement.
+ if cp -a --parents $SRCMOD $SOURCE_TREE 2>/dev/null; then
+ echo "OK: $SRCMOD added."
+ # If a module needs firmware, copy that too
+ /sbin/modinfo -F firmware "$SRCMOD" | sed 's/^/\/lib\/firmware\//' |
+ while read SRCFW; do
+ if cp -a --parents "$SRCFW" $SOURCE_TREE 2>/dev/null; then
+ echo "OK: $SRCFW added."
+ else
+ echo "WARNING: Could not find firmware \"$SRCFW\""
+ fi
+ done
+ else
+ echo "WARNING: Could not find module \"$SRCMOD\""
+ fi
+
+ done
+ done
+
+ # Pregenerate the module dependency information
+ depmod -a -b $SOURCE_TREE ${KERNEL_VERSION}
+
+ # Copy /{etc,lib}/modprobe.d/* if desired
+ if [ ! -z $MODCONF ]; then
+ copy_modconf
+ fi
+
+fi
+
+# Copy needed libraries
+copy_libs
+
+# Make sure all libraries have symlinks:
+/sbin/ldconfig $(readlink -f $SOURCE_TREE)/lib/ 2> /dev/null
+/sbin/ldconfig $(readlink -f $SOURCE_TREE)/lib64/ 2> /dev/null
+/sbin/ldconfig
+
+# And finally, build the initrd:
+build_initrd_image
+
diff --git a/patches/source/mkinitrd/mkinitrd.8 b/patches/source/mkinitrd/mkinitrd.8
new file mode 100644
index 000000000..64dad3f43
--- /dev/null
+++ b/patches/source/mkinitrd/mkinitrd.8
@@ -0,0 +1,279 @@
+.\" -*- nroff -*-
+.ds g \" empty
+.ds G \" empty
+.\" Like TP, but if specified indent is more than half
+.\" the current line-length - indent, use the default indent.
+.de Tp
+.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
+.el .TP "\\$1"
+..
+.TH MKINITRD 8 "27 March 2010" "Slackware Version 13.1"
+.SH NAME
+mkinitrd \- create or rebuilt an initrd (initial ramdisk) using initramfs (simple cpio+gzip).
+.SH SYNOPSIS
+.B mkinitrd
+[
+.B \-F
+]
+[
+.B \-c
+]
+[
+.B \-f filesystem
+]
+[
+.B \-h hibernate_partition
+]
+[
+.B \-k kernel_version
+]
+[
+.B \-m module1:module2:module3...
+]
+[
+.B \-o output_file
+]
+[
+.B \-r root_device
+]
+[
+.B \-s source_tree
+]
+[
+.B \-u
+]
+[
+.B \-w wait_time
+]
+[
+.B \-C device1:device2:device3...
+]
+[
+.B \-K luks_keyfile
+]
+[
+.B \-P microcode_archive
+]
+[
+.B \-B
+]
+[
+.B \-L
+]
+[
+.B \-R
+]
+[
+.B \-V
+]
+.SH DESCRIPTION
+.B mkinitrd
+is used to build an initial ramdisk. An initial ramdisk is a very small
+set of files that are loaded into RAM and "mounted" (as initramfs doesn't
+actually use a filesystem) as the kernel boots (before the main root
+filesystem is mounted). The usual reason to use an initrd is because
+you need to load kernel modules before mounting the root partition.
+Usually these modules are required to support the filesystem used by the
+root partition (ext3, reiserfs, xfs), or perhaps the controller that the
+hard drive is attached to (SCSI, RAID, etc). Essentially, there are so many
+different options available in modern Linux kernels that it isn't practical
+to try to ship many different kernels to try to cover everyone's needs.
+It's a lot more flexible to ship a generic kernel and a set of kernel
+modules for it.
+.SH OPTIONS
+.TP
+.B \-F
+Use the contents of /etc/mkinitrd.conf as options to mkinitrd (optional).
+If this is used in conjunction with any other options passed on the command
+line, the command-line options will override the config file options.
+.br
+See mkinitrd.conf(5) for details.
+.TP
+.B \-c
+Clear the existing initrd tree (by default in /boot/initrd-tree/) first.
+If this is not done, running mkinitrd will add additional modules to the
+existing initrd.
+.TP
+.B \-f filesystem
+Specify the filesystem to use for the root partition. If this isn't given,
+mount will usually figure it out. This option must be used together with the
+\-r option in order to be beneficial.
+.TP
+.B \--help
+Display a help summary.
+.TP
+.B \-h hibernate_partition
+Specify the swap partition holding the hibernation image.
+.TP
+.B \-k kernel version
+Use kernel modules from the specified kernel version. mkinitrd will look
+for them in /lib/modules/(kernel version).
+.TP
+.B \-l keymap
+Load an alternative keyboard mapping. All supported keyboard mappings
+can be found in /usr/share/mkinitrd/keymaps.tar.gz
+Leave the '.bmap' out when you supply this parameter. E.g. '-l nl' will
+add support for dutch keyboard mapping to the initrd.
+.TP
+.B \-m module list
+This is a list of colon-delimited modules to build into the initrd.
+Any dependencies of requested modules will also be added to the initrd.
+Additional options may be added to use when loading the kernel modules
+(but in this case the entire list must be wrapped with double quotes).
+.TP
+.B \-o output image
+The file to write the initrd to. (default: /boot/initrd.gz)
+.TP
+.B \-r root partition
+Specify the device to be used as the root partition. If this isn't given, the
+kernel default will be used (which is usually fine). This option must be used
+together with the \-f option in order to be beneficial.
+.TP
+.B \-s source tree
+The directory to use as the source for the initrd. (default: /boot/initrd-tree/)
+.TP
+.B \-u
+Include udev in the initrd.
+.TP
+.B \-w
+The -w option specifies how long to wait in seconds before assuming that all the
+drives are spun up and ready to go.
+.TP
+.B \-C device list
+A colon (:) delimited list of luks encrypted block devices to be unlocked by
+the initrd using cryptsetup. All devices that must be unlocked in order to
+access the root filesystem must be specified. e.g.
+
+ -C /dev/sda2:/dev/sda3
+
+Each unlocked device will be assigned an automatically generated luks device
+name of the form luks<device> where '<device>' will be the basename of the
+encrypted device. e.g.
+
+ /dev/mapper/lukssda2
+
+As a convenience to users, where -r specifies one of the device names listed
+on the -C option it will be automatically adjusted to use the correct luks
+device name. i.e.
+
+ "-C /dev/sda2 -r /dev/sda2" and
+ "-C /dev/sda2 -r /dev/mapper/lukssda2"
+
+are equivalent.
+.br
+(Use with '-r' option).
+.TP
+.B \-K luks_keyfile
+When using cryptsetup to encrypt your partition, you can use a keyfile instead
+of a passphrase to unlock the LUKS volume. The LUKSKEY variable holds the
+filename of a keyfile, as well as the label (or uuid) of the partition this
+file is on. This way, you can unlock your computer automatically if you have a
+USB stick with your LUKS key inserted at boot. A passphrase will still be asked
+if the LUKS key can not be found.
+.br
+For example, if your USB thumb drive has a FAT partition with label
+"TRAVELSTICK" and the actual keyfile is called "/keys/alien.luks", then
+you need to set:
+
+ -K LABEL=TRAVELSTICK:/keys/alien.luks
+.TP
+.B \-T device list
+A colon (:) delimited list of luks encrypted block devices to be passed the
+"--allow-discards" option when unlocked by the initrd using cryptsetup, e.g.
+
+ -T /dev/sda2:/dev/sda4
+
+This has the effect of allowing TRIM on SSD drives. Be sure your SSD supports
+this feature (correctly) before enabling it. See fstrim(8) for more information.
+.TP
+.B \-P microcode_archive
+This option specifies a cpio archive containing updated microcode for your CPU.
+CPU manufacturers occasionally release such updates to fix bugs in the microcode
+currently embedded in the CPU. The microcode archive will be prepended to the
+output initrd, where the kernel will find it for early patching:
+
+ -P /boot/intel-ucode.cpio
+
+.TP
+.B \-B
+This option adds the btrfs utility to the initrd so that multi-device filesystems
+will be picked up by a scan (/sbin/btrfs device scan). This is needed if the
+root filesystem is a Btrfs multi-device filesystem.
+.TP
+.B \-L
+This option adds LVM support to the initrd, if the tools are
+available on the system.
+.TP
+.B \-R
+This option adds RAID support to the initrd, if a static mdadm binary is
+available on the system.
+.TP
+.B \-V
+Display version information and exit.
+.SH EXAMPLES
+A simple example: Build an initrd for a reiserfs root partition:
+
+ mkinitrd -c -m reiserfs
+
+Another example: Build an initrd image using Linux 2.6.33.1 kernel
+modules for a system with an ext3 root partition on /dev/sdb3:
+
+ mkinitrd -c -k 2.6.33.1 -m ext3 -f ext3 -r /dev/sdb3
+
+An example of a single encrypted partition setup:
+.br
+As a user convenience, the value for the "-r" option may also be specified as
+"/dev/sda2" in this example:
+
+ mkinitrd -c -k 2.6.33.1 \\
+ -m ext4:ehci-hcd:uhci-hcd:usbhid \\
+ -f ext4 -r /dev/mapper/lukssda2 \\
+ -C /dev/sda2 \\
+ -l uk
+
+Finally, A more complex example:
+.br
+This one is for a LVM Volume Group (rootvg) comprising of two LVM Physical
+Volumes, each of which is on a LUKS encrypted partition that will need to be
+unlocked before the root filesystem (/dev/rootvg/lvroot) can be accessed.
+
+ mkinitrd -c -k 2.6.29.6 \\
+ -m ext4:ehci-hcd:uhci-hcd:usbhid \\
+ -f ext4 -r /dev/rootvg/lvroot \\
+ -L -C /dev/sda2:/dev/sdb2 \\
+ -l uk
+
+If run without options, mkinitrd will rebuild an initrd image using
+the contents of the $SOURCE_TREE directory, or, if that directory
+does not exist it will be created and populated, and then mkinitrd
+will exit. These options are handy for building an initrd mostly
+by hand. After creating /boot/initrd-tree/, you can add modules and
+edit files by hand, and then rerun mkinitrd to create the initrd.
+
+Once the initrd is created, you'll need to tell your boot loader
+to load it. If you boot with LILO, you will need to add an initrd
+line to /etc/lilo.conf. Here's a section of lilo.conf that shows
+how to set this up:
+
+ # Linux bootable partition config begins
+ image = /boot/vmlinuz-generic-2.6.33.1
+ initrd = /boot/initrd.gz
+ root = /dev/sda3
+ label = Linux26331
+ read-only
+ # Linux bootable partition config ends
+
+Note that the line "root = /dev/sda3" is not needed if the root device
+has been configured in the initrd image.
+
+Once you've created the initrd and editing /etc/lilo.conf, you will
+need to run 'lilo' to write out the changed boot block. The next
+time you reboot the initrd should be loaded along with the kernel.
+
+Have fun!
+
+.SH SEE ALSO
+mkinitrd.conf (5)
+
+.SH AUTHOR
+Patrick J. Volkerding <volkerdi@slackware.com>
diff --git a/patches/source/mkinitrd/mkinitrd.SlackBuild b/patches/source/mkinitrd/mkinitrd.SlackBuild
new file mode 100755
index 000000000..f94b034db
--- /dev/null
+++ b/patches/source/mkinitrd/mkinitrd.SlackBuild
@@ -0,0 +1,146 @@
+#!/bin/sh
+
+# Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2015, 2016, 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+VERSION=${VERSION:-1.4.10}
+BB=1.20.2
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:--j7}
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-mkinitrd
+
+# Write a warning to stdout if the mkinitrd script has a different version:
+eval $( grep "^MKINITRD_VERSION=" $CWD/mkinitrd )
+if [ "$VERSION" != "$MKINITRD_VERSION" ]; then
+ echo "The version of this package ($VERSION) is not equal to the version of the mkinitrd script ($MKINITRD_VERSION)."
+ sleep 5
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf busybox-$BB
+tar xvf $CWD/busybox-$BB.tar.?z* || exit 1
+cd busybox-$BB
+
+if [ -d $CWD/fixes-$BB ]; then
+ for pfile in $CWD/fixes-$BB/*.patch ; do
+ patch -p1 < $pfile || exit 1
+ done
+fi
+
+chown -R root:root .
+sed -e \
+ 's#^CONFIG_PREFIX=.*#CONFIG_PREFIX="'$PKG'/usr/share/mkinitrd/initrd-tree"#' \
+ $CWD/busybox-dot-config > .config
+make oldconfig
+make $NUMJOBS || make || exit 1
+
+mkdir -p $PKG/usr/share/mkinitrd/initrd-tree/{bin,sbin}
+make install || exit 1
+rm -f $PKG/usr/share/mkinitrd/initrd-tree/linuxrc
+
+# Copying additional files:
+cp -a $CWD/mkinitrd_command_generator.sh $PKG/usr/share/mkinitrd
+chown root:root $PKG/usr/share/mkinitrd/mkinitrd_command_generator.sh
+chmod 755 $PKG/usr/share/mkinitrd/mkinitrd_command_generator.sh
+cp -a $CWD/keymaps.tar.gz $PKG/usr/share/mkinitrd
+chown root:root $PKG/usr/share/mkinitrd/keymaps.tar.gz
+chmod 644 $PKG/usr/share/mkinitrd/keymaps.tar.gz
+
+# Zip up the initrd-tree:
+( cd $PKG/usr/share/mkinitrd/initrd-tree
+ tar xf $CWD/_initrd-tree.tar.gz
+ cat $CWD/init > init
+
+ # These are useful for ARM:
+ mknod -m 644 dev/random c 1 8
+ mknod -m 644 dev/urandom c 1 9
+
+ tar czf ../initrd-tree.tar.gz .
+)
+rm -rf $PKG/usr/share/mkinitrd/initrd-tree
+
+# Add busybox docs:
+mkdir -p $PKG/usr/doc/busybox-$BB
+cp -a AUTHORS COPYING* INSTALL LICENSE README* \
+ $PKG/usr/doc/busybox-$BB
+cp -a e2fsprogs/README $PKG/usr/doc/busybox-$BB/README.e2fsprogs
+cp -a libbb/README $PKG/usr/doc/busybox-$BB/README.libbb
+cp -a shell/README $PKG/usr/doc/busybox-$BB/README.shell
+cp -a testsuite/README $PKG/usr/doc/busybox-$BB/README.testsuite
+
+mkdir -p $PKG/sbin
+cp -a $CWD/mkinitrd $PKG/sbin/mkinitrd
+chown root:root $PKG/sbin/mkinitrd
+chmod 755 $PKG/sbin/mkinitrd
+
+mkdir -p $PKG/usr/man/man{5,8}
+cat $CWD/mkinitrd.conf.5 | gzip -9c > $PKG/usr/man/man5/mkinitrd.conf.5.gz
+cat $CWD/mkinitrd.8 | gzip -9c > $PKG/usr/man/man8/mkinitrd.8.gz
+cat $CWD/mkinitrd_command_generator.8 | gzip -9c > $PKG/usr/man/man8/mkinitrd_command_generator.8.gz
+
+mkdir -p $PKG/etc
+cp -a $CWD/mkinitrd.conf.sample $PKG/etc/mkinitrd.conf.sample
+# ARM systems often need more time to find devices:
+case "$( uname -m )" in
+ arm*) sed -e 's@#WAIT="1"@#WAIT="4"@g' \
+ -i $PKG/etc/mkinitrd.conf.sample;;
+esac
+chown root:root $PKG/etc/mkinitrd.conf.sample
+chmod 644 $PKG/etc/mkinitrd.conf.sample
+
+mkdir -p $PKG/usr/doc/mkinitrd-$VERSION
+sed $CWD/README.initrd \
+ -e "s,@DATE@,$(date),g" \
+ -e "s,@KERNEL_VERSION@,$(uname -r),g" \
+ -e "s,@PACKAGE_VERSION@,$(uname -r | tr - _),g" \
+ -e "s,@LILO_KERNEL_NAME@,$(echo $(uname -r) | tr -d . | tr -d - ),g" \
+ -e "s,@MKINITRD_VERSION@,$VERSION,g" \
+ -e "s,@ARCH@,$ARCH,g" \
+ -e "s,@BUILD@,$BUILD,g" \
+ > $PKG/usr/doc/mkinitrd-$VERSION/README.initrd
+
+mkdir $PKG/boot
+ln -sf /usr/doc/mkinitrd-$VERSION/README.initrd $PKG/boot/README.initrd
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/mkinitrd-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/mkinitrd/mkinitrd.conf.5 b/patches/source/mkinitrd/mkinitrd.conf.5
new file mode 100644
index 000000000..65c180185
--- /dev/null
+++ b/patches/source/mkinitrd/mkinitrd.conf.5
@@ -0,0 +1,244 @@
+.\" mkinitrd.5 Robby Workman <rworkman@slackware.com>
+.\" 28 August 2010 "
+
+.TH MKINITRD.CONF 5 "27 March 2010" "Slackware 13.1"
+.SH NAME
+.B mkinitrd.conf(5)
+.SH SYNOPSIS
+.B mkinitrd.conf - optional configuration file for
+.I mkinitrd(8)
+
+.SH DESCRIPTION
+The
+.I mkinitrd.conf
+file contains options to be passed to
+.I mkinitrd(8)
+on every run if mkinitrd is executed with the -F flag.
+.br
+It is intended as a fast and easy way for the system administrator to
+pass options to mkinitrd without having to type them on each execution.
+
+Options passed to
+.I mkinitrd(8)
+on the command line will override any
+values set in the config file.
+
+.SH OPTIONS AND SYNTAX
+
+All options are in the format of OPTION="value"
+.br
+Unset variables have no effect.
+
+.TP 5
+.I SOURCE_TREE
+This is the location for the initrd's source tree.
+.br
+Defaults to "/boot/initrd-tree"
+
+.TP 5
+.I CLEAR_TREE
+This option specifies whether to clear the initrd source tree prior to
+creating the initrd.
+.br
+This requires a value of either "0" or "1" where 0=no and 1=yes
+.br
+Examples:
+.br
+CLEAR_TREE="0" # Do not clear initrd tree first
+.br
+CLEAR_TREE="1" # Clear initrd tree first
+
+It is recommended to leave this unset and pass "-c" on the command line
+when clearing the tree is desired. Clearing the tree is not desirable
+if you wish to build support for more than one kernel into the initrd
+image.
+
+.TP 5
+.I OUTPUT_IMAGE
+This is the location for the initrd image that is created.
+.br
+Defaults to "/boot/initrd.gz"
+
+.TP 5
+.I KERNEL_VERSION
+This is the kernel version for which the initrd should be created.
+.br
+Defaults to "$(uname -r)"
+
+.TP 5
+.I KEYMAP
+This is the custom keyboard map that should be loaded instead of the
+default 'us' keymap.
+.br
+The file /usr/share/mkinitrd/keymaps.tar.gz contains all possible keymaps
+to choose from (omit the '.bmap' extension in the mkinitrd command)
+.br
+Example: KEYMAP="nl"
+
+.TP 5
+.I MODULE_LIST
+This should be a colon-separated list of modules you wish to be included
+in the initrd image.
+.br
+Example: MODULE_LIST="ext3:mbcache:jbd"
+
+If you have loadtime options that you need to specify when loading kernel
+modules, those can be added here as well.
+.br
+Example: MODULE_LIST="module1:module2 option=1:module3"
+
+.TP 5
+.I LUKSDEV
+Contains a colon (:) delimited list of luks encrypted block devices to be
+unlocked by the initrd using cryptsetup. All devices that must be unlocked
+in order to access the root filesystem must be specified.
+.br
+Example: LUKSDEV="/dev/sda2:/dev/sda3"
+
+Each unlocked device will be assigned an automatically generated luks device
+name of the form luks<device> where '<device>' will be the basename of the
+encrypted device. e.g.
+
+ /dev/mapper/lukssda2
+
+As a convenience to users, if
+.I ROOTDEV
+(see below) specifies one of the device names listed in the
+.I LUKSDEV
+option, then it will be automatically adjusted to use the correct luks
+device name. i.e. when specifying
+.I "LUKSDEV=/dev/sda2"
+then
+.I "ROOTDEV=/dev/sda2"
+and
+.I "ROOTDEV=/dev/mapper/lukssda2"
+are equivalent.
+
+.TP 5
+.I LUKSKEY
+When using cryptsetup to encrypt your partition, you can use a keyfile instead
+of a passphrase to unlock the LUKS volume. The LUKSKEY variable holds the
+filename of a keyfile, as well as the label (or uuid) of the partition this
+file is on. This way, you can unlock your computer automatically if you have a
+USB stick with your LUKS key inserted at boot. A passphrase will still be asked
+if the LUKS key can not be found.
+.br
+For example, if your USB thumb drive has a FAT partition with label
+"TRAVELSTICK" and the actual keyfile is called "/keys/alien.luks", then
+you need to set:
+.br
+LUKSKEY="LABEL=TRAVELSTICK:/keys/alien.luks"
+
+.TP 5
+.I LUKSTRIM
+Contains a colon (:) delimited list of luks encrypted block devices to be
+passed the "--allow-discards" option when unlocked by the initrd using
+cryptsetup. This has the effect of allowing TRIM on SSD drives. Be sure
+your SSD supports this feature (correctly) before enabling it.
+.br
+See fstrim(8) for more information.
+.br
+Example: LUKSTRIM="/dev/sda2:/dev/sda4"
+
+.TP 5
+.I ROOTDEV
+The device on which your root filesystem is located.
+.br
+Example: ROOTDEV="/dev/sda2"
+
+If you are using cryptsetup and an encrypted root filesystem, be sure to
+read the option above for LUKSDEV or Bad Things will happen.
+
+.TP 5
+.I ROOTFS
+The filesystem type of your root filesystem
+.br
+Example: ROOTFS="ext3"
+
+.TP 5
+.I RAID
+This option adds the mdadm binary to the initrd to support RAID.
+Additional modules may be required, depending on your kernel
+configuration. If you wish to add LVM support to the initrd, then
+set this to 1; otherwise, leave it unset or set it to 0.
+.br
+Examples:
+.br
+RAID="0" # Do not add RAID support to initrd
+.br
+RAID="1" # Add RAID support to initrd
+
+.TP 5
+.I LVM
+This option adds support for LVM partitions into the initrd.
+If you wish to add LVM support to the initrd, then set this to 1;
+otherwise, leave it unset or set it to 0.
+.br
+Examples:
+.br
+LVM="0" # Do not add LVM support to initrd
+.br
+LVM="1" # Add LVM support to initrd
+
+.TP 5
+.I UDEV
+Use UDEV in the initrd.
+.br
+Examples:
+.br
+UDEV="0" # Do not use udev in the initrd
+.br
+UDEV="1" # Use udev in the initrd (this is the default)
+
+.TP 5
+.I WAIT
+This defines the time to wait, in seconds, until all disks are detected.
+.br
+This is useful for allowing extra time that might be needed for slow usb disks or systems with large amounts of storage to become ready.
+.br
+If not defined, the default is 1 second.
+
+.TP 5
+.I RESUMEDEV
+The swap partition holding your hibernation image.
+.br
+Example: RESUMEDEV="/dev/sda2"
+
+.TP 5
+.I MODCONF
+This option defines whether to copy the module-init-tools config files
+from /etc/modprobe.d/ into the initrd. This will not usually be necessary,
+but if you need certain modules to be loaded with special options, and you
+have this configured in a file in /etc/modprobe.d/, this is one way to
+accomplish the desired goal.
+.br
+Examples:
+.br
+MODCONF="0" # Do not add /etc/modprobe.d/* to the initrd
+.br
+MODCONF="1" # Add /etc/modprobe.d/* to the initrd
+
+.TP 5
+.I MICROCODE_ARCH
+This option specifies a cpio archive containing updated microcode for your CPU.
+CPU manufacturers occasionally release such updates to fix bugs in the microcode
+currently embedded in the CPU. The microcode archive will be prepended to the
+output initrd, where the kernel will find it for early patching.
+.br
+Examples:
+.br
+MICROCODE_ARCH="/boot/intel-ucode.cpio"
+
+.SH FILES
+.I /etc/mkinitrd.conf
+.br
+See /etc/mkinitrd.conf.sample
+
+.SH "SEE ALSO"
+.BR mkinitrd "(8)"
+
+.SH BUGS
+None known :-)
+
+.SH MISCELLANEOUS
+Support for mkinitrd.conf was added in mkinitrd-1.3.0
diff --git a/patches/source/mkinitrd/mkinitrd.conf.sample b/patches/source/mkinitrd/mkinitrd.conf.sample
new file mode 100644
index 000000000..70256ef38
--- /dev/null
+++ b/patches/source/mkinitrd/mkinitrd.conf.sample
@@ -0,0 +1,21 @@
+# mkinitrd.conf.sample
+# See "man mkinitrd.conf" for details on the syntax of this file
+#
+#SOURCE_TREE="/boot/initrd-tree"
+#CLEAR_TREE="0"
+#OUTPUT_IMAGE="/boot/initrd.gz"
+#KERNEL_VERSION="$(uname -r)"
+#KEYMAP="us"
+#MODULE_LIST="ext4"
+#LUKSDEV="/dev/sda2"
+#LUKSTRIM="/dev/sda2" # verify support with 'hdparm -I $dev | grep TRIM'
+#LUKSKEY="LABEL=TRAVELSTICK:/keys/alienbob.luks"
+#ROOTDEV="/dev/sda1"
+#ROOTFS="ext4"
+#RESUMEDEV="/dev/sda2"
+#RAID="0"
+#LVM="0"
+#UDEV="1"
+#MODCONF="0"
+#MICROCODE_ARCH="/boot/intel-ucode.cpio"
+#WAIT="1"
diff --git a/patches/source/mkinitrd/mkinitrd_command_generator.8 b/patches/source/mkinitrd/mkinitrd_command_generator.8
new file mode 100644
index 000000000..954fab484
--- /dev/null
+++ b/patches/source/mkinitrd/mkinitrd_command_generator.8
@@ -0,0 +1,187 @@
+'\" t
+.\" Title: mkinitrd_command_generator
+.\" Author: Eric Hameleers
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\" Date: 2016-02-07
+.\" Manual: Slackware Tools
+.\" Source: http://www.slackware.com 1.40
+.\" Language: English
+.\"
+.TH "MKINITRD_COMMAND_GEN" "8" "2016-02-07" "http://www\&.slackware\&.com" "Slackware Tools"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+mkinitrd_command_generator \- mkinitrd the easy way
+.SH "SYNOPSIS"
+.sp
+.nf
+mkinitrd_command_generator\&.sh [ \fIoptions\fR ] [ \fIkernel_filename\fR ]
+.fi
+.SH "OPTIONS"
+.PP
+\fB\-a \fR\fB\fIadditional params\fR\fR
+.RS 4
+Additional parameters to pass to mkinitrd\&.
+.RE
+.PP
+\fB\-c | \-\-conf\fR
+.RS 4
+Show a suitable mkinitrd configuration file\&.
+.RE
+.PP
+\fB\-h | \-\-help\fR
+.RS 4
+Show this help\&.
+.RE
+.PP
+\fB\-i | \-\-interactive\fR
+.RS 4
+Navigate through menus instead of using commandline arguments\&.
+.RE
+.PP
+\fB\-\-longhelp\fR
+.RS 4
+Show more detailed information/examples\&.
+.RE
+.PP
+\fB\-k \fR\fB\fIkernelversion\fR\fR
+.RS 4
+Use specific kernel version\&.
+.RE
+.PP
+\fB\-m \fR\fB\fIadditional mods\fR\fR
+.RS 4
+Additional modules to pass to mkinitrd, separated by colons (:)\&.
+.RE
+.PP
+\fB\-l | \-\-lilo\fR
+.RS 4
+Only show lilo\&.conf section (requires a kernel_filename)\&.
+.RE
+.PP
+\fB\-r | \-\-run\fR
+.RS 4
+Only show
+\fImkinitrd\fR
+command\&.
+.RE
+.SH "DESCRIPTION"
+.sp
+This script is useful in situations where you require an initrd image to boot your computer\&.
+.sp
+For instance, when booting a kernel that does not have support for your storage or root filesystem built in (such as the Slackware \fIgeneric\fR kernels)\&.
+.sp
+When you run the script without parameters, it will examine your running system, your current kernel version and will output an example of a \fImkinitrd\fR commandline that you can use to generate an initrd image containing enough driver support to boot the computer\&.
+.sp
+You can make it more specific: when you add the filename of a kernel as parameter to the script, it will determine the kernel version from that kernel, and also give an example of the lines that you should add to your \fI/etc/lilo\&.conf\fR file\&.
+.sp
+If you want your initrd image to have a custom name instead of the default \fI/boot/initrd\&.gz\fR you can add it as another parameter to the script, as follows:
+.sp
+mkinitrd_command_generator\&.sh \-a "\-o \fI/boot/custom\&.gz\fR"
+.sp
+The arguments to the \fI\-a\fR parameter will be used as additional arguments to the \fImkinitrd\fR command\&.
+.sp
+If you need additional modules in the initrd image, apart from what the script determines, you can pass then to the script using the \fI\-m\fR parameter as follows:
+.sp
+mkinitrd_command_generator\&.sh \-m "uhci\-hcd:usbhid:hid:hid\-generic"
+.sp
+The above example adds support for USB keyboards to the initrd \- you may need that if you have encrypted your root partition and need to enter a passphrase using a USB keyboard\&.
+.sp
+Instead of copying and pasting the script\(cqs output, you can create an initrd by directly executing the output, like in this example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+$(mkinitrd_command_generator\&.sh \-\-run /boot/vmlinuz\-generic\-4\&.4\&.1)
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+That used the \fI\-r\fR or \fI\-\-run\fR switch to make the script only write the \fImkinitrd\fR commandline to the terminal\&.
+.sp
+When you want to add a section for a specific kernel to \fI/etc/lilo\&.conf\fR directly, use the \fI\-l\fR or \fI\-\-lilo\fR switch and use a command like in this example:
+.sp
+mkinitrd_command_generator\&.sh \-\-lilo /boot/vmlinuz\-generic\-smp\-4\&.4\&.1 >>/etc/lilo\&.conf
+.sp
+That command will result in the following lines being added to your \fI/etc/lilo\&.conf\fR file (example for my hardware):
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fI# Linux bootable partition config begins\fR
+\fI# initrd created with \*(Aqmkinitrd \-c \-k 4\&.4\&.1 \-m mbcache:jbd2:ext4 \-f ext4 \-r /dev/sda7 \-u \-o /boot/initrd\&.gz\fR\*(Aq
+image = /boot/vmlinuz\-generic\-4\&.4\&.1
+initrd = /boot/initrd\&.gz
+root = /dev/sda7
+label = 4\&.4\&.1
+read\-only
+\fI# Linux bootable partition config ends\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+The last two examples show how easy it is to configure your computer for the use of an initrd if you need one\&. The only thing left to do afterwards is running \fIlilo\fR\&.
+.SH "EXIT STATUS"
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB0\fR Success
+\fB1\fR Failure
+.fi
+.if n \{\
+.RE
+.\}
+.SH "FILES"
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+/usr/share/mkinitrd/mkinitrd_command_generator\&.sh
+.fi
+.if n \{\
+.RE
+.\}
+.SH "BUGS"
+.sp
+Report bugs to Eric Hameleers <alien@slackware\&.com>
+.SH "SEE ALSO"
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+mkinitrd(1), lilo\&.conf(1)
+.fi
+.if n \{\
+.RE
+.\}
+.SH "AUTHOR"
+.PP
+\fBEric Hameleers\fR
+.RS 4
+Author.
+.RE
diff --git a/patches/source/mkinitrd/mkinitrd_command_generator.sh b/patches/source/mkinitrd/mkinitrd_command_generator.sh
new file mode 100644
index 000000000..33d9c9de3
--- /dev/null
+++ b/patches/source/mkinitrd/mkinitrd_command_generator.sh
@@ -0,0 +1,872 @@
+#!/bin/sh
+# $Id: mkinitrd_command_generator.sh,v 1.45 2011/02/17 09:27:05 eha Exp eha $
+# Copyright 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010, 2011 Eric Hameleers, Eindhoven, Netherlands
+# Contact: <alien@slackware.com>
+# Copyright 2008, 2009 PiterPUNK, Sao Paulo, SP, Brazil
+# Contact: <piterpunk@slackware.com>
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# -----------------------------------------------------------------------------
+#
+# Create an initrd which fits the system.
+# Take into account the use of LVM/LUKS/RAID.
+# Find out about any hardware drivers the system may need in an initrd when
+# booting from a generic lightweight kernel.
+#
+# -----------------------------------------------------------------------------
+
+# The script's revision number will be displayed in the help text:
+REV=$( echo "$Revision: 1.45 $" | cut -d' ' -f2 )
+
+# Define some essential parameter values:
+USING_LVM=""
+USING_LUKS=""
+USING_RAID=""
+MLIST=""
+REALDEV="" # The device that contains the LUKS volume
+BASEDEV="" # Lowest level device (raw block device or RAID volume)
+
+FSTAB=${FSTAB:-"/etc/fstab"} # so we can test with alternate fstab files
+
+# These are needed by -c and -i options:
+SOURCE_TREE=${SOURCE_TREE:-"/boot/initrd-tree"}
+CLEAR_TREE=${CLEAR_TREE:-1}
+KEYMAP=${KEYMAP:-"us"}
+UDEV=${UDEV:-1}
+# ARM devices need more time:
+case "$( uname -m )" in
+ arm*) WAIT_DEFAULT=4;;
+ *) WAIT_DEFAULT=1;;
+esac
+WAIT=${WAIT:-$WAIT_DEFAULT}
+
+# A basic explanation of the commandline parameters:
+basic_usage() {
+ cat <<-EOT
+
+ *** $(basename $0) revision $REV ***
+ Usage:
+ $(basename $0) [ options ] [ kernel_filename ]
+ Options:
+ -a <"additional params"> Additional parameters to pass to mkinitrd.
+ -c | --conf Show a suitable mkinitrd configuration file.
+ -h | --help Show this help.
+ -i | --interactive Navigate through menus instead of using
+ commandline arguments.
+ --longhelp Show more detailed information/examples.
+ -k <kernelversion> Use specific kernel version.
+ -m <"additional mods"> Additional modules to pass to mkinitrd,
+ separated by colons (:).
+ -l | --lilo Only show lilo.conf section
+ (requires a kernel_filename).
+ -r | --run Only show 'mkinitrd' command.
+ EOT
+}
+
+# More of a tutorial here:
+extended_usage() {
+ cat <<-EOT
+
+ This script is useful in situations where you require an initrd image
+ to boot your computer.
+ For instance, when booting a kernel that does not have support for your
+ storage or root filesystem built in (such as the Slackware 'generic'
+ kernels').
+
+ * When you run the script without parameters, it will examine your
+ running system, your current kernel version and will output an example
+ of a 'mkinitrd' commandline that you can use to generate an initrd
+ image containing enough driver support to boot the computer.
+
+ * You can make it more specific: when you add the filename of a kernel
+ as parameter to the script, it will determine the kernel version from
+ that kernel, and also give an example of the lines that you should add
+ to your '/etc/lilo.conf' file.
+
+ * If you want your initrd image to have a custom name instead of the
+ default '/boot/initrd.gz' you can add it as another parameter to the
+ script, as follows:
+
+ $(basename $0) -a "-o /boot/custom.gz"
+
+ The arguments to the '-a' parameter will be used as additional arguments
+ to the 'mkinitrd' command.
+
+ * If you need additional modules in the initrd image, apart from what
+ the script determines, you can pass then to the script using the '-m'
+ parameter as follows:
+
+ $(basename $0) -m "uhci-hcd:usbhid:hid_generic"
+
+ The above example adds support for USB keyboards to the initrd - you
+ may need that if you have encrypted your root partition and need to
+ enter a passphrase using a USB keyboard.
+
+ * Instead of copying and pasting the script's output, you can create
+ an initrd by directly executing the output, like in this example:
+
+ EOT
+
+ echo " \$($(basename $0) --run /boot/vmlinuz-generic-smp-2.6.35.11-smp)"
+
+ cat <<-EOT
+
+ That used the '-r' or '--run' switch to make the script only write
+ the 'mkinitrd' commandline to the terminal.
+
+ * When you want to add a section for a specific kernel to
+ '/etc/lilo.conf' directly, use the '-l' or '--lilo' switch and use a
+ command like in this example:
+
+ EOT
+
+ echo " $(basename $0) --lilo /boot/vmlinuz-generic-smp-2.6.35.11-smp >>/etc/lilo.conf"
+
+ cat <<-EOT
+
+ That command will result in the following lines being added to your
+ '/etc/lilo.conf' file (example for my hardware):
+
+ # Linux bootable partition config begins
+ # initrd created with 'mkinitrd -c -k 2.6.35.11-smp -m ata_generic:pata_amd:mbcache:jbd:ext3 -f ext3 -r /dev/hda7'
+ image = /boot/vmlinuz-generic-smp-2.6.35.11-smp
+ initrd = /boot/initrd.gz
+ root = /dev/hda7
+ label = 2.6.35.11-smp
+ read-only
+ # Linux bootable partition config ends
+
+ The last two examples show how easy it is to configure your computer
+ for the use of an initrd if you need one. The only thing left to do
+ afterwards is running 'lilo'.
+
+ EOT
+}
+
+# Find the device that holds the root partition:
+get_root_device() {
+ if [ -e $FSTAB ]; then
+ RD=$(cat $FSTAB |tr '\t' ' ' |grep -v '^ *#' |tr -s ' ' |grep ' / ' |cut -f1 -d' ')
+ if [ "$(echo $RD | cut -f1 -d=)" = "LABEL" -o "$(echo $RD | cut -f1 -d=)" = "UUID" ]; then
+ DKEY=$(echo $RD | cut -f1 -d=)
+ # The value can be LABEL=foo or LABEL='foo' or LABEL="foo"
+ DVAL=$(echo $RD | cut -f2 -d= | tr -d "'\042")
+ RD=$(/sbin/blkid | grep -w $DKEY | grep -w $DVAL | cut -f1 -d:)
+ fi
+ else
+ RD=$(grep -m1 "^/dev/.*[[:blank:]]/[[:blank:]]" /proc/mounts | cut -f1 -d' ')
+ fi
+ echo $RD
+}
+
+# Get the root fs information:
+get_rootfs_type() {
+ if $(type blkid 1>/dev/null 2>&1) ; then
+ blkid -s TYPE -o value $ROOTDEV
+ elif $(type vol_id 1>/dev/null 2>&1) ; then
+ vol_id $ROOTDEV | grep ID_FS_TYPE | cut -f2 -d=
+ else
+ # As a fallback, use:
+ cat $FSTAB |tr '\t' ' ' |grep -v '^ *#' |tr -s ' ' |grep ' / ' |cut -f3 -d' '
+ fi
+}
+
+# Add the module(s) needed for the root filesystem:
+add_rootfs_module() {
+ local FSMOD
+ FSMOD=$(/sbin/modprobe --set-version $KVER --show-depends ${ROOTFS} 2>/dev/null | while read LINE; do
+ echo $(basename $(echo $LINE | cut -d' ' -f2) .ko )
+ done)
+ if [ -n "$FSMOD" ]; then
+ [ -n "$MLIST" ] && echo "$MLIST:$(echo $FSMOD | tr ' ' ':')" \
+ || echo $FSMOD | tr ' ' ':'
+ fi
+}
+
+# Determine the list of kernel modules needed to support the root device:
+determine_blockdev_drivers() {
+ # Walk the /sys tree to find kernel modules that are
+ # required for our storage devices.
+ # Thanks to PiterPUNK for help with this code.
+ local MLIST
+ MLIST=$(for i in $(find /sys/block/*/ -name "device" -print0 | xargs -0 -i'{}' readlink -f '{}' | sort -u); do
+ /sbin/udevadm info --query=all --path=$i --attribute-walk | \
+ sed -ne 's/^[[:blank:]]\+DRIVER[S]*=="\([^"]\+\)"$/\1/p' | \
+ xargs -I@ /sbin/modprobe --set-version $KVER --show-depends @ \
+ 2>/dev/null | grep -v "builtin " | \
+ while read LINE ; do
+ echo $(basename $(echo $LINE | cut -d' ' -f2) .ko )
+ done
+ done)
+ MLIST=$( echo $MLIST | tr ' ' ':' )
+ echo $MLIST
+}
+
+# Search for USB keyboards:
+function add_usb_keyboard() {
+ local USBMOD
+ if cat /proc/bus/input/devices | sed -e 's/^$/\$/g' | \
+ tr "\n$" " \n" | grep -q " Phys=.*usb.* .*Handlers=.*kbd.*B:"; then
+ USBMOD="xhci-pci:ohci-pci:ehci-pci:xhci-hcd:uhci-hcd:ehci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch"
+ [ -n "$MLIST" ] && MLIST="$MLIST:$USBMOD" \
+ || MLIST="$USBMOD"
+ fi
+ echo $MLIST
+}
+
+# Determine what USB Host Controller is in use
+function add_usb_hcd() {
+ local USBMOD
+ for i in $(ls -Ld /sys/module/*_hcd/drivers/* 2> /dev/null); do
+ if ls -L $i | grep -q "[0-9a-f]*:" ; then
+ USBMOD=$( echo $i | cut -f4 -d/ | tr "_" "-")
+ [ -n "$MLIST" ] && MLIST="$MLIST:$USBMOD" \
+ || MLIST="$USBMOD"
+ fi
+ done
+ echo $MLIST
+}
+
+# Is the root partition on a (combination of) LVM/LUKS volume?
+check_luks_lvm_raid() {
+ if $( lvdisplay -c $ROOTDEV 1>/dev/null 2>/dev/null ); then
+ # Our root partition is on a LV:
+ USING_LVM=1
+ # Search the Physical Volume of our Logical Volume:
+ MYVG=$( echo $(lvdisplay -c $ROOTDEV 2>/dev/null) | cut -d: -f2 )
+ for LINE in $(pvdisplay -c) ; do
+ VG=$(echo $LINE | cut -d: -f2)
+ [ "$VG" = "$MYVG" ] && break
+ done
+ PV=$(echo $LINE | cut -d: -f1)
+ # Check if there is a LUKS device underneath:
+ if $( cryptsetup status $PV 1>/dev/null 2>/dev/null ) ; then
+ # Our root partition's LV is on a LUKS volume:
+ USING_LUKS=1
+ REALDEV=$( cryptsetup status $PV | grep 'device: ' | tr -d ' ' | cut -d: -f2 )
+ BASEDEV=$REALDEV
+ else
+ BASEDEV=$PV
+ fi
+ elif $( cryptsetup status $ROOTDEV 1>/dev/null 2>/dev/null ) ; then
+ # Our root device is on a LUKS volume:
+ USING_LUKS=1
+ REALDEV=$( cryptsetup status $ROOTDEV | grep 'device: ' | tr -d ' ' | cut -d: -f2 )
+ ROOTDEV=$(basename $ROOTDEV)
+ # Check for LVM:
+ for LV in $(lvdisplay -c 2>/dev/null | tr -d ' ' | cut -f1 -d:) ; do
+ # Note: cryptsetup shows the real device, whereas
+ # lvdisplay requires the /dev/<myvg>/... symlink to the real device.
+ if [ "$(readlink $LV)" = "$REALDEV" ]; then
+ REALDEV=$LV
+ break
+ fi
+ done
+ if $( lvdisplay -c $REALDEV 1>/dev/null 2>/dev/null ); then
+ # Our root partition's LUKS device is on a LV:
+ USING_LVM=1
+ # Search the Physical Volume of our Logical Volume:
+ MYVG=$( echo $(lvdisplay -c $REALDEV 2>/dev/null) | cut -d: -f2 )
+ for LINE in $(pvdisplay -c) ; do
+ VG=$(echo $LINE | cut -d: -f2)
+ [ "$VG" = "$MYVG" ] && break
+ done
+ PV=$(echo $LINE | cut -d: -f1)
+ BASEDEV=$PV
+ else
+ BASEDEV=$REALDEV
+ fi
+ else
+ BASEDEV=$ROOTDEV
+ fi
+
+ # Finally, we should check if base device is
+ # a real block device or a RAID volume:
+ for MD in $(cat /proc/mdstat | grep -w active | cut -d' ' -f1) ; do
+ if [ "$BASEDEV" = "/dev/$MD" ]; then
+ USING_RAID=1
+ break
+ fi
+ done
+}
+
+# Before we start
+[ -x /bin/id ] && CMD_ID="/bin/id" || CMD_ID="/usr/bin/id"
+if [ "$($CMD_ID -u)" != "0" ]; then
+ echo "You need to be root to run $(basename $0)."
+ exit 1
+fi
+
+# Parse the commandline parameters:
+while [ ! -z "$1" ]; do
+ case $1 in
+ --longhelp)
+ basic_usage
+ extended_usage
+ exit 0
+ ;;
+ -a)
+ MKINIT_PARAMS="$2"
+ shift 2
+ ;;
+ -c|--conf)
+ [ -n "$EMIT" ] && { echo "Do not mix incompatible parameters!"; exit 1; }
+ EMIT="conf"
+ shift
+ ;;
+ -h|--help)
+ basic_usage
+ exit 0
+ ;;
+ -i|--interactive)
+ INTERACTIVE=1
+ shift
+ ;;
+ -k)
+ KVER=$2
+ shift 2
+ ;;
+ -m)
+ MKINIT_MODS=$2
+ shift 2
+ ;;
+ -l|--lilo)
+ [ -n "$EMIT" ] && { echo "Do not mix incompatible parameters!"; exit 1; }
+ EMIT="lilo"
+ shift
+ ;;
+ -L|--fromlilo)
+ FROMLILO=1
+ shift
+ ;;
+ -r|--run)
+ [ -n "$EMIT" ] && { echo "Do not mix incompatible parameters!"; exit 1; }
+ EMIT="run"
+ shift
+ ;;
+ -R|--rootdev)
+ ROOTDEV=$2
+ shift 2
+ ;;
+ -*)
+ echo "Unsupported parameter '$1'!"
+ exit 1
+ ;;
+ *) # Everything else but switches (which start with '-') follows:
+ if [ -f $1 ]; then
+ KFILE=$1
+ # Construction of KFILE's full filename:
+ KFILEPATH=$(cd $(dirname $KFILE) && pwd)
+ if [ -L $KFILE ]; then
+ KFILE=$(readlink $KFILE)
+ else
+ KFILE=$(basename $KFILE)
+ fi
+ KFILE=${KFILEPATH}/$KFILE
+ if [ -z "$(file $KFILE | grep -E 'Linux kernel x86 boot|x86 boot sector')" ]; then
+ echo "File '$KFILE' does not look like it is a kernel file!"
+ exit 1
+ fi
+ else
+ echo "File $1 not found!"
+ exit 1
+ fi
+ shift
+ ;;
+ esac
+done
+
+# Determine what to show as output (other options may have set EMIT already)
+EMIT=${EMIT:-"all"}
+
+# An EMIT value of 'lilo' requires a kernel filename as script parameter:
+if [ "$EMIT" = "lilo" ]; then
+ if [ -z "$KFILE" ]; then
+ echo "A kernel_filename is required with the '-l|--lilo' option!"
+ exit 1
+ fi
+fi
+
+# Determine kernel version to use,
+# and check if modules for this kernel are actually present:
+if [ -z "$KVER" ]; then
+ if [ -n "$KFILE" ]; then
+ KVER="$(strings $KFILE | grep '([^ ]*@[^ ]*) #' | cut -f1 -d' ')"
+ else
+ KVER="$(uname -r)"
+ fi
+fi
+if [ ! -d /lib/modules/$KVER ]; then
+ echo "Modules for kernel $KVER aren't installed."
+ exit 1
+fi
+
+# Determine whether the user passed an alternate filename for the initrd:
+if [ -n "$MKINIT_PARAMS" ]; then
+ SRCHLIST="$MKINIT_PARAMS"
+ for ELEM in $MKINIT_PARAMS ; do
+ SRCHLIST=$(echo $SRCHLIST | cut -d' ' -f2-) # cut ELEM from the list
+ if [ "$ELEM" = "-o" ]; then
+ IMGFILE=$(echo $SRCHLIST | cut -d' ' -f1)
+ break
+ fi
+ done
+fi
+IMGFILE=${IMGFILE:-"/boot/initrd.gz"}
+
+# Get information about the root device / root filesystem:
+ROOTDEV=${ROOTDEV:-$(get_root_device)}
+ROOTFS=$(get_rootfs_type)
+
+# Determine the list of kernel modules needed to support the root device:
+MLIST=$(determine_blockdev_drivers)
+
+# Check if we are running in a kvm guest with virtio block device driver
+# (add all virtio modules, we sort out the doubles later):
+if echo $MLIST | grep -q "virtio"; then
+ MLIST="$MLIST:virtio:virtio_balloon:virtio_blk:virtio_ring:virtio_pci:virtio_net"
+fi
+
+# Determine if a USB keyboard is in use and include usbhid and hid_generic
+# to module list
+MLIST=$(add_usb_keyboard)
+
+# If we use any USB module, try to determine the Host Controller
+if echo $MLIST | grep -q "usb"; then
+ MLIST=$(add_usb_hcd)
+fi
+
+# Check what combination of LUKS/LVM/RAID we have to support:
+# This sets values for USING_LUKS, USING_LVM, USING_RAID, REALDEV and BASEDEV.
+check_luks_lvm_raid
+
+# This is the interactive part:
+if [ "$INTERACTIVE" = "1" ]; then
+ if [ "$FROMLILO" != "1" ]; then
+ dialog --stdout --title "WELCOME TO MKINITRD COMMAND GENERATOR" --msgbox "\
+The main goal of this utility is to create a good initrd to \
+fit your needs. It can detect what kernel you are running, \
+what is your root device, root filesystem, if you use encryption, \
+LVM, RAID, etc. \
+\n\n\
+Usually the probed values are OK and they will be the \
+defaults in all subsequent dialogs, but maybe you want \
+to change something. \n\
+If in doubt, leave the defaults." 0 0
+
+ KVER=$( ls -d1 --indicator-style=none /lib/modules/* | \
+ awk -F/ -vVER=$KVER '{
+ if ( VER == $NF ) {
+ ONOFF="on"
+ } else {
+ ONOFF="off"
+ } ; printf("%s \"\" %s\n",$NF,ONOFF) }' | \
+ xargs dialog --stdout --title "CHOOSE KERNEL VERSION" \
+ --default-item $KVER --radiolist "\
+Please, select the kernel version you want to create this initrd for." 0 0 4 )
+ [ -z "$KVER" ] && exit 1
+
+ OLDROOTDEV=$ROOTDEV
+ ROOTDEV=$( dialog --stdout --title "SELECT ROOT DEVICE" --inputbox "\
+Enter your root device. Root device is the one where your '/' filesystem \
+is mounted." 0 0 "$ROOTDEV" )
+ [ -z "$ROOTDEV" ] && exit 1
+
+ # We need to re-check our defaults in case the user changed the default
+ # value for ROOTDEV:
+ [ "$OLDROOTDEV" != "$ROOTDEV" ] && check_luks_lvm_raid
+ ROOTFS=$(get_rootfs_type)
+
+ ROOTFS=$( dialog --stdout --title "SELECT ROOT FILESYSTEM" --inputbox "\
+Enter the type of your root filesystem." 0 0 "$ROOTFS" )
+ [ -z "$ROOTFS" ] && exit 1
+ fi
+
+ MLIST=$(add_rootfs_module)
+
+ LLR=$( dialog --stdout --title "LVM/LUKS/RAID" --checklist "\
+Do you use some of those in your root filesystem? \
+If this is the case, please select one or more options." 12 45 3 \
+"LVM" "Logical Volume Manager" $([ "$USING_LVM" = "1" ] && echo on || echo off) \
+"LUKS" "Linux Unified Key Setup" $([ "$USING_LUKS" = "1" ] && echo on || echo off) \
+"RAID" "Linux Software RAID" $([ "$USING_RAID" = "1" ] && echo on || echo off))
+
+ if [ "$?" != "0" ]; then
+ exit 1
+ fi
+
+ echo $LLR | grep -q LUKS && USING_LUKS="1"
+ echo $LLR | grep -q LVM && USING_LVM="1"
+ echo $LLR | grep -q RAID && USING_RAID="1"
+
+ if [ "$USING_LUKS" = "1" ]; then
+ REALDEV=$( dialog --stdout --title "LUKS ROOT DEVICE" --inputbox "\
+Please, enter your LUKS root device:" 0 0 "$REALDEV" )
+ [ -z "$REALDEV" ] && exit 1
+ fi
+fi
+
+# Step out of the interactive loop for a moment. The next block needs to be
+# executed in all cases.
+
+# We need to 'undouble' the MLIST array. Some people report that walking the
+# /sys tree produces duplicate modules in the list.
+# The awk command elimitates doubles without changing the order:
+MLIST=$( echo $MLIST | tr ':' '\n' | awk '!x[$0]++' | tr '\n' ' ' )
+MLIST=$( echo $MLIST | tr ' ' ':' )
+MLIST=$(echo ${MLIST%:}) # To weed out a trailing ':' which was reported once.
+
+# Back to the interactive part:
+
+if [ "$INTERACTIVE" = "1" ]; then
+ MLIST=$( dialog --stdout --title "INITRD'S MODULE LIST" --inputbox "\
+The list here shows all modules needed to support your root filesystem \
+and boot from it. But you can change the list to use some alternative \
+or additional modules. If you don't know what to do, the default is safe." \
+0 0 "$MLIST" )
+ if [ "$?" != "0" ]; then
+ exit 1
+ fi
+
+ EXTRA=$( dialog --stdout --title "EXTRA CONFIGURATION" --checklist "\
+Now is your chance for some additional configuration. All of these \
+configurations are optional and you can stick to the defaults." 11 72 3 \
+"KEYMAP" "Select keyboard layout (default: US)" \
+ $([ $USING_LUKS = 1 ] && echo on || echo off) \
+"RESUMEDEV" "Select device for 'suspend-to-disk' feature" off \
+"UDEV" "Use UDEV in the initrd for device configuration" $(test $UDEV -eq 1 && echo on || echo off) \
+"WAIT" "Add delay to allow detection of slow disks at boot" $(test $WAIT -gt $WAIT_DEFAULT && echo on || echo off) )
+ if [ "$?" != "0" ]; then
+ exit 1
+ fi
+
+ if echo $EXTRA | grep -q KEYMAP ; then
+ KEYMAP=$( dialog --stdout --title "KEYBOARD LAYOUT SELECTION" \
+ --cancel-label "Skip" \
+ --menu "You may select one of the following keyboard layouts. \
+If you do not select a keyboard map, 'us.map' \
+(the US keyboard layout) is the default. Use the UP/DOWN \
+arrow keys and PageUp/PageDown to scroll \
+through the whole list of choices." \
+22 55 11 \
+"qwerty/us.map" "" \
+"azerty/azerty.map" "" \
+"azerty/be-latin1.map" "" \
+"azerty/fr-latin0.map" "" \
+"azerty/fr-latin1.map" "" \
+"azerty/fr-latin9.map" "" \
+"azerty/fr-old.map" "" \
+"azerty/fr-pc.map" "" \
+"azerty/fr.map" "" \
+"azerty/wangbe.map" "" \
+"azerty/wangbe2.map" "" \
+"dvorak/ANSI-dvorak.map" "" \
+"dvorak/dvorak-l.map" "" \
+"dvorak/dvorak-r.map" "" \
+"dvorak/dvorak.map" "" \
+"dvorak/no-dvorak.map" "" \
+"fgGIod/tr_f-latin5.map" "" \
+"fgGIod/trf-fgGIod.map" "" \
+"olpc/es-olpc.map" "" \
+"olpc/pt-olpc.map" "" \
+"qwerty/bg-cp1251.map" "" \
+"qwerty/bg-cp855.map" "" \
+"qwerty/bg_bds-cp1251.map" "" \
+"qwerty/bg_bds-utf8.map" "" \
+"qwerty/bg_pho-cp1251.map" "" \
+"qwerty/bg_pho-utf8.map" "" \
+"qwerty/br-abnt.map" "" \
+"qwerty/br-abnt2.map" "" \
+"qwerty/br-latin1-abnt2.map" "" \
+"qwerty/br-latin1-us.map" "" \
+"qwerty/by-cp1251.map" "" \
+"qwerty/by.map" "" \
+"qwerty/bywin-cp1251.map" "" \
+"qwerty/cf.map" "" \
+"qwerty/cz-cp1250.map" "" \
+"qwerty/cz-lat2-prog.map" "" \
+"qwerty/cz-lat2.map" "" \
+"qwerty/cz-qwerty.map" "" \
+"qwerty/defkeymap.map" "" \
+"qwerty/defkeymap_V1.0.map" "" \
+"qwerty/dk-latin1.map" "" \
+"qwerty/dk.map" "" \
+"qwerty/emacs.map" "" \
+"qwerty/emacs2.map" "" \
+"qwerty/es-cp850.map" "" \
+"qwerty/es.map" "" \
+"qwerty/et-nodeadkeys.map" "" \
+"qwerty/et.map" "" \
+"qwerty/fi-latin1.map" "" \
+"qwerty/fi-latin9.map" "" \
+"qwerty/fi-old.map" "" \
+"qwerty/fi.map" "" \
+"qwerty/gr-pc.map" "" \
+"qwerty/gr.map" "" \
+"qwerty/hu101.map" "" \
+"qwerty/il-heb.map" "" \
+"qwerty/il-phonetic.map" "" \
+"qwerty/il.map" "" \
+"qwerty/is-latin1-us.map" "" \
+"qwerty/is-latin1.map" "" \
+"qwerty/it-ibm.map" "" \
+"qwerty/it.map" "" \
+"qwerty/it2.map" "" \
+"qwerty/jp106.map" "" \
+"qwerty/kazakh.map" "" \
+"qwerty/kyrgyz.map" "" \
+"qwerty/la-latin1.map" "" \
+"qwerty/lt.baltic.map" "" \
+"qwerty/lt.l4.map" "" \
+"qwerty/lt.map" "" \
+"qwerty/mk-cp1251.map" "" \
+"qwerty/mk-utf.map" "" \
+"qwerty/mk.map" "" \
+"qwerty/mk0.map" "" \
+"qwerty/nl.map" "" \
+"qwerty/nl2.map" "" \
+"qwerty/no-latin1.map" "" \
+"qwerty/no.map" "" \
+"qwerty/pc110.map" "" \
+"qwerty/pl.map" "" \
+"qwerty/pl1.map" "" \
+"qwerty/pl2.map" "" \
+"qwerty/pl3.map" "" \
+"qwerty/pl4.map" "" \
+"qwerty/pt-latin1.map" "" \
+"qwerty/pt-latin9.map" "" \
+"qwerty/pt.map" "" \
+"qwerty/ro.map" "" \
+"qwerty/ro_std.map" "" \
+"qwerty/ru-cp1251.map" "" \
+"qwerty/ru-ms.map" "" \
+"qwerty/ru-yawerty.map" "" \
+"qwerty/ru.map" "" \
+"qwerty/ru1.map" "" \
+"qwerty/ru2.map" "" \
+"qwerty/ru3.map" "" \
+"qwerty/ru4.map" "" \
+"qwerty/ru_win.map" "" \
+"qwerty/ruwin_alt-CP1251.map" "" \
+"qwerty/ruwin_alt-KOI8-R.map" "" \
+"qwerty/ruwin_alt-UTF-8.map" "" \
+"qwerty/ruwin_cplk-CP1251.map" "" \
+"qwerty/ruwin_cplk-KOI8-R.map" "" \
+"qwerty/ruwin_cplk-UTF-8.map" "" \
+"qwerty/ruwin_ct_sh-CP1251.map" "" \
+"qwerty/ruwin_ct_sh-KOI8-R.map" "" \
+"qwerty/ruwin_ct_sh-UTF-8.map" "" \
+"qwerty/ruwin_ctrl-CP1251.map" "" \
+"qwerty/ruwin_ctrl-KOI8-R.map" "" \
+"qwerty/ruwin_ctrl-UTF-8.map" "" \
+"qwerty/se-fi-ir209.map" "" \
+"qwerty/se-fi-lat6.map" "" \
+"qwerty/se-ir209.map" "" \
+"qwerty/se-lat6.map" "" \
+"qwerty/se-latin1.map" "" \
+"qwerty/sk-prog-qwerty.map" "" \
+"qwerty/sk-qwerty.map" "" \
+"qwerty/speakup-jfw.map" "" \
+"qwerty/speakupmap.map" "" \
+"qwerty/sr-cy.map" "" \
+"qwerty/sv-latin1.map" "" \
+"qwerty/tr_q-latin5.map" "" \
+"qwerty/tralt.map" "" \
+"qwerty/trf.map" "" \
+"qwerty/trq.map" "" \
+"qwerty/ttwin_alt-UTF-8.map.gz" "" \
+"qwerty/ttwin_cplk-UTF-8.map.gz" "" \
+"qwerty/ttwin_ct_sh-UTF-8.map.gz" "" \
+"qwerty/ttwin_ctrl-UTF-8.map.gz" "" \
+"qwerty/ua-cp1251.map.gz" "" \
+"qwerty/ua-utf-ws.map" "" \
+"qwerty/ua-utf.map" "" \
+"qwerty/ua-ws.map" "" \
+"qwerty/ua.map" "" \
+"qwerty/uk.map" "" \
+"qwerty/us-acentos.map" "" \
+"qwerty/us.map" "" \
+"qwertz/croat.map" "" \
+"qwertz/cz-us-qwertz.map" "" \
+"qwertz/cz.map" "" \
+"qwertz/de-latin1-nodeadkeys.map" "" \
+"qwertz/de-latin1.map" "" \
+"qwertz/de.map" "" \
+"qwertz/de_CH-latin1.map" "" \
+"qwertz/fr_CH-latin1.map" "" \
+"qwertz/fr_CH.map" "" \
+"qwertz/hu.map" "" \
+"qwertz/sg-latin1-lk450.map" "" \
+"qwertz/sg-latin1.map" "" \
+"qwertz/sg.map" "" \
+"qwertz/sk-prog-qwertz.map" "" \
+"qwertz/sk-qwertz.map" "" \
+"qwertz/slovene.map" "" )
+ [ -n "$KEYMAP" ] && KEYMAP=$(basename $KEYMAP .map)
+ fi
+
+ if echo $EXTRA | grep -q UDEV ; then
+ UDEV=1
+ fi
+
+ if echo $EXTRA | grep -q RESUMEDEV ; then
+ # Print information about swap partitions:
+ FREERAM=$(free -k | grep "^Mem:" | tr -s ' ' | cut -d' ' -f2)
+ SWPINFO=""
+ for SWPDEV in $(grep -w swap $FSTAB | cut -d' ' -f1) ; do
+ SWPINFO="$SWPINFO $SWPDEV Linux swap partition $(fdisk -s $SWPDEV) KB \\n"
+ [ $(fdisk -s $SWPDEV) -gt $FREERAM ] && RESUMEDEV=$SWPDEV
+ done
+ FREERAM=$(free -m | grep "^Mem:" | tr -s ' ' | cut -d' ' -f2)
+ RESUMEDEV=$( dialog --stdout --no-collapse --title "HIBERNATE RESUME DEVICE" --inputbox "\
+When using suspend-to-disk feature (hibernate), your computer's RAM is copied \
+to a swap device when it shuts down. The kernel will resume from that RAM \
+image at boot. This means that the swap partition must not be smaller than \
+the amount of RAM you have ($FREERAM MB). \n\
+$SWPINFO \n\
+Please specify a swap partition to be used for hibernation:" \
+0 0 "$RESUMEDEV")
+ [ -z "$RESUMEDEV" ] && exit 1
+ fi
+
+ if echo $EXTRA | grep -q WAIT ; then
+ WAIT=$( dialog --stdout --title "WAIT FOR ROOT DEVICE" --inputbox "\
+Some block devices are too slow to be detected properly at boot. USB storage \
+devices and some disk arrays have this 'feature'. To make your machine \
+boot properly, you can add some delay here, to wait until all your disks are \
+probed and detected. The time is in seconds:" 0 0 "$WAIT")
+ [ -z "$WAIT" ] && exit 1
+ fi
+
+ IMGFILE=$( dialog --stdout --title "INITRD IMAGE NAME" --inputbox "\
+Enter your initrd image filename." 0 0 "$IMGFILE" )
+ [ -z "$IMGFILE" ] && exit 1
+
+else
+ MLIST=$(add_rootfs_module)
+fi
+
+# Add any modules passed along on the commandline:
+if [ -n "$MKINIT_MODS" ]; then
+ [ -n "$MLIST" ] && MLIST="$MLIST:$(echo $MKINIT_MODS | tr ' ' ':')" \
+ || MLIST="$(echo $MKINIT_MODS | tr ' ' ':')"
+fi
+
+# Constructing the mkinitrd command:
+MKINIT="mkinitrd -c -k $KVER -f $ROOTFS -r $ROOTDEV"
+
+# If we have a module list, add them:
+if ! [ -z "$MLIST" -o "$MLIST" = ":" ]; then
+ MKINIT="$MKINIT -m $MLIST"
+fi
+
+# Deal with LUKS/LVM/RAID:
+if [ "$USING_LUKS" = "1" ]; then
+ MKINIT="$MKINIT -C $REALDEV"
+fi
+if [ "$USING_LVM" = "1" ]; then
+ MKINIT="$MKINIT -L"
+fi
+if [ "$USING_RAID" = "1" ]; then
+ MKINIT="$MKINIT -R"
+fi
+
+if [ -n "$RESUMEDEV" ]; then
+ # Add hibernation partition:
+ MKINIT="$MKINIT -h $RESUMEDEV"
+fi
+if [ -n "$KEYMAP" -a "$KEYMAP" != "us" ]; then
+ # Add non-us keyboard mapping:
+ MKINIT="$MKINIT -l $KEYMAP"
+fi
+if [ $UDEV -eq 1 ]; then
+ # Add UDEV support:
+ MKINIT="$MKINIT -u"
+fi
+if [ -n "$WAIT" -a $WAIT -ne $WAIT_DEFAULT ]; then
+ # Add non-default wait time:
+ MKINIT="$MKINIT -w $WAIT"
+fi
+if ! echo "$MKINIT_PARAMS" | grep -q -- '-o ' ; then
+ # Add default output filename:
+ MKINIT="$MKINIT -o $IMGFILE"
+fi
+if [ -n "$MKINIT_PARAMS" ]; then
+ # Add user-supplied additional parameters:
+ MKINIT="$MKINIT $MKINIT_PARAMS"
+fi
+
+# Notify the user:
+if [ "$EMIT" = "all" ]; then
+ cat <<-EOT
+ #
+ # $(basename $0) revision $REV
+ #
+ # This script will now make a recommendation about the command to use
+ # in case you require an initrd image to boot a kernel that does not
+ # have support for your storage or root filesystem built in
+ # (such as the Slackware 'generic' kernels').
+ # A suitable 'mkinitrd' command will be:
+
+ $MKINIT
+ EOT
+elif [ "$EMIT" = "run" ]; then
+ echo "$MKINIT"
+elif [ "$EMIT" = "conf" ]; then
+ cat <<-EOT
+ SOURCE_TREE="$SOURCE_TREE"
+ CLEAR_TREE="$CLEAR_TREE"
+ OUTPUT_IMAGE="$IMGFILE"
+ KERNEL_VERSION="$KVER"
+ KEYMAP="$KEYMAP"
+ MODULE_LIST="$(echo $MLIST | cut -f2 -d\ )"
+ LUKSDEV="$REALDEV"
+ ROOTDEV="$ROOTDEV"
+ ROOTFS="$ROOTFS"
+ RESUMEDEV="$RESUMEDEV"
+ RAID="$USING_RAID"
+ LVM="$USING_LVM"
+ UDEV="$UDEV"
+ WAIT="$WAIT"
+ EOT
+fi
+
+if [ -n "$KFILE" ]; then
+ if [ "$EMIT" = "all" ]; then
+ cat <<-EOT
+ # An entry in 'etc/lilo.conf' for kernel '$KFILE' would look like this:
+ EOT
+ fi
+ if [ "$EMIT" = "all" -o "$EMIT" = "lilo" ]; then
+ # Compensate for the syntax used for the LUKS-on-LVM case:
+ [ "$(basename $ROOTDEV)" = "$ROOTDEV" ] && BASE="/dev/mapper/" || BASE=""
+ cat <<-EOT
+ # Linux bootable partition config begins
+ # initrd created with '$MKINIT'
+ image = $KFILE
+ initrd = $IMGFILE
+ root = $BASE$ROOTDEV
+ label = $KVER
+ read-only
+ # Linux bootable partition config ends
+ EOT
+ fi
+fi
diff --git a/patches/source/mkinitrd/slack-desc b/patches/source/mkinitrd/slack-desc
new file mode 100644
index 000000000..49d1a764f
--- /dev/null
+++ b/patches/source/mkinitrd/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+mkinitrd: mkinitrd (make an initial ramdisk)
+mkinitrd:
+mkinitrd: mkinitrd is a script to create an initial ramdisk that is loaded at
+mkinitrd: the same time as the kernel. The initial ramdisk may be responsible
+mkinitrd: for loading kernel modules (such a filesystem or SCSI controller
+mkinitrd: module) that are needed to mount the root filesystem.
+mkinitrd:
+mkinitrd: The "initrd" is implemented as an initramfs. See the kernel
+mkinitrd: documentation for more information on this, if you are interested.
+mkinitrd:
+mkinitrd:
diff --git a/patches/source/mozilla-firefox/firefox.moz_plugin_path.diff b/patches/source/mozilla-firefox/firefox.moz_plugin_path.diff
new file mode 100644
index 000000000..761f295a4
--- /dev/null
+++ b/patches/source/mozilla-firefox/firefox.moz_plugin_path.diff
@@ -0,0 +1,17 @@
+--- ./firefox.orig 2008-05-29 15:21:18.000000000 -0500
++++ ./firefox 2008-06-17 12:19:26.000000000 -0500
+@@ -54,6 +54,14 @@
+
+ moz_libdir=/usr/local/lib/firefox-3.0
+
++# Include /usr/lib/mozilla/plugins in the plugin path:
++if [ "$MOZ_PLUGIN_PATH" ] ; then
++ MOZ_PLUGIN_PATH=$MOZ_PLUGIN_PATH:${moz_libdir}/plugins:/usr/lib/mozilla/plugins
++else
++ MOZ_PLUGIN_PATH=${moz_libdir}/plugins:/usr/lib/mozilla/plugins
++fi
++export MOZ_PLUGIN_PATH
++
+ # Use run-mozilla.sh in the current dir if it exists
+ # If not, then start resolving symlinks until we find run-mozilla.sh
+ found=0
diff --git a/patches/source/mozilla-firefox/gold/gold b/patches/source/mozilla-firefox/gold/gold
new file mode 100755
index 000000000..8c86d3b06
--- /dev/null
+++ b/patches/source/mozilla-firefox/gold/gold
@@ -0,0 +1,2 @@
+#!/bin/bash
+/usr/bin/ld.gold "$@"
diff --git a/patches/source/mozilla-firefox/gold/ld b/patches/source/mozilla-firefox/gold/ld
new file mode 120000
index 000000000..78a06a2a1
--- /dev/null
+++ b/patches/source/mozilla-firefox/gold/ld
@@ -0,0 +1 @@
+gold \ No newline at end of file
diff --git a/patches/source/mozilla-firefox/mimeTypes.rdf b/patches/source/mozilla-firefox/mimeTypes.rdf
new file mode 100644
index 000000000..f3bc7b406
--- /dev/null
+++ b/patches/source/mozilla-firefox/mimeTypes.rdf
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<RDF:RDF xmlns:NC="http://home.netscape.com/NC-rdf#"
+ xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+ <RDF:Seq RDF:about="urn:mimetypes:root">
+ </RDF:Seq>
+ <RDF:Description RDF:about="urn:mimetypes">
+ <NC:MIME-types RDF:resource="urn:mimetypes:root"/>
+ </RDF:Description>
+ <RDF:Description RDF:about="urn:scheme:mailto"
+ NC:value="mailto">
+ <NC:handlerProp RDF:resource="urn:scheme:handler:mailto"/>
+ </RDF:Description>
+ <RDF:Description RDF:about="urn:handler:web:http://compose.mail.yahoo.com/?To=%s"
+ NC:prettyName="Yahoo! Mail"
+ NC:uriTemplate="http://compose.mail.yahoo.com/?To=%s" />
+ <RDF:Description RDF:about="urn:handler:web:https://mail.google.com/mail/?extsrc=mailto&amp;url=%s"
+ NC:prettyName="GMail"
+ NC:uriTemplate="https://mail.google.com/mail/?extsrc=mailto&amp;url=%s" />
+ <RDF:Description RDF:about="urn:scheme:handler:mailto"
+ NC:alwaysAsk="true">
+ <NC:possibleApplication RDF:resource="urn:handler:web:http://compose.mail.yahoo.com/?To=%s"/>
+ <NC:possibleApplication RDF:resource="urn:handler:web:https://mail.google.com/mail/?extsrc=mailto&amp;url=%s"/>
+ <NC:possibleApplication RDF:resource="urn:handler:local:/usr/bin/thunderbird"/>
+ </RDF:Description>
+ <RDF:Description RDF:about="urn:handler:local:/usr/bin/thunderbird"
+ NC:prettyName="thunderbird"
+ NC:path="/usr/bin/thunderbird" />
+</RDF:RDF>
diff --git a/patches/source/mozilla-firefox/mozilla-firefox-mimeTypes-fix.diff b/patches/source/mozilla-firefox/mozilla-firefox-mimeTypes-fix.diff
new file mode 100644
index 000000000..222113044
--- /dev/null
+++ b/patches/source/mozilla-firefox/mozilla-firefox-mimeTypes-fix.diff
@@ -0,0 +1,45 @@
+diff -Nur mozilla-1.9.1.orig/browser/locales/generic/profile/mimeTypes.rdf mozilla-1.9.1/browser/locales/generic/profile/mimeTypes.rdf
+--- mozilla-1.9.1.orig/browser/locales/generic/profile/mimeTypes.rdf 2009-06-29 11:14:41.000000000 -0500
++++ mozilla-1.9.1/browser/locales/generic/profile/mimeTypes.rdf 2009-07-01 08:28:05.407353867 -0500
+@@ -1,13 +1,28 @@
+-<?xml version="1.0"?>
+-
+-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+- xmlns:NC="http://home.netscape.com/NC-rdf#"
+- xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+-
+- <Description about="urn:mimetypes">
+- <NC:MIME-types>
+- <Seq about="urn:mimetypes:root">
+- </Seq>
+- </NC:MIME-types>
+- </Description>
+-</RDF>
++<?xml version="1.0"?>
++<RDF:RDF xmlns:NC="http://home.netscape.com/NC-rdf#"
++ xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
++ <RDF:Seq RDF:about="urn:mimetypes:root">
++ </RDF:Seq>
++ <RDF:Description RDF:about="urn:mimetypes">
++ <NC:MIME-types RDF:resource="urn:mimetypes:root"/>
++ </RDF:Description>
++ <RDF:Description RDF:about="urn:scheme:mailto"
++ NC:value="mailto">
++ <NC:handlerProp RDF:resource="urn:scheme:handler:mailto"/>
++ </RDF:Description>
++ <RDF:Description RDF:about="urn:handler:web:http://compose.mail.yahoo.com/?To=%s"
++ NC:prettyName="Yahoo! Mail"
++ NC:uriTemplate="http://compose.mail.yahoo.com/?To=%s" />
++ <RDF:Description RDF:about="urn:handler:web:https://mail.google.com/mail/?extsrc=mailto&amp;url=%s"
++ NC:prettyName="GMail"
++ NC:uriTemplate="https://mail.google.com/mail/?extsrc=mailto&amp;url=%s" />
++ <RDF:Description RDF:about="urn:scheme:handler:mailto"
++ NC:alwaysAsk="true">
++ <NC:possibleApplication RDF:resource="urn:handler:web:http://compose.mail.yahoo.com/?To=%s"/>
++ <NC:possibleApplication RDF:resource="urn:handler:web:https://mail.google.com/mail/?extsrc=mailto&amp;url=%s"/>
++ <NC:possibleApplication RDF:resource="urn:handler:local:/usr/bin/thunderbird"/>
++ </RDF:Description>
++ <RDF:Description RDF:about="urn:handler:local:/usr/bin/thunderbird"
++ NC:prettyName="thunderbird"
++ NC:path="/usr/bin/thunderbird" />
++</RDF:RDF>
diff --git a/patches/source/mozilla-firefox/mozilla-firefox.SlackBuild b/patches/source/mozilla-firefox/mozilla-firefox.SlackBuild
new file mode 100755
index 000000000..e5e510c25
--- /dev/null
+++ b/patches/source/mozilla-firefox/mozilla-firefox.SlackBuild
@@ -0,0 +1,326 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Thanks to the folks at the Mozilla Foundation for permission to
+# distribute this, and for all the great work! :-)
+
+VERSION=$(basename $(ls firefox-*.tar.?z* | cut -d - -f 2 | rev | cut -f 3- -d . | rev) .source)
+RELEASEVER=$(echo $VERSION | cut -f 1 -d r | cut -f 1 -d b | cut -f 1 -d e)
+BUILD=${BUILD:-1_slack14.1}
+
+# Specify this variable for a localized build.
+# For example, to build a version of Firefox with Italian support, run
+# the build script like this:
+#
+# MOZLOCALIZE=it ./mozilla-firefox.SlackBuild
+#
+MOZLOCALIZE=${MOZLOCALIZE:-}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# Use PGO? Doubles the time and drive space requirements for the build,
+# but should provide a performance increase. How much depends on which
+# benchmarks you believe, but I've typically seen around 2.5%. I've also
+# seen some which say it can be negligably (a fraction of a percent) slower
+# with this enganged. The anecdotal reports usually say there's a noticable
+# improvement in overall responsiveness. Seems like a good bet if you have
+# the time and your system is able to handle it. Set the variable to
+# anything else prior to the build to compile Firefox in less time (but
+# without the possible benefits of Profile-Guided Optimization).
+#
+# NOTE: The 23.0 release fails to compile with a GLib assert error if PGO
+# is enabled, so it is being disabled by default. I can't say I ever noticed
+# a lot of difference with this anyway (other than a much, much longer compile
+# time. But pass PGO=yes to the SlackBuild if you want to try it.
+#if [ "$ARCH" = "x86_64" ]; then
+# PGO=${PGO:-yes}
+#else
+# # 32-bit systems have problems compiling with PGO, as the per-process
+# # memory requirements are too large. Possibly compiling with a 64-bit
+# # kernel could be a workaround for this, but for now we will default to
+# # using PGO only for x86_64.
+# PGO=${PGO:-no}
+#fi
+#
+# PGO is disabled by default:
+PGO=${PGO:-no}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS=""
+ LIBDIRSUFFIX=""
+ OPTIMIZE=" --enable-optimize=-O2 "
+ # On IA32, use gold since GNU ld runs out of memory linking libxul.so:
+ PATH="$(pwd)/gold:$PATH"
+ export CC="gcc -B$(pwd)/gold"
+ export CXX="g++ -B$(pwd)/gold"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ OPTIMIZE=" --enable-optimize=-O2 "
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ OPTIMIZE=" --enable-optimize=-O2 "
+elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2 -march=armv4 -mtune=xscale"
+ LIBDIRSUFFIX=""
+ OPTIMIZE=" --enable-optimize=-O2 "
+elif [ "$ARCH" = "armel" ]; then
+ SLKCFLAGS="-O2 -march=armv4t"
+ LIBDIRSUFFIX=""
+ OPTIMIZE=" --enable-optimize=-O2 "
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ OPTIMIZE=" --enable-optimize=-O2 "
+fi
+
+# Workaround to prevent unidentified crashes. Since this seems to be
+# fixed in recent betas, only use the fix for known crashing versions:
+if [ $VERSION = 43.0 \
+ -o $VERSION = 43.0.1 \
+ -o $VERSION = 43.0.2 \
+ -o $VERSION = 43.0.3 \
+ -o $VERSION = 43.0.4 ]; then
+ OPTIMIZE="$(echo "$OPTIMIZE" | sed 's/O2/Os/g')"
+ echo "Detected Firefox $VERSION... enabling crash workaround O2 -> Os."
+ sleep 1
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-mozilla-firefox
+
+# If not specified, figure out if this is a beta or a release
+MOZVERS=${MOZVERS:-release}
+if echo $VERSION | grep -q b ; then MOZVERS=beta ; fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+rm -rf $PKG
+mkdir -p $TMP $PKG/usr/lib${LIBDIRSUFFIX}
+
+## We need to use the incredibly ancient autoconf-2.13 for this :/
+#( cd $CWD/autoconf ; ./autoconf.build )
+#PATH=/tmp/autoconf-tmp/usr/bin:$PATH
+
+cd $TMP
+rm -rf firefox-$VERSION
+# Unpack this in a subdirectory to prevent changing permissions on /tmp:
+rm -rf firefox-unpack
+mkdir firefox-unpack
+cd firefox-unpack
+tar xvf $CWD/firefox-$VERSION.source.tar.?z* || exit 1
+mv * ..
+cd ..
+rm -rf firefox-unpack
+cd firefox-$VERSION || exit 1
+
+# Fetch localization, if requested
+# https://bugzilla.mozilla.org/show_bug.cgi?id=1256955
+if [ ! -z $MOZLOCALIZE ]; then
+ LOC_URL="http://ftp.mozilla.org/pub/firefox/candidates/$VERSION-candidates/build1/l10n_changesets.txt"
+ LOC_COMMIT=$(wget -q -O - $LOC_URL | grep ^$MOZLOCALIZE | cut -d\ -f2)
+ hg clone https://hg.mozilla.org/l10n-central/$MOZLOCALIZE -r $LOC_COMMIT
+fi
+
+# Patch mimeTypes.rdf
+# Uncomment this if you want to use the patch; otherwise, we overwrite the
+# mimeTypes.rdf inside the package directory later
+# zcat $CWD/mozilla-firefox-mimeTypes-fix.diff.gz | patch -p1 || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Our building options, in a configure-like display ;)
+OPTIONS="\
+ --enable-official-branding \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --with-default-mozilla-five-home=/usr/lib${LIBDIRSUFFIX}/firefox-$RELEASEVER \
+ --with-system-zlib \
+ --enable-application=browser \
+ --enable-default-toolkit=cairo-gtk2 \
+ --enable-startup-notification \
+ --enable-crypto \
+ --enable-gstreamer=0.10 \
+ --enable-svg \
+ --enable-canvas \
+ --enable-logging \
+ --enable-xft \
+ --enable-webm \
+ $OPTIMIZE \
+ --enable-reorder \
+ --enable-strip \
+ --enable-cpp-rtti \
+ --disable-gnomevfs \
+ --disable-accessibility \
+ --disable-crashreporter \
+ --disable-debug \
+ --disable-pedantic \
+ --disable-pulseaudio \
+ --disable-mailnews \
+ --disable-composer \
+ --disable-installer"
+# Complains about missing APNG support in Slackware's libpng:
+# --with-system-png \
+# This option breaks mozilla-12.0:
+# --enable-system-cairo \
+# NOTE: It probably reduces bugs to use the bundled library versions,
+# so in general we will not --enable-system-libraries.
+# But since system zlib has been used for a long time and isn't a moving
+# target, we'll leave that one as-is.
+if [ ! -z $MOZLOCALIZE ]; then
+ OPTIONS=$OPTIONS" \
+ --enable-ui-locale=$MOZLOCALIZE
+ --with-l10n-base=.."
+ # There are no dictionaries in localized builds
+ sed -i \
+ -e "/@BINPATH@\/dictionaries\/\*/d" \
+ -e "/@RESPATH@\/dictionaries\/\*/d" \
+ browser/installer/package-manifest.in || exit 1
+fi
+
+export MOZILLA_OFFICIAL="1"
+export BUILD_OFFICIAL="1"
+export MOZ_PHOENIX="1"
+export MOZ_PACKAGE_JSSHELL="1"
+export CFLAGS="$SLKCFLAGS"
+export CXXFLAGS="$SLKCFLAGS"
+export MOZ_MAKE_FLAGS="$NUMJOBS"
+
+# Clear some variables that could break the build
+unset DBUS_SESSION_BUS_ADDRESS ORBIT_SOCKETDIR SESSION_MANAGER \
+ XDG_SESSION_COOKIE XAUTHORITY MAKEFLAGS
+
+# Assemble our .mozconfig, we use this method for building, seems
+# needed for PGO.
+echo ". \$topsrcdir/browser/config/mozconfig" > .mozconfig
+
+# Mozilla devs enforce using an objdir for building
+# https://developer.mozilla.org/en/Configuring_Build_Options#Building_with_an_objdir
+mkdir obj
+echo "mk_add_options MOZ_OBJDIR=$(pwd)/obj" >> .mozconfig
+
+if [ "$MOZLOCALIZE" ]; then
+ echo "mk_add_options MOZ_CO_LOCALES=\"$MOZLOCALIZE\"" >> .mozconfig
+fi
+
+# Write in it the options above
+for option in $OPTIONS; do echo "ac_add_options $option" >> .mozconfig; done
+
+# https://developer.mozilla.org/en-US/docs/Building_with_Profile-Guided_Optimization
+# Thanks to ArchLinux and Gentoo for the additional hints.
+if [ "$PGO" = "yes" ]; then
+ # Do a PGO build, double time and disk space but worth it.
+ export MOZ_PGO=1
+ echo "mk_add_options PROFILE_GEN_SCRIPT='EXTRA_TEST_ARGS=10 \$(MAKE) -C \$(MOZ_OBJDIR) pgo-profile-run'" >> .mozconfig
+ export DISPLAY=:99
+ # Launch Xvfb to let the profile scripts run in a X session.
+ # Ugly note: if the build breaks you may want to do a "killall Xvfb".
+ Xvfb -nolisten tcp -extension GLX -screen 0 1280x1024x24 $DISPLAY &
+ dbus-launch --exit-with-session make -f client.mk build || exit 1
+ kill $! || true
+else
+ # Do a normal build
+ echo "ac_add_options --disable-tests" >> .mozconfig
+ make -f client.mk build || exit 1
+fi
+
+make -f client.mk install DESTDIR=$PKG || exit 1
+
+# We don't need these (just symlinks anyway):
+rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/firefox-devel-$RELEASEVER
+
+# Nor these:
+rm -rf $PKG/usr/include
+
+( cd $PKG/usr/lib${LIBDIRSUFFIX}/firefox-$RELEASEVER
+ #mv defaults/profile/mimeTypes.rdf defaults/profile/mimeTypes.rdf.orig || exit 1
+ if [ -d defaults/profile ]; then
+ zcat $CWD/mimeTypes.rdf > defaults/profile/mimeTypes.rdf || exit 1
+ fi
+ # OK, this patch is useless on 7.x. We'll float without it and see what happens.
+ # Perhaps it won't make a difference or should be worked around elsewhere.
+ #zcat $CWD/firefox.moz_plugin_path.diff.gz \
+ # | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ # | patch -p1 --verbose --backup --suffix=.orig || exit 1
+ # Clean up if the above patch was successful:
+ #rm -f firefox.orig
+) || exit
+
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins
+mkdir -p $PKG/usr/share/applications
+cat $CWD/mozilla-firefox.desktop > $PKG/usr/share/applications/mozilla-firefox.desktop
+
+# These files/directories are usually created if Firefox is run as root,
+# which on many systems might (and possibly should) be never. Therefore, if we
+# don't see them we'll put stubs in place to prevent startup errors.
+( cd $PKG/usr/lib${LIBDIRSUFFIX}/firefox-$RELEASEVER
+ if [ -d extensions/talkback\@mozilla.org ]; then
+ if [ ! -r extensions/talkback\@mozilla.org/chrome.manifest ]; then
+ echo > extensions/talkback\@mozilla.org/chrome.manifest
+ fi
+ fi
+ if [ ! -d updates ]; then
+ mkdir -p updates/0
+ fi
+)
+
+# Need some default icons in the right place:
+for i in 16 22 24 32 48 256; do
+ install -m 0644 -D browser/branding/official/default${i}.png \
+ $PKG/usr/share/icons/hicolor/${i}x${i}/apps/firefox.png
+done
+mkdir -p $PKG/usr/share/pixmaps
+( cd $PKG/usr/share/pixmaps ; ln -sf /usr/share/icons/hicolor/256x256/apps/firefox.png . )
+mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/firefox-$RELEASEVER/chrome/icons/default
+install -m 644 browser/branding/official/default16.png \
+ $PKG/usr/lib$LIBDIRSUFFIX/firefox-$RELEASEVER/icons/
+install -m 644 browser/branding/official/default16.png \
+ $PKG/usr/lib$LIBDIRSUFFIX/firefox-$RELEASEVER/chrome/icons/default/
+
+# Copy over the LICENSE
+install -p -c -m 644 LICENSE $PKG/usr/lib${LIBDIRSUFFIX}/firefox-$RELEASEVER/
+
+mkdir $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+if [ -z $MOZLOCALIZE ]; then
+ /sbin/makepkg -l y -c n $TMP/mozilla-firefox-$VERSION-$ARCH-$BUILD.txz
+else
+ /sbin/makepkg -l y -c n $TMP/mozilla-firefox-$VERSION-$ARCH-${BUILD}_$MOZLOCALIZE.txz
+fi
+
diff --git a/patches/source/mozilla-firefox/mozilla-firefox.desktop b/patches/source/mozilla-firefox/mozilla-firefox.desktop
new file mode 100644
index 000000000..e099dcade
--- /dev/null
+++ b/patches/source/mozilla-firefox/mozilla-firefox.desktop
@@ -0,0 +1,80 @@
+[Desktop Entry]
+Exec=firefox %u
+Icon=firefox
+Type=Application
+Categories=Network;
+Name=Firefox
+Name[bn]=ফায়ারফকà§à¦¸
+Name[eo]=Mozilo Fajrovulpo
+Name[fi]=Mozilla Firefox
+Name[pa]=ਫਾਇਰਫੋਕਸ
+Name[tg]=Рӯбоҳи оташин
+GenericName=Web Browser
+GenericName[af]=Web Blaaier
+GenericName[ar]=متصÙØ­ ويب
+GenericName[az]=Veb Səyyahı
+GenericName[bg]=Браузър
+GenericName[bn]=ওয়েব বà§à¦°à¦¾à¦‰à¦œà¦¾à¦°
+GenericName[br]=Furcher ar Gwiad
+GenericName[bs]=WWW Preglednik
+GenericName[ca]=Fullejador web
+GenericName[cs]=WWW prohlížeÄ
+GenericName[cy]=Porydd Gwe
+GenericName[da]=Browser
+GenericName[de]=Web-Browser
+GenericName[el]=ΠεÏιηγητής ΙστοÏ
+GenericName[eo]=TTT-legilo
+GenericName[es]=Navegador web
+GenericName[et]=Veebilehitseja
+GenericName[eu]=Web arakatzailea
+GenericName[fa]=مرورگر وب
+GenericName[fi]=WWW-selain
+GenericName[fo]=Alnótsfar
+GenericName[fr]=Navigateur web
+GenericName[gl]=Navegador Web
+GenericName[he]=דפדפן ×ינטרנט
+GenericName[hi]=वेब बà¥à¤°à¤¾à¤‰à¤œà¤¼à¤°
+GenericName[hr]=Web preglednik
+GenericName[hu]=Webböngésző
+GenericName[is]=Vafri
+GenericName[it]=Browser Web
+GenericName[ja]=ウェブブラウザ
+GenericName[ko]=웹 브ë¼ìš°ì €
+GenericName[lo]=ເວັບບຣາວເຊີ
+GenericName[lt]=Žiniatinklio naršyklė
+GenericName[lv]=Web PÄrlÅ«ks
+GenericName[mk]=ПрелиÑтувач на Интернет
+GenericName[mn]=Веб-Хөтөч
+GenericName[nb]=Nettleser
+GenericName[nds]=Nettkieker
+GenericName[nl]=Webbrowser
+GenericName[nn]=Nettlesar
+GenericName[nso]=Seinyakisi sa Web
+GenericName[pa]=ਵੈਬ à¨à¨²à¨•à¨¾à¨°à¨¾
+GenericName[pl]=PrzeglÄ…darka WWW
+GenericName[pt]=Navegador Web
+GenericName[pt_BR]=Navegador Web
+GenericName[ro]=Navigator de web
+GenericName[ru]=Веб-браузер
+GenericName[se]=Fierpmádatlogan
+GenericName[sk]=Webový prehliadaÄ
+GenericName[sl]=Spletni brskalnik
+GenericName[sr]=Веб претраживач
+GenericName[sr@Latn]=Veb pretraživaÄ
+GenericName[ss]=Ibrawuza yeWeb
+GenericName[sv]=Webbläsare
+GenericName[ta]=வலை உலாவி
+GenericName[tg]=ТафÑиргари вÑб
+GenericName[th]=เว็บบราวเซอร์
+GenericName[tr]=Web Tarayıcı
+GenericName[uk]=Ðавігатор Тенет
+GenericName[uz]=Веб-браузер
+GenericName[ven]=Buronza ya Webu
+GenericName[vi]=Trình duyệt Web
+GenericName[wa]=Betchteu waibe
+GenericName[xh]=Umkhangeli zincwadi we Web
+GenericName[zh_CN]=网页æµè§ˆå™¨
+GenericName[zh_TW]=網é ç€è¦½å™¨
+GenericName[zu]=Umcingi we-Web
+MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
+X-KDE-StartupNotify=true
diff --git a/patches/source/mozilla-firefox/slack-desc b/patches/source/mozilla-firefox/slack-desc
new file mode 100644
index 000000000..a54bac8f0
--- /dev/null
+++ b/patches/source/mozilla-firefox/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+mozilla-firefox: mozilla-firefox (Mozilla Firefox Web browser)
+mozilla-firefox:
+mozilla-firefox: This project is a redesign of the Mozilla browser component written
+mozilla-firefox: using the XUL user interface language. Firefox empowers you to
+mozilla-firefox: browse faster, more safely and more efficiently than with any other
+mozilla-firefox: browser.
+mozilla-firefox:
+mozilla-firefox: Visit the Mozilla Firefox project online:
+mozilla-firefox: http://www.mozilla.org/projects/firefox/
+mozilla-firefox:
+mozilla-firefox:
diff --git a/patches/source/mozilla-nss/MPL-1.1.txt b/patches/source/mozilla-nss/MPL-1.1.txt
new file mode 100644
index 000000000..7714141d1
--- /dev/null
+++ b/patches/source/mozilla-nss/MPL-1.1.txt
@@ -0,0 +1,470 @@
+ MOZILLA PUBLIC LICENSE
+ Version 1.1
+
+ ---------------
+
+1. Definitions.
+
+ 1.0.1. "Commercial Use" means distribution or otherwise making the
+ Covered Code available to a third party.
+
+ 1.1. "Contributor" means each entity that creates or contributes to
+ the creation of Modifications.
+
+ 1.2. "Contributor Version" means the combination of the Original
+ Code, prior Modifications used by a Contributor, and the Modifications
+ made by that particular Contributor.
+
+ 1.3. "Covered Code" means the Original Code or Modifications or the
+ combination of the Original Code and Modifications, in each case
+ including portions thereof.
+
+ 1.4. "Electronic Distribution Mechanism" means a mechanism generally
+ accepted in the software development community for the electronic
+ transfer of data.
+
+ 1.5. "Executable" means Covered Code in any form other than Source
+ Code.
+
+ 1.6. "Initial Developer" means the individual or entity identified
+ as the Initial Developer in the Source Code notice required by Exhibit
+ A.
+
+ 1.7. "Larger Work" means a work which combines Covered Code or
+ portions thereof with code not governed by the terms of this License.
+
+ 1.8. "License" means this document.
+
+ 1.8.1. "Licensable" means having the right to grant, to the maximum
+ extent possible, whether at the time of the initial grant or
+ subsequently acquired, any and all of the rights conveyed herein.
+
+ 1.9. "Modifications" means any addition to or deletion from the
+ substance or structure of either the Original Code or any previous
+ Modifications. When Covered Code is released as a series of files, a
+ Modification is:
+ A. Any addition to or deletion from the contents of a file
+ containing Original Code or previous Modifications.
+
+ B. Any new file that contains any part of the Original Code or
+ previous Modifications.
+
+ 1.10. "Original Code" means Source Code of computer software code
+ which is described in the Source Code notice required by Exhibit A as
+ Original Code, and which, at the time of its release under this
+ License is not already Covered Code governed by this License.
+
+ 1.10.1. "Patent Claims" means any patent claim(s), now owned or
+ hereafter acquired, including without limitation, method, process,
+ and apparatus claims, in any patent Licensable by grantor.
+
+ 1.11. "Source Code" means the preferred form of the Covered Code for
+ making modifications to it, including all modules it contains, plus
+ any associated interface definition files, scripts used to control
+ compilation and installation of an Executable, or source code
+ differential comparisons against either the Original Code or another
+ well known, available Covered Code of the Contributor's choice. The
+ Source Code can be in a compressed or archival form, provided the
+ appropriate decompression or de-archiving software is widely available
+ for no charge.
+
+ 1.12. "You" (or "Your") means an individual or a legal entity
+ exercising rights under, and complying with all of the terms of, this
+ License or a future version of this License issued under Section 6.1.
+ For legal entities, "You" includes any entity which controls, is
+ controlled by, or is under common control with You. For purposes of
+ this definition, "control" means (a) the power, direct or indirect,
+ to cause the direction or management of such entity, whether by
+ contract or otherwise, or (b) ownership of more than fifty percent
+ (50%) of the outstanding shares or beneficial ownership of such
+ entity.
+
+2. Source Code License.
+
+ 2.1. The Initial Developer Grant.
+ The Initial Developer hereby grants You a world-wide, royalty-free,
+ non-exclusive license, subject to third party intellectual property
+ claims:
+ (a) under intellectual property rights (other than patent or
+ trademark) Licensable by Initial Developer to use, reproduce,
+ modify, display, perform, sublicense and distribute the Original
+ Code (or portions thereof) with or without Modifications, and/or
+ as part of a Larger Work; and
+
+ (b) under Patents Claims infringed by the making, using or
+ selling of Original Code, to make, have made, use, practice,
+ sell, and offer for sale, and/or otherwise dispose of the
+ Original Code (or portions thereof).
+
+ (c) the licenses granted in this Section 2.1(a) and (b) are
+ effective on the date Initial Developer first distributes
+ Original Code under the terms of this License.
+
+ (d) Notwithstanding Section 2.1(b) above, no patent license is
+ granted: 1) for code that You delete from the Original Code; 2)
+ separate from the Original Code; or 3) for infringements caused
+ by: i) the modification of the Original Code or ii) the
+ combination of the Original Code with other software or devices.
+
+ 2.2. Contributor Grant.
+ Subject to third party intellectual property claims, each Contributor
+ hereby grants You a world-wide, royalty-free, non-exclusive license
+
+ (a) under intellectual property rights (other than patent or
+ trademark) Licensable by Contributor, to use, reproduce, modify,
+ display, perform, sublicense and distribute the Modifications
+ created by such Contributor (or portions thereof) either on an
+ unmodified basis, with other Modifications, as Covered Code
+ and/or as part of a Larger Work; and
+
+ (b) under Patent Claims infringed by the making, using, or
+ selling of Modifications made by that Contributor either alone
+ and/or in combination with its Contributor Version (or portions
+ of such combination), to make, use, sell, offer for sale, have
+ made, and/or otherwise dispose of: 1) Modifications made by that
+ Contributor (or portions thereof); and 2) the combination of
+ Modifications made by that Contributor with its Contributor
+ Version (or portions of such combination).
+
+ (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
+ effective on the date Contributor first makes Commercial Use of
+ the Covered Code.
+
+ (d) Notwithstanding Section 2.2(b) above, no patent license is
+ granted: 1) for any code that Contributor has deleted from the
+ Contributor Version; 2) separate from the Contributor Version;
+ 3) for infringements caused by: i) third party modifications of
+ Contributor Version or ii) the combination of Modifications made
+ by that Contributor with other software (except as part of the
+ Contributor Version) or other devices; or 4) under Patent Claims
+ infringed by Covered Code in the absence of Modifications made by
+ that Contributor.
+
+3. Distribution Obligations.
+
+ 3.1. Application of License.
+ The Modifications which You create or to which You contribute are
+ governed by the terms of this License, including without limitation
+ Section 2.2. The Source Code version of Covered Code may be
+ distributed only under the terms of this License or a future version
+ of this License released under Section 6.1, and You must include a
+ copy of this License with every copy of the Source Code You
+ distribute. You may not offer or impose any terms on any Source Code
+ version that alters or restricts the applicable version of this
+ License or the recipients' rights hereunder. However, You may include
+ an additional document offering the additional rights described in
+ Section 3.5.
+
+ 3.2. Availability of Source Code.
+ Any Modification which You create or to which You contribute must be
+ made available in Source Code form under the terms of this License
+ either on the same media as an Executable version or via an accepted
+ Electronic Distribution Mechanism to anyone to whom you made an
+ Executable version available; and if made available via Electronic
+ Distribution Mechanism, must remain available for at least twelve (12)
+ months after the date it initially became available, or at least six
+ (6) months after a subsequent version of that particular Modification
+ has been made available to such recipients. You are responsible for
+ ensuring that the Source Code version remains available even if the
+ Electronic Distribution Mechanism is maintained by a third party.
+
+ 3.3. Description of Modifications.
+ You must cause all Covered Code to which You contribute to contain a
+ file documenting the changes You made to create that Covered Code and
+ the date of any change. You must include a prominent statement that
+ the Modification is derived, directly or indirectly, from Original
+ Code provided by the Initial Developer and including the name of the
+ Initial Developer in (a) the Source Code, and (b) in any notice in an
+ Executable version or related documentation in which You describe the
+ origin or ownership of the Covered Code.
+
+ 3.4. Intellectual Property Matters
+ (a) Third Party Claims.
+ If Contributor has knowledge that a license under a third party's
+ intellectual property rights is required to exercise the rights
+ granted by such Contributor under Sections 2.1 or 2.2,
+ Contributor must include a text file with the Source Code
+ distribution titled "LEGAL" which describes the claim and the
+ party making the claim in sufficient detail that a recipient will
+ know whom to contact. If Contributor obtains such knowledge after
+ the Modification is made available as described in Section 3.2,
+ Contributor shall promptly modify the LEGAL file in all copies
+ Contributor makes available thereafter and shall take other steps
+ (such as notifying appropriate mailing lists or newsgroups)
+ reasonably calculated to inform those who received the Covered
+ Code that new knowledge has been obtained.
+
+ (b) Contributor APIs.
+ If Contributor's Modifications include an application programming
+ interface and Contributor has knowledge of patent licenses which
+ are reasonably necessary to implement that API, Contributor must
+ also include this information in the LEGAL file.
+
+ (c) Representations.
+ Contributor represents that, except as disclosed pursuant to
+ Section 3.4(a) above, Contributor believes that Contributor's
+ Modifications are Contributor's original creation(s) and/or
+ Contributor has sufficient rights to grant the rights conveyed by
+ this License.
+
+ 3.5. Required Notices.
+ You must duplicate the notice in Exhibit A in each file of the Source
+ Code. If it is not possible to put such notice in a particular Source
+ Code file due to its structure, then You must include such notice in a
+ location (such as a relevant directory) where a user would be likely
+ to look for such a notice. If You created one or more Modification(s)
+ You may add your name as a Contributor to the notice described in
+ Exhibit A. You must also duplicate this License in any documentation
+ for the Source Code where You describe recipients' rights or ownership
+ rights relating to Covered Code. You may choose to offer, and to
+ charge a fee for, warranty, support, indemnity or liability
+ obligations to one or more recipients of Covered Code. However, You
+ may do so only on Your own behalf, and not on behalf of the Initial
+ Developer or any Contributor. You must make it absolutely clear than
+ any such warranty, support, indemnity or liability obligation is
+ offered by You alone, and You hereby agree to indemnify the Initial
+ Developer and every Contributor for any liability incurred by the
+ Initial Developer or such Contributor as a result of warranty,
+ support, indemnity or liability terms You offer.
+
+ 3.6. Distribution of Executable Versions.
+ You may distribute Covered Code in Executable form only if the
+ requirements of Section 3.1-3.5 have been met for that Covered Code,
+ and if You include a notice stating that the Source Code version of
+ the Covered Code is available under the terms of this License,
+ including a description of how and where You have fulfilled the
+ obligations of Section 3.2. The notice must be conspicuously included
+ in any notice in an Executable version, related documentation or
+ collateral in which You describe recipients' rights relating to the
+ Covered Code. You may distribute the Executable version of Covered
+ Code or ownership rights under a license of Your choice, which may
+ contain terms different from this License, provided that You are in
+ compliance with the terms of this License and that the license for the
+ Executable version does not attempt to limit or alter the recipient's
+ rights in the Source Code version from the rights set forth in this
+ License. If You distribute the Executable version under a different
+ license You must make it absolutely clear that any terms which differ
+ from this License are offered by You alone, not by the Initial
+ Developer or any Contributor. You hereby agree to indemnify the
+ Initial Developer and every Contributor for any liability incurred by
+ the Initial Developer or such Contributor as a result of any such
+ terms You offer.
+
+ 3.7. Larger Works.
+ You may create a Larger Work by combining Covered Code with other code
+ not governed by the terms of this License and distribute the Larger
+ Work as a single product. In such a case, You must make sure the
+ requirements of this License are fulfilled for the Covered Code.
+
+4. Inability to Comply Due to Statute or Regulation.
+
+ If it is impossible for You to comply with any of the terms of this
+ License with respect to some or all of the Covered Code due to
+ statute, judicial order, or regulation then You must: (a) comply with
+ the terms of this License to the maximum extent possible; and (b)
+ describe the limitations and the code they affect. Such description
+ must be included in the LEGAL file described in Section 3.4 and must
+ be included with all distributions of the Source Code. Except to the
+ extent prohibited by statute or regulation, such description must be
+ sufficiently detailed for a recipient of ordinary skill to be able to
+ understand it.
+
+5. Application of this License.
+
+ This License applies to code to which the Initial Developer has
+ attached the notice in Exhibit A and to related Covered Code.
+
+6. Versions of the License.
+
+ 6.1. New Versions.
+ Netscape Communications Corporation ("Netscape") may publish revised
+ and/or new versions of the License from time to time. Each version
+ will be given a distinguishing version number.
+
+ 6.2. Effect of New Versions.
+ Once Covered Code has been published under a particular version of the
+ License, You may always continue to use it under the terms of that
+ version. You may also choose to use such Covered Code under the terms
+ of any subsequent version of the License published by Netscape. No one
+ other than Netscape has the right to modify the terms applicable to
+ Covered Code created under this License.
+
+ 6.3. Derivative Works.
+ If You create or use a modified version of this License (which you may
+ only do in order to apply it to code which is not already Covered Code
+ governed by this License), You must (a) rename Your license so that
+ the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
+ "MPL", "NPL" or any confusingly similar phrase do not appear in your
+ license (except to note that your license differs from this License)
+ and (b) otherwise make it clear that Your version of the license
+ contains terms which differ from the Mozilla Public License and
+ Netscape Public License. (Filling in the name of the Initial
+ Developer, Original Code or Contributor in the notice described in
+ Exhibit A shall not of themselves be deemed to be modifications of
+ this License.)
+
+7. DISCLAIMER OF WARRANTY.
+
+ COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
+ DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
+ THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
+ IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
+ YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
+ COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
+ OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
+ ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+8. TERMINATION.
+
+ 8.1. This License and the rights granted hereunder will terminate
+ automatically if You fail to comply with terms herein and fail to cure
+ such breach within 30 days of becoming aware of the breach. All
+ sublicenses to the Covered Code which are properly granted shall
+ survive any termination of this License. Provisions which, by their
+ nature, must remain in effect beyond the termination of this License
+ shall survive.
+
+ 8.2. If You initiate litigation by asserting a patent infringement
+ claim (excluding declatory judgment actions) against Initial Developer
+ or a Contributor (the Initial Developer or Contributor against whom
+ You file such action is referred to as "Participant") alleging that:
+
+ (a) such Participant's Contributor Version directly or indirectly
+ infringes any patent, then any and all rights granted by such
+ Participant to You under Sections 2.1 and/or 2.2 of this License
+ shall, upon 60 days notice from Participant terminate prospectively,
+ unless if within 60 days after receipt of notice You either: (i)
+ agree in writing to pay Participant a mutually agreeable reasonable
+ royalty for Your past and future use of Modifications made by such
+ Participant, or (ii) withdraw Your litigation claim with respect to
+ the Contributor Version against such Participant. If within 60 days
+ of notice, a reasonable royalty and payment arrangement are not
+ mutually agreed upon in writing by the parties or the litigation claim
+ is not withdrawn, the rights granted by Participant to You under
+ Sections 2.1 and/or 2.2 automatically terminate at the expiration of
+ the 60 day notice period specified above.
+
+ (b) any software, hardware, or device, other than such Participant's
+ Contributor Version, directly or indirectly infringes any patent, then
+ any rights granted to You by such Participant under Sections 2.1(b)
+ and 2.2(b) are revoked effective as of the date You first made, used,
+ sold, distributed, or had made, Modifications made by that
+ Participant.
+
+ 8.3. If You assert a patent infringement claim against Participant
+ alleging that such Participant's Contributor Version directly or
+ indirectly infringes any patent where such claim is resolved (such as
+ by license or settlement) prior to the initiation of patent
+ infringement litigation, then the reasonable value of the licenses
+ granted by such Participant under Sections 2.1 or 2.2 shall be taken
+ into account in determining the amount or value of any payment or
+ license.
+
+ 8.4. In the event of termination under Sections 8.1 or 8.2 above,
+ all end user license agreements (excluding distributors and resellers)
+ which have been validly granted by You or any distributor hereunder
+ prior to termination shall survive termination.
+
+9. LIMITATION OF LIABILITY.
+
+ UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
+ (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
+ DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
+ OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
+ ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
+ CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
+ WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
+ COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
+ INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
+ LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
+ RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
+ PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
+ EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
+ THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+10. U.S. GOVERNMENT END USERS.
+
+ The Covered Code is a "commercial item," as that term is defined in
+ 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
+ software" and "commercial computer software documentation," as such
+ terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
+ C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
+ all U.S. Government End Users acquire Covered Code with only those
+ rights set forth herein.
+
+11. MISCELLANEOUS.
+
+ This License represents the complete agreement concerning subject
+ matter hereof. If any provision of this License is held to be
+ unenforceable, such provision shall be reformed only to the extent
+ necessary to make it enforceable. This License shall be governed by
+ California law provisions (except to the extent applicable law, if
+ any, provides otherwise), excluding its conflict-of-law provisions.
+ With respect to disputes in which at least one party is a citizen of,
+ or an entity chartered or registered to do business in the United
+ States of America, any litigation relating to this License shall be
+ subject to the jurisdiction of the Federal Courts of the Northern
+ District of California, with venue lying in Santa Clara County,
+ California, with the losing party responsible for costs, including
+ without limitation, court costs and reasonable attorneys' fees and
+ expenses. The application of the United Nations Convention on
+ Contracts for the International Sale of Goods is expressly excluded.
+ Any law or regulation which provides that the language of a contract
+ shall be construed against the drafter shall not apply to this
+ License.
+
+12. RESPONSIBILITY FOR CLAIMS.
+
+ As between Initial Developer and the Contributors, each party is
+ responsible for claims and damages arising, directly or indirectly,
+ out of its utilization of rights under this License and You agree to
+ work with Initial Developer and Contributors to distribute such
+ responsibility on an equitable basis. Nothing herein is intended or
+ shall be deemed to constitute any admission of liability.
+
+13. MULTIPLE-LICENSED CODE.
+
+ Initial Developer may designate portions of the Covered Code as
+ "Multiple-Licensed". "Multiple-Licensed" means that the Initial
+ Developer permits you to utilize portions of the Covered Code under
+ Your choice of the NPL or the alternative licenses, if any, specified
+ by the Initial Developer in the file described in Exhibit A.
+
+EXHIBIT A -Mozilla Public License.
+
+ ``The contents of this file are subject to the Mozilla Public License
+ Version 1.1 (the "License"); you may not use this file except in
+ compliance with the License. You may obtain a copy of the License at
+ http://www.mozilla.org/MPL/
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ License for the specific language governing rights and limitations
+ under the License.
+
+ The Original Code is ______________________________________.
+
+ The Initial Developer of the Original Code is ________________________.
+ Portions created by ______________________ are Copyright (C) ______
+ _______________________. All Rights Reserved.
+
+ Contributor(s): ______________________________________.
+
+ Alternatively, the contents of this file may be used under the terms
+ of the _____ license (the "[___] License"), in which case the
+ provisions of [______] License are applicable instead of those
+ above. If you wish to allow use of your version of this file only
+ under the terms of the [____] License and not to allow others to use
+ your version of this file under the MPL, indicate your decision by
+ deleting the provisions above and replace them with the notice and
+ other provisions required by the [___] License. If you do not delete
+ the provisions above, a recipient may use your version of this file
+ under either the MPL or the [___] License."
+
+ [NOTE: The text of this Exhibit A may differ slightly from the text of
+ the notices in the Source Code files of the Original Code. You should
+ use the text of this Exhibit A rather than the text found in the
+ Original Code Source Code for Your Modifications.]
+
diff --git a/patches/source/mozilla-nss/faq.html b/patches/source/mozilla-nss/faq.html
new file mode 100644
index 000000000..176fe8f88
--- /dev/null
+++ b/patches/source/mozilla-nss/faq.html
@@ -0,0 +1,364 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="top" title="Home" href="http://www.mozilla.org/">
+<link rel="stylesheet" type="text/css" href="../../../../css/print.css" media="print">
+<link rel="stylesheet" type="text/css" href="../../../../css/base/content.css" media="all">
+<link rel="stylesheet" type="text/css" href="../../../../css/cavendish/content.css" title="Cavendish" media="screen">
+<link rel="stylesheet" type="text/css" href="../../../../css/base/template.css" media="screen">
+<link rel="stylesheet" type="text/css" href="../../../../css/cavendish/template.css" title="Cavendish" media="screen">
+<link rel="icon" href="../../../../images/mozilla-16.png" type="image/png">
+
+<TITLE>NSS FAQ</TITLE>
+<script src="../../../../__utm.js" type="text/javascript"></script>
+</head>
+<body id="www-mozilla-org" class="secondLevel sectionDevelopers">
+<div id="container">
+<p class="skipLink"><a href="#mainContent" accesskey="2">Skip to main content</a></p>
+<div id="header">
+<h1><a href="/" title="Return to home page" accesskey="1">Mozilla</a></h1>
+<ul>
+<li id="menu_aboutus"><a href="../../../../about/" title="Learn more about Mozilla">About</a></li>
+<li id="menu_foundation"><a href="../../../../foundation/" title="Information about the non-profit Mozilla Foundation">Foundation</a></li>
+<li id="menu_contribute"><a href="../../../../contribute/" title="Find out how to get involved with Mozilla">Contribute</a></li>
+<li id="menu_community"><a href="../../../../community/" title="List of community sites and other resources">Community</a></li>
+<li id="menu_developers"><a href="../../../../developer/" title="Resources and links for developers">Developers</a></li>
+<li id="menu_projects"><a href="../../../../projects/" title="Projects being created by the Mozilla community">Projects</a></li>
+</ul>
+<form id="searchbox_002443141534113389537:ysdmevkkknw" action="http://www.google.com/cse" title="mozilla.org Search">
+<div>
+<label for="q" title="Search mozilla.org's sites">search mozilla:</label>
+<input type="hidden" name="cx" value="002443141534113389537:ysdmevkkknw">
+<input type="hidden" name="cof" value="FORID:0">
+<input type="text" id="q" name="q" accesskey="s" size="30">
+<input type="submit" id="submit" value="Go">
+</div>
+</form>
+</div>
+<hr class="hide">
+<div id="mBody">
+<div id="side">
+
+<ul id="nav">
+<li><a title="Roadmap" href="../../../../roadmap.html"><strong> Roadmap</strong></a></li>
+<li><a title="Projects" href="../../../../projects/"><strong> Projects</strong></a></li>
+<li><a title="For developers" href="../../../../developer/"><strong> Coding</strong></a>
+<ul>
+<li><a title="Module Owners" href="../../../../owners.html"> Module Owners</a></li>
+<li><a title="Hacking" href="../../../../hacking/"> Hacking</a></li>
+<li><a title="Get the Source" href="http://developer.mozilla.org/en/docs/Download_Mozilla_Source_Code"> Get the Source</a></li>
+<li><a title="Building Mozilla" href="http://developer.mozilla.org/en/docs/Build_Documentation"> Build It</a></li>
+</ul>
+</li>
+<li><a title="Testing" href="http://quality.mozilla.org/"><strong> Testing</strong></a>
+<ul>
+<li><a title="Downloads of mozilla.org software releases" href="../../../../download.html"> Releases</a></li>
+<li><a title="Latest mozilla builds for testers" href="../../../../developer/#builds"> Nightly Builds</a></li>
+<li><a title="For testers to report bugs" href="https://bugzilla.mozilla.org/"> Report A Problem</a></li>
+</ul>
+</li>
+<li><a title="Tools for mozilla developers" href="../../../../tools.html"><strong> Tools</strong></a>
+<ul>
+<li><a title="Bug tracking system for mozilla testers." href="https://bugzilla.mozilla.org/"> Bugzilla</a></li>
+<li><a title="Latest status of mozilla builds" href="http://tinderbox.mozilla.org/showbuilds.cgi?tree=Firefox"> Tinderbox</a></li>
+<li><a title="Latest checkins" href="http://bonsai.mozilla.org/cvsqueryform.cgi"> Bonsai</a></li>
+<li><a title="Source cross reference" href="http://mxr.mozilla.org/"> MXR</a></li>
+</ul>
+</li>
+<li><a title="Frequently Asked Questions." href="../../../../faq.html"><strong> FAQs</strong></a></li>
+</ul>
+
+</div>
+<hr class="hide">
+<div id="mainContent">
+
+
+
+
+<center>
+<h2>NSS FAQ</h2>
+<i><FONT SIZE="-1">
+
+Newsgroup:
+<A HREF="news://news.mozilla.org/mozilla.dev.tech.crypto">mozilla.dev.tech.crypto</A>
+
+</FONT></i>
+</center>
+
+<p>
+<hr>
+<p>
+
+<a href="#Q1">General Questions</a>
+
+<ul>
+<li>
+<a href="#Q1.1">What is Network Security Services (NSS)?</a></li>
+<li>
+<a href="#Q1.2">What can I do with NSS? Is NSS appropriate for my application?</a></li>
+<li>
+<a href="#q1.2a">How does NSS compare to OpenSSL?</a></li>
+<li>
+<a href="#q1.3">How does NSS compare to SSLRef?</a></li>
+<li>
+<a href="#q1.4">What platforms and development environments are supported?</a></li>
+<li>
+<a href="#q1.5">What cryptography standards are supported?</a></li>
+<li>
+<a href="#q1.7">What is the relationship between NSS and PSM?</a></li>
+<li>
+<a href="#q1.7">Where can I get the source?</a></li>
+<li>
+<a href="#q1.8">How much does it cost?</a></li>
+</ul>
+
+<a href="#Q2">Developer Questions</a>
+<ul>
+<li>
+<a href="#q2.1">What hardware accelerators are supported?</a></li>
+<li>
+<a href="#q2.2">How do I integrate smart cards into my application using
+NSS?</a></li>
+<li>
+<a href="#q2.3">How is NSS compatible with other Netscape products?</a></li>
+<li>
+<a href="#q2.4">Does NSS require Netscape Portable Runtime (NSPR)?</a></li>
+<li>
+<a href="#q2.5">Can I use NSS even if my application protocol isn't HTTP?</a></li>
+<li>
+<a href="#q2.6">How long does it take to integrate NSS into my application?</a></li>
+<li>
+<a href="#q2.6">How can I learn more about SSL?</a></li>
+</ul>
+
+<a href="#Q3">Licensing Questions</a>
+<ul>
+<li>
+<a href="#q3.1">How is NSS licensed?</a>
+<li>
+<a href="#q3.2">Is NSS available outside the United States?</a></li>
+</ul>
+<h2>
+ <a NAME="Q1"><hr WIDTH="100%"></a>General Questions</h2>
+<a NAME="Q1.1"></a><H4>What is Network Security Services (NSS)?</h4>
+<P>NSS is set of libraries, APIs, utilities, and documentation designed
+to support cross-platform development of security-enabled client and
+server applications. It provides a complete open-source implementation
+of the crypto libraries used by Netscape and other companies in the
+Netscape 6 browser, server products from iPlanet E-Commerce Solutions, the
+Gateway Connected Touch Pad with Instant AOL, and other products.
+
+<p>For an
+overview of NSS, see <a href="overview.html">Overview of NSS</a>. For detailed information
+on the open-source NSS project, see <a href="index.html">NSS Project Page</a>.
+
+<br>
+<a NAME="Q1.2"></a><H4>What can I do with NSS? Is NSS appropriate for
+my application?</h4>
+<P>If you want add support for SSL, S/MIME, or other Internet security standards
+to your application, you can use Network Security Services (NSS) to do so. Because
+NSS provides complete support for all versions of SSL and TLS, it is particularly well-suited
+for applications that need to communicate with the many clients and servers
+that already support the SSL protocol.
+<p>The PKCS #11 interface included in NSS means that your application can
+use <a href="#q2.1">hardware accelerators</a> on the server and <a href="#q2.2">smart
+cards</a> for two-factor authentication.
+<br>
+
+ <a NAME="q1.2a"></a><H4>How does NSS compare to OpenSSL?</h4>
+
+<a href="http://www.openssl.org/">OpenSSL</a> is an open source project that implements server-side SSL,
+TLS, and a general-purpose cryptography library. It does not support PKCS #11. It is based on
+the SSLeay library developed by Eric A. Young and Tim J. Hudson. OpenSSL is widely used in
+Apache servers and is licensed under an Apache-style licence.
+
+<p>NSS supports both server and client applications as well as PKCS #11 and S/MIME. To permit its use
+in as many contexts as possible,
+NSS is triple-licensed under the <a href="../../../../MPL/">Mozilla Public License</a>, the
+<a href="http://www.gnu.org/copyleft/gpl.html">GNU General Public License</a>,
+and the <a href="http://www.gnu.org/copyleft/lesser.html">GNU Lesser General Public License</a>.
+You may choose to use the code either under the terms of the MPL or the GPL or the LGPL.
+
+<a NAME="q1.3"></a><H4>How does NSS compare to SSLRef?</h4>
+SSLRef was an early reference implementation of the SSL protocol. It contains
+bugs that were never fixed, doesn't support TLS or or the
+new 56-bit export cipher suites, and does not contain the fix to the
+Bleichenbacher attack on PKCS#1.
+
+<p>Netscape no longer maintains SSLRef or makes it available. It was built as
+an example of an SSL implementation, not for creating production applications.
+
+<p>NSS was designed from the ground up for use by commercial developers.
+It provides a complete software development kit
+that uses the same architecture used to support security features in many client
+and server products from Netscape and other companies.
+
+<a NAME="q1.4"></a><H4>What platforms and development environments are supported?</h4>
+<P>iPlanet E-Commerce Solutions has certified NSS 3.1 on 18 platforms, including AIX 4.3, HP-UX 11.0,
+Red Hat Linux 6.0, Solaris (2.6 or later), Windows NT (4.0 or later), and
+Windows 2000. Other contributors are in the process of certifying additional platforms.
+The NSS 3.1 API requires C or C++ development environments.
+
+<p>For the latest NSS release notes and detailed platform information, see
+<a href="release_notes_31.html">NSS 3.1 Release Notes</a>.
+
+<a NAME="q1.5"></a><H4>What cryptography standards does NSS support?</h4>
+<P>NSS supports <a HREF="../../../docs/jargon.html#SSL">SSL v2 and v3</a>,
+ <a HREF="../../../../docs/jargon.html#TLS">TLS</a>,
+ <a HREF="../../../../docs/jargon.html#PKCS5">PKCS #5</a>,
+ <a HREF="../../../../docs/jargon.html#PKCS7">PKCS #7</a>,
+ <a HREF="../../../../docs/jargon.html#PKCS11">PKCS #11</a>,
+ <a HREF="../../../../docs/jargon.html#PKCS12">PKCS #12</a>,
+ <a HREF="../../../../docs/jargon.html#SMIME">S/MIME</a>, and
+ <a HREF="../../../../docs/jargon.html#X.509">X.509 v3</a> certificates.
+For complete details,
+see <a href="nss-3.11/nss-3.11-algorithms.html">
+Encryption Technologies</a>.
+
+<a NAME="q1.6"></a><H4>What is the relationship between NSS and PSM?</H4>
+
+Personal Security Manager (PSM) is built on top of NSS. It consists of libraries
+and a daemon designed to support cross-platform development of security-enabled
+client applications. The PSM binary provides a client module
+that performs cryptographic operations on behalf of applications.
+Netscape Personal Security Manager ships with Netscape 6 and the Gateway Connected Touch Pad with Instant AOL,
+and is also available for use with Communicagotr 4.7x.
+
+<p>For more information about the PSM open-source project, see <a href="../psm">Personal Security Manager</a>.
+
+<a NAME="q1.7"></a><H4>Where can I get the source code?</H4>
+
+For instructions on how to check out and build the NSS 3.1 source code, see
+<a href="buildnss_31.html">Build Instructions for NSS 3.1.</a> The source code may also
+be downloaded as a tar file from
+<a href="ftp://ftp.mozilla.org/pub/mozilla.org/security/">ftp://ftp.mozilla.org/pub/mozilla.org/security/</a>.
+
+<a NAME="q1.8"></a><H4>How much does it cost?</H4>
+
+NSS source code and binaries (when they become available) are completely free. No license fees,
+no royalty fees, no subscription fees.
+
+
+<a NAME="Q2"><h2>
+<hr WIDTH="100%"></a>Developer Questions</h2>
+
+<a NAME="q2.1"></a><H4>What hardware accelerators are supported?</h4>
+<P>NSS supports the PKCS #11 interface for hardware acceleration. Since leading accelerator vendors such as
+Chrysalis-IT, nCipher, and Rainbow Technologies also support this interface, NSS-enabled applications
+can support a wide variety of hardware accelerators.
+<a NAME="q2.2"></a><H4>How do I integrate smart cards into my application using
+NSS?</h4>
+<P>NSS supports the PKCS #11 interface for smart card integration. Applications that use the PKCS #11
+interface provided by NSS will therefore support smart cards from leading vendors such as
+ActiveCard, Litronic, and SecureID Technologies that also support the PKCS #11 interface.
+
+<a NAME="q2.3"></a><H4>How is NSS compatible with other Netscape products?</h4>
+<P>NSS provides tight integration with other Netscape products in two ways.
+First, by using NSS to implement SSL and TLS, you can support SSL communications
+with all products from Netscape and all other vendors
+that support SSL<FONT color="#CC0000"> and TLS.</FONT> Second, NSS makes it easy
+to share certificates between Netscape client and server products
+and your application.
+
+<a NAME="q2.4"></a><H4>Does NSS require Netscape Portable Runtime (NSPR)?</h4>
+<P>To provide cross-platform support, NSS utilizes Netscape Portable Runtime
+(NSPR) libraries as a portability interface and implementation that
+provides consistent cross-platform semantics for network I/O and threading
+models. You can use NSPR throughout your application or
+only in the portion that calls into NSS. Netscape strongly recommends that
+multithreaded applications use the NSPR or native OS threading model. (In
+recent NSPR releases, the NSPR threading model is compatible with the native
+threading model if the OS has native threads.) Alternatively, you can adapt
+the open-source NSPR implementation to be compatible with your existing
+application's threading models. More information about NSPR may be found at
+<a href="http://www.mozilla.org/projects/nspr/">Netscape Portable Runtime</a>.
+<br>
+
+<a NAME="q2.5"></a><H4>Can I use NSS even if my application protocol isn't
+HTTP?</h4>
+<P>Yes, SSL independent of application protocols. It works with common
+Internet standard application protocols (HTTP, POP3, FTP, SMTP, etc.) as
+well as custom application protocols using TCP/IP.
+
+<br>
+<a NAME="q2.6"></a><H4>How long does it take to integrate NSS into my application?</h4>
+<P>The integration effort depends on an number of factors, such as developer
+skill set, application complexity, and the level of security required for
+your application. NSS includes detailed documentation of the SSL API and
+sample code that demonstrates basic SSL functionality (setting up an encrypted
+session, server authentication, and client authentication) to help jump start the
+integration process. However, there is little or no documentation currently
+available for the rest of the NSS API. If your application requires sophisticated
+certificate management, smart card support, or hardware acceleration, your
+integration effort will be more extensive.
+
+<a NAME="q2.7"></a><H4> Where can I download the NSS tools?</h4>
+
+Currently, you must download the NSS source and build it to create binary files for the NSS tools.
+For more information, see <A HREF="tools/">NSS Tools</A>.
+
+
+<a NAME="q2.8"></a><H4>How can I learn more about SSL?</h4>
+
+NSS provides extensive documentation related to SSL, including high-level introductions,
+detailed API documentation, sample code for simple client and server
+applications, the original SSL 3.0 specification, and
+information on debugging SSL applications. For details, see the
+<a href="ssl/">SSL/TLS Project Page</a>. For information about the NSS tools, including those used
+for debugging SSL applications, see <a href="http://www.mozilla.org/projects/security/pki/nss/tools/">
+NSS Security Tools</a>.
+
+<a NAME="Q3"><h2>
+<hr WIDTH="100%"></a>Licensing Questions</h2>
+<H4><a NAME="q3.1"></a>How is NSS licensed?</h4>
+<P>NSS is triple-licensed under the <a href="../../../../MPL/">Mozilla Public License</a>, the
+<a href="http://www.gnu.org/copyleft/gpl.html">GNU General Public License</a>,
+and the <a href="http://www.gnu.org/copyleft/lesser.html">GNU Lesser General Public License</a>.
+For more details, see the <a href="http://www.mozilla.org/crypto-faq.html#1-3">Mozilla Crypto FAQ</a>.
+
+<a NAME="q3.2"></a><H4>Is NSS available outside the United States?</h4>
+<P>Yes; see
+<a href="buildnss_31.html">Build Instructions for NSS 3.1.</a> and
+<a href="ftp://ftp.mozilla.org/pub/mozilla.org/security/">ftp://ftp.mozilla.org/pub/mozilla.org/security/</a>.
+However, NSS source code is subject to the U.S. Export
+Administration Regulations and other U.S. law, and may not be exported or
+re-exported to certain
+countries (currently Cuba, Iran, Libya, North Korea, Sudan and Syria) or
+to persons or entities prohibited from receiving U.S. exports (including
+those (a) on the Bureau of Industry and Security Denied Parties List or
+Entity List, (b) on the Office of Foreign Assets Control list of Specially
+Designated Nationals and Blocked Persons, and (c) involved with missile
+technology or nuclear, chemical or biological weapons).
+
+<p>For more information about U.S. export controls on encryption software,
+see the <a href="http://www.mozilla.org/crypto-faq.html">Mozilla Crypto FAQ</a>.
+
+
+
+
+
+<hr class="hide">
+</div>
+</div>
+<div id="footer">
+<ul>
+<li><a href="../../../../support/">Support Options</a></li>
+<li><a href="../../../../security/">Security Center</a></li>
+<li><a href="../../../../privacy-policy.html">Privacy Policy</a></li>
+<li><a href="../../../../contact/">Contact Us</a></li>
+</ul>
+<p class="affiliates">International Affiliates: <a href="http://www.mozilla-europe.org/">Mozilla Europe</a> - <a
+href="http://mozilla.jp/">Mozilla Japan</a> - <a href="http://www.mozillaonline.com/">Mozilla China</a></p>
+<p class="copyright">
+Portions of this content are &copy; 1998&#8211;2009 by individual mozilla.org contributors<br>
+Content available under a Creative Commons <a href="http://www.mozilla.org/foundation/licensing/website-content.html">license</a></p>
+<p>
+<span>Last modified July 12, 2007</span>
+<span><a href="http://bonsai-www.mozilla.org/cvslog.cgi?file=mozilla-org/html/projects/security/pki/nss/faq.html&amp;rev=&amp;root=/www/">Document History</a></span>
+<span><a href="https://doctor.mozilla.org/?action=edit&amp;file=mozilla-org/html/projects/security/pki/nss/faq.html">Edit this Page</a></span> <span>(or <a href="/contribute/writing/cvs">via CVS</a>)</span>
+</p>
+</div>
+</div>
+</body>
+</html>
diff --git a/patches/source/mozilla-nss/gpl-2.0.txt b/patches/source/mozilla-nss/gpl-2.0.txt
new file mode 100644
index 000000000..d511905c1
--- /dev/null
+++ b/patches/source/mozilla-nss/gpl-2.0.txt
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ 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 of the License, 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, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/patches/source/mozilla-nss/lgpl-2.1.txt b/patches/source/mozilla-nss/lgpl-2.1.txt
new file mode 100644
index 000000000..602bfc946
--- /dev/null
+++ b/patches/source/mozilla-nss/lgpl-2.1.txt
@@ -0,0 +1,504 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/patches/source/mozilla-nss/mozilla-nss.SlackBuild b/patches/source/mozilla-nss/mozilla-nss.SlackBuild
new file mode 100755
index 000000000..a5e2fa802
--- /dev/null
+++ b/patches/source/mozilla-nss/mozilla-nss.SlackBuild
@@ -0,0 +1,186 @@
+#!/bin/sh
+# Copyright 2005, 2006, 2008, 2009, 2010, 2012 Eric Hameleers, Eindhoven, NL
+# Copyright 2013, 2014, 2015, 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# -----------------------------------------------------------------------------
+
+PKGNAM=mozilla-nss
+SRCNAM=nss
+VERSION=${VERSION:-3.31.1}
+NSPR=${NSPR:-4.16}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
+if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i486 ;;
+ armv7hl) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ export USE_64=1
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+# Seems parallel build does not work with this.
+#NUMJOBS=${NUMJOBS:-" -j7 "}
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf nss-${VERSION}
+rm -rf nspr-${NSPR}
+tar xvf $CWD/nss-$VERSION.tar.?z* || exit 1
+cd nss-$VERSION
+tar xvf $CWD/nspr-$NSPR.tar.?z* || exit 1
+mv nspr*/nspr .
+
+# -Werror is problematic with gcc7:
+sed -i "s|\ -Werror| |" nss/coreconf/Werror.mk || exit 1
+
+# Make sure ownerships and permissions are sane:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+echo Building ...
+export LDFLAGS="-lz"
+export CFLAGS="$SLKCFLAGS"
+export CXXFLAGS="$SLKCFLAGS"
+export BUILD_OPT=1
+export NSDISTMODE="copy"
+export NSS_USE_SYSTEM_SQLITE=1
+export NSS_ENABLE_ECC=1
+cd nss
+ # Seems parallel build does not work with this.
+ #make $NUMJOBS nss_build_all export
+ make nss_build_all export || exit 1
+cd -
+
+# Install all the needed stuff to the package dir:
+mkdir -p $PKG/usr/{bin,lib${LIBDIRSUFFIX},include/{nss,nspr}}
+cd dist/$(uname -s)*
+ cp -pL bin/{certutil,cmsutil,crlutil,modutil,pk12util,shlibsign,signtool,signver,ssltap} $PKG/usr/bin/
+ cp -pL lib/* $PKG/usr/lib${LIBDIRSUFFIX}/
+ chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/*.so*
+ cp -rL include/* $PKG/usr/include/nspr/
+ cp -rpL ../public/nss/*.h $PKG/usr/include/nss/
+ # Remove some things we do not need:
+ rm -f $PKG/usr/bin/*.so
+ rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.a
+ rm -rf $PKG/usr/include/nspr/md
+ cp -L lib/libcrmf.a $PKG/usr/lib${LIBDIRSUFFIX}/ # yes, put this one back
+cd -
+
+cd nss/cmd/smimetools
+ cp -a smime $PKG/usr/bin/
+ chmod 0755 $PKG/usr/bin/smime
+ sed -i -e 's#/usr/local/bin#/usr/bin#g' $PKG/usr/bin/smime
+cd -
+
+# Install nspr-config:
+cat nspr/$(uname -s)*/config/nspr-config | sed -e "s,prefix=/usr/local,prefix=/usr,g" | sed -e "s,libdir=\${exec_prefix}/lib,libdir=\${exec_prefix}/lib${LIBDIRSUFFIX},g" > $PKG/usr/bin/nspr-config
+chmod 755 $PKG/usr/bin/nspr-config
+
+# Install nss-config:
+sed -e "s,@prefix@,/usr,g" \
+ -e "s,@MOD_MAJOR_VERSION@,$(printf $VERSION | cut -d. -f1),g" \
+ -e "s,@MOD_MINOR_VERSION@,$(printf $VERSION | cut -d. -f2),g" \
+ -e "s,@MOD_PATCH_VERSION@,$(printf $VERSION | cut -d. -f3),g" \
+ $CWD/nss-config.in > $PKG/usr/bin/nss-config
+chmod 755 $PKG/usr/bin/nss-config
+
+# Provide pkg-config files:
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig
+cat <<EOT > $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/mozilla-nss.pc
+prefix=/usr
+exec_prefix=\${prefix}
+libdir=/usr/lib${LIBDIRSUFFIX}
+includedir=\${prefix}/include/nss
+
+Name: NSS
+Description: Network Security Services
+Version: $VERSION
+Requires: nspr >= $NSPR sqlite3
+Libs: -L\${libdir} -lnss3 -lsmime3 -lssl3 -lsoftokn3 -lnssutil3
+Cflags: -I\${includedir}
+EOT
+cat <<EOT > $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/mozilla-nspr.pc
+prefix=/usr
+exec_prefix=\${prefix}
+libdir=/usr/lib${LIBDIRSUFFIX}
+includedir=\${prefix}/include/nspr
+
+Name: NSPR
+Description: The Netscape Portable Runtime
+Version: $NSPR
+Libs: -L\${libdir} -lplds4 -lplc4 -lnspr4
+Cflags: -I\${includedir}
+EOT
+
+( cd $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig
+ ln -s mozilla-nspr.pc nspr.pc
+ ln -s mozilla-nss.pc nss.pc
+)
+
+# Add documentation:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ $CWD/MPL-1.1.txt $CWD/gpl-2.0.txt $CWD/lgpl-2.1.txt \
+ $CWD/faq.html \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+chown -R root:root $PKG/usr/doc/$PKGNAM-$VERSION
+
+# Strip binaries:
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Add a package description:
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/${PKGNAM}-${VERSION}-${ARCH}-${BUILD}.txz
+
diff --git a/patches/source/mozilla-nss/nss-config.in b/patches/source/mozilla-nss/nss-config.in
new file mode 100644
index 000000000..f8f893e71
--- /dev/null
+++ b/patches/source/mozilla-nss/nss-config.in
@@ -0,0 +1,145 @@
+#!/bin/sh
+
+prefix=@prefix@
+
+major_version=@MOD_MAJOR_VERSION@
+minor_version=@MOD_MINOR_VERSION@
+patch_version=@MOD_PATCH_VERSION@
+
+usage()
+{
+ cat <<EOF
+Usage: nss-config [OPTIONS] [LIBRARIES]
+Options:
+ [--prefix[=DIR]]
+ [--exec-prefix[=DIR]]
+ [--includedir[=DIR]]
+ [--libdir[=DIR]]
+ [--version]
+ [--libs]
+ [--cflags]
+Dynamic Libraries:
+ nss
+ nssutil
+ ssl
+ smime
+EOF
+ exit $1
+}
+
+if test $# -eq 0; then
+ usage 1 1>&2
+fi
+
+lib_ssl=yes
+lib_smime=yes
+lib_nss=yes
+lib_nssutil=yes
+
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case $1 in
+ --prefix=*)
+ prefix=$optarg
+ ;;
+ --prefix)
+ echo_prefix=yes
+ ;;
+ --exec-prefix=*)
+ exec_prefix=$optarg
+ ;;
+ --exec-prefix)
+ echo_exec_prefix=yes
+ ;;
+ --includedir=*)
+ includedir=$optarg
+ ;;
+ --includedir)
+ echo_includedir=yes
+ ;;
+ --libdir=*)
+ libdir=$optarg
+ ;;
+ --libdir)
+ echo_libdir=yes
+ ;;
+ --version)
+ echo ${major_version}.${minor_version}.${patch_version}
+ ;;
+ --cflags)
+ echo_cflags=yes
+ ;;
+ --libs)
+ echo_libs=yes
+ ;;
+ ssl)
+ lib_ssl=yes
+ ;;
+ smime)
+ lib_smime=yes
+ ;;
+ nss)
+ lib_nss=yes
+ ;;
+ nssutil)
+ lib_nssutil=yes
+ ;;
+ *)
+ usage 1 1>&2
+ ;;
+ esac
+ shift
+done
+
+# Set variables that may be dependent upon other variables
+if test -z "$exec_prefix"; then
+ exec_prefix=`pkg-config --variable=exec_prefix nss`
+fi
+if test -z "$includedir"; then
+ includedir=`pkg-config --variable=includedir nss`
+fi
+if test -z "$libdir"; then
+ libdir=`pkg-config --variable=libdir nss`
+fi
+
+if test "$echo_prefix" = "yes"; then
+ echo $prefix
+fi
+
+if test "$echo_exec_prefix" = "yes"; then
+ echo $exec_prefix
+fi
+
+if test "$echo_includedir" = "yes"; then
+ echo $includedir
+fi
+
+if test "$echo_libdir" = "yes"; then
+ echo $libdir
+fi
+
+if test "$echo_cflags" = "yes"; then
+ echo -I$includedir
+fi
+
+if test "$echo_libs" = "yes"; then
+ libdirs="-Wl,-rpath-link,$libdir -L$libdir"
+ if test -n "$lib_ssl"; then
+ libdirs="$libdirs -lssl${major_version}"
+ fi
+ if test -n "$lib_smime"; then
+ libdirs="$libdirs -lsmime${major_version}"
+ fi
+ if test -n "$lib_nss"; then
+ libdirs="$libdirs -lnss${major_version}"
+ fi
+ if test -n "$lib_nssutil"; then
+ libdirs="$libdirs -lnssutil${major_version}"
+ fi
+ echo $libdirs
+fi
+
diff --git a/patches/source/mozilla-nss/slack-desc b/patches/source/mozilla-nss/slack-desc
new file mode 100644
index 000000000..7a23daaff
--- /dev/null
+++ b/patches/source/mozilla-nss/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+mozilla-nss: mozilla-nss (Network Security Services)
+mozilla-nss:
+mozilla-nss: Network Security Services (NSS) is a set of libraries designed to
+mozilla-nss: support cross-platform development of security-enabled client and
+mozilla-nss: server applications. Applications built with NSS can support
+mozilla-nss: SSL v2 and v3, TLS, PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME,
+mozilla-nss: X.509 v3 certificates, and other security standards.
+mozilla-nss:
+mozilla-nss:
+mozilla-nss: Read http://www.mozilla.org/projects/security/pki/nss/overview.html
+mozilla-nss:
diff --git a/patches/source/mozilla-thunderbird/gold/gold b/patches/source/mozilla-thunderbird/gold/gold
new file mode 100755
index 000000000..8c86d3b06
--- /dev/null
+++ b/patches/source/mozilla-thunderbird/gold/gold
@@ -0,0 +1,2 @@
+#!/bin/bash
+/usr/bin/ld.gold "$@"
diff --git a/patches/source/mozilla-thunderbird/gold/ld b/patches/source/mozilla-thunderbird/gold/ld
new file mode 120000
index 000000000..78a06a2a1
--- /dev/null
+++ b/patches/source/mozilla-thunderbird/gold/ld
@@ -0,0 +1 @@
+gold \ No newline at end of file
diff --git a/patches/source/mozilla-thunderbird/mozilla-firefox.xpcom_arm.patch b/patches/source/mozilla-thunderbird/mozilla-firefox.xpcom_arm.patch
new file mode 100644
index 000000000..7309b55a1
--- /dev/null
+++ b/patches/source/mozilla-thunderbird/mozilla-firefox.xpcom_arm.patch
@@ -0,0 +1,18 @@
+--- a/xpcom/glue/objs.mk
++++ a/xpcom/glue/objs.mk
+@@ -71,13 +71,13 @@ XPCOM_GLUENS_SRC_LCPPSRCS = \
+ SSE.cpp \
+ unused.cpp \
+ nsProxyRelease.cpp \
+ nsTextFormatter.cpp \
+ GenericFactory.cpp \
+ FileUtils.cpp \
+ $(NULL)
+
+-ifeq (arm,$(TARGET_CPU))
++ifneq (,$(filter arm%,$(TARGET_CPU)))
+ XPCOM_GLUENS_SRC_LCPPSRCS += arm.cpp
+ endif
+
+ XPCOM_GLUENS_SRC_CPPSRCS = $(addprefix $(topsrcdir)/xpcom/glue/,$(XPCOM_GLUENS_SRC_LCPPSRCS))
+
diff --git a/patches/source/mozilla-thunderbird/mozilla-thunderbird.SlackBuild b/patches/source/mozilla-thunderbird/mozilla-thunderbird.SlackBuild
new file mode 100755
index 000000000..cdcb44f24
--- /dev/null
+++ b/patches/source/mozilla-thunderbird/mozilla-thunderbird.SlackBuild
@@ -0,0 +1,240 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 2014, 2016 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Modified 2012 by Eric Hameleers <alien at slackware.com> for ARM port.
+
+# Thanks to the folks at the Mozilla Foundation for permission to
+# distribute this, and for all the great work! :-)
+
+VERSION=$(basename $(ls thunderbird-*.tar.?z* | cut -d - -f 2 | rev | cut -f 3- -d . | rev) .source)
+RELEASEVER=$(echo $VERSION | cut -f 1 -d e | cut -f 1 -d b)
+BUILD=${BUILD:-1_slack14.1}
+
+# Specify this variable for a localized build.
+# For example, to build a version of Thunderbird with Italian support, run
+# the build script like this:
+#
+# MOZLOCALIZE=it ./mozilla-firefox.SlackBuild
+#
+MOZLOCALIZE=${MOZLOCALIZE:-}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ armv7hl) export ARCH=armv7hl ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ LIBDIRSUFFIX=""
+ OPTIMIZE=" --enable-optimize=-O2 "
+ # On IA32, use gold since GNU ld runs out of memory linking libxul.so:
+ PATH="$(pwd)/gold:$PATH"
+ export CC="gcc -B$(pwd)/gold"
+ export CXX="g++ -B$(pwd)/gold"
+elif [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+ OPTIMIZE=" --enable-optimize=-O2 "
+else
+ LIBDIRSUFFIX=""
+ OPTIMIZE=" --enable-optimize=-O2 "
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-mozilla-thunderbird
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+rm -rf $PKG
+mkdir -p $TMP $PKG/usr/lib${LIBDIRSUFFIX}
+
+cd $TMP
+rm -rf thunderbird-$VERSION
+# Unpack this in a subdirectory to prevent changing permissions on /tmp:
+rm -rf thunderbird-unpack
+mkdir thunderbird-unpack
+cd thunderbird-unpack
+tar xvf $CWD/thunderbird-$VERSION.source.tar.?z* || exit 1
+mv * ..
+cd ..
+rm -rf thunderbird-unpack
+cd thunderbird-$VERSION || exit 1
+
+# Fetch localization, if requested:
+if [ ! -z $MOZLOCALIZE ]; then
+ LOC_TAG="THUNDERBIRD_$( echo $VERSION | tr \. _ )_RELEASE"
+ rm -f $LOC_TAG.tar.bz2
+ wget https://hg.mozilla.org/releases/l10n/mozilla-release/$MOZLOCALIZE/archive/$LOC_TAG.tar.bz2
+ tar xvf $LOC_TAG.tar.bz2
+ mv $MOZLOCALIZE-$LOC_TAG $MOZLOCALIZE
+fi
+
+# Arch-dependent patches:
+case "$ARCH" in
+ armv7hl) ARCH_CONFIG="--with-arch=armv7-a --with-float-abi=hard --with-fpu=vfpv3-d16 --disable-elf-hack"
+ # Make firefox compile on ARM platforms lacking neon support:
+ zcat $CWD/mozilla-firefox.xpcom_arm.patch.gz | patch -p1 --verbose || exit 1
+ ;;
+ *) ARCH_CONFIG=" "
+ ;;
+esac
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Our building options, in a configure-like display ;)
+OPTIONS="\
+ --enable-official-branding \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --with-default-mozilla-five-home=/usr/lib${LIBDIRSUFFIX}/thunderbird-$VERSION \
+ --with-system-zlib \
+ --enable-application=mail \
+ --enable-calendar \
+ --enable-default-toolkit=cairo-gtk2 \
+ --enable-startup-notification \
+ --enable-crypto \
+ --enable-ldap \
+ --enable-libxul \
+ --enable-svg \
+ --enable-canvas \
+ --enable-xft \
+ $OPTIMIZE \
+ --enable-reorder \
+ --enable-strip \
+ --enable-cpp-rtti \
+ --disable-accessibility \
+ --disable-crashreporter \
+ --disable-debug \
+ --disable-tests \
+ --disable-pedantic \
+ --disable-pulseaudio \
+ --host=$ARCH-slackware-linux \
+ --target=$ARCH-slackware-linux \
+ --build=$ARCH-slackware-linux"
+ # Complains about missing APNG support in Slackware's libpng:
+ #--with-system-png \
+ # Broken with 12.0:
+ #--enable-system-cairo \
+if [ ! -z $MOZLOCALIZE ]; then
+ OPTIONS=$OPTIONS" \
+ --enable-ui-locale=$MOZLOCALIZE
+ --with-l10n-base=.."
+ # There are no dictionaries in localized builds
+ sed -i \
+ -e "/@BINPATH@\/dictionaries\/\*/d" \
+ -e "/@RESPATH@\/dictionaries\/\*/d" \
+ mail/installer/package-manifest.in || exit 1
+fi
+
+export BUILD_OFFICIAL=1
+export MOZILLA_OFFICIAL=1
+export MOZ_PHOENIX=1
+export MOZ_MAKE_FLAGS="$NUMJOBS"
+
+# Clear some variables that could break the build
+unset DBUS_SESSION_BUS_ADDRESS ORBIT_SOCKETDIR SESSION_MANAGER \
+ XDG_SESSION_COOKIE XAUTHORITY MAKEFLAGS
+
+# Assemble our .mozconfig:
+echo > .mozconfig
+
+# Mozilla devs enforce using an objdir for building
+# https://developer.mozilla.org/en/Configuring_Build_Options#Building_with_an_objdir
+mkdir obj
+echo "mk_add_options MOZ_OBJDIR=$(pwd)/obj" >> .mozconfig
+# This directory is also needed or the build will fail:
+mkdir -p mozilla/obj
+
+# Write in it the options above
+for option in $OPTIONS; do echo "ac_add_options $option" >> .mozconfig; done
+
+make -f client.mk build || exit 1
+make -f client.mk install DESTDIR=$PKG || exit 1
+
+# We don't need these (just symlinks anyway):
+rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/thunderbird-devel-$RELEASEVER
+
+# Nor these:
+rm -rf $PKG/usr/include
+
+# Thunderbird 3.x cruft?
+# If we still need something like this (and you know what we need :), let me know.
+#( cd $PKG/usr/lib${LIBDIRSUFFIX}/thunderbird-$VERSION
+# cp -a defaults/profile/mimeTypes.rdf defaults/profile/mimeTypes.rdf.orig
+# zcat $CWD/mimeTypes.rdf > defaults/profile/mimeTypes.rdf || exit 1
+#) || exit 1
+
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins
+mkdir -p $PKG/usr/share/applications
+cat $CWD/mozilla-thunderbird.desktop > $PKG/usr/share/applications/mozilla-thunderbird.desktop
+mkdir -p $PKG/usr/share/pixmaps
+cat $CWD/thunderbird.png > $PKG/usr/share/pixmaps/thunderbird.png
+
+# These files/directories are usually created if Thunderbird is run as root,
+# which on many systems might (and possibly should) be never. Therefore, if we
+# don't see them we'll put stubs in place to prevent startup errors.
+( cd $PKG/usr/lib${LIBDIRSUFFIX}/thunderbird-$RELEASEVER
+ if [ -d extensions/talkback\@mozilla.org ]; then
+ if [ ! -r extensions/talkback\@mozilla.org/chrome.manifest ]; then
+ echo > extensions/talkback\@mozilla.org/chrome.manifest
+ fi
+ fi
+ if [ ! -d updates ]; then
+ mkdir -p updates/0
+ fi
+)
+
+# Need some default icons in the right place:
+for i in 16 22 24 32 48 256; do
+ install -m 0644 -D other-licenses/branding/thunderbird/mailicon${i}.png \
+ $PKG/usr/share/icons/hicolor/${i}x${i}/apps/thunderbird.png
+done
+mkdir -p $PKG/usr/share/pixmaps
+( cd $PKG/usr/share/pixmaps ; ln -sf /usr/share/icons/hicolor/256x256/apps/thunderbird . )
+mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/thunderbird-$RELEASEVER/chrome/icons/default
+install -m 644 other-licenses/branding/thunderbird/mailicon16.png \
+ $PKG/usr/lib$LIBDIRSUFFIX/thunderbird-$RELEASEVER/icons/
+install -m 644 other-licenses/branding/thunderbird/mailicon16.png \
+ $PKG/usr/lib$LIBDIRSUFFIX/thunderbird-$RELEASEVER/chrome/icons/default/
+
+# Copy over the LICENSE
+install -p -c -m 644 LICENSE $PKG/usr/lib${LIBDIRSUFFIX}/thunderbird-$RELEASEVER/
+
+mkdir $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+if [ -z $MOZLOCALIZE ]; then
+ /sbin/makepkg -l y -c n $TMP/mozilla-thunderbird-$VERSION-$ARCH-$BUILD.txz
+else
+ /sbin/makepkg -l y -c n $TMP/mozilla-thunderbird-$VERSION-$ARCH-${BUILD}_$MOZLOCALIZE.txz
+fi
diff --git a/patches/source/mozilla-thunderbird/mozilla-thunderbird.desktop b/patches/source/mozilla-thunderbird/mozilla-thunderbird.desktop
new file mode 100644
index 000000000..0f85ecbe1
--- /dev/null
+++ b/patches/source/mozilla-thunderbird/mozilla-thunderbird.desktop
@@ -0,0 +1,84 @@
+[Desktop Entry]
+Encoding=UTF-8
+Exec=thunderbird
+Icon=/usr/share/pixmaps/thunderbird.png
+Type=Application
+Categories=Application;Network;
+Name=Thunderbird
+Name[bn]=থাণà§à¦¡à¦¾à¦°à¦¬à¦¾à¦°à§à¦¡
+Name[eo]=Mozilo Tondrobirdo
+Name[fi]=Mozilla Thunderbird
+Name[pa]=ਥੰਡਰਬਰਡ
+Name[tg]=Паррандаи бало
+GenericName=Mail Client
+GenericName[af]=Pos Kliënt
+GenericName[ar]=البريد الألكتروني
+GenericName[az]=Poçt Alıcısı
+GenericName[be]=Паштовы кліент
+GenericName[bg]=ПощенÑки клиент
+GenericName[bn]=ইমেইল কà§à¦²à¦¾à§Ÿà§‡à¦¨à§à¦Ÿ
+GenericName[br]=Arval postel
+GenericName[bs]=Program za Äitanje elektronske poÅ¡te
+GenericName[ca]=Client de correu electrònic
+GenericName[cs]=Klient pro Ätení elektronické poÅ¡ty
+GenericName[cy]=Dibynnydd Ebost
+GenericName[da]=E-mail-klient
+GenericName[de]=E-Mail-Programm
+GenericName[el]=Πελάτης mail
+GenericName[eo]=Legi kaj sendi retpoÅton
+GenericName[es]=Cliente de correo electrónico
+GenericName[et]=Meiliklient
+GenericName[eu]=Posta bezeroa
+GenericName[fa]=کارگیر پست الکترونیکی
+GenericName[fi]=Sähköpostiohjelma
+GenericName[fo]=Postforrit
+GenericName[fr]=Logiciel de messagerie électronique
+GenericName[ga]=Cliant Ríomhphoist
+GenericName[gl]=Cliente de correo
+GenericName[he]=תוכנית דו×ר
+GenericName[hi]=डाकिया
+GenericName[hr]=Program za Äitanje elektronske poÅ¡te
+GenericName[hu]=Levelezőprogram
+GenericName[id]=Klien Mail
+GenericName[is]=Póstforrit
+GenericName[it]=Programma di posta elettronica
+GenericName[ja]=メールクライアント
+GenericName[ko]=편지를 주고 받는 프로그램
+GenericName[lo]=ໄຄà»à»€àº­àº±àº™àºˆàº»àº”ຫມາàºà»€àº­à»€àº¥àº±àºà»‚ຕນິàº
+GenericName[lt]=Pašto klientas
+GenericName[lv]=Pasta Klients
+GenericName[mk]=Програма за електронÑка пошта
+GenericName[mn]=Э-Захиа-Програм
+GenericName[mt]=Klijent tal-imejl
+GenericName[nb]=E-postklient
+GenericName[nds]=Mailprogramm
+GenericName[nl]=E-mailclient
+GenericName[nn]=Lesing og sending av e-post
+GenericName[nso]=Moreki wa Poso
+GenericName[oc]=Programari de correu electrònic
+GenericName[pa]=ਪੱਤਰ ਕਲਾਂਇਟ
+GenericName[pl]=Program do wysyłania i odbierania poczty elektronicznej
+GenericName[pt]=Client de E-mail
+GenericName[pt_BR]=Cliente de E-mail
+GenericName[ro]=Program de poştă electronică
+GenericName[ru]=Клиент Ñлектронной почты
+GenericName[se]=Boastaprográmma
+GenericName[sk]=Klient elektronickej pošty
+GenericName[sl]=Program za e-pošto
+GenericName[sr]=Програм за e-пошту
+GenericName[sr@Latn]=Program za e-poštu
+GenericName[ss]=Likhasimende leliposi
+GenericName[sv]=E-postklient
+GenericName[ta]=அஞà¯à®šà®²à¯ உறà¯à®ªà¯à®ªà®¿à®©à®°à¯
+GenericName[tg]=Коргири почтаи Ñллектроникӣ
+GenericName[th]=ไคลเอนต์จดหมายอิเล็à¸à¸—รอนิà¸à¸ªà¹Œ
+GenericName[tr]=Posta Ä°stemcisi
+GenericName[uk]=Клієнт електронної пошти
+GenericName[uz]=Хат-хабар клиенти
+GenericName[ven]=Mushumisani na poso
+GenericName[wa]=Cliyint d' emilaedje
+GenericName[xh]=Umxhasi Weposi
+GenericName[zh_CN]=邮件程åº
+GenericName[zh_TW]=郵件處ç†ç¨‹å¼
+GenericName[zu]=Umxhasi weposi
+X-KDE-StartupNotify=true
diff --git a/patches/source/mozilla-thunderbird/slack-desc b/patches/source/mozilla-thunderbird/slack-desc
new file mode 100644
index 000000000..353b22253
--- /dev/null
+++ b/patches/source/mozilla-thunderbird/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+mozilla-thunderbird: mozilla-thunderbird (Mozilla Thunderbird mail application)
+mozilla-thunderbird:
+mozilla-thunderbird: Mozilla Thunderbird is a redesign of the Mozilla mail component
+mozilla-thunderbird: written using the XUL user interface language. Thunderbird makes
+mozilla-thunderbird: emailing safer, faster, and easier than ever before with the
+mozilla-thunderbird: industry's best implementations of features such as intelligent spam
+mozilla-thunderbird: filters, built-in RSS reader, quick search, and much more.
+mozilla-thunderbird:
+mozilla-thunderbird: Visit the Mozilla Thunderbird project online:
+mozilla-thunderbird: http://www.mozilla.org/projects/thunderbird/
+mozilla-thunderbird:
diff --git a/patches/source/mozilla-thunderbird/thunderbird.png b/patches/source/mozilla-thunderbird/thunderbird.png
new file mode 100644
index 000000000..61a37d70e
--- /dev/null
+++ b/patches/source/mozilla-thunderbird/thunderbird.png
Binary files differ
diff --git a/patches/source/mutt/doinst.sh b/patches/source/mutt/doinst.sh
new file mode 100644
index 000000000..830fa2458
--- /dev/null
+++ b/patches/source/mutt/doinst.sh
@@ -0,0 +1,13 @@
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/mutt/Muttrc.new
diff --git a/patches/source/mutt/mutt.CVE-2014-9116.diff b/patches/source/mutt/mutt.CVE-2014-9116.diff
new file mode 100644
index 000000000..97f6fd816
--- /dev/null
+++ b/patches/source/mutt/mutt.CVE-2014-9116.diff
@@ -0,0 +1,34 @@
+# HG changeset patch
+# User Kevin McCarthy <kevin@8t8.us>
+# Date 1417472364 28800
+# Node ID 0aebf1df43598b442ac75ae4fe17875351854db0
+# Parent 5a86319adad0d17e4acaf8a580bfc9eb247547d0
+Revert write_one_header() to skip space and tab. (closes #3716)
+
+This patch fixes CVE-2014-9116 in the stable branch. It reverts
+write_one_header() to the pre [f251d523ca5a] code for skipping
+whitespace.
+
+Thanks to Antonio Radici and Tomas Hoger for their analysis and patches
+to mutt, which this patch is based off of.
+
+diff -r 5a86319adad0 -r 0aebf1df4359 sendlib.c
+--- a/sendlib.c Mon Jan 05 18:28:59 2015 -0800
++++ b/sendlib.c Mon Dec 01 14:19:24 2014 -0800
+@@ -1814,7 +1814,14 @@
+ {
+ tagbuf = mutt_substrdup (start, t);
+ /* skip over the colon separating the header field name and value */
+- t = skip_email_wsp(t + 1);
++ ++t;
++
++ /* skip over any leading whitespace (WSP, as defined in RFC5322)
++ * NOTE: skip_email_wsp() does the wrong thing here.
++ * See tickets 3609 and 3716. */
++ while (*t == ' ' || *t == '\t')
++ t++;
++
+ valbuf = mutt_substrdup (t, end);
+ }
+ dprint(4,(debugfile,"mwoh: buf[%s%s] too long, "
+
diff --git a/patches/source/mutt/mutt.SlackBuild b/patches/source/mutt/mutt.SlackBuild
new file mode 100755
index 000000000..ae00d5804
--- /dev/null
+++ b/patches/source/mutt/mutt.SlackBuild
@@ -0,0 +1,128 @@
+#!/bin/sh
+# Copyright 2002-2015 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=mutt
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-2_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+TMP=${TMP:-/tmp}
+CWD=`pwd`
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
+PKG=$TMP/package-mutt
+rm -rf $PKG
+mkdir $PKG
+cd $TMP
+rm -rf mutt-$VERSION
+tar xvf $CWD/mutt-$VERSION.tar.?z* || exit 1
+cd mutt-$VERSION || exit 1
+chown -R root:root .
+
+zcat $CWD/mutt.CVE-2014-9116.diff.gz | patch -p1 --verbose || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/mutt-$VERSION \
+ --with-docdir=/usr/doc/mutt-$VERSION \
+ --sysconfdir=/etc/mutt \
+ --with-mailpath=/var/spool/mail \
+ --enable-pop \
+ --enable-imap \
+ --with-ssl \
+ --with-sasl \
+ --enable-smtp \
+ --enable-gpgme \
+ --enable-hcache \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Strip binaries:
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+# This stuff is redundant or not useful to most people, IMHO.
+# If you want it, use the source, Luke.
+rm -f $PKG/usr/doc/mutt-$VERSION/*.html
+rm -f $PKG/etc/mutt/*.dist
+
+# This is an ancient artifact
+rm -f $PKG/usr/doc/mutt-$VERSION/samples/ca-bundle.crt
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mv $PKG/etc/mutt/Muttrc $PKG/etc/mutt/Muttrc.new
+
+cd $PKG
+/sbin/makepkg -l y -c n ../mutt-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/mutt/slack-desc b/patches/source/mutt/slack-desc
new file mode 100644
index 000000000..eda6d811d
--- /dev/null
+++ b/patches/source/mutt/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+mutt: Mutt (the Mutt mail user agent)
+mutt:
+mutt: Mutt is a small but very powerful text-based MIME mail client. Mutt
+mutt: is highly configurable, and is well suited to the mail power user with
+mutt: advanced features like key bindings, keyboard macros, mail threading,
+mutt: regular expression searches and a powerful pattern matching language
+mutt: for selecting groups of messages.
+mutt:
+mutt:
+mutt:
+mutt:
diff --git a/patches/source/ntp/doinst.sh b/patches/source/ntp/doinst.sh
new file mode 100644
index 000000000..bc5429909
--- /dev/null
+++ b/patches/source/ntp/doinst.sh
@@ -0,0 +1,28 @@
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname ${NEW})/$(basename ${NEW} .new)"
+ if [ -e ${OLD} ]; then
+ cp -a ${OLD} ${NEW}.incoming
+ cat ${NEW} > ${NEW}.incoming
+ mv ${NEW}.incoming ${NEW}
+ fi
+ config ${NEW}
+}
+
+config etc/ntp.conf.new
+config etc/ntp/ntp.keys.new
+if [ -r etc/rc.d/rc.ntpd -a -r etc/rc.d/rc.ntpd.new ]; then
+ chmod --reference=etc/rc.d/rc.ntpd etc/rc.d/rc.ntpd.new
+fi
+mv etc/rc.d/rc.ntpd.new etc/rc.d/rc.ntpd
diff --git a/patches/source/ntp/ntp.SlackBuild b/patches/source/ntp/ntp.SlackBuild
new file mode 100755
index 000000000..134cace72
--- /dev/null
+++ b/patches/source/ntp/ntp.SlackBuild
@@ -0,0 +1,158 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 2014 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=ntp
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-ntp
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf ntp-${VERSION}*
+tar xvf $CWD/ntp-${VERSION}*.tar.?z* || exit 1
+cd ntp-${VERSION}* || exit 1
+
+zcat $CWD/ntp.nano.diff.gz | patch -p1 --verbose || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 2777 -o -perm 2755 -o -perm 2775 \) \
+ -exec chmod u+rwx,g-sw,g+rx,o-w,o+rx {} \; -o \
+ \( -perm 777 -o -perm 775 -o -perm 774 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod u+rwx,g-sw,g+rx,o-w,o+rx {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --bindir=/usr/sbin \
+ --sbindir=/usr/sbin \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/ntp-$VERSION \
+ --htmldir=/usr/doc/ntp-$VERSION \
+ --enable-ipv6 \
+ --with-crypto \
+ --program-prefix= \
+ --program-suffix= \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make -i install DESTDIR=$PKG || exit 1
+
+# Since the Makefile's install pays no heed to the --bindir settings,
+# we'll move things to where they've always been ourselves:
+mv $PKG/usr/bin/* $PKG/usr/sbin
+rmdir $PKG/usr/bin
+
+# This might only be an empty directory:
+rmdir $PKG/usr/lib/pkgconfig
+
+# This should be empty. Try to remove it, and error out if it's not actually empty:
+rmdir $PKG/usr/libexec || exit 1
+
+mkdir -p $PKG/etc/ntp
+cat $CWD/ntp.conf > $PKG/etc/ntp.conf.new
+cat $CWD/ntp.keys > $PKG/etc/ntp/ntp.keys.new
+chmod 600 $PKG/etc/ntp/ntp.keys.new
+touch $PKG/etc/ntp/step-tickers
+
+mkdir -p $PKG/etc/rc.d
+cat $CWD/rc.ntpd > $PKG/etc/rc.d/rc.ntpd.new
+
+mv $PKG/usr/doc/ntp-$VERSION/*.html $PKG/usr/doc/ntp-$VERSION/html || exit 1
+cp -a \
+ COPYRIGHT NEWS README* TODO WHERE-TO-START \
+ *.y2kfixes clockstuff conf scripts \
+ $PKG/usr/doc/ntp-$VERSION
+mkdir $PKG/usr/doc/ntp-$VERSION/util
+cp -a util/README $PKG/usr/doc/ntp-$VERSION/util
+mkdir $PKG/usr/doc/ntp-$VERSION/ntpdate
+cp -a ntpdate/README $PKG/usr/doc/ntp-$VERSION/ntpdate
+( cd $PKG/usr/doc/ntp-$VERSION
+ find . -name ".deps*" -exec rm -rf "{}" \; 2> /dev/null
+)
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+# Strip binaries:
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/ntp-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/ntp/ntp.conf b/patches/source/ntp/ntp.conf
new file mode 100644
index 000000000..1844fb91c
--- /dev/null
+++ b/patches/source/ntp/ntp.conf
@@ -0,0 +1,72 @@
+# Sample /etc/ntp.conf: Configuration file for ntpd.
+#
+# Undisciplined Local Clock. This is a fake driver intended for backup
+# and when no outside source of synchronized time is available. The
+# default stratum is usually 3, but in this case we elect to use stratum
+# 0. Since the server line does not have the prefer keyword, this driver
+# is never used for synchronization, unless no other other
+# synchronization source is available. In case the local host is
+# controlled by some external source, such as an external oscillator or
+# another protocol, the prefer keyword would cause the local host to
+# disregard all other synchronization sources, unless the kernel
+# modifications are in use and declare an unsynchronized condition.
+#
+server 127.127.1.0 # local clock
+fudge 127.127.1.0 stratum 10
+
+#
+# NTP server (list one or more) to synchronize with:
+#server 0.pool.ntp.org iburst
+#server 1.pool.ntp.org iburst
+#server 2.pool.ntp.org iburst
+#server 3.pool.ntp.org iburst
+
+#
+# Drift file. Put this in a directory which the daemon can write to.
+# No symbolic links allowed, either, since the daemon updates the file
+# by creating a temporary in the same directory and then rename()'ing
+# it to the file.
+#
+driftfile /etc/ntp/drift
+
+#
+# Uncomment to use a multicast NTP server on the local subnet:
+#multicastclient 224.0.1.1 # listen on default 224.0.1.1
+# Set an optional compensation for broadcast packet delay:
+#broadcastdelay 0.008
+
+#
+# Keys file. If you want to diddle your server at run time, make a
+# keys file (mode 600 for sure) and define the key number to be
+# used for making requests.
+# PLEASE DO NOT USE THE DEFAULT VALUES HERE. Pick your own, or remote
+# systems might be able to reset your clock at will.
+#
+#keys /etc/ntp/keys
+#trustedkey 65535
+#requestkey 65535
+#controlkey 65535
+
+#
+# Don't serve time or stats to anyone else by default (more secure)
+restrict default limited kod nomodify notrap nopeer noquery
+restrict -6 default limited kod nomodify notrap nopeer noquery
+
+#
+# Use these lines instead if you do want to serve time and stats to
+# other machines on the network:
+#restrict default limited kod nomodify notrap nopeer
+#restrict -6 default limited kod nomodify notrap nopeer
+
+#
+# Disable the ntpdc -c monlist command, which is insecure and can be used
+# to cause a denial of service attack (CVE-2013-5211). Future versions of
+# NTP will remove this command.
+# (this feature was disabled by default with ntpd 4.2.7p230)
+disable monitor
+
+#
+# Trust ourselves. :-)
+restrict 127.0.0.1
+restrict ::1
+
diff --git a/patches/source/ntp/ntp.keys b/patches/source/ntp/ntp.keys
new file mode 100644
index 000000000..1c3fbd2c4
--- /dev/null
+++ b/patches/source/ntp/ntp.keys
@@ -0,0 +1,2 @@
+65535 M akey
+1 M pass
diff --git a/patches/source/ntp/ntp.nano.diff b/patches/source/ntp/ntp.nano.diff
new file mode 100644
index 000000000..0ff361ce9
--- /dev/null
+++ b/patches/source/ntp/ntp.nano.diff
@@ -0,0 +1,17 @@
+--- ./include/ntp_syscall.h.orig 2009-12-09 01:36:37.000000000 -0600
++++ ./include/ntp_syscall.h 2010-04-21 23:38:30.000000000 -0500
+@@ -14,6 +14,14 @@
+ # include <sys/timex.h>
+ #endif
+
++#if defined(ADJ_NANO) && !defined(MOD_NANO)
++#define MOD_NANO ADJ_NANO
++#endif
++
++#if defined(ADJ_TAI) && !defined(MOD_TAI)
++#define MOD_TAI ADJ_TAI
++#endif
++
+ #ifndef NTP_SYSCALLS_LIBC
+ #ifdef NTP_SYSCALLS_STD
+ # define ntp_adjtime(t) syscall(SYS_ntp_adjtime, (t))
diff --git a/patches/source/ntp/rc.ntpd b/patches/source/ntp/rc.ntpd
new file mode 100644
index 000000000..c1d1411ca
--- /dev/null
+++ b/patches/source/ntp/rc.ntpd
@@ -0,0 +1,71 @@
+#!/bin/sh
+# Start/stop/restart ntpd.
+
+# Start ntpd:
+ntpd_start() {
+ CMDLINE="/usr/sbin/ntpd -g"
+ echo -n "Starting NTP daemon: $CMDLINE"
+ $CMDLINE -p /var/run/ntpd.pid
+ echo
+ # The kernel is now mocking around with the the hardware clock if
+ # ntpd is running, so if the hardware clock (wall clock) is set to
+ # 'localtime' execute hwclock --localtime --systohc to disable the
+ # 11 minute mode kernel function:
+ if [ -x /sbin/hwclock ]; then
+ # Check for a broken motherboard RTC clock (where ioports for rtc are
+ # unknown) to prevent hwclock causing a hang:
+ if ! grep -q -w rtc /proc/ioports ; then
+ CLOCK_OPT="--directisa"
+ fi
+ if ! grep -q "^UTC" /etc/hardwareclock 2> /dev/null ; then
+ echo "Saving system time to the hardware clock (localtime)."
+ /sbin/hwclock $CLOCK_OPT --localtime --systohc
+ fi
+ fi
+}
+
+# Stop ntpd:
+ntpd_stop() {
+ echo -n "Stopping NTP daemon..."
+ if [ -r /var/run/ntpd.pid ]; then
+ kill -HUP $(cat /var/run/ntpd.pid)
+ rm -f /var/run/ntpd.pid
+ else
+ killall -HUP -q ntpd
+ fi
+ echo
+}
+
+# Restart ntpd:
+ntpd_restart() {
+ ntpd_stop
+ sleep 1
+ ntpd_start
+}
+
+# Check if ntpd is running
+ntpd_status() {
+ if [ -e /var/run/ntpd.pid ]; then
+ echo "ntpd is running."
+ else
+ echo "ntpd is stopped."
+ exit 1
+ fi
+}
+
+case "$1" in
+'start')
+ ntpd_start
+ ;;
+'stop')
+ ntpd_stop
+ ;;
+'restart')
+ ntpd_restart
+ ;;
+'status')
+ ntpd_status
+ ;;
+*)
+ echo "usage $0 start|stop|restart|status"
+esac
diff --git a/patches/source/ntp/slack-desc b/patches/source/ntp/slack-desc
new file mode 100644
index 000000000..6319e8885
--- /dev/null
+++ b/patches/source/ntp/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+ntp: ntp (Network Time Protocol daemon)
+ntp:
+ntp: The Network Time Protocol (NTP) is used to synchronize the time of a
+ntp: computer client or server to another server or reference time source,
+ntp: such as a radio or satellite receiver or modem. It provides client
+ntp: accuracies typically within a millisecond on LANs and up to a few tens
+ntp: of milliseconds on WANs relative to a primary server synchronized to
+ntp: Coordinated Universal Time (UTC) via a Global Positioning Service
+ntp: (GPS) receiver, for example.
+ntp:
+ntp:
diff --git a/patches/source/openssh/doinst.sh b/patches/source/openssh/doinst.sh
new file mode 100644
index 000000000..73ce62836
--- /dev/null
+++ b/patches/source/openssh/doinst.sh
@@ -0,0 +1,49 @@
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname ${NEW})/$(basename ${NEW} .new)"
+ if [ -e ${OLD} ]; then
+ cp -a ${OLD} ${NEW}.incoming
+ cat ${NEW} > ${NEW}.incoming
+ touch -r ${NEW} ${NEW}.incoming
+ mv ${NEW}.incoming ${NEW}
+ fi
+ config ${NEW}
+}
+
+config etc/ssh/ssh_config.new
+config etc/ssh/sshd_config.new
+preserve_perms etc/rc.d/rc.sshd.new
+if [ -e etc/rc.d/rc.sshd.new ]; then
+ mv etc/rc.d/rc.sshd.new etc/rc.d/rc.sshd
+fi
+
+# If the sshd user/group/shadow don't exist, add them:
+
+if ! grep -q "^sshd:" etc/passwd ; then
+ echo "sshd:x:33:33:sshd:/:" >> etc/passwd
+fi
+
+if ! grep -q "^sshd:" etc/group ; then
+ echo "sshd::33:sshd" >> etc/group
+fi
+
+if ! grep -q "^sshd:" etc/shadow ; then
+ echo "sshd:*:9797:0:::::" >> etc/shadow
+fi
+
+# Add a btmp file to store login failure if one doesn't exist:
+if [ ! -r var/log/btmp ]; then
+ ( cd var/log ; umask 077 ; touch btmp )
+fi
+
diff --git a/patches/source/openssh/openssh-7.4p1-libwrap.diff b/patches/source/openssh/openssh-7.4p1-libwrap.diff
new file mode 100644
index 000000000..d1025e43c
--- /dev/null
+++ b/patches/source/openssh/openssh-7.4p1-libwrap.diff
@@ -0,0 +1,137 @@
+--- ./configure.ac.orig 2016-12-18 22:59:41.000000000 -0600
++++ ./configure.ac 2016-12-23 12:58:04.200707728 -0600
+@@ -1467,6 +1467,62 @@
+ ]
+ )
+
++# Check whether user wants TCP wrappers support
++TCPW_MSG="no"
++AC_ARG_WITH([tcp-wrappers],
++ [ --with-tcp-wrappers[[=PATH]] Enable tcpwrappers support (optionally in PATH)],
++ [
++ if test "x$withval" != "xno" ; then
++ saved_LIBS="$LIBS"
++ saved_LDFLAGS="$LDFLAGS"
++ saved_CPPFLAGS="$CPPFLAGS"
++ if test -n "${withval}" && \
++ test "x${withval}" != "xyes"; then
++ if test -d "${withval}/lib"; then
++ if test -n "${need_dash_r}"; then
++ LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
++ else
++ LDFLAGS="-L${withval}/lib ${LDFLAGS}"
++ fi
++ else
++ if test -n "${need_dash_r}"; then
++ LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
++ else
++ LDFLAGS="-L${withval} ${LDFLAGS}"
++ fi
++ fi
++ if test -d "${withval}/include"; then
++ CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
++ else
++ CPPFLAGS="-I${withval} ${CPPFLAGS}"
++ fi
++ fi
++ LIBS="-lwrap -lnsl $LIBS"
++ AC_MSG_CHECKING([for libwrap])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
++#include <tcpd.h>
++int deny_severity = 0, allow_severity = 0;
++ ]], [[
++ hosts_access(0);
++ ]])], [
++ AC_MSG_RESULT([yes])
++ AC_DEFINE([LIBWRAP], [1],
++ [Define if you want
++ TCP Wrappers support])
++ SSHDLIBS="$SSHDLIBS -lwrap -lnsl"
++ TCPW_MSG="yes"
++ ], [
++ AC_MSG_ERROR([*** libwrap missing])
++
++ ])
++ LIBS="$saved_LIBS"
++ fi
++ ]
++)
++
+ # Check whether user wants to use ldns
+ LDNS_MSG="no"
+ AC_ARG_WITH(ldns,
+@@ -5081,6 +5137,7 @@
+ echo " SELinux support: $SELINUX_MSG"
+ echo " Smartcard support: $SCARD_MSG"
+ echo " S/KEY support: $SKEY_MSG"
++echo " TCP Wrappers support: $TCPW_MSG"
+ echo " MD5 password support: $MD5_MSG"
+ echo " libedit support: $LIBEDIT_MSG"
+ echo " Solaris process contract support: $SPC_MSG"
+--- ./sshd.c.orig 2016-12-18 22:59:41.000000000 -0600
++++ ./sshd.c 2016-12-23 12:58:40.847710372 -0600
+@@ -123,6 +123,13 @@
+ #include "version.h"
+ #include "ssherr.h"
+
++#ifdef LIBWRAP
++#include <tcpd.h>
++#include <syslog.h>
++int allow_severity;
++int deny_severity;
++#endif /* LIBWRAP */
++
+ /* Re-exec fds */
+ #define REEXEC_DEVCRYPTO_RESERVED_FD (STDERR_FILENO + 1)
+ #define REEXEC_STARTUP_PIPE_FD (STDERR_FILENO + 2)
+@@ -1971,6 +1978,24 @@
+ #ifdef SSH_AUDIT_EVENTS
+ audit_connection_from(remote_ip, remote_port);
+ #endif
++#ifdef LIBWRAP
++ allow_severity = options.log_facility|LOG_INFO;
++ deny_severity = options.log_facility|LOG_WARNING;
++ /* Check whether logins are denied from this host. */
++ if (packet_connection_is_on_socket()) {
++ struct request_info req;
++
++ request_init(&req, RQ_DAEMON, __progname, RQ_FILE, sock_in, 0);
++ fromhost(&req);
++
++ if (!hosts_access(&req)) {
++ debug("Connection refused by tcp wrapper");
++ refuse(&req);
++ /* NOTREACHED */
++ fatal("libwrap refuse returns");
++ }
++ }
++#endif /* LIBWRAP */
+
+ /* Log the connection. */
+ laddr = get_local_ipaddr(sock_in);
+--- ./sshd.8.orig 2016-12-18 22:59:41.000000000 -0600
++++ ./sshd.8 2016-12-23 12:58:04.208707729 -0600
+@@ -825,6 +825,12 @@
+ This file should be writable only by the user, and need not be
+ readable by anyone else.
+ .Pp
++.It Pa /etc/hosts.allow
++.It Pa /etc/hosts.deny
++Access controls that should be enforced by tcp-wrappers are defined here.
++Further details are described in
++.Xr hosts_access 5 .
++.Pp
+ .It Pa /etc/hosts.equiv
+ This file is for host-based authentication (see
+ .Xr ssh 1 ) .
+@@ -929,6 +935,7 @@
+ .Xr ssh-keygen 1 ,
+ .Xr ssh-keyscan 1 ,
+ .Xr chroot 2 ,
++.Xr hosts_access 5 ,
+ .Xr login.conf 5 ,
+ .Xr moduli 5 ,
+ .Xr sshd_config 5 ,
diff --git a/patches/source/openssh/openssh.CVE-2017-15906.patch b/patches/source/openssh/openssh.CVE-2017-15906.patch
new file mode 100644
index 000000000..fdb963f7e
--- /dev/null
+++ b/patches/source/openssh/openssh.CVE-2017-15906.patch
@@ -0,0 +1,19 @@
+--- ./sftp-server.c.orig 2016-12-18 22:59:41.000000000 -0600
++++ ./sftp-server.c 2018-03-07 19:18:19.275984210 -0600
+@@ -1,4 +1,4 @@
+-/* $OpenBSD: sftp-server.c,v 1.110 2016/09/12 01:22:38 deraadt Exp $ */
++/* $OpenBSD: sftp-server.c,v 1.111 2017/04/04 00:24:56 djm Exp $ */
+ /*
+ * Copyright (c) 2000-2004 Markus Friedl. All rights reserved.
+ *
+@@ -691,8 +691,8 @@
+ logit("open \"%s\" flags %s mode 0%o",
+ name, string_from_portable(pflags), mode);
+ if (readonly &&
+- ((flags & O_ACCMODE) == O_WRONLY ||
+- (flags & O_ACCMODE) == O_RDWR)) {
++ ((flags & O_ACCMODE) != O_RDONLY ||
++ (flags & (O_CREAT|O_TRUNC)) != 0)) {
+ verbose("Refusing open request in read-only mode");
+ status = SSH2_FX_PERMISSION_DENIED;
+ } else {
diff --git a/patches/source/openssh/openssh.SlackBuild b/patches/source/openssh/openssh.SlackBuild
new file mode 100755
index 000000000..d786d5723
--- /dev/null
+++ b/patches/source/openssh/openssh.SlackBuild
@@ -0,0 +1,169 @@
+#!/bin/sh
+
+# Copyright 2000 BSDi, Inc. Concord, CA, USA
+# Copyright 2001, 2002, 2003, 2004 Slackware Linux, Inc. Concord, CA, USA
+# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-openssh
+
+VERSION=${VERSION:-$(echo openssh-*.tar.gz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-2_slack14.1}
+
+NUMJOBS=${NUMJOBS:--j6}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2 -march=armv4 -mtune=xscale"
+elif [ "$ARCH" = "armel" ]; then
+ SLKCFLAGS="-O2 -march=armv4t"
+else
+ SLKCFLAGS="-O2"
+fi
+
+# Clean target location:
+rm -rf $PKG
+mkdir -p $PKG
+
+# Prepare the framework and extract the package:
+cd $TMP
+rm -rf $PKG openssh-$VERSION
+tar xvf $CWD/openssh-$VERSION.tar.gz || tar xvf $CWD/openssh-$VERSION.tar.?z* || exit 1
+cd openssh-$VERSION
+chown -R root:root .
+
+zcat $CWD/openssh.CVE-2017-15906.patch.gz | patch -p1 --verbose || exit 1
+
+# Restore support for tcpwrappers:
+zcat $CWD/openssh-7.4p1-libwrap.diff.gz | patch -p1 --verbose || exit 1
+autoreconf -vif
+
+# Compile package:
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --mandir=/usr/man \
+ --sysconfdir=/etc/ssh \
+ --without-pam \
+ --with-md5-passwords \
+ --with-tcp-wrappers \
+ --with-default-path=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin \
+ --with-privsep-path=/var/empty \
+ --with-privsep-user=sshd \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+
+# Install the package:
+make install DESTDIR=$PKG
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Compress and if needed symlink the man pages:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# Install directory used with PrivilegeSeparation option:
+mkdir -p $PKG/var/empty
+chmod 755 $PKG/var/empty
+
+# Install docs:
+mkdir -p $PKG/usr/doc/openssh-$VERSION
+cp -a \
+ CREDITS ChangeLog INSTALL LICENCE OVERVIEW \
+ README README.privsep README.smartcard RFC.nroff TODO WARNING.RNG \
+ $PKG/usr/doc/openssh-$VERSION
+chmod 644 $PKG/usr/doc/openssh-$VERSION/*
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+# Install also 'ssh-copy-id' and its manpage from contrib:
+( cd contrib
+ cp -a ssh-copy-id $PKG/usr/bin/ssh-copy-id
+ chmod 755 $PKG/usr/bin/ssh-copy-id
+ cat ssh-copy-id.1 | gzip -9c > $PKG/usr/man/man1/ssh-copy-id.1.gz
+)
+
+( cd $PKG
+
+ # Ditch the new host keys, since these have to be uniquely prepared on each machine:
+ rm -f etc/ssh/ssh_host_dsa_key
+ rm -f etc/ssh/ssh_host_dsa_key.pub
+ rm -f etc/ssh/ssh_host_rsa_key
+ rm -f etc/ssh/ssh_host_rsa_key.pub
+ rm -f etc/ssh/ssh_host_key
+ rm -f etc/ssh/ssh_host_key.pub
+
+ # Set up the config script installation:
+ mv etc/ssh/ssh_config etc/ssh/ssh_config.new
+ mv etc/ssh/sshd_config etc/ssh/sshd_config.new
+
+ # Add the init script:
+ mkdir -p etc/rc.d
+ cat $CWD/rc.sshd > etc/rc.d/rc.sshd.new
+ chmod 755 etc/rc.d/rc.sshd.new
+
+ # Copy runtime installation files:
+ mkdir -p install
+ zcat $CWD/doinst.sh.gz > install/doinst.sh
+ cat $CWD/slack-desc > install/slack-desc
+)
+
+# Create the package itself:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/openssh-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/openssh/rc.sshd b/patches/source/openssh/rc.sshd
new file mode 100644
index 000000000..2da2ab307
--- /dev/null
+++ b/patches/source/openssh/rc.sshd
@@ -0,0 +1,59 @@
+#!/bin/sh
+# Start/stop/restart the secure shell server:
+
+sshd_start() {
+ # Create host keys if needed.
+ if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
+ /usr/bin/ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ''
+ fi
+ if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
+ /usr/bin/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
+ fi
+ if [ ! -f /etc/ssh/ssh_host_ecdsa_key ]; then
+ /usr/bin/ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N ''
+ fi
+ if [ ! -f /etc/ssh/ssh_host_ed25519_key ]; then
+ /usr/bin/ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N ''
+ fi
+ # Catch any new host key types not yet created above:
+ /usr/bin/ssh-keygen -A
+ # Start the sshd daemon:
+ /usr/sbin/sshd
+}
+
+sshd_stop() {
+ killall sshd
+}
+
+sshd_restart() {
+ if [ -r /var/run/sshd.pid ]; then
+ echo "WARNING: killing listener process only. To kill every sshd process, you must"
+ echo " use 'rc.sshd stop'. 'rc.sshd restart' kills only the parent sshd to"
+ echo " allow an admin logged in through sshd to use 'rc.sshd restart' without"
+ echo " being cut off. If sshd has been upgraded, new connections will now"
+ echo " use the new version, which should be a safe enough approach."
+ kill `cat /var/run/sshd.pid`
+ else
+ echo "WARNING: There does not appear to be a parent instance of sshd running."
+ echo " If you really want to kill all running instances of sshd (including"
+ echo " any sessions currently in use), run '/etc/rc.d/rc.sshd stop' instead."
+ exit 1
+ fi
+ sleep 1
+ sshd_start
+}
+
+case "$1" in
+'start')
+ sshd_start
+ ;;
+'stop')
+ sshd_stop
+ ;;
+'restart')
+ sshd_restart
+ ;;
+*)
+ echo "usage $0 start|stop|restart"
+esac
+
diff --git a/patches/source/openssh/slack-desc b/patches/source/openssh/slack-desc
new file mode 100644
index 000000000..04277a720
--- /dev/null
+++ b/patches/source/openssh/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+openssh: openssh (Secure Shell daemon and clients)
+openssh:
+openssh: ssh (Secure Shell) is a program for logging into a remote machine and
+openssh: for executing commands on a remote machine. It is intended to replace
+openssh: rlogin and rsh, and provide secure encrypted communications between
+openssh: two untrusted hosts over an insecure network. sshd (SSH Daemon) is
+openssh: the daemon program for ssh. OpenSSH is based on the last free version
+openssh: of Tatu Ylonen's SSH, further enhanced and cleaned up by Aaron
+openssh: Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo de Raadt, and
+openssh: Dug Song. It has a homepage at http://www.openssh.com/
+openssh:
diff --git a/patches/source/openssl/certwatch b/patches/source/openssl/certwatch
new file mode 100644
index 000000000..d52dc3dc4
--- /dev/null
+++ b/patches/source/openssl/certwatch
@@ -0,0 +1,130 @@
+#!/bin/sh
+#
+# Will check all certificates stored in $CERTDIR for their expiration date,
+# and will display (if optional "stdout" argument is given), or mail a warning
+# message to $MAILADDR (if script is executed without any parameter
+# - unattended mode suitable for cron execution) for each particular certificate
+# that is about to expire in time less to, or equal to $DAYS after this script
+# has been executed, or if it has already expired.
+# This stupid script (C) 2006,2007 Jan Rafaj
+
+########################## CONFIGURATION SECTION BEGIN #########################
+# Note: all settings are mandatory
+# Warning will be sent if a certificate expires in time <= days given here
+DAYS=7
+# E-mail address where to send warnings
+MAILADDR=root
+# Directory with certificates to check
+CERTDIR=/etc/ssl/certs
+# Directory where to keep state files if this script isnt executed with "stdout"
+STATEDIR=/var/run
+########################### CONFIGURATION SECTION END ##########################
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+DAY_IN_SECS=$((60*60*24))
+DATE_CURRENT=$(date '+%s')
+
+usage()
+{
+ echo "Usage: $0 [stdout]"
+ echo
+ echo "Detailed description and configuration is embedded within the script."
+ exit 0
+}
+
+message()
+{
+ cat << EOF
+ WARNING: certificate $certfile
+ is about to expire in time equal to or less than $DAYS days from now on,
+ or has already expired - it might be a good idea to obtain/create new one.
+
+EOF
+}
+
+message_mail()
+{
+ message
+ cat << EOF
+ NOTE: This message is being sent only once.
+
+ A lock-file
+ $STATEDIR/certwatch-mailwarning-sent-$certfilebase
+ has been created, which will prevent this script from mailing you again
+ upon its subsequent executions by crond. You dont need to care about it;
+ the file will be auto-deleted as soon as you'll prolong your certificate.
+EOF
+}
+
+unset stdout
+case $# in
+ 0) ;;
+ 1) if [ "$1" = "-h" -o "$1" == "--help" ]; then
+ usage
+ elif [ "$1" = "stdout" ]; then
+ stdout=1
+ else
+ usage
+ fi
+ ;;
+ *) usage ;;
+esac
+
+for dir in $STATEDIR $CERTDIR ; do
+ if [ ! -d $dir ]; then
+ echo "ERROR: directory $dir does not exist"
+ exit 1
+ fi
+done
+for binary in basename date find grep mail openssl touch ; do
+ if [ ! \( -x /usr/bin/$binary -o -x /bin/$binary \) ]; then
+ echo "ERROR: /usr/bin/$binary not found"
+ exit 1
+ fi
+done
+
+find $CERTDIR -type f -maxdepth 1 | while read certfile ; do
+ if [ "$certfile" != "/etc/ssl/certs/ca-certificates.crt" ]; then
+ certfilebase="$(basename "$certfile")"
+ inform=PEM
+ echo "$certfile" | grep -q -i '\.net$'
+ if [ $? -eq 0 ]; then
+ # This is based purely on filename extension, so may give false results.
+ # But lets assume noone uses NET format certs today, ok?
+ continue
+ fi
+ echo "$certfile" | grep -q -i '\.der$'
+ if [ $? -eq 0 -o "$(file "$certfile" | egrep '(ASCII|PEM)')" == "" ]; then
+ inform=DER
+ fi
+ # We wont use '-checkend' since it is not properly documented (as of
+ # OpenSSL 0.9.8e).
+ DATE_CERT_EXPIRES=$(openssl x509 -in "$certfile" -inform $inform -noout -enddate | sed 's/^notAfter=//')
+ DATE_CERT_EXPIRES=$(date -d"$DATE_CERT_EXPIRES" +%s)
+ if [ $(($DATE_CERT_EXPIRES - $DATE_CURRENT)) -le $(($DAYS * $DAY_IN_SECS)) ]
+ then
+ if [ $stdout ]; then
+ message
+ else
+ if [ ! -f $STATEDIR/certwatch-mailwarning-sent-"$certfilebase" ]; then
+ subject="$0: certificate $certfile expiration warning"
+ message_mail | mail -r "certwatch@$HOSTNAME" \
+ -s "$subject" \
+ $MAILADDR 2>/dev/null
+ # echo "Mail about expiring certificate $certfile sent to $MAILADDR."
+ # echo "If you need to send it again, please remove lock-file"
+ # echo "$STATEDIR/certwatch-mailwarning-sent-$certfilebase ."
+ # echo
+ fi
+ touch $STATEDIR/certwatch-mailwarning-sent-"$certfilebase"
+ fi
+ else
+ if [ ! $stdout ]; then
+ if [ -f $STATEDIR/certwatch-mailwarning-sent-"$certfilebase" ]; then
+ rm $STATEDIR/certwatch-mailwarning-sent-"$certfilebase"
+ fi
+ fi
+ fi
+ fi
+done
+
diff --git a/patches/source/openssl/doinst.sh-openssl b/patches/source/openssl/doinst.sh-openssl
new file mode 100644
index 000000000..8fcf3d1c1
--- /dev/null
+++ b/patches/source/openssl/doinst.sh-openssl
@@ -0,0 +1,26 @@
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+# If there is a known buggy certwatch script with no local
+# modifications, just replace it:
+if [ "$(md5sum etc/cron.daily/certwatch 2> /dev/null)" = "32556321806f1850d56cb2ef8384b7a1 etc/cron.daily/certwatch" ]; then
+ cat etc/cron.daily/certwatch.new > etc/cron.daily/certwatch
+ touch -r etc/cron.daily/certwatch.new etc/cron.daily/certwatch
+fi
+
+config etc/ssl/openssl.cnf.new
+config etc/cron.daily/certwatch.new
+
+# Rehash certificates if the package is upgraded on a running system:
+if [ -x /usr/bin/c_rehash ]; then
+ /usr/bin/c_rehash 1> /dev/null 2> /dev/null
+fi
diff --git a/patches/source/openssl/doinst.sh-openssl-solibs b/patches/source/openssl/doinst.sh-openssl-solibs
new file mode 100644
index 000000000..ed4fdfacb
--- /dev/null
+++ b/patches/source/openssl/doinst.sh-openssl-solibs
@@ -0,0 +1,12 @@
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+config etc/ssl/openssl.cnf.new
diff --git a/patches/source/openssl/openssl.SlackBuild b/patches/source/openssl/openssl.SlackBuild
new file mode 100755
index 000000000..57d9a2d70
--- /dev/null
+++ b/patches/source/openssl/openssl.SlackBuild
@@ -0,0 +1,213 @@
+#!/bin/sh
+
+# Copyright 2000 BSDi, Inc. Concord, CA, USA
+# Copyright 2001, 2002 Slackware Linux, Inc. Concord, CA, USA
+# Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+VERSION=${VERSION:-$(echo openssl-*.tar.gz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+PKG1=$TMP/package-openssl
+PKG2=$TMP/package-ossllibs
+NAME1=openssl-$VERSION-$ARCH-$BUILD
+NAME2=openssl-solibs-$VERSION-$ARCH-$BUILD
+
+# Parallel build doesn't link properly.
+#NUMJOBS=${NUMJOBS:--j6}
+
+# So that ls has the right field counts for parsing...
+export LC_ALL=C
+
+cd $TMP
+rm -rf $PKG1 $PKG2 openssl-$VERSION
+
+tar xvf $CWD/openssl-$VERSION.tar.gz || exit 1
+cd openssl-$VERSION
+
+# Fix pod syntax errors which are fatal wih a newer perl:
+find . -name "*.pod" -exec sed -i "s/^\=item \([0-9]\)\(\ \|$\)/\=item C<\1>/g" {} \;
+
+# Use .so.1, not .so.1.0.0:
+zcat $CWD/openssl.soname.diff.gz | patch -p1 --backup --verbose --suffix=.orig || exit 1
+if [ "$ARCH" = "i486" ]; then
+ # Build with -march=i486 -mtune=i686:
+ zcat $CWD/openssl.optsx86.diff.gz | patch -p1 --backup --verbose --suffix=.orig || exit 1
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+fi
+
+# OpenSSL has a (nasty?) habit of bumping the internal version number with
+# every release. This wouldn't be so bad, but some applications are so
+# paranoid that they won't run against a different OpenSSL version than
+# what they were compiled against, whether or not the ABI has changed.
+#
+# So, we will use the OPENSSL_VERSION_NUMBER from openssl-1.0.1c unless ABI
+# breakage forces it to change. Yes, we're finally using this old trick. :)
+sed -i "s/#define OPENSSL_VERSION_NUMBER.*/\/* Use 0x1000103fL (1.0.1c) below to avoid pointlessly breaking the ABI *\/\n#define OPENSSL_VERSION_NUMBER 0x1000103fL/g" crypto/opensslv.h || exit 1
+
+chown -R root:root .
+mkdir -p $PKG1/usr/doc/openssl-$VERSION
+cp -a CHANGES CHANGES.SSLeay FAQ INSTALL INSTALL.MacOS INSTALL.VMS INSTALL.W32 \
+ LICENSE NEWS README README.ENGINE doc $PKG1/usr/doc/openssl-$VERSION
+find $PKG1/usr/doc/openssl-$VERSION -type d -exec chmod 755 {} \;
+find $PKG1/usr/doc/openssl-$VERSION -type f -exec chmod 644 {} \;
+
+# If there's a CHANGES file, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r CHANGES ]; then
+ DOCSDIR=$(echo $PKG1/usr/doc/*-$VERSION)
+ cat CHANGES | head -n 2000 > $DOCSDIR/CHANGES
+ touch -r CHANGES $DOCSDIR/CHANGES
+fi
+
+# These are the known patent issues with OpenSSL:
+# name # expires
+# MDC-2: 4,908,861 2007-03-13, included. :-)
+# IDEA: 5,214,703 2010-05-25, not included.
+# RC5: 5,724,428 2015-03-03, not included.
+
+./config \
+ --prefix=/usr \
+ --openssldir=/etc/ssl \
+ no-idea \
+ no-rc5 \
+ no-sse2 \
+ enable-ssl2 \
+ no-weak-ssl-ciphers \
+ shared
+
+make $NUMJOBS depend || make depend || exit 1
+
+make $NUMJOBS || make || exit 1
+
+make install INSTALL_PREFIX=$PKG1 || exit 1
+
+# Make the .so.? library symlinks:
+( cd $PKG1/usr/lib${LIBDIRSUFFIX} ; ldconfig -l lib*.so.* )
+
+# Move libraries, as they might be needed by programs that bring a network
+# mounted /usr online:
+
+mkdir $PKG1/lib${LIBDIRSUFFIX}
+( cd $PKG1/usr/lib${LIBDIRSUFFIX}
+ for file in lib*.so.?.* ; do
+ mv $file ../../lib${LIBDIRSUFFIX}
+ ln -sf ../../lib${LIBDIRSUFFIX}/$file .
+ done
+ cp -a lib*.so.? ../../lib${LIBDIRSUFFIX}
+)
+
+# Add a cron script to warn root if a certificate is going to expire soon:
+mkdir -p $PKG1/etc/cron.daily
+zcat $CWD/certwatch.gz > $PKG1/etc/cron.daily/certwatch.new
+chmod 755 $PKG1/etc/cron.daily/certwatch.new
+
+mv $PKG1/etc/ssl/openssl.cnf $PKG1/etc/ssl/openssl.cnf.new
+
+( cd $PKG1
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+mv $PKG1/etc/ssl/man $PKG1/usr
+( cd $PKG1/usr/man/man1 ; mv passwd.1 ssl_passwd.1 )
+( cd $PKG1/usr/man/man3 ; mv rand.3 ssl_rand.3 )
+( cd $PKG1/usr/man/man3 ; mv err.3 ssl_err.3 )
+# Compress and symlink the man pages:
+if [ -d $PKG1/usr/man ]; then
+ ( cd $PKG1/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# If there's an openssl0 directory, then build openssl-0 shared libraries for
+# compatibility with programs linked to those:
+if [ -d $CWD/openssl0 ]; then
+ ( cd $CWD/openssl0
+ ./openssl0.build || exit 1
+ ) || exit 1
+ # Don't put these in the openssl package... openssl-solibs is enough.
+ #mkdir -p $PKG1/lib${LIBDIRSUFFIX}
+ #cp -a $TMP/package-openssl0/usr/lib/lib*.so.?.?.? $PKG1/lib${LIBDIRSUFFIX}
+ #( cd $PKG1/lib${LIBDIRSUFFIX} ; ldconfig -l lib*.so.?.?.? )
+ mkdir -p $PKG2/lib${LIBDIRSUFFIX}
+ cp -a $TMP/package-openssl0/usr/lib/lib*.so.?.?.? $PKG2/lib${LIBDIRSUFFIX}
+ ( cd $PKG2/lib${LIBDIRSUFFIX} ; ldconfig -l lib*.so.?.?.? )
+fi
+
+cd $PKG1
+chmod 755 usr/lib${LIBDIRSUFFIX}/pkgconfig
+sed -i -e "s#lib\$#lib${LIBDIRSUFFIX}#" usr/lib${LIBDIRSUFFIX}/pkgconfig/*.pc
+mkdir -p install
+zcat $CWD/doinst.sh-openssl.gz > install/doinst.sh
+cat $CWD/slack-desc.openssl > install/slack-desc
+/sbin/makepkg -l y -c n $TMP/${NAME1}.txz
+
+# Make runtime package:
+mkdir -p $PKG2/lib${LIBDIRSUFFIX}
+( cd lib${LIBDIRSUFFIX} ; cp -a lib*.so.* $PKG2/lib${LIBDIRSUFFIX} )
+( cd $PKG2/lib${LIBDIRSUFFIX} ; ldconfig -l * )
+mkdir -p $PKG2/etc
+( cd $PKG2/etc ; cp -a $PKG1/etc/ssl . )
+mkdir -p $PKG2/usr/doc/openssl-$VERSION
+( cd $TMP/openssl-$VERSION
+ cp -a CHANGES CHANGES.SSLeay FAQ INSTALL INSTALL.MacOS INSTALL.VMS INSTALL.W32 \
+ LICENSE NEWS README README.ENGINE $PKG2/usr/doc/openssl-$VERSION
+ # If there's a CHANGES file, installing at least part of the recent history
+ # is useful, but don't let it get totally out of control:
+ if [ -r CHANGES ]; then
+ DOCSDIR=$(echo $PKG2/usr/doc/*-$VERSION)
+ cat CHANGES | head -n 2000 > $DOCSDIR/CHANGES
+ touch -r CHANGES $DOCSDIR/CHANGES
+ fi
+)
+
+find $PKG2/usr/doc/openssl-$VERSION -type d -exec chmod 755 {} \;
+find $PKG2/usr/doc/openssl-$VERSION -type f -exec chmod 644 {} \;
+cd $PKG2
+mkdir -p install
+zcat $CWD/doinst.sh-openssl-solibs.gz > install/doinst.sh
+cat $CWD/slack-desc.openssl-solibs > install/slack-desc
+/sbin/makepkg -l y -c n $TMP/${NAME2}.txz
diff --git a/patches/source/openssl/openssl.optsx86.diff b/patches/source/openssl/openssl.optsx86.diff
new file mode 100644
index 000000000..3b0a45c86
--- /dev/null
+++ b/patches/source/openssl/openssl.optsx86.diff
@@ -0,0 +1,11 @@
+--- ./Configure.orig 2015-04-16 11:46:04.733060835 -0500
++++ ./Configure 2015-04-16 11:48:26.462074086 -0500
+@@ -352,7 +352,7 @@
+ "linux-armv4", "gcc:-O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ #### IA-32 targets...
+ "linux-ia32-icc", "icc:-DL_ENDIAN -O2 -no_cpprt::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+-"linux-elf", "gcc:-DL_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"linux-elf", "gcc:-DL_ENDIAN -O3 -fomit-frame-pointer -march=i486 -mtune=i686 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ "linux-aout", "gcc:-DL_ENDIAN -O3 -fomit-frame-pointer -march=i486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:a.out",
+ ####
+ "linux-generic64","gcc:-O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
diff --git a/patches/source/openssl/openssl.soname.diff b/patches/source/openssl/openssl.soname.diff
new file mode 100644
index 000000000..308968d9c
--- /dev/null
+++ b/patches/source/openssl/openssl.soname.diff
@@ -0,0 +1,11 @@
+--- ./Makefile.shared.orig 2005-06-23 13:47:54.000000000 -0700
++++ ./Makefile.shared 2005-10-12 20:02:28.000000000 -0700
+@@ -151,7 +151,7 @@
+ SHLIB_SUFFIX=; \
+ ALLSYMSFLAGS='-Wl,--whole-archive'; \
+ NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
+- SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
++ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB.1"
+
+ DO_GNU_APP=LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)"
+
diff --git a/patches/source/openssl/openssl0/certwatch b/patches/source/openssl/openssl0/certwatch
new file mode 100644
index 000000000..d52dc3dc4
--- /dev/null
+++ b/patches/source/openssl/openssl0/certwatch
@@ -0,0 +1,130 @@
+#!/bin/sh
+#
+# Will check all certificates stored in $CERTDIR for their expiration date,
+# and will display (if optional "stdout" argument is given), or mail a warning
+# message to $MAILADDR (if script is executed without any parameter
+# - unattended mode suitable for cron execution) for each particular certificate
+# that is about to expire in time less to, or equal to $DAYS after this script
+# has been executed, or if it has already expired.
+# This stupid script (C) 2006,2007 Jan Rafaj
+
+########################## CONFIGURATION SECTION BEGIN #########################
+# Note: all settings are mandatory
+# Warning will be sent if a certificate expires in time <= days given here
+DAYS=7
+# E-mail address where to send warnings
+MAILADDR=root
+# Directory with certificates to check
+CERTDIR=/etc/ssl/certs
+# Directory where to keep state files if this script isnt executed with "stdout"
+STATEDIR=/var/run
+########################### CONFIGURATION SECTION END ##########################
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+DAY_IN_SECS=$((60*60*24))
+DATE_CURRENT=$(date '+%s')
+
+usage()
+{
+ echo "Usage: $0 [stdout]"
+ echo
+ echo "Detailed description and configuration is embedded within the script."
+ exit 0
+}
+
+message()
+{
+ cat << EOF
+ WARNING: certificate $certfile
+ is about to expire in time equal to or less than $DAYS days from now on,
+ or has already expired - it might be a good idea to obtain/create new one.
+
+EOF
+}
+
+message_mail()
+{
+ message
+ cat << EOF
+ NOTE: This message is being sent only once.
+
+ A lock-file
+ $STATEDIR/certwatch-mailwarning-sent-$certfilebase
+ has been created, which will prevent this script from mailing you again
+ upon its subsequent executions by crond. You dont need to care about it;
+ the file will be auto-deleted as soon as you'll prolong your certificate.
+EOF
+}
+
+unset stdout
+case $# in
+ 0) ;;
+ 1) if [ "$1" = "-h" -o "$1" == "--help" ]; then
+ usage
+ elif [ "$1" = "stdout" ]; then
+ stdout=1
+ else
+ usage
+ fi
+ ;;
+ *) usage ;;
+esac
+
+for dir in $STATEDIR $CERTDIR ; do
+ if [ ! -d $dir ]; then
+ echo "ERROR: directory $dir does not exist"
+ exit 1
+ fi
+done
+for binary in basename date find grep mail openssl touch ; do
+ if [ ! \( -x /usr/bin/$binary -o -x /bin/$binary \) ]; then
+ echo "ERROR: /usr/bin/$binary not found"
+ exit 1
+ fi
+done
+
+find $CERTDIR -type f -maxdepth 1 | while read certfile ; do
+ if [ "$certfile" != "/etc/ssl/certs/ca-certificates.crt" ]; then
+ certfilebase="$(basename "$certfile")"
+ inform=PEM
+ echo "$certfile" | grep -q -i '\.net$'
+ if [ $? -eq 0 ]; then
+ # This is based purely on filename extension, so may give false results.
+ # But lets assume noone uses NET format certs today, ok?
+ continue
+ fi
+ echo "$certfile" | grep -q -i '\.der$'
+ if [ $? -eq 0 -o "$(file "$certfile" | egrep '(ASCII|PEM)')" == "" ]; then
+ inform=DER
+ fi
+ # We wont use '-checkend' since it is not properly documented (as of
+ # OpenSSL 0.9.8e).
+ DATE_CERT_EXPIRES=$(openssl x509 -in "$certfile" -inform $inform -noout -enddate | sed 's/^notAfter=//')
+ DATE_CERT_EXPIRES=$(date -d"$DATE_CERT_EXPIRES" +%s)
+ if [ $(($DATE_CERT_EXPIRES - $DATE_CURRENT)) -le $(($DAYS * $DAY_IN_SECS)) ]
+ then
+ if [ $stdout ]; then
+ message
+ else
+ if [ ! -f $STATEDIR/certwatch-mailwarning-sent-"$certfilebase" ]; then
+ subject="$0: certificate $certfile expiration warning"
+ message_mail | mail -r "certwatch@$HOSTNAME" \
+ -s "$subject" \
+ $MAILADDR 2>/dev/null
+ # echo "Mail about expiring certificate $certfile sent to $MAILADDR."
+ # echo "If you need to send it again, please remove lock-file"
+ # echo "$STATEDIR/certwatch-mailwarning-sent-$certfilebase ."
+ # echo
+ fi
+ touch $STATEDIR/certwatch-mailwarning-sent-"$certfilebase"
+ fi
+ else
+ if [ ! $stdout ]; then
+ if [ -f $STATEDIR/certwatch-mailwarning-sent-"$certfilebase" ]; then
+ rm $STATEDIR/certwatch-mailwarning-sent-"$certfilebase"
+ fi
+ fi
+ fi
+ fi
+done
+
diff --git a/patches/source/openssl/openssl0/doinst.sh-openssl b/patches/source/openssl/openssl0/doinst.sh-openssl
new file mode 100644
index 000000000..c92e60763
--- /dev/null
+++ b/patches/source/openssl/openssl0/doinst.sh-openssl
@@ -0,0 +1,21 @@
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+# If there is a known buggy certwatch script with no local
+# modifications, just replace it:
+if [ "$(md5sum etc/cron.daily/certwatch 2> /dev/null)" = "32556321806f1850d56cb2ef8384b7a1 etc/cron.daily/certwatch" ]; then
+ cat etc/cron.daily/certwatch.new > etc/cron.daily/certwatch
+ touch -r etc/cron.daily/certwatch.new etc/cron.daily/certwatch
+fi
+
+config etc/ssl/openssl.cnf.new
+config etc/cron.daily/certwatch.new
diff --git a/patches/source/openssl/openssl0/doinst.sh-openssl-solibs b/patches/source/openssl/openssl0/doinst.sh-openssl-solibs
new file mode 100644
index 000000000..ed4fdfacb
--- /dev/null
+++ b/patches/source/openssl/openssl0/doinst.sh-openssl-solibs
@@ -0,0 +1,12 @@
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+config etc/ssl/openssl.cnf.new
diff --git a/patches/source/openssl/openssl0/openssl.SlackBuild b/patches/source/openssl/openssl0/openssl.SlackBuild
new file mode 100755
index 000000000..bde102e25
--- /dev/null
+++ b/patches/source/openssl/openssl0/openssl.SlackBuild
@@ -0,0 +1,202 @@
+#!/bin/sh
+
+# Copyright 2000 BSDi, Inc. Concord, CA, USA
+# Copyright 2001, 2002 Slackware Linux, Inc. Concord, CA, USA
+# Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2014 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+VERSION=${VERSION:-$(echo openssl-*.tar.gz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+PKG1=$TMP/package-openssl
+PKG2=$TMP/package-ossllibs
+NAME1=openssl-$VERSION-$ARCH-$BUILD
+NAME2=openssl-solibs-$VERSION-$ARCH-$BUILD
+
+NUMJOBS=${NUMJOBS:--j6}
+
+# So that ls has the right field counts for parsing...
+export LC_ALL=C
+
+cd $TMP
+rm -rf $PKG1 $PKG2 openssl-$VERSION
+tar xvf $CWD/openssl-$VERSION.tar.gz || exit 1
+cd openssl-$VERSION
+
+# Fix pod syntax errors which are fatal wih a newer perl:
+find . -name "*.pod" -exec sed -i "s/^\=item \([0-9]\)\(\ \|$\)/\=item C<\1>/g" {} \;
+
+# Use .so.0, not .so.0.9.8:
+zcat $CWD/openssl.soname.diff.gz | patch -p1 --backup --verbose --suffix=.orig || exit 1
+if [ "$ARCH" = "i486" ]; then
+ # Build with -march=i486 -mtune=i686:
+ zcat $CWD/openssl.optsx86.diff.gz | patch -p1 --backup --verbose --suffix=.orig || exit 1
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+fi
+
+# Mitigate DROWN:
+zcat $CWD/openssl.no.weak.sslv2.ciphers.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/openssl.no.weak.sslv3.ciphers.diff.gz | patch -p1 --verbose || exit 1
+
+# OpenSSL has a (nasty?) habit of bumping the internal version number with
+# every release. This wouldn't be so bad, but some applications are so
+# paranoid that they won't run against a different OpenSSL version than
+# what they were compiled against, whether or not the ABI has changed.
+#
+# So, we will use the OPENSSL_VERSION_NUMBER from openssl-0.9.8o unless ABI
+# breakage forces it to change. Yes, we're finally using this old trick. :)
+sed -i "s/#define OPENSSL_VERSION_NUMBER.*/\/* Use 0x009080efL (0.9.8o) below to avoid pointlessly breaking the ABI *\/\n#define OPENSSL_VERSION_NUMBER 0x009080efL/g" crypto/opensslv.h || exit 1
+
+chown -R root:root .
+mkdir -p $PKG1/usr/doc/openssl-$VERSION
+cp -a CHANGES CHANGES.SSLeay FAQ INSTALL INSTALL.MacOS INSTALL.VMS INSTALL.W32 \
+ LICENSE NEWS README README.ENGINE doc $PKG1/usr/doc/openssl-$VERSION
+find $PKG1/usr/doc/openssl-$VERSION -type d -exec chmod 755 {} \;
+find $PKG1/usr/doc/openssl-$VERSION -type f -exec chmod 644 {} \;
+
+# If there's a CHANGES file, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r CHANGES ]; then
+ DOCSDIR=$(echo $PKG1/usr/doc/*-$VERSION)
+ cat CHANGES | head -n 2000 > $DOCSDIR/CHANGES
+ touch -r CHANGES $DOCSDIR/CHANGES
+fi
+
+# These are the known patent issues with OpenSSL:
+# name # expires
+# MDC-2: 4,908,861 2007-03-13, included. :-)
+# IDEA: 5,214,703 2010-05-25, not included.
+# RC5: 5,724,428 2015-03-03, not included.
+
+./config \
+ --prefix=/usr \
+ --openssldir=/etc/ssl \
+ no-idea \
+ no-rc5 \
+ no-sse2 \
+ shared
+
+make $NUMJOBS depend || make depend || exit 1
+
+make $NUMJOBS || make || exit 1
+
+make install INSTALL_PREFIX=$PKG1 || exit 1
+
+# Use proper libdir:
+( cd $PKG1/usr; mv lib lib${LIBDIRSUFFIX} )
+
+# Make the .so.? library symlinks:
+( cd $PKG1/usr/lib${LIBDIRSUFFIX} ; ldconfig -l lib*.so.* )
+
+# Move libraries, as they might be needed by programs that bring a network
+# mounted /usr online:
+
+mkdir $PKG1/lib${LIBDIRSUFFIX}
+( cd $PKG1/usr/lib${LIBDIRSUFFIX}
+ for file in lib*.so.?.* ; do
+ mv $file ../../lib${LIBDIRSUFFIX}
+ ln -sf ../../lib${LIBDIRSUFFIX}/$file .
+ done
+ cp -a lib*.so.? ../../lib${LIBDIRSUFFIX}
+)
+
+# Add a cron script to warn root if a certificate is going to expire soon:
+mkdir -p $PKG1/etc/cron.daily
+zcat $CWD/certwatch.gz > $PKG1/etc/cron.daily/certwatch.new
+chmod 755 $PKG1/etc/cron.daily/certwatch.new
+
+mv $PKG1/etc/ssl/openssl.cnf $PKG1/etc/ssl/openssl.cnf.new
+
+( cd $PKG1
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+mv $PKG1/etc/ssl/man $PKG1/usr
+( cd $PKG1/usr/man/man1 ; mv passwd.1 ssl_passwd.1 )
+( cd $PKG1/usr/man/man3 ; mv rand.3 ssl_rand.3 )
+( cd $PKG1/usr/man/man3 ; mv err.3 ssl_err.3 )
+# Compress and symlink the man pages:
+if [ -d $PKG1/usr/man ]; then
+ ( cd $PKG1/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+cd $PKG1
+chmod 755 usr/lib${LIBDIRSUFFIX}/pkgconfig
+sed -i -e "s#lib\$#lib${LIBDIRSUFFIX}#" usr/lib${LIBDIRSUFFIX}/pkgconfig/*.pc
+mkdir -p install
+zcat $CWD/doinst.sh-openssl.gz > install/doinst.sh
+cat $CWD/slack-desc.openssl > install/slack-desc
+/sbin/makepkg -l y -c n $TMP/${NAME1}.txz
+
+# Make runtime package:
+mkdir -p $PKG2/lib${LIBDIRSUFFIX}
+( cd lib${LIBDIRSUFFIX} ; cp -a lib*.so.* $PKG2/lib${LIBDIRSUFFIX} )
+( cd $PKG2/lib${LIBDIRSUFFIX} ; ldconfig -l * )
+mkdir -p $PKG2/etc
+( cd $PKG2/etc ; cp -a $PKG1/etc/ssl . )
+mkdir -p $PKG2/usr/doc/openssl-$VERSION
+( cd $TMP/openssl-$VERSION
+ cp -a CHANGES CHANGES.SSLeay FAQ INSTALL INSTALL.MacOS INSTALL.VMS INSTALL.W32 \
+ LICENSE NEWS README README.ENGINE $PKG2/usr/doc/openssl-$VERSION
+)
+
+# If there's a CHANGES file, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r CHANGES ]; then
+ DOCSDIR=$(echo $PKG2/usr/doc/*-$VERSION)
+ cat CHANGES | head -n 2000 > $DOCSDIR/CHANGES
+ touch -r CHANGES $DOCSDIR/CHANGES
+fi
+
+find $PKG2/usr/doc/openssl-$VERSION -type d -exec chmod 755 {} \;
+find $PKG2/usr/doc/openssl-$VERSION -type f -exec chmod 644 {} \;
+cd $PKG2
+mkdir -p install
+zcat $CWD/doinst.sh-openssl-solibs.gz > install/doinst.sh
+cat $CWD/slack-desc.openssl-solibs > install/slack-desc
+/sbin/makepkg -l y -c n $TMP/${NAME2}.txz
diff --git a/patches/source/openssl/openssl0/openssl.no.weak.sslv2.ciphers.diff b/patches/source/openssl/openssl0/openssl.no.weak.sslv2.ciphers.diff
new file mode 100644
index 000000000..a7075ba4c
--- /dev/null
+++ b/patches/source/openssl/openssl0/openssl.no.weak.sslv2.ciphers.diff
@@ -0,0 +1,51 @@
+diff -u -r --new-file openssl-0.9.8zh.orig/ssl/s2_lib.c openssl-0.9.8zh/ssl/s2_lib.c
+--- openssl-0.9.8zh.orig/ssl/s2_lib.c 2015-12-03 08:59:08.000000000 -0600
++++ openssl-0.9.8zh/ssl/s2_lib.c 2016-03-01 18:29:20.998111828 -0600
+@@ -97,6 +97,7 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# if 0
+ /* RC4_128_EXPORT40_WITH_MD5 */
+ {
+ 1,
+@@ -110,6 +111,7 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+ /* RC2_128_CBC_WITH_MD5 */
+ {
+ 1,
+@@ -123,6 +125,7 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# if 0
+ /* RC2_128_CBC_EXPORT40_WITH_MD5 */
+ {
+ 1,
+@@ -136,6 +139,7 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+ /* IDEA_128_CBC_WITH_MD5 */
+ # ifndef OPENSSL_NO_IDEA
+ {
+@@ -151,6 +155,7 @@
+ SSL_ALL_STRENGTHS,
+ },
+ # endif
++# if 0
+ /* DES_64_CBC_WITH_MD5 */
+ {
+ 1,
+@@ -164,6 +169,7 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+ /* DES_192_EDE3_CBC_WITH_MD5 */
+ {
+ 1,
diff --git a/patches/source/openssl/openssl0/openssl.no.weak.sslv3.ciphers.diff b/patches/source/openssl/openssl0/openssl.no.weak.sslv3.ciphers.diff
new file mode 100644
index 000000000..17326a56e
--- /dev/null
+++ b/patches/source/openssl/openssl0/openssl.no.weak.sslv3.ciphers.diff
@@ -0,0 +1,356 @@
+diff -u -r --new-file openssl-0.9.8zh.orig/ssl/s3_lib.c openssl-0.9.8zh/ssl/s3_lib.c
+--- openssl-0.9.8zh.orig/ssl/s3_lib.c 2015-12-03 08:59:08.000000000 -0600
++++ openssl-0.9.8zh/ssl/s3_lib.c 2016-03-01 18:42:26.295095103 -0600
+@@ -166,6 +166,7 @@
+ SSL_ALL_STRENGTHS,
+ },
+ /* Cipher 03 */
++# if 0
+ {
+ 1,
+ SSL3_TXT_RSA_RC4_40_MD5,
+@@ -178,6 +179,7 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+ /* Cipher 04 */
+ {
+ 1,
+@@ -205,6 +207,7 @@
+ SSL_ALL_STRENGTHS,
+ },
+ /* Cipher 06 */
++# if 0
+ {
+ 1,
+ SSL3_TXT_RSA_RC2_40_MD5,
+@@ -217,6 +220,7 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+ /* Cipher 07 */
+ #ifndef OPENSSL_NO_IDEA
+ {
+@@ -233,6 +237,7 @@
+ },
+ #endif
+ /* Cipher 08 */
++# if 0
+ {
+ 1,
+ SSL3_TXT_RSA_DES_40_CBC_SHA,
+@@ -245,7 +250,9 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+ /* Cipher 09 */
++# if 0
+ {
+ 1,
+ SSL3_TXT_RSA_DES_64_CBC_SHA,
+@@ -258,6 +265,7 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+ /* Cipher 0A */
+ {
+ 1,
+@@ -273,6 +281,7 @@
+ },
+ /* The DH ciphers */
+ /* Cipher 0B */
++# if 0
+ {
+ 0,
+ SSL3_TXT_DH_DSS_DES_40_CBC_SHA,
+@@ -285,7 +294,9 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+ /* Cipher 0C */
++# if 0
+ {
+ 0,
+ SSL3_TXT_DH_DSS_DES_64_CBC_SHA,
+@@ -298,6 +309,7 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+ /* Cipher 0D */
+ {
+ 0,
+@@ -312,6 +324,7 @@
+ SSL_ALL_STRENGTHS,
+ },
+ /* Cipher 0E */
++# if 0
+ {
+ 0,
+ SSL3_TXT_DH_RSA_DES_40_CBC_SHA,
+@@ -324,7 +337,9 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+ /* Cipher 0F */
++# if 0
+ {
+ 0,
+ SSL3_TXT_DH_RSA_DES_64_CBC_SHA,
+@@ -337,6 +352,7 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+ /* Cipher 10 */
+ {
+ 0,
+@@ -353,6 +369,7 @@
+
+ /* The Ephemeral DH ciphers */
+ /* Cipher 11 */
++# if 0
+ {
+ 1,
+ SSL3_TXT_EDH_DSS_DES_40_CBC_SHA,
+@@ -365,7 +382,9 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+ /* Cipher 12 */
++# if 0
+ {
+ 1,
+ SSL3_TXT_EDH_DSS_DES_64_CBC_SHA,
+@@ -378,6 +397,7 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+ /* Cipher 13 */
+ {
+ 1,
+@@ -392,6 +412,7 @@
+ SSL_ALL_STRENGTHS,
+ },
+ /* Cipher 14 */
++# if 0
+ {
+ 1,
+ SSL3_TXT_EDH_RSA_DES_40_CBC_SHA,
+@@ -404,7 +425,9 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+ /* Cipher 15 */
++# if 0
+ {
+ 1,
+ SSL3_TXT_EDH_RSA_DES_64_CBC_SHA,
+@@ -417,6 +440,7 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+ /* Cipher 16 */
+ {
+ 1,
+@@ -431,6 +455,7 @@
+ SSL_ALL_STRENGTHS,
+ },
+ /* Cipher 17 */
++# if 0
+ {
+ 1,
+ SSL3_TXT_ADH_RC4_40_MD5,
+@@ -443,6 +468,7 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+ /* Cipher 18 */
+ {
+ 1,
+@@ -457,6 +483,7 @@
+ SSL_ALL_STRENGTHS,
+ },
+ /* Cipher 19 */
++# if 0
+ {
+ 1,
+ SSL3_TXT_ADH_DES_40_CBC_SHA,
+@@ -469,7 +496,9 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+ /* Cipher 1A */
++# if 0
+ {
+ 1,
+ SSL3_TXT_ADH_DES_64_CBC_SHA,
+@@ -482,6 +511,7 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+ /* Cipher 1B */
+ {
+ 1,
+@@ -543,6 +573,7 @@
+
+ #ifndef OPENSSL_NO_KRB5
+ /* The Kerberos ciphers */
++# if 0
+ /* Cipher 1E */
+ {
+ 1,
+@@ -556,6 +587,7 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+
+ /* Cipher 1F */
+ {
+@@ -600,6 +632,7 @@
+ },
+
+ /* Cipher 22 */
++# if 0
+ {
+ 1,
+ SSL3_TXT_KRB5_DES_64_CBC_MD5,
+@@ -612,6 +645,7 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+
+ /* Cipher 23 */
+ {
+@@ -656,6 +690,7 @@
+ },
+
+ /* Cipher 26 */
++# if 0
+ {
+ 1,
+ SSL3_TXT_KRB5_DES_40_CBC_SHA,
+@@ -668,8 +703,10 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+
+ /* Cipher 27 */
++# if 0
+ {
+ 1,
+ SSL3_TXT_KRB5_RC2_40_CBC_SHA,
+@@ -682,8 +719,10 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+
+ /* Cipher 28 */
++# if 0
+ {
+ 1,
+ SSL3_TXT_KRB5_RC4_40_SHA,
+@@ -696,8 +735,10 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+
+ /* Cipher 29 */
++# if 0
+ {
+ 1,
+ SSL3_TXT_KRB5_DES_40_CBC_MD5,
+@@ -710,8 +751,10 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+
+ /* Cipher 2A */
++# if 0
+ {
+ 1,
+ SSL3_TXT_KRB5_RC2_40_CBC_MD5,
+@@ -724,8 +767,10 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+
+ /* Cipher 2B */
++# if 0
+ {
+ 1,
+ SSL3_TXT_KRB5_RC4_40_MD5,
+@@ -738,6 +783,7 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+ #endif /* OPENSSL_NO_KRB5 */
+
+ /* New AES ciphersuites */
+@@ -1007,6 +1053,7 @@
+ },
+ # endif
+ /* Cipher 62 */
++# if 0
+ {
+ 1,
+ TLS1_TXT_RSA_EXPORT1024_WITH_DES_CBC_SHA,
+@@ -1019,7 +1066,9 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+ /* Cipher 63 */
++# if 0
+ {
+ 1,
+ TLS1_TXT_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA,
+@@ -1032,7 +1081,9 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+ /* Cipher 64 */
++# if 0
+ {
+ 1,
+ TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_SHA,
+@@ -1045,7 +1096,9 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+ /* Cipher 65 */
++# if 0
+ {
+ 1,
+ TLS1_TXT_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA,
+@@ -1058,6 +1111,7 @@
+ SSL_ALL_CIPHERS,
+ SSL_ALL_STRENGTHS,
+ },
++# endif
+ /* Cipher 66 */
+ {
+ 1,
diff --git a/patches/source/openssl/openssl0/openssl.optsx86.diff b/patches/source/openssl/openssl0/openssl.optsx86.diff
new file mode 100644
index 000000000..a1a289a20
--- /dev/null
+++ b/patches/source/openssl/openssl0/openssl.optsx86.diff
@@ -0,0 +1,11 @@
+--- ./Configure.orig 2005-08-02 03:59:42.000000000 -0700
++++ ./Configure 2005-10-12 20:04:43.000000000 -0700
+@@ -317,7 +317,7 @@
+ "linux-ppc", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::linux_ppc32.o::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ #### IA-32 targets...
+ "linux-ia32-icc", "icc:-DL_ENDIAN -DTERMIO -O2 -no_cpprt::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+-"linux-elf", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"linux-elf", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -march=i486 -mtune=i686 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ "linux-aout", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -march=i486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
+ ####
+ "linux-generic64","gcc:-DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
diff --git a/patches/source/openssl/openssl0/openssl.soname.diff b/patches/source/openssl/openssl0/openssl.soname.diff
new file mode 100644
index 000000000..f660e93bb
--- /dev/null
+++ b/patches/source/openssl/openssl0/openssl.soname.diff
@@ -0,0 +1,11 @@
+--- ./Makefile.shared.orig 2005-06-23 13:47:54.000000000 -0700
++++ ./Makefile.shared 2005-10-12 20:02:28.000000000 -0700
+@@ -151,7 +151,7 @@
+ SHLIB_SUFFIX=; \
+ ALLSYMSFLAGS='-Wl,--whole-archive'; \
+ NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
+- SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
++ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB.0"
+
+ DO_GNU_APP=LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)"
+
diff --git a/patches/source/openssl/openssl0/openssl0.build b/patches/source/openssl/openssl0/openssl0.build
new file mode 100755
index 000000000..8f8e37920
--- /dev/null
+++ b/patches/source/openssl/openssl0/openssl0.build
@@ -0,0 +1,205 @@
+#!/bin/sh
+
+# Copyright 2000 BSDi, Inc. Concord, CA, USA
+# Copyright 2001, 2002 Slackware Linux, Inc. Concord, CA, USA
+# Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2014 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+VERSION=${VERSION:-$(echo openssl-*.tar.gz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+PKG1=$TMP/package-openssl0
+PKG2=$TMP/package-ossllibs
+NAME1=openssl-$VERSION-$ARCH-$BUILD
+NAME2=openssl-solibs-$VERSION-$ARCH-$BUILD
+
+NUMJOBS=${NUMJOBS:--j6}
+
+# So that ls has the right field counts for parsing...
+export LC_ALL=C
+
+cd $TMP
+#rm -rf $PKG1 $PKG2 openssl-$VERSION
+rm -rf $PKG1 openssl-$VERSION
+tar xvf $CWD/openssl-$VERSION.tar.gz || exit 1
+cd openssl-$VERSION
+
+# Fix pod syntax errors which are fatal wih a newer perl:
+find . -name "*.pod" -exec sed -i "s/^\=item \([0-9]\)\(\ \|$\)/\=item C<\1>/g" {} \;
+
+# Use .so.0, not .so.0.9.8:
+zcat $CWD/openssl.soname.diff.gz | patch -p1 --backup --verbose --suffix=.orig || exit 1
+if [ "$ARCH" = "i486" ]; then
+ # Build with -march=i486 -mtune=i686:
+ zcat $CWD/openssl.optsx86.diff.gz | patch -p1 --backup --verbose --suffix=.orig || exit 1
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+fi
+
+# Mitigate DROWN:
+zcat $CWD/openssl.no.weak.sslv2.ciphers.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/openssl.no.weak.sslv3.ciphers.diff.gz | patch -p1 --verbose || exit 1
+
+# OpenSSL has a (nasty?) habit of bumping the internal version number with
+# every release. This wouldn't be so bad, but some applications are so
+# paranoid that they won't run against a different OpenSSL version than
+# what they were compiled against, whether or not the ABI has changed.
+#
+# So, we will use the OPENSSL_VERSION_NUMBER from openssl-0.9.8o unless ABI
+# breakage forces it to change. Yes, we're finally using this old trick. :)
+sed -i "s/#define OPENSSL_VERSION_NUMBER.*/\/* Use 0x009080efL (0.9.8o) below to avoid pointlessly breaking the ABI *\/\n#define OPENSSL_VERSION_NUMBER 0x009080efL/g" crypto/opensslv.h || exit 1
+
+chown -R root:root .
+mkdir -p $PKG1/usr/doc/openssl-$VERSION
+cp -a CHANGES CHANGES.SSLeay FAQ INSTALL INSTALL.MacOS INSTALL.VMS INSTALL.W32 \
+ LICENSE NEWS README README.ENGINE doc $PKG1/usr/doc/openssl-$VERSION
+find $PKG1/usr/doc/openssl-$VERSION -type d -exec chmod 755 {} \;
+find $PKG1/usr/doc/openssl-$VERSION -type f -exec chmod 644 {} \;
+
+# If there's a CHANGES file, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r CHANGES ]; then
+ DOCSDIR=$(echo $PKG1/usr/doc/*-$VERSION)
+ cat CHANGES | head -n 2000 > $DOCSDIR/CHANGES
+ touch -r CHANGES $DOCSDIR/CHANGES
+fi
+
+# These are the known patent issues with OpenSSL:
+# name # expires
+# MDC-2: 4,908,861 2007-03-13, included. :-)
+# IDEA: 5,214,703 2010-05-25, not included.
+# RC5: 5,724,428 2015-03-03, not included.
+
+./config \
+ --prefix=/usr \
+ --openssldir=/etc/ssl \
+ no-idea \
+ no-rc5 \
+ no-sse2 \
+ shared
+
+make $NUMJOBS depend || make depend || exit 1
+
+make $NUMJOBS || make || exit 1
+
+make install INSTALL_PREFIX=$PKG1 || exit 1
+
+exit 0
+
+# Use proper libdir:
+( cd $PKG1/usr; mv lib lib${LIBDIRSUFFIX} )
+
+# Make the .so.? library symlinks:
+( cd $PKG1/usr/lib${LIBDIRSUFFIX} ; ldconfig -l lib*.so.* )
+
+# Move libraries, as they might be needed by programs that bring a network
+# mounted /usr online:
+
+mkdir $PKG1/lib${LIBDIRSUFFIX}
+( cd $PKG1/usr/lib${LIBDIRSUFFIX}
+ for file in lib*.so.?.* ; do
+ mv $file ../../lib${LIBDIRSUFFIX}
+ ln -sf ../../lib${LIBDIRSUFFIX}/$file .
+ done
+ cp -a lib*.so.? ../../lib${LIBDIRSUFFIX}
+)
+
+# Add a cron script to warn root if a certificate is going to expire soon:
+mkdir -p $PKG1/etc/cron.daily
+zcat $CWD/certwatch.gz > $PKG1/etc/cron.daily/certwatch.new
+chmod 755 $PKG1/etc/cron.daily/certwatch.new
+
+mv $PKG1/etc/ssl/openssl.cnf $PKG1/etc/ssl/openssl.cnf.new
+
+( cd $PKG1
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+mv $PKG1/etc/ssl/man $PKG1/usr
+( cd $PKG1/usr/man/man1 ; mv passwd.1 ssl_passwd.1 )
+( cd $PKG1/usr/man/man3 ; mv rand.3 ssl_rand.3 )
+( cd $PKG1/usr/man/man3 ; mv err.3 ssl_err.3 )
+# Compress and symlink the man pages:
+if [ -d $PKG1/usr/man ]; then
+ ( cd $PKG1/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+cd $PKG1
+chmod 755 usr/lib${LIBDIRSUFFIX}/pkgconfig
+sed -i -e "s#lib\$#lib${LIBDIRSUFFIX}#" usr/lib${LIBDIRSUFFIX}/pkgconfig/*.pc
+mkdir -p install
+zcat $CWD/doinst.sh-openssl.gz > install/doinst.sh
+cat $CWD/slack-desc.openssl > install/slack-desc
+/sbin/makepkg -l y -c n $TMP/${NAME1}.txz
+
+# Make runtime package:
+mkdir -p $PKG2/lib${LIBDIRSUFFIX}
+( cd lib${LIBDIRSUFFIX} ; cp -a lib*.so.* $PKG2/lib${LIBDIRSUFFIX} )
+( cd $PKG2/lib${LIBDIRSUFFIX} ; ldconfig -l * )
+mkdir -p $PKG2/etc
+( cd $PKG2/etc ; cp -a $PKG1/etc/ssl . )
+mkdir -p $PKG2/usr/doc/openssl-$VERSION
+( cd $TMP/openssl-$VERSION
+ cp -a CHANGES CHANGES.SSLeay FAQ INSTALL INSTALL.MacOS INSTALL.VMS INSTALL.W32 \
+ LICENSE NEWS README README.ENGINE $PKG2/usr/doc/openssl-$VERSION
+)
+
+# If there's a CHANGES file, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r CHANGES ]; then
+ DOCSDIR=$(echo $PKG2/usr/doc/*-$VERSION)
+ cat CHANGES | head -n 2000 > $DOCSDIR/CHANGES
+ touch -r CHANGES $DOCSDIR/CHANGES
+fi
+
+find $PKG2/usr/doc/openssl-$VERSION -type d -exec chmod 755 {} \;
+find $PKG2/usr/doc/openssl-$VERSION -type f -exec chmod 644 {} \;
+cd $PKG2
+mkdir -p install
+zcat $CWD/doinst.sh-openssl-solibs.gz > install/doinst.sh
+cat $CWD/slack-desc.openssl-solibs > install/slack-desc
+/sbin/makepkg -l y -c n $TMP/${NAME2}.txz
diff --git a/patches/source/openssl/openssl0/slack-desc.openssl b/patches/source/openssl/openssl0/slack-desc.openssl
new file mode 100644
index 000000000..57227c043
--- /dev/null
+++ b/patches/source/openssl/openssl0/slack-desc.openssl
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+openssl: openssl (Secure Sockets Layer toolkit)
+openssl:
+openssl: The OpenSSL certificate management tool and the shared libraries that
+openssl: provide various encryption and decryption algorithms and protocols.
+openssl:
+openssl: This product includes software developed by the OpenSSL Project for
+openssl: use in the OpenSSL Toolkit (http://www.openssl.org). This product
+openssl: includes cryptographic software written by Eric Young
+openssl: (eay@cryptsoft.com). This product includes software written by Tim
+openssl: Hudson (tjh@cryptsoft.com).
+openssl:
diff --git a/patches/source/openssl/openssl0/slack-desc.openssl-solibs b/patches/source/openssl/openssl0/slack-desc.openssl-solibs
new file mode 100644
index 000000000..58609e68b
--- /dev/null
+++ b/patches/source/openssl/openssl0/slack-desc.openssl-solibs
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+openssl-solibs: openssl-solibs (OpenSSL shared libraries)
+openssl-solibs:
+openssl-solibs: These shared libraries provide encryption routines required by
+openssl-solibs: programs such as openssh, bind, sendmail, and many others.
+openssl-solibs:
+openssl-solibs: This product includes software developed by the OpenSSL Project for
+openssl-solibs: use in the OpenSSL Toolkit (http://www.openssl.org). This product
+openssl-solibs: includes cryptographic software written by Eric Young
+openssl-solibs: (eay@cryptsoft.com). This product includes software written by Tim
+openssl-solibs: Hudson (tjh@cryptsoft.com).
+openssl-solibs:
diff --git a/patches/source/openssl/slack-desc.openssl b/patches/source/openssl/slack-desc.openssl
new file mode 100644
index 000000000..57227c043
--- /dev/null
+++ b/patches/source/openssl/slack-desc.openssl
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+openssl: openssl (Secure Sockets Layer toolkit)
+openssl:
+openssl: The OpenSSL certificate management tool and the shared libraries that
+openssl: provide various encryption and decryption algorithms and protocols.
+openssl:
+openssl: This product includes software developed by the OpenSSL Project for
+openssl: use in the OpenSSL Toolkit (http://www.openssl.org). This product
+openssl: includes cryptographic software written by Eric Young
+openssl: (eay@cryptsoft.com). This product includes software written by Tim
+openssl: Hudson (tjh@cryptsoft.com).
+openssl:
diff --git a/patches/source/openssl/slack-desc.openssl-solibs b/patches/source/openssl/slack-desc.openssl-solibs
new file mode 100644
index 000000000..58609e68b
--- /dev/null
+++ b/patches/source/openssl/slack-desc.openssl-solibs
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+openssl-solibs: openssl-solibs (OpenSSL shared libraries)
+openssl-solibs:
+openssl-solibs: These shared libraries provide encryption routines required by
+openssl-solibs: programs such as openssh, bind, sendmail, and many others.
+openssl-solibs:
+openssl-solibs: This product includes software developed by the OpenSSL Project for
+openssl-solibs: use in the OpenSSL Toolkit (http://www.openssl.org). This product
+openssl-solibs: includes cryptographic software written by Eric Young
+openssl-solibs: (eay@cryptsoft.com). This product includes software written by Tim
+openssl-solibs: Hudson (tjh@cryptsoft.com).
+openssl-solibs:
diff --git a/patches/source/openvpn/README b/patches/source/openvpn/README
new file mode 100644
index 000000000..cf2c6602f
--- /dev/null
+++ b/patches/source/openvpn/README
@@ -0,0 +1,26 @@
+OpenVPN is a full-featured SSL VPN which can accomodate a wide
+range of configurations, including remote access, site-to-site VPNs,
+WiFi security, and enterprise-scale remote access with load
+balancing, failover, and fine-grained access-controls.
+
+OpenVPN implements OSI layer 2 or 3 secure network extension using the
+industry standard SSL/TLS protocol, supports flexible client
+authentication methods based on certificates, smart cards, and/or
+2-factor authentication, and allows user or group-specific access
+control policies using firewall rules applied to the VPN virtual
+interface.
+
+This build of OpenVPN depends upon having openssl (not just
+openssl-solibs) and lzo installed on your computer.
+
+Please note that there is no default config file for OpenVPN. This is
+by design. OpenVPN can technically use any config file in any location.
+However, this script does create an /etc/openvpn/ directory with certs/
+and keys/ subdirectories. Feel free to place config files, keys, and
+certificates in these directories. certs/ and keys/ are owned by user
+root and group nobody and are not world readable nor writable.
+Additionally, they are not writable by group nobody. It is recommended
+that you run openvpn nobody:nobody, but you may use another
+non-privilaged user and group at your option. Just change the
+permissions on these permissions to reflect that if you do.
+
diff --git a/patches/source/openvpn/doinst.sh b/patches/source/openvpn/doinst.sh
new file mode 100644
index 000000000..4b9b133a9
--- /dev/null
+++ b/patches/source/openvpn/doinst.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname ${NEW})/$(basename ${NEW} .new)"
+ if [ -e ${OLD} ]; then
+ cp -a ${OLD} ${NEW}.incoming
+ cat ${NEW} > ${NEW}.incoming
+ mv ${NEW}.incoming ${NEW}
+ fi
+ config ${NEW}
+}
+
+preserve_perms etc/rc.d/rc.openvpn.new
+
diff --git a/patches/source/openvpn/openvpn.SlackBuild b/patches/source/openvpn/openvpn.SlackBuild
new file mode 100755
index 000000000..646537993
--- /dev/null
+++ b/patches/source/openvpn/openvpn.SlackBuild
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# Copyright 2006, Alan Hicks, Lizella, GA
+# Copyright 2008, 2009, 2010, 2011, 2013, 2016, 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PKGNAM=openvpn
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
+cd $PKGNAM-$VERSION || exit 1
+
+# Fix ownership and permissions inside the source tarball.
+# It's appalling how many projects have 777 permissions or
+# even suid, sgid, and sticky bits set on things.
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc/openvpn \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/openvpn-${VERSION} \
+ --enable-lzo \
+ --enable-iproute2 \
+ --disable-plugin-auth-pam \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install-strip DESTDIR=$PKG || exit 1
+
+# Create a decent config directory. openvpn doesn't have one by
+# default, nor does it have a single config file.
+mkdir -p $PKG/etc/openvpn/{certs,keys}
+chown root:nobody $PKG/etc/openvpn/{certs,keys}
+chmod 750 $PKG/etc/openvpn/{certs,keys}
+
+# Install a startup script:
+mkdir -p $PKG/etc/rc.d
+cp -a $CWD/rc.openvpn $PKG/etc/rc.d/rc.openvpn.new
+chmod 644 $PKG/etc/rc.d/rc.openvpn.new
+chown root:root $PKG/etc/rc.d/rc.openvpn.new
+
+# Let folks know about the other configs, if they haven't found them.
+# They might even find the documentation there useful. ;-)
+cat << EOF > $PKG/etc/openvpn/README.TXT
+One or more OpenVPN config files should be installed in this directory
+as files ending in ".conf" (i.e. client.conf, server.conf, etc.).
+
+Have a look in sample-config-files for some more examples of how to
+configure OpenVPN.
+
+To start OpenVPN, use this command as root:
+sh /etc/rc.d/rc.openvpn start
+
+To make OpenVPN start automatically at boot, change the script permissions:
+chmod 755 /etc/rc.d/rc.openvpn
+
+See "man openvpn" and the other docs for more information.
+EOF
+
+# Add a link, too:
+( cd $PKG/etc/openvpn
+ ln -sf /usr/doc/$PKGNAM-$VERSION/sample-config-files .
+)
+
+if [ -d $PKG/usr/man ]; then
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $(find . -type l) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
+fi
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a AUTHORS COPYING* COPYRIGHT* INSTALL* \
+ NEWS PORTS README* sample/sample-config-files sample/sample-keys sample/sample-scripts \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# Install a reasonably generic sample config file:
+# (put this in with the other samples)
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION/sample-config-files
+cp -a $CWD/slackware.conf $PKG/usr/doc/$PKGNAM-$VERSION/sample-config-files
+chown root:root $PKG/usr/doc/$PKGNAM-$VERSION/sample-config-files/slackware.conf
+chmod 644 $PKG/usr/doc/$PKGNAM-$VERSION/sample-config-files/slackware.conf
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/openvpn/openvpn.url b/patches/source/openvpn/openvpn.url
new file mode 100644
index 000000000..4c476d874
--- /dev/null
+++ b/patches/source/openvpn/openvpn.url
@@ -0,0 +1,2 @@
+https://swupdate.openvpn.org/community/releases/openvpn-2.4.6.tar.xz
+https://swupdate.openvpn.org/community/releases/openvpn-2.4.6.tar.xz.asc
diff --git a/patches/source/openvpn/rc.openvpn b/patches/source/openvpn/rc.openvpn
new file mode 100644
index 000000000..86f319225
--- /dev/null
+++ b/patches/source/openvpn/rc.openvpn
@@ -0,0 +1,111 @@
+#!/bin/sh
+#
+# /etc/rc.d/rc.openvpn
+#
+# Start/stop/restart the openvpn daemon.
+#
+# By default, this script will start/stop/restart a daemon for every *.conf
+# file found in /etc/openvpn.
+#
+# To work with a single connection, add the name of the config file:
+# /etc/rc.d/rc.openvpn start configfile.conf
+#
+# You may also use a config file not found in /etc/openvpn by providing a
+# complete path:
+# /etc/rc.d/rc.openvpn start /path/to/some/other/configfile.conf
+#
+# The name of a config file provided with a complete path should not match
+# the name of any config file present in the /etc/openvpn directory.
+
+ovpn_start() {
+ if [ -x /usr/sbin/openvpn ]; then
+ if [ -z "$1" ]; then # start OpenVPN for all config files:
+ if /bin/ls /etc/openvpn/*.conf 1> /dev/null 2> /dev/null ; then
+ for config in /etc/openvpn/*.conf ; do
+ echo "Starting OpenVPN: /usr/sbin/openvpn --daemon --writepid /run/openvpn/$(basename $config).pid --user nobody --group nobody --config $config"
+ /usr/sbin/openvpn --daemon --writepid /run/openvpn/$(basename $config).pid --user nobody --group nobody --config $config
+ done
+ else
+ echo "Unable to start OpenVPN - no .conf files found in /etc/openvpn/."
+ fi
+ else # start OpenVPN for one config file:
+ if [ -r "$1" ]; then
+ echo "Starting OpenVPN: /usr/sbin/openvpn --daemon --writepid /run/openvpn/$(basename $1).pid --user nobody --group nobody --config $1"
+ /usr/sbin/openvpn --daemon --writepid /run/openvpn/$(basename $1).pid --user nobody --group nobody --config $1
+ else # config file is missing:
+ echo "Error starting OpenVPN: config file $1 is missing."
+ fi
+ fi
+ fi
+}
+
+ovpn_stop() {
+ # Note: OpenVPN has a bad habit of leaving stale pid files around when exiting.
+ # Maybe it would be better to just use killall unless called for one config?
+ if [ -z "$1" ]; then # stop OpenVPN for all pid files:
+ if /bin/ls /run/openvpn/*.pid 1> /dev/null 2> /dev/null ; then
+ for pid in /run/openvpn/*.pid ; do
+ echo "Stopping OpenVPN for pid file $pid..."
+ kill $(cat $pid)
+ rm -f $pid
+ done
+ else
+ echo "Warning: no pid files found in /run/openvpn/. Using killall to stop any OpenVPN processes."
+ killall openvpn
+ fi
+ else # stop OpenVPN for one config file:
+ if [ -r /run/openvpn/$(basename ${1}).pid ]; then
+ echo "Stopping OpenVPN for config file ${1}..."
+ kill $(cat /run/openvpn/$(basename ${1}).pid)
+ rm -f /run/openvpn/$(basename ${1}).pid
+ else
+ echo "Error stopping OpenVPN: no such pid file /run/openvpn/$(basename ${1}).pid"
+ fi
+ fi
+}
+
+ovpn_restart() {
+ if [ ! -z "$1" ]; then # restart for all config files:
+ ovpn_stop
+ sleep 2
+ ovpn_start
+ else # restart for one config file only:
+ ovpn_stop $1
+ sleep 2
+ ovpn_start $1
+ fi
+}
+
+ovpn_status() {
+ if /bin/ls /run/openvpn/*.pid 1> /dev/null 2> /dev/null ; then
+ echo "Currently running OpenVPN processes according to .pid files in /run/openvpn:"
+ for pid in /run/openvpn/*.pid ; do
+ echo " $(basename $pid) ($(cat $pid))"
+ done
+ else
+ echo "No .pid files found in /run/openvpn."
+ fi
+}
+
+# Create PID directory if it doesn't exist:
+if [ ! -d /run/openvpn ]; then
+ mkdir -p /run/openvpn
+fi
+
+case "$1" in
+'start')
+ ovpn_start $2
+ ;;
+'stop')
+ ovpn_stop $2
+ ;;
+'restart')
+ ovpn_restart $2
+ ;;
+'status')
+ ovpn_status
+ ;;
+*)
+ echo "Usage: $0 {start|stop|restart}"
+esac
+
diff --git a/patches/source/openvpn/slack-desc b/patches/source/openvpn/slack-desc
new file mode 100644
index 000000000..7ffd6167d
--- /dev/null
+++ b/patches/source/openvpn/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+openvpn: openvpn (secure IP tunnel daemon)
+openvpn:
+openvpn: OpenVPN is a full-featured SSL VPN which can accommodate a wide range
+openvpn: of configurations, including remote access, site-to-site VPNs, WiFi
+openvpn: security, and enterprise-scale remote access with load balancing,
+openvpn: failover, and fine-grained access-controls.
+openvpn:
+openvpn: OpenVPN's home on the net is: http://openvpn.net
+openvpn:
+openvpn:
+openvpn:
diff --git a/patches/source/openvpn/slackware.conf b/patches/source/openvpn/slackware.conf
new file mode 100644
index 000000000..4314b5441
--- /dev/null
+++ b/patches/source/openvpn/slackware.conf
@@ -0,0 +1,178 @@
+# openvpn.conf.sample
+#
+# This is a sample configuration file for OpenVPN.
+# Not all options are listed here; you can find good documentation
+# about all of the options in OpenVPN's manual page - openvpn(8).
+#
+# You can make a P-t-P connection by creating a shared key,
+# copying this key to other hosts in your network, and changing
+# the IP addresses in this file.
+#
+# Commented options are provided for some typical configurations
+
+# Change the "search" path to /etc/openvpn
+# All files referenced in this configuration will be relative to
+# whatever directory is specified here - we default to /etc/openvpn
+cd /etc/openvpn
+
+# If running as a server, which local IP address should OpenVPN
+# listen on? Specify this as either a hostname or IP address. If
+# this is left blank, OpenVPN will default to listening on all
+# interfaces.
+#local a.b.c.d
+
+# This option defines the IP or DNS name of the other side of your VPN
+# connection. This option is needed if you are making client or P-t-P
+# connections. If you are the server, use "local" instead. This may
+# be specified as a domain name or IP address.
+#remote vpn.server.org
+
+# This option defins the protocol to use. Valid options are:
+# udp, tcp-server, or tcp-client. Default is udp, and generally
+# speaking, tcp is a bad idea.
+proto udp
+
+# This option defines the port on which your server will be listening
+# or trying to connect. The default is 1194
+port 1194
+
+# This option defines whether to use LZO compression.
+# If enabled, it must be enabled at both ends of the VPN connection.
+#comp-lzo
+
+# Debug level (default 1)
+#verb 3
+
+# VPN logfile location
+# If you don't specify a location here, logging will be done through
+# syslogd and write to /var/log/messages
+log-append /var/log/openvpn.log
+
+# If you want to use OpenVPN as a daemon, uncomment this line.
+# Generally speaking, servers should run OpenVPN as a daemon
+# and clients should not.
+#daemon
+
+# Device type to use, you can choose between tun or tap.
+# TUN is the most common option. If you have multiple connections,
+# it is a good idea to bind each connection to a separate TUN/TAP
+# interface using tunX/tapX, where X is the number of each interface.
+dev tun
+
+# This option prevents OpenVPN from closing and re-opening the tun/tap
+# device every time it receives a SIGUSR1 signal
+#persist-tun
+
+# This is similar to the previous option, but it prevents OpenVPN from
+# re-reading the key files every time
+#persist-key
+
+# If you are using a client-server architecture, you need to specify the
+# role of your computer in your VPN network. To use one of these options,
+# you need to configure TLS options too.
+#
+# To use the "server" option, you must specify a network subnet such
+# as 172.16.1.0 255.255.255.0. The first number is the network, the
+# second is the netmask. OpenVPN will take the first available IP
+# for itself (in our example, 172.16.1.1) and the rest will be
+# given to connecting clients dynamically.
+#
+# Leave these commented out if you are using OpenVPN in bridging mode.
+#
+#server 10.1.2.0 255.255.255.0
+#client
+
+# This option defines a file with IP address to client mapping.
+# This is useful in general, and necessary if clients use persist-tun.
+#ifconfig-pool-persist ips.txt
+
+# Enable this option if you want clients connected to this VPN to be
+# able to talk directly to each other
+#client-to-client
+
+# This option defines the directory in which configuration files for clients
+# will reside. With individual files you can make each client get different
+# options using "push" parameters
+#client-config-dir ccd
+
+# If you are using P-t-P, you need to specify the IP addresses at both ends
+# of your VPN connection. The IP addresses are reversed at the other side.
+#
+# You can use this to specify client IP addresses in ccd files (on server)
+# or directly in client configuration
+#ifconfig 10.1.2.1 10.1.2.2
+
+# You can set routes to specific networks. In the sample below, "vpn_gateway"
+# is an internal OpenVPN alias to your VPN gateway - leave it as is.
+# This will enable you to talk with the networks behind your VPN server.
+# Multiple routes can be specified.
+#
+# +------------+ <eth>-<tun> <tun>-<eth> +------------+
+# | Network1 |---| VPN1 |--[10.1.2.0/24]--| VPN2 |---| Network2 |
+# +------------+ +------+ +------+ +------------+
+# 192.168.0.0/24 192.168.2.0/24
+#
+# The sample below shows how VPN1 server can reach Network2
+#route 192.168.2.0 255.255.255.0 vpn_gateway
+
+# You can send clients many network configuration options using the
+# "push" directive and sending commands.
+# Multiple "push" directives can be used. You should only put global
+# "push" directives here. You can "push" different options to
+# different clients in per-client configuration files. See
+# "client-config-dir" above.
+#
+# Using the same network configuration that you see above, the route statment
+# here allows VPN2 to reach Network1
+#push "route-delay 2 600"
+#push "route 192.168.2.0 255.255.255.0 vpn_gateway"
+#push "persist-key"
+
+# This option sets the encryption algorithm to use in the VPN connection.
+# Available options are:
+# DES-CBC, RC2-CBC, DES-EDE-CBC, DES-EDE3-CBC,
+# DESX-CBC, BF-CBC, RC2-40-CBC, CAST5-CBC,
+# RC2-64-CBC, AES-128-CBC, AES-192-CBC and AES-256-CBC
+cipher BF-CBC
+
+# Shared Key Connection
+# ---------------------
+# Secret is one shared key between the hosts that want to connect through VPNs.
+# Without secret or TLS options, your data will not be encrypted.
+#
+# To generate an encryption key do:
+# openvpn --genkey --secret /etc/openvpn/keys/shared.key
+#
+# Do the above on one host and copy it to the others
+secret keys/shared.key
+
+# TLS Connections
+# ---------------
+# TLS must be used if you use option "server" or "client"
+# The basic idea there is: You have one Certificate Authority, and all
+# machines in your VPN network need to have individual certificates and
+# keys signed by Certificate Authority. This means each client can
+# have its own key, making it easier to revoke a key without copying
+# a shared secret key to every client.
+#
+# Inside the /usr/doc/openvpn-$VERSION documentation directory, you can
+# find "easy-rsa" scripts to make certificate and key management easier.
+
+# Certificate Authority file
+# This file must be identical on all hosts that connect to your VPN
+#ca certs/ca.crt
+
+# If you are the server, you need to specify some Diffie Hellman parameters.
+# OpenVPN provides some sample .pem files in documentation directory
+#dh my-dh.pem
+
+# Certificate and Key signed by Certificate Authority
+# Each machine needs to have their own unique certificate
+#cert certs/machine.cert
+#key keys/machine.key
+
+# To prevent some DoS attacks we can add another authentication layer in the
+# TLS control channel. This needs to be enabled at both ends to work
+# client uses the value 1; server uses the value 0
+#tls-auth keys/shared.key 0
+
diff --git a/patches/source/patch/0001-Refuse-to-apply-ed-scripts-by-default.patch b/patches/source/patch/0001-Refuse-to-apply-ed-scripts-by-default.patch
new file mode 100644
index 000000000..c82574790
--- /dev/null
+++ b/patches/source/patch/0001-Refuse-to-apply-ed-scripts-by-default.patch
@@ -0,0 +1,178 @@
+From 5046e5605cf7420d9a11de49bd9fe4851a4ca1d2 Mon Sep 17 00:00:00 2001
+From: Saleem Rashid <dev@saleemrashid.com>
+Date: Thu, 5 Apr 2018 22:48:25 +0100
+Subject: [PATCH] Refuse to apply ed scripts by default
+
+* src/patch.c, src/pch.c: Warn that ed scripts are potentially
+dangerous, unless patch is invoked with --force
+* tests/dangerous-ed-scripts: New test case
+* tests/crlf-handling, tests/need-filename: Add -f to patch invokation to
+avoid ed scripts warning
+
+This fixes an issue where ed scripts could be included in a patch, executing
+arbitrary shell commands without the user's knowledge.
+
+Original bug report:
+https://savannah.gnu.org/bugs/index.php?53566
+---
+ src/patch.c | 13 +++++++++++--
+ src/pch.c | 11 +++++++++++
+ tests/Makefile.am | 1 +
+ tests/crlf-handling | 4 ++--
+ tests/dangerous-ed-scripts | 36 ++++++++++++++++++++++++++++++++++++
+ tests/need-filename | 2 +-
+ 6 files changed, 62 insertions(+), 5 deletions(-)
+ create mode 100644 tests/dangerous-ed-scripts
+
+diff --git a/src/patch.c b/src/patch.c
+index 0fe6d72..e14a9c4 100644
+--- a/src/patch.c
++++ b/src/patch.c
+@@ -781,7 +781,7 @@ static char const *const option_help[] =
+ " -l --ignore-whitespace Ignore white space changes between patch and input.",
+ "",
+ " -c --context Interpret the patch as a context difference.",
+-" -e --ed Interpret the patch as an ed script.",
++" -e --ed Interpret the patch as a potentially dangerous ed script. This could allow arbitrary command execution!",
+ " -n --normal Interpret the patch as a normal difference.",
+ " -u --unified Interpret the patch as a unified difference.",
+ "",
+@@ -825,7 +825,7 @@ static char const *const option_help[] =
+ "Miscellaneous options:",
+ "",
+ " -t --batch Ask no questions; skip bad-Prereq patches; assume reversed.",
+-" -f --force Like -t, but ignore bad-Prereq patches, and assume unreversed.",
++" -f --force Like -t, but ignore bad-Prereq patches, apply potentially dangerous ed scripts, and assume unreversed.",
+ " -s --quiet --silent Work silently unless an error occurs.",
+ " --verbose Output extra information about the work being done.",
+ " --dry-run Do not actually change any files; just print what would happen.",
+@@ -1068,6 +1068,15 @@ get_some_switches (void)
+ }
+ }
+
++ if (! force && diff_type == ED_DIFF)
++ {
++ ask ("Apply potentially dangerous ed script? This could allow arbitrary command execution! [n] ");
++ if (*buf != 'y')
++ {
++ fatal ("Refusing to apply potentially dangerous ed script.");
++ }
++ }
++
+ /* Process any filename args. */
+ if (optind < Argc)
+ {
+diff --git a/src/pch.c b/src/pch.c
+index bc6278c..ab34dd4 100644
+--- a/src/pch.c
++++ b/src/pch.c
+@@ -1001,6 +1001,17 @@ intuit_diff_type (bool need_header, mode_t *p_file_type)
+ instat = st[i];
+ }
+
++ if (! force && retval == ED_DIFF)
++ {
++ ask ("Apply potentially dangerous ed script? This could allow arbitrary command execution! [n] ");
++ if (*buf != 'y')
++ {
++ if (verbosity != SILENT)
++ say ("Skipping potentially dangerous ed script.\n");
++ skip_rest_of_patch = true;
++ }
++ }
++
+ return retval;
+ }
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 6b6df63..d888804 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -30,6 +30,7 @@ TESTS = \
+ create-directory \
+ criss-cross \
+ crlf-handling \
++ dangerous-ed-scripts \
+ dash-o-append \
+ deep-directories \
+ empty-files \
+diff --git a/tests/crlf-handling b/tests/crlf-handling
+index c192cac..f9e654e 100644
+--- a/tests/crlf-handling
++++ b/tests/crlf-handling
+@@ -46,7 +46,7 @@ if ! have_ed ; then
+ else
+ diff -e a b > ab.ed | lf2crlf > ab.ed
+ echo 1 > c
+- ncheck 'patch c < ab.ed'
++ ncheck 'patch -f c < ab.ed'
+ fi
+
+ # ==============================================================
+@@ -95,7 +95,7 @@ if ! have_ed ; then
+ else
+ diff -e a b > ab.diff
+ cp a c
+- ncheck 'patch c < ab.diff'
++ ncheck 'patch -f c < ab.diff'
+ fi
+
+ check 'cat -ve c' <<EOF
+diff --git a/tests/dangerous-ed-scripts b/tests/dangerous-ed-scripts
+new file mode 100644
+index 0000000..3465d4e
+--- /dev/null
++++ b/tests/dangerous-ed-scripts
+@@ -0,0 +1,36 @@
++# Copyright (C) 2018 Free Software Foundation, Inc.
++#
++# Copying and distribution of this file, with or without modification,
++# in any medium, are permitted without royalty provided the copyright
++# notice and this notice are preserved.
++
++. $srcdir/test-lib.sh
++
++require cat
++use_local_patch
++use_tmpdir
++
++# ==============================================================
++# Test for arbitrary command execution found in CVE-2018-0492 patch.
++# GNU patch bug report can be found at http://savannah.gnu.org/bugs/index.php?53566
++
++cat > beep.patch <<EOF
++--- /dev/null 2018-13-37 13:37:37.000000000 +0100
+++++ b/beep.c 2018-13-37 13:38:38.000000000 +0100
++1337a
++1,112d
++!id>~/pwn.lol;beep # 13-21 12:53:21.000000000 +0100
++.
++EOF
++
++check 'patch < beep.patch; echo "Status: $?"' <<EOF
++Apply potentially dangerous ed script? This could allow arbitrary command execution! [n]
++Skipping potentially dangerous ed script.
++Status: 1
++EOF
++
++check 'patch -e; echo "Status: $?"' <<EOF
++Apply potentially dangerous ed script? This could allow arbitrary command execution! [n] $PATCH: **** Refusing to apply potentially dangerous ed script.
++
++Status: 2
++EOF
+diff --git a/tests/need-filename b/tests/need-filename
+index 8b92848..c15951f 100644
+--- a/tests/need-filename
++++ b/tests/need-filename
+@@ -61,7 +61,7 @@ EOF
+
+ rm -f f
+ touch f
+- ncheck 'patch f < e.diff'
++ ncheck 'patch -f f < e.diff'
+
+ check 'cat f' <<EOF
+ one
+--
+2.16.3
+
diff --git a/patches/source/patch/patch.SlackBuild b/patches/source/patch/patch.SlackBuild
new file mode 100755
index 000000000..a017edb00
--- /dev/null
+++ b/patches/source/patch/patch.SlackBuild
@@ -0,0 +1,131 @@
+#!/bin/sh
+
+# Copyright 2005-2009, 2010, 2012, 2015, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PKGNAM=patch
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-patch
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
+cd $TMP
+rm -rf patch-${VERSION}
+tar xvf $CWD/patch-${VERSION}.tar.?z || exit 1
+cd patch-${VERSION} || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Patch CVE-2018-1000156, arbitrary shell command execution by (obsolete)
+# ed patch format:
+zcat $CWD/0001-Refuse-to-apply-ed-scripts-by-default.patch.gz | patch -p1 --verbose || exit 1
+
+# This avoids failure in tests/ expecting an old automake:
+autoreconf -vif
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --mandir=/usr/man \
+ --build=$ARCH-slackware-linux || exit 1
+
+make -j4 || make || exit 1
+make install DESTDIR=$PKG
+
+# Strip everything for good measure:
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Compress and if needed symlink the man pages:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+mkdir -p $PKG/usr/doc/patch-${VERSION}
+cp -a \
+ AUTHORS COPYING* NEWS README* \
+ $PKG/usr/doc/patch-${VERSION}
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+makepkg -l y -c n $TMP/patch-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/patch/slack-desc b/patches/source/patch/slack-desc
new file mode 100644
index 000000000..4603b7156
--- /dev/null
+++ b/patches/source/patch/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+patch: patch (apply a diff file to an original file or files)
+patch:
+patch: Patch is a utility used to apply diffs (or patches) to files, which
+patch: are usually source code.
+patch:
+patch: Larry Wall wrote the original version of patch. Paul Eggert removed
+patch: patch's arbitrary limits; added support for binary files, setting
+patch: file times, and deleting files; and made it conform better to POSIX.
+patch: Other contributors include Wayne Davison, who added unidiff support,
+patch: and David MacKenzie, who added configuration and backup support.
+patch:
diff --git a/patches/source/pcre/pcre.SlackBuild b/patches/source/pcre/pcre.SlackBuild
new file mode 100755
index 000000000..0d90de107
--- /dev/null
+++ b/patches/source/pcre/pcre.SlackBuild
@@ -0,0 +1,149 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2013, 2014, 2015, 2016 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=pcre
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-pcre
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf pcre-$VERSION
+tar xvf $CWD/pcre-$VERSION.tar.?z* || exit 1
+cd pcre-$VERSION
+
+chown -R root:root .
+
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --enable-utf8 \
+ --enable-pcre16 \
+ --enable-pcre32 \
+ --enable-jit \
+ --enable-unicode-properties \
+ --enable-pcregrep-libz \
+ --enable-pcregrep-libbz2 \
+ --disable-static \
+ --build=$ARCH-slackware-linux || exit 1
+
+CFLAGS="$SLKCFLAGS" make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/libpcre.so.* \
+ $PKG/usr/lib${LIBDIRSUFFIX}/libpcreposix.so.*
+
+# Move libraries, as they might be needed before /usr is available:
+mkdir $PKG/lib${LIBDIRSUFFIX}
+( cd $PKG/usr/lib${LIBDIRSUFFIX}
+ for file in lib*.so.?.* ; do
+ mv $file ../../lib${LIBDIRSUFFIX}
+ ln -sf ../../lib${LIBDIRSUFFIX}/$file .
+ done
+ cp -a lib*.so.? ../../lib${LIBDIRSUFFIX}
+)
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs strip -g 2> /dev/null
+)
+
+# Compress and if needed symlink the man pages:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# Eliminate redundant docs:
+rm -rf $PKG/usr/share/doc
+rmdir $PKG/usr/share
+
+mkdir -p $PKG/usr/doc/pcre-$VERSION
+cp -a \
+ AUTHORS COPYING* INSTALL HACKING LICENCE NEWS NON-UNIX-USE README* \
+ $PKG/usr/doc/pcre-$VERSION
+( cd doc ; cp -a Tech.Notes html $PKG/usr/doc/pcre-$VERSION )
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/pcre-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/pcre/slack-desc b/patches/source/pcre/slack-desc
new file mode 100644
index 000000000..644734e9e
--- /dev/null
+++ b/patches/source/pcre/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+pcre: pcre (Perl-compatible regular expression library)
+pcre:
+pcre: The PCRE library is a set of functions that implement regular
+pcre: expression pattern matching using the same syntax and semantics as
+pcre: Perl 5, with just a few differences (documented in the man page).
+pcre:
+pcre:
+pcre:
+pcre:
+pcre:
+pcre:
diff --git a/patches/source/php/doinst.sh b/patches/source/php/doinst.sh
new file mode 100644
index 000000000..2af731e95
--- /dev/null
+++ b/patches/source/php/doinst.sh
@@ -0,0 +1,28 @@
+if [ ! -r etc/httpd/mod_php.conf ]; then
+ cp -a etc/httpd/mod_php.conf.example etc/httpd/mod_php.conf
+elif [ "`cat etc/httpd/mod_php.conf 2> /dev/null`" = "" ]; then
+ cp -a etc/httpd/mod_php.conf.example etc/httpd/mod_php.conf
+fi
+
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+# Keep same perms on rc.php-fpm.new:
+if [ -e etc/rc.d/rc.php-fpm ]; then
+ cp -a etc/rc.d/rc.php-fpm etc/rc.d/rc.php-fpm.new.incoming
+ cat etc/rc.d/rc.php-fpm.new > etc/rc.d/rc.php-fpm.new.incoming
+ mv etc/rc.d/rc.php-fpm.new.incoming etc/rc.d/rc.php-fpm.new
+fi
+config etc/rc.d/rc.php-fpm.new
+cp -a etc/httpd/php.ini-production etc/httpd/php.ini.new
+config etc/httpd/php.ini.new
+cp -a etc/php-fpm.conf.default etc/php-fpm.conf.new
+config etc/php-fpm.conf.new
diff --git a/patches/source/php/fetch-php.sh b/patches/source/php/fetch-php.sh
new file mode 100755
index 000000000..19c45c74b
--- /dev/null
+++ b/patches/source/php/fetch-php.sh
@@ -0,0 +1,2 @@
+lftpget http://us.php.net/distributions/php-5.6.36.tar.xz.asc
+lftpget http://us.php.net/distributions/php-5.6.36.tar.xz
diff --git a/patches/source/php/mod_php.conf.example b/patches/source/php/mod_php.conf.example
new file mode 100644
index 000000000..670eb7135
--- /dev/null
+++ b/patches/source/php/mod_php.conf.example
@@ -0,0 +1,29 @@
+#
+# mod_php - PHP Hypertext Preprocessor module
+#
+
+# Load the PHP module:
+LoadModule php5_module lib/httpd/modules/libphp5.so
+
+# Tell Apache to feed all *.php files through PHP. If you'd like to
+# parse PHP embedded in files with different extensions, comment out
+# these lines and see the example below.
+<FilesMatch \.php$>
+ SetHandler application/x-httpd-php
+</FilesMatch>
+
+# Tell Apache to feed all *.php, *.html, and *.htm files through
+# the PHP module. Add or subtract extensions here as desired. Please
+# note that running pages through PHP for no reason can be both slow
+# and insecure, so be sure to know what you're doing. It's a convenient
+# shortcut, but probably isn't suitible for high-traffic sites if you
+# write any of your pages in straight HTML.
+#<FilesMatch "\.(php|html|htm)$">
+# SetHandler application/x-httpd-php
+#</FilesMatch>
+
+# This will display PHP files in colored syntax form. Use with caution.
+#<FilesMatch "\.phps$">
+# SetHandler application/x-httpd-php-source
+#</FilesMatch>
+
diff --git a/patches/source/php/php-fpm.conf.diff b/patches/source/php/php-fpm.conf.diff
new file mode 100644
index 000000000..38d0f9c6e
--- /dev/null
+++ b/patches/source/php/php-fpm.conf.diff
@@ -0,0 +1,28 @@
+--- ./sapi/fpm/php-fpm.conf.in.orig 2012-05-20 19:47:53.000000000 +0200
++++ ./sapi/fpm/php-fpm.conf.in 2012-05-21 09:16:32.646276661 +0200
+@@ -12,7 +12,7 @@
+ ; Relative path can also be used. They will be prefixed by:
+ ; - the global prefix if it's been set (-p arguement)
+ ; - @prefix@ otherwise
+-;include=etc/fpm.d/*.conf
++;include=etc/php-fpm.d/*.conf
+
+ ;;;;;;;;;;;;;;;;;;
+ ; Global Options ;
+@@ -22,14 +22,14 @@
+ ; Pid file
+ ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
+ ; Default Value: none
+-;pid = run/php-fpm.pid
++pid = run/php-fpm.pid
+
+ ; Error log file
+ ; If it's set to "syslog", log is sent to syslogd instead of being written
+ ; in a local file.
+ ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
+ ; Default Value: log/php-fpm.log
+-;error_log = log/php-fpm.log
++error_log = log/php-fpm.log
+
+ ; syslog_facility is used to specify what type of program is logging the
+ ; message. This lets syslogd specify that messages from different facilities
diff --git a/patches/source/php/php.SlackBuild b/patches/source/php/php.SlackBuild
new file mode 100755
index 000000000..961a8e814
--- /dev/null
+++ b/patches/source/php/php.SlackBuild
@@ -0,0 +1,311 @@
+#!/bin/sh
+
+# Build and package mod_php on Slackware.
+# by: David Cantrell <david@slackware.com>
+# Modified for PHP 4-5 by volkerdi@slackware.com
+# Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2015, 2016 Patrick Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+VERSION=${VERSION:-$(echo php-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+ALPINE=2.11
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-php/
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+# we need to compile alpine to get c-client.a for IMAP support:
+IMAPLIBDIR=/usr/local/lib${LIBDIRSUFFIX}/c-client
+if [ -r $IMAPLIBDIR/lib${LIBDIRSUFFIX}/c-client.a ]; then
+ echo "Using IMAP library:"
+ ls -l $IMAPLIBDIR/lib${LIBDIRSUFFIX}/c-client.a
+ sleep 5
+else
+ ( cd $CWD/../alpine ; ./alpine.SlackBuild || exit 1 ) || exit 1
+ ( cd $TMP/alpine-${ALPINE}/imap/c-client
+ strip -g c-client.a
+ mkdir -p $IMAPLIBDIR/lib${LIBDIRSUFFIX}
+ cp c-client.a $IMAPLIBDIR/lib${LIBDIRSUFFIX}
+ mkdir -p $IMAPLIBDIR/include
+ cp *.h $IMAPLIBDIR/include
+ )
+fi
+
+mkdir -p $PKG/etc/httpd
+mkdir -p $PKG/etc/php
+# A trick from DaMouse to enable building php into $PKG.
+# We'll remove this later on.
+cat /etc/httpd/original/httpd.conf > $PKG/etc/httpd/httpd.conf
+if [ ! -e /etc/httpd/original/httpd.conf ]; then
+ echo "FATAL: no /etc/httpd/original/httpd.conf found."
+ exit 1
+fi
+
+cd $TMP
+rm -rf php-$VERSION
+tar xvf $CWD/php-$VERSION.tar.xz || exit 1
+cd php-$VERSION
+
+# cleanup:
+find . -name "*.orig" -delete
+
+# Add missing(?) PEAR modules back:
+if [ -d php-$VERSION/pear/packages ]; then
+ ( cd php-$VERSION/pear/packages
+ cp -a $CWD/pear/*.bz2 . 2> /dev/null
+ bzip2 -d *.bz2 2> /dev/null
+ )
+fi
+
+if [ "$ARCH" = "s390" ]; then
+ zcat $CWD/php.configure.s390.diff.gz | patch -p1 || exit
+fi
+
+# Fixup perms/owners:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+find . -name "*.h" -exec chmod 644 {} \;
+
+# Sometimes they ship a few of these:
+find . -name "*.orig" -exec rm {} \;
+
+# Patch ini files:
+zcat $CWD/php.ini-development.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/php.ini-development.diff.gz | patch -p1 --verbose php.ini-production || exit 1
+zcat $CWD/php-fpm.conf.diff.gz | patch -p1 --verbose || exit 1
+
+# Install the build folder into /usr/lib$LIBDIRSUFFIX/php/build
+# and adapt phpize accordingly:
+sed -i "s|build$|php/build|" scripts/Makefile.frag
+sed -i "s|build\"$|php/build\"|" scripts/phpize.in
+
+# Generic "kitchen sink" configure function, with as many things as possible (and
+# maybe then some ;-) compiled as shared extensions:
+EXTENSION_DIR=/usr/lib${LIBDIRSUFFIX}/php/extensions \
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --with-libdir=lib${LIBDIRSUFFIX} \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --datarootdir=/usr/share \
+ --datadir=/usr/share \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --with-apxs2=/usr/bin/apxs \
+ --enable-fpm \
+ --with-fpm-user=apache \
+ --with-fpm-group=apache \
+ --enable-maintainer-zts \
+ --enable-pcntl \
+ --enable-mbregex \
+ --enable-tokenizer=shared \
+ --with-config-file-scan-dir=/etc/php \
+ --with-config-file-path=/etc/httpd \
+ --enable-mod_charset \
+ --with-layout=PHP \
+ --disable-sigchild \
+ --enable-xml \
+ --with-libxml-dir=/usr \
+ --enable-simplexml \
+ --enable-xmlreader=shared \
+ --enable-dom=shared \
+ --enable-filter \
+ --disable-debug \
+ --with-openssl=shared \
+ --with-pcre-regex=/usr \
+ --with-zlib=shared,/usr \
+ --enable-bcmath=shared \
+ --with-bz2=shared,/usr \
+ --enable-calendar=shared \
+ --enable-ctype=shared \
+ --with-curl=shared \
+ --with-mcrypt=/usr \
+ --enable-dba=shared \
+ --with-gdbm=/usr \
+ --with-db4=/usr \
+ --enable-exif=shared \
+ --enable-ftp=shared \
+ --with-gd=shared \
+ --with-jpeg-dir=/usr \
+ --with-png-dir=/usr \
+ --with-zlib-dir=/usr \
+ --with-xpm-dir=/usr \
+ --with-freetype-dir=/usr \
+ --with-t1lib=/usr \
+ --enable-gd-native-ttf \
+ --with-gettext=shared,/usr \
+ --with-gmp=shared,/usr \
+ --with-iconv=shared \
+ --with-imap-ssl=/usr \
+ --with-imap=$IMAPLIBDIR \
+ --with-ldap=shared \
+ --enable-mbstring=shared \
+ --enable-hash \
+ --with-mysql=shared,mysqlnd \
+ --with-mysqli=shared,mysqlnd \
+ --with-mysql-sock=/var/run/mysql/mysql.sock \
+ --with-iodbc=shared,/usr \
+ --enable-pdo=shared \
+ --with-pdo-mysql=shared,mysqlnd \
+ --with-pdo-sqlite=shared,/usr \
+ --with-pdo-odbc=shared,iODBC,/usr \
+ --with-pspell=shared,/usr \
+ --with-enchant=shared,/usr \
+ --enable-shmop=shared \
+ --with-snmp=shared,/usr \
+ --enable-soap=shared \
+ --enable-sockets \
+ --with-sqlite3=shared \
+ --with-regex=php \
+ --enable-sysvmsg \
+ --enable-sysvsem \
+ --enable-sysvshm \
+ --enable-wddx=shared \
+ --with-xsl=shared,/usr \
+ --enable-zip=shared \
+ --with-tsrm-pthreads \
+ --enable-intl=shared \
+ --enable-opcache \
+ --enable-shared=yes \
+ --enable-static=no \
+ --with-gnu-ld \
+ --with-pic \
+ --enable-phpdbg \
+ --build=$ARCH-slackware-linux
+
+# I am told this option is worse than nothing. :-)
+# --enable-safe-mode
+#
+# I would recommend *against* and will take no responbility for turning on
+# "safe" mode.
+
+make $NUMJOBS || make || exit 1
+make install INSTALL_ROOT=$PKG || exit 1
+
+mkdir -p $PKG/etc/{rc.d,php-fpm.d}
+cp sapi/fpm/init.d.php-fpm $PKG/etc/rc.d/rc.php-fpm.new
+chmod 644 $PKG/etc/rc.d/rc.php-fpm.new
+
+# PHP (used to) install Pear with some strange permissions.
+chmod 755 $PKG/usr/bin/pear
+
+# PHP sometimes puts junk in the root directory:
+( cd $PKG
+ rm -rf .channels .depdb .depdblock .filemap .lock .registry
+)
+
+# We do not package static extension libraries:
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/php/extensions/*.a
+
+# Fix $PKG/usr/lib/php perms:
+( cd $PKG/usr/lib${LIBDIRSUFFIX}/php
+ find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+)
+
+mkdir -p $PKG/usr/doc/php-$VERSION
+cp -a \
+ CODING_STANDARDS CREDITS EXTENSIONS INSTALL LICENSE NEWS README* TODO* UPGRADING* \
+ sapi/cgi/README.FastCGI \
+ $PKG/usr/doc/php-$VERSION
+chown -R root:root $PKG/usr/doc/php-$VERSION
+chmod 644 $PKG/usr/doc/php-$VERSION/UPGRADING*
+
+mkdir -p $PKG/etc/httpd
+cp -a php.ini-development php.ini-production $PKG/etc/httpd
+cat $CWD/mod_php.conf.example | sed -e "s#lib/httpd#lib${LIBDIRSUFFIX}/httpd#" \
+ > $PKG/etc/httpd/mod_php.conf.example
+chmod 644 $PKG/etc/httpd/*
+chown root:root $PKG/etc/httpd/*
+
+chmod 755 $PKG/etc/php $PKG/etc/php-fpm.d $PKG/etc/httpd
+chown root:root $PKG/etc/*
+
+# This can go now.
+rm -f $PKG/etc/httpd/httpd*
+
+# Session directory for PHP:
+mkdir -p $PKG/var/lib/php
+chmod 770 $PKG/var/lib/php
+chown root:apache $PKG/var/lib/php
+
+# Strip ELF objects.
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+gzip -9 $PKG/usr/man/man?/*.?
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+#if [ -d "$IMAPLIBDIR" ]; then
+# ( cd $IMAPLIBDIR && rm -rf * )
+# rmdir $IMAPLIBDIR
+#fi
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/php-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/php/php.ini-development.diff b/patches/source/php/php.ini-development.diff
new file mode 100644
index 000000000..ffa7c0c9d
--- /dev/null
+++ b/patches/source/php/php.ini-development.diff
@@ -0,0 +1,61 @@
+--- ./php.ini-development.orig 2012-07-18 01:19:16.000000000 -0500
++++ ./php.ini-development 2012-08-08 20:06:33.512546116 -0500
+@@ -859,6 +859,49 @@
+ ; If you only provide the name of the extension, PHP will look for it in its
+ ; default extension directory.
+ ;
++
++; These are the extensions that are available for use on this PHP build.
++; If you do NOT need any of these extensions, you should comment them out.
++; That will probably increase both your security and performance.
++
++extension=bcmath.so
++extension=bz2.so
++extension=calendar.so
++extension=ctype.so
++extension=curl.so
++extension=dba.so
++extension=dom.so
++extension=enchant.so
++extension=exif.so
++extension=ftp.so
++extension=gd.so
++extension=gettext.so
++extension=gmp.so
++extension=iconv.so
++extension=intl.so
++extension=ldap.so
++extension=mbstring.so
++extension=mysql.so
++extension=mysqli.so
++extension=odbc.so
++extension=openssl.so
++zend_extension=opcache.so
++extension=pdo.so
++extension=pdo_mysql.so
++extension=pdo_sqlite.so
++extension=pdo_odbc.so
++extension=pspell.so
++extension=shmop.so
++extension=snmp.so
++extension=soap.so
++extension=sqlite3.so
++extension=tokenizer.so
++extension=wddx.so
++extension=xmlreader.so
++extension=xsl.so
++extension=zip.so
++extension=zlib.so
++
+ ; Windows Extensions
+ ; Note that ODBC support is built in, so no dll is needed for it.
+ ; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
+@@ -1391,7 +1431,7 @@
+ ; where MODE is the octal representation of the mode. Note that this
+ ; does not overwrite the process's umask.
+ ; http://php.net/session.save-path
+-;session.save_path = "/tmp"
++session.save_path = "/var/lib/php"
+
+ ; Whether to use cookies.
+ ; http://php.net/session.use-cookies
diff --git a/patches/source/php/slack-desc b/patches/source/php/slack-desc
new file mode 100644
index 000000000..fe14da6d6
--- /dev/null
+++ b/patches/source/php/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+php: php (HTML-embedded scripting language)
+php:
+php: PHP is an HTML-embedded scripting language. It shares syntax
+php: characteristics with C, Java, and Perl. The primary objective behind
+php: this language is to make a fast and easy-to-use scripting language
+php: for dynamic web sites.
+php:
+php: More information can be found online at http://www.php.net/
+php:
+php:
+php:
diff --git a/patches/source/pidgin/doinst.sh b/patches/source/pidgin/doinst.sh
new file mode 100644
index 000000000..1f8ff67de
--- /dev/null
+++ b/patches/source/pidgin/doinst.sh
@@ -0,0 +1,10 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
+
diff --git a/patches/source/pidgin/fix-gmain_h-compile-error.diff b/patches/source/pidgin/fix-gmain_h-compile-error.diff
new file mode 100644
index 000000000..1e313cde0
--- /dev/null
+++ b/patches/source/pidgin/fix-gmain_h-compile-error.diff
@@ -0,0 +1,17 @@
+Since glib-2.32, this is a common error:
+ In file included from rsa_nss.c:27:0:
+ /usr/include/glib-2.0/glib/gmain.h:21:2: error: #error "Only <glib.h> can be included directly."
+Let's fix it :)
+
+diff -Nur pidgin-encryption-3.1.orig/rsa_nss.c pidgin-encryption-3.1/rsa_nss.c
+--- pidgin-encryption-3.1.orig/rsa_nss.c 2010-04-25 20:53:46.000000000 -0500
++++ pidgin-encryption-3.1/rsa_nss.c 2012-05-01 22:58:18.033710803 -0500
+@@ -24,7 +24,7 @@
+ #include <debug.h>
+ #include <gtkdialogs.h>
+
+-#include "glib/gmain.h"
++#include <glib.h>
+
+ #include <string.h>
+ #include <assert.h>
diff --git a/patches/source/pidgin/pidgin.SlackBuild b/patches/source/pidgin/pidgin.SlackBuild
new file mode 100755
index 000000000..3df903830
--- /dev/null
+++ b/patches/source/pidgin/pidgin.SlackBuild
@@ -0,0 +1,230 @@
+#!/bin/sh
+
+# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2014, 2015, 2016 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=pidgin
+VERSION=${VERSION:-$(echo $PKGNAM-2.*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+PIDGINENC=${PIDGINENC:-3.1}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j6 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-${PKGNAM}
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+ ARCHQUADLET=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ ARCHQUADLET=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ ARCHQUADLET=""
+elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2 -march=armv4t"
+ LIBDIRSUFFIX=""
+ ARCHQUADLET="-gnueabi"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ ARCHQUADLET=""
+fi
+
+cd $TMP
+rm -rf ${PKGNAM}-${VERSION}
+tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1
+cd ${PKGNAM}-$VERSION || exit 1
+
+# Make sure ownerships and permissions are sane:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+#autoreconf --force --install
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --enable-dot=no \
+ --disable-schemas-install \
+ --enable-dbus \
+ --enable-gnutls=no \
+ --enable-nss=yes \
+ --with-nss-includes="$(pkg-config --variable=includedir nss)" \
+ --with-nss-libs=/usr/lib${LIBDIRSUFFIX}/ \
+ --with-nspr-includes="$(pkg-config --variable=includedir nspr)" \
+ --with-nspr-libs=/usr/lib${LIBDIRSUFFIX}/ \
+ --with-system-ssl-certs=/etc/ssl/certs \
+ --disable-vv \
+ --enable-gtkspell \
+ --enable-cyrus-sasl \
+ --enable-perl \
+ --disable-meanwhile \
+ --disable-avahi \
+ --disable-nm \
+ --program-prefix= \
+ --program-suffix= \
+ --build=$ARCH-slackware-linux$ARCHQUADLET || exit 1
+
+# Fix install location:
+grep -lr -- "lib/perl" . | xargs sed -i 's?lib/perl?lib'"$LIBDIRSUFFIX"'/perl?g'
+
+# Build and install:
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Fix misplaced items:
+eval $(perl '-V:installvendorlib')
+eval $(perl '-V:privlib')
+VENDORPERL="$(echo $installvendorlib)"
+
+mkdir -vpm755 $PKG/$VENDORPERL/
+find $PKG -type f -name perllocal.pod -exec mv -fv {} $PKG/$VENDORPERL/Pidgin.pod \;
+# Fix install location for 64bit:
+sed -i 's?/lib/perl?/lib'"$LIBDIRSUFFIX"'/perl?g' $PKG/$VENDORPERL/Pidgin.pod
+mkdir -p $PKG/usr/man/man3
+find $PKG/usr/share/man -type f -name *.3 -exec mv -fv {} $PKG/usr/man/man3 \;
+rm -rf $PKG/usr/share/man
+rm -r $PKG$privlib
+# This is empty:
+rmdir $PKG/usr/lib$LIBDIRSUFFIX/perl[0-9]*/$ARCH-linux-thread-multi/
+
+# In case of unwanted junk dirs on 64-bit... this may fail, but doesn't hurt:
+rmdir $PKG/usr/lib/perl[0-9]*/$ARCH-linux-thread-multi/
+rmdir $PKG/usr/lib/perl[0-9]*
+rmdir $PKG/usr/lib
+
+# This removes our DESTDIR from the packlist filenames, to keep perl's
+# internal inventories consistent and correct.
+find $PKG -name .packlist | while read plist ; do
+ sed -e "s%/share/man%/man%g" \
+ -e "s%$PKG%%g" \
+ -e "s%\.1$%\.1\.gz%g" \
+ -e "s%\.2$%\.2\.gz%g" \
+ -e "s%\.3$%\.3\.gz%g" \
+ -e "s%\.3pm$%\.3pm\.gz%g" \
+ -e "s%\.4$%\.4\.gz%g" \
+ -e "s%\.5$%\.5\.gz%g" \
+ -e "s%\.6$%\.6\.gz%g" \
+ -e "s%\.7$%\.7\.gz%g" \
+ -e "s%\.8$%\.8\.gz%g" \
+ ${plist} > ${plist}.new
+ mv -f ${plist}.new ${plist}
+done
+
+### add pidgin-encryption
+( cd $TMP
+ rm -rf pidgin-encryption-$PIDGINENC
+ tar xvf $CWD/pidgin-encryption-$PIDGINENC.tar.gz || exit 1
+ cd pidgin-encryption-$PIDGINENC
+ zcat $CWD/fix-gmain_h-compile-error.diff.gz | patch -p1 --verbose || exit 1
+ PIDGIN_CFLAGS="-I${PKG}/usr/include/pidgin" \
+ PIDGIN_LIBS="-L${PKG}/usr/lib${LIBDIRSUFFIX}" \
+ PURPLE_CFLAGS="-I${PKG}/usr/include/libpurple" \
+ PURPLE_LIBS="-L${PKG}/usr/lib${LIBDIRSUFFIX}" \
+ ./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --disable-static \
+ --with-nss-includes="$(pkg-config --variable=includedir nss)" \
+ --with-nss-libs=/usr/lib${LIBDIRSUFFIX}/ \
+ --with-nspr-includes="$(pkg-config --variable=includedir nspr)" \
+ --with-nspr-libs=/usr/lib${LIBDIRSUFFIX}/ \
+ --program-prefix="" \
+ --program-suffix="" \
+ --build=$ARCH-slackware-linux$ARCHQUADLET || exit 1
+
+ # Fix install location:
+ grep -lr -- "lib/perl" . | xargs sed -i 's?lib/perl?lib'"$LIBDIRSUFFIX"'/perl?g'
+
+ make $NUMJOBS || make || exit 1
+ make install DESTDIR=$PKG || exit 1
+) || exit 1
+### end add pidgin-encryption
+
+# Strip binaries:
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.*
+ )
+ done
+ )
+fi
+
+# Compress info files, if any:
+if [ -d $PKG/usr/info ]; then
+ ( cd $PKG/usr/info
+ rm -f dir
+ gzip -9 *
+ )
+fi
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+cp -a \
+ AUTHORS COPYING COPYRIGHT HACKING INSTALL NEWS PLUGIN_HOWTO README* doc \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+( cd $PKG/usr/doc/${PKGNAM}-$VERSION/doc
+ rm -f Makefile* *.dox *.1 *.in
+)
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/pidgin/slack-desc b/patches/source/pidgin/slack-desc
new file mode 100644
index 000000000..a9aabca14
--- /dev/null
+++ b/patches/source/pidgin/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+pidgin: pidgin (GTK+ instant messaging program)
+pidgin:
+pidgin: Pidgin allows you to talk to anyone using a variety of messaging
+pidgin: protocols, including AIM (Oscar and TOC), ICQ, IRC, Yahoo!, MSN
+pidgin: Messenger, Jabber, Gadu-Gadu, Napster, and Zephyr. These protocols
+pidgin: are implemented using a modular, easy to use design. To use a
+pidgin: protocol, just load the plugin for it.
+pidgin:
+pidgin: For more info, see: http://www.pidgin.im
+pidgin:
+pidgin:
diff --git a/patches/source/ppp/doinst.sh b/patches/source/ppp/doinst.sh
new file mode 100644
index 000000000..54facc41c
--- /dev/null
+++ b/patches/source/ppp/doinst.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+config etc/ppp/chap-secrets.new
+config etc/ppp/options.new
+config etc/ppp/pap-secrets.new
+
+config etc/radiusclient/issue.new
+config etc/radiusclient/radiusclient.conf.new
+config etc/radiusclient/realms.new
+config etc/radiusclient/servers.new
+
diff --git a/patches/source/ppp/options.new b/patches/source/ppp/options.new
new file mode 100644
index 000000000..2a0286576
--- /dev/null
+++ b/patches/source/ppp/options.new
@@ -0,0 +1,276 @@
+# /etc/ppp/options
+#
+# $Id: options,v 1.4 1996/05/01 18:57:04 alvar Exp $
+#
+# Originally created by Jim Knoble <jmknoble@mercury.interpath.net>
+# Modified for Debian by alvar Bray <alvar@meiko.co.uk>
+# Modified for PPP Server setup by Christoph Lameter <clameter@debian.org>
+# Modified for Slackware by Pat Volkerding <volkerdi@slackware.com>
+#
+# Use the command egrep -v '#|^ *$' /etc/ppp/options to quickly see what
+# options are active in this file.
+
+# Specify which DNS Servers the incoming Win95 or WinNT Connection should use
+# Two Servers can be remotely configured
+# dns-addr 192.168.1.1
+# dns-addr 192.168.1.2
+
+# Specify which WINS Servers the incoming connection Win95 or WinNT should use
+# wins-addr 192.168.1.50
+# wins-addr 192.168.1.51
+
+# Run the executable or shell command specified after pppd has
+# terminated the link. This script could, for example, issue commands
+# to the modem to cause it to hang up if hardware modem control signals
+# were not available.
+#disconnect "chat -- \d+++\d\c OK ath0 OK"
+
+# async character map -- 32-bit hex; each bit is a character
+# that needs to be escaped for pppd to receive it. 0x00000001
+# represents '\x01', and 0x80000000 represents '\x1f'.
+asyncmap 0
+
+# Require the peer to authenticate itself before allowing network
+# packets to be sent or received.
+# For a PPP Server with script based logins not using PAP or CHAP
+# you need to disable this setting.
+#auth
+
+# Do not require the other end of the connection to authenticate itself.
+# This option is dangerous if pppd is setuid.
+# If you also have ethernet and are having problems getting PPP to connect
+# over a modem, try this option.
+#noauth
+
+# Use hardware flow control (i.e. RTS/CTS) to control the flow of data
+# on the serial port.
+crtscts
+
+# Use software flow control (i.e. XON/XOFF) to control the flow of data
+# on the serial port.
+#xonxoff
+
+# Specifies that certain characters should be escaped on transmission
+# (regardless of whether the peer requests them to be escaped with its
+# async control character map). The characters to be escaped are
+# specified as a list of hex numbers separated by commas. Note that
+# almost any character can be specified for the escape option, unlike
+# the asyncmap option which only allows control characters to be
+# specified. The characters which may not be escaped are those with hex
+# values 0x20 - 0x3f or 0x5e.
+#escape 11,13,ff
+
+# Don't use the modem control lines.
+#local
+
+# Specifies that pppd should use a UUCP-style lock on the serial device
+# to ensure exclusive access to the device.
+lock
+
+# Use the modem control lines. On Ultrix, this option implies hardware
+# flow control, as for the crtscts option. (This option is not fully
+# implemented.)
+modem
+
+# Set the MRU [Maximum Receive Unit] value to <n> for negotiation. pppd
+# will ask the peer to send packets of no more than <n> bytes. The
+# minimum MRU value is 128. The default MRU value is 1500. A value of
+# 296 is recommended for slow links (40 bytes for TCP/IP header + 256
+# bytes of data).
+#mru 542
+
+# Set the interface netmask to <n>, a 32 bit netmask in "decimal dot"
+# notation (e.g. 255.255.255.0).
+#netmask 255.255.255.0
+
+# Disables the default behaviour when no local IP address is specified,
+# which is to determine (if possible) the local IP address from the
+# hostname. With this option, the peer will have to supply the local IP
+# address during IPCP negotiation (unless it specified explicitly on the
+# command line or in an options file).
+#noipdefault
+
+# Enables the "passive" option in the LCP. With this option, pppd will
+# attempt to initiate a connection; if no reply is received from the
+# peer, pppd will then just wait passively for a valid LCP packet from
+# the peer (instead of exiting, as it does without this option).
+#passive
+
+# With this option, pppd will not transmit LCP packets to initiate a
+# connection until a valid LCP packet is received from the peer (as for
+# the "passive" option with old versions of pppd).
+#silent
+
+# Don't request or allow negotiation of any options for LCP and IPCP
+# (use default values).
+#-all
+
+# Disable Address/Control compression negotiation (use default, i.e.
+# address/control field disabled).
+#-ac
+
+# Disable asyncmap negotiation (use the default asyncmap, i.e. escape
+# all control characters).
+#-am
+
+# Don't fork to become a background process (otherwise pppd will do so
+# if a serial device is specified).
+#-detach
+
+# Disable IP address negotiation (with this option, the remote IP
+# address must be specified with an option on the command line or in an
+# options file).
+#-ip
+
+# Disable magic number negotiation. With this option, pppd cannot
+# detect a looped-back line.
+#-mn
+
+# Disable MRU [Maximum Receive Unit] negotiation (use default, i.e.
+# 1500).
+#-mru
+
+# Disable protocol field compression negotiation (use default, i.e.
+# protocol field compression disabled).
+#-pc
+
+# Require the peer to authenticate itself using PAP.
+#+pap
+
+# Don't agree to authenticate using PAP.
+#-pap
+
+# Require the peer to authenticate itself using CHAP [Cryptographic
+# Handshake Authentication Protocol] authentication.
+#+chap
+
+# Don't agree to authenticate using CHAP.
+#-chap
+
+# Disable negotiation of Van Jacobson style IP header compression (use
+# default, i.e. no compression).
+#-vj
+
+# Increase debugging level (same as -d). If this option is given, pppd
+# will log the contents of all control packets sent or received in a
+# readable form. The packets are logged through syslog with facility
+# daemon and level debug. This information can be directed to a file by
+# setting up /etc/syslog.conf appropriately (see syslog.conf(5)). (If
+# pppd is compiled with extra debugging enabled, it will log messages
+# using facility local2 instead of daemon).
+#debug
+
+# Append the domain name <d> to the local host name for authentication
+# purposes. For example, if gethostname() returns the name porsche,
+# but the fully qualified domain name is porsche.Quotron.COM, you would
+# use the domain option to set the domain name to Quotron.COM.
+#domain <d>
+
+# Enable debugging code in the kernel-level PPP driver. The argument n
+# is a number which is the sum of the following values: 1 to enable
+# general debug messages, 2 to request that the contents of received
+# packets be printed, and 4 to request that the contents of transmitted
+# packets be printed.
+#kdebug n
+
+# Set the MTU [Maximum Transmit Unit] value to <n>. Unless the peer
+# requests a smaller value via MRU negotiation, pppd will request that
+# the kernel networking code send data packets of no more than n bytes
+# through the PPP network interface.
+#mtu <n>
+
+# Enforce the use of the hostname as the name of the local system for
+# authentication purposes (overrides the name option).
+#usehostname
+
+# Set the assumed name of the remote system for authentication purposes
+# to <n>.
+#remotename <n>
+
+# Add an entry to this system's ARP [Address Resolution Protocol]
+# table with the IP address of the peer and the Ethernet address of this
+# system.
+proxyarp
+
+# Use the system password database for authenticating the peer using
+# PAP. Note: mgetty already provides this option. If this is specified
+# then dialin from users using a script under Linux to fire up ppp wont work.
+# login
+
+# If this option is given, pppd will send an LCP echo-request frame to
+# the peer every n seconds. Under Linux, the echo-request is sent when
+# no packets have been received from the peer for n seconds. Normally
+# the peer should respond to the echo-request by sending an echo-reply.
+# This option can be used with the lcp-echo-failure option to detect
+# that the peer is no longer connected.
+lcp-echo-interval 30
+
+# If this option is given, pppd will presume the peer to be dead if n
+# LCP echo-requests are sent without receiving a valid LCP echo-reply.
+# If this happens, pppd will terminate the connection. Use of this
+# option requires a non-zero value for the lcp-echo-interval parameter.
+# This option can be used to enable pppd to terminate after the physical
+# connection has been broken (e.g., the modem has hung up) in
+# situations where no hardware modem control lines are available.
+lcp-echo-failure 4
+
+# Set the LCP restart interval (retransmission timeout) to <n> seconds
+# (default 3).
+#lcp-restart <n>
+
+# Set the maximum number of LCP terminate-request transmissions to <n>
+# (default 3).
+#lcp-max-terminate <n>
+
+# Set the maximum number of LCP configure-request transmissions to <n>
+# (default 10).
+#lcp-max-configure <n>
+
+# Set the maximum number of LCP configure-NAKs returned before starting
+# to send configure-Rejects instead to <n> (default 10).
+#lcp-max-failure <n>
+
+# Set the IPCP restart interval (retransmission timeout) to <n>
+# seconds (default 3).
+#ipcp-restart <n>
+
+# Set the maximum number of IPCP terminate-request transmissions to <n>
+# (default 3).
+#ipcp-max-terminate <n>
+
+# Set the maximum number of IPCP configure-request transmissions to <n>
+# (default 10).
+#ipcp-max-configure <n>
+
+# Set the maximum number of IPCP configure-NAKs returned before starting
+# to send configure-Rejects instead to <n> (default 10).
+#ipcp-max-failure <n>
+
+# Set the PAP restart interval (retransmission timeout) to <n> seconds
+# (default 3).
+#pap-restart <n>
+
+# Set the maximum number of PAP authenticate-request transmissions to
+# <n> (default 10).
+#pap-max-authreq <n>
+
+# Set the CHAP restart interval (retransmission timeout for
+# challenges) to <n> seconds (default 3).
+#chap-restart <n>
+
+# Set the maximum number of CHAP challenge transmissions to <n>
+# (default 10).
+#chap-max-challenge
+
+# If this option is given, pppd will rechallenge the peer every <n>
+# seconds.
+#chap-interval <n>
+
+# With this option, pppd will accept the peer's idea of our local IP
+# address, even if the local IP address was specified in an option.
+#ipcp-accept-local
+
+# With this option, pppd will accept the peer's idea of its (remote) IP
+# address, even if the remote IP address was specified in an option.
+#ipcp-accept-remote
+
diff --git a/patches/source/ppp/ppp.CVE-2014-3158.diff b/patches/source/ppp/ppp.CVE-2014-3158.diff
new file mode 100644
index 000000000..500ca18ef
--- /dev/null
+++ b/patches/source/ppp/ppp.CVE-2014-3158.diff
@@ -0,0 +1,30 @@
+diff --git a/pppd/options.c b/pppd/options.c
+index 45fa742..e9042d1 100644
+--- a/pppd/options.c
++++ b/pppd/options.c
+@@ -1289,9 +1289,10 @@ getword(f, word, newlinep, filename)
+ /*
+ * Store the resulting character for the escape sequence.
+ */
+- if (len < MAXWORDLEN-1)
++ if (len < MAXWORDLEN) {
+ word[len] = value;
+- ++len;
++ ++len;
++ }
+
+ if (!got)
+ c = getc(f);
+@@ -1329,9 +1330,10 @@ getword(f, word, newlinep, filename)
+ /*
+ * An ordinary character: store it in the word and get another.
+ */
+- if (len < MAXWORDLEN-1)
++ if (len < MAXWORDLEN) {
+ word[len] = c;
+- ++len;
++ ++len;
++ }
+
+ c = getc(f);
+ }
diff --git a/patches/source/ppp/ppp.CVE-2015-3310.diff b/patches/source/ppp/ppp.CVE-2015-3310.diff
new file mode 100644
index 000000000..ecf53ce49
--- /dev/null
+++ b/patches/source/ppp/ppp.CVE-2015-3310.diff
@@ -0,0 +1,11 @@
+--- ./pppd/plugins/radius/util.c.orig 2015-04-17 11:43:59.687374237 -0500
++++ ./pppd/plugins/radius/util.c 2015-04-17 11:45:12.612379499 -0500
+@@ -77,7 +77,7 @@
+ static unsigned short int cnt = 0;
+ sprintf (buf, "%08lX%04X%02hX",
+ (unsigned long int) time (NULL),
+- (unsigned int) getpid (),
++ (unsigned int) getpid () % 65535,
+ cnt & 0xFF);
+ cnt++;
+ return buf;
diff --git a/patches/source/ppp/ppp.SlackBuild b/patches/source/ppp/ppp.SlackBuild
new file mode 100755
index 000000000..f2a493a29
--- /dev/null
+++ b/patches/source/ppp/ppp.SlackBuild
@@ -0,0 +1,176 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+VERSION=2.4.5
+RADVER=0.3.2
+PPPVER=1.98
+BUILD=${BUILD:-3_slack14.1}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-ppp
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+echo "+============+"
+echo "| ppp-$VERSION |"
+echo "+============+"
+cd $TMP
+rm -rf ppp-$VERSION
+tar xvf $CWD/ppp-$VERSION.tar.bz2 || exit 1
+cd ppp-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+zcat $CWD/ppp.slack.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+sed -i -e "s#lib/pppd#lib${LIBDIRSUFFIX}/pppd#g" $(grep -lr 'lib/pppd' *)
+zcat $CWD/ppp.crypt.diff.gz | patch -p1 --verbose || exit 1
+
+zcat $CWD/ppp.CVE-2014-3158.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/ppp.CVE-2015-3310.diff.gz | patch -p1 --verbose || exit 1
+
+# This conflicts with the header in 3.5+ kernels:
+rm -f include/linux/if_pppol2tp.h
+
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX}
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG/usr
+
+mv $PKG/usr/share/man $PKG/usr
+rmdir $PKG/usr/share
+
+# Install PPP config files:
+mkdir -p $PKG/etc/ppp
+cp -a etc.ppp/* $PKG/etc/ppp
+chmod 600 $PKG/etc/ppp/*secrets
+( cd $PKG/etc/ppp
+ mv chap-secrets chap-secrets.new
+ mv options options.new
+ mv pap-secrets pap-secrets.new
+)
+zcat $CWD/options.new.gz > $PKG/etc/ppp/options.new
+
+# Fix what seems like an insecure default setting.
+# Feel free to "chmod 4750 pppoatm.so rp-pppoe.so" at your own risk.
+# Since they are only runnable by group root, the risk really isn't much...
+chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/pppd/*/*.so
+
+mkdir -p $PKG/usr/doc/ppp-$VERSION
+cp -a \
+ FAQ PLUGINS README* SETUP scripts \
+ $PKG/usr/doc/ppp-$VERSION
+
+echo "+====================+"
+echo "| radiusclient-$RADVER |"
+echo "+====================+"
+cd $TMP
+rm -rf radiusclient-$RADVER
+tar xf $CWD/radiusclient-$RADVER.tar.bz2 || exit 1
+cd radiusclient-$RADVER || exit 1
+chown -R root:root .
+#cp /usr/share/libtool/config.{guess,sub} . # libtool-1.x
+cp /usr/share/libtool/config/config.{guess,sub} . # libtool-2.x
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+zcat $CWD/radius.msdict.gz > $PKG/etc/radiusclient/dictionary.microsoft
+zcat $CWD/realms.gz > $PKG/etc/radiusclient/realms
+zcat $CWD/servers.gz > $PKG/etc/radiusclient/servers
+( cd $PKG/etc/radiusclient
+ chmod 600 realms servers
+ mv issue issue.new
+ mv radiusclient.conf radiusclient.conf.new
+ mv realms realms.new
+ mv servers servers.new
+)
+mkdir -p $PKG/usr/doc/radiusclient-$RADVER
+cp -a \
+ BUGS CHANGES COPYRIGHT README README.radexample doc/instop.html \
+ $PKG/usr/doc/radiusclient-$RADVER
+chmod 644 $PKG/usr/doc/radiusclient-$RADVER/*
+
+echo "+===============+"
+echo "| pppsetup-$PPPVER |"
+echo "+===============+"
+cd $TMP
+rm -rf pppsetup-$PPPVER
+tar xvf $CWD/pppsetup-$PPPVER.tar.gz || exit 1
+cd pppsetup-$PPPVER || exit 1
+chown -R root:root .
+zcat $CWD/pppsetup-1.98.slack.diff.gz | patch -p1 --backup || exit
+zcat $CWD/pppsetup-1.98.pppoff.diff.gz | patch -p0 --backup || exit
+zcat $CWD/pppsetup-1.98.moredevs.diff.gz | patch -p1 --backup || exit
+zcat $CWD/pppsetup-1.98.backupfiles.diff.gz | patch -p1 --backup || exit
+chmod 755 ppp-off pppsetup
+cp -a ppp-off pppsetup $PKG/usr/sbin
+mkdir -p $PKG/usr/doc/pppsetup
+cp -a \
+ README.pppsetup ppp-compile.txt pppsetup-$PPPVER.README pppsetup-$PPPVER.lsm \
+ $PKG/usr/doc/pppsetup
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . -name "*.a" | xargs file | grep "ar archive" | cut -f 1 -d : | xargs strip -g 2> /dev/null
+)
+
+chmod 755 $PKG/usr/sbin/*
+
+gzip -9 $PKG/usr/man/man?/*.?
+chmod 644 $PKG/usr/man/man?/*
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/ppp-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/ppp/ppp.crypt.diff b/patches/source/ppp/ppp.crypt.diff
new file mode 100644
index 000000000..2e39af2b1
--- /dev/null
+++ b/patches/source/ppp/ppp.crypt.diff
@@ -0,0 +1,64 @@
+From 04c4348108d847e034dd91066cc6843f60d71731 Mon Sep 17 00:00:00 2001
+From: Paul Mackerras <paulus@samba.org>
+Date: Sun, 20 May 2012 14:14:55 +1000
+Subject: [PATCH] pppd: Don't crash if crypt() returns NULL
+
+It is possible for crypt() to return NULL under some circumstances,
+so we need to check the return value before passing it to strcmp().
+If we do get NULL from crypt(), treat it as an authentication failure.
+
+Reported-by: Paul Wouters <pwouters@redhat.com>
+Signed-off-by: Paul Mackerras <paulus@samba.org>
+---
+ pppd/auth.c | 8 +++++---
+ pppd/session.c | 7 +++++--
+ 2 files changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/pppd/auth.c b/pppd/auth.c
+index fb71944..883b7f5 100644
+--- a/pppd/auth.c
++++ b/pppd/auth.c
+@@ -1442,9 +1442,11 @@ check_passwd(unit, auser, userlen, apasswd, passwdlen, msg)
+ }
+ if (secret[0] != 0 && !login_secret) {
+ /* password given in pap-secrets - must match */
+- if ((cryptpap || strcmp(passwd, secret) != 0)
+- && strcmp(crypt(passwd, secret), secret) != 0)
+- ret = UPAP_AUTHNAK;
++ if (cryptpap || strcmp(passwd, secret) != 0) {
++ char *cbuf = crypt(passwd, secret);
++ if (!cbuf || strcmp(cbuf, secret) != 0)
++ ret = UPAP_AUTHNAK;
++ }
+ }
+ }
+ fclose(f);
+diff --git a/pppd/session.c b/pppd/session.c
+index 32901a2..56385dd 100644
+--- a/pppd/session.c
++++ b/pppd/session.c
+@@ -178,6 +178,7 @@ session_start(flags, user, passwd, ttyName, msg)
+ bool try_session = 0;
+ #else /* #ifdef USE_PAM */
+ struct passwd *pw;
++ char *cbuf;
+ #ifdef HAS_SHADOW
+ struct spwd *spwd;
+ struct spwd *getspnam();
+@@ -348,8 +349,10 @@ session_start(flags, user, passwd, ttyName, msg)
+ /*
+ * If no passwd, don't let them login if we're authenticating.
+ */
+- if (pw->pw_passwd == NULL || strlen(pw->pw_passwd) < 2
+- || strcmp(crypt(passwd, pw->pw_passwd), pw->pw_passwd) != 0)
++ if (pw->pw_passwd == NULL || strlen(pw->pw_passwd) < 2)
++ return SESSION_FAILED;
++ cbuf = crypt(passwd, pw->pw_passwd);
++ if (!cbuf || strcmp(cbuf, pw->pw_passwd) != 0)
+ return SESSION_FAILED;
+ }
+
+--
+1.7.10.4
+
+
diff --git a/patches/source/ppp/ppp.slack.diff b/patches/source/ppp/ppp.slack.diff
new file mode 100644
index 000000000..dafd0d3e7
--- /dev/null
+++ b/patches/source/ppp/ppp.slack.diff
@@ -0,0 +1,28 @@
+diff -r -u ppp-2.4.2.orig/pppd/Makefile.linux ppp-2.4.2/pppd/Makefile.linux
+--- ppp-2.4.2.orig/pppd/Makefile.linux 2003-11-27 13:55:19.000000000 -0800
++++ ppp-2.4.2/pppd/Makefile.linux 2004-02-22 21:36:11.000000000 -0800
+@@ -31,7 +31,7 @@
+
+ # CC = gcc
+ #
+-COPTS = -O2 -pipe -Wall -g
++COPTS = -O2 -pipe -Wall
+ LIBS =
+
+ # Uncomment the next 2 lines to include support for Microsoft's
+@@ -61,13 +61,13 @@
+
+ HAS_SHADOW=y
+ #USE_PAM=y
+-#HAVE_INET6=y
++HAVE_INET6=y
+
+ # Enable plugins
+ PLUGIN=y
+
+ # Enable Microsoft proprietary Callback Control Protocol
+-#CBCP=y
++CBCP=y
+
+ # Enable EAP SRP-SHA1 authentication (requires libsrp)
+ #USE_SRP=y
diff --git a/patches/source/ppp/pppsetup-1.98.backupfiles.diff b/patches/source/ppp/pppsetup-1.98.backupfiles.diff
new file mode 100644
index 000000000..6b3647793
--- /dev/null
+++ b/patches/source/ppp/pppsetup-1.98.backupfiles.diff
@@ -0,0 +1,26 @@
+--- ./pppsetup.orig Sun May 19 19:01:29 2002
++++ ./pppsetup Sun May 19 19:06:07 2002
+@@ -861,10 +861,12 @@
+ echo "multi on" >> /etc/host.conf
+ fi
+
+-if [ ! -z $DOMAINNAME ]; then
++if [ ! -z $DOMAINNAME ]; then
++# backup file
++cp -a /etc/resolv.conf /etc/resolv.conf.$$ 2> /dev/null
+ echo "search $DOMAINNAME" > /etc/resolv.conf
+ else
+-rm -f /etc/resolv.conf 2>/dev/null
++rm -f /etc/resolv.conf 2>/dev/null
+ DOMAINNAME="unknown.com"
+ fi
+
+@@ -875,6 +877,8 @@
+ fi
+
+ if [ ! -s /etc/hosts ]; then
++# backup file
++cp -a /etc/hosts /etc/hosts.bak.$$ 2> /dev/null
+ echo "127.0.0.1 localhost" > /etc/hosts
+ if [ "$DOMAINNAME" = "unknown.com" ]; then
+ echo "0.0.0.0 `hostname 2>/dev/null`.localnet `hostname 2>/dev/null`" >> /etc/hosts
diff --git a/patches/source/ppp/pppsetup-1.98.moredevs.diff b/patches/source/ppp/pppsetup-1.98.moredevs.diff
new file mode 100644
index 000000000..6a11a3b54
--- /dev/null
+++ b/patches/source/ppp/pppsetup-1.98.moredevs.diff
@@ -0,0 +1,105 @@
+--- ./pppsetup.orig Sun May 19 18:41:04 2002
++++ ./pppsetup Sun May 19 18:52:49 2002
+@@ -1,15 +1,10 @@
+ #!/bin/bash
+-###############################################################################
+-#
+ # PPPSETUP -- Script to set up pppd
+ # History:
+ # 7/21/95 RSL Script created (v1.0)
+ # 9/15/96 RSL Added code to get the ISP's domainname (v1.1)
+ # 9/19/96 RSL Revamped interface to use the 'dialog'
+ # program. (v1.2)
+-###############################################################################
+-
+-###############################################################################
+ # 2/22/98 KR Added pap, chap, ms-chap, callback, &
+ # modem init string options. (v1.98)
+ # Creates /etc/ppp/options, & pap, chap,
+@@ -17,33 +12,21 @@
+ # More guidance.
+ # Monitor connection with tail & syslogd.
+ # Demand dialing setup with ppp-2.3.0 or later.
+-###############################################################################
+-
+-###############################################################################
+ # 4/4/98 PJV Fixed massive /tmp-related security problems
+ # Switched to a default init string that's more
+ # likely to work
+ # Increased TIMEOUTs
+ # fixed bad flags given to chat -- caused dialout
+ # to fail
+-###############################################################################
+-
+-###############################################################################
+ # 2/6/1999 PJV Changed all occurances of /dev/cua* to /dev/ttyS*
+-###############################################################################
+-
+-###############################################################################
+ # 5/3/1999 PJV Commented 'debug' in /etc/ppp/options
+ # Add commented 'noauth' in /etc/ppp/options so
+ # people who want to use ppp but already have a
+ # default route have an easier time figuring out
+ # what to do. :)
+-###############################################################################
+-
+-###############################################################################
+ # 6/18/2000 PJV Added code to check for "ppp-stop" and "ppp-on"
+ # symlinks, and make them if they don't exist.
+-###############################################################################
++# 5/19/2002 PJV Added support for more devices.
+
+ TMP=/var/log/setup/tmp
+
+@@ -137,25 +120,40 @@
+ done
+
+ echo "Where is your modem /dev/ttyS?" > $TMP/txtTEMP$$
+-dialog --backtitle "MODEM DEVICE ..." --menu "`cat $TMP/txtTEMP$$`" 11 50 4 \
++dialog --backtitle "MODEM DEVICE ..." --menu "`cat $TMP/txtTEMP$$`" 17 60 10 \
++modem "= use whatever /dev/modem is linked to" \
+ ttyS0 "= (COM1: under DOS)" \
+ ttyS1 "= (COM2: under DOS)" \
+ ttyS2 "= (COM3: under DOS)" \
+ ttyS3 "= (COM4: under DOS)" \
++ttyS4 "= PCI modem" \
++ttyS5 "= PCI modem" \
++ttyS6 "= PCI modem" \
++ttyS7 "= PCI modem" \
++ttyS8 "= PCI modem" \
++ttyS9 "= PCI modem" \
++ttyS10 "= PCI modem" \
++ttyS11 "= PCI modem" \
++ttyS12 "= PCI modem" \
++ttyS13 "= PCI modem" \
++ttyS14 "= PCI modem" \
++ttyS15 "= PCI modem" \
+ 2> $TMP/rspTEMP$$
+
+ MODEM="`cat $TMP/rspTEMP$$`"
+
+-if [ -z $MODEM ]; then
+-clear 2>/dev/null || echo
+-rm -f $TMP/*TEMP*
+-echo "PPP configuration cancelled."
+-exit
+-elif [ ! -c "/dev/$MODEM" ]; then
+-/dev/MAKEDEV $MODEM >/dev/null 2>&1 || MODERROR="YES"
+-else
+-rm -f /dev/modem 2>/dev/null
+-ln -sf /dev/$MODEM /dev/modem 2>/dev/null
++if [ ! "$MODEM" = "modem" ]; then
++ if [ -z $MODEM ]; then
++ clear 2>/dev/null || echo
++ rm -f $TMP/*TEMP*
++ echo "PPP configuration cancelled."
++ exit
++ elif [ ! -c "/dev/$MODEM" ]; then
++ /dev/MAKEDEV $MODEM >/dev/null 2>&1 || MODERROR="YES"
++ else
++ rm -f /dev/modem 2>/dev/null
++ ln -sf /dev/$MODEM /dev/modem 2>/dev/null
++ fi
+ fi
+
+ echo "What baud rate is your modem?" > $TMP/txtTEMP$$
diff --git a/patches/source/ppp/pppsetup-1.98.pppoff.diff b/patches/source/ppp/pppsetup-1.98.pppoff.diff
new file mode 100644
index 000000000..66b51ba7e
--- /dev/null
+++ b/patches/source/ppp/pppsetup-1.98.pppoff.diff
@@ -0,0 +1,19 @@
+--- ppp-off.orig Fri Oct 20 17:43:50 2000
++++ ppp-off Fri Oct 20 17:46:32 2000
+@@ -21,14 +21,8 @@
+ # This just checks if demand dialing is running, if so it
+ # says Demand Dialing Stoped.
+
+-ps x 2>/dev/null > /tmp/grep.tmp
+-
+-if grep 2>/dev/null "options.demand" /tmp/grep.tmp >/dev/null
+-then
+-rm -f /tmp/grep.tmp
+-D="echo Demand Dialing Stoped."
+-else
+-rm -f /tmp/grep.tmp
++if ps x | fgrep "options.demand" 1> /dev/null 2> /dev/null ; then
++ D="echo Demand Dialing Stoped."
+ fi
+
+ #
diff --git a/patches/source/ppp/pppsetup-1.98.slack.diff b/patches/source/ppp/pppsetup-1.98.slack.diff
new file mode 100644
index 000000000..f081699c8
--- /dev/null
+++ b/patches/source/ppp/pppsetup-1.98.slack.diff
@@ -0,0 +1,1709 @@
+--- ./pppsetup.orig Sun Feb 22 12:33:32 1998
++++ ./pppsetup Sun Jun 18 14:01:10 2000
+@@ -19,6 +19,34 @@
+ # Demand dialing setup with ppp-2.3.0 or later.
+ ###############################################################################
+
++###############################################################################
++# 4/4/98 PJV Fixed massive /tmp-related security problems
++# Switched to a default init string that's more
++# likely to work
++# Increased TIMEOUTs
++# fixed bad flags given to chat -- caused dialout
++# to fail
++###############################################################################
++
++###############################################################################
++# 2/6/1999 PJV Changed all occurances of /dev/cua* to /dev/ttyS*
++###############################################################################
++
++###############################################################################
++# 5/3/1999 PJV Commented 'debug' in /etc/ppp/options
++# Add commented 'noauth' in /etc/ppp/options so
++# people who want to use ppp but already have a
++# default route have an easier time figuring out
++# what to do. :)
++###############################################################################
++
++###############################################################################
++# 6/18/2000 PJV Added code to check for "ppp-stop" and "ppp-on"
++# symlinks, and make them if they don't exist.
++###############################################################################
++
++TMP=/var/log/setup/tmp
++
+ if [ ! "$UID" = "0" ]; then
+ echo
+ echo "NOTICE: * $LOGNAME * You need to be 'root' to run this script."
+@@ -43,81 +71,84 @@
+ exit 1
+ fi
+
+-if [ ! -d /tmp ]; then
+-mkdir /tmp
+-chmod 1777 /tmp
+-fi
+-
+ if [ -s /usr/lib/setup/hdsetup ]; then
+-SYS="on SLACKWARE ..."
++SYS="on SLACKWARE."
+ fi
+
+ VERSION="1.98"
+
+ stty erase ^? 2>/dev/null
+
+-echo "PPPSETUP $VERSION $SYS" > /tmp/txtTEMP01
+-echo >> /tmp/txtTEMP01
+-echo "Written by Robert S. Liesenfeld <xunil@bitstream.net> <IRC:Xunil>" >> /tmp/txtTEMP01
+-echo "Changes for 1.98 by Kent Robotti <robotti@erols.com>" >> /tmp/txtTEMP01
+-echo >> /tmp/txtTEMP01
+-echo "You should get these 'DOCS' if you don't already have them." >> /tmp/txtTEMP01
+-echo >> /tmp/txtTEMP01
+-echo 'ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO "PPP-HOWTO"' >> /tmp/txtTEMP01
+-echo 'ftp://sunsite.unc.edu/pub/Linux/docs/faqs/PPP-FAQ "PPP-FAQ"' >> /tmp/txtTEMP01
+-echo >> /tmp/txtTEMP01
+-echo "Press [Enter] to continue with pppsetup..." >> /tmp/txtTEMP01
++if [ ! -r /usr/sbin/ppp-stop ]; then
++ ( cd /usr/sbin ; ln -sf ppp-off ppp-stop )
++fi
++if [ ! -r /usr/sbin/ppp-on ]; then
++ ( cd /usr/sbin ; ln -sf ppp-go ppp-on )
++fi
+
+-dialog --backtitle "PPPSETUP $VERSION ..." --textbox "/tmp/txtTEMP01" 15 70
++echo "PPPSETUP $VERSION $SYS" > $TMP/txtTEMP01
++echo >> $TMP/txtTEMP01
++echo "Written by Robert S. Liesenfeld <xunil@bitstream.net> <IRC:Xunil>" >> $TMP/txtTEMP01
++echo "Changes for 1.98 by Kent Robotti <robotti@erols.com>" >> $TMP/txtTEMP01
++echo "Patched for Slackware by Patrick Volkerding <volkerdi@slackware.com>" >> $TMP/txtTEMP01
++echo >> $TMP/txtTEMP01
++echo "You should get these docs if you don't already have them:" >> $TMP/txtTEMP01
++echo >> $TMP/txtTEMP01
++echo "ftp://metalab.unc.edu/pub/Linux/docs/howto/PPP-HOWTO" >> $TMP/txtTEMP01
++echo "ftp://metalab.unc.edu/pub/Linux/docs/faqs/PPP-FAQ" >> $TMP/txtTEMP01
++echo >> $TMP/txtTEMP01
++echo "Press [Enter] to continue with pppsetup..." >> $TMP/txtTEMP01
++
++dialog --backtitle "PPPSETUP $VERSION/Slackware" --textbox "$TMP/txtTEMP01" 16 73
+
+ while [ -z "$PHONENUM" ]
+ do
+-echo "To begin setting up your PPP connection, i need to know a few things." > /tmp/txtTEMP$$
+-echo "For starters, what is the phone number of your (I)nternet (S)ervice" >> /tmp/txtTEMP$$
+-echo "(P)rovider?" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Example: atdt6661776 <-For (t)one dialing.)" >> /tmp/txtTEMP$$
+-echo "Example: atdp6661776 <-For (p)ulse dialing.)" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Include the: atd? It's usally just: atdtphonenumber" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "(Note: in the USA, use atdt*70,6661776 [comma required!] to turn" >> /tmp/txtTEMP$$
+-echo " off call waiting.)" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
++echo "To begin setting up your PPP connection, i need to know a few things." > $TMP/txtTEMP$$
++echo "For starters, what is the phone number of your (I)nternet (S)ervice" >> $TMP/txtTEMP$$
++echo "(P)rovider?" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Example: atdt6661776 <-For (t)one dialing.)" >> $TMP/txtTEMP$$
++echo "Example: atdp6661776 <-For (p)ulse dialing.)" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Include the: atd? It's usally just: atdtphonenumber" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "(Note: in the USA, use atdt*70,6661776 [comma required!] to turn" >> $TMP/txtTEMP$$
++echo " off call waiting.)" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
+
+-dialog --title "PHONE NUMBER ..." --inputbox "`cat /tmp/txtTEMP$$`" 18 75 2> /tmp/rspTEMP$$
++dialog --title "PHONE NUMBER ..." --inputbox "`cat $TMP/txtTEMP$$`" 18 75 2> $TMP/rspTEMP$$
+
+ if [ $? = 1 ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ exit
+ fi
+
+-PHONENUM="`cat /tmp/rspTEMP$$`"
++PHONENUM="`cat $TMP/rspTEMP$$`"
+
+ if [ -z "$PHONENUM" ]; then
+ clear 2>/dev/null || echo
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ echo "PPP configuration cancelled."
+ echo "No phone number."
+ exit
+ fi
+ done
+
+-echo "Where is your modem /dev/cua?" > /tmp/txtTEMP$$
+-dialog --backtitle "MODEM DEVICE ..." --menu "`cat /tmp/txtTEMP$$`" 11 50 4 \
+-cua0 "= (COM1: under DOS)" \
+-cua1 "= (COM2: under DOS)" \
+-cua2 "= (COM3: under DOS)" \
+-cua3 "= (COM4: under DOS)" \
+-2> /tmp/rspTEMP$$
++echo "Where is your modem /dev/ttyS?" > $TMP/txtTEMP$$
++dialog --backtitle "MODEM DEVICE ..." --menu "`cat $TMP/txtTEMP$$`" 11 50 4 \
++ttyS0 "= (COM1: under DOS)" \
++ttyS1 "= (COM2: under DOS)" \
++ttyS2 "= (COM3: under DOS)" \
++ttyS3 "= (COM4: under DOS)" \
++2> $TMP/rspTEMP$$
+
+-MODEM="`cat /tmp/rspTEMP$$`"
++MODEM="`cat $TMP/rspTEMP$$`"
+
+ if [ -z $MODEM ]; then
+ clear 2>/dev/null || echo
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ echo "PPP configuration cancelled."
+ exit
+ elif [ ! -c "/dev/$MODEM" ]; then
+@@ -127,139 +158,139 @@
+ ln -sf /dev/$MODEM /dev/modem 2>/dev/null
+ fi
+
+-echo "What baud rate is your modem?" > /tmp/txtTEMP$$
+-dialog --backtitle "MODEM BAUD RATE ..." --menu "`cat /tmp/txtTEMP$$`" 14 72 7 \
++echo "What baud rate is your modem?" > $TMP/txtTEMP$$
++dialog --backtitle "MODEM BAUD RATE ..." --menu "`cat $TMP/txtTEMP$$`" 14 72 7 \
+ 460800 "460KBps - ISDN modem..." \
+ 230400 "230KBps - 56Kbps modem... or ISDN modem..." \
+ 115200 "115KBps - 28.8, 33.6, or 56Kbps modem..." \
+ 57600 "57.6KBps - 28.8, 33.6, or 56Kbps modem..." \
+ 38400 "38.4KBps - Hangin ten on the net! 28.8 or 33.6..." \
+ 19200 "19.2KBps - Better known as 14.4..." \
+-9600 "9600bps - No comment..." 2> /tmp/rspTEMP$$
++9600 "9600bps - No comment..." 2> $TMP/rspTEMP$$
+
+-BAUDRATE="`cat /tmp/rspTEMP$$`"
++BAUDRATE="`cat $TMP/rspTEMP$$`"
+
+ if [ -z $BAUDRATE ]; then
+ clear 2>/dev/null || echo
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ echo "PPP configuration cancelled."
+ exit
+ fi
+
+-echo "Does your service provider use CALLBACK?" > /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "CALLBACK is when you call your service provider and give them" >> /tmp/txtTEMP$$
+-echo "your phone number so they can call you back, then when they" >> /tmp/txtTEMP$$
+-echo "call you back you give them your login name and password." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Most service providers don't use CALLBACK, so the answer is" >> /tmp/txtTEMP$$
+-echo "probably No, unless you know otherwise." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-
+-dialog --backtitle "CALLBACK YES or NO? ..." --yesno "`cat /tmp/txtTEMP$$`" 13 70
+-
+-if [ $? = 0 ]; then
+-echo "Put your phone number in the box below, so your service provider" > /tmp/txtTEMP$$
+-echo "can call you back." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Example: 7771818" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
++echo "Does your service provider use CALLBACK?" > $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "CALLBACK is when you call your service provider and give them" >> $TMP/txtTEMP$$
++echo "your phone number so they can call you back, then when they" >> $TMP/txtTEMP$$
++echo "call you back you give them your login name and password." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Most service providers don't use CALLBACK, so the answer is" >> $TMP/txtTEMP$$
++echo "probably No, unless you know otherwise." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++
++dialog --backtitle "CALLBACK YES or NO? ..." --menu "`cat $TMP/txtTEMP$$`" 16 70 2 "NO" "Most Internet providers do not use callback" "YES" "Use callback support (I know what I'm doing)" 2> $TMP/replyTEMP$$
++
++if [ "`cat $TMP/replyTEMP$$`" = "YES" ]; then
++echo "Put your phone number in the box below, so your service provider" > $TMP/txtTEMP$$
++echo "can call you back." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Example: 7771818" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
+
+-dialog --backtitle "CALLBACK Your Phone Number? ..." --inputbox "`cat /tmp/txtTEMP$$`" 11 72 2> /tmp/cb1TEMP$$
++dialog --backtitle "CALLBACK Your Phone Number? ..." --inputbox "`cat $TMP/txtTEMP$$`" 11 72 2> $TMP/cb1TEMP$$
+
+ if [ $? = 1 ]; then
+ clear 2>/dev/null || echo
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ echo "PPP configuration cancelled."
+ exit
+-elif [ ! -s /tmp/cb1TEMP$$ ]; then
++elif [ ! -s $TMP/cb1TEMP$$ ]; then
+ clear 2>/dev/null || echo
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ echo "PPP configuration cancelled."
+ echo "No Phone Number for Callback."
+ exit
+ fi
+ fi
+
+-if [ -s /tmp/cb1TEMP$$ ]; then
+-CBPN="`cat /tmp/cb1TEMP$$`"
+-echo "I have your phone number: $CBPN" > /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Do you have to give a Username or Login for the initial connection" >> /tmp/txtTEMP$$
+-echo "to $PHONENUM before you're called back." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Example: jerry" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "If NO, just press [Enter] on a empty box and skip this." >> /tmp/txtTEMP$$
++if [ -s $TMP/cb1TEMP$$ ]; then
++CBPN="`cat $TMP/cb1TEMP$$`"
++echo "I have your phone number: $CBPN" > $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Do you have to give a Username or Login for the initial connection" >> $TMP/txtTEMP$$
++echo "to $PHONENUM before you're called back." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Example: jerry" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "If NO, just press [Enter] on a empty box and skip this." >> $TMP/txtTEMP$$
+
+-dialog --backtitle "CALLBACK INITIAL LOGIN? ..." --inputbox "`cat /tmp/txtTEMP$$`" 15 74 2> /tmp/cb1.1TEMP$$
++dialog --backtitle "CALLBACK INITIAL LOGIN? ..." --inputbox "`cat $TMP/txtTEMP$$`" 15 74 2> $TMP/cb1.1TEMP$$
+
+ if [ $? = 1 ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ exit
+ else
+-CBMODLOGIN="`cat /tmp/cb1.1TEMP$$`"
++CBMODLOGIN="`cat $TMP/cb1.1TEMP$$`"
+ fi
+ fi
+
+-if [ -s /tmp/cb1TEMP$$ ]; then
+-echo "I have your phone number: $CBPN" > /tmp/txtTEMP$$
+-if [ -s /tmp/cb1.1TEMP$$ ]; then
+-echo "I see you have to give a Username or Login: $CBMODLOGIN" >> /tmp/txtTEMP$$
+-echo "for the initial connection to: $PHONENUM" >> /tmp/txtTEMP$$
+-fi
+-echo >> /tmp/txtTEMP$$
+-echo "Do you have to give a Password for the initial connection" >> /tmp/txtTEMP$$
+-echo "to $PHONENUM before you're called back." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Example: Zoy85mWc" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "If NO, just press [Enter] on a empty box and skip this." >> /tmp/txtTEMP$$
++if [ -s $TMP/cb1TEMP$$ ]; then
++echo "I have your phone number: $CBPN" > $TMP/txtTEMP$$
++if [ -s $TMP/cb1.1TEMP$$ ]; then
++echo "I see you have to give a Username or Login: $CBMODLOGIN" >> $TMP/txtTEMP$$
++echo "for the initial connection to: $PHONENUM" >> $TMP/txtTEMP$$
++fi
++echo >> $TMP/txtTEMP$$
++echo "Do you have to give a Password for the initial connection" >> $TMP/txtTEMP$$
++echo "to $PHONENUM before you're called back." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Example: Zoy85mWc" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "If NO, just press [Enter] on a empty box and skip this." >> $TMP/txtTEMP$$
+
+-dialog --backtitle "CALLBACK INITIAL PASSWORD? ..." --inputbox "`cat /tmp/txtTEMP$$`" 17 68 2> /tmp/cb2TEMP$$
++dialog --backtitle "CALLBACK INITIAL PASSWORD? ..." --inputbox "`cat $TMP/txtTEMP$$`" 17 68 2> $TMP/cb2TEMP$$
+
+ if [ $? = 1 ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ exit
+ else
+-CBMODPASS="`cat /tmp/cb2TEMP$$`"
++CBMODPASS="`cat $TMP/cb2TEMP$$`"
+ fi
+ fi
+
+ if [ ! -z "$CBPN" ]; then
+-echo "Are they using PAP or CHAP for AUTHENTICATION? If so answer YES." > /tmp/txtTEMP$$
+-echo "Do they present you with a Username: or Login: and Password: prompt" >> /tmp/txtTEMP$$
+-echo "when they call you back, if so they're probably not using PAP or" >> /tmp/txtTEMP$$
+-echo "CHAP, so you can answer NO here." >> /tmp/txtTEMP$$
+-echo "If you're not sure, you'll have to ask you're service provider." >> /tmp/txtTEMP$$
++echo "Are they using PAP or CHAP for AUTHENTICATION? If so answer YES." > $TMP/txtTEMP$$
++echo "Do they present you with a Username: or Login: and Password: prompt" >> $TMP/txtTEMP$$
++echo "when they call you back, if so they're probably not using PAP or" >> $TMP/txtTEMP$$
++echo "CHAP, so you can answer NO here." >> $TMP/txtTEMP$$
++echo "If you're not sure, you'll have to ask you're service provider." >> $TMP/txtTEMP$$
+
+-dialog --backtitle "CALLBACK PAP-CHAP YES or NO? ..." --yesno "`cat /tmp/txtTEMP$$`" 9 72
++dialog --backtitle "CALLBACK PAP-CHAP YES or NO? ..." --yesno "`cat $TMP/txtTEMP$$`" 9 72
+
+ if [ $? = 1 ]; then
+-echo "What is your Username or Login to your service provider?" > /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "This is the information you'll give them when they call" >> /tmp/txtTEMP$$
+-echo "you back at: $CBPN" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Example: jerry" >> /tmp/txtTEMP$$
++echo "What is your Username or Login to your service provider?" > $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "This is the information you'll give them when they call" >> $TMP/txtTEMP$$
++echo "you back at: $CBPN" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Example: jerry" >> $TMP/txtTEMP$$
+
+-dialog --backtitle "CALLBACK LOGIN? ..." --inputbox "`cat /tmp/txtTEMP$$`" 13 72 2> /tmp/cb3TEMP$$
++dialog --backtitle "CALLBACK LOGIN? ..." --inputbox "`cat $TMP/txtTEMP$$`" 13 72 2> $TMP/cb3TEMP$$
+
+ if [ $? = 1 ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ exit
+ fi
+
+-CBLOGIN="`cat /tmp/cb3TEMP$$`"
++CBLOGIN="`cat $TMP/cb3TEMP$$`"
+
+ if [ -z "$CBLOGIN" ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ echo "No Login for Callback."
+@@ -269,24 +300,24 @@
+ fi
+
+ if [ ! -z "$CBLOGIN" ]; then
+-echo "What is the Password for: $CBLOGIN" > /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Example: Ziy79Kie" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
++echo "What is the Password for: $CBLOGIN" > $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Example: Ziy79Kie" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
+
+-dialog --backtitle "CALLBACK PASSWORD? ..." --inputbox "`cat /tmp/txtTEMP$$`" 10 64 2> /tmp/cb4TEMP$$
++dialog --backtitle "CALLBACK PASSWORD? ..." --inputbox "`cat $TMP/txtTEMP$$`" 10 64 2> $TMP/cb4TEMP$$
+
+ if [ $? = 1 ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ exit 1
+ fi
+
+-CBPASS="`cat /tmp/cb4TEMP$$`"
++CBPASS="`cat $TMP/cb4TEMP$$`"
+
+ if [ -z "$CBPASS" ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ echo "No Password for Callback."
+@@ -296,13 +327,13 @@
+
+ callback1() {
+ cat << EOF
+-TIMEOUT 10
++TIMEOUT 60
+ ABORT BUSY
+ ABORT ERROR
+ ABORT VOICE
+ ABORT "NO CARRIER"
+ ABORT "NO DIALTONE"
+-"" "AT\&FW1S0=1H0"
++"" "AT\&FS0=1H0"
+ OK "ATDT$PHONENUM"
+ TIMEOUT 60
+ CONNECT ""
+@@ -322,13 +353,13 @@
+
+ callback2() {
+ cat << EOF
+-TIMEOUT 10
++TIMEOUT 60
+ ABORT BUSY
+ ABORT ERROR
+ ABORT VOICE
+ ABORT "NO CARRIER"
+ ABORT "NO DIALTONE"
+-"" "AT\&FW1S0=1H0"
++"" "AT\&FS0=1H0"
+ OK "ATDT$PHONENUM"
+ TIMEOUT 60
+ CONNECT ""
+@@ -344,13 +375,13 @@
+
+ callback3() {
+ cat << EOF
+-TIMEOUT 10
++TIMEOUT 60
+ ABORT BUSY
+ ABORT ERROR
+ ABORT VOICE
+ ABORT "NO CARRIER"
+ ABORT "NO DIALTONE"
+-"" "AT\&FW1S0=1H0"
++"" "AT\&FS0=1H0"
+ OK "ATDT$PHONENUM"
+ TIMEOUT 60
+ CONNECT ""
+@@ -368,13 +399,13 @@
+
+ callback4() {
+ cat << EOF
+-TIMEOUT 10
++TIMEOUT 60
+ ABORT BUSY
+ ABORT ERROR
+ ABORT VOICE
+ ABORT "NO CARRIER"
+ ABORT "NO DIALTONE"
+-"" "AT\&FW1S0=1H0"
++"" "AT\&FS0=1H0"
+ OK "ATDT$PHONENUM"
+ TIMEOUT 60
+ CONNECT ""
+@@ -393,13 +424,13 @@
+
+ callback5() {
+ cat << EOF
+-TIMEOUT 10
++TIMEOUT 60
+ ABORT BUSY
+ ABORT ERROR
+ ABORT VOICE
+ ABORT "NO CARRIER"
+ ABORT "NO DIALTONE"
+-"" "AT\&FW1S0=1H0"
++"" "AT\&FS0=1H0"
+ OK "ATDT$PHONENUM"
+ TIMEOUT 60
+ CONNECT ""
+@@ -417,13 +448,13 @@
+
+ callback6() {
+ cat << EOF
+-TIMEOUT 10
++TIMEOUT 60
+ ABORT BUSY
+ ABORT ERROR
+ ABORT VOICE
+ ABORT "NO CARRIER"
+ ABORT "NO DIALTONE"
+-"" "AT\&FW1S0=1H0"
++"" "AT\&FS0=1H0"
+ OK "ATDT$PHONENUM"
+ TIMEOUT 60
+ CONNECT ""
+@@ -440,13 +471,13 @@
+
+ callback7() {
+ cat << EOF
+-TIMEOUT 10
++TIMEOUT 60
+ ABORT BUSY
+ ABORT ERROR
+ ABORT VOICE
+ ABORT "NO CARRIER"
+ ABORT "NO DIALTONE"
+-"" "AT\&FW1S0=1H0"
++"" "AT\&FS0=1H0"
+ OK "ATDT$PHONENUM"
+ TIMEOUT 60
+ CONNECT ""
+@@ -465,20 +496,20 @@
+ mkdir -p /etc/ppp
+ fi
+
+-if [ -s /tmp/cb1TEMP$$ ]; then
+-if [ -s /tmp/cb1.1TEMP$$ ] && [ -s /tmp/cb2TEMP$$ ] && [ -s /tmp/cb3TEMP$$ ] && [ -s /tmp/cb4TEMP$$ ]; then
++if [ -s $TMP/cb1TEMP$$ ]; then
++if [ -s $TMP/cb1.1TEMP$$ ] && [ -s $TMP/cb2TEMP$$ ] && [ -s $TMP/cb3TEMP$$ ] && [ -s $TMP/cb4TEMP$$ ]; then
+ callback1 > /etc/ppp/callback
+-elif [ ! -s /tmp/cb1.1TEMP$$ ] && [ ! -s /tmp/cb2TEMP$$ ] && [ ! -s /tmp/cb3TEMP$$ ] && [ ! -s /tmp/cb4TEMP$$ ]; then
++elif [ ! -s $TMP/cb1.1TEMP$$ ] && [ ! -s $TMP/cb2TEMP$$ ] && [ ! -s $TMP/cb3TEMP$$ ] && [ ! -s $TMP/cb4TEMP$$ ]; then
+ callback2 > /etc/ppp/callback
+-elif [ ! -s /tmp/cb1.1TEMP$$ ] && [ ! -s /tmp/cb2TEMP$$ ] && [ -s /tmp/cb3TEMP$$ ] && [ -s /tmp/cb4TEMP$$ ]; then
++elif [ ! -s $TMP/cb1.1TEMP$$ ] && [ ! -s $TMP/cb2TEMP$$ ] && [ -s $TMP/cb3TEMP$$ ] && [ -s $TMP/cb4TEMP$$ ]; then
+ callback3 > /etc/ppp/callback
+-elif [ ! -s /tmp/cb1.1TEMP$$ ] && [ -s /tmp/cb2TEMP$$ ] && [ -s /tmp/cb3TEMP$$ ] && [ -s /tmp/cb4TEMP$$ ]; then
++elif [ ! -s $TMP/cb1.1TEMP$$ ] && [ -s $TMP/cb2TEMP$$ ] && [ -s $TMP/cb3TEMP$$ ] && [ -s $TMP/cb4TEMP$$ ]; then
+ callback4 > /etc/ppp/callback
+-elif [ -s /tmp/cb1.1TEMP$$ ] && [ -s /tmp/cb2TEMP$$ ] && [ ! -s /tmp/cb3TEMP$$ ] && [ ! -s /tmp/cb4TEMP$$ ]; then
++elif [ -s $TMP/cb1.1TEMP$$ ] && [ -s $TMP/cb2TEMP$$ ] && [ ! -s $TMP/cb3TEMP$$ ] && [ ! -s $TMP/cb4TEMP$$ ]; then
+ callback5 > /etc/ppp/callback
+-elif [ -s /tmp/cb1.1TEMP$$ ] && [ ! -s /tmp/cb3TEMP$$ ] && [ ! -s /tmp/cb4TEMP$$ ]; then
++elif [ -s $TMP/cb1.1TEMP$$ ] && [ ! -s $TMP/cb3TEMP$$ ] && [ ! -s $TMP/cb4TEMP$$ ]; then
+ callback6 > /etc/ppp/callback
+-elif [ -s /tmp/cb2TEMP$$ ] && [ ! -s /tmp/cb3TEMP$$ ] && [ ! -s /tmp/cb4TEMP$$ ]; then
++elif [ -s $TMP/cb2TEMP$$ ] && [ ! -s $TMP/cb3TEMP$$ ] && [ ! -s $TMP/cb4TEMP$$ ]; then
+ callback7 > /etc/ppp/callback
+ fi
+ fi
+@@ -488,93 +519,93 @@
+ chmod 600 /etc/ppp/callback 2>/dev/null
+ fi
+
+-if [ ! -s /tmp/cb1TEMP$$ ]; then
+-echo 'The default modem init string will be: "AT\&FW1H0" OK' > /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "If you want to change it, put your init string in the box below." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "If you use \ in the init string, put it twice." >> /tmp/txtTEMP$$
+-echo 'Example: "AT\&F\\K3\\N3W1H0" OK' >> /tmp/txtTEMP$$
+-echo "M = No sound. W1 or S95=46 = Show CARRIER speed: 28800 etc." >> /tmp/txtTEMP$$
+-echo 'Put "" around each init string with "&" in it.' >> /tmp/txtTEMP$$
+-echo 'Put OK after each init string. Example: ATZ OK "AT\&F1MW1H0" OK' >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Just press [Enter] on a empty box to accept the default above." >> /tmp/txtTEMP$$
++if [ ! -s $TMP/cb1TEMP$$ ]; then
++echo 'The default modem init string will be: "AT&FH0" OK' > $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "If you want to change it, put your init string in the box below." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "If you use \ in the init string, put it twice." >> $TMP/txtTEMP$$
++echo 'Example: "AT\&F\\K3\\N3H0" OK' >> $TMP/txtTEMP$$
++echo "M = No sound. S95=46 = Show CARRIER speed: 28800 etc." >> $TMP/txtTEMP$$
++echo 'Put "" around each init string with "&" in it.' >> $TMP/txtTEMP$$
++echo 'Put OK after each init string. Example: ATZ OK "AT\&F1MH0" OK' >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Just press [Enter] on a empty box to accept the default above." >> $TMP/txtTEMP$$
+
+-dialog --backtitle "MODEM INIT STRING ..." --inputbox "`cat /tmp/txtTEMP$$`" 18 74 2> /tmp/rspTEMP$$
++dialog --backtitle "MODEM INIT STRING ..." --inputbox "`cat $TMP/txtTEMP$$`" 18 74 2> $TMP/rspTEMP$$
+
+ if [ $? = 1 ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ exit
+ fi
+
+-if [ -s /tmp/rspTEMP$$ ]; then
+-INIT="`cat /tmp/rspTEMP$$`"
++if [ -s $TMP/rspTEMP$$ ]; then
++INIT="`cat $TMP/rspTEMP$$`"
+ else
+ INIT="below"
+ fi
+ fi
+
+-echo "What is your (I)nternet (S)ervice (P)rovider's domain name?" > /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "This is usually something like..." >> /tmp/txtTEMP$$
+-echo "Examples: something.edu something.net something.com something.org" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
++echo "What is your (I)nternet (S)ervice (P)rovider's domain name?" > $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "This is usually something like..." >> $TMP/txtTEMP$$
++echo "Examples: something.edu something.net something.com something.org" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
+
+-dialog --backtitle "DOMAIN NAME ..." --inputbox "`cat /tmp/txtTEMP$$`" 11 74 2> /tmp/rspTEMP$$
++dialog --backtitle "DOMAIN NAME ..." --inputbox "`cat $TMP/txtTEMP$$`" 11 74 2> $TMP/rspTEMP$$
+
+ if [ $? = 1 ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ exit
+ fi
+
+-DOMAINNAME="`cat /tmp/rspTEMP$$`"
++DOMAINNAME="`cat $TMP/rspTEMP$$`"
+
+-echo "What is the IP address of your Internet provider's nameserver?" > /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "It's important that these IP numbers be correct." >> /tmp/txtTEMP$$
+-echo "The IP numbers should not be: 0.0.0.0" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Note: Your service provider's technical support can provide you" >> /tmp/txtTEMP$$
+-echo "with this information. Example: 207.132.116.5" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
++echo "What is the IP address of your Internet provider's nameserver?" > $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "It's important that these IP numbers be correct." >> $TMP/txtTEMP$$
++echo "The IP numbers should not be: 0.0.0.0" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Note: Your service provider's technical support can provide you" >> $TMP/txtTEMP$$
++echo "with this information. Example: 207.132.116.5" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
+
+-dialog --backtitle "DNS IP ADDRESS ..." --inputbox "`cat /tmp/txtTEMP$$`" 14 74 2> /tmp/rspTEMP$$
++dialog --backtitle "DNS IP ADDRESS ..." --inputbox "`cat $TMP/txtTEMP$$`" 14 74 2> $TMP/rspTEMP$$
+
+ if [ $? = 1 ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ exit
+ fi
+
+-DNSIP="`cat /tmp/rspTEMP$$`"
++DNSIP="`cat $TMP/rspTEMP$$`"
+
+-if [ ! -s /tmp/cb3TEMP$$ ]; then
+-echo "Does your service provider use PAP or CHAP?" > /tmp/txtTEMP$$
+-echo "If you're presented with a Username: or Login: and Password:" >> /tmp/txtTEMP$$
+-echo "prompt when you connect to your service provider, they're" >> /tmp/txtTEMP$$
+-echo "'probably' not using PAP or CHAP, so you can answer SCRIPT." >> /tmp/txtTEMP$$
+-echo "I said 'probably', the only way to know for sure is to ask you're" >> /tmp/txtTEMP$$
+-echo "service provider, this could save you a lot of wasted time." >> /tmp/txtTEMP$$
++if [ ! -s $TMP/cb3TEMP$$ ]; then
++echo "Does your service provider use PAP or CHAP?" > $TMP/txtTEMP$$
++echo "If you're presented with a Username: or Login: and Password:" >> $TMP/txtTEMP$$
++echo "prompt when you connect to your service provider, they're" >> $TMP/txtTEMP$$
++echo "'probably' not using PAP or CHAP, so you can answer SCRIPT." >> $TMP/txtTEMP$$
++echo "I said 'probably', the only way to know for sure is to ask you're" >> $TMP/txtTEMP$$
++echo "service provider, this could save you a lot of wasted time." >> $TMP/txtTEMP$$
+
+-dialog --backtitle "PAP, CHAP, or SCRIPT? ..." --menu "`cat /tmp/txtTEMP$$`" 16 72 4 \
++dialog --backtitle "PAP, CHAP, or SCRIPT? ..." --menu "`cat $TMP/txtTEMP$$`" 16 72 4 \
+ PAP "AUTHENTICATION" \
+ CHAP "AUTHENTICATION" \
+ MS-CHAP-80 "is microsoft's version of CHAP." \
+-SCRIPT "Create Chat Script For Login." 2> /tmp/papTEMP
++SCRIPT "Create Chat Script For Login." 2> $TMP/papTEMP
+
+ if [ $? = 1 ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ exit
+ else
+-PAP="`cat /tmp/papTEMP`"
++PAP="`cat $TMP/papTEMP`"
+ fi
+ fi
+
+@@ -595,46 +626,46 @@
+
+ if [ "$PAP" = "MS-CHAP-80" ]; then
+ if [ ! -z "$DOMAINNAME" ]; then
+-echo > /tmp/txtTEMP$$
+-echo "You gave $DOMAINNAME for domain name, this will be the" >> /tmp/txtTEMP$$
+-echo "NT server you connect to when you dial: $PHONENUM" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
++echo > $TMP/txtTEMP$$
++echo "You gave $DOMAINNAME for domain name, this will be the" >> $TMP/txtTEMP$$
++echo "NT server you connect to when you dial: $PHONENUM" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
+ else
+-echo > /tmp/txtTEMP$$
++echo > $TMP/txtTEMP$$
+ fi
+-RAS >> /tmp/txtTEMP$$
++RAS >> $TMP/txtTEMP$$
+
+-dialog --title "MS-CHAP NT server, Stand-alone or ? ..." --menu "`cat /tmp/txtTEMP$$`" 22 72 2 \
++dialog --title "MS-CHAP NT server, Stand-alone or ? ..." --menu "`cat $TMP/txtTEMP$$`" 22 72 2 \
+ MS-CHAP-SERVER-1 "Stand-alone..." \
+-MS-CHAP-SERVER-2 "Queries domain controller..." 2> /tmp/mschapTEMP
++MS-CHAP-SERVER-2 "Queries domain controller..." 2> $TMP/mschapTEMP
+
+ if [ $? = 1 ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ exit
+ fi
+
+-MSCHAP="`cat /tmp/mschapTEMP`"
++MSCHAP="`cat $TMP/mschapTEMP`"
+
+ if [ "$MSCHAP" = "MS-CHAP-SERVER-2" ]; then
+-echo "Put the name of the domain you have your account on." > /tmp/txtTEMP0
+-echo "Example: fooboo" >> /tmp/txtTEMP0
+-echo >> /tmp/txtTEMP0
++echo "Put the name of the domain you have your account on." > $TMP/txtTEMP0
++echo "Example: fooboo" >> $TMP/txtTEMP0
++echo >> $TMP/txtTEMP0
+
+-dialog --backtitle "MS-CHAP QUERY DOMAIN? ..." --inputbox "`cat /tmp/txtTEMP0`" 9 64 2> /tmp/rspTEMP0
++dialog --backtitle "MS-CHAP QUERY DOMAIN? ..." --inputbox "`cat $TMP/txtTEMP0`" 9 64 2> $TMP/rspTEMP0
+
+ if [ $? = 1 ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ exit
+ fi
+
+-MSDOMAIN="`cat /tmp/rspTEMP0`"
++MSDOMAIN="`cat $TMP/rspTEMP0`"
+
+-if [ ! -s /tmp/rspTEMP0 ]; then
+-rm -f /tmp/*TEMP*
++if [ ! -s $TMP/rspTEMP0 ]; then
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ echo "No ms-chap query domain name given."
+@@ -643,32 +674,32 @@
+ fi
+ fi
+
+-if [ ! "$PAP" = "SCRIPT" ] && [ ! -s /tmp/cb3TEMP$$ ]; then
+-echo "Put your Login = Username in the box below." > /tmp/txtTEMP1
+-echo >> /tmp/txtTEMP1
+-echo "Sometimes they want your username or number followed" >> /tmp/txtTEMP1
+-echo "by their @domain name like this below." >> /tmp/txtTEMP1
+-echo "Example: jerry@foo.boo.com" >> /tmp/txtTEMP1
+-echo "Example: 1234567@foo.boo.com" >> /tmp/txtTEMP1
+-echo >> /tmp/txtTEMP1
+-echo "Sometimes the username is two words." >> /tmp/txtTEMP1
+-echo "Example: jerry donut" >> /tmp/txtTEMP1
+-echo >> /tmp/txtTEMP1
+-echo "Usally it's just your username like this below." >> /tmp/txtTEMP1
+-echo "Example: jerry" >> /tmp/txtTEMP1
+-echo >> /tmp/txtTEMP1
++if [ ! "$PAP" = "SCRIPT" ] && [ ! -s $TMP/cb3TEMP$$ ]; then
++echo "Put your Login = Username in the box below." > $TMP/txtTEMP1
++echo >> $TMP/txtTEMP1
++echo "Sometimes they want your username or number followed" >> $TMP/txtTEMP1
++echo "by their @domain name like this below." >> $TMP/txtTEMP1
++echo "Example: jerry@foo.boo.com" >> $TMP/txtTEMP1
++echo "Example: 1234567@foo.boo.com" >> $TMP/txtTEMP1
++echo >> $TMP/txtTEMP1
++echo "Sometimes the username is two words." >> $TMP/txtTEMP1
++echo "Example: jerry donut" >> $TMP/txtTEMP1
++echo >> $TMP/txtTEMP1
++echo "Usally it's just your username like this below." >> $TMP/txtTEMP1
++echo "Example: jerry" >> $TMP/txtTEMP1
++echo >> $TMP/txtTEMP1
+
+-dialog --backtitle "PAP or CHAP LOGIN? ..." --inputbox "`cat /tmp/txtTEMP1`" 19 64 2> /tmp/rspTEMP1
++dialog --backtitle "PAP or CHAP LOGIN? ..." --inputbox "`cat $TMP/txtTEMP1`" 19 64 2> $TMP/rspTEMP1
+
+ if [ $? = 1 ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ exit
+ fi
+
+-if [ ! -s /tmp/rspTEMP1 ]; then
+-rm -f /tmp/*TEMP*
++if [ ! -s $TMP/rspTEMP1 ]; then
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ echo "No username for pap, chap, or ms-chap given."
+@@ -676,119 +707,119 @@
+ fi
+ fi
+
+-if [ -s /tmp/rspTEMP1 ]; then
+-AUTH1="`cat /tmp/rspTEMP1`"
+-echo "$AUTH1" > /tmp/txtTEMP2
+-echo "What's the password for the username above?" >> /tmp/txtTEMP2
+-echo "Example: Xpi9u87T" >> /tmp/txtTEMP2
+-dialog --backtitle "PAP or CHAP PASSWORD? ..." --inputbox "`cat /tmp/txtTEMP2`" 10 64 2> /tmp/rspTEMP2
++if [ -s $TMP/rspTEMP1 ]; then
++AUTH1="`cat $TMP/rspTEMP1`"
++echo "$AUTH1" > $TMP/txtTEMP2
++echo "What's the password for the username above?" >> $TMP/txtTEMP2
++echo "Example: Xpi9u87T" >> $TMP/txtTEMP2
++dialog --backtitle "PAP or CHAP PASSWORD? ..." --inputbox "`cat $TMP/txtTEMP2`" 10 64 2> $TMP/rspTEMP2
+
+-AUTH2="`cat /tmp/rspTEMP2`"
++AUTH2="`cat $TMP/rspTEMP2`"
+ END=""
+
+-elif [ ! -s /tmp/cb1TEMP$$ ] && [ "$PAP" = "SCRIPT" ]; then
++elif [ ! -s $TMP/cb1TEMP$$ ] && [ "$PAP" = "SCRIPT" ]; then
+ END='""'
+-echo "If you reached this part of the script, it should be because you" > /tmp/txtTEMP$$
+-echo "skipped the PAP or CHAP? and CALLBACK? parts of this script." >> /tmp/txtTEMP$$
+-echo "In other words, your service provider is not using PAP, CHAP, or" >> /tmp/txtTEMP$$
+-echo "CALLBACK." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Now comes the tough part. :) I need to know what your" >> /tmp/txtTEMP$$
+-echo "service provider prints to your screen when you dial in," >> /tmp/txtTEMP$$
+-echo "and what you respond with." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Usally when you connect to your service provider you see a" >> /tmp/txtTEMP$$
+-echo "Username: or Login: prompt, and you respond with your name." >> /tmp/txtTEMP$$
+-echo "Then there's a Password: prompt and you respond with your" >> /tmp/txtTEMP$$
+-echo "password." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "If you're not sure if it's Login: or login:, just put ogin:" >> /tmp/txtTEMP$$
+-echo "you don't have to spell the whole thing out, the end part of" >> /tmp/txtTEMP$$
+-echo "what to wait for should be enough." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo 'If they put this for example "foobar fooboo ID:", you could just' >> /tmp/txtTEMP$$
+-echo 'put ID: or you could spell the whole thing out & put "" around it.' >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "What text should I wait for?" >> /tmp/txtTEMP$$
+-echo "ID:" >> /tmp/txtTEMP$$
+-echo "What text should I send?" >> /tmp/txtTEMP$$
+-echo "jerry" >> /tmp/txtTEMP$$
+-echo "What text should I wait for?" >> /tmp/txtTEMP$$
+-echo '"foobar fooboo ID:"' >> /tmp/txtTEMP$$
+-echo "What text should I send?" >> /tmp/txtTEMP$$
+-echo "jerry" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Sometimes you may want to wait for nothing, but send something." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "What text should I wait for?" >> /tmp/txtTEMP$$
+-echo '""' >> /tmp/txtTEMP$$
+-echo "What text should I send?" >> /tmp/txtTEMP$$
+-echo "something" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo '"" = wait for nothing.' >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "If you don't want your password printed out put \q in front of it." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "What text should I wait for?" >> /tmp/txtTEMP$$
+-echo "Password:" >> /tmp/txtTEMP$$
+-echo "What text should I send?" >> /tmp/txtTEMP$$
+-echo "\qsecret" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "ogin: = Login: name: = Username: word: = Password:" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "This below would end up looking like this in the /etc/ppp/pppscript" >> /tmp/txtTEMP$$
+-echo "file created by pppsetup when you're done." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "ogin: jerry" >> /tmp/txtTEMP$$
+-echo "word: secret" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "For example..." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "What text should I wait for?" >> /tmp/txtTEMP$$
+-echo "ogin:" >> /tmp/txtTEMP$$
+-echo "And what text should I send?" >> /tmp/txtTEMP$$
+-echo "jerry" >> /tmp/txtTEMP$$
+-echo "What text should I wait for?" >> /tmp/txtTEMP$$
+-echo "word:" >> /tmp/txtTEMP$$
+-echo "And what text should I send?" >> /tmp/txtTEMP$$
+-echo "secret" >> /tmp/txtTEMP$$
+-echo "What text should I wait for?" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "( End by pressing Enter on an empty = blank wait for? box. )" >> /tmp/txtTEMP$$
++echo "If you reached this part of the script, it should be because you" > $TMP/txtTEMP$$
++echo "skipped the PAP or CHAP? and CALLBACK? parts of this script." >> $TMP/txtTEMP$$
++echo "In other words, your service provider is not using PAP, CHAP, or" >> $TMP/txtTEMP$$
++echo "CALLBACK." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Now comes the tough part. :) I need to know what your" >> $TMP/txtTEMP$$
++echo "service provider prints to your screen when you dial in," >> $TMP/txtTEMP$$
++echo "and what you respond with." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Usally when you connect to your service provider you see a" >> $TMP/txtTEMP$$
++echo "Username: or Login: prompt, and you respond with your name." >> $TMP/txtTEMP$$
++echo "Then there's a Password: prompt and you respond with your" >> $TMP/txtTEMP$$
++echo "password." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "If you're not sure if it's Login: or login:, just put ogin:" >> $TMP/txtTEMP$$
++echo "you don't have to spell the whole thing out, the end part of" >> $TMP/txtTEMP$$
++echo "what to wait for should be enough." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo 'If they put this for example "foobar fooboo ID:", you could just' >> $TMP/txtTEMP$$
++echo 'put ID: or you could spell the whole thing out & put "" around it.' >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "What text should I wait for?" >> $TMP/txtTEMP$$
++echo "ID:" >> $TMP/txtTEMP$$
++echo "What text should I send?" >> $TMP/txtTEMP$$
++echo "jerry" >> $TMP/txtTEMP$$
++echo "What text should I wait for?" >> $TMP/txtTEMP$$
++echo '"foobar fooboo ID:"' >> $TMP/txtTEMP$$
++echo "What text should I send?" >> $TMP/txtTEMP$$
++echo "jerry" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Sometimes you may want to wait for nothing, but send something." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "What text should I wait for?" >> $TMP/txtTEMP$$
++echo '""' >> $TMP/txtTEMP$$
++echo "What text should I send?" >> $TMP/txtTEMP$$
++echo "something" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo '"" = wait for nothing.' >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "If you don't want your password printed out put \q in front of it." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "What text should I wait for?" >> $TMP/txtTEMP$$
++echo "Password:" >> $TMP/txtTEMP$$
++echo "What text should I send?" >> $TMP/txtTEMP$$
++echo "\qsecret" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "ogin: = Login: name: = Username: word: = Password:" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "This below would end up looking like this in the /etc/ppp/pppscript" >> $TMP/txtTEMP$$
++echo "file created by pppsetup when you're done." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "ogin: jerry" >> $TMP/txtTEMP$$
++echo "word: secret" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "For example..." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "What text should I wait for?" >> $TMP/txtTEMP$$
++echo "ogin:" >> $TMP/txtTEMP$$
++echo "And what text should I send?" >> $TMP/txtTEMP$$
++echo "jerry" >> $TMP/txtTEMP$$
++echo "What text should I wait for?" >> $TMP/txtTEMP$$
++echo "word:" >> $TMP/txtTEMP$$
++echo "And what text should I send?" >> $TMP/txtTEMP$$
++echo "secret" >> $TMP/txtTEMP$$
++echo "What text should I wait for?" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "( End by pressing Enter on an empty = blank wait for? box. )" >> $TMP/txtTEMP$$
+
+-dialog --title "CHAT SCRIPT" --textbox "/tmp/txtTEMP$$" 22 72
++dialog --title "CHAT SCRIPT" --textbox "$TMP/txtTEMP$$" 22 72
+
+ MESSAGE=' '
+ YOUSAY=' '
+ while [ ! "$MESSAGE" = "" -a ! "$YOUSAY" = "" ]
+ do
+
+-echo " End by pressing Enter on a empty = blank box." > /tmp/txtTEMP$$
+-echo " What text should I wait for?" >> /tmp/txtTEMP$$
+-dialog --backtitle "EXPECT ..." --inputbox "`cat /tmp/txtTEMP$$`" 9 60 2> /tmp/rspTEMP$$
++echo " End by pressing Enter on a empty = blank box." > $TMP/txtTEMP$$
++echo " What text should I wait for?" >> $TMP/txtTEMP$$
++dialog --backtitle "EXPECT ..." --inputbox "`cat $TMP/txtTEMP$$`" 9 60 2> $TMP/rspTEMP$$
+
+-MESSAGE="`cat /tmp/rspTEMP$$`"
++MESSAGE="`cat $TMP/rspTEMP$$`"
+
+ if [ -z "$MESSAGE" ]; then
+ continue
+ fi
+
+-dialog --backtitle "SEND ..." --inputbox "And what text should I send?" 8 60 2> /tmp/rspTEMP$$
++dialog --backtitle "SEND ..." --inputbox "And what text should I send?" 8 60 2> $TMP/rspTEMP$$
+
+ if [ $? = 1 ]; then
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ clear 2>/dev/null || echo
+ echo "PPP configuration cancelled."
+ exit
+ fi
+
+-YOUSAY="`cat /tmp/rspTEMP$$`"
++YOUSAY="`cat $TMP/rspTEMP$$`"
+
+-echo "$MESSAGE $YOUSAY" >> /tmp/sayTEMP1
++echo "$MESSAGE $YOUSAY" >> $TMP/sayTEMP1
+
+ if [ -z "$YOUSAY" ]; then
+ clear 2>/dev/null || echo
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ echo "PPP configuration cancelled."
+ echo "Nothing to send."
+ exit
+@@ -798,22 +829,22 @@
+ done
+ fi
+
+-if [ ! -s /tmp/cb3TEMP$$ ]; then
+-if [ -s /tmp/cb1TEMP$$ ] && [ ! -s /tmp/cb3TEMP$$ ] && [ "$PAP" = "SCRIPT" ]; then
++if [ ! -s $TMP/cb3TEMP$$ ]; then
++if [ -s $TMP/cb1TEMP$$ ] && [ ! -s $TMP/cb3TEMP$$ ] && [ "$PAP" = "SCRIPT" ]; then
+ clear 2>/dev/null || echo
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ echo "PPP configuration cancelled."
+ echo "You chose callback with PAP or CHAP, but answered SCRIPT to PAP or CHAP?."
+ exit
+-elif [ ! -s /tmp/rspTEMP2 ] && [ -s /tmp/rspTEMP1 ]; then
++elif [ ! -s $TMP/rspTEMP2 ] && [ -s $TMP/rspTEMP1 ]; then
+ clear 2>/dev/null || echo
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ echo "PPP configuration cancelled."
+ echo "No password for: $AUTH1"
+ exit
+-elif [ ! -s /tmp/sayTEMP1 ] && [ ! -s /tmp/rspTEMP2 ]; then
++elif [ ! -s $TMP/sayTEMP1 ] && [ ! -s $TMP/rspTEMP2 ]; then
+ clear 2>/dev/null || echo
+-rm -f /tmp/*TEMP*
++rm -f $TMP/*TEMP*
+ echo "PPP configuration cancelled."
+ echo "Nothing to wait for."
+ exit
+@@ -868,9 +899,9 @@
+ PATH1="pppd"
+ fi
+
+-if [ "$PATH1" != "pppd" ]; then
+-chmod 4755 $PATH1 2>/dev/null
+-fi
++#if [ "$PATH1" != "pppd" ]; then
++#chmod 4755 $PATH1 2>/dev/null
++#fi
+
+ if [ -x /usr/sbin/chat ]; then
+ PATH2="/usr/sbin/chat"
+@@ -886,14 +917,14 @@
+ PATH2="chat"
+ fi
+
+-if [ ! -s /tmp/cb1TEMP$$ ]; then
+-echo "TIMEOUT 10" > /etc/ppp/pppscript
++if [ ! -s $TMP/cb1TEMP$$ ]; then
++echo "TIMEOUT 60" > /etc/ppp/pppscript
+ echo "ABORT ERROR" >> /etc/ppp/pppscript
+ echo "ABORT BUSY" >> /etc/ppp/pppscript
+ echo 'ABORT "NO CARRIER"' >> /etc/ppp/pppscript
+ echo 'ABORT "NO DIALTONE"' >> /etc/ppp/pppscript
+ if [ "$INIT" = "below" ]; then
+-echo '"" "AT\&FW1H0"' >> /etc/ppp/pppscript
++echo '"" "AT&FH0"' >> /etc/ppp/pppscript
+ echo 'OK "'$PHONENUM'"' >> /etc/ppp/pppscript
+ else
+ echo '"" '$INIT'' >> /etc/ppp/pppscript
+@@ -905,8 +936,8 @@
+ chmod 600 /etc/ppp/pppscript 2>/dev/null
+ fi
+
+-if [ -s /tmp/sayTEMP1 ]; then
+-cat /tmp/sayTEMP1 >> /etc/ppp/pppscript
++if [ -s $TMP/sayTEMP1 ]; then
++cat $TMP/sayTEMP1 >> /etc/ppp/pppscript
+ echo >> /etc/ppp/pppscript
+ else
+ echo >> /etc/ppp/pppscript
+@@ -948,9 +979,9 @@
+ echo "# The CARRIER speed at which you connected will be reported, if it's in" >> /etc/ppp/ip-up
+ echo '# the /var/log/messages file. You also need the programs "tail" "cut"' >> /etc/ppp/ip-up
+ echo '# "tr" "grep" and "syslogd" running for this to work.' >> /etc/ppp/ip-up
+-echo "# You may have to add W1 or S95=46 to your modem init string" >> /etc/ppp/ip-up
++echo "# You may have to add S95=46 to your modem init string" >> /etc/ppp/ip-up
+ echo "# to get your modem to report the DCE = CARRIER speed." >> /etc/ppp/ip-up
+-echo "# Examples: AT&FW1 or AT&FS95=46" >> /etc/ppp/ip-up
++echo "# Example: AT&FS95=46" >> /etc/ppp/ip-up
+
+ echo >> /etc/ppp/ip-up
+ echo "if [ -s /var/log/messages ] && ( ps xc 2>/dev/null | grep -q syslogd 2>/dev/null ); then" >> /etc/ppp/ip-up
+@@ -986,7 +1017,8 @@
+ echo >> /etc/ppp/ip-up
+ echo "# End..." >> /etc/ppp/ip-up
+
+-chmod 4755 /etc/ppp/ip-up 2>/dev/null
++#chmod 4755 /etc/ppp/ip-up 2>/dev/null
++chmod 755 /etc/ppp/ip-up 2>/dev/null
+
+ if [ -s /etc/ppp/ip-down ]; then
+ mv /etc/ppp/ip-down /etc/ppp/ip-down.OLD
+@@ -1022,7 +1054,7 @@
+ # You'll see the modem reponse OK and date in the /etc/ppp/modem.cua?,
+ # modem.ttyS?, or modem.modem file.
+ # You need the 'modem-stats' program for this below to work.
+-# ftp://sunsite.unc.edu/pub/apps/serialcomm/modem
++# ftp://metalab.unc.edu/pub/apps/serialcomm/modem
+ # modem-stats-1.0.1.src.elf.tar.gz
+ # Remove the ##### from the lines below.
+
+@@ -1030,7 +1062,8 @@
+ }
+
+ ipdown > /etc/ppp/ip-down
+-chmod 4755 /etc/ppp/ip-down 2>/dev/null
++#chmod 4755 /etc/ppp/ip-down 2>/dev/null
++chmod 755 /etc/ppp/ip-down 2>/dev/null
+
+ echo "#sleep 2 # Make sure the modem is really down." >> /etc/ppp/ip-down
+ echo '#DEV=`echo $2 | sed -e "s./dev/.."`' >> /etc/ppp/ip-down
+@@ -1080,38 +1113,38 @@
+ cat <<EOF
+ grepauth() {
+
+-tail -n 30 /var/log/debug 2>/dev/null | grep -i -s "rcvd" > /tmp/grep.tmp
++tail -n 30 /var/log/debug 2>/dev/null | grep -i -s "rcvd" > $TMP/grep.tmp
+
+-if ( grep -i -q "auth pap" /tmp/grep.tmp ); then
++if ( grep -i -q "auth pap" $TMP/grep.tmp ); then
+ echo
+ echo "They seem to be requesting PAP = <auth pap> for authentication."
+ echo "I don't know if you're setup for 'PAP' or not."
+ echo "Did you answer 'PAP' when you ran pppsetup?"
+ echo
+-elif ( grep -E -i -q "auth chap msoft|auth chap 80" /tmp/grep.tmp ); then
++elif ( grep -E -i -q "auth chap msoft|auth chap 80" $TMP/grep.tmp ); then
+ echo
+ echo "They seem to be requesting MS-CHAP-80 = <auth chap 80> for authentication."
+ echo "I don't know if you're setup for 'MS-CHAP' or not."
+ echo "Did you answer 'MS-CHAP' when you ran pppsetup?"
+ echo
+-elif ( grep -i -q "auth chap" /tmp/grep.tmp ); then
++elif ( grep -i -q "auth chap" $TMP/grep.tmp ); then
+ echo "They seem to be requesting CHAP = <auth chap> for authentication."
+ echo "I don't know if you're setup for 'CHAP' or not."
+ echo "Did you answer 'CHAP' when you ran pppsetup?"
+ echo
+ else
+-rm -f /tmp/grep.tmp
++rm -f $TMP/grep.tmp
+ exit 0
+ fi
+
+-if ( grep -i -q "callback" /tmp/grep.tmp ); then
++if ( grep -i -q "callback" $TMP/grep.tmp ); then
+ echo "They seem to be requesting CALLBACK."
+ echo "I don't know if you're setup for 'callback' or not."
+ echo "Did you answer 'CALLBACK' when you ran pppsetup?"
+ echo
+ fi
+
+-rm -f /tmp/grep.tmp
++rm -f $TMP/grep.tmp
+ }
+ EOF
+ }
+@@ -1124,14 +1157,14 @@
+ echo "killall -INT pppd 2>/dev/null" >> /usr/sbin/ppp-go
+ echo "rm -f /var/lock/LCK* /var/run/ppp*.pid" >> /usr/sbin/ppp-go
+
+-if [ -s /tmp/cb1TEMP$$ ]; then
+-echo '('$PATH1' -detach connect "'$PATH2' -v -s -f /etc/ppp/callback" &) || exit 1' >> /usr/sbin/ppp-go
++if [ -s $TMP/cb1TEMP$$ ]; then
++echo '('$PATH1' -detach connect "'$PATH2' -v -f /etc/ppp/callback" &) || exit 1' >> /usr/sbin/ppp-go
+ else
+-echo '('$PATH1' -detach connect "'$PATH2' -v -s -f /etc/ppp/pppscript" &) || exit 1' >> /usr/sbin/ppp-go
++echo '('$PATH1' -detach connect "'$PATH2' -v -f /etc/ppp/pppscript" &) || exit 1' >> /usr/sbin/ppp-go
+ fi
+
+-echo "read" >> /usr/sbin/ppp-go
+-echo "ifconnect" >> /usr/sbin/ppp-go
++echo "#read" >> /usr/sbin/ppp-go
++echo "#ifconnect" >> /usr/sbin/ppp-go
+ echo "exit 0" >> /usr/sbin/ppp-go
+ echo "fi" >> /usr/sbin/ppp-go
+
+@@ -1140,10 +1173,10 @@
+ echo "killall -INT pppd 2>/dev/null" >> /usr/sbin/ppp-go
+ echo "rm -f /var/lock/LCK* /var/run/ppp*.pid" >> /usr/sbin/ppp-go
+
+-if [ -s /tmp/cb1TEMP$$ ]; then
+-echo '('$PATH1' connect "'$PATH2' -v -f /etc/ppp/callback") || exit 1' >> /usr/sbin/ppp-go
++if [ -s $TMP/cb1TEMP$$ ]; then
++echo '('$PATH1' connect "'$PATH2' -v -f /etc/ppp/callback" 1> /dev/null 2> /dev/null ) || exit 1' >> /usr/sbin/ppp-go
+ else
+-echo '('$PATH1' connect "'$PATH2' -v -f /etc/ppp/pppscript") || exit 1' >> /usr/sbin/ppp-go
++echo '('$PATH1' connect "'$PATH2' -v -f /etc/ppp/pppscript" 1> /dev/null 2> /dev/null ) || exit 1' >> /usr/sbin/ppp-go
+ fi
+
+ echo "exit 0" >> /usr/sbin/ppp-go
+@@ -1194,26 +1227,37 @@
+ echo 'echo "USAGE: ppp-go -h <Help>"' >> /usr/sbin/ppp-go
+ echo "exit 1" >> /usr/sbin/ppp-go
+
+-chmod 4755 /usr/sbin/ppp-go 2>/dev/null
++#chmod 4755 /usr/sbin/ppp-go 2>/dev/null
++chmod 755 /usr/sbin/ppp-go 2>/dev/null
+
+-echo "lock" > /etc/ppp/options
+-echo "defaultroute" >> /etc/ppp/options
+-echo "noipdefault" >> /etc/ppp/options
+-echo "modem" >> /etc/ppp/options
+-echo "/dev/$MODEM" >> /etc/ppp/options
+-echo "$BAUDRATE" >> /etc/ppp/options
+-echo "crtscts" >> /etc/ppp/options
+-echo "debug" >> /etc/ppp/options
+-echo "passive" >> /etc/ppp/options
+-echo "asyncmap 0" >> /etc/ppp/options
++cat << EOF > /etc/ppp/options
++# General configuration options for PPPD:
++lock
++defaultroute
++noipdefault
++modem
++/dev/$MODEM
++$BAUDRATE
++crtscts
++# Uncomment the line below for more verbose error reporting:
++#debug
++# If you have a default route already, pppd may require the other side
++# to authenticate itself, which most ISPs will not do. To work around this,
++# uncomment the line below. Note that this may have negative side effects
++# on system security if you allow PPP dialins. See the docs in /usr/doc/ppp*
++# for more information.
++#noauth
++passive
++asyncmap 0
++EOF
+
+ if [ ! -z "$CBPN" ]; then
+ echo 'callback "'$CBPN'"' >> /etc/ppp/options
+ fi
+
+-if [ "$MSCHAP" = "MS-CHAP-SERVER-2" ] && [ -s /tmp/rspTEMP2 ]; then
++if [ "$MSCHAP" = "MS-CHAP-SERVER-2" ] && [ -s $TMP/rspTEMP2 ]; then
+ echo 'name "'$MSDOMAIN\\\\$AUTH1'"' >> /etc/ppp/options
+-elif [ -s /tmp/rspTEMP2 ]; then
++elif [ -s $TMP/rspTEMP2 ]; then
+ echo 'name "'$AUTH1'"' >> /etc/ppp/options
+ fi
+
+@@ -1277,7 +1321,7 @@
+ echo "0.0.0.0:10.10.10.10" >> /etc/ppp/options.demand
+ echo "demand" >> /etc/ppp/options.demand
+
+-if [ -s /tmp/cb1TEMP$$ ]; then
++if [ -s $TMP/cb1TEMP$$ ]; then
+ echo 'connect "'$PATH2' -v -f /etc/ppp/callback"' >> /etc/ppp/options.demand
+ else
+ echo 'connect "'$PATH2' -v -f /etc/ppp/pppscript"' >> /etc/ppp/options.demand
+@@ -1352,18 +1396,18 @@
+ 0.0.0.0 foobar.localnet foobar
+
+ ~# dip -tv
+-dip> port /dev/cua1
+-can't open - problems with locking cua1
++dip> port /dev/ttyS1
++can't open - problems with locking ttyS1
+
+ If you get the above message after "port /dev/modem", it means you have a
+-lock file in /var/lock/LCK..cua1, remove the lock file and kill dip.
++lock file in /var/lock/LCK..ttyS1, remove the lock file and kill dip.
+
+ ~# rm /var/lock/LCK*
+ # killall -9 dip
+
+ ~# dip -tv
+
+-dip> port /dev/cua1 <-Where's the modem? cua0 = com1 cua1 = com2 etc.)
++dip> port /dev/ttyS1 <-Where's the modem? ttyS0 = com1 ttyS1 = com2 etc.)
+ dip> speed 115200 <-Modem speed: 19200 38400 57600
+ dip> term
+
+@@ -1379,7 +1423,7 @@
+ dip> default <-Use default route.)
+ dip> mode ppp <-Start PPP at your end.)
+
+-~# ping sunsite.unc.edu <-To see if you're connected.)
++~# ping metalab.unc.edu <-To see if you're connected.)
+
+ ~# dip -k <-To kill dip and the PPP connection.)
+
+@@ -1393,7 +1437,7 @@
+ lock
+ defaultroute
+ noipdefault
+-/dev/cua1 <- cua0 = com1 cua1 = com2 cua2 = com3 cua3 = com4
++/dev/ttyS1 <- ttyS0 = com1 ttyS1 = com2 ttyS2 = com3 ttyS3 = com4
+ 57600
+ modem
+ crtscts
+@@ -1419,221 +1463,221 @@
+ }
+
+ echo "=========================================================================" > /etc/ppp/pppsetup.txt
+-cat /tmp/txtTEMP01 >> /etc/ppp/pppsetup.txt
++cat $TMP/txtTEMP01 >> /etc/ppp/pppsetup.txt
+
+-echo "=========================================================================" > /tmp/txtTEMP$$
+-echo "These are your PPP configuration files and instructions..." >> /tmp/txtTEMP$$
+-echo "=========================================================================" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-
+-if [ ! -s /tmp/cb1TEMP$$ ] && [ ! -s /tmp/sayTEMP1 ]; then
+-echo "# This is your /etc/ppp/pppscript." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-cat /etc/ppp/pppscript >> /tmp/txtTEMP$$
+-elif [ ! -s /tmp/cb1TEMP$$ ] && [ -s /tmp/sayTEMP1 ]; then
+-echo "# This is your /etc/ppp/pppscript." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Look at /etc/ppp/pppscript." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-fi
+-
+-if [ -s /tmp/cb1TEMP$$ ]; then
+-echo "# This is your /etc/ppp/callback script." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Look at /etc/ppp/callback." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-fi
+-
+-echo "# This is your /etc/ppp/options file." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-cat /etc/ppp/options >> /tmp/txtTEMP$$
++echo "=========================================================================" > $TMP/txtTEMP$$
++echo "These are your PPP configuration files and instructions..." >> $TMP/txtTEMP$$
++echo "=========================================================================" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++
++if [ ! -s $TMP/cb1TEMP$$ ] && [ ! -s $TMP/sayTEMP1 ]; then
++echo "# This is your /etc/ppp/pppscript." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++cat /etc/ppp/pppscript >> $TMP/txtTEMP$$
++elif [ ! -s $TMP/cb1TEMP$$ ] && [ -s $TMP/sayTEMP1 ]; then
++echo "# This is your /etc/ppp/pppscript." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Look at /etc/ppp/pppscript." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++fi
++
++if [ -s $TMP/cb1TEMP$$ ]; then
++echo "# This is your /etc/ppp/callback script." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Look at /etc/ppp/callback." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++fi
++
++echo "# This is your /etc/ppp/options file." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++cat /etc/ppp/options >> $TMP/txtTEMP$$
+
+ if [ "$MODERROR" = "YES" ]; then
+-echo >> /tmp/txtTEMP$$
+-echo "WARNING: I could not find the modem device: '/dev/$MODEM'" >> /tmp/txtTEMP$$
+-echo "cua0 = com1 cua1 = com2 cua2 = com3 cua3 = com4" >> /tmp/txtTEMP$$
+-echo "# MAKEDEV $MODEM # /dev/MAKEDEV $MODEM" >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "WARNING: I could not find the modem device: '/dev/$MODEM'" >> $TMP/txtTEMP$$
++echo "ttyS0 = com1 ttyS1 = com2 ttyS2 = com3 ttyS3 = com4" >> $TMP/txtTEMP$$
++echo "# MAKEDEV $MODEM # /dev/MAKEDEV $MODEM" >> $TMP/txtTEMP$$
+ fi
+
+ if [ "$DOMAINNAME" = "unknown.com" ] && [ "$PAP" = "MS-CHAP-80" ]; then
+-echo >> /tmp/txtTEMP$$
+-echo "The remotename option is required for microsoft's ms-chap-80." >> /tmp/txtTEMP$$
+-echo "You didn't give a DOMAIN NAME so i put unknown.com, you should" >> /tmp/txtTEMP$$
+-echo "change that to your service providers domain name." >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "The remotename option is required for microsoft's ms-chap-80." >> $TMP/txtTEMP$$
++echo "You didn't give a DOMAIN NAME so i put unknown.com, you should" >> $TMP/txtTEMP$$
++echo "change that to your service providers domain name." >> $TMP/txtTEMP$$
+ fi
+
+ if [ ! "$MODERROR" = "YES" ]; then
+-echo >> /tmp/txtTEMP$$
+-echo "I created the symbolic link: /dev/modem -> /dev/$MODEM" >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "I created the symbolic link: /dev/modem -> /dev/$MODEM" >> $TMP/txtTEMP$$
+ fi
+
+-echo >> /tmp/txtTEMP$$
+-echo "# This is your /etc/ppp/options.demand dialing file." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-cat /etc/ppp/options.demand >> /tmp/txtTEMP$$
+-
+-echo >> /tmp/txtTEMP$$
+-echo "If you have a ethernet connection you should change the local:remote" >> /tmp/txtTEMP$$
+-echo "IP addresses in the options.demand file, to your actual local and" >> /tmp/txtTEMP$$
+-echo "remote address. Example: 215.346.117.89:312.217.187.96" >> /tmp/txtTEMP$$
+-
+-echo >> /tmp/txtTEMP$$
+-echo "# This in your /etc/resolv.conf file." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-cat /etc/resolv.conf >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "# This is your /etc/ppp/options.demand dialing file." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++cat /etc/ppp/options.demand >> $TMP/txtTEMP$$
++
++echo >> $TMP/txtTEMP$$
++echo "If you have a ethernet connection you should change the local:remote" >> $TMP/txtTEMP$$
++echo "IP addresses in the options.demand file, to your actual local and" >> $TMP/txtTEMP$$
++echo "remote address. Example: 215.346.117.89:312.217.187.96" >> $TMP/txtTEMP$$
++
++echo >> $TMP/txtTEMP$$
++echo "# This in your /etc/resolv.conf file." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++cat /etc/resolv.conf >> $TMP/txtTEMP$$
+
+-echo >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
+ if [ -z $DNSIP ]; then
+-echo "207.132.116.5 <-IMPORTANT: This should be the IP address of" >> /tmp/txtTEMP$$
+-echo " your service providers nameserver." >> /tmp/txtTEMP$$
++echo "207.132.116.5 <-IMPORTANT: This should be the IP address of" >> $TMP/txtTEMP$$
++echo " your service providers nameserver." >> $TMP/txtTEMP$$
+ else
+-echo "$DNSIP <-IMPORTANT: This should be the IP address of" >> /tmp/txtTEMP$$
+-echo " your service providers nameserver." >> /tmp/txtTEMP$$
++echo "$DNSIP <-IMPORTANT: This should be the IP address of" >> $TMP/txtTEMP$$
++echo " your service providers nameserver." >> $TMP/txtTEMP$$
+ fi
+
+ if [ -z $DNSIP ]; then
+-echo >> /tmp/txtTEMP$$
+-echo "WARNING: You didn't give a IP address for your internet service" >> /tmp/txtTEMP$$
+-echo "providers nameserver, i put '207.132.116.5' but this may not work." >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "WARNING: You didn't give a IP address for your internet service" >> $TMP/txtTEMP$$
++echo "providers nameserver, i put '207.132.116.5' but this may not work." >> $TMP/txtTEMP$$
+ fi
+
+ if [ "$PAP" = "CHAP" ] || [ "$PAP" = "MS-CHAP-80" ]; then
+-echo >> /tmp/txtTEMP$$
+-echo "# This is your /etc/ppp/chap-secrets file." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Look at /etc/ppp/chap-secrets." >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "# This is your /etc/ppp/chap-secrets file." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Look at /etc/ppp/chap-secrets." >> $TMP/txtTEMP$$
+ fi
+
+ if [ "$DOMAINNAME" = "unknown.com" ] && [ "$PAP" = "MS-CHAP-80" ]; then
+-echo >> /tmp/txtTEMP$$
+-echo "You didn't give a DOMAIN NAME that's why i put unknown.com in" >> /tmp/txtTEMP$$
+-echo "the /etc/ppp/chap-secrets file." >> /tmp/txtTEMP$$
+-echo "You should change that to your service providers domain name." >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "You didn't give a DOMAIN NAME that's why i put unknown.com in" >> $TMP/txtTEMP$$
++echo "the /etc/ppp/chap-secrets file." >> $TMP/txtTEMP$$
++echo "You should change that to your service providers domain name." >> $TMP/txtTEMP$$
+ fi
+
+ if [ "$PAP" = "PAP" ]; then
+-echo >> /tmp/txtTEMP$$
+-echo "# This is your /etc/ppp/pap-secrets file." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "Look at /etc/ppp/pap-secrets." >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "# This is your /etc/ppp/pap-secrets file." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Look at /etc/ppp/pap-secrets." >> $TMP/txtTEMP$$
+ fi
+
+ if [ "$PATH1" = "pppd" ]; then
+-echo >> /tmp/txtTEMP$$
+-echo "ATENTION: I couldn't find <pppd> on your system." >> /tmp/txtTEMP$$
+-echo "You need <pppd> on your system to make the PPP connection." >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "ATENTION: I couldn't find <pppd> on your system." >> $TMP/txtTEMP$$
++echo "You need <pppd> on your system to make the PPP connection." >> $TMP/txtTEMP$$
+ fi
+
+ if [ "$PATH2" = "chat" ]; then
+-echo >> /tmp/txtTEMP$$
+-echo "ATENTION: I couldn't find <chat> on your system." >> /tmp/txtTEMP$$
+-echo "You need <chat> on your system to make the PPP connection." >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "ATENTION: I couldn't find <chat> on your system." >> $TMP/txtTEMP$$
++echo "You need <chat> on your system to make the PPP connection." >> $TMP/txtTEMP$$
+ fi
+
+ if [ ! "$MSG1" = "YES" ] && [ ! "$MSG2" = "YES" ]; then
+-echo >> /tmp/txtTEMP$$
+-echo "ATENTION: I couldn't find 'PPP' in the kernel or as a module." >> /tmp/txtTEMP$$
+-echo "You'll need 'PPP' in the kernel or as a module to make a PPP connection." >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "ATENTION: I couldn't find 'PPP' in the kernel or as a module." >> $TMP/txtTEMP$$
++echo "You'll need 'PPP' in the kernel or as a module to make a PPP connection." >> $TMP/txtTEMP$$
+ fi
+
+ if [ "$PPPRC" = "YES" ]; then
+-echo >> /tmp/txtTEMP$$
+-echo "ATENTION: I found a $HOME/.ppprc file and moved it to" >> /tmp/txtTEMP$$
+-echo ".ppprc.off, it might interfere with the PPP connection." >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "ATENTION: I found a $HOME/.ppprc file and moved it to" >> $TMP/txtTEMP$$
++echo ".ppprc.off, it might interfere with the PPP connection." >> $TMP/txtTEMP$$
+ fi
+
+-echo >> /tmp/txtTEMP$$
+-echo "Does everything look correct? if not, run 'pppsetup' again..." >> /tmp/txtTEMP$$
+-
+-echo >> /tmp/txtTEMP$$
+-echo "=========================================================================" >> /tmp/txtTEMP$$
+-echo "To connect to your service provider." >> /tmp/txtTEMP$$
+-echo "=========================================================================" >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "~# ppp-go <-Make PPP connection.)" >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Does everything look correct? if not, run 'pppsetup' again..." >> $TMP/txtTEMP$$
++
++echo >> $TMP/txtTEMP$$
++echo "=========================================================================" >> $TMP/txtTEMP$$
++echo "To connect to your service provider." >> $TMP/txtTEMP$$
++echo "=========================================================================" >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "~# ppp-go <-Make PPP connection.)" >> $TMP/txtTEMP$$
+
+-echo >> /tmp/txtTEMP$$
+-echo "You'll hear and see the modem dialing then once connected," >> /tmp/txtTEMP$$
+-echo "logging you in Username: or Login: and Password: etc." >> /tmp/txtTEMP$$
+-
+-echo >> /tmp/txtTEMP$$
+-echo "You won't see a Username or Login: and Password: prompt" >> /tmp/txtTEMP$$
+-echo "if they're using PAP or CHAP to authenticate you." >> /tmp/txtTEMP$$
+-
+-echo >> /tmp/txtTEMP$$
+-echo "If they use PAP or CHAP you'll just see CONNECT -- got it." >> /tmp/txtTEMP$$
+-
+-echo >> /tmp/txtTEMP$$
+-echo "If the connection was successful you'll see the Local IP and" >> /tmp/txtTEMP$$
+-echo "Remote IP address printed to the screen, you can press [Enter]." >> /tmp/txtTEMP$$
+-
+-echo >> /tmp/txtTEMP$$
+-echo "If you run ppp-go in X windows you probably won't see a Local" >> /tmp/txtTEMP$$
+-echo "and Remote IP address printed to the screen, you'll just see" >> /tmp/txtTEMP$$
+-echo "the connection process come to a end, wait a few seconds and" >> /tmp/txtTEMP$$
+-echo "press [Enter] at that point." >> /tmp/txtTEMP$$
+-
+-echo >> /tmp/txtTEMP$$
+-echo "If you don't connect for whatever reason e.g. Failed No" >> /tmp/txtTEMP$$
+-echo "Dialtone, Busy, No Carrier, Whatever, Exit, just press" >> /tmp/txtTEMP$$
+-echo "[Enter] at that point." >> /tmp/txtTEMP$$
+-
+-echo >> /tmp/txtTEMP$$
+-echo "if you have syslogd running, you can see the output messages" >> /tmp/txtTEMP$$
+-echo "from pppd and chat in the /var/log/messages and or debug file." >> /tmp/txtTEMP$$
+-
+-echo >> /tmp/txtTEMP$$
+-echo "Sample /var/log/messages file." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "`hostname 2>/dev/null` pppd[562]: Serial connection established." >> /tmp/txtTEMP$$
+-echo "`hostname 2>/dev/null` pppd[562]: Using interface ppp0" >> /tmp/txtTEMP$$
+-echo "`hostname 2>/dev/null` pppd[562]: Connect: ppp0 <--> /dev/modem" >> /tmp/txtTEMP$$
+-echo "`hostname 2>/dev/null` pppd[562]: local IP address 215.87.78.18" >> /tmp/txtTEMP$$
+-echo "`hostname 2>/dev/null` pppd[562]: remote IP address 205.94.97.35" >> /tmp/txtTEMP$$
+-
+-echo >> /tmp/txtTEMP$$
+-echo "You don't have a successful PPP connection until you" >> /tmp/txtTEMP$$
+-echo "receive a local & remote IP address like above." >> /tmp/txtTEMP$$
+-
+-echo >> /tmp/txtTEMP$$
+-echo "If you have the X window system, you could connect in a Xterm." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "`hostname 2>/dev/null` # startx" >> /tmp/txtTEMP$$
+-echo "`hostname 2>/dev/null` # ppp-go" >> /tmp/txtTEMP$$
+-echo "`hostname 2>/dev/null` # netscape mosaic etc." >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "You'll hear and see the modem dialing then once connected," >> $TMP/txtTEMP$$
++echo "logging you in Username: or Login: and Password: etc." >> $TMP/txtTEMP$$
++
++echo >> $TMP/txtTEMP$$
++echo "You won't see a Username or Login: and Password: prompt" >> $TMP/txtTEMP$$
++echo "if they're using PAP or CHAP to authenticate you." >> $TMP/txtTEMP$$
++
++echo >> $TMP/txtTEMP$$
++echo "If they use PAP or CHAP you'll just see CONNECT -- got it." >> $TMP/txtTEMP$$
++
++echo >> $TMP/txtTEMP$$
++echo "If the connection was successful you'll see the Local IP and" >> $TMP/txtTEMP$$
++echo "Remote IP address printed to the screen, you can press [Enter]." >> $TMP/txtTEMP$$
++
++echo >> $TMP/txtTEMP$$
++echo "If you run ppp-go in X windows you probably won't see a Local" >> $TMP/txtTEMP$$
++echo "and Remote IP address printed to the screen, you'll just see" >> $TMP/txtTEMP$$
++echo "the connection process come to a end, wait a few seconds and" >> $TMP/txtTEMP$$
++echo "press [Enter] at that point." >> $TMP/txtTEMP$$
++
++echo >> $TMP/txtTEMP$$
++echo "If you don't connect for whatever reason e.g. Failed No" >> $TMP/txtTEMP$$
++echo "Dialtone, Busy, No Carrier, Whatever, Exit, just press" >> $TMP/txtTEMP$$
++echo "[Enter] at that point." >> $TMP/txtTEMP$$
++
++echo >> $TMP/txtTEMP$$
++echo "if you have syslogd running, you can see the output messages" >> $TMP/txtTEMP$$
++echo "from pppd and chat in the /var/log/messages and or debug file." >> $TMP/txtTEMP$$
++
++echo >> $TMP/txtTEMP$$
++echo "Sample /var/log/messages file." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "`hostname 2>/dev/null` pppd[562]: Serial connection established." >> $TMP/txtTEMP$$
++echo "`hostname 2>/dev/null` pppd[562]: Using interface ppp0" >> $TMP/txtTEMP$$
++echo "`hostname 2>/dev/null` pppd[562]: Connect: ppp0 <--> /dev/modem" >> $TMP/txtTEMP$$
++echo "`hostname 2>/dev/null` pppd[562]: local IP address 215.87.78.18" >> $TMP/txtTEMP$$
++echo "`hostname 2>/dev/null` pppd[562]: remote IP address 205.94.97.35" >> $TMP/txtTEMP$$
++
++echo >> $TMP/txtTEMP$$
++echo "You don't have a successful PPP connection until you" >> $TMP/txtTEMP$$
++echo "receive a local & remote IP address like above." >> $TMP/txtTEMP$$
++
++echo >> $TMP/txtTEMP$$
++echo "If you have the X window system, you could connect in a Xterm." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "`hostname 2>/dev/null` # startx" >> $TMP/txtTEMP$$
++echo "`hostname 2>/dev/null` # ppp-go" >> $TMP/txtTEMP$$
++echo "`hostname 2>/dev/null` # netscape mosaic etc." >> $TMP/txtTEMP$$
+
+-echo >> /tmp/txtTEMP$$
+-echo "~# ppp-off <-To end the ppp connection.)" >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "~# ppp-off <-To end the ppp connection.)" >> $TMP/txtTEMP$$
+
+-echo >> /tmp/txtTEMP$$
+-echo "~# ppp-go -h <-For help.)" >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "~# ppp-go -h <-For help.)" >> $TMP/txtTEMP$$
+
+-echo >> /tmp/txtTEMP$$
+-echo 'There is no support in linux for "WinModems", if you have a' >> /tmp/txtTEMP$$
+-echo "WinModem you will not be able to use it in linux." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "There is support for plug n play modems, if you have a pnp" >> /tmp/txtTEMP$$
+-echo 'modem you may need "isapnptools" to get it recognized.' >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo 'There is no support in linux for "WinModems", if you have a' >> $TMP/txtTEMP$$
++echo "WinModem you will not be able to use it in linux." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "There is support for plug n play modems, if you have a pnp" >> $TMP/txtTEMP$$
++echo 'modem you may need "isapnptools" to get it recognized.' >> $TMP/txtTEMP$$
+
+-echo >> /tmp/txtTEMP$$
+-echo "=========================================================================" >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "=========================================================================" >> $TMP/txtTEMP$$
+ if [ -s /usr/doc/pppsetup/pppsetup-$VERSION.README ]; then
+-echo "#### Look at the /usr/doc/pppsetup/pppsetup-$VERSION.README. ####" >> /tmp/txtTEMP$$
++echo "#### Look at the /usr/doc/pppsetup/pppsetup-$VERSION.README. ####" >> $TMP/txtTEMP$$
+ fi
+-echo "#### A copy of this text can be found in: /etc/ppp/pppsetup.txt ####" >> /tmp/txtTEMP$$
+-echo "=========================================================================" >> /tmp/txtTEMP$$
++echo "#### A copy of this text can be found in: /etc/ppp/pppsetup.txt ####" >> $TMP/txtTEMP$$
++echo "=========================================================================" >> $TMP/txtTEMP$$
+
+-echo >> /tmp/txtTEMP$$
+-echo "Done... You can exit now..." >> /tmp/txtTEMP$$
+-echo >> /tmp/txtTEMP$$
+-echo "End..." >> /tmp/txtTEMP$$
+-echo "=========================================================================" >> /tmp/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "Done... You can exit now..." >> $TMP/txtTEMP$$
++echo >> $TMP/txtTEMP$$
++echo "End..." >> $TMP/txtTEMP$$
++echo "=========================================================================" >> $TMP/txtTEMP$$
+
+-dialog --title "DONE" --clear --textbox "/tmp/txtTEMP$$" 22 78
++dialog --title "DONE" --clear --textbox "$TMP/txtTEMP$$" 22 78
+
+ clear 2>/dev/null || echo
+
+-cat /tmp/txtTEMP$$ >> /etc/ppp/pppsetup.txt
++cat $TMP/txtTEMP$$ >> /etc/ppp/pppsetup.txt
+ chmod 600 /etc/ppp/pppsetup.txt 2>/dev/null
+
+ if [ ! -s /etc/syslog.conf ]; then
+@@ -1644,7 +1688,7 @@
+
+ demand >> /etc/ppp/pppsetup.txt
+ other >> /etc/ppp/pppsetup.txt
+-rm -f /tmp/*TEMP* 2>/dev/null
++rm -f $TMP/*TEMP* 2>/dev/null
+
+ killall -9 syslogd 2>/dev/null
+ syslogd & 2>/dev/null
+@@ -1659,7 +1703,7 @@
+ else
+ demand >> /etc/ppp/pppsetup.txt
+ other >> /etc/ppp/pppsetup.txt
+-rm -f /tmp/*TEMP* 2>/dev/null
++rm -f $TMP/*TEMP* 2>/dev/null
+ echo
+ echo "#### A copy of this text can be found in: /etc/ppp/pppsetup.txt ####"
+ if [ -s /usr/doc/pppsetup/pppsetup-$VERSION.README ]; then
diff --git a/patches/source/ppp/radius.msdict b/patches/source/ppp/radius.msdict
new file mode 100644
index 000000000..da3a317c0
--- /dev/null
+++ b/patches/source/ppp/radius.msdict
@@ -0,0 +1,81 @@
+#
+# Microsoft's VSA's, from RFC 2548
+#
+# $Id: dictionary.microsoft,v 1.1 2004/11/14 07:26:26 paulus Exp $
+#
+
+VENDOR Microsoft 311 Microsoft
+
+ATTRIBUTE MS-CHAP-Response 1 string Microsoft
+ATTRIBUTE MS-CHAP-Error 2 string Microsoft
+ATTRIBUTE MS-CHAP-CPW-1 3 string Microsoft
+ATTRIBUTE MS-CHAP-CPW-2 4 string Microsoft
+ATTRIBUTE MS-CHAP-LM-Enc-PW 5 string Microsoft
+ATTRIBUTE MS-CHAP-NT-Enc-PW 6 string Microsoft
+ATTRIBUTE MS-MPPE-Encryption-Policy 7 string Microsoft
+# This is referred to as both singular and plural in the RFC.
+# Plural seems to make more sense.
+ATTRIBUTE MS-MPPE-Encryption-Type 8 string Microsoft
+ATTRIBUTE MS-MPPE-Encryption-Types 8 string Microsoft
+ATTRIBUTE MS-RAS-Vendor 9 integer Microsoft
+ATTRIBUTE MS-CHAP-Domain 10 string Microsoft
+ATTRIBUTE MS-CHAP-Challenge 11 string Microsoft
+ATTRIBUTE MS-CHAP-MPPE-Keys 12 string Microsoft
+ATTRIBUTE MS-BAP-Usage 13 integer Microsoft
+ATTRIBUTE MS-Link-Utilization-Threshold 14 integer Microsoft
+ATTRIBUTE MS-Link-Drop-Time-Limit 15 integer Microsoft
+ATTRIBUTE MS-MPPE-Send-Key 16 string Microsoft
+ATTRIBUTE MS-MPPE-Recv-Key 17 string Microsoft
+ATTRIBUTE MS-RAS-Version 18 string Microsoft
+ATTRIBUTE MS-Old-ARAP-Password 19 string Microsoft
+ATTRIBUTE MS-New-ARAP-Password 20 string Microsoft
+ATTRIBUTE MS-ARAP-PW-Change-Reason 21 integer Microsoft
+
+ATTRIBUTE MS-Filter 22 string Microsoft
+ATTRIBUTE MS-Acct-Auth-Type 23 integer Microsoft
+ATTRIBUTE MS-Acct-EAP-Type 24 integer Microsoft
+
+ATTRIBUTE MS-CHAP2-Response 25 string Microsoft
+ATTRIBUTE MS-CHAP2-Success 26 string Microsoft
+ATTRIBUTE MS-CHAP2-CPW 27 string Microsoft
+
+ATTRIBUTE MS-Primary-DNS-Server 28 ipaddr Microsoft
+ATTRIBUTE MS-Secondary-DNS-Server 29 ipaddr Microsoft
+ATTRIBUTE MS-Primary-NBNS-Server 30 ipaddr Microsoft
+ATTRIBUTE MS-Secondary-NBNS-Server 31 ipaddr Microsoft
+
+#ATTRIBUTE MS-ARAP-Challenge 33 string Microsoft
+
+
+#
+# Integer Translations
+#
+
+# MS-BAP-Usage Values
+
+VALUE MS-BAP-Usage Not-Allowed 0
+VALUE MS-BAP-Usage Allowed 1
+VALUE MS-BAP-Usage Required 2
+
+# MS-ARAP-Password-Change-Reason Values
+
+VALUE MS-ARAP-PW-Change-Reason Just-Change-Password 1
+VALUE MS-ARAP-PW-Change-Reason Expired-Password 2
+VALUE MS-ARAP-PW-Change-Reason Admin-Requires-Password-Change 3
+VALUE MS-ARAP-PW-Change-Reason Password-Too-Short 4
+
+# MS-Acct-Auth-Type Values
+
+VALUE MS-Acct-Auth-Type PAP 1
+VALUE MS-Acct-Auth-Type CHAP 2
+VALUE MS-Acct-Auth-Type MS-CHAP-1 3
+VALUE MS-Acct-Auth-Type MS-CHAP-2 4
+VALUE MS-Acct-Auth-Type EAP 5
+
+# MS-Acct-EAP-Type Values
+
+VALUE MS-Acct-EAP-Type MD5 4
+VALUE MS-Acct-EAP-Type OTP 5
+VALUE MS-Acct-EAP-Type Generic-Token-Card 6
+VALUE MS-Acct-EAP-Type TLS 13
+
diff --git a/patches/source/ppp/realms b/patches/source/ppp/realms
new file mode 100644
index 000000000..344036404
--- /dev/null
+++ b/patches/source/ppp/realms
@@ -0,0 +1,22 @@
+# /etc/radiusclient/realms
+#
+# Handle realm @netservers.co.uk on an internal RADIUS server
+# (note the server must be told to strip the realm)
+
+#authserver netservers.co.uk 192.168.1.1:1812
+#acctserver netservers.co.uk 192.168.1.1:1813
+
+# users in realm @example.com are handled by separate servers
+
+#authserver example.com 10.0.0.1:1812
+#acctserver example.com 10.0.0.2:1813
+
+# the DEFAULT realm matches users that do not supply a realm
+
+#authserver DEFAULT 192.168.1.1:1812
+#acctserver DEFAULT 192.168.1.1:1813
+
+# Any realms that do not match in the realms file automatically fall
+# through to the standard radius plugin which uses the servers in the
+# radiusclient.conf file. Note that this is different than the
+# DEFAULT realm match, above.
diff --git a/patches/source/ppp/servers b/patches/source/ppp/servers
new file mode 100644
index 000000000..b061bf934
--- /dev/null
+++ b/patches/source/ppp/servers
@@ -0,0 +1,4 @@
+#Server Name or Client/Server pair Key
+#---------------- ---------------
+#portmaster.elemental.net hardlyasecret
+#portmaster2.elemental.net donttellanyone
diff --git a/patches/source/ppp/slack-desc b/patches/source/ppp/slack-desc
new file mode 100644
index 000000000..ddf6f37f4
--- /dev/null
+++ b/patches/source/ppp/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+ppp: ppp (Point-to-Point Protocol)
+ppp:
+ppp: The Point-to-Point Protocol (PPP) provides a method for transmitting
+ppp: data over serial links. It's commonly used for connecting to the
+ppp: Internet using a modem. This package includes the PPP daemon (pppd),
+ppp: which negotiates with the peer to establish the link and sets up the
+ppp: ppp network interface, and pppsetup, an easy-to-use utility for
+ppp: setting up your PPP daemon.
+ppp:
+ppp:
+ppp:
diff --git a/patches/source/proftpd/doinst.sh b/patches/source/proftpd/doinst.sh
new file mode 100644
index 000000000..37fe02dd9
--- /dev/null
+++ b/patches/source/proftpd/doinst.sh
@@ -0,0 +1,18 @@
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/ftpusers.new
+config etc/proftpd.conf.new
+
+# Remove any old proftpd files:
+rm -f var/run/proftpd/proftpd*
+
diff --git a/patches/source/proftpd/etc/ftpusers b/patches/source/proftpd/etc/ftpusers
new file mode 100644
index 000000000..d08f2a1fd
--- /dev/null
+++ b/patches/source/proftpd/etc/ftpusers
@@ -0,0 +1,22 @@
+#
+# ftpusers This file describes the names of the users that may
+# _*NOT*_ log into the system via the FTP server.
+# This usually includes "root", "uucp", "news" and the
+# like, because those users have too much power to be
+# allowed to do "just" FTP...
+#
+#
+# Version: @(#)/etc/ftpusers 3.00 02/25/2001 volkerdi
+#
+# Original Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+#
+# The entire line gets matched, so no comments or extra characters on
+# lines containing a username.
+#
+# To enable anonymous FTP, remove the "ftp" user:
+ftp
+root
+uucp
+news
+
+# End of ftpusers.
diff --git a/patches/source/proftpd/etc/proftpd.conf b/patches/source/proftpd/etc/proftpd.conf
new file mode 100644
index 000000000..ffb0df3fe
--- /dev/null
+++ b/patches/source/proftpd/etc/proftpd.conf
@@ -0,0 +1,74 @@
+# This is a basic ProFTPD configuration file.
+# It establishes a single server and a single anonymous login.
+# It assumes that you have a user/group "nobody" and "ftp"
+# for normal/anonymous operation.
+
+ServerName "ProFTPD Default Installation"
+#ServerType standalone
+ServerType inetd
+DefaultServer on
+
+# Port 21 is the standard FTP port.
+Port 21
+# Umask 022 is a good standard umask to prevent new dirs and files
+# from being group and world writable.
+Umask 022
+
+# To prevent DoS attacks, set the maximum number of child processes
+# to 30. If you need to allow more than 30 concurrent connections
+# at once, simply increase this value. Note that this ONLY works
+# in standalone mode, in inetd mode you should use an inetd server
+# that allows you to limit maximum number of processes per service
+# (such as xinetd)
+MaxInstances 30
+
+# Set the user and group that the server normally runs at.
+User nobody
+Group nogroup
+
+# This next option is required for NIS or NIS+ to work properly:
+#PersistentPasswd off
+
+SystemLog /var/log/proftpd.log
+TransferLog /var/log/xferlog
+
+# Normally, we want files to be overwriteable.
+<Directory /*>
+ AllowOverwrite on
+</Directory>
+
+# A basic anonymous FTP server configuration.
+# To enable this, remove the user ftp from /etc/ftpusers.
+<Anonymous ~ftp>
+ RequireValidShell off
+ User ftp
+ Group ftp
+ # We want clients to be able to login with "anonymous" as well as "ftp"
+ UserAlias anonymous ftp
+
+ # Limit the maximum number of anonymous logins
+ MaxClients 50
+
+ # We want 'welcome.msg' displayed at login, and '.message' displayed
+ # in each newly chdired directory.
+ DisplayLogin welcome.msg
+ DisplayChdir .message
+
+ # Limit WRITE everywhere in the anonymous chroot
+ <Limit WRITE>
+ DenyAll
+ </Limit>
+
+ # An upload directory that allows storing files but not retrieving
+ # or creating directories.
+# <Directory incoming/*>
+# <Limit READ>
+# DenyAll
+# </Limit>
+#
+# <Limit STOR>
+# AllowAll
+# </Limit>
+# </Directory>
+
+</Anonymous>
diff --git a/patches/source/proftpd/proftpd.SlackBuild b/patches/source/proftpd/proftpd.SlackBuild
new file mode 100755
index 000000000..0d36f7195
--- /dev/null
+++ b/patches/source/proftpd/proftpd.SlackBuild
@@ -0,0 +1,138 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2015 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+VERSION=1.3.5e
+DIRVER=1.3.5e
+BUILD=${BUILD:-1_slack14.1}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-proftpd
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf proftpd-$VERSION
+tar xvf $CWD/proftpd-$VERSION.tar.?z* || exit 1
+cd proftpd-$DIRVER || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --sysconfdir=/etc \
+ --enable-autoshadow \
+ --enable-ctrls \
+ --enable-ipv6 \
+ --localstatedir=/var/run \
+ --with-modules=mod_radius:mod_ban:mod_readme:mod_ratio:mod_tls:mod_wrap:mod_ctrls_admin \
+ --build=$ARCH-slackware-linux || exit 1
+# This caused funny messages about "Quotas off" with every FTP command,
+# and mod_wrap gets a compile error:
+# --with-modules= ... mod_quota ...
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# With no library to link against, these are useless:
+rm -rf $PKG/usr/include
+rm -f $PKG/etc/*
+rmdir $PKG/usr/libexec 2> /dev/null
+
+cat $CWD/etc/proftpd.conf > $PKG/etc/proftpd.conf.new
+cat $CWD/etc/ftpusers > $PKG/etc/ftpusers.new
+mkdir -p $PKG/home/ftp
+
+# Directory used by mod_ban:
+mkdir -p $PKG/var/db/proftpd
+chown nobody:nogroup $PKG/var/db/proftpd
+
+gzip -9 $PKG/usr/man/man?/*.?
+
+mkdir -p $PKG/usr/doc/proftpd-$VERSION
+cp -a COPYING* CREDITS INSTALL NEWS README* \
+ contrib/README.mod_wrap contrib/README.ratio \
+ $PKG/usr/doc/proftpd-$VERSION
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/proftpd-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+cp -a contrib/README $PKG/usr/doc/proftpd-$VERSION/README.contrib
+cp -a doc sample-configurations $PKG/usr/doc/proftpd-$VERSION
+# Bloat removal:
+( cd $PKG/usr/doc
+ find . -name "*.sgml" -exec rm {} \;
+ find . -name "*.pdf" -exec rm {} \;
+)
+rmdir $PKG/usr/share/locale
+rmdir $PKG/usr/share
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/proftpd-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/proftpd/slack-desc b/patches/source/proftpd/slack-desc
new file mode 100644
index 000000000..5ed80ca92
--- /dev/null
+++ b/patches/source/proftpd/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+proftpd: proftpd (FTP server daemon)
+proftpd:
+proftpd: ProFTPD is the Professional File Transfer Protocol (FTP) server
+proftpd: daemon. ProFTPD grew out of the desire to have a secure and
+proftpd: configurable FTP server, and out of a significant admiration of the
+proftpd: Apache web server.
+proftpd:
+proftpd:
+proftpd:
+proftpd:
+proftpd:
diff --git a/patches/source/python/python.SlackBuild b/patches/source/python/python.SlackBuild
new file mode 100755
index 000000000..e72d38c1f
--- /dev/null
+++ b/patches/source/python/python.SlackBuild
@@ -0,0 +1,167 @@
+#!/bin/bash
+
+# Copyright 2008, 2009, 2012, 2013, 2016 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=python
+SRCNAM=Python
+VERSION=$(echo $SRCNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+BRANCH_VERSION=$(echo $VERSION | cut -f 1,2 -d . )
+BUILD=${BUILD:-1_slack14.1}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+# Don't set any SLKCFLAGS here, or OPT="$SLKCFLAGS" before the ./configure.
+# Python gets the compile options right without any help.
+if [ "$ARCH" = "i486" ]; then
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "arm" ]; then
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "armel" ]; then
+ LIBDIRSUFFIX=""
+fi
+
+# Location for Python site-packages:
+SITEPK=$PKG/usr/lib${LIBDIRSUFFIX}/${PKGNAM}${BRANCH_VERSION}/site-packages
+# same as above without $PKG
+TOOLSDIR=/usr/lib${LIBDIRSUFFIX}/${PKGNAM}${BRANCH_VERSION}/site-packages
+
+cd $TMP
+rm -rf $SRCNAM-$VERSION
+tar xf $CWD/$SRCNAM-$VERSION.tar.xz || exit 1
+cd $SRCNAM-$VERSION
+
+zcat $CWD/python.readline.set_pre_input_hook.diff.gz | patch -p1 --verbose || exit 1
+# We don't want a large libpython*.a:
+zcat $CWD/python.no-static-library.diff.gz | patch -p1 --verbose || exit 1
+
+if [ "$ARCH" = "x86_64" ]; then
+ # Install to lib64 instead of lib and
+ # Python must report /usr/lib64/python2.7/site-packages as python_lib_dir:
+ zcat $CWD/python.x86_64.diff.gz | patch -p1 --verbose || exit 1
+fi
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/python-$VERSION \
+ --with-threads \
+ --enable-ipv6 \
+ --enable-shared \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG
+
+# Install some python-demo files:
+mkdir -p $PKG/usr/doc/python-$VERSION
+cp -a Demo $PKG/usr/doc/python-$VERSION
+
+# We'll install the python-tools under site-packages:
+mkdir -p $SITEPK
+cp -a Tools/* $SITEPK
+
+mkdir -p $PKG/usr/doc/python-$VERSION
+mv $SITEPK/README $PKG/usr/doc/python-$VERSION/README.python-tools
+( cd $PKG/usr/doc/python-$VERSION
+ ln -sf $TOOLSDIR Tools
+)
+# Make a few useful symlinks:
+mkdir -p $PKG/usr/bin
+( cd $PKG/usr/bin
+ ln -sf $TOOLSDIR/pynche/pynche pynche
+ ln -sf $TOOLSDIR/i18n/msgfmt.py .
+ ln -sf $TOOLSDIR/i18n/pygettext.py .
+)
+
+# Install docs:
+mkdir -p $PKG/usr/doc/python-$VERSION/Documentation
+cp -a README LICENSE $PKG/usr/doc/python-$VERSION
+cp -a Misc $PKG/usr/doc/python-$VERSION
+tar xf $CWD/python-$VERSION-docs-text.tar.?z*
+mv python-${VERSION}-docs-text/* $PKG/usr/doc/python-$VERSION/Documentation
+chown -R root:root $PKG/usr/doc/python-$VERSION
+
+# Fix possible incorrect permissions:
+( cd $PKG
+ find . -type d -exec chmod 755 "{}" \;
+ find . -perm 640 -exec chmod 644 "{}" \;
+ find . -perm 750 -exec chmod 755 "{}" \;
+)
+
+
+( cd $PKG/usr/bin
+ rm -f python
+ ln -sf python${BRANCH_VERSION} python
+)
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
+)
+
+( cd $PKG/usr/man
+ if [ -r python${BRANCH_VERSION}.1.gz ] ; then
+ ln -sf python${BRANCH_VERSION}.1.gz python.1.gz
+ fi
+)
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/python-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/python/python.no-static-library.diff b/patches/source/python/python.no-static-library.diff
new file mode 100644
index 000000000..962098971
--- /dev/null
+++ b/patches/source/python/python.no-static-library.diff
@@ -0,0 +1,49 @@
+--- ./Makefile.pre.in.orig 2012-04-09 18:07:33.000000000 -0500
++++ ./Makefile.pre.in 2012-05-09 13:38:24.913226185 -0500
+@@ -396,7 +396,7 @@
+
+
+ # Build the interpreter
+-$(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY)
++$(BUILDPYTHON): Modules/python.o $(LDLIBRARY)
+ $(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
+ Modules/python.o \
+ $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
+@@ -412,18 +412,6 @@
+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
+ esac
+
+-# Build static library
+-# avoid long command lines, same as LIBRARY_OBJS
+-$(LIBRARY): $(LIBRARY_OBJS)
+- -rm -f $@
+- $(AR) $(ARFLAGS) $@ Modules/getbuildinfo.o
+- $(AR) $(ARFLAGS) $@ $(PARSER_OBJS)
+- $(AR) $(ARFLAGS) $@ $(OBJECT_OBJS)
+- $(AR) $(ARFLAGS) $@ $(PYTHON_OBJS)
+- $(AR) $(ARFLAGS) $@ $(MODULE_OBJS) $(SIGNAL_OBJS)
+- $(AR) $(ARFLAGS) $@ $(MODOBJS)
+- $(RANLIB) $@
+-
+ libpython$(VERSION).so: $(LIBRARY_OBJS)
+ if test $(INSTSONAME) != $(LDLIBRARY); then \
+ $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
+@@ -1008,18 +996,6 @@
+ else true; \
+ fi; \
+ done
+- @if test -d $(LIBRARY); then :; else \
+- if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
+- if test "$(SO)" = .dll; then \
+- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
+- else \
+- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
+- $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
+- fi; \
+- else \
+- echo Skip install of $(LIBRARY) - use make frameworkinstall; \
+- fi; \
+- fi
+ $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
+ $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
+ $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
diff --git a/patches/source/python/python.readline.set_pre_input_hook.diff b/patches/source/python/python.readline.set_pre_input_hook.diff
new file mode 100644
index 000000000..8af4b4bed
--- /dev/null
+++ b/patches/source/python/python.readline.set_pre_input_hook.diff
@@ -0,0 +1,12 @@
+--- ./Modules/readline.c.orig 2008-11-04 14:43:31.000000000 -0600
++++ ./Modules/readline.c 2009-06-09 14:23:16.000000000 -0500
+@@ -11,6 +11,9 @@
+ #include <errno.h>
+ #include <sys/time.h>
+
++/* This seems to be needed for set_pre_input_hook to work */
++#define HAVE_RL_PRE_INPUT_HOOK 1
++
+ #if defined(HAVE_SETLOCALE)
+ /* GNU readline() mistakenly sets the LC_CTYPE locale.
+ * This is evil. Only the user or the app's main() should do this!
diff --git a/patches/source/python/python.x86_64.diff b/patches/source/python/python.x86_64.diff
new file mode 100644
index 000000000..55cdf4996
--- /dev/null
+++ b/patches/source/python/python.x86_64.diff
@@ -0,0 +1,174 @@
+--- ./Makefile.pre.in.orig 2016-12-17 14:05:06.000000000 -0600
++++ ./Makefile.pre.in 2016-12-28 13:17:09.089663880 -0600
+@@ -111,7 +111,7 @@
+ MANDIR= @mandir@
+ INCLUDEDIR= @includedir@
+ CONFINCLUDEDIR= $(exec_prefix)/include
+-SCRIPTDIR= $(prefix)/lib
++SCRIPTDIR= $(prefix)/lib64
+
+ # Detailed destination directories
+ BINLIBDEST= $(LIBDIR)/python$(VERSION)
+--- ./Lib/sysconfig.py.orig 2016-12-17 14:05:06.000000000 -0600
++++ ./Lib/sysconfig.py 2016-12-28 13:17:09.086663880 -0600
+@@ -7,20 +7,20 @@
+
+ _INSTALL_SCHEMES = {
+ 'posix_prefix': {
+- 'stdlib': '{base}/lib/python{py_version_short}',
+- 'platstdlib': '{platbase}/lib/python{py_version_short}',
+- 'purelib': '{base}/lib/python{py_version_short}/site-packages',
+- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
++ 'stdlib': '{base}/lib64/python{py_version_short}',
++ 'platstdlib': '{platbase}/lib64/python{py_version_short}',
++ 'purelib': '{base}/lib64/python{py_version_short}/site-packages',
++ 'platlib': '{platbase}/lib64/python{py_version_short}/site-packages',
+ 'include': '{base}/include/python{py_version_short}',
+ 'platinclude': '{platbase}/include/python{py_version_short}',
+ 'scripts': '{base}/bin',
+ 'data': '{base}',
+ },
+ 'posix_home': {
+- 'stdlib': '{base}/lib/python',
+- 'platstdlib': '{base}/lib/python',
+- 'purelib': '{base}/lib/python',
+- 'platlib': '{base}/lib/python',
++ 'stdlib': '{base}/lib64/python',
++ 'platstdlib': '{base}/lib64/python',
++ 'purelib': '{base}/lib64/python',
++ 'platlib': '{base}/lib64/python',
+ 'include': '{base}/include/python',
+ 'platinclude': '{base}/include/python',
+ 'scripts': '{base}/bin',
+@@ -65,10 +65,10 @@
+ 'data' : '{userbase}',
+ },
+ 'posix_user': {
+- 'stdlib': '{userbase}/lib/python{py_version_short}',
+- 'platstdlib': '{userbase}/lib/python{py_version_short}',
+- 'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
+- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
++ 'stdlib': '{userbase}/lib64/python{py_version_short}',
++ 'platstdlib': '{userbase}/lib64/python{py_version_short}',
++ 'purelib': '{userbase}/lib64/python{py_version_short}/site-packages',
++ 'platlib': '{userbase}/lib64/python{py_version_short}/site-packages',
+ 'include': '{userbase}/include/python{py_version_short}',
+ 'scripts': '{userbase}/bin',
+ 'data' : '{userbase}',
+--- ./Lib/site.py.orig 2016-12-17 14:05:06.000000000 -0600
++++ ./Lib/site.py 2016-12-28 13:19:06.612662631 -0600
+@@ -288,13 +288,13 @@
+ if sys.platform in ('os2emx', 'riscos'):
+ sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
+ elif os.sep == '/':
+- sitepackages.append(os.path.join(prefix, "lib",
++ sitepackages.append(os.path.join(prefix, "lib64",
+ "python" + sys.version[:3],
+ "site-packages"))
+- sitepackages.append(os.path.join(prefix, "lib", "site-python"))
++ sitepackages.append(os.path.join(prefix, "lib64", "site-python"))
+ else:
+ sitepackages.append(prefix)
+- sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
++ sitepackages.append(os.path.join(prefix, "lib64", "site-packages"))
+ return sitepackages
+
+ def addsitepackages(known_paths):
+--- ./Lib/distutils/command/install.py.orig 2016-12-17 14:05:05.000000000 -0600
++++ ./Lib/distutils/command/install.py 2016-12-28 13:17:09.079663880 -0600
+@@ -41,15 +41,15 @@
+
+ INSTALL_SCHEMES = {
+ 'unix_prefix': {
+- 'purelib': '$base/lib/python$py_version_short/site-packages',
+- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
++ 'purelib': '$base/lib64/python$py_version_short/site-packages',
++ 'platlib': '$platbase/lib64/python$py_version_short/site-packages',
+ 'headers': '$base/include/python$py_version_short/$dist_name',
+ 'scripts': '$base/bin',
+ 'data' : '$base',
+ },
+ 'unix_home': {
+- 'purelib': '$base/lib/python',
+- 'platlib': '$base/lib/python',
++ 'purelib': '$base/lib64/python',
++ 'platlib': '$base/lib64/python',
+ 'headers': '$base/include/python/$dist_name',
+ 'scripts': '$base/bin',
+ 'data' : '$base',
+--- ./Lib/distutils/sysconfig.py.orig 2016-12-17 14:05:05.000000000 -0600
++++ ./Lib/distutils/sysconfig.py 2016-12-28 13:17:09.081663880 -0600
+@@ -120,7 +120,7 @@
+
+ if os.name == "posix":
+ libpython = os.path.join(prefix,
+- "lib", "python" + get_python_version())
++ "lib64", "python" + get_python_version())
+ if standard_lib:
+ return libpython
+ else:
+--- ./Modules/getpath.c.orig 2016-12-17 14:05:07.000000000 -0600
++++ ./Modules/getpath.c 2016-12-28 13:17:09.093663880 -0600
+@@ -108,7 +108,7 @@
+ static char exec_prefix[MAXPATHLEN+1];
+ static char progpath[MAXPATHLEN+1];
+ static char *module_search_path = NULL;
+-static char lib_python[] = "lib/python" VERSION;
++static char lib_python[] = "lib64/python" VERSION;
+
+ static void
+ reduce(char *dir)
+@@ -520,7 +520,7 @@
+ }
+ else
+ strncpy(zip_path, PREFIX, MAXPATHLEN);
+- joinpath(zip_path, "lib/python00.zip");
++ joinpath(zip_path, "lib64/python00.zip");
+ bufsz = strlen(zip_path); /* Replace "00" with version */
+ zip_path[bufsz - 6] = VERSION[0];
+ zip_path[bufsz - 5] = VERSION[2];
+@@ -530,7 +530,7 @@
+ fprintf(stderr,
+ "Could not find platform dependent libraries <exec_prefix>\n");
+ strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN);
+- joinpath(exec_prefix, "lib/lib-dynload");
++ joinpath(exec_prefix, "lib64/lib-dynload");
+ }
+ /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
+
+--- ./setup.py.orig 2016-12-17 14:05:07.000000000 -0600
++++ ./setup.py 2016-12-28 13:17:09.097663880 -0600
+@@ -456,7 +456,7 @@
+ def detect_modules(self):
+ # Ensure that /usr/local is always used
+ if not cross_compiling:
+- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
++ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64')
+ add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+ if cross_compiling:
+ self.add_gcc_paths()
+@@ -782,11 +782,11 @@
+ elif curses_library:
+ readline_libs.append(curses_library)
+ elif self.compiler.find_library_file(lib_dirs +
+- ['/usr/lib/termcap'],
++ ['/usr/lib64/termcap'],
+ 'termcap'):
+ readline_libs.append('termcap')
+ exts.append( Extension('readline', ['readline.c'],
+- library_dirs=['/usr/lib/termcap'],
++ library_dirs=['/usr/lib64/termcap'],
+ extra_link_args=readline_extra_link_args,
+ libraries=readline_libs) )
+ else:
+@@ -821,8 +821,8 @@
+ if krb5_h:
+ ssl_incs += krb5_h
+ ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
+- ['/usr/local/ssl/lib',
+- '/usr/contrib/ssl/lib/'
++ ['/usr/local/ssl/lib64',
++ '/usr/contrib/ssl/lib64/'
+ ] )
+
+ if (ssl_incs is not None and
diff --git a/patches/source/python/slack-desc b/patches/source/python/slack-desc
new file mode 100644
index 000000000..569c3c5b3
--- /dev/null
+++ b/patches/source/python/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+python: python (object-oriented interpreted programming language)
+python:
+python: Python is an interpreted, interactive, object-oriented programming
+python: language that combines remarkable power with very clear syntax.
+python: Python's basic power can be extended with your own modules written in
+python: C or C++. Python is also adaptable as an extension language for
+python: existing applications.
+python:
+python:
+python:
+python:
diff --git a/patches/source/qt/Qt.pc b/patches/source/qt/Qt.pc
new file mode 100644
index 000000000..29d1131c6
--- /dev/null
+++ b/patches/source/qt/Qt.pc
@@ -0,0 +1,16 @@
+prefix=/usr/lib${LIBDIRSUFFIX}/qt
+bindir=${prefix}/bin
+datadir=${prefix}
+docdir=${prefix}/doc
+headerdir=${prefix}/include
+importdir=${prefix}/imports
+libdir=${prefix}/lib
+moc=${bindir}/moc
+plugindir=${prefix}/plugins
+qmake=${bindir}/qmake
+sysconfdir=/etc
+translationdir=${prefix}/translations
+
+Name: Qt
+Description: Qt Configuration
+Version: 4.8.6
diff --git a/patches/source/qt/README b/patches/source/qt/README
new file mode 100644
index 000000000..9bbcb3467
--- /dev/null
+++ b/patches/source/qt/README
@@ -0,0 +1,9 @@
+qt-<version>_<git revision> is actually KDE's version of Qt from git
+that includes important patches not yet present in mainline Qt.
+
+The recommended version of Qt for KDE may be obtained from the
+repository with this command:
+
+git clone git://gitorious.org/+kde-developers/qt/kde-qt.git
+
+(see the SlackBuild for more details)
diff --git a/patches/source/qt/doinst.sh b/patches/source/qt/doinst.sh
new file mode 100644
index 000000000..b9a2c53ba
--- /dev/null
+++ b/patches/source/qt/doinst.sh
@@ -0,0 +1,10 @@
+
+if [ -x sbin/ldconfig ]; then
+ chroot . /sbin/ldconfig 2> /dev/null
+fi
+
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database /usr/share/applications >/dev/null 2>&1
+fi
+
+
diff --git a/patches/source/qt/profile.d/qt4.csh b/patches/source/qt/profile.d/qt4.csh
new file mode 100644
index 000000000..6e2c726cb
--- /dev/null
+++ b/patches/source/qt/profile.d/qt4.csh
@@ -0,0 +1,22 @@
+#!/bin/csh
+# Environment path variables for the Qt package:
+if ( ! $?QT4DIR ) then
+ # It's best to use the generic directory to avoid
+ # compiling in a version-containing path:
+ if ( -d /usr/lib/qt ) then
+ setenv QT4DIR /usr/lib/qt
+ else
+ # Find the newest Qt directory and set $QT4DIR to that:
+ foreach qtd ( /usr/lib/qt-* )
+ if ( -d $qtd ) then
+ setenv QT4DIR $qtd
+ endif
+ end
+ endif
+endif
+set path = ( $path $QT4DIR/bin )
+if ( $?CPLUS_INCLUDE_PATH ) then
+ setenv CPLUS_INCLUDE_PATH $QT4DIR/include:$CPLUS_INCLUDE_PATH
+else
+ setenv CPLUS_INCLUDE_PATH $QT4DIR/include
+endif
diff --git a/patches/source/qt/profile.d/qt4.sh b/patches/source/qt/profile.d/qt4.sh
new file mode 100644
index 000000000..5b4b830aa
--- /dev/null
+++ b/patches/source/qt/profile.d/qt4.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+# Environment variables for the Qt package.
+#
+# It's best to use the generic directory to avoid
+# compiling in a version-containing path:
+if [ -d /usr/lib/qt ]; then
+ QT4DIR=/usr/lib/qt
+else
+ # Find the newest Qt directory and set $QT4DIR to that:
+ for qtd in /usr/lib/qt-* ; do
+ if [ -d $qtd ]; then
+ QT4DIR=$qtd
+ fi
+ done
+fi
+if [ ! "$CPLUS_INCLUDE_PATH" = "" ]; then
+ CPLUS_INCLUDE_PATH=$QT4DIR/include:$CPLUS_INCLUDE_PATH
+else
+ CPLUS_INCLUDE_PATH=$QT4DIR/include
+fi
+PATH="$PATH:$QT4DIR/bin"
+export QT4DIR
+export CPLUS_INCLUDE_PATH
diff --git a/patches/source/qt/qt.SlackBuild b/patches/source/qt/qt.SlackBuild
new file mode 100755
index 000000000..15926b461
--- /dev/null
+++ b/patches/source/qt/qt.SlackBuild
@@ -0,0 +1,311 @@
+#!/bin/sh
+
+# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Merged some ideas from Alex Sarmardzic's script for qt4 at SlackBuilds.org
+# ^^ Modified by Robby Workman <rworkman@slackware.com> for QT4 & KDE4
+
+# We're using qt-copy instead of a released qt version, as this git release
+# has at least one bugfix strongly recommended by the kde developers.
+
+# Obtained from:
+# git clone git://gitorious.org/+kde-developers/qt/kde-qt.git
+# git checkout origin/4.5.3-patched
+# git checkout origin/4.6.0-stable-patched
+# git checkout origin/4.6.1-patched
+# git checkout origin/4.7.0-patched
+#
+# Alternate method (we don't use this):
+# wget http://qt.gitorious.org/qt/kde-qt/archive-tarball/4.6.2-patched
+#
+# Modifications 2010, 2011, 2012 Eric Hameleers, Eindhoven, NL
+# qt 4.7.3, 4.7.4, 4.8.0, 4.8.1, 4.8.2, 4.8.4, 4.8.5, 4.8.6 are built from original nokia sources.
+
+PKGNAM=qt
+VERSION=$(ls qt-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+BUILD=${BUILD:-1_slack14.1}
+
+NUMJOBS=${NUMJOBS:--j7}
+
+# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
+if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i486 ;;
+ armv7hl) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ # To prevent "qatomic_armv6.h error: output number 2 not directly addressable"
+ # More permanent solution is to patch gcc:
+ # http://bazaar.launchpad.net/~linaro-toolchain-dev/gcc-linaro/4.6/revision/106731
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16 -fno-strict-volatile-bitfields"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-${PKGNAM}
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf qt-everywhere-opensource-src-$VERSION
+tar xvf $CWD/qt-everywhere-opensource-src-$VERSION.tar.xz # For qt releases
+cd qt-everywhere-opensource-src-$VERSION || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+if [ $ARCH = "i486" ]; then
+ sed -i -e "s/QMAKE_CFLAGS_RELEASE += -O2/QMAKE_CFLAGS_RELEASE += $SLKCFLAGS/" mkspecs/common/gcc-base.conf || exit 1
+fi
+
+# Fix path to mysql header
+zcat $CWD/qt.mysql.h.diff.gz | patch -p1 --verbose || exit 1
+
+# Stupid idea - remove it:
+zcat $CWD/qt.webkit-no_Werror.patch.gz | patch -p1 --verbose || exit 1
+
+# Fix crash on malformed GIF images (CVE-2014-0190):
+zcat $CWD/qt.fix.broken.gif.crash.diff.gz | patch -p1 --verbose || exit 1
+
+# Implement qsystemtrayicon support for Qt4 applications in Plasma 5:
+zcat $CWD/qt.qsystemtrayicon-plugin-system.diff.gz | patch -p1 --verbose || exit 1
+
+# Apply LibreOffice fixes (QTBUG-37380, QTBUG-34614, QTBUG-38585),
+# Native KDE4 file pickers will be disabled at runtime otherwise.
+zcat $CWD/qt.glib-honor-ExcludeSocketNotifiers-flag.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/qt.qclipboard_fix_recursive.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/qt.qclipboard_delay.patch.gz | patch -p1 --verbose || exit 1
+
+export CFLAGS="$SLKCFLAGS"
+export CXXFLAGS="$SLKCFLAGS"
+export OPENSOURCE_CXXFLAGS="$SLKCFLAGS"
+./configure \
+ -confirm-license \
+ -opensource \
+ -prefix /usr/lib${LIBDIRSUFFIX}/qt \
+ -fast \
+ -system-libpng \
+ -system-libjpeg \
+ -system-zlib \
+ -system-sqlite \
+ -plugin-sql-sqlite \
+ -dbus \
+ -webkit \
+ -no-phonon \
+ -nomake examples \
+ -nomake demos \
+ -nomake docs \
+ -no-separate-debug-info \
+ -no-pch
+ # No-precompiled-headers is ccache-friendly.
+
+# Sometimes a failure happens when parallelizing make. Try again if make fails,
+# but make a failure the second time around (single threaded) a fatal error:
+make $NUMJOBS || make || exit 1
+make install INSTALL_ROOT=$PKG || exit 1
+
+# The infamous qt -> qt-${VERSION} link that keeps the full path out of .la files:
+( cd $PKG/usr/lib${LIBDIRSUFFIX} ; ln -sf qt qt-${VERSION} )
+
+# Add a missing Qt.pc which is needed by KDE applications:
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig
+cat <<EOF > $PKG/usr/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig/Qt.pc
+prefix=/usr/lib${LIBDIRSUFFIX}/qt
+bindir=\${prefix}/bin
+datadir=\${prefix}
+docdir=\${prefix}/doc
+headerdir=\${prefix}/include
+importdir=\${prefix}/imports
+libdir=\${prefix}/lib
+moc=\${bindir}/moc
+plugindir=\${prefix}/plugins
+qmake=\${bindir}/qmake
+sysconfdir=\${prefix}/etc/settings
+translationdir=\${prefix}/translations
+
+Name: Qt
+Description: Qt Configuration
+Version: $VERSION
+EOF
+
+# libjscore is used internally. Prevent a false dependency on this in the .la and .pc files:
+sed -i "s,-ljscore,,g" $PKG/usr/lib${LIBDIRSUFFIX}/qt/lib/*.la $PKG/usr/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig/*.pc
+sed -i "s,-L../JavaScriptCore/release,,g" $PKG/usr/lib${LIBDIRSUFFIX}/qt/lib/*.la $PKG/usr/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig/*.pc
+
+# libwebcore is used internally. Prevent a false dependency on this in the .la and .pc files:
+sed -i \
+ -e "s#-L/usr/lib${LIBDIRSUFFIX}/qt/lib -L../../WebCore/release -L../../JavaScriptCore/release -L/usr/X11R6/lib$LIBDIRSUFFIX -lwebcore##g" \
+ -e "s#-L/usr/lib${LIBDIRSUFFIX}/qt/lib -L../../WebCore/release -L../../JavaScriptCore/release -L/usr/X11R6/lib -lwebcore##g" \
+ -e "s# -lwebcore##g" \
+ $PKG/usr/lib${LIBDIRSUFFIX}/qt/lib/libQtWebKit.la $PKG/usr/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig/QtWebKit.pc
+
+# Link the shared libraries into /usr/lib:
+( cd $PKG/usr/lib${LIBDIRSUFFIX}
+ for file in qt/lib/*.so* ; do
+ ln -sf $file .
+ done
+)
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Add profile scripts
+mkdir -p $PKG/etc/profile.d
+sed -e "s#usr/lib/#usr/lib${LIBDIRSUFFIX}/#g" $CWD/profile.d/qt4.sh \
+ > $PKG/etc/profile.d/qt4.sh
+sed -e "s#usr/lib/#usr/lib${LIBDIRSUFFIX}/#g" $CWD/profile.d/qt4.csh \
+ > $PKG/etc/profile.d/qt4.csh
+chmod 0755 $PKG/etc/profile.d/*
+
+# Put a ton of links to more "normal" places. I'd just use a prefix of /usr, but it
+# creates a ton of new (and ambiguously named) /usr directories...
+mkdir -p $PKG/usr/bin
+( cd $PKG/usr/lib${LIBDIRSUFFIX}/qt/bin
+ for file in * ; do
+ ( cd $PKG/usr/bin ; ln -sf /usr/lib${LIBDIRSUFFIX}/qt/bin/$file . )
+ done
+)
+
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig
+( cd $PKG/usr/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig
+ for file in *.pc ; do
+ ( cd $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig ; ln -sf /usr/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig/$file . )
+ done
+)
+
+# Install Qt's private headers - at least Gentoo and Fedora are adding these
+# and some software has (inevitably) started depending on them:
+# We're using `rsync -R` as easy way to preserve relative path names:
+rsync -aR \
+ include/Qt{Core,Declarative,Gui,Script}/private \
+ src/{corelib,declarative,gui,script}/*/*_p.h \
+ ${PKG}/usr/lib${LIBDIRSUFFIX}/qt/
+
+# Add menu entries for all those hidden but great Qt applications:
+# Qt logo:
+convert $PKG/usr/lib$LIBDIRSUFFIX/qt/doc/src/images/qt-logo.png -resize 48x48 $PKG/usr/share/icons/hicolor/48x48/apps/qt-logo.png
+convert $PKG/usr/lib$LIBDIRSUFFIX/qt/doc/src/images/qt-logo.png -resize 48x48 $PKG/usr/share/icons/hicolor/48x48/apps/qt-logo.png
+# Assistant icons
+install -p -m644 -D tools/assistant/tools/assistant/images/assistant.png $PKG/usr/share/icons/hicolor/32x32/apps/assistant.png
+install -p -m644 -D tools/assistant/tools/assistant/images/assistant-128.png $PKG/usr/share/icons/hicolor/128x128/apps/assistant.png
+# Designer icon
+install -p -m644 -D tools/designer/src/designer/images/designer.png $PKG/usr/share/icons/hicolor/128x128/apps/designer.png
+# Linguist icons
+for icon in tools/linguist/linguist/images/icons/linguist-*-32.png ; do
+ size=$(echo $(basename ${icon}) | cut -d- -f2)
+ install -p -m644 -D ${icon} $PKG/usr/share/icons/hicolor/${size}x${size}/apps/linguist.png
+done
+
+# And the .desktop files
+mkdir -p $PKG/usr/share/applications
+cat <<EOF > $PKG/usr/share/applications/designer.desktop
+[Desktop Entry]
+Name=Qt4 Designer
+GenericName=Interface Designer
+Comment=Design GUIs for Qt4 applications
+Exec=designer
+Icon=designer
+MimeType=application/x-designer;
+Terminal=false
+Encoding=UTF-8
+Type=Application
+Categories=Qt;Development;
+EOF
+cat <<EOF > $PKG/usr/share/applications/assistant.desktop
+[Desktop Entry]
+Name=Qt4 Assistant
+Comment=Shows Qt4 documentation and examples
+Exec=assistant
+Icon=assistant
+Terminal=false
+Encoding=UTF-8
+Type=Application
+Categories=Qt;Development;Documentation;
+EOF
+cat <<EOF > $PKG/usr/share/applications/linguist.desktop
+[Desktop Entry]
+Name=Qt4 Linguist
+Comment=Add translations to Qt4 applications
+Exec=linguist
+Icon=linguist
+MimeType=text/vnd.trolltech.linguist;application/x-linguist;
+Terminal=false
+Encoding=UTF-8
+Type=Application
+Categories=Qt;Development;
+EOF
+cat <<EOF > $PKG/usr/share/applications/qtconfig.desktop
+[Desktop Entry]
+Name=Qt4 Config
+Comment=Configure Qt4 behavior, styles, fonts
+Exec=qtconfig
+Icon=qt-logo
+Terminal=false
+Encoding=UTF-8
+Type=Application
+Categories=Qt;Settings;
+EOF
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a *GPL_EXCEPTION* FAQ* INSTALL KNOWN* LICENSE* README* changes-* \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+if [ -d $PKG/usr/lib${LIBDIRSUFFIX}/qt/doc/html ]; then
+ ( cd $PKG/usr/doc/$PKGNAM-$VERSION
+ ln -sf /usr/lib${LIBDIRSUFFIX}/qt/doc/html .
+ )
+fi
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/qt/qt.fix.broken.gif.crash.diff b/patches/source/qt/qt.fix.broken.gif.crash.diff
new file mode 100644
index 000000000..7f74d71f1
--- /dev/null
+++ b/patches/source/qt/qt.fix.broken.gif.crash.diff
@@ -0,0 +1,16 @@
+--- ./src/gui/image/qgifhandler.cpp.orig 2014-04-10 13:37:12.000000000 -0500
++++ ./src/gui/image/qgifhandler.cpp 2014-04-25 13:42:48.468692269 -0500
+@@ -358,6 +358,13 @@
+ bits = image->bits();
+ memset(bits, 0, image->byteCount());
+ }
++
++ // Check if the previous attempt to create the image failed. If it
++ // did then the image is broken and we should give up.
++ if (image->isNull()) {
++ state = Error;
++ return -1;
++ }
+
+ disposePrevious(image);
+ disposed = false;
diff --git a/patches/source/qt/qt.glib-honor-ExcludeSocketNotifiers-flag.diff b/patches/source/qt/qt.glib-honor-ExcludeSocketNotifiers-flag.diff
new file mode 100644
index 000000000..6949bbfef
--- /dev/null
+++ b/patches/source/qt/qt.glib-honor-ExcludeSocketNotifiers-flag.diff
@@ -0,0 +1,63 @@
+Author: Jan-Marek Glogowski <glogow@fbihome.de>
+Date: Thu Mar 06 18:44:43 2014 +0100
+
+ Honor QEventLoop::ExcludeSocketNotifiers in glib event loop.
+
+ Implements QEventLoop::ExcludeSocketNotifiers in the same way
+ QEventLoop::X11ExcludeTimers is already implemented for the glib
+ event loop.
+
+--- qt4-x11-4.8.1.orig/src/corelib/kernel/qeventdispatcher_glib.cpp
++++ qt4-x11-4.8.1/src/corelib/kernel/qeventdispatcher_glib.cpp
+@@ -65,6 +65,7 @@ struct GPollFDWithQSocketNotifier
+ struct GSocketNotifierSource
+ {
+ GSource source;
++ QEventLoop::ProcessEventsFlags processEventsFlags;
+ QList<GPollFDWithQSocketNotifier *> pollfds;
+ };
+
+@@ -80,6 +81,9 @@ static gboolean socketNotifierSourceChec
+ GSocketNotifierSource *src = reinterpret_cast<GSocketNotifierSource *>(source);
+
+ bool pending = false;
++ if (src->processEventsFlags & QEventLoop::ExcludeSocketNotifiers)
++ return pending;
++
+ for (int i = 0; !pending && i < src->pollfds.count(); ++i) {
+ GPollFDWithQSocketNotifier *p = src->pollfds.at(i);
+
+@@ -103,6 +107,9 @@ static gboolean socketNotifierSourceDisp
+ QEvent event(QEvent::SockAct);
+
+ GSocketNotifierSource *src = reinterpret_cast<GSocketNotifierSource *>(source);
++ if (src->processEventsFlags & QEventLoop::ExcludeSocketNotifiers)
++ return true;
++
+ for (int i = 0; i < src->pollfds.count(); ++i) {
+ GPollFDWithQSocketNotifier *p = src->pollfds.at(i);
+
+@@ -330,6 +337,7 @@ QEventDispatcherGlibPrivate::QEventDispa
+ reinterpret_cast<GSocketNotifierSource *>(g_source_new(&socketNotifierSourceFuncs,
+ sizeof(GSocketNotifierSource)));
+ (void) new (&socketNotifierSource->pollfds) QList<GPollFDWithQSocketNotifier *>();
++ socketNotifierSource->processEventsFlags = QEventLoop::AllEvents;
+ g_source_set_can_recurse(&socketNotifierSource->source, true);
+ g_source_attach(&socketNotifierSource->source, mainContext);
+
+@@ -415,6 +423,7 @@ bool QEventDispatcherGlib::processEvents
+ // tell postEventSourcePrepare() and timerSource about any new flags
+ QEventLoop::ProcessEventsFlags savedFlags = d->timerSource->processEventsFlags;
+ d->timerSource->processEventsFlags = flags;
++ d->socketNotifierSource->processEventsFlags = flags;
+
+ if (!(flags & QEventLoop::EventLoopExec)) {
+ // force timers to be sent at normal priority
+@@ -426,6 +435,7 @@ bool QEventDispatcherGlib::processEvents
+ result = g_main_context_iteration(d->mainContext, canWait);
+
+ d->timerSource->processEventsFlags = savedFlags;
++ d->socketNotifierSource->processEventsFlags = savedFlags;
+
+ if (canWait)
+ emit awake();
diff --git a/patches/source/qt/qt.mysql.h.diff b/patches/source/qt/qt.mysql.h.diff
new file mode 100644
index 000000000..7a41be591
--- /dev/null
+++ b/patches/source/qt/qt.mysql.h.diff
@@ -0,0 +1,12 @@
+diff -Nur qt-x11-opensource-src-4.3.4.orig/src/sql/drivers/mysql/qsql_mysql.h qt-x11-opensource-src-4.3.4/src/sql/drivers/mysql/qsql_mysql.h
+--- qt-x11-opensource-src-4.3.4.orig/src/sql/drivers/mysql/qsql_mysql.h 2008-04-02 20:52:11.739343004 -0500
++++ qt-x11-opensource-src-4.3.4/src/sql/drivers/mysql/qsql_mysql.h 2008-04-02 20:52:05.970610574 -0500
+@@ -51,7 +51,7 @@
+ #include <QtCore/qt_windows.h>
+ #endif
+
+-#include <mysql.h>
++#include <mysql/mysql.h>
+
+ #ifdef QT_PLUGIN
+ #define Q_EXPORT_SQLDRIVER_MYSQL
diff --git a/patches/source/qt/qt.qclipboard_delay.patch b/patches/source/qt/qt.qclipboard_delay.patch
new file mode 100644
index 000000000..dcdf51c00
--- /dev/null
+++ b/patches/source/qt/qt.qclipboard_delay.patch
@@ -0,0 +1,12 @@
+--- a/src/gui/kernel/qclipboard_x11.cpp.sav 2014-04-25 09:52:03.855693228 +0200
++++ b/src/gui/kernel/qclipboard_x11.cpp 2014-04-25 09:51:58.038693777 +0200
+@@ -548,7 +548,8 @@ bool QX11Data::clipboardWaitForEvent(Win
+ return false;
+
+ XSync(X11->display, false);
+- usleep(50000);
++ if (!XPending(X11->display))
++ usleep(5000);
+
+ now.start();
+
diff --git a/patches/source/qt/qt.qclipboard_fix_recursive.patch b/patches/source/qt/qt.qclipboard_fix_recursive.patch
new file mode 100644
index 000000000..d9fe24b7f
--- /dev/null
+++ b/patches/source/qt/qt.qclipboard_fix_recursive.patch
@@ -0,0 +1,94 @@
+--- a/src/corelib/kernel/qeventdispatcher_glib.cpp.sav 2014-03-28 15:26:37.000000000 +0100
++++ b/src/corelib/kernel/qeventdispatcher_glib.cpp 2014-04-24 09:44:09.358659204 +0200
+@@ -255,22 +255,30 @@ struct GPostEventSource
+ GSource source;
+ QAtomicInt serialNumber;
+ int lastSerialNumber;
++ QEventLoop::ProcessEventsFlags processEventsFlags;
+ QEventDispatcherGlibPrivate *d;
+ };
+
+ static gboolean postEventSourcePrepare(GSource *s, gint *timeout)
+ {
++ GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s);
+ QThreadData *data = QThreadData::current();
+ if (!data)
+ return false;
+
++ QEventLoop::ProcessEventsFlags excludeAllFlags
++ = QEventLoop::ExcludeUserInputEvents
++ | QEventLoop::ExcludeSocketNotifiers
++ | QEventLoop::X11ExcludeTimers;
++ if ((source->processEventsFlags & excludeAllFlags) == excludeAllFlags)
++ return false;
++
+ gint dummy;
+ if (!timeout)
+ timeout = &dummy;
+ const bool canWait = data->canWaitLocked();
+ *timeout = canWait ? -1 : 0;
+
+- GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s);
+ return (!canWait
+ || (source->serialNumber != source->lastSerialNumber));
+ }
+@@ -284,8 +292,14 @@ static gboolean postEventSourceDispatch(
+ {
+ GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s);
+ source->lastSerialNumber = source->serialNumber;
+- QCoreApplication::sendPostedEvents();
+- source->d->runTimersOnceWithNormalPriority();
++ QEventLoop::ProcessEventsFlags excludeAllFlags
++ = QEventLoop::ExcludeUserInputEvents
++ | QEventLoop::ExcludeSocketNotifiers
++ | QEventLoop::X11ExcludeTimers;
++ if ((source->processEventsFlags & excludeAllFlags) != excludeAllFlags) {
++ QCoreApplication::sendPostedEvents();
++ source->d->runTimersOnceWithNormalPriority();
++ }
+ return true; // i dunno, george...
+ }
+
+@@ -329,6 +343,7 @@ QEventDispatcherGlibPrivate::QEventDispa
+ postEventSource = reinterpret_cast<GPostEventSource *>(g_source_new(&postEventSourceFuncs,
+ sizeof(GPostEventSource)));
+ postEventSource->serialNumber = 1;
++ postEventSource->processEventsFlags = QEventLoop::AllEvents;
+ postEventSource->d = this;
+ g_source_set_can_recurse(&postEventSource->source, true);
+ g_source_attach(&postEventSource->source, mainContext);
+@@ -423,6 +438,7 @@ bool QEventDispatcherGlib::processEvents
+
+ // tell postEventSourcePrepare() and timerSource about any new flags
+ QEventLoop::ProcessEventsFlags savedFlags = d->timerSource->processEventsFlags;
++ d->postEventSource->processEventsFlags = flags;
+ d->timerSource->processEventsFlags = flags;
+ d->socketNotifierSource->processEventsFlags = flags;
+
+@@ -435,6 +451,7 @@ bool QEventDispatcherGlib::processEvents
+ while (!result && canWait)
+ result = g_main_context_iteration(d->mainContext, canWait);
+
++ d->postEventSource->processEventsFlags = savedFlags;
+ d->timerSource->processEventsFlags = savedFlags;
+ d->socketNotifierSource->processEventsFlags = savedFlags;
+
+--- a/src/corelib/kernel/qeventdispatcher_unix.cpp.sav 2013-06-07 07:16:52.000000000 +0200
++++ b/src/corelib/kernel/qeventdispatcher_unix.cpp 2014-04-24 09:43:06.927589535 +0200
+@@ -905,7 +905,15 @@ bool QEventDispatcherUNIX::processEvents
+
+ // we are awake, broadcast it
+ emit awake();
+- QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData);
++
++ QEventLoop::ProcessEventsFlags excludeAllFlags
++ = QEventLoop::ExcludeUserInputEvents
++ | QEventLoop::ExcludeSocketNotifiers
++ | QEventLoop::X11ExcludeTimers;
++ if ((flags & excludeAllFlags) == excludeAllFlags)
++ return false;
++ if(( flags & excludeAllFlags ) != excludeAllFlags )
++ QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData);
+
+ int nevents = 0;
+ const bool canWait = (d->threadData->canWaitLocked()
diff --git a/patches/source/qt/qt.qsystemtrayicon-plugin-system.diff b/patches/source/qt/qt.qsystemtrayicon-plugin-system.diff
new file mode 100644
index 000000000..2466a16b4
--- /dev/null
+++ b/patches/source/qt/qt.qsystemtrayicon-plugin-system.diff
@@ -0,0 +1,1466 @@
+Description: Introduce a plugin system for QSystemTrayIcon.
+ Designed to be used with sni-qt (https://launchpad.net/sni-qt)
+Author: agateau@kde.org
+Forwarded: no
+
+Introduce a plugin system for QSystemTrayIcon. Designed to be used with sni-qt
+(https://launchpad.net/sni-qt)
+---
+ examples/desktop/systray/window.cpp | 40 ++
+ examples/desktop/systray/window.h | 6
+ src/gui/util/qabstractsystemtrayiconsys.cpp | 65 +++
+ src/gui/util/qabstractsystemtrayiconsys_p.h | 106 ++++++
+ src/gui/util/qsystemtrayicon.cpp | 6
+ src/gui/util/qsystemtrayicon_p.h | 85 ++---
+ src/gui/util/qsystemtrayicon_x11.cpp | 356 ++++-----------------
+ src/gui/util/qxembedsystemtrayicon_x11.cpp | 469 ++++++++++++++++++++++++++++
+ src/gui/util/qxembedsystemtrayicon_x11_p.h | 104 ++++++
+ src/gui/util/util.pri | 7
+ 10 files changed, 916 insertions(+), 328 deletions(-)
+
+--- a/examples/desktop/systray/window.cpp
++++ b/examples/desktop/systray/window.cpp
+@@ -158,15 +158,23 @@
+ iconComboBox->addItem(QIcon(":/images/bad.svg"), tr("Bad"));
+ iconComboBox->addItem(QIcon(":/images/heart.svg"), tr("Heart"));
+ iconComboBox->addItem(QIcon(":/images/trash.svg"), tr("Trash"));
++ iconComboBox->addItem(QIcon::fromTheme("system-file-manager"), tr("File Manager"));
+
+ showIconCheckBox = new QCheckBox(tr("Show icon"));
+ showIconCheckBox->setChecked(true);
+
++#if defined(Q_WS_X11)
++ jitToolTipCheckBox = new QCheckBox(tr("Just In Time Tooltip"));
++#endif
++
+ QHBoxLayout *iconLayout = new QHBoxLayout;
+ iconLayout->addWidget(iconLabel);
+ iconLayout->addWidget(iconComboBox);
+ iconLayout->addStretch();
+ iconLayout->addWidget(showIconCheckBox);
++#if defined(Q_WS_X11)
++ iconLayout->addWidget(jitToolTipCheckBox);
++#endif
+ iconGroupBox->setLayout(iconLayout);
+ }
+
+@@ -254,5 +262,37 @@
+ trayIconMenu->addAction(quitAction);
+
+ trayIcon = new QSystemTrayIcon(this);
++ QByteArray category = qgetenv("SNI_CATEGORY");
++ if (!category.isEmpty()) {
++ trayIcon->setProperty("_qt_sni_category", QString::fromLocal8Bit(category));
++ }
+ trayIcon->setContextMenu(trayIconMenu);
++
++#if defined(Q_WS_X11)
++ trayIcon->installEventFilter(this);
++#endif
++}
++
++#if defined(Q_WS_X11)
++bool Window::eventFilter(QObject *, QEvent *event)
++{
++ switch(event->type()) {
++ case QEvent::ToolTip:
++ if (jitToolTipCheckBox->isChecked()) {
++ QString timeString = QTime::currentTime().toString();
++ trayIcon->setToolTip(tr("Current Time: %1").arg(timeString));
++ }
++ break;
++ case QEvent::Wheel: {
++ QWheelEvent *wheelEvent = static_cast<QWheelEvent*>(event);
++ int delta = wheelEvent->delta() > 0 ? 1 : -1;
++ int index = (iconComboBox->currentIndex() + delta) % iconComboBox->count();
++ iconComboBox->setCurrentIndex(index);
++ break;
++ }
++ default:
++ break;
++ }
++ return false;
+ }
++#endif
+--- a/examples/desktop/systray/window.h
++++ b/examples/desktop/systray/window.h
+@@ -69,6 +69,9 @@
+
+ protected:
+ void closeEvent(QCloseEvent *event);
++#if defined(Q_WS_X11)
++ bool eventFilter(QObject *object, QEvent *event);
++#endif
+
+ private slots:
+ void setIcon(int index);
+@@ -86,6 +89,9 @@
+ QLabel *iconLabel;
+ QComboBox *iconComboBox;
+ QCheckBox *showIconCheckBox;
++#if defined(Q_WS_X11)
++ QCheckBox *jitToolTipCheckBox;
++#endif
+
+ QGroupBox *messageGroupBox;
+ QLabel *typeLabel;
+--- /dev/null
++++ b/src/gui/util/qabstractsystemtrayiconsys.cpp
+@@ -0,0 +1,65 @@
++/****************************************************************************
++**
++** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
++** All rights reserved.
++** Contact: Nokia Corporation (qt-info@nokia.com)
++**
++** This file is part of the QtGui module of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** GNU Lesser General Public License Usage
++** This file may be used under the terms of the GNU Lesser General Public
++** License version 2.1 as published by the Free Software Foundation and
++** appearing in the file LICENSE.LGPL included in the packaging of this
++** file. Please review the following information to ensure the GNU Lesser
++** General Public License version 2.1 requirements will be met:
++** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
++**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights. These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU General
++** Public License version 3.0 as published by the Free Software Foundation
++** and appearing in the file LICENSE.GPL included in the packaging of this
++** file. Please review the following information to ensure the GNU General
++** Public License version 3.0 requirements will be met:
++** http://www.gnu.org/copyleft/gpl.html.
++**
++** Other Usage
++** Alternatively, this file may be used in accordance with the terms and
++** conditions contained in a signed written agreement between you and Nokia.
++**
++**
++**
++**
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++#ifndef QT_NO_SYSTEMTRAYICON
++
++#include "qabstractsystemtrayiconsys_p.h"
++
++
++QSystemTrayIconSysFactoryInterface::QSystemTrayIconSysFactoryInterface()
++{
++}
++
++/////////////////////////////////////////////////
++QAbstractSystemTrayIconSys::QAbstractSystemTrayIconSys(QSystemTrayIcon *icon)
++: trayIcon(icon)
++{
++}
++
++QAbstractSystemTrayIconSys::~QAbstractSystemTrayIconSys()
++{
++}
++
++void QAbstractSystemTrayIconSys::sendActivated(QSystemTrayIcon::ActivationReason reason)
++{
++ qtsystray_sendActivated(trayIcon, reason);
++}
++
++#endif
+--- /dev/null
++++ b/src/gui/util/qabstractsystemtrayiconsys_p.h
+@@ -0,0 +1,106 @@
++/****************************************************************************
++**
++** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
++** All rights reserved.
++** Contact: Nokia Corporation (qt-info@nokia.com)
++**
++** This file is part of the QtGui module of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** GNU Lesser General Public License Usage
++** This file may be used under the terms of the GNU Lesser General Public
++** License version 2.1 as published by the Free Software Foundation and
++** appearing in the file LICENSE.LGPL included in the packaging of this
++** file. Please review the following information to ensure the GNU Lesser
++** General Public License version 2.1 requirements will be met:
++** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
++**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights. These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU General
++** Public License version 3.0 as published by the Free Software Foundation
++** and appearing in the file LICENSE.GPL included in the packaging of this
++** file. Please review the following information to ensure the GNU General
++** Public License version 3.0 requirements will be met:
++** http://www.gnu.org/copyleft/gpl.html.
++**
++** Other Usage
++** Alternatively, this file may be used in accordance with the terms and
++** conditions contained in a signed written agreement between you and Nokia.
++**
++**
++**
++**
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++#ifndef QABSTRACTSYSTEMTRAYICONSYS_P_H
++#define QABSTRACTSYSTEMTRAYICONSYS_P_H
++
++//
++// W A R N I N G
++// -------------
++//
++// This file is not part of the Qt API. It exists for the convenience
++// of a number of Qt sources files. This header file may change from
++// version to version without notice, or even be removed.
++//
++// We mean it.
++//
++
++#ifndef QT_NO_SYSTEMTRAYICON
++
++#include <qfactoryinterface.h>
++#include <qsystemtrayicon.h>
++
++class QAbstractSystemTrayIconSys;
++
++class Q_GUI_EXPORT QSystemTrayIconSysFactoryInterface : public QObject, public QFactoryInterface
++{
++ Q_OBJECT
++public:
++ QSystemTrayIconSysFactoryInterface();
++ virtual QAbstractSystemTrayIconSys * create(QSystemTrayIcon *) = 0;
++ virtual bool isAvailable() const = 0;
++
++ // \reimp
++ virtual QStringList keys() const { return QStringList() << QLatin1String("default"); }
++
++Q_SIGNALS:
++ void availableChanged(bool);
++};
++
++#define QSystemTrayIconSysFactoryInterface_iid "com.nokia.qt.QSystemTrayIconSysFactoryInterface"
++Q_DECLARE_INTERFACE(QSystemTrayIconSysFactoryInterface, QSystemTrayIconSysFactoryInterface_iid)
++
++class QRect;
++
++class Q_GUI_EXPORT QAbstractSystemTrayIconSys
++{
++public:
++ QAbstractSystemTrayIconSys(QSystemTrayIcon *icon);
++ virtual ~QAbstractSystemTrayIconSys();
++
++ virtual QRect geometry() const = 0;
++ virtual void updateVisibility() = 0;
++ virtual void updateIcon() = 0;
++ virtual void updateToolTip() = 0;
++ virtual void updateMenu() = 0;
++ virtual void showMessage(const QString &title, const QString &message,
++ QSystemTrayIcon::MessageIcon icon, int msecs) = 0;
++
++ void sendActivated(QSystemTrayIcon::ActivationReason);
++
++protected:
++ QSystemTrayIcon *trayIcon;
++};
++
++#endif // QT_NO_SYSTEMTRAYICON
++
++#endif // QABSTRACTSYSTEMTRAYICONSYS_P_H
++
+--- a/src/gui/util/qsystemtrayicon.cpp
++++ b/src/gui/util/qsystemtrayicon.cpp
+@@ -287,12 +287,6 @@
+ */
+ bool QSystemTrayIcon::event(QEvent *e)
+ {
+-#if defined(Q_WS_X11)
+- if (e->type() == QEvent::ToolTip) {
+- Q_D(QSystemTrayIcon);
+- return d->sys->deliverToolTipEvent(e);
+- }
+-#endif
+ return QObject::event(e);
+ }
+
+--- a/src/gui/util/qsystemtrayicon_p.h
++++ b/src/gui/util/qsystemtrayicon_p.h
+@@ -62,10 +62,17 @@
+ #include "QtGui/qpixmap.h"
+ #include "QtCore/qstring.h"
+ #include "QtCore/qpointer.h"
++#if defined(Q_WS_X11)
++#include "QtCore/qset.h"
++#endif
+
+ QT_BEGIN_NAMESPACE
+
++#if defined(Q_WS_X11)
++class QAbstractSystemTrayIconSys;
++#else
+ class QSystemTrayIconSys;
++#endif
+ class QToolButton;
+ class QLabel;
+
+@@ -75,6 +82,9 @@
+
+ public:
+ QSystemTrayIconPrivate() : sys(0), visible(false) { }
++ #if defined(Q_WS_X11)
++ ~QSystemTrayIconPrivate();
++ #endif
+
+ void install_sys();
+ void remove_sys();
+@@ -90,7 +100,11 @@
+ QPointer<QMenu> menu;
+ QIcon icon;
+ QString toolTip;
++ #if defined(Q_WS_X11)
++ QAbstractSystemTrayIconSys *sys;
++ #else
+ QSystemTrayIconSys *sys;
++ #endif
+ bool visible;
+ };
+
+@@ -123,60 +137,37 @@
+ };
+
+ #if defined(Q_WS_X11)
+-QT_BEGIN_INCLUDE_NAMESPACE
+-#include <QtCore/qcoreapplication.h>
+-#include <X11/Xlib.h>
+-#include <X11/Xatom.h>
+-#include <X11/Xutil.h>
+-QT_END_INCLUDE_NAMESPACE
++class QSystemTrayIconSysFactoryInterface;
+
+-class QSystemTrayIconSys : public QWidget
++/**
++ * This class acts as a composite QSystemTrayIconSysFactory: It can create
++ * instances of QAbstractSystemTrayIconSys* using either a plugin or the
++ * builtin factory and will cause QSystemTrayIconPrivate to recreate their
++ * 'sys' instances if the plugin availability changes.
++ */
++class QSystemTrayIconSysFactory : public QObject
+ {
+- friend class QSystemTrayIconPrivate;
+-
++ Q_OBJECT
+ public:
+- QSystemTrayIconSys(QSystemTrayIcon *q);
+- ~QSystemTrayIconSys();
+- enum {
+- SYSTEM_TRAY_REQUEST_DOCK = 0,
+- SYSTEM_TRAY_BEGIN_MESSAGE = 1,
+- SYSTEM_TRAY_CANCEL_MESSAGE =2
+- };
+-
+- void addToTray();
+- void updateIcon();
+- XVisualInfo* getSysTrayVisualInfo();
+-
+- // QObject::event is public but QWidget's ::event() re-implementation
+- // is protected ;(
+- inline bool deliverToolTipEvent(QEvent *e)
+- { return QWidget::event(e); }
+-
+- static Window sysTrayWindow;
+- static QList<QSystemTrayIconSys *> trayIcons;
+- static QCoreApplication::EventFilter oldEventFilter;
+- static bool sysTrayTracker(void *message, long *result);
+- static Window locateSystemTray();
+- static Atom sysTraySelection;
+- static XVisualInfo sysTrayVisual;
++ QSystemTrayIconSysFactory();
++ void registerSystemTrayIconPrivate(QSystemTrayIconPrivate *iconPrivate);
++ void unregisterSystemTrayIconPrivate(QSystemTrayIconPrivate *iconPrivate);
+
+-protected:
+- void paintEvent(QPaintEvent *pe);
+- void resizeEvent(QResizeEvent *re);
+- bool x11Event(XEvent *event);
+- void mousePressEvent(QMouseEvent *event);
+- void mouseDoubleClickEvent(QMouseEvent *event);
+-#ifndef QT_NO_WHEELEVENT
+- void wheelEvent(QWheelEvent *event);
+-#endif
+- bool event(QEvent *e);
++ QAbstractSystemTrayIconSys *create(QSystemTrayIcon *) const;
++
++ bool isAvailable() const;
++
++private Q_SLOTS:
++ void refreshTrayIconPrivates();
+
+ private:
+- QPixmap background;
+- QSystemTrayIcon *q;
+- Colormap colormap;
++ QSystemTrayIconSysFactoryInterface *factory() const;
++ void loadPluginFactory();
++
++ QSystemTrayIconSysFactoryInterface *pluginFactory;
++ QSet<QSystemTrayIconPrivate *> trayIconPrivates;
+ };
+-#endif // Q_WS_X11
++#endif
+
+ QT_END_NAMESPACE
+
+--- a/src/gui/util/qsystemtrayicon_x11.cpp
++++ b/src/gui/util/qsystemtrayicon_x11.cpp
+@@ -38,311 +38,122 @@
+ ** $QT_END_LICENSE$
+ **
+ ****************************************************************************/
++#ifndef QT_NO_SYSTEMTRAYICON
++
++#include <private/qfactoryloader_p.h>
+
+-#include "private/qt_x11_p.h"
+-#include "qlabel.h"
+-#include "qx11info_x11.h"
+-#include "qpainter.h"
+-#include "qpixmap.h"
+-#include "qbitmap.h"
+-#include "qevent.h"
+-#include "qapplication.h"
+-#include "qlist.h"
+-#include "qmenu.h"
+-#include "qtimer.h"
+ #include "qsystemtrayicon_p.h"
+-#include "qpaintengine.h"
++#include "qabstractsystemtrayiconsys_p.h"
++#include "qcoreapplication.h"
++#include "qxembedsystemtrayicon_x11_p.h"
+
+-#ifndef QT_NO_SYSTEMTRAYICON
+ QT_BEGIN_NAMESPACE
+
+-Window QSystemTrayIconSys::sysTrayWindow = XNone;
+-QList<QSystemTrayIconSys *> QSystemTrayIconSys::trayIcons;
+-QCoreApplication::EventFilter QSystemTrayIconSys::oldEventFilter = 0;
+-Atom QSystemTrayIconSys::sysTraySelection = XNone;
+-XVisualInfo QSystemTrayIconSys::sysTrayVisual = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+-
+-// Locate the system tray
+-Window QSystemTrayIconSys::locateSystemTray()
+-{
+- Display *display = QX11Info::display();
+- if (sysTraySelection == XNone) {
+- int screen = QX11Info::appScreen();
+- QString net_sys_tray = QString::fromLatin1("_NET_SYSTEM_TRAY_S%1").arg(screen);
+- sysTraySelection = XInternAtom(display, net_sys_tray.toLatin1(), False);
+- }
+-
+- return XGetSelectionOwner(QX11Info::display(), sysTraySelection);
+-}
++Q_GLOBAL_STATIC(QSystemTrayIconSysFactory, qt_guiSystemTrayIconSysFactory)
+
+-XVisualInfo* QSystemTrayIconSys::getSysTrayVisualInfo()
++QSystemTrayIconSysFactory::QSystemTrayIconSysFactory()
++: pluginFactory(0)
+ {
+- Display *display = QX11Info::display();
+-
+- if (!sysTrayVisual.visual) {
+- Window win = locateSystemTray();
+- if (win != XNone) {
+- Atom actual_type;
+- int actual_format;
+- ulong nitems, bytes_remaining;
+- uchar *data = 0;
+- int result = XGetWindowProperty(display, win, ATOM(_NET_SYSTEM_TRAY_VISUAL), 0, 1,
+- False, XA_VISUALID, &actual_type,
+- &actual_format, &nitems, &bytes_remaining, &data);
+- VisualID vid = 0;
+- if (result == Success && data && actual_type == XA_VISUALID && actual_format == 32 &&
+- nitems == 1 && bytes_remaining == 0)
+- vid = *(VisualID*)data;
+- if (data)
+- XFree(data);
+- if (vid == 0)
+- return 0;
+-
+- uint mask = VisualIDMask;
+- XVisualInfo *vi, rvi;
+- int count;
+- rvi.visualid = vid;
+- vi = XGetVisualInfo(display, mask, &rvi, &count);
+- if (vi) {
+- sysTrayVisual = vi[0];
+- XFree((char*)vi);
+- }
+- if (sysTrayVisual.depth != 32)
+- memset(&sysTrayVisual, 0, sizeof(sysTrayVisual));
+- }
+- }
+-
+- return sysTrayVisual.visual ? &sysTrayVisual : 0;
+ }
+
+-bool QSystemTrayIconSys::sysTrayTracker(void *message, long *result)
++void QSystemTrayIconSysFactory::loadPluginFactory()
+ {
+- bool retval = false;
+- if (QSystemTrayIconSys::oldEventFilter)
+- retval = QSystemTrayIconSys::oldEventFilter(message, result);
+-
+- if (trayIcons.isEmpty())
+- return retval;
+-
+- Display *display = QX11Info::display();
+- XEvent *ev = (XEvent *)message;
+- if (ev->type == DestroyNotify && ev->xany.window == sysTrayWindow) {
+- sysTrayWindow = locateSystemTray();
+- memset(&sysTrayVisual, 0, sizeof(sysTrayVisual));
+- for (int i = 0; i < trayIcons.count(); i++) {
+- if (sysTrayWindow == XNone) {
+- QBalloonTip::hideBalloon();
+- trayIcons[i]->hide(); // still no luck
+- trayIcons[i]->destroy();
+- trayIcons[i]->create();
+- } else
+- trayIcons[i]->addToTray(); // add it to the new tray
+- }
+- retval = true;
+- } else if (ev->type == ClientMessage && sysTrayWindow == XNone) {
+- static Atom manager_atom = XInternAtom(display, "MANAGER", False);
+- XClientMessageEvent *cm = (XClientMessageEvent *)message;
+- if ((cm->message_type == manager_atom) && ((Atom)cm->data.l[1] == sysTraySelection)) {
+- sysTrayWindow = cm->data.l[2];
+- memset(&sysTrayVisual, 0, sizeof(sysTrayVisual));
+- XSelectInput(display, sysTrayWindow, StructureNotifyMask);
+- for (int i = 0; i < trayIcons.count(); i++) {
+- trayIcons[i]->addToTray();
+- }
+- retval = true;
+- }
+- } else if (ev->type == PropertyNotify && ev->xproperty.atom == ATOM(_NET_SYSTEM_TRAY_VISUAL) &&
+- ev->xproperty.window == sysTrayWindow) {
+- memset(&sysTrayVisual, 0, sizeof(sysTrayVisual));
+- for (int i = 0; i < trayIcons.count(); i++) {
+- trayIcons[i]->addToTray();
+- }
+- }
+-
+- return retval;
+-}
+-
+-QSystemTrayIconSys::QSystemTrayIconSys(QSystemTrayIcon *q)
+- : QWidget(0, Qt::FramelessWindowHint | Qt::X11BypassWindowManagerHint),
+- q(q), colormap(0)
+-{
+- setAttribute(Qt::WA_AlwaysShowToolTips);
+- setAttribute(Qt::WA_QuitOnClose, false);
+- setAttribute(Qt::WA_NoSystemBackground, true);
+- setAttribute(Qt::WA_PaintOnScreen);
+-
+- static bool eventFilterAdded = false;
+- Display *display = QX11Info::display();
+- if (!eventFilterAdded) {
+- oldEventFilter = qApp->setEventFilter(sysTrayTracker);
+- eventFilterAdded = true;
+- Window root = QX11Info::appRootWindow();
+- XWindowAttributes attr;
+- XGetWindowAttributes(display, root, &attr);
+- if ((attr.your_event_mask & StructureNotifyMask) != StructureNotifyMask) {
+- (void) QApplication::desktop(); // lame trick to ensure our event mask is not overridden
+- XSelectInput(display, root, attr.your_event_mask | StructureNotifyMask); // for MANAGER selection
+- }
++ if (pluginFactory) {
++ return;
+ }
+- if (trayIcons.isEmpty()) {
+- sysTrayWindow = locateSystemTray();
+- if (sysTrayWindow != XNone)
+- XSelectInput(display, sysTrayWindow, StructureNotifyMask); // track tray events
++#ifndef QT_NO_LIBRARY
++ QFactoryLoader loader(QSystemTrayIconSysFactoryInterface_iid, QLatin1String("/systemtrayicon"));
++ pluginFactory = qobject_cast<QSystemTrayIconSysFactoryInterface *>(loader.instance(QLatin1String("default")));
++ if (pluginFactory) {
++ // Set parent to ensure factory destructor is called when application
++ // is closed
++ pluginFactory->setParent(QCoreApplication::instance());
++ connect(pluginFactory, SIGNAL(availableChanged(bool)), SLOT(refreshTrayIconPrivates()));
+ }
+- trayIcons.append(this);
+- setMouseTracking(true);
+-#ifndef QT_NO_TOOLTIP
+- setToolTip(q->toolTip());
+-#endif
+- if (sysTrayWindow != XNone)
+- addToTray();
++#endif // QT_NO_LIBRARY
+ }
+
+-QSystemTrayIconSys::~QSystemTrayIconSys()
++QSystemTrayIconSysFactoryInterface *QSystemTrayIconSysFactory::factory() const
+ {
+- trayIcons.removeAt(trayIcons.indexOf(this));
+- Display *display = QX11Info::display();
+- if (trayIcons.isEmpty()) {
+- if (sysTrayWindow == XNone)
+- return;
+- if (display)
+- XSelectInput(display, sysTrayWindow, 0); // stop tracking the tray
+- sysTrayWindow = XNone;
++ if (!pluginFactory) {
++ const_cast<QSystemTrayIconSysFactory*>(this)->loadPluginFactory();
+ }
+- if (colormap)
+- XFreeColormap(display, colormap);
++ if (pluginFactory && pluginFactory->isAvailable()) {
++ return pluginFactory;
++ }
++ static QXEmbedSystemTrayIconSysFactory def;
++ return def.isAvailable() ? &def : 0;
+ }
+
+-void QSystemTrayIconSys::addToTray()
++void QSystemTrayIconSysFactory::refreshTrayIconPrivates()
+ {
+- Q_ASSERT(sysTrayWindow != XNone);
+- Display *display = QX11Info::display();
+-
+- XVisualInfo *vi = getSysTrayVisualInfo();
+- if (vi && vi->visual) {
+- Window root = RootWindow(display, vi->screen);
+- Window p = root;
+- if (QWidget *pw = parentWidget())
+- p = pw->effectiveWinId();
+- colormap = XCreateColormap(display, root, vi->visual, AllocNone);
+- XSetWindowAttributes wsa;
+- wsa.background_pixmap = 0;
+- wsa.colormap = colormap;
+- wsa.background_pixel = 0;
+- wsa.border_pixel = 0;
+- Window wid = XCreateWindow(display, p, -1, -1, 1, 1,
+- 0, vi->depth, InputOutput, vi->visual,
+- CWBackPixmap|CWBackPixel|CWBorderPixel|CWColormap, &wsa);
+- create(wid);
+- } else {
+- XSetWindowBackgroundPixmap(display, winId(), ParentRelative);
+- }
+-
+- // GNOME, NET WM Specification
+- static Atom netwm_tray_atom = XInternAtom(display, "_NET_SYSTEM_TRAY_OPCODE", False);
+- long l[5] = { CurrentTime, SYSTEM_TRAY_REQUEST_DOCK, static_cast<long>(winId()), 0, 0 };
+- XEvent ev;
+- memset(&ev, 0, sizeof(ev));
+- ev.xclient.type = ClientMessage;
+- ev.xclient.window = sysTrayWindow;
+- ev.xclient.message_type = netwm_tray_atom;
+- ev.xclient.format = 32;
+- memcpy((char *)&ev.xclient.data, (const char *) l, sizeof(l));
+- XSendEvent(display, sysTrayWindow, False, 0, &ev);
+- setMinimumSize(22, 22); // required at least on GNOME
+-}
+-
+-void QSystemTrayIconSys::updateIcon()
+-{
+- update();
+-}
+-
+-void QSystemTrayIconSys::resizeEvent(QResizeEvent *re)
+-{
+- QWidget::resizeEvent(re);
+- updateIcon();
+-}
+-
+-void QSystemTrayIconSys::paintEvent(QPaintEvent*)
+-{
+- QPainter p(this);
+- if (!getSysTrayVisualInfo()) {
+- const QRegion oldSystemClip = p.paintEngine()->systemClip();
+- const QRect clearedRect = oldSystemClip.boundingRect();
+- XClearArea(QX11Info::display(), winId(), clearedRect.x(), clearedRect.y(),
+- clearedRect.width(), clearedRect.height(), False);
+- QPaintEngine *pe = p.paintEngine();
+- pe->setSystemClip(clearedRect);
+- q->icon().paint(&p, rect());
+- pe->setSystemClip(oldSystemClip);
+- } else {
+- p.setCompositionMode(QPainter::CompositionMode_Source);
+- p.fillRect(rect(), Qt::transparent);
+- p.setCompositionMode(QPainter::CompositionMode_SourceOver);
+- q->icon().paint(&p, rect());
++ Q_FOREACH(QSystemTrayIconPrivate *trayIconPrivate, trayIconPrivates) {
++ if (trayIconPrivate->sys) {
++ delete trayIconPrivate->sys;
++ trayIconPrivate->sys = 0;
++ }
++ // When visible is true, sys is usually not 0 but it can be 0 if the
++ // call to install_sys() failed.
++ if (trayIconPrivate->visible) {
++ trayIconPrivate->install_sys();
++ }
+ }
+ }
+
+-void QSystemTrayIconSys::mousePressEvent(QMouseEvent *ev)
++void QSystemTrayIconSysFactory::registerSystemTrayIconPrivate(QSystemTrayIconPrivate* trayIconPrivate)
+ {
+- QPoint globalPos = ev->globalPos();
+- if (ev->button() == Qt::RightButton && q->contextMenu())
+- q->contextMenu()->popup(globalPos);
+-
+- if (QBalloonTip::isBalloonVisible()) {
+- emit q->messageClicked();
+- QBalloonTip::hideBalloon();
+- }
+-
+- if (ev->button() == Qt::LeftButton)
+- emit q->activated(QSystemTrayIcon::Trigger);
+- else if (ev->button() == Qt::RightButton)
+- emit q->activated(QSystemTrayIcon::Context);
+- else if (ev->button() == Qt::MidButton)
+- emit q->activated(QSystemTrayIcon::MiddleClick);
++ trayIconPrivates.insert(trayIconPrivate);
+ }
+
+-void QSystemTrayIconSys::mouseDoubleClickEvent(QMouseEvent *ev)
++void QSystemTrayIconSysFactory::unregisterSystemTrayIconPrivate(QSystemTrayIconPrivate* trayIconPrivate)
+ {
+- if (ev->button() == Qt::LeftButton)
+- emit q->activated(QSystemTrayIcon::DoubleClick);
++ trayIconPrivates.remove(trayIconPrivate);
+ }
+
+-#ifndef QT_NO_WHEELEVENT
+-void QSystemTrayIconSys::wheelEvent(QWheelEvent *e)
++QAbstractSystemTrayIconSys *QSystemTrayIconSysFactory::create(QSystemTrayIcon *trayIcon) const
+ {
+- QApplication::sendEvent(q, e);
++ QSystemTrayIconSysFactoryInterface *f = factory();
++ if (!f) {
++ qWarning("No systemtrayicon available");
++ return 0;
++ }
++ return f->create(trayIcon);
+ }
+-#endif
+
+-bool QSystemTrayIconSys::event(QEvent *e)
++bool QSystemTrayIconSysFactory::isAvailable() const
+ {
+- if (e->type() == QEvent::ToolTip) {
+- return QApplication::sendEvent(q, e);
+- }
+- return QWidget::event(e);
++ return factory();
+ }
+
+-bool QSystemTrayIconSys::x11Event(XEvent *event)
++////////////////////////////////////////////////
++QSystemTrayIconPrivate::~QSystemTrayIconPrivate()
+ {
+- if (event->type == ReparentNotify)
+- show();
+- return QWidget::x11Event(event);
++ qt_guiSystemTrayIconSysFactory()->unregisterSystemTrayIconPrivate(this);
++ delete sys;
+ }
+
+-////////////////////////////////////////////////////////////////////////////
+ void QSystemTrayIconPrivate::install_sys()
+ {
+ Q_Q(QSystemTrayIcon);
+- if (!sys)
+- sys = new QSystemTrayIconSys(q);
++ if (!sys) {
++ // Register ourself even if create() fails: our "sys" will get created
++ // later by refreshTrayIconPrivates() if a systemtray becomes
++ // available. This situation can happen for applications which are
++ // started at login time, while the desktop itself is starting up.
++ qt_guiSystemTrayIconSysFactory()->registerSystemTrayIconPrivate(this);
++ sys = qt_guiSystemTrayIconSysFactory()->create(q);
++ if (!sys) {
++ return;
++ }
++ }
++ sys->updateVisibility();
+ }
+
+ QRect QSystemTrayIconPrivate::geometry_sys() const
+ {
+- if (!sys)
+- return QRect();
+- return QRect(sys->mapToGlobal(QPoint(0, 0)), sys->size());
++ if (!sys || !visible)
++ return QRect();
++ return sys->geometry();
+ }
+
+ void QSystemTrayIconPrivate::remove_sys()
+@@ -350,35 +161,35 @@
+ if (!sys)
+ return;
+ QBalloonTip::hideBalloon();
+- sys->hide(); // this should do the trick, but...
+- delete sys; // wm may resize system tray only for DestroyEvents
+- sys = 0;
++ sys->updateVisibility();
+ }
+
+ void QSystemTrayIconPrivate::updateIcon_sys()
+ {
+- if (!sys)
++ if (!sys || !visible)
+ return;
+ sys->updateIcon();
+ }
+
+ void QSystemTrayIconPrivate::updateMenu_sys()
+ {
+-
++ if (!sys || !visible)
++ return;
++ sys->updateMenu();
+ }
+
+ void QSystemTrayIconPrivate::updateToolTip_sys()
+ {
+- if (!sys)
++ if (!sys || !visible)
+ return;
+ #ifndef QT_NO_TOOLTIP
+- sys->setToolTip(toolTip);
++ sys->updateToolTip();
+ #endif
+ }
+
+ bool QSystemTrayIconPrivate::isSystemTrayAvailable_sys()
+ {
+- return QSystemTrayIconSys::locateSystemTray() != XNone;
++ return qt_guiSystemTrayIconSysFactory()->isAvailable();
+ }
+
+ bool QSystemTrayIconPrivate::supportsMessages_sys()
+@@ -389,12 +200,9 @@
+ void QSystemTrayIconPrivate::showMessage_sys(const QString &message, const QString &title,
+ QSystemTrayIcon::MessageIcon icon, int msecs)
+ {
+- if (!sys)
++ if (!sys || !visible)
+ return;
+- QPoint g = sys->mapToGlobal(QPoint(0, 0));
+- QBalloonTip::showBalloon(icon, message, title, sys->q,
+- QPoint(g.x() + sys->width()/2, g.y() + sys->height()/2),
+- msecs);
++ sys->showMessage(message, title, icon, msecs);
+ }
+
+ QT_END_NAMESPACE
+--- /dev/null
++++ b/src/gui/util/qxembedsystemtrayicon_x11.cpp
+@@ -0,0 +1,469 @@
++/****************************************************************************
++**
++** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
++** All rights reserved.
++** Contact: Nokia Corporation (qt-info@nokia.com)
++**
++** This file is part of the QtGui module of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** GNU Lesser General Public License Usage
++** This file may be used under the terms of the GNU Lesser General Public
++** License version 2.1 as published by the Free Software Foundation and
++** appearing in the file LICENSE.LGPL included in the packaging of this
++** file. Please review the following information to ensure the GNU Lesser
++** General Public License version 2.1 requirements will be met:
++** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
++**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights. These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU General
++** Public License version 3.0 as published by the Free Software Foundation
++** and appearing in the file LICENSE.GPL included in the packaging of this
++** file. Please review the following information to ensure the GNU General
++** Public License version 3.0 requirements will be met:
++** http://www.gnu.org/copyleft/gpl.html.
++**
++** Other Usage
++** Alternatively, this file may be used in accordance with the terms and
++** conditions contained in a signed written agreement between you and Nokia.
++**
++**
++**
++**
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++#include "qxembedsystemtrayicon_x11_p.h"
++
++#ifndef QT_NO_SYSTEMTRAYICON
++
++#include "private/qt_x11_p.h"
++#include "qapplication.h"
++#include "qevent.h"
++#include "qlist.h"
++#include "qmenu.h"
++#include "qpainter.h"
++#include "qpaintengine.h"
++#include "qsystemtrayicon_p.h"
++#include "qx11info_x11.h"
++
++QT_BEGIN_INCLUDE_NAMESPACE
++#include <QtCore/qcoreapplication.h>
++#include <X11/Xlib.h>
++#include <X11/Xatom.h>
++#include <X11/Xutil.h>
++QT_END_INCLUDE_NAMESPACE
++
++QT_BEGIN_NAMESPACE
++
++class QSystemTrayIconWidget : public QWidget
++{
++public:
++ QSystemTrayIconWidget(QSystemTrayIcon *q, QXEmbedSystemTrayIconSys *s);
++ ~QSystemTrayIconWidget();
++
++ static Window locateSystemTray();
++
++protected:
++ void paintEvent(QPaintEvent *pe);
++ void resizeEvent(QResizeEvent *re);
++ bool x11Event(XEvent *event);
++ void mousePressEvent(QMouseEvent *event);
++ void mouseDoubleClickEvent(QMouseEvent *event);
++#ifndef QT_NO_WHEELEVENT
++ void wheelEvent(QWheelEvent *event);
++#endif
++ bool event(QEvent *e);
++
++private:
++ enum {
++ SYSTEM_TRAY_REQUEST_DOCK = 0,
++ SYSTEM_TRAY_BEGIN_MESSAGE = 1,
++ SYSTEM_TRAY_CANCEL_MESSAGE =2
++ };
++
++ void addToTray();
++ static XVisualInfo* getSysTrayVisualInfo();
++
++ static Window sysTrayWindow;
++ static QList<QSystemTrayIconWidget *> trayIcons;
++ static QCoreApplication::EventFilter oldEventFilter;
++ static bool sysTrayTracker(void *message, long *result);
++ static Atom sysTraySelection;
++ static XVisualInfo sysTrayVisual;
++
++ QSystemTrayIcon *q;
++ QXEmbedSystemTrayIconSys *sys;
++ Colormap colormap;
++};
++
++Window QSystemTrayIconWidget::sysTrayWindow = XNone;
++QList<QSystemTrayIconWidget *> QSystemTrayIconWidget::trayIcons;
++QCoreApplication::EventFilter QSystemTrayIconWidget::oldEventFilter = 0;
++Atom QSystemTrayIconWidget::sysTraySelection = XNone;
++XVisualInfo QSystemTrayIconWidget::sysTrayVisual = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
++
++QSystemTrayIconWidget::QSystemTrayIconWidget(QSystemTrayIcon* q, QXEmbedSystemTrayIconSys* sys)
++: QWidget(0, Qt::FramelessWindowHint | Qt::X11BypassWindowManagerHint)
++, q(q)
++, sys(sys)
++, colormap(0)
++{
++ setAttribute(Qt::WA_AlwaysShowToolTips);
++ setAttribute(Qt::WA_QuitOnClose, false);
++ setAttribute(Qt::WA_NoSystemBackground, true);
++ setAttribute(Qt::WA_PaintOnScreen);
++ setMouseTracking(true);
++#ifndef QT_NO_TOOLTIP
++ setToolTip(q->toolTip());
++#endif
++
++ static bool eventFilterAdded = false;
++ Display *display = QX11Info::display();
++ if (!eventFilterAdded) {
++ oldEventFilter = qApp->setEventFilter(sysTrayTracker);
++ eventFilterAdded = true;
++ Window root = QX11Info::appRootWindow();
++ XWindowAttributes attr;
++ XGetWindowAttributes(display, root, &attr);
++ if ((attr.your_event_mask & StructureNotifyMask) != StructureNotifyMask) {
++ (void) QApplication::desktop(); // lame trick to ensure our event mask is not overridden
++ XSelectInput(display, root, attr.your_event_mask | StructureNotifyMask); // for MANAGER selection
++ }
++ }
++ if (trayIcons.isEmpty()) {
++ sysTrayWindow = locateSystemTray();
++ if (sysTrayWindow != XNone)
++ XSelectInput(display, sysTrayWindow, StructureNotifyMask); // track tray events
++ }
++ trayIcons.append(this);
++ if (sysTrayWindow != XNone)
++ addToTray();
++}
++
++QSystemTrayIconWidget::~QSystemTrayIconWidget()
++{
++ trayIcons.removeAt(trayIcons.indexOf(this));
++ Display *display = QX11Info::display();
++ if (trayIcons.isEmpty()) {
++ if (sysTrayWindow == XNone)
++ return;
++ if (display)
++ XSelectInput(display, sysTrayWindow, 0); // stop tracking the tray
++ sysTrayWindow = XNone;
++ }
++ if (colormap)
++ XFreeColormap(display, colormap);
++}
++
++void QSystemTrayIconWidget::resizeEvent(QResizeEvent *re)
++{
++ QWidget::resizeEvent(re);
++ update();
++}
++
++void QSystemTrayIconWidget::paintEvent(QPaintEvent*)
++{
++ QPainter p(this);
++ if (!getSysTrayVisualInfo()) {
++ const QRegion oldSystemClip = p.paintEngine()->systemClip();
++ const QRect clearedRect = oldSystemClip.boundingRect();
++ XClearArea(QX11Info::display(), winId(), clearedRect.x(), clearedRect.y(),
++ clearedRect.width(), clearedRect.height(), False);
++ QPaintEngine *pe = p.paintEngine();
++ pe->setSystemClip(clearedRect);
++ q->icon().paint(&p, rect());
++ pe->setSystemClip(oldSystemClip);
++ } else {
++ p.setCompositionMode(QPainter::CompositionMode_Source);
++ p.fillRect(rect(), Qt::transparent);
++ p.setCompositionMode(QPainter::CompositionMode_SourceOver);
++ q->icon().paint(&p, rect());
++ }
++}
++
++void QSystemTrayIconWidget::mousePressEvent(QMouseEvent *ev)
++{
++ QPoint globalPos = ev->globalPos();
++ if (ev->button() == Qt::RightButton && q->contextMenu())
++ q->contextMenu()->popup(globalPos);
++
++ if (QBalloonTip::isBalloonVisible()) {
++ QMetaObject::invokeMethod(q, "messageClicked");
++ QBalloonTip::hideBalloon();
++ }
++
++ if (ev->button() == Qt::LeftButton)
++ qtsystray_sendActivated(q, QSystemTrayIcon::Trigger);
++ else if (ev->button() == Qt::RightButton)
++ qtsystray_sendActivated(q, QSystemTrayIcon::Context);
++ else if (ev->button() == Qt::MidButton)
++ qtsystray_sendActivated(q, QSystemTrayIcon::MiddleClick);
++}
++
++void QSystemTrayIconWidget::mouseDoubleClickEvent(QMouseEvent *ev)
++{
++ if (ev->button() == Qt::LeftButton)
++ qtsystray_sendActivated(q, QSystemTrayIcon::DoubleClick);
++}
++
++#ifndef QT_NO_WHEELEVENT
++void QSystemTrayIconWidget::wheelEvent(QWheelEvent *e)
++{
++ sys->sendWheelEventToTrayIcon(e->delta(), e->orientation());
++}
++#endif
++
++bool QSystemTrayIconWidget::event(QEvent *e)
++{
++ if (e->type() == QEvent::ToolTip) {
++ sys->sendToolTipEventToTrayIcon();
++ }
++ return QWidget::event(e);
++}
++
++bool QSystemTrayIconWidget::x11Event(XEvent *event)
++{
++ if (event->type == ReparentNotify)
++ show();
++ return QWidget::x11Event(event);
++}
++
++// Locate the system tray
++Window QSystemTrayIconWidget::locateSystemTray()
++{
++ Display *display = QX11Info::display();
++ if (sysTraySelection == XNone) {
++ int screen = QX11Info::appScreen();
++ QString net_sys_tray = QString::fromLatin1("_NET_SYSTEM_TRAY_S%1").arg(screen);
++ sysTraySelection = XInternAtom(display, net_sys_tray.toLatin1(), False);
++ }
++
++ return XGetSelectionOwner(QX11Info::display(), sysTraySelection);
++}
++
++XVisualInfo* QSystemTrayIconWidget::getSysTrayVisualInfo()
++{
++ Display *display = QX11Info::display();
++
++ if (!sysTrayVisual.visual) {
++ Window win = locateSystemTray();
++ if (win != XNone) {
++ Atom actual_type;
++ int actual_format;
++ ulong nitems, bytes_remaining;
++ uchar *data = 0;
++ int result = XGetWindowProperty(display, win, ATOM(_NET_SYSTEM_TRAY_VISUAL), 0, 1,
++ False, XA_VISUALID, &actual_type,
++ &actual_format, &nitems, &bytes_remaining, &data);
++ VisualID vid = 0;
++ if (result == Success && data && actual_type == XA_VISUALID && actual_format == 32 &&
++ nitems == 1 && bytes_remaining == 0)
++ vid = *(VisualID*)data;
++ if (data)
++ XFree(data);
++ if (vid == 0)
++ return 0;
++
++ uint mask = VisualIDMask;
++ XVisualInfo *vi, rvi;
++ int count;
++ rvi.visualid = vid;
++ vi = XGetVisualInfo(display, mask, &rvi, &count);
++ if (vi) {
++ sysTrayVisual = vi[0];
++ XFree((char*)vi);
++ }
++ if (sysTrayVisual.depth != 32)
++ memset(&sysTrayVisual, 0, sizeof(sysTrayVisual));
++ }
++ }
++
++ return sysTrayVisual.visual ? &sysTrayVisual : 0;
++}
++
++bool QSystemTrayIconWidget::sysTrayTracker(void *message, long *result)
++{
++ bool retval = false;
++ if (QSystemTrayIconWidget::oldEventFilter)
++ retval = QSystemTrayIconWidget::oldEventFilter(message, result);
++
++ if (trayIcons.isEmpty())
++ return retval;
++
++ Display *display = QX11Info::display();
++ XEvent *ev = (XEvent *)message;
++ if (ev->type == DestroyNotify && ev->xany.window == sysTrayWindow) {
++ sysTrayWindow = locateSystemTray();
++ memset(&sysTrayVisual, 0, sizeof(sysTrayVisual));
++ for (int i = 0; i < trayIcons.count(); i++) {
++ if (sysTrayWindow == XNone) {
++ QBalloonTip::hideBalloon();
++ trayIcons[i]->hide(); // still no luck
++ trayIcons[i]->destroy();
++ trayIcons[i]->create();
++ } else
++ trayIcons[i]->addToTray(); // add it to the new tray
++ }
++ retval = true;
++ } else if (ev->type == ClientMessage && sysTrayWindow == XNone) {
++ static Atom manager_atom = XInternAtom(display, "MANAGER", False);
++ XClientMessageEvent *cm = (XClientMessageEvent *)message;
++ if ((cm->message_type == manager_atom) && ((Atom)cm->data.l[1] == sysTraySelection)) {
++ sysTrayWindow = cm->data.l[2];
++ memset(&sysTrayVisual, 0, sizeof(sysTrayVisual));
++ XSelectInput(display, sysTrayWindow, StructureNotifyMask);
++ for (int i = 0; i < trayIcons.count(); i++) {
++ trayIcons[i]->addToTray();
++ }
++ retval = true;
++ }
++ } else if (ev->type == PropertyNotify && ev->xproperty.atom == ATOM(_NET_SYSTEM_TRAY_VISUAL) &&
++ ev->xproperty.window == sysTrayWindow) {
++ memset(&sysTrayVisual, 0, sizeof(sysTrayVisual));
++ for (int i = 0; i < trayIcons.count(); i++) {
++ trayIcons[i]->addToTray();
++ }
++ }
++
++ return retval;
++}
++
++void QSystemTrayIconWidget::addToTray()
++{
++ Q_ASSERT(sysTrayWindow != XNone);
++ Display *display = QX11Info::display();
++
++ XVisualInfo *vi = getSysTrayVisualInfo();
++ if (vi && vi->visual) {
++ Window root = RootWindow(display, vi->screen);
++ Window p = root;
++ if (QWidget *pw = parentWidget())
++ p = pw->effectiveWinId();
++ colormap = XCreateColormap(display, root, vi->visual, AllocNone);
++ XSetWindowAttributes wsa;
++ wsa.background_pixmap = 0;
++ wsa.colormap = colormap;
++ wsa.background_pixel = 0;
++ wsa.border_pixel = 0;
++ Window wid = XCreateWindow(display, p, -1, -1, 1, 1,
++ 0, vi->depth, InputOutput, vi->visual,
++ CWBackPixmap|CWBackPixel|CWBorderPixel|CWColormap, &wsa);
++ create(wid);
++ } else {
++ XSetWindowBackgroundPixmap(display, winId(), ParentRelative);
++ }
++
++ // GNOME, NET WM Specification
++ static Atom netwm_tray_atom = XInternAtom(display, "_NET_SYSTEM_TRAY_OPCODE", False);
++ long l[5] = { CurrentTime, SYSTEM_TRAY_REQUEST_DOCK, static_cast<long>(winId()), 0, 0 };
++ XEvent ev;
++ memset(&ev, 0, sizeof(ev));
++ ev.xclient.type = ClientMessage;
++ ev.xclient.window = sysTrayWindow;
++ ev.xclient.message_type = netwm_tray_atom;
++ ev.xclient.format = 32;
++ memcpy((char *)&ev.xclient.data, (const char *) l, sizeof(l));
++ XSendEvent(display, sysTrayWindow, False, 0, &ev);
++ setMinimumSize(22, 22); // required at least on GNOME
++}
++
++////////////////////////////////////////////////////////////////////////////
++QXEmbedSystemTrayIconSys::QXEmbedSystemTrayIconSys(QSystemTrayIcon *q)
++: QAbstractSystemTrayIconSys(q)
++, widget(0)
++{
++}
++
++QXEmbedSystemTrayIconSys::~QXEmbedSystemTrayIconSys()
++{
++ delete widget;
++}
++
++QRect QXEmbedSystemTrayIconSys::geometry() const
++{
++ if (!widget)
++ return QRect();
++ return QRect(widget->mapToGlobal(QPoint(0, 0)), widget->size());
++}
++
++void QXEmbedSystemTrayIconSys::updateIcon()
++{
++ if (!widget)
++ return;
++ widget->update();
++}
++
++void QXEmbedSystemTrayIconSys::updateToolTip()
++{
++ if (!widget)
++ return;
++ widget->setToolTip(trayIcon->toolTip());
++}
++
++void QXEmbedSystemTrayIconSys::showMessage(const QString &message, const QString &title,
++ QSystemTrayIcon::MessageIcon icon, int msecs)
++{
++ if (!widget)
++ return;
++ QPoint point = geometry().center();
++ QBalloonTip::showBalloon(icon, message, title, trayIcon, point, msecs);
++}
++
++void QXEmbedSystemTrayIconSys::updateVisibility()
++{
++ bool visible = trayIcon->isVisible();
++ if (visible && !widget)
++ widget = new QSystemTrayIconWidget(trayIcon, this);
++ else if (!visible && widget) {
++ delete widget;
++ widget = 0;
++ }
++}
++
++void QXEmbedSystemTrayIconSys::sendToolTipEventToTrayIcon()
++{
++#ifndef QT_NO_TOOLTIP
++ // Pass the event through QSystemTrayIcon so that it gets a chance to
++ // update the tooltip, then asks widget to show the tooltip
++ Q_ASSERT(widget);
++ QPoint globalPos = QCursor::pos();
++ QPoint pos = widget->mapFromGlobal(globalPos);
++ QHelpEvent event(QEvent::ToolTip, pos, globalPos);
++ QApplication::sendEvent(trayIcon, &event);
++#endif
++}
++
++void QXEmbedSystemTrayIconSys::sendWheelEventToTrayIcon(int delta, Qt::Orientation orientation)
++{
++#ifndef QT_NO_WHEELEVENT
++ Q_ASSERT(widget);
++ QPoint globalPos = QCursor::pos();
++ QPoint pos = widget->mapFromGlobal(globalPos);
++ QWheelEvent event(pos, globalPos, delta, Qt::NoButton, Qt::NoModifier, orientation);
++ QApplication::sendEvent(trayIcon, &event);
++#endif
++}
++
++void QXEmbedSystemTrayIconSys::updateMenu()
++{
++}
++
++/////////////////////////////////////////////////////////////
++QAbstractSystemTrayIconSys * QXEmbedSystemTrayIconSysFactory::create(QSystemTrayIcon *icon)
++{
++ return new QXEmbedSystemTrayIconSys(icon);
++}
++
++bool QXEmbedSystemTrayIconSysFactory::isAvailable() const
++{
++ return QSystemTrayIconWidget::locateSystemTray() != XNone;
++}
++
++QT_END_NAMESPACE
++#endif //QT_NO_SYSTEMTRAYICON
+--- /dev/null
++++ b/src/gui/util/qxembedsystemtrayicon_x11_p.h
+@@ -0,0 +1,104 @@
++/****************************************************************************
++**
++** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
++** All rights reserved.
++** Contact: Nokia Corporation (qt-info@nokia.com)
++**
++** This file is part of the QtGui module of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** GNU Lesser General Public License Usage
++** This file may be used under the terms of the GNU Lesser General Public
++** License version 2.1 as published by the Free Software Foundation and
++** appearing in the file LICENSE.LGPL included in the packaging of this
++** file. Please review the following information to ensure the GNU Lesser
++** General Public License version 2.1 requirements will be met:
++** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
++**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights. These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU General
++** Public License version 3.0 as published by the Free Software Foundation
++** and appearing in the file LICENSE.GPL included in the packaging of this
++** file. Please review the following information to ensure the GNU General
++** Public License version 3.0 requirements will be met:
++** http://www.gnu.org/copyleft/gpl.html.
++**
++** Other Usage
++** Alternatively, this file may be used in accordance with the terms and
++** conditions contained in a signed written agreement between you and Nokia.
++**
++**
++**
++**
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++#ifndef QXEMBEDSYSTEMTRAYICON_X11_P_H
++#define QXEMBEDSYSTEMTRAYICON_X11_P_H
++
++//
++// W A R N I N G
++// -------------
++//
++// This file is not part of the Qt API. It exists for the convenience
++// of a number of Qt sources files. This header file may change from
++// version to version without notice, or even be removed.
++//
++// We mean it.
++//
++
++#ifndef QT_NO_SYSTEMTRAYICON
++
++#include "qabstractsystemtrayiconsys_p.h"
++
++QT_BEGIN_NAMESPACE
++
++class QSystemTrayIconWidget;
++
++class QXEmbedSystemTrayIconSys : public QAbstractSystemTrayIconSys
++{
++public:
++ QXEmbedSystemTrayIconSys(QSystemTrayIcon *);
++ ~QXEmbedSystemTrayIconSys();
++
++ QRect geometry() const;
++
++ void updateVisibility();
++
++ void updateIcon();
++
++ void updateToolTip();
++
++ void updateMenu();
++
++ void showMessage(const QString &message, const QString &title,
++ QSystemTrayIcon::MessageIcon icon, int msecs);
++
++private:
++ friend class QSystemTrayIconWidget;
++ QSystemTrayIconWidget *widget;
++
++ void sendToolTipEventToTrayIcon();
++
++ void sendWheelEventToTrayIcon(int delta, Qt::Orientation orientation);
++};
++
++struct QXEmbedSystemTrayIconSysFactory : public QSystemTrayIconSysFactoryInterface
++{
++ QAbstractSystemTrayIconSys * create(QSystemTrayIcon *trayIcon);
++ bool isAvailable() const;
++};
++
++
++QT_END_NAMESPACE
++
++#endif // QT_NO_SYSTEMTRAYICON
++
++#endif // QXEMBEDSYSTEMTRAYICON_X11_P_H
++
+--- a/src/gui/util/util.pri
++++ b/src/gui/util/util.pri
+@@ -29,8 +29,13 @@
+ }
+
+ unix:x11 {
++ HEADERS += \
++ util/qabstractsystemtrayiconsys_p.h \
++ util/qxembedsystemtrayicon_x11_p.h
+ SOURCES += \
+- util/qsystemtrayicon_x11.cpp
++ util/qabstractsystemtrayiconsys.cpp \
++ util/qsystemtrayicon_x11.cpp \
++ util/qxembedsystemtrayicon_x11.cpp
+ }
+
+ embedded|qpa {
diff --git a/patches/source/qt/qt.webkit-no_Werror.patch b/patches/source/qt/qt.webkit-no_Werror.patch
new file mode 100644
index 000000000..c8d730e46
--- /dev/null
+++ b/patches/source/qt/qt.webkit-no_Werror.patch
@@ -0,0 +1,11 @@
+--- qt-everywhere-opensource-src-4.8.4/src/3rdparty/webkit/Source/WebKit.pri.no_Werror 2012-12-02 15:59:44.891550783 +0100
++++ qt-everywhere-opensource-src-4.8.4/src/3rdparty/webkit/Source/WebKit.pri 2012-12-02 16:52:47.384406539 +0100
+@@ -102,8 +102,6 @@
+
+ # Treat warnings as errors on x86/Linux/GCC
+ linux-g++* {
+- !CONFIG(standalone_package):if(isEqual(QT_ARCH,x86_64)|isEqual(QT_ARCH,i386)): QMAKE_CXXFLAGS += -Werror
+-
+ greaterThan(QT_GCC_MAJOR_VERSION, 3):greaterThan(QT_GCC_MINOR_VERSION, 5) {
+ if (!contains(QMAKE_CXXFLAGS, -std=c++0x) && !contains(QMAKE_CXXFLAGS, -std=gnu++0x)) {
+ # We need to deactivate those warnings because some names conflicts with upcoming c++0x types (e.g.nullptr).
diff --git a/patches/source/qt/slack-desc b/patches/source/qt/slack-desc
new file mode 100644
index 000000000..0a42d4a32
--- /dev/null
+++ b/patches/source/qt/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+qt: Qt (a multi-platform C++ graphical user interface toolkit)
+qt:
+qt: Qt is a complete and well-developed object-oriented framework for
+qt: developing graphical user interface (GUI) applications using C++.
+qt:
+qt: Homepage: http://qt-project.org/
+qt:
+qt:
+qt:
+qt:
+qt:
diff --git a/patches/source/randrproto/arch.use.flags b/patches/source/randrproto/arch.use.flags
new file mode 100644
index 000000000..11087c884
--- /dev/null
+++ b/patches/source/randrproto/arch.use.flags
@@ -0,0 +1,9 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/randrproto/build/randrproto b/patches/source/randrproto/build/randrproto
new file mode 100644
index 000000000..a55e8cfcf
--- /dev/null
+++ b/patches/source/randrproto/build/randrproto
@@ -0,0 +1 @@
+1_slack14.1
diff --git a/patches/source/randrproto/configure/configure b/patches/source/randrproto/configure/configure
new file mode 100644
index 000000000..dcb1109bd
--- /dev/null
+++ b/patches/source/randrproto/configure/configure
@@ -0,0 +1,13 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --with-udev-rules-dir=/lib/udev/rules.d \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/randrproto/modularize b/patches/source/randrproto/modularize
new file mode 100644
index 000000000..8a28ed93e
--- /dev/null
+++ b/patches/source/randrproto/modularize
@@ -0,0 +1,279 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+dri3proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glamor-egl
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXpresent
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+libxshmfence
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+presentproto
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-errors
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-amdgpu
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/randrproto/noarch b/patches/source/randrproto/noarch
new file mode 100644
index 000000000..8785ee527
--- /dev/null
+++ b/patches/source/randrproto/noarch
@@ -0,0 +1,75 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/randrproto/package-blacklist b/patches/source/randrproto/package-blacklist
new file mode 100644
index 000000000..603b8c31f
--- /dev/null
+++ b/patches/source/randrproto/package-blacklist
@@ -0,0 +1,44 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+xf86-video-modesetting
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/randrproto/randrproto.SlackBuild b/patches/source/randrproto/randrproto.SlackBuild
new file mode 100755
index 000000000..d9f6c69ed
--- /dev/null
+++ b/patches/source/randrproto/randrproto.SlackBuild
@@ -0,0 +1,2 @@
+UPGRADE_PACKAGES=no ./x11.SlackBuild proto randrproto
+mv /tmp/x11-build/randrproto*txz /tmp
diff --git a/patches/source/randrproto/slack-desc/randrproto b/patches/source/randrproto/slack-desc/randrproto
new file mode 100644
index 000000000..f97ca0952
--- /dev/null
+++ b/patches/source/randrproto/slack-desc/randrproto
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+randrproto: randrproto (C prototypes for RandR)
+randrproto:
+randrproto: RandR is the X11 Resize and Rotate Extension
+randrproto:
+randrproto:
+randrproto:
+randrproto:
+randrproto:
+randrproto:
+randrproto:
+randrproto:
diff --git a/patches/source/randrproto/x11.SlackBuild b/patches/source/randrproto/x11.SlackBuild
new file mode 100755
index 000000000..c3887dff2
--- /dev/null
+++ b/patches/source/randrproto/x11.SlackBuild
@@ -0,0 +1,381 @@
+#!/bin/sh
+# Copyright 2007-2014 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ chown -R root:root .
+ find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.*
+ )
+ done
+ )
+ fi
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+
+ # If there's a ChangeLog, installing at least part of the recent history
+ # is useful, but don't let it get totally out of control:
+ if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # Strip binaries:
+ ( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/rsync/rsync.SlackBuild b/patches/source/rsync/rsync.SlackBuild
new file mode 100755
index 000000000..3efb042da
--- /dev/null
+++ b/patches/source/rsync/rsync.SlackBuild
@@ -0,0 +1,110 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=rsync
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-rsync
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf rsync-$VERSION
+tar xvf $CWD/rsync-$VERSION.tar.?z || exit 1
+cd rsync-$VERSION || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit
+
+mv $PKG/usr/share/man $PKG/usr
+rmdir $PKG/usr/share
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1 | grep -v '\.gz$') ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+mkdir -p $PKG/usr/doc/rsync-$VERSION/popt
+cp -a \
+ COPYING* INSTALL NEWS README* TODO tech_report.tex \
+ support \
+ $PKG/usr/doc/rsync-$VERSION
+( cd popt
+ cp -a CHANGES COPYING README README.rsync $PKG/usr/doc/rsync-$VERSION/popt
+)
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/rsync-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/rsync/slack-desc b/patches/source/rsync/slack-desc
new file mode 100644
index 000000000..7e3b7089a
--- /dev/null
+++ b/patches/source/rsync/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+rsync: rsync (remote file sync)
+rsync:
+rsync: rsync is a replacement for rcp that has many more features. It
+rsync: uses the "rsync algorithm" which provides a very fast method for
+rsync: bringing remote files into sync. It does this by sending just the
+rsync: differences in the files across the link, without requiring that both
+rsync: sets of files are present at one of the ends of the link beforehand.
+rsync: rsync was written by Andrew Tridgell and Paul Mackerras.
+rsync:
+rsync: Homepage: http://rsync.samba.org
+rsync:
diff --git a/patches/source/ruby/ruby.SlackBuild b/patches/source/ruby/ruby.SlackBuild
new file mode 100755
index 000000000..188e41ffb
--- /dev/null
+++ b/patches/source/ruby/ruby.SlackBuild
@@ -0,0 +1,130 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=ruby
+VERSION=$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1,2 -d - | rev)
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-ruby
+
+if [ "$ARCH" = "i486" ]; then
+ # -O3 works around a compile failure due to a miniruby segfault
+ # when trying to build ruby with gcc-4.4 or newer. Evidently
+ # -O0 also works, but...
+ # other distributions also use -fno-strict-aliasing which helps stability
+ SLKCFLAGS="-march=i486 -mtune=i686 -O3 -fno-strict-aliasing"
+ OPTFLAGS=-O3
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ # Unknown if s390 is needs -O3. Check to see if it compiles with -O2.
+ SLKCFLAGS="-O3 -fno-strict-aliasing"
+ OPTFLAGS=-O3
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O3 -fPIC -fno-strict-aliasing"
+ OPTFLAGS=-O3
+ LIBDIRSUFFIX="64"
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf ruby-$VERSION
+tar xvf $CWD/ruby-$VERSION.tar.?z* || exit 1
+cd ruby-$VERSION || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Evidently certain things must be linked static.
+# Seems suboptimal to me...
+
+CFLAGS="$SLKCFLAGS" \
+optflags=$OPTFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --datadir=/usr/share \
+ --docdir=/usr/doc/ruby-$VERSION \
+ --enable-shared \
+ --enable-pthread \
+ --disable-install-capi \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+mkdir -p $PKG/usr/doc/ruby-$VERSION
+cp -a \
+ BSDL COPYING* *GPL* ChangeLog LEGAL NEWS README* ToDo \
+ $PKG/usr/doc/ruby-$VERSION
+
+# The entire ChangeLog is excessive for most users:
+cat $PKG/usr/doc/ruby-$VERSION/ChangeLog | head -n 1000 > $PKG/usr/doc/ruby-$VERSION/CL
+mv $PKG/usr/doc/ruby-$VERSION/CL $PKG/usr/doc/ruby-$VERSION/ChangeLog
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+find $PKG | xargs file | grep -e "current ar archive" \
+ | cut -f 1 -d : | xargs strip --strip-debug 2> /dev/null
+
+# Compress and if needed symlink the man pages:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/ruby-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz
+
diff --git a/patches/source/ruby/slack-desc b/patches/source/ruby/slack-desc
new file mode 100644
index 000000000..13ffd7a3d
--- /dev/null
+++ b/patches/source/ruby/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+ruby: ruby (Interpreted object-oriented scripting language)
+ruby:
+ruby: Ruby is an interpreted scripting language for quick and easy
+ruby: object-oriented programming. It has many features to process text
+ruby: files and to do system management tasks (as in Perl). It is simple,
+ruby: straight-forward, and extensible.
+ruby:
+ruby: Visit the Ruby project online at http://www.ruby-lang.org/
+ruby:
+ruby:
+ruby:
diff --git a/patches/source/rxvt/rxvt-integer-overflow-fix.patch b/patches/source/rxvt/rxvt-integer-overflow-fix.patch
new file mode 100644
index 000000000..edb13856e
--- /dev/null
+++ b/patches/source/rxvt/rxvt-integer-overflow-fix.patch
@@ -0,0 +1,11 @@
+--- rxvt-2.7.10/src/command.c 2003-03-26 07:01:23.000000000 +0100
++++ rxvt-2.7.10-patched/src/command.c 2017-04-27 12:06:05.682072274 +0200
+@@ -2096,7 +2096,7 @@
+ i = ch - CSI_ICH;
+ ndef = get_byte_array_bit(csi_defaults, i);
+ for (p = 0; p < nargs; p++)
+- if (arg[p] == -1)
++ if (arg[p] < 0 || arg[p] > 30000)
+ arg[p] = ndef;
+
+ #ifdef DEBUG_CMD
diff --git a/patches/source/rxvt/rxvt.SlackBuild b/patches/source/rxvt/rxvt.SlackBuild
new file mode 100755
index 000000000..33ca33880
--- /dev/null
+++ b/patches/source/rxvt/rxvt.SlackBuild
@@ -0,0 +1,127 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2012, 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=rxvt
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-5_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i486 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+else
+ SLKCFLAGS="-O2"
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-rxvt
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf rxvt-$VERSION
+tar xvf $CWD/rxvt-$VERSION.tar.xz || exit 1
+cd rxvt-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+zcat $CWD/rxvt.utempter.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+
+# Patch for CVE-2017-7483:
+zcat $CWD/rxvt-integer-overflow-fix.patch.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --enable-languages \
+ --enable-utmp \
+ --enable-wtmp \
+ --enable-xpm-background \
+ --enable-transparency \
+ --enable-menubar \
+ --enable-graphics \
+ --enable-rxvt-scroll \
+ --enable-next-scroll \
+ --enable-xterm-scroll \
+ --enable-xim \
+ --enable-frills \
+ --enable-linespace \
+ --enable-24bit \
+ --enable-keepscrolling \
+ --enable-mousewheel \
+ --enable-slipwheeling \
+ --enable-xgetdefault \
+ --enable-old-selection \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+rmdir $PKG/usr/lib $PKG/usr/include
+rm $PKG/usr/bin/rxvt-$VERSION
+
+mkdir -p $PKG/usr/doc/rxvt-$VERSION
+cp -a \
+ rxvt-$VERSION.lsm doc rclock/rclock.html \
+ $PKG/usr/doc/rxvt-$VERSION
+rm -r $PKG/usr/doc/rxvt-$VERSION/doc/yodl
+
+gzip -9 $PKG/usr/man/man1/*
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/rxvt-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/rxvt/rxvt.utempter.diff b/patches/source/rxvt/rxvt.utempter.diff
new file mode 100644
index 000000000..54e06f7af
--- /dev/null
+++ b/patches/source/rxvt/rxvt.utempter.diff
@@ -0,0 +1,277 @@
+--- ./src/logging.c.orig 2002-12-15 16:33:04.000000000 -0800
++++ ./src/logging.c 2003-06-07 21:08:52.000000000 -0700
+@@ -60,157 +60,7 @@
+ void
+ rxvt_makeutent(rxvt_t *r, const char *pty, const char *hostname)
+ {
+-#ifdef HAVE_STRUCT_UTMP
+- struct utmp *ut = &(r->h->ut);
+-#endif
+-#ifdef HAVE_STRUCT_UTMPX
+- struct utmpx *utx = &(r->h->utx);
+-#endif
+-#ifdef HAVE_UTMP_PID
+- int i;
+-#endif
+- char ut_id[5];
+- struct passwd *pwent = getpwuid(getuid());
+-
+- if (!STRNCMP(pty, "/dev/", 5))
+- pty += 5; /* skip /dev/ prefix */
+-
+- if (!STRNCMP(pty, "pty", 3) || !STRNCMP(pty, "tty", 3)) {
+- STRNCPY(ut_id, (pty + 3), sizeof(ut_id));
+- }
+-#ifdef HAVE_UTMP_PID
+- else if (sscanf(pty, "pts/%d", &i) == 1)
+- sprintf(ut_id, "vt%02x", (i & 0xff)); /* sysv naming */
+-#endif
+- else if (STRNCMP(pty, "pty", 3) && STRNCMP(pty, "tty", 3)) {
+- rxvt_print_error("can't parse tty name \"%s\"", pty);
+- return;
+- }
+-
+-#ifdef HAVE_STRUCT_UTMP
+- MEMSET(ut, 0, sizeof(struct utmp));
+-# ifdef HAVE_UTMP_PID
+- setutent();
+- STRNCPY(ut->ut_id, ut_id, sizeof(ut->ut_id));
+- ut->ut_type = DEAD_PROCESS;
+- getutid(ut); /* position to entry in utmp file */
+- STRNCPY(r->h->ut_id, ut_id, sizeof(r->h->ut_id));
+-# endif
+-#endif
+-
+-#ifdef HAVE_STRUCT_UTMPX
+- MEMSET(utx, 0, sizeof(struct utmpx));
+- setutxent();
+- STRNCPY(utx->ut_id, ut_id, sizeof(utx->ut_id));
+- utx->ut_type = DEAD_PROCESS;
+- getutxid(utx); /* position to entry in utmp file */
+- STRNCPY(r->h->ut_id, ut_id, sizeof(r->h->ut_id));
+-#endif
+-
+-#ifdef HAVE_STRUCT_UTMP
+- STRNCPY(ut->ut_line, pty, sizeof(ut->ut_line));
+- ut->ut_time = time(NULL);
+-# ifdef HAVE_UTMP_PID
+- STRNCPY(ut->ut_user, (pwent && pwent->pw_name) ? pwent->pw_name : "?",
+- sizeof(ut->ut_user));
+- STRNCPY(ut->ut_id, ut_id, sizeof(ut->ut_id));
+- ut->ut_time = time(NULL);
+- ut->ut_pid = r->h->cmd_pid;
+-# ifdef HAVE_UTMP_HOST
+- STRNCPY(ut->ut_host, hostname, sizeof(ut->ut_host));
+-# endif
+- ut->ut_type = USER_PROCESS;
+- pututline(ut);
+- endutent(); /* close the file */
+- r->h->utmp_pos = -1;
+-# else
+- STRNCPY(ut->ut_name, (pwent && pwent->pw_name) ? pwent->pw_name : "?",
+- sizeof(ut->ut_name));
+-# ifdef HAVE_UTMP_HOST
+- STRNCPY(ut->ut_host, hostname, sizeof(ut->ut_host));
+-# endif
+-# endif
+-#endif
+-
+-#ifdef HAVE_STRUCT_UTMPX
+- STRNCPY(utx->ut_line, pty, sizeof(utx->ut_line));
+- STRNCPY(utx->ut_user, (pwent && pwent->pw_name) ? pwent->pw_name : "?",
+- sizeof(utx->ut_user));
+- STRNCPY(utx->ut_id, ut_id, sizeof(utx->ut_id));
+- utx->ut_session = getsid(0);
+- utx->ut_tv.tv_sec = time(NULL);
+- utx->ut_tv.tv_usec = 0;
+- utx->ut_pid = r->h->cmd_pid;
+-# ifdef HAVE_UTMPX_HOST
+- STRNCPY(utx->ut_host, hostname, sizeof(utx->ut_host));
+-# if 0
+- {
+- char *colon;
+-
+- if ((colon = STRRCHR(ut->ut_host, ':')) != NULL)
+- *colon = '\0';
+- }
+-# endif
+-# endif
+- utx->ut_type = USER_PROCESS;
+- pututxline(utx);
+- endutxent(); /* close the file */
+- r->h->utmp_pos = -1;
+-#endif
+-
+-#if defined(HAVE_STRUCT_UTMP) && !defined(HAVE_UTMP_PID)
+- {
+- int i;
+-# ifdef HAVE_TTYSLOT
+- i = ttyslot();
+- if (rxvt_write_bsd_utmp(i, ut))
+- r->h->utmp_pos = i;
+-# else
+- FILE *fd0;
+-
+- if ((fd0 = fopen(TTYTAB_FILENAME, "r")) != NULL) {
+- char buf[256], name[256];
+-
+- buf[sizeof(buf) - 1] = '\0';
+- for (i = 1; (fgets(buf, sizeof(buf) - 1, fd0) != NULL);) {
+- if (*buf == '#' || sscanf(buf, "%s", name) != 1)
+- continue;
+- if (!STRCMP(ut->ut_line, name)) {
+- if (!rxvt_write_bsd_utmp(i, ut))
+- i = 0;
+- r->h->utmp_pos = i;
+- fclose(fd0);
+- break;
+- }
+- i++;
+- }
+- fclose(fd0);
+- }
+-# endif
+- }
+-#endif
+-
+-#ifdef WTMP_SUPPORT
+-# ifdef WTMP_ONLY_ON_LOGIN
+- if (r->Options & Opt_loginShell)
+-# endif
+- {
+-# ifdef HAVE_STRUCT_UTMP
+-# ifdef HAVE_UPDWTMP
+- updwtmp(RXVT_WTMP_FILE, ut);
+-# else
+- rxvt_update_wtmp(RXVT_WTMP_FILE, ut);
+-# endif
+-# endif
+-# ifdef HAVE_STRUCT_UTMPX
+- updwtmpx(RXVT_WTMPX_FILE, utx);
+-# endif
+- }
+-#endif
+-#if defined(LASTLOG_SUPPORT) && defined(RXVT_LASTLOG_FILE)
+- if (r->Options & Opt_loginShell)
+- rxvt_update_lastlog(RXVT_LASTLOG_FILE, pty, hostname);
+-#endif
++ addToUtmp(pty, NULL, r->cmd_fd);
+ }
+
+ /* ------------------------------------------------------------------------- */
+@@ -221,85 +71,7 @@
+ void
+ rxvt_cleanutent(rxvt_t *r)
+ {
+-#ifdef HAVE_STRUCT_UTMP
+- struct utmp *tmput, *ut = &(r->h->ut);
+-#endif
+-#ifdef HAVE_STRUCT_UTMPX
+- struct utmpx *tmputx, *utx = &(r->h->utx);
+-#endif
+-
+-#ifdef HAVE_STRUCT_UTMP
+-# ifdef HAVE_UTMP_PID
+- MEMSET(ut, 0, sizeof(struct utmp));
+- setutent();
+- STRNCPY(ut->ut_id, r->h->ut_id, sizeof(ut->ut_id));
+- ut->ut_type = USER_PROCESS;
+- if ((tmput = getutid(ut))) /* position to entry in utmp file */
+- ut = tmput;
+- ut->ut_type = DEAD_PROCESS;
+-# else
+- MEMSET(ut->ut_name, 0, sizeof(ut->ut_name));
+-# ifdef HAVE_UTMP_HOST
+- MEMSET(ut->ut_host, 0, sizeof(ut->ut_host));
+-# endif
+-# endif
+- ut->ut_time = time(NULL);
+-#endif
+-
+-#ifdef HAVE_STRUCT_UTMPX
+- MEMSET(utx, 0, sizeof(struct utmpx));
+- setutxent();
+- STRNCPY(utx->ut_id, r->h->ut_id, sizeof(utx->ut_id));
+- utx->ut_type = USER_PROCESS;
+- if ((tmputx = getutxid(utx))) /* position to entry in utmp file */
+- utx = tmputx;
+- utx->ut_type = DEAD_PROCESS;
+- utx->ut_session = getsid(0);
+- utx->ut_tv.tv_sec = time(NULL);
+- utx->ut_tv.tv_usec = 0;
+-#endif
+-
+- /*
+- * Write ending wtmp entry
+- */
+-#ifdef WTMP_SUPPORT
+-# ifdef WTMP_ONLY_ON_LOGIN
+- if (r->Options & Opt_loginShell)
+-# endif
+- {
+-# ifdef HAVE_STRUCT_UTMP
+-# ifdef HAVE_UPDWTMP
+- updwtmp(RXVT_WTMP_FILE, ut);
+-# else
+- rxvt_update_wtmp(RXVT_WTMP_FILE, ut);
+-# endif
+-# endif
+-# ifdef HAVE_STRUCT_UTMPX
+- updwtmpx(RXVT_WTMPX_FILE, utx);
+-# endif
+- }
+-#endif
+-
+- /*
+- * Write utmp entry
+- */
+-#ifdef HAVE_STRUCT_UTMP
+-# ifdef HAVE_UTMP_PID
+- if (ut->ut_pid == r->h->cmd_pid)
+- pututline(ut);
+- endutent();
+-# else
+- if (r->h->utmp_pos > 0) {
+- MEMSET(ut, 0, sizeof(struct utmp));
+- rxvt_write_bsd_utmp(r->h->utmp_pos, ut);
+- }
+-# endif
+-#endif
+-#ifdef HAVE_STRUCT_UTMPX
+- if (utx->ut_pid == r->h->cmd_pid)
+- pututxline(utx);
+- endutxent();
+-#endif
++ removeFromUtmp();
+ }
+
+ /* ------------------------------------------------------------------------- */
+--- ./src/init.c.orig 2002-12-03 21:21:39.000000000 -0800
++++ ./src/init.c 2003-06-07 21:09:26.000000000 -0700
+@@ -858,6 +858,7 @@
+ rxvt_print_error("aborting");
+ exit(EXIT_FAILURE);
+ }
++ rxvt_privileged_utmp(r, SAVE);
+ }
+
+ /*----------------------------------------------------------------------*/
+@@ -1364,7 +1365,6 @@
+ #endif
+ r->num_fds++; /* counts from 0 */
+
+- rxvt_privileged_utmp(r, SAVE);
+ return cfd;
+ }
+
+--- ./autoconf/Make.common.in.orig 2001-11-29 19:22:56.000000000 -0800
++++ ./autoconf/Make.common.in 2003-06-07 21:08:52.000000000 -0700
+@@ -68,7 +68,7 @@
+
+ LIBTOOL = @LIBTOOL@
+ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(DEBUG) $(DINCLUDE) $(XINC) -I$(basedir) -I$(srcdir) -I.
+-LINK = $(CC) $(CFLAGS) $(LDFLAGS)
++LINK = $(CC) $(CFLAGS) $(LDFLAGS) -lutempter -lutil
+
+ # End of common section of the Makefile
+ #-------------------------------------------------------------------------
diff --git a/patches/source/rxvt/slack-desc b/patches/source/rxvt/slack-desc
new file mode 100644
index 000000000..5f278d61c
--- /dev/null
+++ b/patches/source/rxvt/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+rxvt: rxvt (terminal emulator)
+rxvt:
+rxvt: rxvt is a color vt102 terminal emulator intended as an xterm
+rxvt: replacement for users who do not require features such as Tektronix
+rxvt: 4014 emulation and toolkit-style configurability. As a result, rxvt
+rxvt: uses much less memory -- a significant advantage on a machine serving
+rxvt: many X sessions. Also included is rclock, an analog clock for X.
+rxvt:
+rxvt:
+rxvt:
+rxvt:
diff --git a/patches/source/samba/doinst.sh b/patches/source/samba/doinst.sh
new file mode 100644
index 000000000..01b5d4502
--- /dev/null
+++ b/patches/source/samba/doinst.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+config etc/rc.d/rc.samba.new
+config etc/samba/lmhosts.new
+# Commented out 2014-09-15 just in case we do need to change this.
+## This won't be needed. The point here is to preserve the permissions of the existing
+## file, if there is one. I don't see major new development happening in rc.samba... ;-)
+#rm -f etc/rc.d/rc.samba.new
diff --git a/patches/source/samba/pytalloc-util.pc b/patches/source/samba/pytalloc-util.pc
new file mode 100644
index 000000000..800a9a815
--- /dev/null
+++ b/patches/source/samba/pytalloc-util.pc
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${prefix}/lib
+includedir=${prefix}/include
+
+Name: pytalloc-util
+Description: Utility functions for using talloc objects with Python
+Version: 2.0.8
+Libs: -L${libdir} -lpytalloc-util
+Cflags: -Wl,-rpath,/usr/lib -I${includedir}
+URL: http://talloc.samba.org/
diff --git a/patches/source/samba/rc.samba b/patches/source/samba/rc.samba
new file mode 100644
index 000000000..7fd2b61be
--- /dev/null
+++ b/patches/source/samba/rc.samba
@@ -0,0 +1,46 @@
+#!/bin/sh
+#
+# /etc/rc.d/rc.samba
+#
+# Start/stop/restart the Samba SMB file/print server.
+#
+# To make Samba start automatically at boot, make this
+# file executable: chmod 755 /etc/rc.d/rc.samba
+#
+
+samba_start() {
+ if [ -x /usr/sbin/smbd -a -x /usr/sbin/nmbd -a -r /etc/samba/smb.conf ]; then
+ mkdir -p /var/run/samba
+ echo "Starting Samba: /usr/sbin/smbd -D"
+ /usr/sbin/smbd -D
+ echo " /usr/sbin/nmbd -D"
+ /usr/sbin/nmbd -D
+ fi
+}
+
+samba_stop() {
+ killall smbd nmbd
+}
+
+samba_restart() {
+ samba_stop
+ sleep 2
+ samba_start
+}
+
+case "$1" in
+'start')
+ samba_start
+ ;;
+'stop')
+ samba_stop
+ ;;
+'restart')
+ samba_restart
+ ;;
+*)
+ # Default is "start", for backwards compatibility with previous
+ # Slackware versions. This may change to a 'usage' error someday.
+ samba_start
+esac
+
diff --git a/patches/source/samba/samba-4.4.16-CVE-2018-1057.patch b/patches/source/samba/samba-4.4.16-CVE-2018-1057.patch
new file mode 100644
index 000000000..8d4c0c0e0
--- /dev/null
+++ b/patches/source/samba/samba-4.4.16-CVE-2018-1057.patch
@@ -0,0 +1,903 @@
+From 6ff2935f6a1bb2bdfb45beea07d4cb7c69c66a74 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Thu, 15 Feb 2018 12:43:09 +0100
+Subject: [PATCH 01/13] CVE-2018-1057: s4:dsdb/tests: add a test for password
+ change with empty delete
+
+Note that the request using the clearTextPassword attribute for the
+password change is already correctly rejected by the server.
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Stefan Metzmacher <metze@samba.org>
+---
+ selftest/knownfail.d/samba4.ldap.passwords.python | 2 +
+ source4/dsdb/tests/python/passwords.py | 49 +++++++++++++++++++++++
+ 2 files changed, 51 insertions(+)
+ create mode 100644 selftest/knownfail.d/samba4.ldap.passwords.python
+
+diff --git a/selftest/knownfail.d/samba4.ldap.passwords.python b/selftest/knownfail.d/samba4.ldap.passwords.python
+new file mode 100644
+index 0000000..343c5a7
+--- /dev/null
++++ b/selftest/knownfail.d/samba4.ldap.passwords.python
+@@ -0,0 +1,2 @@
++samba4.ldap.passwords.python.*.__main__.PasswordTests.test_pw_change_delete_no_value_userPassword
++samba4.ldap.passwords.python.*.__main__.PasswordTests.test_pw_change_delete_no_value_unicodePwd
+diff --git a/source4/dsdb/tests/python/passwords.py b/source4/dsdb/tests/python/passwords.py
+index fb3eee5..c50f2b6 100755
+--- a/source4/dsdb/tests/python/passwords.py
++++ b/source4/dsdb/tests/python/passwords.py
+@@ -931,6 +931,55 @@ userPassword: thatsAcomplPASS4
+ # Reset the "minPwdLength" as it was before
+ self.ldb.set_minPwdLength(minPwdLength)
+
++ def test_pw_change_delete_no_value_userPassword(self):
++ """Test password change with userPassword where the delete attribute doesn't have a value"""
++
++ try:
++ self.ldb2.modify_ldif("""
++dn: cn=testuser,cn=users,""" + self.base_dn + """
++changetype: modify
++delete: userPassword
++add: userPassword
++userPassword: thatsAcomplPASS1
++""")
++ except LdbError, (num, msg):
++ self.assertEquals(num, ERR_CONSTRAINT_VIOLATION)
++ else:
++ self.fail()
++
++ def test_pw_change_delete_no_value_clearTextPassword(self):
++ """Test password change with clearTextPassword where the delete attribute doesn't have a value"""
++
++ try:
++ self.ldb2.modify_ldif("""
++dn: cn=testuser,cn=users,""" + self.base_dn + """
++changetype: modify
++delete: clearTextPassword
++add: clearTextPassword
++clearTextPassword: thatsAcomplPASS2
++""")
++ except LdbError, (num, msg):
++ self.assertTrue(num == ERR_CONSTRAINT_VIOLATION or
++ num == ERR_NO_SUCH_ATTRIBUTE) # for Windows
++ else:
++ self.fail()
++
++ def test_pw_change_delete_no_value_unicodePwd(self):
++ """Test password change with unicodePwd where the delete attribute doesn't have a value"""
++
++ try:
++ self.ldb2.modify_ldif("""
++dn: cn=testuser,cn=users,""" + self.base_dn + """
++changetype: modify
++delete: unicodePwd
++add: unicodePwd
++unicodePwd:: """ + base64.b64encode("\"thatsAcomplPASS3\"".encode('utf-16-le')) + """
++""")
++ except LdbError, (num, msg):
++ self.assertEquals(num, ERR_CONSTRAINT_VIOLATION)
++ else:
++ self.fail()
++
+ def tearDown(self):
+ super(PasswordTests, self).tearDown()
+ delete_force(self.ldb, "cn=testuser,cn=users," + self.base_dn)
+--
+1.9.1
+
+
+From 35f8367aa64955d9f34beac9a62f8336e5e6c510 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Thu, 15 Feb 2018 10:56:06 +0100
+Subject: [PATCH 02/13] CVE-2018-1057: s4:dsdb/password_hash: add a helper
+ variable for LDB_FLAG_MOD_TYPE
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Stefan Metzmacher <metze@samba.org>
+---
+ source4/dsdb/samdb/ldb_modules/password_hash.c | 14 +++++++++-----
+ 1 file changed, 9 insertions(+), 5 deletions(-)
+
+diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c
+index 05b0854..aa3871d 100644
+--- a/source4/dsdb/samdb/ldb_modules/password_hash.c
++++ b/source4/dsdb/samdb/ldb_modules/password_hash.c
+@@ -3152,17 +3152,20 @@ static int password_hash_modify(struct ldb_module *module, struct ldb_request *r
+ }
+
+ while ((passwordAttr = ldb_msg_find_element(msg, *l)) != NULL) {
+- if (LDB_FLAG_MOD_TYPE(passwordAttr->flags) == LDB_FLAG_MOD_DELETE) {
++ unsigned int mtype = LDB_FLAG_MOD_TYPE(passwordAttr->flags);
++
++ if (mtype == LDB_FLAG_MOD_DELETE) {
+ ++del_attr_cnt;
+ }
+- if (LDB_FLAG_MOD_TYPE(passwordAttr->flags) == LDB_FLAG_MOD_ADD) {
++ if (mtype == LDB_FLAG_MOD_ADD) {
+ ++add_attr_cnt;
+ }
+- if (LDB_FLAG_MOD_TYPE(passwordAttr->flags) == LDB_FLAG_MOD_REPLACE) {
++ if (mtype == LDB_FLAG_MOD_REPLACE) {
+ ++rep_attr_cnt;
+ }
+ if ((passwordAttr->num_values != 1) &&
+- (LDB_FLAG_MOD_TYPE(passwordAttr->flags) == LDB_FLAG_MOD_ADD)) {
++ (mtype == LDB_FLAG_MOD_ADD))
++ {
+ talloc_free(ac);
+ ldb_asprintf_errstring(ldb,
+ "'%s' attribute must have exactly one value on add operations!",
+@@ -3170,7 +3173,8 @@ static int password_hash_modify(struct ldb_module *module, struct ldb_request *r
+ return LDB_ERR_CONSTRAINT_VIOLATION;
+ }
+ if ((passwordAttr->num_values > 1) &&
+- (LDB_FLAG_MOD_TYPE(passwordAttr->flags) == LDB_FLAG_MOD_DELETE)) {
++ (mtype == LDB_FLAG_MOD_DELETE))
++ {
+ talloc_free(ac);
+ ldb_asprintf_errstring(ldb,
+ "'%s' attribute must have zero or one value(s) on delete operations!",
+--
+1.9.1
+
+
+From 63c91916d15f355e7179292fac998056c0bd6a44 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Thu, 15 Feb 2018 14:40:59 +0100
+Subject: [PATCH 03/13] CVE-2018-1057: s4:dsdb/password_hash: add a helper
+ variable for passwordAttr->num_values
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Stefan Metzmacher <metze@samba.org>
+---
+ source4/dsdb/samdb/ldb_modules/password_hash.c | 9 +++------
+ 1 file changed, 3 insertions(+), 6 deletions(-)
+
+diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c
+index aa3871d..690bb98 100644
+--- a/source4/dsdb/samdb/ldb_modules/password_hash.c
++++ b/source4/dsdb/samdb/ldb_modules/password_hash.c
+@@ -3153,6 +3153,7 @@ static int password_hash_modify(struct ldb_module *module, struct ldb_request *r
+
+ while ((passwordAttr = ldb_msg_find_element(msg, *l)) != NULL) {
+ unsigned int mtype = LDB_FLAG_MOD_TYPE(passwordAttr->flags);
++ unsigned int nvalues = passwordAttr->num_values;
+
+ if (mtype == LDB_FLAG_MOD_DELETE) {
+ ++del_attr_cnt;
+@@ -3163,18 +3164,14 @@ static int password_hash_modify(struct ldb_module *module, struct ldb_request *r
+ if (mtype == LDB_FLAG_MOD_REPLACE) {
+ ++rep_attr_cnt;
+ }
+- if ((passwordAttr->num_values != 1) &&
+- (mtype == LDB_FLAG_MOD_ADD))
+- {
++ if ((nvalues != 1) && (mtype == LDB_FLAG_MOD_ADD)) {
+ talloc_free(ac);
+ ldb_asprintf_errstring(ldb,
+ "'%s' attribute must have exactly one value on add operations!",
+ *l);
+ return LDB_ERR_CONSTRAINT_VIOLATION;
+ }
+- if ((passwordAttr->num_values > 1) &&
+- (mtype == LDB_FLAG_MOD_DELETE))
+- {
++ if ((nvalues > 1) && (mtype == LDB_FLAG_MOD_DELETE)) {
+ talloc_free(ac);
+ ldb_asprintf_errstring(ldb,
+ "'%s' attribute must have zero or one value(s) on delete operations!",
+--
+1.9.1
+
+
+From 895b1d2c9cbbde96646146a3c7b93bd326aada55 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Thu, 15 Feb 2018 17:38:31 +0100
+Subject: [PATCH 04/13] CVE-2018-1057: s4:dsdb/acl: only call dsdb_acl_debug()
+ if we checked the acl in acl_check_password_rights()
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Stefan Metzmacher <metze@samba.org>
+---
+ source4/dsdb/samdb/ldb_modules/acl.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
+index 62e560f..aa1660c 100644
+--- a/source4/dsdb/samdb/ldb_modules/acl.c
++++ b/source4/dsdb/samdb/ldb_modules/acl.c
+@@ -989,12 +989,14 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ GUID_DRS_USER_CHANGE_PASSWORD,
+ SEC_ADS_CONTROL_ACCESS,
+ sid);
++ goto checked;
+ }
+ else if (rep_attr_cnt > 0 || (add_attr_cnt != del_attr_cnt)) {
+ ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
+ GUID_DRS_FORCE_CHANGE_PASSWORD,
+ SEC_ADS_CONTROL_ACCESS,
+ sid);
++ goto checked;
+ }
+ else if (add_attr_cnt == 1 && del_attr_cnt == 1) {
+ ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
+@@ -1005,7 +1007,13 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ if (ret == LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS) {
+ ret = LDB_ERR_CONSTRAINT_VIOLATION;
+ }
++ goto checked;
+ }
++
++ talloc_free(tmp_ctx);
++ return LDB_SUCCESS;
++
++checked:
+ if (ret != LDB_SUCCESS) {
+ dsdb_acl_debug(sd, acl_user_token(module),
+ req->op.mod.message->dn,
+--
+1.9.1
+
+
+From db056b588d40c4c6995ee882286042dbf383f502 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Thu, 15 Feb 2018 17:38:31 +0100
+Subject: [PATCH 05/13] CVE-2018-1057: s4:dsdb/acl: remove unused else branches
+ in acl_check_password_rights()
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Stefan Metzmacher <metze@samba.org>
+---
+ source4/dsdb/samdb/ldb_modules/acl.c | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
+index aa1660c..5ec5fd3 100644
+--- a/source4/dsdb/samdb/ldb_modules/acl.c
++++ b/source4/dsdb/samdb/ldb_modules/acl.c
+@@ -991,14 +991,24 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ sid);
+ goto checked;
+ }
+- else if (rep_attr_cnt > 0 || (add_attr_cnt != del_attr_cnt)) {
++
++ if (rep_attr_cnt > 0) {
+ ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
+ GUID_DRS_FORCE_CHANGE_PASSWORD,
+ SEC_ADS_CONTROL_ACCESS,
+ sid);
+ goto checked;
+ }
+- else if (add_attr_cnt == 1 && del_attr_cnt == 1) {
++
++ if (add_attr_cnt != del_attr_cnt) {
++ ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
++ GUID_DRS_FORCE_CHANGE_PASSWORD,
++ SEC_ADS_CONTROL_ACCESS,
++ sid);
++ goto checked;
++ }
++
++ if (add_attr_cnt == 1 && del_attr_cnt == 1) {
+ ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
+ GUID_DRS_USER_CHANGE_PASSWORD,
+ SEC_ADS_CONTROL_ACCESS,
+--
+1.9.1
+
+
+From ff82d4c547476751f4506092517952ac682ec38c Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Thu, 15 Feb 2018 22:59:24 +0100
+Subject: [PATCH 06/13] CVE-2018-1057: s4:dsdb/acl: check for internal controls
+ before other checks
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Stefan Metzmacher <metze@samba.org>
+---
+ source4/dsdb/samdb/ldb_modules/acl.c | 37 ++++++++++++++++++++++--------------
+ 1 file changed, 23 insertions(+), 14 deletions(-)
+
+diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
+index 5ec5fd3..56ba988 100644
+--- a/source4/dsdb/samdb/ldb_modules/acl.c
++++ b/source4/dsdb/samdb/ldb_modules/acl.c
+@@ -943,10 +943,33 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ unsigned int del_attr_cnt = 0, add_attr_cnt = 0, rep_attr_cnt = 0;
+ struct ldb_message_element *el;
+ struct ldb_message *msg;
++ struct ldb_control *c = NULL;
+ const char *passwordAttrs[] = { "userPassword", "clearTextPassword",
+ "unicodePwd", "dBCSPwd", NULL }, **l;
+ TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
+
++ c = ldb_request_get_control(req, DSDB_CONTROL_PASSWORD_CHANGE_OID);
++ if (c != NULL) {
++ /*
++ * The "DSDB_CONTROL_PASSWORD_CHANGE_OID" control means that we
++ * have a user password change and not a set as the message
++ * looks like. In it's value blob it contains the NT and/or LM
++ * hash of the old password specified by the user. This control
++ * is used by the SAMR and "kpasswd" password change mechanisms.
++ *
++ * This control can't be used by real LDAP clients,
++ * the only caller is samdb_set_password_internal(),
++ * so we don't have to strict verification of the input.
++ */
++ ret = acl_check_extended_right(tmp_ctx,
++ sd,
++ acl_user_token(module),
++ GUID_DRS_USER_CHANGE_PASSWORD,
++ SEC_ADS_CONTROL_ACCESS,
++ sid);
++ goto checked;
++ }
++
+ msg = ldb_msg_copy_shallow(tmp_ctx, req->op.mod.message);
+ if (msg == NULL) {
+ return ldb_module_oom(module);
+@@ -977,20 +1000,6 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ return LDB_SUCCESS;
+ }
+
+- if (ldb_request_get_control(req,
+- DSDB_CONTROL_PASSWORD_CHANGE_OID) != NULL) {
+- /* The "DSDB_CONTROL_PASSWORD_CHANGE_OID" control means that we
+- * have a user password change and not a set as the message
+- * looks like. In it's value blob it contains the NT and/or LM
+- * hash of the old password specified by the user.
+- * This control is used by the SAMR and "kpasswd" password
+- * change mechanisms. */
+- ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
+- GUID_DRS_USER_CHANGE_PASSWORD,
+- SEC_ADS_CONTROL_ACCESS,
+- sid);
+- goto checked;
+- }
+
+ if (rep_attr_cnt > 0) {
+ ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
+--
+1.9.1
+
+
+From 5c92da9918e2ccbcb39db2b060406f05973c0a24 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Thu, 15 Feb 2018 17:43:43 +0100
+Subject: [PATCH 07/13] CVE-2018-1057: s4:dsdb/acl: add check for
+ DSDB_CONTROL_PASSWORD_HASH_VALUES_OID control
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Stefan Metzmacher <metze@samba.org>
+---
+ source4/dsdb/samdb/ldb_modules/acl.c | 20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
+index 56ba988..00d52fe 100644
+--- a/source4/dsdb/samdb/ldb_modules/acl.c
++++ b/source4/dsdb/samdb/ldb_modules/acl.c
+@@ -970,6 +970,26 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ goto checked;
+ }
+
++ c = ldb_request_get_control(req, DSDB_CONTROL_PASSWORD_HASH_VALUES_OID);
++ if (c != NULL) {
++ /*
++ * The "DSDB_CONTROL_PASSWORD_HASH_VALUES_OID" control, without
++ * "DSDB_CONTROL_PASSWORD_CHANGE_OID" control means that we
++ * have a force password set.
++ * This control is used by the SAMR/NETLOGON/LSA password
++ * reset mechanisms.
++ *
++ * This control can't be used by real LDAP clients,
++ * the only caller is samdb_set_password_internal(),
++ * so we don't have to strict verification of the input.
++ */
++ ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
++ GUID_DRS_FORCE_CHANGE_PASSWORD,
++ SEC_ADS_CONTROL_ACCESS,
++ sid);
++ goto checked;
++ }
++
+ msg = ldb_msg_copy_shallow(tmp_ctx, req->op.mod.message);
+ if (msg == NULL) {
+ return ldb_module_oom(module);
+--
+1.9.1
+
+
+From 6417b18bc767d471e3c88935073acdc19448dc54 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Fri, 16 Feb 2018 15:17:26 +0100
+Subject: [PATCH 08/13] CVE-2018-1057: s4:dsdb/acl: add a NULL check for
+ talloc_new() in acl_check_password_rights()
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Stefan Metzmacher <metze@samba.org>
+---
+ source4/dsdb/samdb/ldb_modules/acl.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
+index 00d52fe..4146cbc 100644
+--- a/source4/dsdb/samdb/ldb_modules/acl.c
++++ b/source4/dsdb/samdb/ldb_modules/acl.c
+@@ -948,6 +948,10 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ "unicodePwd", "dBCSPwd", NULL }, **l;
+ TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
+
++ if (tmp_ctx == NULL) {
++ return LDB_ERR_OPERATIONS_ERROR;
++ }
++
+ c = ldb_request_get_control(req, DSDB_CONTROL_PASSWORD_CHANGE_OID);
+ if (c != NULL) {
+ /*
+--
+1.9.1
+
+
+From bf6c7e1b4510242750de64b0a7a112c2024b4372 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Thu, 22 Feb 2018 10:54:37 +0100
+Subject: [PATCH 09/13] CVE-2018-1057: s4/dsdb: correctly detect password
+ resets
+
+This change ensures we correctly treat the following LDIF
+
+ dn: cn=testuser,cn=users,...
+ changetype: modify
+ delete: userPassword
+ add: userPassword
+ userPassword: thatsAcomplPASS1
+
+as a password reset. Because delete and add element counts are both
+one, the ACL module wrongly treated this as a password change
+request.
+
+For a password change we need at least one value to delete and one value
+to add. This patch ensures we correctly check attributes and their
+values.
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Stefan Metzmacher <metze@samba.org>
+---
+ selftest/knownfail.d/samba4.ldap.passwords.python | 2 --
+ source4/dsdb/samdb/ldb_modules/acl.c | 18 +++++++++++++++++-
+ 2 files changed, 17 insertions(+), 3 deletions(-)
+ delete mode 100644 selftest/knownfail.d/samba4.ldap.passwords.python
+
+diff --git a/selftest/knownfail.d/samba4.ldap.passwords.python b/selftest/knownfail.d/samba4.ldap.passwords.python
+deleted file mode 100644
+index 343c5a7..0000000
+--- a/selftest/knownfail.d/samba4.ldap.passwords.python
++++ /dev/null
+@@ -1,2 +0,0 @@
+-samba4.ldap.passwords.python.*.__main__.PasswordTests.test_pw_change_delete_no_value_userPassword
+-samba4.ldap.passwords.python.*.__main__.PasswordTests.test_pw_change_delete_no_value_unicodePwd
+diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
+index 4146cbc..7a003df 100644
+--- a/source4/dsdb/samdb/ldb_modules/acl.c
++++ b/source4/dsdb/samdb/ldb_modules/acl.c
+@@ -941,6 +941,7 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ {
+ int ret = LDB_SUCCESS;
+ unsigned int del_attr_cnt = 0, add_attr_cnt = 0, rep_attr_cnt = 0;
++ unsigned int del_val_cnt = 0, add_val_cnt = 0, rep_val_cnt = 0;
+ struct ldb_message_element *el;
+ struct ldb_message *msg;
+ struct ldb_control *c = NULL;
+@@ -1006,12 +1007,15 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ while ((el = ldb_msg_find_element(msg, *l)) != NULL) {
+ if (LDB_FLAG_MOD_TYPE(el->flags) == LDB_FLAG_MOD_DELETE) {
+ ++del_attr_cnt;
++ del_val_cnt += el->num_values;
+ }
+ if (LDB_FLAG_MOD_TYPE(el->flags) == LDB_FLAG_MOD_ADD) {
+ ++add_attr_cnt;
++ add_val_cnt += el->num_values;
+ }
+ if (LDB_FLAG_MOD_TYPE(el->flags) == LDB_FLAG_MOD_REPLACE) {
+ ++rep_attr_cnt;
++ rep_val_cnt += el->num_values;
+ }
+ ldb_msg_remove_element(msg, el);
+ }
+@@ -1041,7 +1045,7 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ goto checked;
+ }
+
+- if (add_attr_cnt == 1 && del_attr_cnt == 1) {
++ if (add_val_cnt == 1 && del_val_cnt == 1) {
+ ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
+ GUID_DRS_USER_CHANGE_PASSWORD,
+ SEC_ADS_CONTROL_ACCESS,
+@@ -1053,6 +1057,18 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ goto checked;
+ }
+
++ if (add_val_cnt == 1 && del_val_cnt == 0) {
++ ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
++ GUID_DRS_FORCE_CHANGE_PASSWORD,
++ SEC_ADS_CONTROL_ACCESS,
++ sid);
++ /* Very strange, but we get constraint violation in this case */
++ if (ret == LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS) {
++ ret = LDB_ERR_CONSTRAINT_VIOLATION;
++ }
++ goto checked;
++ }
++
+ talloc_free(tmp_ctx);
+ return LDB_SUCCESS;
+
+--
+1.9.1
+
+
+From fba762e9d7599e4e2f5022a1486f3ab777d18e6d Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Wed, 14 Feb 2018 19:15:49 +0100
+Subject: [PATCH 10/13] CVE-2018-1057: s4:dsdb/acl: run password checking only
+ once
+
+This is needed, because a later commit will let the acl module add a
+control to the change request msg and we must ensure that this is only
+done once.
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Stefan Metzmacher <metze@samba.org>
+---
+ source4/dsdb/samdb/ldb_modules/acl.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
+index 7a003df..c239c01 100644
+--- a/source4/dsdb/samdb/ldb_modules/acl.c
++++ b/source4/dsdb/samdb/ldb_modules/acl.c
+@@ -1097,6 +1097,7 @@ static int acl_modify(struct ldb_module *module, struct ldb_request *req)
+ struct ldb_control *as_system;
+ struct ldb_control *is_undelete;
+ bool userPassword;
++ bool password_rights_checked = false;
+ TALLOC_CTX *tmp_ctx;
+ const struct ldb_message *msg = req->op.mod.message;
+ static const char *acl_attrs[] = {
+@@ -1242,6 +1243,9 @@ static int acl_modify(struct ldb_module *module, struct ldb_request *req)
+ } else if (ldb_attr_cmp("unicodePwd", el->name) == 0 ||
+ (userPassword && ldb_attr_cmp("userPassword", el->name) == 0) ||
+ ldb_attr_cmp("clearTextPassword", el->name) == 0) {
++ if (password_rights_checked) {
++ continue;
++ }
+ ret = acl_check_password_rights(tmp_ctx,
+ module,
+ req,
+@@ -1252,6 +1256,7 @@ static int acl_modify(struct ldb_module *module, struct ldb_request *req)
+ if (ret != LDB_SUCCESS) {
+ goto fail;
+ }
++ password_rights_checked = true;
+ } else if (ldb_attr_cmp("servicePrincipalName", el->name) == 0) {
+ ret = acl_check_spn(tmp_ctx,
+ module,
+--
+1.9.1
+
+
+From bc733fce398658e2c280dae4ba5041113e7cd500 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Fri, 16 Feb 2018 15:30:13 +0100
+Subject: [PATCH 11/13] CVE-2018-1057: s4:dsdb/samdb: define
+ DSDB_CONTROL_PASSWORD_ACL_VALIDATION_OID control
+
+Will be used to pass "user password change" vs "password reset" from the
+ACL to the password_hash module, ensuring both modules treat the request
+identical.
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Stefan Metzmacher <metze@samba.org>
+---
+ source4/dsdb/samdb/samdb.h | 9 +++++++++
+ source4/libcli/ldap/ldap_controls.c | 1 +
+ source4/setup/schema_samba4.ldif | 2 ++
+ 3 files changed, 12 insertions(+)
+
+diff --git a/source4/dsdb/samdb/samdb.h b/source4/dsdb/samdb/samdb.h
+index 0a1d90d..98faa4f 100644
+--- a/source4/dsdb/samdb/samdb.h
++++ b/source4/dsdb/samdb/samdb.h
+@@ -158,6 +158,15 @@ struct dsdb_control_password_change {
+ */
+ #define DSDB_CONTROL_CHANGEREPLMETADATA_RESORT_OID "1.3.6.1.4.1.7165.4.3.25"
+
++/*
++ * Used to pass "user password change" vs "password reset" from the ACL to the
++ * password_hash module, ensuring both modules treat the request identical.
++ */
++#define DSDB_CONTROL_PASSWORD_ACL_VALIDATION_OID "1.3.6.1.4.1.7165.4.3.33"
++struct dsdb_control_password_acl_validation {
++ bool pwd_reset;
++};
++
+ #define DSDB_EXTENDED_REPLICATED_OBJECTS_OID "1.3.6.1.4.1.7165.4.4.1"
+ struct dsdb_extended_replicated_object {
+ struct ldb_message *msg;
+diff --git a/source4/libcli/ldap/ldap_controls.c b/source4/libcli/ldap/ldap_controls.c
+index 14a80af..7837e05 100644
+--- a/source4/libcli/ldap/ldap_controls.c
++++ b/source4/libcli/ldap/ldap_controls.c
+@@ -1281,6 +1281,7 @@ static const struct ldap_control_handler ldap_known_controls[] = {
+ { DSDB_CONTROL_PASSWORD_CHANGE_STATUS_OID, NULL, NULL },
+ { DSDB_CONTROL_PASSWORD_HASH_VALUES_OID, NULL, NULL },
+ { DSDB_CONTROL_PASSWORD_CHANGE_OID, NULL, NULL },
++ { DSDB_CONTROL_PASSWORD_ACL_VALIDATION_OID, NULL, NULL },
+ { DSDB_CONTROL_APPLY_LINKS, NULL, NULL },
+ { LDB_CONTROL_BYPASS_OPERATIONAL_OID, NULL, NULL },
+ { DSDB_CONTROL_CHANGEREPLMETADATA_OID, NULL, NULL },
+diff --git a/source4/setup/schema_samba4.ldif b/source4/setup/schema_samba4.ldif
+index 69aa363..6e184bc 100644
+--- a/source4/setup/schema_samba4.ldif
++++ b/source4/setup/schema_samba4.ldif
+@@ -200,6 +200,8 @@
+ #Allocated: DSDB_CONTROL_PERMIT_INTERDOMAIN_TRUST_UAC_OID 1.3.6.1.4.1.7165.4.3.23
+ #Allocated: DSDB_CONTROL_RESTORE_TOMBSTONE_OID 1.3.6.1.4.1.7165.4.3.24
+ #Allocated: DSDB_CONTROL_CHANGEREPLMETADATA_RESORT_OID 1.3.6.1.4.1.7165.4.3.25
++#Allocated: DSDB_CONTROL_PASSWORD_ACL_VALIDATION_OID 1.3.6.1.4.1.7165.4.3.33
++
+
+ # Extended 1.3.6.1.4.1.7165.4.4.x
+ #Allocated: DSDB_EXTENDED_REPLICATED_OBJECTS_OID 1.3.6.1.4.1.7165.4.4.1
+--
+1.9.1
+
+
+From 7fc6a5ef5b1bad171dd6d2c019a4fe4c0ec00eb6 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Fri, 16 Feb 2018 15:38:19 +0100
+Subject: [PATCH 12/13] CVE-2018-1057: s4:dsdb: use
+ DSDB_CONTROL_PASSWORD_ACL_VALIDATION_OID
+
+This is used to pass information about which password change operation (change
+or reset) the acl module validated, down to the password_hash module.
+
+It's very important that both modules treat the request identical.
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Stefan Metzmacher <metze@samba.org>
+---
+ source4/dsdb/samdb/ldb_modules/acl.c | 41 ++++++++++++++++++++++++--
+ source4/dsdb/samdb/ldb_modules/password_hash.c | 30 ++++++++++++++++++-
+ 2 files changed, 67 insertions(+), 4 deletions(-)
+
+diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
+index c239c01..17e1e67 100644
+--- a/source4/dsdb/samdb/ldb_modules/acl.c
++++ b/source4/dsdb/samdb/ldb_modules/acl.c
+@@ -948,13 +948,22 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ const char *passwordAttrs[] = { "userPassword", "clearTextPassword",
+ "unicodePwd", "dBCSPwd", NULL }, **l;
+ TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
++ struct dsdb_control_password_acl_validation *pav = NULL;
+
+ if (tmp_ctx == NULL) {
+ return LDB_ERR_OPERATIONS_ERROR;
+ }
+
++ pav = talloc_zero(req, struct dsdb_control_password_acl_validation);
++ if (pav == NULL) {
++ talloc_free(tmp_ctx);
++ return LDB_ERR_OPERATIONS_ERROR;
++ }
++
+ c = ldb_request_get_control(req, DSDB_CONTROL_PASSWORD_CHANGE_OID);
+ if (c != NULL) {
++ pav->pwd_reset = false;
++
+ /*
+ * The "DSDB_CONTROL_PASSWORD_CHANGE_OID" control means that we
+ * have a user password change and not a set as the message
+@@ -977,6 +986,8 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+
+ c = ldb_request_get_control(req, DSDB_CONTROL_PASSWORD_HASH_VALUES_OID);
+ if (c != NULL) {
++ pav->pwd_reset = true;
++
+ /*
+ * The "DSDB_CONTROL_PASSWORD_HASH_VALUES_OID" control, without
+ * "DSDB_CONTROL_PASSWORD_CHANGE_OID" control means that we
+@@ -1030,6 +1041,8 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+
+
+ if (rep_attr_cnt > 0) {
++ pav->pwd_reset = true;
++
+ ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
+ GUID_DRS_FORCE_CHANGE_PASSWORD,
+ SEC_ADS_CONTROL_ACCESS,
+@@ -1038,6 +1051,8 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ }
+
+ if (add_attr_cnt != del_attr_cnt) {
++ pav->pwd_reset = true;
++
+ ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
+ GUID_DRS_FORCE_CHANGE_PASSWORD,
+ SEC_ADS_CONTROL_ACCESS,
+@@ -1046,6 +1061,8 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ }
+
+ if (add_val_cnt == 1 && del_val_cnt == 1) {
++ pav->pwd_reset = false;
++
+ ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
+ GUID_DRS_USER_CHANGE_PASSWORD,
+ SEC_ADS_CONTROL_ACCESS,
+@@ -1058,6 +1075,8 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ }
+
+ if (add_val_cnt == 1 && del_val_cnt == 0) {
++ pav->pwd_reset = true;
++
+ ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
+ GUID_DRS_FORCE_CHANGE_PASSWORD,
+ SEC_ADS_CONTROL_ACCESS,
+@@ -1069,6 +1088,14 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ goto checked;
+ }
+
++ /*
++ * Everything else is handled by the password_hash module where it will
++ * fail, but with the correct error code when the module is again
++ * checking the attributes. As the change request will lack the
++ * DSDB_CONTROL_PASSWORD_ACL_VALIDATION_OID control, we can be sure that
++ * any modification attempt that went this way will be rejected.
++ */
++
+ talloc_free(tmp_ctx);
+ return LDB_SUCCESS;
+
+@@ -1078,11 +1105,19 @@ checked:
+ req->op.mod.message->dn,
+ true,
+ 10);
++ talloc_free(tmp_ctx);
++ return ret;
+ }
+- talloc_free(tmp_ctx);
+- return ret;
+-}
+
++ ret = ldb_request_add_control(req,
++ DSDB_CONTROL_PASSWORD_ACL_VALIDATION_OID, false, pav);
++ if (ret != LDB_SUCCESS) {
++ ldb_debug(ldb_module_get_ctx(module), LDB_DEBUG_ERROR,
++ "Unable to register ACL validation control!\n");
++ return ret;
++ }
++ return LDB_SUCCESS;
++}
+
+ static int acl_modify(struct ldb_module *module, struct ldb_request *req)
+ {
+diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c
+index 690bb98..de565bc 100644
+--- a/source4/dsdb/samdb/ldb_modules/password_hash.c
++++ b/source4/dsdb/samdb/ldb_modules/password_hash.c
+@@ -2572,7 +2572,35 @@ static int setup_io(struct ph_context *ac,
+ /* On "add" we have only "password reset" */
+ ac->pwd_reset = true;
+ } else if (ac->req->operation == LDB_MODIFY) {
+- if (io->og.cleartext_utf8 || io->og.cleartext_utf16
++ struct ldb_control *pav_ctrl = NULL;
++ struct dsdb_control_password_acl_validation *pav = NULL;
++
++ pav_ctrl = ldb_request_get_control(ac->req,
++ DSDB_CONTROL_PASSWORD_ACL_VALIDATION_OID);
++ if (pav_ctrl != NULL) {
++ pav = talloc_get_type_abort(pav_ctrl->data,
++ struct dsdb_control_password_acl_validation);
++ }
++
++ if (pav == NULL) {
++ bool ok;
++
++ /*
++ * If the DSDB_CONTROL_PASSWORD_ACL_VALIDATION_OID
++ * control is missing, we require system access!
++ */
++ ok = dsdb_module_am_system(ac->module);
++ if (!ok) {
++ return ldb_module_operr(ac->module);
++ }
++ }
++
++ if (pav != NULL) {
++ /*
++ * We assume what the acl module has validated.
++ */
++ ac->pwd_reset = pav->pwd_reset;
++ } else if (io->og.cleartext_utf8 || io->og.cleartext_utf16
+ || io->og.nt_hash || io->og.lm_hash) {
+ /* If we have an old password specified then for sure it
+ * is a user "password change" */
+--
+1.9.1
+
+
+From 0815e8653277383918530f8dd8afaeadfe8085d5 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Thu, 15 Feb 2018 23:11:38 +0100
+Subject: [PATCH 13/13] CVE-2018-1057: s4:dsdb/acl: changing dBCSPwd is only
+ allowed with a control
+
+This is not strictly needed to fig bug 13272, but it makes sense to also
+fix this while fixing the overall ACL checking logic.
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Stefan Metzmacher <metze@samba.org>
+---
+ source4/dsdb/samdb/ldb_modules/acl.c | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
+index 17e1e67..8d9b780 100644
+--- a/source4/dsdb/samdb/ldb_modules/acl.c
++++ b/source4/dsdb/samdb/ldb_modules/acl.c
+@@ -946,7 +946,7 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ struct ldb_message *msg;
+ struct ldb_control *c = NULL;
+ const char *passwordAttrs[] = { "userPassword", "clearTextPassword",
+- "unicodePwd", "dBCSPwd", NULL }, **l;
++ "unicodePwd", NULL }, **l;
+ TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
+ struct dsdb_control_password_acl_validation *pav = NULL;
+
+@@ -1006,6 +1006,15 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ goto checked;
+ }
+
++ el = ldb_msg_find_element(req->op.mod.message, "dBCSPwd");
++ if (el != NULL) {
++ /*
++ * dBCSPwd is only allowed with a control.
++ */
++ talloc_free(tmp_ctx);
++ return LDB_ERR_UNWILLING_TO_PERFORM;
++ }
++
+ msg = ldb_msg_copy_shallow(tmp_ctx, req->op.mod.message);
+ if (msg == NULL) {
+ return ldb_module_oom(module);
+--
+1.9.1
+
diff --git a/patches/source/samba/samba-4.5.14-security-2017-11-21.patch b/patches/source/samba/samba-4.5.14-security-2017-11-21.patch
new file mode 100644
index 000000000..40b9dd084
--- /dev/null
+++ b/patches/source/samba/samba-4.5.14-security-2017-11-21.patch
@@ -0,0 +1,110 @@
+From 007f5b54d76bf69f441cc277b7f41f478e258aab Mon Sep 17 00:00:00 2001
+From: Jeremy Allison <jra@samba.org>
+Date: Tue, 19 Sep 2017 16:11:33 -0700
+Subject: [PATCH 1/2] s3: smbd: Fix SMB1 use-after-free crash bug.
+ CVE-2017-14746
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When setting up the chain, always use 'next->' variables
+not the 'req->' one.
+
+Bug discovered by 连一汉 <lianyihan@360.cn>
+
+CVE-2017-14746
+
+BUG: https://bugzilla.samba.org/show_bug.cgi?id=13041
+
+Signed-off-by: Jeremy Allison <jra@samba.org>
+---
+ source3/smbd/process.c | 7 ++++---
+ source3/smbd/reply.c | 5 +++++
+ 2 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/source3/smbd/process.c b/source3/smbd/process.c
+index 656f1c0a667..2641894d1d7 100644
+--- a/source3/smbd/process.c
++++ b/source3/smbd/process.c
+@@ -1854,12 +1854,13 @@ void smb_request_done(struct smb_request *req)
+
+ next->vuid = SVAL(req->outbuf, smb_uid);
+ next->tid = SVAL(req->outbuf, smb_tid);
+- status = smb1srv_tcon_lookup(req->xconn, req->tid,
++ status = smb1srv_tcon_lookup(req->xconn, next->tid,
+ now, &tcon);
++
+ if (NT_STATUS_IS_OK(status)) {
+- req->conn = tcon->compat;
++ next->conn = tcon->compat;
+ } else {
+- req->conn = NULL;
++ next->conn = NULL;
+ }
+ next->chain_fsp = req->chain_fsp;
+ next->inbuf = req->inbuf;
+diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
+index a40ff81b240..26918b6d9d5 100644
+--- a/source3/smbd/reply.c
++++ b/source3/smbd/reply.c
+@@ -921,6 +921,11 @@ void reply_tcon_and_X(struct smb_request *req)
+ }
+
+ TALLOC_FREE(tcon);
++ /*
++ * This tree id is gone. Make sure we can't re-use it
++ * by accident.
++ */
++ req->tid = 0;
+ }
+
+ if ((passlen > MAX_PASS_LEN) || (passlen >= req->buflen)) {
+--
+2.11.0
+
+
+From c1a22e59f87783d88dfbaeeb132b89be166b2754 Mon Sep 17 00:00:00 2001
+From: Jeremy Allison <jra@samba.org>
+Date: Wed, 20 Sep 2017 11:04:50 -0700
+Subject: [PATCH 2/2] s3: smbd: Chain code can return uninitialized memory when
+ talloc buffer is grown.
+
+Ensure we zero out unused grown area.
+
+CVE-2017-15275
+
+BUG: https://bugzilla.samba.org/show_bug.cgi?id=13077
+
+Signed-off-by: Jeremy Allison <jra@samba.org>
+---
+ source3/smbd/srvstr.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/source3/smbd/srvstr.c b/source3/smbd/srvstr.c
+index 56dceba8c6c..c2d70b32c32 100644
+--- a/source3/smbd/srvstr.c
++++ b/source3/smbd/srvstr.c
+@@ -110,6 +110,20 @@ ssize_t message_push_string(uint8_t **outbuf, const char *str, int flags)
+ DEBUG(0, ("srvstr_push failed\n"));
+ return -1;
+ }
++
++ /*
++ * Ensure we clear out the extra data we have
++ * grown the buffer by, but not written to.
++ */
++ if (buf_size + result < buf_size) {
++ return -1;
++ }
++ if (grow_size < result) {
++ return -1;
++ }
++
++ memset(tmp + buf_size + result, '\0', grow_size - result);
++
+ set_message_bcc((char *)tmp, smb_buflen(tmp) + result);
+
+ *outbuf = tmp;
+--
+2.11.0
+
diff --git a/patches/source/samba/samba.SlackBuild b/patches/source/samba/samba.SlackBuild
new file mode 100755
index 000000000..cd33c39d8
--- /dev/null
+++ b/patches/source/samba/samba.SlackBuild
@@ -0,0 +1,224 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2012, 2013, 2015, 2016 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Modified 2012 by Eric Hameleers <alien at slackware.com> for ARM port.
+
+
+VERSION=${VERSION:-$(echo samba-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-3_slack14.1}
+
+if [ -e $CWD/machine.conf ]; then
+ . $CWD/machine.conf ]
+elif [ -e /etc/slackbuild/machine.conf ]; then
+ . /etc/slackbuild/machine.conf ]
+else
+ # Automatically determine the architecture we're building on:
+ if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+ fi
+ # Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
+ if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ fi
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-samba
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+if [ -r /usr/lib${LIBDIRSUFFIX}/libtalloc.so.? -a ! -r /var/log/packages/talloc* ]; then
+ echo "The Samba package needs to be removed before building to ensure that"
+ echo "talloc (and possibly other bundled libraries) are included in the build."
+ echo
+ echo "Removing the Samba package in 15 seconds, and then continuing with the build."
+ sleep 15
+ removepkg samba
+fi
+
+cd $TMP
+rm -rf samba-$VERSION
+tar xvf $CWD/samba-$VERSION.tar.xz || exit 1
+cd samba-$VERSION || exit 1
+
+# Patch to install talloc/tevent/tdb libraries and includes:
+zcat $CWD/samba.install.talloc.tevent.tdb.diff.gz | patch -p1 --verbose || exit 1
+
+# Patch CVE-2017-14746 and CVE-2017-15275:
+zcat $CWD/samba-4.5.14-security-2017-11-21.patch.gz | patch -p1 --verbose || exit 1
+
+# Patch CVE-2018-1057:
+zcat $CWD/samba-4.4.16-CVE-2018-1057.patch.gz | patch -p1 --verbose || exit 1
+
+if [ ! -d source3/lib/cmdline ]; then
+ ( cd source3/lib
+ mkdir cmdline
+ cd cmdline
+ ln -sf ../../../source3/include/popt_common.h . )
+fi
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Some of these options could be auto-detected, but declaring them
+# here doesn't hurt and helps document what features we're trying to
+# build in.
+#
+# LDFLAGS are needed to avoid problems with missing symbols.
+LDFLAGS="-Wl,--no-as-needed" \
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --enable-fhs \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --includedir=/usr/include \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
+ --mandir=/usr/man \
+ --sysconfdir=/etc \
+ --with-configdir=/etc/samba \
+ --with-piddir=/var/run \
+ --with-privatedir=/etc/samba/private \
+ --with-privatelibdir=/usr/lib${LIBDIRSUFFIX} \
+ --with-modulesdir=/usr/lib${LIBDIRSUFFIX} \
+ --with-lockdir=/var/cache/samba \
+ --with-logfilebase=/var/log/samba \
+ --localstatedir=/var \
+ --enable-cups \
+ --with-acl-support \
+ --with-automount \
+ --with-quotas \
+ --with-syslog \
+ --with-utmp \
+ --with-winbind \
+ --with-ldap \
+ --with-ads \
+ --without-pam \
+ --build=$TARGET
+ # Gives errors:
+ #--builtin-libraries=replace,ccan \
+ #--bundled-libraries=heimdal \
+
+# -j options don't seem to work... [Yes they do! At least try to use -j below...]
+JOBS=6
+MAXJOBS=6
+export JOBS MAXJOBS
+make -j $MAXJOBS || make || exit 1
+
+mkdir -p \
+ $PKG/usr/doc/samba-$VERSION \
+ $PKG/var/spool/samba \
+ $PKG/var/log/samba \
+ $PKG/etc/samba/private \
+ $PKG/var/cache/samba
+chmod 700 $PKG/etc/samba/private
+chmod 1777 $PKG/var/spool/samba
+
+make install DESTDIR=$PKG || exit 1
+
+# Install the smbprint script:
+install -m0744 packaging/printing/smbprint $PKG/usr/bin/smbprint
+
+# Add a sample config file:
+cat $CWD/smb.conf.default > $PKG/etc/samba/smb.conf-sample
+
+# Setup a default lmhosts file:
+echo "127.0.0.1 localhost" > $PKG/etc/samba/lmhosts.new
+
+if [ ! -r $PKG/usr/bin/smbget ]; then
+ rm -f $PKG/usr/share/man/man1/smbget.1
+fi
+
+# We'll add rc.samba to the init directory, but chmod 644 so that it doesn't
+# start by default:
+mkdir -p $PKG/etc/rc.d
+cat $CWD/rc.samba > $PKG/etc/rc.d/rc.samba.new
+chmod 644 $PKG/etc/rc.d/rc.samba.new
+
+mv $PKG/usr/share/man $PKG/usr
+gzip -9 $PKG/usr/man/man?/*.?
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# PAM related stuff we don't use:
+rm -r $PKG/usr/share/locale
+rm -f $PKG/usr/man/man8/pam*
+
+cp -a \
+ COPYING* MAINTAINERS Manifest PFIF.txt README* \
+ Read-Manifest-Now Roadmap WHATSNEW.txt docs examples \
+ $PKG/usr/doc/samba-$VERSION
+# These are installed elsewhere:
+rm -rf $PKG/usr/doc/samba-$VERSION/docs/htmldocs \
+ $PKG/usr/doc/samba-$VERSION/docs/manpages
+# Empty now?
+rmdir $PKG/usr/doc/samba-$VERSION/docs 2> /dev/null
+# I'm sorry, but when all this info is included in HTML, adding 7MB worth of
+# PDF files just to have extra artwork is more fluff than I'll agree to.
+rm -f $PKG/usr/doc/samba-$VERSION/docs/*.pdf
+# Also redundant also:
+rm -rf $PKG/usr/doc/samba-$VERSION/docs/docbook
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+cat << EOF
+
+*** Be sure the package contains:
+
+drwx------ 2 root root 1024 Mar 12 13:21 /etc/samba/private
+drwxr-xr-x 2 root root 4096 May 3 15:46 /var/cache/samba/
+drwxr-xr-x 2 root root 48 Aug 29 13:06 /var/log/samba/
+drwxrwxrwt 2 root root 1024 Mar 12 13:21 /var/spool/samba/
+
+EOF
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/samba-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/samba/samba.install.talloc.tevent.tdb.diff b/patches/source/samba/samba.install.talloc.tevent.tdb.diff
new file mode 100644
index 000000000..9410f2b71
--- /dev/null
+++ b/patches/source/samba/samba.install.talloc.tevent.tdb.diff
@@ -0,0 +1,102 @@
+--- ./lib/tevent/wscript.orig 2016-03-08 05:07:45.000000000 -0600
++++ ./lib/tevent/wscript 2016-04-11 12:45:14.299532166 -0500
+@@ -92,11 +92,8 @@
+ if bld.CONFIG_SET('HAVE_SOLARIS_PORTS'):
+ SRC += ' tevent_port.c'
+
+- if bld.env.standalone_tevent:
+- bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
+- private_library = False
+- else:
+- private_library = True
++ bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
++ private_library = False
+
+ if not bld.CONFIG_SET('USING_SYSTEM_TEVENT'):
+ bld.SAMBA_LIBRARY('tevent',
+--- ./lib/tdb/wscript.orig 2016-01-26 05:45:46.000000000 -0600
++++ ./lib/tdb/wscript 2016-04-11 12:45:14.301532166 -0500
+@@ -117,11 +117,8 @@
+
+ COMMON_SRC = bld.SUBDIR('common', COMMON_FILES)
+
+- if bld.env.standalone_tdb:
+- bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
+- private_library = False
+- else:
+- private_library = True
++ bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
++ private_library = False
+
+ if not bld.CONFIG_SET('USING_SYSTEM_TDB'):
+
+--- ./lib/talloc/wscript.orig 2016-04-11 12:45:14.295532166 -0500
++++ ./lib/talloc/wscript 2016-04-11 12:45:26.761531768 -0500
+@@ -77,41 +77,39 @@
+ def build(bld):
+ bld.RECURSE('lib/replace')
+
+- if bld.env.standalone_talloc:
+- bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
+- bld.env.TALLOC_VERSION = VERSION
+- private_library = False
+-
+- # should we also install the symlink to libtalloc1.so here?
+- bld.SAMBA_LIBRARY('talloc-compat1-%s' % (VERSION),
+- 'compat/talloc_compat1.c',
+- public_deps='talloc',
+- soname='libtalloc.so.1',
+- pc_files=[],
+- public_headers=[],
+- enabled=bld.env.TALLOC_COMPAT1)
+-
+- testsuite_deps = 'talloc'
+- if bld.CONFIG_SET('HAVE_PTHREAD'):
+- testsuite_deps += ' pthread'
+-
+- bld.SAMBA_BINARY('talloc_testsuite',
+- 'testsuite_main.c testsuite.c',
+- testsuite_deps,
+- install=False)
+-
+- bld.SAMBA_BINARY('talloc_test_magic_differs_helper',
+- 'test_magic_differs_helper.c',
+- 'talloc', install=False)
++ bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
++ bld.env.TALLOC_VERSION = VERSION
++ private_library = False
++
++ # should we also install the symlink to libtalloc1.so here?
++ bld.SAMBA_LIBRARY('talloc-compat1-%s' % (VERSION),
++ 'compat/talloc_compat1.c',
++ public_deps='talloc',
++ soname='libtalloc.so.1',
++ pc_files=[],
++ public_headers=[],
++ enabled=bld.env.TALLOC_COMPAT1)
++
++ testsuite_deps = 'talloc'
++ if bld.CONFIG_SET('HAVE_PTHREAD'):
++ testsuite_deps += ' pthread'
++
++ bld.SAMBA_BINARY('talloc_testsuite',
++ 'testsuite_main.c testsuite.c',
++ testsuite_deps,
++ install=False)
++
++ bld.SAMBA_BINARY('talloc_test_magic_differs_helper',
++ 'test_magic_differs_helper.c',
++ 'talloc', install=False)
+
+- else:
+- private_library = True
+
+ if not bld.CONFIG_SET('USING_SYSTEM_TALLOC'):
+
+ bld.SAMBA_LIBRARY('talloc',
+ 'talloc.c',
+ deps='replace',
++ includes='.',
+ abi_directory='ABI',
+ abi_match='talloc* _talloc*',
+ hide_symbols=True,
diff --git a/patches/source/samba/samba.url b/patches/source/samba/samba.url
new file mode 100644
index 000000000..2b35c1fb0
--- /dev/null
+++ b/patches/source/samba/samba.url
@@ -0,0 +1,2 @@
+https://download.samba.org/pub/samba/stable/samba-4.4.16.tar.gz
+https://download.samba.org/pub/samba/stable/samba-4.4.16.tar.asc
diff --git a/patches/source/samba/slack-desc b/patches/source/samba/slack-desc
new file mode 100644
index 000000000..f4352c607
--- /dev/null
+++ b/patches/source/samba/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+samba: samba (CIFS file and print server)
+samba:
+samba: Samba is a CIFS file and print server for CIFS clients. It allows
+samba: you to make file space or printers on a Samba host available to CIFS
+samba: clients (such as PCs running Windows).
+samba:
+samba: If you have any Windows file servers, you may be able to replace them
+samba: or supplement them with Samba. One of Samba's big strengths is
+samba: integration, so you can use it to tie together your Linux hosts and
+samba: Windows PC clients.
+samba:
diff --git a/patches/source/samba/smb.conf.default b/patches/source/samba/smb.conf.default
new file mode 100644
index 000000000..c41cfff60
--- /dev/null
+++ b/patches/source/samba/smb.conf.default
@@ -0,0 +1,223 @@
+# This is the main Samba configuration file. You should read the
+# smb.conf(5) manual page in order to understand the options listed
+# here. Samba has a huge number of configurable options (perhaps too
+# many!) most of which are not shown in this example
+#
+# For a step to step guide on installing, configuring and using samba,
+# read the Samba-HOWTO-Collection. This may be obtained from:
+# http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
+#
+# Many working examples of smb.conf files can be found in the
+# Samba-Guide which is generated daily and can be downloaded from:
+# http://www.samba.org/samba/docs/Samba-Guide.pdf
+#
+# Any line which starts with a ; (semi-colon) or a # (hash)
+# is a comment and is ignored. In this example we will use a #
+# for commentry and a ; for parts of the config file that you
+# may wish to enable
+#
+# NOTE: Whenever you modify this file you should run the command "testparm"
+# to check that you have not made any basic syntactic errors.
+#
+#======================= Global Settings =====================================
+[global]
+
+# workgroup = NT-Domain-Name or Workgroup-Name, eg: LINUX2
+ workgroup = MYGROUP
+
+# server string is the equivalent of the NT Description field
+ server string = Samba Server
+
+# Server role. Defines in which mode Samba will operate. Possible
+# values are "standalone server", "member server", "classic primary
+# domain controller", "classic backup domain controller", "active
+# directory domain controller".
+#
+# Most people will want "standalone sever" or "member server".
+# Running as "active directory domain controller" will require first
+# running "samba-tool domain provision" to wipe databases and create a
+# new domain.
+ server role = standalone server
+
+# This option is important for security. It allows you to restrict
+# connections to machines which are on your local network. The
+# following example restricts access to two C class networks and
+# the "loopback" interface. For more examples of the syntax see
+# the smb.conf man page
+; hosts allow = 192.168.1. 192.168.2. 127.
+
+# Uncomment this if you want a guest account, you must add this to /etc/passwd
+# otherwise the user "nobody" is used
+; guest account = pcguest
+
+# this tells Samba to use a separate log file for each machine
+# that connects
+ log file = /var/log/samba.%m
+
+# Put a capping on the size of the log files (in Kb).
+ max log size = 50
+
+# Specifies the Kerberos or Active Directory realm the host is part of
+; realm = MY_REALM
+
+# Backend to store user information in. New installations should
+# use either tdbsam or ldapsam. smbpasswd is available for backwards
+# compatibility. tdbsam requires no further configuration.
+; passdb backend = tdbsam
+
+# Using the following line enables you to customise your configuration
+# on a per machine basis. The %m gets replaced with the netbios name
+# of the machine that is connecting.
+# Note: Consider carefully the location in the configuration file of
+# this line. The included file is read at that point.
+; include = /usr/local/samba/lib/smb.conf.%m
+
+# Configure Samba to use multiple interfaces
+# If you have multiple network interfaces then you must list them
+# here. See the man page for details.
+; interfaces = 192.168.12.2/24 192.168.13.2/24
+
+# Where to store roving profiles (only for Win95 and WinNT)
+# %L substitutes for this servers netbios name, %U is username
+# You must uncomment the [Profiles] share below
+; logon path = \\%L\Profiles\%U
+
+# Windows Internet Name Serving Support Section:
+# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
+; wins support = yes
+
+# WINS Server - Tells the NMBD components of Samba to be a WINS Client
+# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
+; wins server = w.x.y.z
+
+# WINS Proxy - Tells Samba to answer name resolution queries on
+# behalf of a non WINS capable client, for this to work there must be
+# at least one WINS Server on the network. The default is NO.
+; wins proxy = yes
+
+# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
+# via DNS nslookups. The default is NO.
+ dns proxy = no
+
+# These scripts are used on a domain controller or stand-alone
+# machine to add or delete corresponding unix accounts
+; add user script = /usr/sbin/useradd %u
+; add group script = /usr/sbin/groupadd %g
+; add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
+; delete user script = /usr/sbin/userdel %u
+; delete user from group script = /usr/sbin/deluser %u %g
+; delete group script = /usr/sbin/groupdel %g
+
+
+#============================ Share Definitions ==============================
+[homes]
+ comment = Home Directories
+ browseable = no
+ writable = yes
+
+# Un-comment the following and create the netlogon directory for Domain Logons
+; [netlogon]
+; comment = Network Logon Service
+; path = /usr/local/samba/lib/netlogon
+; guest ok = yes
+; writable = no
+; share modes = no
+
+
+# Un-comment the following to provide a specific roving profile share
+# the default is to use the user's home directory
+;[Profiles]
+; path = /usr/local/samba/profiles
+; browseable = no
+; guest ok = yes
+
+
+# NOTE: If you have a BSD-style print system there is no need to
+# specifically define each individual printer
+[printers]
+ comment = All Printers
+ path = /var/spool/samba
+ browseable = no
+# Set public = yes to allow user 'guest account' to print
+ guest ok = no
+ writable = no
+ printable = yes
+
+# This one is useful for people to share files
+;[tmp]
+; comment = Temporary file space
+; path = /tmp
+; read only = no
+; public = yes
+
+# A publicly accessible directory, but read only, except for people in
+# the "staff" group
+;[public]
+; comment = Public Stuff
+; path = /home/samba
+; public = yes
+; writable = no
+; printable = no
+; write list = @staff
+
+# Other examples.
+#
+# A private printer, usable only by fred. Spool data will be placed in fred's
+# home directory. Note that fred must have write access to the spool directory,
+# wherever it is.
+;[fredsprn]
+; comment = Fred's Printer
+; valid users = fred
+; path = /homes/fred
+; printer = freds_printer
+; public = no
+; writable = no
+; printable = yes
+
+# A private directory, usable only by fred. Note that fred requires write
+# access to the directory.
+;[fredsdir]
+; comment = Fred's Service
+; path = /usr/somewhere/private
+; valid users = fred
+; public = no
+; writable = yes
+; printable = no
+
+# a service which has a different directory for each machine that connects
+# this allows you to tailor configurations to incoming machines. You could
+# also use the %U option to tailor it by user name.
+# The %m gets replaced with the machine name that is connecting.
+;[pchome]
+; comment = PC Directories
+; path = /usr/pc/%m
+; public = no
+; writable = yes
+
+# A publicly accessible directory, read/write to all users. Note that all files
+# created in the directory by users will be owned by the default user, so
+# any user with access can delete any other user's files. Obviously this
+# directory must be writable by the default user. Another user could of course
+# be specified, in which case all files would be owned by that user instead.
+;[public]
+; path = /usr/somewhere/else/public
+; public = yes
+; only guest = yes
+; writable = yes
+; printable = no
+
+# The following two entries demonstrate how to share a directory so that two
+# users can place files there that will be owned by the specific users. In this
+# setup, the directory should be writable by both users and should have the
+# sticky bit set on it to prevent abuse. Obviously this could be extended to
+# as many users as required.
+;[myshare]
+; comment = Mary's and Fred's stuff
+; path = /usr/somewhere/shared
+; valid users = mary fred
+; public = no
+; writable = yes
+; printable = no
+; create mask = 0765
+
+
diff --git a/patches/source/samba/smb.conf.default.orig b/patches/source/samba/smb.conf.default.orig
new file mode 100644
index 000000000..bb9c2e25e
--- /dev/null
+++ b/patches/source/samba/smb.conf.default.orig
@@ -0,0 +1,223 @@
+# This is the main Samba configuration file. You should read the
+# smb.conf(5) manual page in order to understand the options listed
+# here. Samba has a huge number of configurable options (perhaps too
+# many!) most of which are not shown in this example
+#
+# For a step to step guide on installing, configuring and using samba,
+# read the Samba-HOWTO-Collection. This may be obtained from:
+# http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
+#
+# Many working examples of smb.conf files can be found in the
+# Samba-Guide which is generated daily and can be downloaded from:
+# http://www.samba.org/samba/docs/Samba-Guide.pdf
+#
+# Any line which starts with a ; (semi-colon) or a # (hash)
+# is a comment and is ignored. In this example we will use a #
+# for commentry and a ; for parts of the config file that you
+# may wish to enable
+#
+# NOTE: Whenever you modify this file you should run the command "testparm"
+# to check that you have not made any basic syntactic errors.
+#
+#======================= Global Settings =====================================
+[global]
+
+# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
+ workgroup = MYGROUP
+
+# server string is the equivalent of the NT Description field
+ server string = Samba Server
+
+# Server role. Defines in which mode Samba will operate. Possible
+# values are "standalone server", "member server", "classic primary
+# domain controller", "classic backup domain controller", "active
+# directory domain controller".
+#
+# Most people will want "standalone sever" or "member server".
+# Running as "active directory domain controller" will require first
+# running "samba-tool domain provision" to wipe databases and create a
+# new domain.
+ server role = standalone server
+
+# This option is important for security. It allows you to restrict
+# connections to machines which are on your local network. The
+# following example restricts access to two C class networks and
+# the "loopback" interface. For more examples of the syntax see
+# the smb.conf man page
+; hosts allow = 192.168.1. 192.168.2. 127.
+
+# Uncomment this if you want a guest account, you must add this to /etc/passwd
+# otherwise the user "nobody" is used
+; guest account = pcguest
+
+# this tells Samba to use a separate log file for each machine
+# that connects
+ log file = /usr/local/samba/var/log.%m
+
+# Put a capping on the size of the log files (in Kb).
+ max log size = 50
+
+# Specifies the Kerberos or Active Directory realm the host is part of
+; realm = MY_REALM
+
+# Backend to store user information in. New installations should
+# use either tdbsam or ldapsam. smbpasswd is available for backwards
+# compatibility. tdbsam requires no further configuration.
+; passdb backend = tdbsam
+
+# Using the following line enables you to customise your configuration
+# on a per machine basis. The %m gets replaced with the netbios name
+# of the machine that is connecting.
+# Note: Consider carefully the location in the configuration file of
+# this line. The included file is read at that point.
+; include = /usr/local/samba/lib/smb.conf.%m
+
+# Configure Samba to use multiple interfaces
+# If you have multiple network interfaces then you must list them
+# here. See the man page for details.
+; interfaces = 192.168.12.2/24 192.168.13.2/24
+
+# Where to store roving profiles (only for Win95 and WinNT)
+# %L substitutes for this servers netbios name, %U is username
+# You must uncomment the [Profiles] share below
+; logon path = \\%L\Profiles\%U
+
+# Windows Internet Name Serving Support Section:
+# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
+; wins support = yes
+
+# WINS Server - Tells the NMBD components of Samba to be a WINS Client
+# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
+; wins server = w.x.y.z
+
+# WINS Proxy - Tells Samba to answer name resolution queries on
+# behalf of a non WINS capable client, for this to work there must be
+# at least one WINS Server on the network. The default is NO.
+; wins proxy = yes
+
+# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
+# via DNS nslookups. The default is NO.
+ dns proxy = no
+
+# These scripts are used on a domain controller or stand-alone
+# machine to add or delete corresponding unix accounts
+; add user script = /usr/sbin/useradd %u
+; add group script = /usr/sbin/groupadd %g
+; add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
+; delete user script = /usr/sbin/userdel %u
+; delete user from group script = /usr/sbin/deluser %u %g
+; delete group script = /usr/sbin/groupdel %g
+
+
+#============================ Share Definitions ==============================
+[homes]
+ comment = Home Directories
+ browseable = no
+ writable = yes
+
+# Un-comment the following and create the netlogon directory for Domain Logons
+; [netlogon]
+; comment = Network Logon Service
+; path = /usr/local/samba/lib/netlogon
+; guest ok = yes
+; writable = no
+; share modes = no
+
+
+# Un-comment the following to provide a specific roving profile share
+# the default is to use the user's home directory
+;[Profiles]
+; path = /usr/local/samba/profiles
+; browseable = no
+; guest ok = yes
+
+
+# NOTE: If you have a BSD-style print system there is no need to
+# specifically define each individual printer
+[printers]
+ comment = All Printers
+ path = /usr/spool/samba
+ browseable = no
+# Set public = yes to allow user 'guest account' to print
+ guest ok = no
+ writable = no
+ printable = yes
+
+# This one is useful for people to share files
+;[tmp]
+; comment = Temporary file space
+; path = /tmp
+; read only = no
+; public = yes
+
+# A publicly accessible directory, but read only, except for people in
+# the "staff" group
+;[public]
+; comment = Public Stuff
+; path = /home/samba
+; public = yes
+; writable = no
+; printable = no
+; write list = @staff
+
+# Other examples.
+#
+# A private printer, usable only by fred. Spool data will be placed in fred's
+# home directory. Note that fred must have write access to the spool directory,
+# wherever it is.
+;[fredsprn]
+; comment = Fred's Printer
+; valid users = fred
+; path = /homes/fred
+; printer = freds_printer
+; public = no
+; writable = no
+; printable = yes
+
+# A private directory, usable only by fred. Note that fred requires write
+# access to the directory.
+;[fredsdir]
+; comment = Fred's Service
+; path = /usr/somewhere/private
+; valid users = fred
+; public = no
+; writable = yes
+; printable = no
+
+# a service which has a different directory for each machine that connects
+# this allows you to tailor configurations to incoming machines. You could
+# also use the %U option to tailor it by user name.
+# The %m gets replaced with the machine name that is connecting.
+;[pchome]
+; comment = PC Directories
+; path = /usr/pc/%m
+; public = no
+; writable = yes
+
+# A publicly accessible directory, read/write to all users. Note that all files
+# created in the directory by users will be owned by the default user, so
+# any user with access can delete any other user's files. Obviously this
+# directory must be writable by the default user. Another user could of course
+# be specified, in which case all files would be owned by that user instead.
+;[public]
+; path = /usr/somewhere/else/public
+; public = yes
+; only guest = yes
+; writable = yes
+; printable = no
+
+# The following two entries demonstrate how to share a directory so that two
+# users can place files there that will be owned by the specific users. In this
+# setup, the directory should be writable by both users and should have the
+# sticky bit set on it to prevent abuse. Obviously this could be extended to
+# as many users as required.
+;[myshare]
+; comment = Mary's and Fred's stuff
+; path = /usr/somewhere/shared
+; valid users = mary fred
+; public = no
+; writable = yes
+; printable = no
+; create mask = 0765
+
+
diff --git a/patches/source/samba/smb.conf.diff b/patches/source/samba/smb.conf.diff
new file mode 100644
index 000000000..b08d2b12d
--- /dev/null
+++ b/patches/source/samba/smb.conf.diff
@@ -0,0 +1,29 @@
+--- smb.conf.default.orig 2013-06-13 04:21:02.000000000 -0500
++++ smb.conf.default 2013-10-15 20:02:31.684043875 -0500
+@@ -22,7 +22,7 @@
+ #======================= Global Settings =====================================
+ [global]
+
+-# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
++# workgroup = NT-Domain-Name or Workgroup-Name, eg: LINUX2
+ workgroup = MYGROUP
+
+ # server string is the equivalent of the NT Description field
+@@ -52,7 +52,7 @@
+
+ # this tells Samba to use a separate log file for each machine
+ # that connects
+- log file = /usr/local/samba/var/log.%m
++ log file = /var/log/samba.%m
+
+ # Put a capping on the size of the log files (in Kb).
+ max log size = 50
+@@ -136,7 +136,7 @@
+ # specifically define each individual printer
+ [printers]
+ comment = All Printers
+- path = /usr/spool/samba
++ path = /var/spool/samba
+ browseable = no
+ # Set public = yes to allow user 'guest account' to print
+ guest ok = no
diff --git a/patches/source/samba/talloc.pc b/patches/source/samba/talloc.pc
new file mode 100644
index 000000000..125977d19
--- /dev/null
+++ b/patches/source/samba/talloc.pc
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${prefix}/lib
+includedir=${prefix}/include
+
+Name: talloc
+Description: A hierarchical pool based memory system with destructors
+Version: 2.0.8
+Libs: -Wl,-rpath,/usr/lib -L${libdir} -ltalloc
+Cflags: -I${includedir}
+URL: http://talloc.samba.org/
diff --git a/patches/source/seamonkey/autoconf/autoconf-2.13-consolidated_fixes-1.patch b/patches/source/seamonkey/autoconf/autoconf-2.13-consolidated_fixes-1.patch
new file mode 100644
index 000000000..5e7b23113
--- /dev/null
+++ b/patches/source/seamonkey/autoconf/autoconf-2.13-consolidated_fixes-1.patch
@@ -0,0 +1,504 @@
+Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
+Date: 2016-06-11
+Initial Package Version: 2.13
+Upstream Status: Version is historic and unmaintained.
+Origin: Found at fedora, plus fixes for LFS.
+Description: All of the patches currently used by fedora, except for
+the patch which ensures gawk is used in preference to mawk (we do not
+install mawk). For LFS: we put mktemp in /usr/bin not /bin, remove
+the install-info target because that will overwrite standards.info
+with an old version (fedora always use a DESTDIR), and change the
+man and info dirs to ${datadir}/ i.e. /usr/share (an empty /usr/info
+will otherwise be created).
+
+diff -Naur a/acgeneral.m4 b/acgeneral.m4
+--- a/acgeneral.m4 1999-01-05 13:27:37.000000000 +0000
++++ b/acgeneral.m4 2016-06-11 00:18:24.429043947 +0100
+@@ -1817,10 +1817,6 @@
+ [cat > conftest.$ac_ext <<EOF
+ [#]line __oline__ "configure"
+ #include "confdefs.h"
+-ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
+-extern "C" void exit(int);
+-#endif
+-])dnl
+ [$1]
+ EOF
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+@@ -1988,12 +1984,12 @@
+ AC_MSG_CHECKING(size of $1)
+ AC_CACHE_VAL(AC_CV_NAME,
+ [AC_TRY_RUN([#include <stdio.h>
+-main()
++int main()
+ {
+ FILE *f=fopen("conftestval", "w");
+- if (!f) exit(1);
++ if (!f) return(1);
+ fprintf(f, "%d\n", sizeof($1));
+- exit(0);
++ return(0);
+ }], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl
+ AC_MSG_RESULT($AC_CV_NAME)
+ AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
+@@ -2160,20 +2156,38 @@
+ dnl AC_OUTPUT_MAKE_DEFS()
+ define(AC_OUTPUT_MAKE_DEFS,
+ [# Transform confdefs.h into DEFS.
+-dnl Using a here document instead of a string reduces the quoting nightmare.
+ # Protect against shell expansion while executing Makefile rules.
+ # Protect against Makefile macro expansion.
+-cat > conftest.defs <<\EOF
++#
++# If the first sed substitution is executed (which looks for macros that
++# take arguments), then we branch to the quote section. Otherwise,
++# look for a macro that doesn't take arguments.
++cat >confdef2opt.sed <<\_ACEOF
+ changequote(<<, >>)dnl
+-s%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+-s%[ `~<<#>>$^&*(){}\\|;'"<>?]%\\&%g
+-s%\[%\\&%g
+-s%\]%\\&%g
+-s%\$%$$%g
++t clear
++: clear
++s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
++t quote
++s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
++t quote
++d
++: quote
++s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
++s,\[,\\&,g
++s,\],\\&,g
++s,\$,$$,g
++p
+ changequote([, ])dnl
+-EOF
+-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+-rm -f conftest.defs
++_ACEOF
++# We use echo to avoid assuming a particular line-breaking character.
++# The extra dot is to prevent the shell from consuming trailing
++# line-breaks from the sub-command output. A line-break within
++# single-quotes doesn't work because, if this script is created in a
++# platform that uses two characters for line-breaks (e.g., DOS), tr
++# would break.
++ac_LF_and_DOT=`echo; echo .`
++DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
++rm -f confdef2opt.sed
+ ])
+
+ dnl Do the variable substitutions to create the Makefiles or whatever.
+diff -Naur a/acspecific.m4 b/acspecific.m4
+--- a/acspecific.m4 1999-01-05 13:27:52.000000000 +0000
++++ b/acspecific.m4 2016-06-11 00:18:17.533078644 +0100
+@@ -152,8 +152,41 @@
+ CXXFLAGS=
+ fi
+ fi
++
++AC_PROG_CXX_EXIT_DECLARATION
+ ])
+
++
++# AC_PROG_CXX_EXIT_DECLARATION
++# -----------------------------
++# Find a valid prototype for exit and declare it in confdefs.h.
++AC_DEFUN(AC_PROG_CXX_EXIT_DECLARATION,
++[for ac_declaration in \
++ ''\
++ '#include <stdlib.h>' \
++ 'extern "C" void std::exit (int) throw (); using std::exit;' \
++ 'extern "C" void std::exit (int); using std::exit;' \
++ 'extern "C" void exit (int) throw ();' \
++ 'extern "C" void exit (int);' \
++ 'void exit (int);'
++do
++ AC_TRY_COMPILE([#include <stdlib.h>
++$ac_declaration],
++ [exit (42);],
++ [],
++ [continue])
++ AC_TRY_COMPILE([$ac_declaration],
++ [exit (42);],
++ [break])
++done
++if test -n "$ac_declaration"; then
++ echo '#ifdef __cplusplus' >>confdefs.h
++ echo $ac_declaration >>confdefs.h
++ echo '#endif' >>confdefs.h
++fi
++])# AC_PROG_CXX_EXIT_DECLARATION
++
++
+ dnl Determine a Fortran 77 compiler to use. If `F77' is not already set
+ dnl in the environment, check for `g77', `f77' and `f2c', in that order.
+ dnl Set the output variable `F77' to the name of the compiler found.
+@@ -1010,7 +1043,7 @@
+ ])
+
+ AC_DEFUN(AC_FUNC_MMAP,
+-[AC_CHECK_HEADERS(unistd.h)
++[AC_CHECK_HEADERS(stdlib.h unistd.h sys/stat.h sys/types.h)
+ AC_CHECK_FUNCS(getpagesize)
+ AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
+ [AC_TRY_RUN([
+@@ -1039,11 +1072,24 @@
+ #include <fcntl.h>
+ #include <sys/mman.h>
+
++#if HAVE_SYS_TYPES_H
++# include <sys/types.h>
++#endif
++
++#if HAVE_STDLIB_H
++# include <stdlib.h>
++#endif
++
++#if HAVE_SYS_STAT_H
++# include <sys/stat.h>
++#endif
++
++#if HAVE_UNISTD_H
++# include <unistd.h>
++#endif
++
+ /* This mess was copied from the GNU getpagesize.h. */
+ #ifndef HAVE_GETPAGESIZE
+-# ifdef HAVE_UNISTD_H
+-# include <unistd.h>
+-# endif
+
+ /* Assume that all systems that can run configure have sys/param.h. */
+ # ifndef HAVE_SYS_PARAM_H
+@@ -1373,6 +1419,8 @@
+ r.ru_majflt = r.ru_minflt = 0;
+ switch (fork()) {
+ case 0: /* Child. */
++ /* Unless we actually _do_ something, the kernel sometimes doesn't chalk up any system time to this process. */
++ if(fork()) { i = 123; wait(NULL); } else { i = 234; exit(0); }
+ sleep(1); /* Give up the CPU. */
+ _exit(0);
+ case -1: _exit(0); /* What can we do? */
+diff -Naur a/autoconf.sh b/autoconf.sh
+--- a/autoconf.sh 1999-01-05 13:27:53.000000000 +0000
++++ b/autoconf.sh 2016-06-11 00:22:17.351872133 +0100
+@@ -45,20 +45,20 @@
+ esac
+
+ : ${TMPDIR=/tmp}
+-tmpout=${TMPDIR}/acout.$$
++tmpout=`/usr/bin/mktemp ${TMPDIR}/acout.XXXXXX`
+ localdir=
+ show_version=no
+
+ while test $# -gt 0 ; do
+ case "${1}" in
+ -h | --help | --h* )
+- echo "${usage}" 1>&2; exit 0 ;;
++ echo "${usage}" 1>&2; rm -f $tmpout ; exit 0 ;;
+ --localdir=* | --l*=* )
+ localdir="`echo \"${1}\" | sed -e 's/^[^=]*=//'`"
+ shift ;;
+ -l | --localdir | --l*)
+ shift
+- test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
++ test $# -eq 0 && { echo "${usage}" 1>&2; rm -f $tmpout; exit 1; }
+ localdir="${1}"
+ shift ;;
+ --macrodir=* | --m*=* )
+@@ -66,7 +66,7 @@
+ shift ;;
+ -m | --macrodir | --m* )
+ shift
+- test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
++ test $# -eq 0 && { echo "${usage}" 1>&2; rm -f $tmpout; exit 1; }
+ AC_MACRODIR="${1}"
+ shift ;;
+ --version | --v* )
+@@ -76,7 +76,7 @@
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+- echo "${usage}" 1>&2; exit 1 ;;
++ echo "${usage}" 1>&2; rm -f $tmpout; exit 1 ;;
+ * )
+ break ;;
+ esac
+@@ -86,23 +86,25 @@
+ version=`sed -n 's/define.AC_ACVERSION.[ ]*\([0-9.]*\).*/\1/p' \
+ $AC_MACRODIR/acgeneral.m4`
+ echo "Autoconf version $version"
++ rm -f $tmpout
+ exit 0
+ fi
+
+ case $# in
+ 0) infile=configure.in ;;
+ 1) infile="$1" ;;
+- *) echo "$usage" >&2; exit 1 ;;
++ *) echo "$usage" >&2; rm -f $tmpout; exit 1 ;;
+ esac
+
+ trap 'rm -f $tmpin $tmpout; exit 1' 1 2 15
+
+-tmpin=${TMPDIR}/acin.$$ # Always set this, to avoid bogus errors from some rm's.
++tmpin=`/usr/bin/mktemp ${TMPDIR}/acin.XXXXXX`
++# Always set this, to avoid bogus errors from some rm's.
+ if test z$infile = z-; then
+ infile=$tmpin
+- cat > $infile
+ elif test ! -r "$infile"; then
+ echo "autoconf: ${infile}: No such file or directory" >&2
++ rm -f $tmpin $tmpout
+ exit 1
+ fi
+
+@@ -111,6 +113,8 @@
+ else
+ use_localdir=
+ fi
++# Make sure we don't leave those around - they are annoying
++trap 'rm -f $tmpin $tmpout' 0
+
+ # Use the frozen version of Autoconf if available.
+ r= f=
+@@ -118,7 +122,7 @@
+ case `$M4 --help < /dev/null 2>&1` in
+ *reload-state*) test -r $AC_MACRODIR/autoconf.m4f && { r=--reload f=f; } ;;
+ *traditional*) ;;
+-*) echo Autoconf requires GNU m4 1.1 or later >&2; rm -f $tmpin; exit 1 ;;
++*) echo Autoconf requires GNU m4 1.1 or later >&2; rm -f $tmpin $tmpout; exit 1 ;;
+ esac
+
+ $M4 -I$AC_MACRODIR $use_localdir $r autoconf.m4$f $infile > $tmpout ||
+@@ -154,6 +158,6 @@
+ /__oline__/s/^\([0-9][0-9]*\):\(.*\)__oline__/\2\1/
+ ' >&4
+
+-rm -f $tmpout
++rm -f $tmpout $tmpin
+
+ exit $status
+diff -Naur a/autoconf.texi b/autoconf.texi
+--- a/autoconf.texi 1999-01-05 13:28:37.000000000 +0000
++++ b/autoconf.texi 2016-06-11 00:18:46.360933604 +0100
+@@ -1,7 +1,7 @@
+ \input texinfo @c -*-texinfo-*-
+ @c %**start of header
+-@setfilename autoconf.info
+-@settitle Autoconf
++@setfilename autoconf.info
++@settitle Autoconf
+ @c For double-sided printing, uncomment:
+ @c @setchapternewpage odd
+ @c %**end of header
+@@ -17,7 +17,8 @@
+ @ifinfo
+ @format
+ START-INFO-DIR-ENTRY
+-* Autoconf: (autoconf). Create source code configuration scripts.
++* Autoconf: (autoconf). Create source code configuration scripts.
++ This is a legacy version of autoconf.
+ END-INFO-DIR-ENTRY
+ @end format
+
+diff -Naur a/autoheader.sh b/autoheader.sh
+--- a/autoheader.sh 1999-01-05 13:28:39.000000000 +0000
++++ b/autoheader.sh 2016-06-11 00:22:17.351872133 +0100
+@@ -194,9 +194,9 @@
+ # Some fgrep's have limits on the number of lines that can be in the
+ # pattern on the command line, so use a temporary file containing the
+ # pattern.
+- (fgrep_tmp=${TMPDIR-/tmp}/autoh$$
++ (fgrep_tmp=`/usr/bin/mktemp ${TMPDIR-/tmp}/autoh$$.XXXXXX`
+ trap "rm -f $fgrep_tmp; exit 1" 1 2 15
+- cat > $fgrep_tmp <<EOF
++ cat >> $fgrep_tmp <<EOF
+ $syms
+ EOF
+ fgrep -f $fgrep_tmp
+diff -Naur a/autoupdate.sh b/autoupdate.sh
+--- a/autoupdate.sh 1999-01-05 13:28:42.000000000 +0000
++++ b/autoupdate.sh 2016-06-11 00:23:19.151561252 +0100
+@@ -26,7 +26,7 @@
+ Usage: autoupdate [-h] [--help] [-m dir] [--macrodir=dir]
+ [--version] [template-file]"
+
+-sedtmp=/tmp/acups.$$
++sedtmp=`/usr/bin/mktemp /tmp/acups.XXXXXX`
+ # For debugging.
+ #sedtmp=/tmp/acups
+ show_version=no
+@@ -35,13 +35,13 @@
+ while test $# -gt 0 ; do
+ case "${1}" in
+ -h | --help | --h* )
+- echo "${usage}" 1>&2; exit 0 ;;
++ echo "${usage}" 1>&2; rm -f $sedtmp; exit 0 ;;
+ --macrodir=* | --m*=* )
+ AC_MACRODIR="`echo \"${1}\" | sed -e 's/^[^=]*=//'`"
+ shift ;;
+ -m | --macrodir | --m* )
+ shift
+- test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
++ test $# -eq 0 && { echo "${usage}" 1>&2; rm -f $sedtmp; exit 1; }
+ AC_MACRODIR="${1}"
+ shift ;;
+ --version | --versio | --versi | --vers)
+@@ -51,7 +51,7 @@
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+- echo "${usage}" 1>&2; exit 1 ;;
++ echo "${usage}" 1>&2; rm -f $sedtmp; exit 1 ;;
+ * )
+ break ;;
+ esac
+@@ -61,6 +61,7 @@
+ version=`sed -n 's/define.AC_ACVERSION.[ ]*\([0-9.]*\).*/\1/p' \
+ $AC_MACRODIR/acgeneral.m4`
+ echo "Autoconf version $version"
++ rm -f $sedtmp
+ exit 0
+ fi
+
+@@ -68,6 +69,7 @@
+
+ tmpout=acupo.$$
+ trap 'rm -f $sedtmp $tmpout; exit 1' 1 2 15
++trap 'rm -f $sedtmp' 0
+ case $# in
+ 0) infile=configure.in; out="> $tmpout"
+ # Make sure $infile can be read, and $tmpout has the same permissions.
+diff -Naur a/configure b/configure
+--- a/configure 1999-01-05 13:28:57.000000000 +0000
++++ b/configure 2016-06-11 00:50:57.771231914 +0100
+@@ -43,8 +43,8 @@
+ libdir='${exec_prefix}/lib'
+ includedir='${prefix}/include'
+ oldincludedir='/usr/include'
+-infodir='${prefix}/info'
+-mandir='${prefix}/man'
++infodir='${datadir}/info'
++mandir='${datadir}/man'
+
+ # Initialize some other variables.
+ subdirs=
+diff -Naur a/Makefile.in b/Makefile.in
+--- a/Makefile.in 1999-01-05 13:27:16.000000000 +0000
++++ b/Makefile.in 2016-06-11 00:29:34.005678107 +0100
+@@ -49,7 +49,7 @@
+
+ # Directory in which to install library files.
+ datadir = @datadir@
+-acdatadir = $(datadir)/autoconf
++acdatadir = $(datadir)/autoconf-2.13
+
+ # Directory in which to install documentation info files.
+ infodir = @infodir@
+@@ -68,8 +68,8 @@
+ DISTFILES = AUTHORS COPYING ChangeLog ChangeLog.1 INSTALL \
+ Makefile.in NEWS README TODO $(M4FILES) \
+ acconfig.h acfunctions acheaders acidentifiers \
+- acmakevars acprograms autoconf.info* \
+- autoconf.sh autoconf.texi install.texi \
++ acmakevars acprograms autoconf.info* \
++ autoconf.sh autoconf.texi install.texi \
+ autoheader.sh autoscan.pl autoreconf.sh autoupdate.sh ifnames.sh \
+ config.guess config.sub configure configure.in \
+ install-sh mkinstalldirs texinfo.tex \
+@@ -106,11 +106,11 @@
+ autoconf.m4f: autoconf.m4 acgeneral.m4 acspecific.m4 acoldnames.m4
+ autoheader.m4f: autoheader.m4 acgeneral.m4 acspecific.m4 acoldnames.m4
+
+-info: autoconf.info @standards_info@ INSTALL
++info: autoconf.info @standards_info@ INSTALL
+
+ # Use --no-split to avoid creating filenames > 14 chars.
+-autoconf.info: autoconf.texi install.texi
+- $(MAKEINFO) -I$(srcdir) $(srcdir)/autoconf.texi --no-split --output=$@
++autoconf.info: autoconf.texi install.texi
++ $(MAKEINFO) -I$(srcdir) $(srcdir)/autoconf.texi --no-split --output=$@
+
+ INSTALL: install.texi
+ $(MAKEINFO) -I$(srcdir) $(srcdir)/install.texi --output=$@ \
+@@ -121,8 +121,8 @@
+
+ dvi: autoconf.dvi @standards_dvi@
+
+-autoconf.dvi: autoconf.texi
+- $(TEXI2DVI) $(srcdir)/autoconf.texi
++autoconf.dvi: autoconf.texi
++ $(TEXI2DVI) $(srcdir)/autoconf.texi
+
+ standards.dvi: standards.texi make-stds.texi
+ $(TEXI2DVI) $(srcdir)/standards.texi
+@@ -137,35 +137,35 @@
+ cd testsuite && ${MAKE} AUTOCONF=${bindir}/autoconf $@
+
+ installdirs:
+- $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(acdatadir)
++ $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)/$(bindir) $(DESTDIR)/$(infodir) $(DESTDIR)/$(acdatadir)
+
+-install: all $(M4FILES) acconfig.h installdirs install-info
++install: all $(M4FILES) acconfig.h installdirs
+ for p in $(ASCRIPTS); do \
+- $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \
++ $(INSTALL_PROGRAM) $$p $(DESTDIR)/$(bindir)/`echo $$p|sed '$(transform)'`; \
+ done
+ for i in $(M4FROZEN); do \
+- $(INSTALL_DATA) $$i $(acdatadir)/$$i; \
++ $(INSTALL_DATA) $$i $(DESTDIR)/$(acdatadir)/$$i; \
+ done
+ for i in $(M4FILES) acconfig.h; do \
+- $(INSTALL_DATA) $(srcdir)/$$i $(acdatadir)/$$i; \
++ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)/$(acdatadir)/$$i; \
+ done
+ -if test -f autoscan; then \
+- $(INSTALL_PROGRAM) autoscan $(bindir)/`echo autoscan|sed '$(transform)'`; \
++ $(INSTALL_PROGRAM) autoscan $(DESTDIR)/$(bindir)/`echo autoscan|sed '$(transform)'`; \
+ for i in acfunctions acheaders acidentifiers acprograms \
+ acmakevars; do \
+- $(INSTALL_DATA) $(srcdir)/$$i $(acdatadir)/$$i; \
++ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)/$(acdatadir)/$$i; \
+ done; \
+ else :; fi
+
+ # Don't cd, to avoid breaking install-sh references.
+ install-info: info installdirs
+- if test -f autoconf.info; then \
++ if test -f autoconf.info; then \
+ for i in *.info*; do \
+- $(INSTALL_DATA) $$i $(infodir)/$$i; \
++ $(INSTALL_DATA) $$i $(DESTDIR)/$(infodir)/$$i; \
+ done; \
+ else \
+ for i in $(srcdir)/*.info*; do \
+- $(INSTALL_DATA) $$i $(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
++ $(INSTALL_DATA) $$i $(DESTDIR)/$(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
+ done; \
+ fi
+
+@@ -174,7 +174,7 @@
+ rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \
+ done
+ rm -fr $(acdatadir)
+- cd $(infodir) && rm -f autoconf.info*
++ cd $(infodir) && rm -f autoconf.info*
+ if test -f standards.info || test -f $(srcdir)/standards.info; \
+ then cd $(infodir) && rm -f standards.info*; fi
+
+diff -Naur a/testsuite/autoconf.s/syntax.exp b/testsuite/autoconf.s/syntax.exp
+--- a/testsuite/autoconf.s/syntax.exp 1999-01-05 13:29:54.000000000 +0000
++++ b/testsuite/autoconf.s/syntax.exp 2016-06-11 00:18:51.996905247 +0100
+@@ -2,7 +2,7 @@
+
+ send_user "Checking for syntax errors in the specific tests...\n"
+ set script {s/^AC_DEFUN(\([^,]*\).*/\1/p}
+-set macros [exec sed -n $script $srcdir/../acspecific.m4]
++set macros [exec sed -n $script $srcdir/../acspecific.m4 | grep -v -e AC_FUNC_GETLOADAVG -e F77]
+
+ foreach mac $macros {
+ send_user "$mac\n"
diff --git a/patches/source/seamonkey/autoconf/autoconf.build b/patches/source/seamonkey/autoconf/autoconf.build
new file mode 100755
index 000000000..7dae1bad1
--- /dev/null
+++ b/patches/source/seamonkey/autoconf/autoconf.build
@@ -0,0 +1,81 @@
+#!/bin/sh
+
+# Copyright 2005-2016 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=autoconf
+VERSION=2.13
+BUILD=${BUILD:-1}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-autoconf
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf autoconf-$VERSION
+tar xvf $CWD/autoconf-$VERSION.tar.xz || exit 1
+cd autoconf-$VERSION
+
+zcat $CWD/autoconf-2.13-consolidated_fixes-1.patch.gz | patch -p1 --verbose || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Build a temporary copy of autoconf-2.13 only to be used to compile
+# Firefox, since it somewhat inexplicably requires this ancient version:
+
+rm -rf $TMP/autoconf-tmp
+mkdir -p $TMP/autoconf-tmp
+# This will be at the beginning of the $PATH, so protect against nonsense
+# happening in /tmp:
+chmod 700 $TMP/autoconf-tmp
+rm -rf $TMP/autoconf-tmp/*
+mkdir -p $TMP/autoconf-tmp/usr
+
+./configure \
+ --prefix=$TMP/autoconf-tmp/usr \
+ --program-suffix=-2.13 \
+ --infodir=$TMP/autoconf-tmp/usr/info \
+ --mandir=$TMP/autoconf-tmp/usr/man \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install || exit 1
+
diff --git a/patches/source/seamonkey/doinst.sh b/patches/source/seamonkey/doinst.sh
new file mode 100644
index 000000000..c236bea5c
--- /dev/null
+++ b/patches/source/seamonkey/doinst.sh
@@ -0,0 +1,11 @@
+# If there's no mozilla here, then take over:
+if [ ! -r usr/bin/mozilla ]; then
+ ( cd usr/bin ; ln -sf seamonkey mozilla )
+fi
+# Hopefully this won't break everything. ;-)
+if ! grep /usr/lib/seamonkey etc/ld.so.conf 1> /dev/null 2> /dev/null ; then
+ echo "/usr/lib/seamonkey" >> etc/ld.so.conf
+fi
+if [ -x /sbin/ldconfig ]; then
+ /sbin/ldconfig 2> /dev/null
+fi
diff --git a/patches/source/seamonkey/gold/gold b/patches/source/seamonkey/gold/gold
new file mode 100755
index 000000000..8c86d3b06
--- /dev/null
+++ b/patches/source/seamonkey/gold/gold
@@ -0,0 +1,2 @@
+#!/bin/bash
+/usr/bin/ld.gold "$@"
diff --git a/patches/source/seamonkey/gold/ld b/patches/source/seamonkey/gold/ld
new file mode 120000
index 000000000..78a06a2a1
--- /dev/null
+++ b/patches/source/seamonkey/gold/ld
@@ -0,0 +1 @@
+gold \ No newline at end of file
diff --git a/patches/source/seamonkey/pkgconfig/seamonkey-gtkmozembed.pc b/patches/source/seamonkey/pkgconfig/seamonkey-gtkmozembed.pc
new file mode 100644
index 000000000..e5053267d
--- /dev/null
+++ b/patches/source/seamonkey/pkgconfig/seamonkey-gtkmozembed.pc
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=/usr
+libdir=/usr/@LIB@/seamonkey-@VERSION@
+includedir=/usr/include/seamonkey-@VERSION@
+
+Name: Mozilla Gtk Embedding Widget
+Description: Mozilla Embedding Widget for Gtk+
+Version: @VERSION@
+Requires: seamonkey-xpcom = @VERSION@
+Libs: -L${libdir} -lgtkembedmoz
+Cflags: -I${includedir}/gtkembedmoz
diff --git a/patches/source/seamonkey/pkgconfig/seamonkey-libxul.pc b/patches/source/seamonkey/pkgconfig/seamonkey-libxul.pc
new file mode 100644
index 000000000..0c9900420
--- /dev/null
+++ b/patches/source/seamonkey/pkgconfig/seamonkey-libxul.pc
@@ -0,0 +1,11 @@
+prefix=/usr
+libdir=/usr/@LIB@/seamonkey-@VERSION@
+includedir=/usr/include/seamonkey-@VERSION@
+idldir=/usr/share/idl/seamonkey-@VERSION@
+
+Name: libxul
+Description: The Mozilla Runtime and Embedding Engine
+Version: @VERSION@
+Requires: seamonkey-nspr >= 4.7.1
+Libs: -L${libdir} -lxul -lxpcom
+Cflags: -I${includedir} -fshort-wchar
diff --git a/patches/source/seamonkey/pkgconfig/seamonkey-nspr.pc b/patches/source/seamonkey/pkgconfig/seamonkey-nspr.pc
new file mode 100644
index 000000000..756e996d6
--- /dev/null
+++ b/patches/source/seamonkey/pkgconfig/seamonkey-nspr.pc
@@ -0,0 +1,12 @@
+prefix=/usr
+exec_prefix=/usr
+libdir=/usr/@LIB@/seamonkey-@VERSION@
+includedir=/usr/include/seamonkey-@VERSION@
+
+Name: NSPR
+Description: The Netscape Portable Runtime
+Version: 4.7.1
+Libs: -L/usr/@LIB@/seamonkey-@VERSION@ -lplds4 -lplc4 -lnspr4 -lpthread -ldl
+Cflags: -I/usr/include/seamonkey-@VERSION@/nspr
+
+
diff --git a/patches/source/seamonkey/pkgconfig/seamonkey-nss.pc b/patches/source/seamonkey/pkgconfig/seamonkey-nss.pc
new file mode 100644
index 000000000..f5bf09935
--- /dev/null
+++ b/patches/source/seamonkey/pkgconfig/seamonkey-nss.pc
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=/usr
+libdir=/usr/@LIB@/seamonkey-@VERSION@
+includedir=/usr/include/seamonkey-@VERSION@
+
+Name: NSS
+Description: Mozilla Network Security Services
+Version: @VERSION@
+Requires: seamonkey-nspr >= 4.7.1
+Libs: -L${libdir} -lnss3 -lsmime3 -lssl3 -lsoftokn3 -lnssutil3
+Cflags: -I${includedir}/nss
diff --git a/patches/source/seamonkey/pkgconfig/seamonkey-plugin.pc b/patches/source/seamonkey/pkgconfig/seamonkey-plugin.pc
new file mode 100644
index 000000000..bbdb1f417
--- /dev/null
+++ b/patches/source/seamonkey/pkgconfig/seamonkey-plugin.pc
@@ -0,0 +1,10 @@
+prefix=/usr
+exec_prefix=/usr
+libdir=/usr/@LIB@/seamonkey-@VERSION@
+includedir=/usr/include/seamonkey-@VERSION@
+
+Name: Mozilla Plug-In API
+Description: Mozilla Plug-In API
+Version: @VERSION@
+Requires: seamonkey-nspr >= 4.7.1
+Cflags: -I${includedir}/java -I${includedir}/plugin -DXP_UNIX
diff --git a/patches/source/seamonkey/pkgconfig/seamonkey-xpcom.pc b/patches/source/seamonkey/pkgconfig/seamonkey-xpcom.pc
new file mode 100644
index 000000000..532005671
--- /dev/null
+++ b/patches/source/seamonkey/pkgconfig/seamonkey-xpcom.pc
@@ -0,0 +1,12 @@
+prefix=/usr
+exec_prefix=/usr
+libdir=/usr/@LIB@/seamonkey-@VERSION@
+includedir=/usr/include/seamonkey-@VERSION@
+idldir=/usr/share/idl/seamonkey-@VERSION@
+
+Name: XPCOM
+Description: The Mozilla Cross Platform Component Library
+Version: @VERSION@
+Requires: seamonkey-nspr >= 4.7.1
+Libs: -L${libdir} -lxpcom
+Cflags: -I${includedir} -I${includedir}/xpcom -I${includedir}/string
diff --git a/patches/source/seamonkey/seamonkey-icon.png b/patches/source/seamonkey/seamonkey-icon.png
new file mode 100644
index 000000000..824ab7a50
--- /dev/null
+++ b/patches/source/seamonkey/seamonkey-icon.png
Binary files differ
diff --git a/patches/source/seamonkey/seamonkey-mail-icon.png b/patches/source/seamonkey/seamonkey-mail-icon.png
new file mode 100644
index 000000000..123b077bf
--- /dev/null
+++ b/patches/source/seamonkey/seamonkey-mail-icon.png
Binary files differ
diff --git a/patches/source/seamonkey/seamonkey-mail.desktop b/patches/source/seamonkey/seamonkey-mail.desktop
new file mode 100644
index 000000000..1e0b62b1b
--- /dev/null
+++ b/patches/source/seamonkey/seamonkey-mail.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=SeaMonkey Mail
+Comment=Read Mail with SeaMonkey
+Exec=/usr/bin/seamonkey -mail
+Icon=/usr/share/pixmaps/seamonkey-mail-icon.png
+Terminal=0
+Type=Application
+Categories=Application;Network;
diff --git a/patches/source/seamonkey/seamonkey.SlackBuild b/patches/source/seamonkey/seamonkey.SlackBuild
new file mode 100755
index 000000000..5fe65663c
--- /dev/null
+++ b/patches/source/seamonkey/seamonkey.SlackBuild
@@ -0,0 +1,294 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+TARBALLVER=${VERSION:-$(basename $(ls seamonkey-*.tar.* | cut -d - -f 2 | rev | cut -f 3- -d . | rev) .source)}
+# Strip the end from beta versions:
+VERSION=$(echo $TARBALLVER | cut -f 1 -d b)
+BUILD=${BUILD:-3_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ LIBDIRSUFFIX=""
+ OPTIMIZE_FLAG="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+ OPTIMIZE_FLAG="-O2"
+else
+ LIBDIRSUFFIX=""
+ OPTIMIZE_FLAG="-O2"
+fi
+
+# Link using gold. This avoids running out of memory on 32-bit systems, and
+# avoids a recurring build failure with GNU ld on other systems.
+PATH="$(pwd)/gold:$PATH"
+export CC="gcc -B$(pwd)/gold"
+export CXX="g++ -B$(pwd)/gold"
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Workaround to prevent unidentified crashes when compiling with recent gcc.
+# Presumably a newer version will fix this (as it did with Firefox), so only
+# enable the workaround for known crashing versions.
+# Test page to check for crash: http://onet.pl
+ if [ $VERSION = 2.39 -o \
+ $VERSION = 2.40 -o \
+ $VERSION = 2.46 ]; then
+ OPTIMIZE_FLAG="$(echo "$OPTIMIZE_FLAG" | sed 's/O2/Os/g')"
+ echo "Detected Seamonkey $VERSION... enabling crash workaround O2 -> Os."
+ sleep 1
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-seamonkey
+rm -rf $PKG
+mkdir -p $TMP $PKG/usr
+
+# We need to use the incredibly ancient autoconf-2.13 for this :/
+( cd $CWD/autoconf ; ./autoconf.build )
+PATH=/tmp/autoconf-tmp/usr/bin:$PATH
+
+cd $TMP
+rm -rf seamonkey-${TARBALLVER}
+tar xvf $CWD/seamonkey-${TARBALLVER}.source.tar.?z* || exit 1
+cd seamonkey-${TARBALLVER} || exit 1
+
+# Make sure the perms/ownerships are sane:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+chown -R root:root .
+
+# Our building options, in a configure-like display ;)
+OPTIONS="\
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --enable-optimize=$OPTIMIZE_FLAG \
+ --enable-cpp-rtti \
+ --enable-default-toolkit=cairo-gtk2 \
+ --enable-startup-notification \
+ --disable-debug \
+ --with-default-mozilla-five-home=/usr/lib${LIBDIRSUFFIX}/seamonkey-${VERSION} \
+ --enable-strip \
+ --disable-tests \
+ --disable-crashreporter \
+ --enable-safe-browsing \
+ --disable-updater \
+ --enable-chrome-format=omni \
+ --disable-necko-wifi \
+ --enable-extensions=default,irc \
+ --without-system-nspr \
+ --disable-pulseaudio \
+ --with-system-zlib \
+ --enable-application=suite \
+ --with-pthreads \
+ --host=$ARCH-slackware-linux \
+ --target=$ARCH-slackware-linux"
+
+export BUILD_OFFICIAL=1
+export MOZILLA_OFFICIAL=1
+export MOZ_MAKE_FLAGS="$NUMJOBS"
+
+# Clear some variables that could break the build
+unset DBUS_SESSION_BUS_ADDRESS ORBIT_SOCKETDIR SESSION_MANAGER \
+ XDG_SESSION_COOKIE XAUTHORITY MAKEFLAGS
+
+# Assemble our .mozconfig:
+echo > .mozconfig
+
+# Mozilla devs enforce using an objdir for building
+# https://developer.mozilla.org/en/Configuring_Build_Options#Building_with_an_objdir
+mkdir obj
+echo "mk_add_options MOZ_OBJDIR=$(pwd)/obj" >> .mozconfig
+# This directory is also needed or the build will fail:
+mkdir -p mozilla/obj
+
+# Write in it the options above
+for option in $OPTIONS; do echo "ac_add_options $option" >> .mozconfig; done
+
+echo "ac_add_options --disable-tests" >> .mozconfig
+make -f client.mk build || exit 1
+make -f client.mk install DESTDIR=$PKG || exit 1
+
+# Keep the "obsolete" nspr headers:
+if [ ! -d mozilla/dist/include/nspr/obsolete ]; then
+ mkdir -p mozilla/dist/include/nspr/obsolete
+ cp -a mozilla/nsprpub/pr/include/obsolete/*.h mozilla/dist/include/nspr/obsolete
+fi
+
+# Install nspr/nss headers.
+for includedir in nspr nspr/obsolete nspr/private ; do
+ mkdir -p $PKG/usr/include/seamonkey-${VERSION}/$includedir
+ cp -aL mozilla/dist/include/${includedir}/*.h $PKG/usr/include/seamonkey-${VERSION}/$includedir
+done
+cp -aL mozilla/dist/include/*.tbl mozilla/dist/include/*.msg $PKG/usr/include/seamonkey-${VERSION}
+cp -aL mozilla/dist/include/*.h $PKG/usr/include/seamonkey-${VERSION}
+cp -aL mozilla/dist/sdk/include/* $PKG/usr/include/seamonkey-${VERSION}
+# compat symlinks
+( cd $PKG/usr/include/seamonkey-${VERSION}
+ # Relocate anything that might be in the nss directory, and replace the directory with a symlink.
+ # make install was putting an empty directory here, which was breaking other compiles.
+ if [ -d nss ]; then
+ mv nss/* .
+ rmdir nss
+ fi
+ ln -sf . nss
+ ln -sf . plugin
+ ln -sf . xpcom
+)
+
+# We don't need this stuff in the package:
+rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/seamonkey-devel-$VERSION
+
+chown -R root:root $PKG/usr/include/seamonkey-${VERSION}
+find $PKG/usr/include/seamonkey-${VERSION} -name "*.h" -type f -exec chmod 644 {} \;
+# Create a more generic include files symlink:
+( cd $PKG/usr/include
+ if [ ! -e seamonkey ]; then
+ ln -sf seamonkey-${VERSION} seamonkey
+ fi
+)
+
+# Install pkgconfig files:
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig
+for file in $CWD/pkgconfig/* ; do
+cat $file \
+ | sed -e "s/@LIB@/lib${LIBDIRSUFFIX}/" \
+ -e "s/@VERSION@/$VERSION/" \
+ > $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/$(basename $file)
+done
+
+# Add symlinks for the pkgconfig files:
+( cd $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig
+ ln -s seamonkey-libxul.pc libxul.pc
+ ln -s seamonkey-plugin.pc plugin.pc
+ ln -s seamonkey-xpcom.pc xpcom.pc
+ # These are now provided by the mozilla-nss package:
+ #ln -s seamonkey-nspr.pc nspr.pc
+ #ln -s seamonkey-nss.pc nss.pc
+)
+
+# Compress and if needed symlink the man pages:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# Strip files:
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# This remains the standard plugin directory for all browsers.
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins
+
+# This is traditional.
+( cd $PKG/usr/lib${LIBDIRSUFFIX}
+ if [ ! -e seamonkey ]; then
+ ln -sf seamonkey-${VERSION} seamonkey
+ fi
+)
+
+mkdir -p $PKG/usr/share/applications
+cp -a $CWD/*.desktop $PKG/usr/share/applications
+chown -R root:root $PKG/usr/share/applications
+chmod 644 $PKG/usr/share/applications/*
+mkdir -p $PKG/usr/share/pixmaps
+cp -a $CWD/*.png $PKG/usr/share/pixmaps
+chown -R root:root $PKG/usr/share/pixmaps
+chmod 644 $PKG/usr/share/pixmaps/*
+
+mkdir -p $PKG/usr/doc/seamonkey-$VERSION
+( cd mozilla
+ cp -a \
+ LEGAL LICENSE README.txt \
+ $PKG/usr/doc/seamonkey-$VERSION
+)
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ > $PKG/install/doinst.sh
+
+cd $TMP/package-seamonkey
+/sbin/makepkg -l y -c n -p $TMP/seamonkey-$TARBALLVER-$ARCH-$BUILD.txz
+
+# Create a standalone seamonkey-solibs package for RPM, gxine, etc.
+rm -r $TMP/package-seamonkey-solibs
+mkdir -p $TMP/package-seamonkey-solibs/usr/doc
+cp -a $PKG/usr/doc/seamonkey-$VERSION $TMP/package-seamonkey-solibs/usr/doc
+mkdir -p $TMP/package-seamonkey-solibs/usr/lib${LIBDIRSUFFIX}/seamonkey-${VERSION}
+for file in libfreebl3.chk libfreebl3.so libmozsqlite3.so \
+ libnspr4.so libnss* libplc4.so libplds4.so libsmime3.so libsoftokn3.chk \
+ libsoftokn3.so libssl3.so ; do
+ cp -a $PKG/usr/lib${LIBDIRSUFFIX}/seamonkey-${VERSION}/$file \
+ $TMP/package-seamonkey-solibs/usr/lib${LIBDIRSUFFIX}/seamonkey-${VERSION}
+done
+mkdir $TMP/package-seamonkey-solibs/install
+cat << EOF | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $TMP/package-seamonkey-solibs/install/doinst.sh
+( cd usr/lib ; rm -rf seamonkey )
+( cd usr/lib ; ln -sf seamonkey-$VERSION seamonkey )
+if ! grep /usr/lib/seamonkey etc/ld.so.conf 1> /dev/null 2> /dev/null ; then
+ echo "/usr/lib/seamonkey" >> etc/ld.so.conf
+fi
+if [ -x /sbin/ldconfig ]; then
+ /sbin/ldconfig 2> /dev/null
+fi
+EOF
+cat << EOF > $TMP/package-seamonkey-solibs/install/slack-desc
+ |-----handy-ruler------------------------------------------------------|
+seamonkey-solibs: seamonkey-solibs (Shared libraries from Seamonkey)
+seamonkey-solibs:
+seamonkey-solibs: This package contains a subset of the shared libraries from Seamonkey
+seamonkey-solibs: to provide runtime support for various programs.
+seamonkey-solibs: This package is built from the Seamonkey sources and is provided
+seamonkey-solibs: as a standalone runtime package for people who do not want to install
+seamonkey-solibs: the entire seamonkey package (as for server use).
+seamonkey-solibs:
+seamonkey-solibs: This package is runtime only. The include files and other files for
+seamonkey-solibs: development can be found in the seamonkey package.
+seamonkey-solibs:
+EOF
+cd $TMP/package-seamonkey-solibs
+/sbin/makepkg -l y -c n -p $TMP/seamonkey-solibs-$TARBALLVER-$ARCH-$BUILD.txz
+
diff --git a/patches/source/seamonkey/seamonkey.desktop b/patches/source/seamonkey/seamonkey.desktop
new file mode 100644
index 000000000..eaf81ddff
--- /dev/null
+++ b/patches/source/seamonkey/seamonkey.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=SeaMonkey
+Comment=Web Browser
+Exec=/usr/bin/seamonkey
+Icon=/usr/share/pixmaps/seamonkey-icon.png
+Terminal=0
+Type=Application
+MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
+Categories=Application;Network;
diff --git a/patches/source/seamonkey/slack-desc b/patches/source/seamonkey/slack-desc
new file mode 100644
index 000000000..af6ee2408
--- /dev/null
+++ b/patches/source/seamonkey/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+seamonkey: SeaMonkey (an open-source web browser suite)
+seamonkey:
+seamonkey: The SeaMonkey browser suite. SeaMonkey features a state-of-the-art
+seamonkey: web browser and powerful email client, as well as a WYSIWYG web page
+seamonkey: composer and a feature-rich IRC chat client.
+seamonkey:
+seamonkey:
+seamonkey:
+seamonkey: Visit the SeaMonkey project at this URL:
+seamonkey: http://www.mozilla.org/projects/seamonkey/
+seamonkey:
diff --git a/patches/source/sendmail/Build b/patches/source/sendmail/Build
new file mode 100644
index 000000000..21950d496
--- /dev/null
+++ b/patches/source/sendmail/Build
@@ -0,0 +1,29 @@
+#!/bin/sh
+# Copyright 2004 Slackware Linux, Inc. Concord, CA 94520
+# Copyright 2007, 2008 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+# A script to build .cf files from .mc files:
+
+for mcfile in $* ; do
+ /usr/bin/m4 /usr/share/sendmail/cf/m4/cf.m4 $mcfile > $(basename $mcfile .mc).cf
+done
+
diff --git a/patches/source/sendmail/SlackBuild-sendmail b/patches/source/sendmail/SlackBuild-sendmail
new file mode 100755
index 000000000..dea6a7021
--- /dev/null
+++ b/patches/source/sendmail/SlackBuild-sendmail
@@ -0,0 +1,168 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2012, 2013, 2014 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+VERSION=8.14.9
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-sendmail
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+# Explode the package framework:
+cd $PKG
+explodepkg $CWD/_sendmail.tar.gz
+[ -n "${LIBDIRSUFFIX}" ] && mv $PKG/usr/lib $PKG/usr/lib${LIBDIRSUFFIX}
+
+echo "+=================+"
+echo "| sendmail.$VERSION |"
+echo "+=================+"
+OSCPU="`uname -srm | tr ' ' '.'`"
+cd $TMP
+rm -rf sendmail-$VERSION
+tar xvf $CWD/sendmail.$VERSION.tar.gz || exit 1
+cd sendmail-$VERSION
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Add TLS support to the sendmail binary:
+cat $CWD/site.config.m4 > devtools/Site/site.config.m4
+
+# Build .cf files for Linux:
+cd $TMP/sendmail-$VERSION/cf/cf
+cp $CWD/*.mc .
+cp linux.uucp.mc config.mc
+sh Build config.cf
+mv config.cf $PKG/usr/share/sendmail/linux.uucp.cf
+cp sendmail-slackware.mc config.mc
+sh Build config.cf
+mv config.cf $PKG/usr/share/sendmail/sendmail-slackware.cf
+cp sendmail-slackware-tls.mc config.mc
+sh Build config.cf
+mv config.cf $PKG/usr/share/sendmail/sendmail-slackware-tls.cf
+cp sendmail-slackware-tls-sasl.mc config.mc
+sh Build config.cf
+mv config.cf $PKG/usr/share/sendmail/sendmail-slackware-tls-sasl.cf
+
+# Add a sample sendmail.cf:
+cat $PKG/usr/share/sendmail/sendmail-slackware.cf > $PKG/etc/mail/sendmail.cf.new
+cat submit.cf > $PKG/etc/mail/submit.cf.new
+
+cd $TMP/sendmail-$VERSION
+## All "Build" does is call make while screwing up the options :-)
+## sh Build
+make O="$SLKCFLAGS"
+#O="$SLKCFLAGS" sh Build
+cat sendmail/mailq.1 | gzip -9c > $PKG/usr/man/man1/mailq.1.gz
+cat sendmail/newaliases.1 | gzip -9c > $PKG/usr/man/man1/newaliases.1.gz
+mkdir -p $PKG/usr/doc/sendmail-$VERSION
+cp -a \
+ FAQ INSTALL KNOWNBUGS LICENSE PGPKEYS README RELEASE_NOTES \
+ $PKG/usr/doc/sendmail-$VERSION
+( cd doc ; cp -a op $PKG/usr/doc/sendmail-$VERSION )
+
+cd obj.$OSCPU/sendmail
+cat sendmail > $PKG/usr/sbin/sendmail.new
+cat aliases.5 | gzip -9c > $PKG/usr/man/man5/aliases.5.gz
+cat sendmail.8 | gzip -9c > $PKG/usr/man/man8/sendmail.8.gz
+cat statistics > $PKG/etc/mail/statistics
+cat ../../sendmail/helpfile > $PKG/etc/mail/helpfile
+cd ../makemap
+cat makemap > $PKG/usr/sbin/makemap
+cat makemap.8 | gzip -9c > $PKG/usr/man/man8/makemap.8.gz
+cd ../mailstats
+cat mailstats > $PKG/usr/sbin/mailstats
+cat mailstats.8 | gzip -9c > $PKG/usr/man/man8/mailstats.8.gz
+cd ../praliases
+cat praliases > $PKG/usr/bin/praliases
+chmod 755 $PKG/usr/bin/praliases
+cat praliases.8 | gzip -9c > $PKG/usr/man/man8/praliases.8.gz
+cd ../rmail
+cat rmail > $PKG/usr/bin/rmail
+cat rmail.8 | gzip -9c > $PKG/usr/man/man8/rmail.8.gz
+cd ../smrsh
+cat smrsh > $PKG/usr/sbin/smrsh
+cat smrsh.8 | gzip -9c > $PKG/usr/man/man8/smrsh.8.gz
+cd ../mail.local
+cat mail.local > $PKG/usr/sbin/mail.local
+cat mail.local.8 | gzip -9c > $PKG/usr/man/man8/mail.local.8.gz
+cd ../vacation
+cat vacation > $PKG/usr/bin/vacation
+cat vacation.1 | gzip -9c > $PKG/usr/man/man1/vacation.1.gz
+cd ../editmap
+cat editmap > $PKG/usr/sbin/editmap
+cat editmap.8 | gzip -9c > $PKG/usr/man/man8/editmap.8.gz
+
+# Add libmilter:
+cd $TMP/sendmail-$VERSION/libmilter
+./Build
+cd ..
+mkdir -p $PKG/usr/include
+mkdir -p $PKG/usr/include/libmilter
+cp -a include/libmilter/mfapi.h $PKG/usr/include/libmilter
+cp -a include/libmilter/mfdef.h $PKG/usr/include/libmilter
+cp -a obj.*/libmilter/libmilter.a $PKG/usr/lib${LIBDIRSUFFIX}
+strip -g $PKG/usr/lib${LIBDIRSUFFIX}/libmilter.a
+chmod 644 $PKG/usr/lib${LIBDIRSUFFIX}/libmilter.a $PKG/usr/include/libmilter/*
+mkdir -p $PKG/usr/doc/sendmail-$VERSION/libmilter
+cp -a libmilter/README $PKG/usr/doc/sendmail-$VERSION/libmilter
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+cat $CWD/slack-desc.sendmail > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/sendmail-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/sendmail/SlackBuild-sendmail-cf b/patches/source/sendmail/SlackBuild-sendmail-cf
new file mode 100755
index 000000000..19cdc9be0
--- /dev/null
+++ b/patches/source/sendmail/SlackBuild-sendmail-cf
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2012, 2013, 2014 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+VERSION=8.14.9
+ARCH=noarch
+BUILD=${BUILD:-1_slack14.1}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-sendmail-cf
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+echo "+====================+"
+echo "| sendmail.cf.$VERSION |"
+echo "+====================+"
+( cd $TMP/sendmail-$VERSION ; find . -name "*~" -print -exec rm {} \; )
+cd $PKG
+mkdir -p usr/share/sendmail/cf
+cd usr/share/sendmail/cf
+cp -a $TMP/sendmail-$VERSION/cf/README .
+cp -a $TMP/package-sendmail/usr/share/sendmail/README.linux .
+for dir in cf domain feature hack m4 mailer ostype sh siteconfig ; do
+ cp -a $TMP/sendmail-$VERSION/cf/$dir .
+done
+# Replace the sendmail Build script with a simple (working) one:
+cp -a $PKG/usr/share/sendmail/cf/cf/Build $PKG/usr/share/sendmail/cf/cf/Build.orig
+zcat $CWD/Build.gz > $PKG/usr/share/sendmail/cf/cf/Build
+chown -R root.root *
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc.sendmail-cf > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/sendmail-cf-$VERSION-noarch-$BUILD.txz
+
diff --git a/patches/source/sendmail/linux.uucp.mc b/patches/source/sendmail/linux.uucp.mc
new file mode 100644
index 000000000..ffd242bb0
--- /dev/null
+++ b/patches/source/sendmail/linux.uucp.mc
@@ -0,0 +1,8 @@
+include(`../m4/cf.m4')
+VERSIONID(`linux for setup with uucp which uses domain names')dnl
+OSTYPE(linux)
+FEATURE(always_add_domain)dnl
+MAILER(local)dnl
+MAILER(smtp)dnl
+MAILER(uucp)
+define(`SMART_HOST', uucp-dom:otheruucphost)
diff --git a/patches/source/sendmail/sendmail-slackware-tls-sasl.mc b/patches/source/sendmail/sendmail-slackware-tls-sasl.mc
new file mode 100644
index 000000000..ed5753b43
--- /dev/null
+++ b/patches/source/sendmail/sendmail-slackware-tls-sasl.mc
@@ -0,0 +1,61 @@
+dnl# This is the a sendmail .mc file for Slackware with TLS support.
+dnl# To generate the sendmail.cf file from this (perhaps after making
+dnl# some changes), use the m4 files in /usr/share/sendmail/cf like this:
+dnl#
+dnl# cp sendmail-slackware-tls.mc /usr/share/sendmail/cf/config.mc
+dnl# cd /usr/share/sendmail/cf
+dnl# sh Build config.mc
+dnl#
+dnl# You may then install the resulting .cf file:
+dnl# cp config.cf /etc/mail/sendmail.cf
+dnl#
+include(`../m4/cf.m4')
+VERSIONID(`TLS supporting setup for Slackware Linux')dnl
+OSTYPE(`linux')dnl
+dnl#
+dnl# You will need to create the certificates below with OpenSSL first:
+define(`confCACERT_PATH', `/etc/mail/certs/')
+define(`confCACERT', `/etc/mail/certs/CA.cert.pem')
+define(`confSERVER_CERT', `/etc/mail/certs/smtp.cert.pem')
+define(`confSERVER_KEY', `/etc/mail/certs/smtp.key.pem')
+dnl# These settings help protect against people verifying email addresses
+dnl# at your site in order to send you email that you probably don't want:
+define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
+dnl# Uncomment the line below to send outgoing mail through an external server:
+dnl define(`SMART_HOST',`mailserver.example.com')
+dnl# No timeout for ident:
+define(`confTO_IDENT', `0')dnl
+dnl# Enable the line below to use smrsh to restrict what sendmail can run:
+dnl FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
+dnl# See the README in /usr/share/sendmail/cf for a ton of information on
+dnl# how these options work:
+FEATURE(`use_cw_file')dnl
+FEATURE(`use_ct_file')dnl
+FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
+FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
+FEATURE(`access_db', `hash -T<TMPF> /etc/mail/access')dnl
+FEATURE(`blacklist_recipients')dnl
+FEATURE(`local_procmail',`',`procmail -t -Y -a $h -d $u')dnl
+FEATURE(`always_add_domain')dnl
+FEATURE(`redirect')dnl
+FEATURE(`no_default_msa')dnl
+dnl# Turn this feature on if you don't always have DNS, or enjoy junk mail:
+dnl FEATURE(`accept_unresolvable_domains')dnl
+EXPOSED_USER(`root')dnl
+dnl# Also accept mail for localhost.localdomain:
+LOCAL_DOMAIN(`localhost.localdomain')dnl
+MAILER(local)dnl
+MAILER(smtp)dnl
+MAILER(procmail)dnl
+dnl# Allow SASL authentication/relaying:
+define(`confAUTH_OPTIONS', `A p y')dnl
+define(`confAUTH_MECHANISMS', `LOGIN PLAIN DIGEST-MD5 CRAM-MD5')dnl
+TRUST_AUTH_MECH(`LOGIN PLAIN DIGEST-MD5 CRAM-MD5')dnl
+DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
+dnl# Daemon options after M= below that might need to be changed are:
+dnl# s (allow SSL, not only TLS)
+dnl# a (require authentication)
+DAEMON_OPTIONS(`Port=smtps, Name=MSA-SSL, M=Esa')dnl
+LOCAL_CONFIG
+dnl# Do not allow the weak SSLv2:
+O CipherList=ALL:!ADH:!NULL:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:-LOW:+SSLv3:+TLSv1:-SSLv2:+EXP:+eNULL
diff --git a/patches/source/sendmail/sendmail-slackware-tls.mc b/patches/source/sendmail/sendmail-slackware-tls.mc
new file mode 100644
index 000000000..01a66775b
--- /dev/null
+++ b/patches/source/sendmail/sendmail-slackware-tls.mc
@@ -0,0 +1,56 @@
+dnl# This is the a sendmail .mc file for Slackware with TLS support.
+dnl# To generate the sendmail.cf file from this (perhaps after making
+dnl# some changes), use the m4 files in /usr/share/sendmail/cf like this:
+dnl#
+dnl# cp sendmail-slackware-tls.mc /usr/share/sendmail/cf/config.mc
+dnl# cd /usr/share/sendmail/cf
+dnl# sh Build config.mc
+dnl#
+dnl# You may then install the resulting .cf file:
+dnl# cp config.cf /etc/mail/sendmail.cf
+dnl#
+include(`../m4/cf.m4')
+VERSIONID(`TLS supporting setup for Slackware Linux')dnl
+OSTYPE(`linux')dnl
+dnl#
+dnl# You will need to create the certificates below with OpenSSL first:
+define(`confCACERT_PATH', `/etc/mail/certs/')
+define(`confCACERT', `/etc/mail/certs/CA.cert.pem')
+define(`confSERVER_CERT', `/etc/mail/certs/smtp.cert.pem')
+define(`confSERVER_KEY', `/etc/mail/certs/smtp.key.pem')
+dnl# These settings help protect against people verifying email addresses
+dnl# at your site in order to send you email that you probably don't want:
+define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
+dnl# Uncomment the line below to send outgoing mail through an external server:
+dnl define(`SMART_HOST',`mailserver.example.com')
+dnl# No timeout for ident:
+define(`confTO_IDENT', `0')dnl
+dnl# Enable the line below to use smrsh to restrict what sendmail can run:
+dnl FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
+dnl# See the README in /usr/share/sendmail/cf for a ton of information on
+dnl# how these options work:
+FEATURE(`use_cw_file')dnl
+FEATURE(`use_ct_file')dnl
+FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
+FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
+FEATURE(`access_db', `hash -T<TMPF> /etc/mail/access')dnl
+FEATURE(`blacklist_recipients')dnl
+FEATURE(`local_procmail',`',`procmail -t -Y -a $h -d $u')dnl
+FEATURE(`always_add_domain')dnl
+FEATURE(`redirect')dnl
+dnl# Turn this feature on if you don't always have DNS, or enjoy junk mail:
+dnl FEATURE(`accept_unresolvable_domains')dnl
+EXPOSED_USER(`root')dnl
+dnl# Also accept mail for localhost.localdomain:
+LOCAL_DOMAIN(`localhost.localdomain')dnl
+MAILER(local)dnl
+MAILER(smtp)dnl
+MAILER(procmail)dnl
+DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
+dnl# Daemon options after M= below that might need to be changed are:
+dnl# s (allow SSL, not only TLS)
+dnl# a (require authentication)
+DAEMON_OPTIONS(`Port=smtps, Name=MSA-SSL, M=Es')dnl
+LOCAL_CONFIG
+dnl# Do not allow the weak SSLv2:
+O CipherList=ALL:!ADH:!NULL:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:-LOW:+SSLv3:+TLSv1:-SSLv2:+EXP:+eNULL
diff --git a/patches/source/sendmail/sendmail-slackware.mc b/patches/source/sendmail/sendmail-slackware.mc
new file mode 100644
index 000000000..4fd4620bf
--- /dev/null
+++ b/patches/source/sendmail/sendmail-slackware.mc
@@ -0,0 +1,42 @@
+dnl# This is the default sendmail .mc file for Slackware. To generate
+dnl# the sendmail.cf file from this (perhaps after making some changes),
+dnl# use the m4 files in /usr/share/sendmail/cf like this:
+dnl#
+dnl# cp sendmail-slackware.mc /usr/share/sendmail/cf/config.mc
+dnl# cd /usr/share/sendmail/cf
+dnl# sh Build config.cf
+dnl#
+dnl# You may then install the resulting .cf file:
+dnl# cp config.cf /etc/mail/sendmail.cf
+dnl#
+include(`../m4/cf.m4')
+VERSIONID(`default setup for Slackware Linux')dnl
+OSTYPE(`linux')dnl
+dnl# These settings help protect against people verifying email addresses
+dnl# at your site in order to send you email that you probably don't want:
+define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
+dnl# Uncomment the line below to send outgoing mail through an external server:
+dnl define(`SMART_HOST',`mailserver.example.com')
+dnl# No timeout for ident:
+define(`confTO_IDENT', `0')dnl
+dnl# Enable the line below to use smrsh to restrict what sendmail can run:
+dnl FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
+dnl# See the README in /usr/share/sendmail/cf for a ton of information on
+dnl# how these options work:
+FEATURE(`use_cw_file')dnl
+FEATURE(`use_ct_file')dnl
+FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
+FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
+FEATURE(`access_db', `hash -T<TMPF> /etc/mail/access')dnl
+FEATURE(`blacklist_recipients')dnl
+FEATURE(`local_procmail',`',`procmail -t -Y -a $h -d $u')dnl
+FEATURE(`always_add_domain')dnl
+FEATURE(`redirect')dnl
+dnl# Turn this feature on if you don't always have DNS, or enjoy junk mail:
+dnl FEATURE(`accept_unresolvable_domains')dnl
+EXPOSED_USER(`root')dnl
+dnl# Also accept mail for localhost.localdomain:
+LOCAL_DOMAIN(`localhost.localdomain')dnl
+MAILER(local)dnl
+MAILER(smtp)dnl
+MAILER(procmail)dnl
diff --git a/patches/source/sendmail/sendmail.SlackBuild b/patches/source/sendmail/sendmail.SlackBuild
new file mode 100755
index 000000000..462f16e9d
--- /dev/null
+++ b/patches/source/sendmail/sendmail.SlackBuild
@@ -0,0 +1,3 @@
+#!/bin/sh
+./SlackBuild-sendmail $*
+./SlackBuild-sendmail-cf $*
diff --git a/patches/source/sendmail/site.config.m4 b/patches/source/sendmail/site.config.m4
new file mode 100644
index 000000000..09b1d72ff
--- /dev/null
+++ b/patches/source/sendmail/site.config.m4
@@ -0,0 +1,8 @@
+APPENDDEF(`confENVDEF', `-DNETINET6')
+APPENDDEF(`confMAPDEF', `-DNEWDB -DSTARTTLS -DSASL=2 -DTCPWRAPPERS -DNIS -DMAP_REGEX -DSOCKETMAP')
+APPENDDEF(`confLIBS', `-lnsl -lssl -lcrypto -lsasl2 -lwrap -lm -ldb -lresolv')
+APPENDDEF(`conf_libmilter_ENVDEF', `-DMILTER')
+APPENDDEF(`conf_sendmail_ENVDEF', `-DMILTER')
+APPENDDEF(`conf_libmilter_ENVDEF', `-D_FFR_MILTER_ROOT_UNSAFE ')
+APPENDDEF(`confENVDEF', `-DBROKEN_PTHREAD_SLEEP')
+APPENDDEF(`confENVDEF', `-D_FFR_TLS_1')dnl
diff --git a/patches/source/sendmail/slack-desc.sendmail b/patches/source/sendmail/slack-desc.sendmail
new file mode 100644
index 000000000..cdcc9387a
--- /dev/null
+++ b/patches/source/sendmail/slack-desc.sendmail
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+sendmail: sendmail (mail transfer agent)
+sendmail:
+sendmail: Eric Allman's mail transport agent. The _Unix System Administration
+sendmail: Handbook_ calls sendmail 'The most complex and complete mail delivery
+sendmail: system in common use...'
+sendmail:
+sendmail: Ready-made configuration files are included for systems connected by
+sendmail: TCP/IP (with or without a nameserver) and for systems using UUCP.
+sendmail:
+sendmail: The procmail package is required to handle local mail delivery.
+sendmail:
diff --git a/patches/source/sendmail/slack-desc.sendmail-cf b/patches/source/sendmail/slack-desc.sendmail-cf
new file mode 100644
index 000000000..df56efdc8
--- /dev/null
+++ b/patches/source/sendmail/slack-desc.sendmail-cf
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+sendmail-cf: sendmail-cf (configuration files for sendmail)
+sendmail-cf:
+sendmail-cf: These files are used to create sendmail.cf configuration files. The
+sendmail-cf: m4 macro processor is also required in order to make use of these
+sendmail-cf: files.
+sendmail-cf:
+sendmail-cf: The files and documentation in /usr/share/sendmail should make it
+sendmail-cf: possible to support virtually any mail configuration. NOTE: You
+sendmail-cf: probably won't need this package if you're planning to use one of the
+sendmail-cf: sendmail.cf samples included in the sendmail package.
+sendmail-cf:
diff --git a/patches/source/shadow/adduser b/patches/source/shadow/adduser
new file mode 100644
index 000000000..ce06aac54
--- /dev/null
+++ b/patches/source/shadow/adduser
@@ -0,0 +1,445 @@
+#!/bin/bash
+#
+# Copyright 1995 Hrvoje Dogan, Croatia.
+# Copyright 2002-2004, 2008, 2009, 2010 Stuart Winter, Surrey, England, UK.
+# Copyright 2004, 2008-2010 Slackware Linux, Inc., Concord, CA, USA
+# Copyright 2012 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#
+##########################################################################
+# Program: /usr/sbin/adduser
+# Purpose: Interactive front end to /usr/sbin/useradd for Slackware Linux
+# Author : Stuart Winter <mozes@slackware.com>
+# Based on the original Slackware adduser by Hrvoje Dogan
+# with modifications by Patrick Volkerding
+# Version: 1.15
+##########################################################################
+# Usage..: adduser [<new_user_name>]
+##########################################################################
+# History #
+###########
+# v1.15 - 2012-09-13
+# * Added scanner group, which may be required by third party drivers.
+# v1.14 - 2012-08-24
+# * Added lp group, which is now required for scanning. <pjv>
+# v1.13 - 13/01/10
+# * Fixed bug that removed underscore characters from UNIX group names.
+# Thanks to mRgOBLIN for the report and Jim Hawkins for the fix. <sw>
+# v1.12 - 21/07/09
+# * Adjusted the search of /etc/passwd to exclude the NIS inclusion
+# string. Thanks to Dominik L. Borkowski.
+# v1.11 - 04/06/09
+# * Add power and netdev to the suggested group list
+# v1.10 - 24/03/08
+# * To facilitate use of the automatic mounting features of HAL,
+# allow the admin to easily add users to the default groups:
+# audio,cdrom,video,plugdev,floppy.
+# The default is not to add new users to these groups.
+# And by the way, this script is "useradd from Slackware" not
+# "superadduser from Gentoo" ;-)
+# v1.09 - 07/06/04
+# * Added standard Slackware script licence to the head of this file.
+# v1.08 - 25/04/04
+# * Disallow user names that begin with a numeric because useradd
+# (from shadow v4.03) does not allow them. <sw>
+# v1.07 - 07/03/03
+# * When supplying a null string for the uid (meaning 'Choose next available'),
+# if there were file names in the range 'a-z' in the pwd then the
+# egrep command considered these files rather than the null string.
+# The egrep expression is now in quotes.
+# Reported & fixed by Vadim O. Ustiansky <sw>
+# v1.06 - 31/03/03
+# * Ask to chown user.group the home directory if it already exists.
+# This helps reduce later confusion when adding users whose home dir
+# already exists (mounted partition for example) and is owned
+# by a user other than the user to which the directory is being
+# assigned as home. Default is not to chown.
+# Brought to my attention by mRgOBLIN. <sw>
+# v1.05 - 04/01/03
+# * Advise & prevent users from creating logins with '.' characters
+# in the user name. <sw>
+# * Made pending account creation info look neater <sw>
+# v1.04 - 09/06/02
+# * Catered for shadow-4.0.3's 'useradd' binary that no longer
+# will let you create a user that has any uppercase chars in it
+# This was reported on the userlocal.org forums
+# by 'xcp' - thanks. <sw,pjv>
+# v1.03 - 20/05/02
+# * Support 'broken' (null lines in) /etc/passwd and
+# /etc/group files <sw>
+# * For recycling UIDs (default still 'off'), we now look in
+# /etc/login.defs for the UID_MIN value and use it
+# If not found then default to 1000 <sw>
+# v1.02 - 10/04/02
+# * Fix user-specified UID bug. <pjv>
+# v1.01 - 23/03/02
+# * Match Slackware indenting style, simplify. <pjv>
+# v1.00 - 22/03/02
+# * Created
+#######################################################################
+
+# Path to files
+pfile=/etc/passwd
+gfile=/etc/group
+sfile=/etc/shells
+
+# Paths to binaries
+useradd=/usr/sbin/useradd
+chfn=/usr/bin/chfn
+passwd=/usr/bin/passwd
+chmod=/bin/chmod
+
+# Defaults
+defhome=/home
+defshell=/bin/bash
+defchmod=711 # home dir permissions - may be preferable to use 701, however.
+defgroup=users
+AGID="audio cdrom floppy plugdev video power netdev lp scanner" # additional groups for desktop users
+
+# Determine what the minimum UID is (for UID recycling)
+# (we ignore it if it's not at the beginning of the line (i.e. commented out with #))
+export recycleUIDMIN="$(grep ^UID_MIN /etc/login.defs | awk '{print $2}' 2>/dev/null)"
+# If we couldn't find it, set it to the default of 1000
+if [ -z "$recycleUIDMIN" ]; then
+ export recycleUIDMIN=1000 # this is the default from Slackware's /etc/login.defs
+fi
+
+
+# This setting enables the 'recycling' of older unused UIDs.
+# When you userdel a user, it removes it from passwd and shadow but it will
+# never get used again unless you specify it expliticly -- useradd (appears to) just
+# look at the last line in passwd and increment the uid. I like the idea of
+# recycling uids but you may have very good reasons not to (old forgotten
+# confidential files still on the system could then be owned by this new user).
+# We'll set this to no because this is what the original adduser shell script
+# did and it's what users expect.
+recycleuids=no
+
+# Function to read keyboard input.
+# bash1 is broken (even ash will take read -ep!), so we work around
+# it (even though bash1 is no longer supported on Slackware).
+function get_input() {
+ local output
+ if [ "`echo $BASH_VERSION | cut -b1`" = "1" ]; then
+ echo -n "${1} " >&2 # fudge for use with bash v1
+ read output
+ else # this should work with any other /bin/sh
+ read -ep "${1} " output
+ fi
+ echo $output
+}
+
+# Function to display the account info
+function display () {
+ local goose
+ goose="$(echo $2 | cut -d ' ' -f 2-)" # lop off the prefixed argument useradd needs
+ echo -n "$1 "
+ # If it's null then display the 'other' information
+ if [ -z "$goose" -a ! -z "$3" ]; then
+ echo "$3"
+ else
+ echo "$goose"
+ fi
+}
+
+# Function to check whether groups exist in the /etc/group file
+function check_group () {
+ local got_error group
+ if [ ! -z "$@" ]; then
+ for group in $@ ; do
+ local uid_not_named="" uid_not_num=""
+ grep -v "$^" $gfile | awk -F: '{print $1}' | grep "^${group}$" >/dev/null 2>&1 || uid_not_named=yes
+ grep -v "$^" $gfile | awk -F: '{print $3}' | grep "^${group}$" >/dev/null 2>&1 || uid_not_num=yes
+ if [ ! -z "$uid_not_named" -a ! -z "$uid_not_num" ]; then
+ echo "- Group '$group' does not exist"
+ got_error=yes
+ fi
+ done
+ fi
+ # Return exit code of 1 if at least one of the groups didn't exist
+ if [ ! -z "$got_error" ]; then
+ return 1
+ fi
+}
+
+#: Read the login name for the new user :#
+#
+# Remember that most Mail Transfer Agents are case independant, so having
+# 'uSer' and 'user' may cause confusion/things to break. Because of this,
+# useradd from shadow-4.0.3 no longer accepts usernames containing uppercase,
+# and we must reject them, too.
+
+# Set the login variable to the command line param
+echo
+LOGIN="$1"
+needinput=yes
+while [ ! -z $needinput ]; do
+ if [ -z "$LOGIN" ]; then
+ while [ -z "$LOGIN" ]; do LOGIN="$(get_input "Login name for new user []:")" ; done
+ fi
+ grep "^${LOGIN}:" $pfile >/dev/null 2>&1 # ensure it's not already used
+ if [ $? -eq 0 ]; then
+ echo "- User '$LOGIN' already exists; please choose another"
+ unset LOGIN
+ elif [ ! -z "$( echo $LOGIN | grep "^[0-9]" )" ]; then
+ echo "- User names cannot begin with a number; please choose another"
+ unset LOGIN
+ elif [ ! "$LOGIN" = "`echo $LOGIN | tr A-Z a-z`" ]; then # useradd does not allow uppercase
+ echo "- User '$LOGIN' contains illegal characters (uppercase); please choose another"
+ unset LOGIN
+ elif [ ! -z "$( echo $LOGIN | grep '\.' )" ]; then
+ echo "- User '$LOGIN' contains illegal characters (period/dot); please choose another"
+ unset LOGIN
+ else
+ unset needinput
+ fi
+done
+
+# Display the user name passed from the shell if it hasn't changed
+if [ "$1" = "$LOGIN" ]; then
+ echo "Login name for new user: $LOGIN"
+fi
+
+#: Get the UID for the user & ensure it's not already in use :#
+#
+# Whilst we _can_ allow users with identical UIDs, it's not a 'good thing' because
+# when you change password for the uid, it finds the first match in /etc/passwd
+# which isn't necessarily the correct user
+#
+echo
+needinput=yes
+while [ ! -z "$needinput" ]; do
+ _UID="$(get_input "User ID ('UID') [ defaults to next available ]:")"
+ egrep -v "^$|^\+" $pfile | awk -F: '{print $3}' | grep "^${_UID}$" >/dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ echo "- That UID is already in use; please choose another"
+ elif [ ! -z "$(echo $_UID | egrep '[A-Za-z]')" ]; then
+ echo "- UIDs are numerics only"
+ else
+ unset needinput
+ fi
+done
+# If we were given a UID, then syntax up the variable to pass to useradd
+if [ ! -z "$_UID" ]; then
+ U_ID="-u ${_UID}"
+else
+ # Will we be recycling UIDs?
+ if [ "$recycleuids" = "yes" ]; then
+ U_ID="-u $(awk -F: '{uid[$3]=1} END { for (i=ENVIRON["recycleUIDMIN"];i in uid;i++);print i}' $pfile)"
+ fi
+fi
+
+#: Get the initial group for the user & ensure it exists :#
+#
+# We check /etc/group for both the text version and the group ID number
+echo
+needinput=yes
+while [ ! -z "$needinput" ]; do
+ GID="$(get_input "Initial group [ ${defgroup} ]:")"
+ check_group "$GID"
+ if [ $? -gt 0 ]; then
+ echo "- Please choose another"
+ else
+ unset needinput
+ fi
+done
+# Syntax the variable ready for useradd
+if [ -z "$GID" ]; then
+ GID="-g ${defgroup}"
+else
+ GID="-g ${GID}"
+fi
+
+#: Get additional groups for the user :#
+#
+echo "Additional UNIX groups:"
+echo
+echo "Users can belong to additional UNIX groups on the system."
+echo "For local users using graphical desktop login managers such"
+echo "as XDM/KDM, users may need to be members of additional groups"
+echo "to access the full functionality of removable media devices."
+echo
+echo "* Security implications *"
+echo "Please be aware that by adding users to additional groups may"
+echo "potentially give access to the removable media of other users."
+echo
+echo "If you are creating a new user for remote shell access only,"
+echo "users do not need to belong to any additional groups as standard,"
+echo "so you may press ENTER at the next prompt."
+echo
+needinput=yes
+while [ ! -z "$needinput" ]; do
+ history -c
+ history -s "$AGID"
+ echo "Press ENTER to continue without adding any additional groups"
+ echo "Or press the UP arrow key to add/select/edit additional groups"
+ AGID="$(get_input ": " | sed 's/[^A-Za-z0-9 _]//g;s/ */ /g;s/^ $//g' )"
+ if [ ! -z "$AGID" ]; then
+ check_group "$AGID" # check all groups at once (treated as N # of params)
+ if [ $? -gt 0 ]; then
+ echo "- Please re-enter the group(s)"
+ echo
+ else
+ unset needinput # we found all groups specified
+ AGID="-G $(echo $AGID | tr ' ' ,)" # useradd takes comma delimited groups
+ fi
+ else
+ unset needinput # we don't *have* to have additional groups
+ fi
+done
+
+#: Get the new user's home dir :#
+#
+echo
+needinput=yes
+while [ ! -z "$needinput" ]; do
+ HME="$(get_input "Home directory [ ${defhome}/${LOGIN} ]")"
+ if [ -z "$HME" ]; then
+ HME="${defhome}/${LOGIN}"
+ fi
+ # Warn the user if the home dir already exists
+ if [ -d "$HME" ]; then
+ echo "- Warning: '$HME' already exists !"
+ getyn="$(get_input " Do you wish to change the home directory path ? (Y/n) ")"
+ if [ "$(echo $getyn | grep -i "n")" ]; then
+ unset needinput
+ # You're most likely going to only do this if you have the dir *mounted* for this user's $HOME
+ getyn="$(get_input " Do you want to chown $LOGIN.$( echo $GID | awk '{print $2}') $HME ? (y/N) ")"
+ if [ "$(echo $getyn | grep -i "y")" ]; then
+ CHOWNHOMEDIR=$HME # set this to the home directory
+ fi
+ fi
+ else
+ unset needinput
+ fi
+done
+HME="-d ${HME}"
+
+#: Get the new user's shell :#
+echo
+needinput=yes
+while [ ! -z "$needinput" ]; do
+ unset got_error
+ SHL="$(get_input "Shell [ ${defshell} ]")"
+ if [ -z "$SHL" ]; then
+ SHL="${defshell}"
+ fi
+ # Warn the user if the shell doesn't exist in /etc/shells or as a file
+ if [ -z "$(grep "^${SHL}$" $sfile)" ]; then
+ echo "- Warning: ${SHL} is not in ${sfile} (potential problem using FTP)"
+ got_error=yes
+ fi
+ if [ ! -f "$SHL" ]; then
+ echo "- Warning: ${SHL} does not exist as a file"
+ got_error=yes
+ fi
+ if [ ! -z "$got_error" ]; then
+ getyn="$(get_input " Do you wish to change the shell ? (Y/n) ")"
+ if [ "$(echo $getyn | grep -i "n")" ]; then
+ unset needinput
+ fi
+ else
+ unset needinput
+ fi
+done
+SHL="-s ${SHL}"
+
+#: Get the expiry date :#
+echo
+needinput=yes
+while [ ! -z "$needinput" ]; do
+ EXP="$(get_input "Expiry date (YYYY-MM-DD) []:")"
+ if [ ! -z "$EXP" ]; then
+ # Check to see whether the expiry date is in the valid format
+ if [ -z "$(echo "$EXP" | grep "^[[:digit:]]\{4\}[-]\?[[:digit:]]\{2\}[-]\?[[:digit:]]\{2\}$")" ]; then
+ echo "- That is not a valid expiration date"
+ else
+ unset needinput
+ EXP="-e ${EXP}"
+ fi
+ else
+ unset needinput
+ fi
+done
+
+# Display the info about the new impending account
+echo
+echo "New account will be created as follows:"
+echo
+echo "---------------------------------------"
+display "Login name.......: " "$LOGIN"
+display "UID..............: " "$_UID" "[ Next available ]"
+display "Initial group....: " "$GID"
+display "Additional groups: " "$AGID" "[ None ]"
+display "Home directory...: " "$HME"
+display "Shell............: " "$SHL"
+display "Expiry date......: " "$EXP" "[ Never ]"
+echo
+
+echo "This is it... if you want to bail out, hit Control-C. Otherwise, press"
+echo "ENTER to go ahead and make the account."
+read junk
+
+echo
+echo "Creating new account..."
+echo
+echo
+
+# Add the account to the system
+CMD="$useradd "$HME" -m "$EXP" "$U_ID" "$GID" "$AGID" "$SHL" "$LOGIN""
+$CMD
+
+if [ $? -gt 0 ]; then
+ echo "- Error running useradd command -- account not created!"
+ echo "(cmd: $CMD)"
+ exit 1
+fi
+
+# chown the home dir ? We can only do this once the useradd has
+# completed otherwise the user name doesn't exist.
+if [ ! -z "${CHOWNHOMEDIR}" ]; then
+ chown "$LOGIN"."$( echo $GID | awk '{print $2}')" "${CHOWNHOMEDIR}"
+fi
+
+# Set the finger information
+$chfn "$LOGIN"
+if [ $? -gt 0 ]; then
+ echo "- Warning: an error occurred while setting finger information"
+fi
+
+# Set a password
+$passwd "$LOGIN"
+if [ $? -gt 0 ]; then
+ echo "* WARNING: An error occured while setting the password for"
+ echo " this account. Please manually investigate this *"
+ exit 1
+fi
+
+# If it was created (it should have been!), set the permissions for that user's dir
+HME="$(echo "$HME" | awk '{print $2}')" # We have to remove the -g prefix
+if [ -d "$HME" ]; then
+ $chmod $defchmod "$HME"
+fi
+
+echo
+echo
+echo "Account setup complete."
+exit 0
diff --git a/patches/source/shadow/doinst.sh b/patches/source/shadow/doinst.sh
new file mode 100644
index 000000000..88fefb3af
--- /dev/null
+++ b/patches/source/shadow/doinst.sh
@@ -0,0 +1,17 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/login.access.new
+config etc/login.defs.new
+config var/log/faillog.new
+rm -f var/log/faillog.new
+
diff --git a/patches/source/shadow/login.defs b/patches/source/shadow/login.defs
new file mode 100644
index 000000000..e52f91a53
--- /dev/null
+++ b/patches/source/shadow/login.defs
@@ -0,0 +1,389 @@
+#
+# /etc/login.defs - Configuration control definitions for the shadow package.
+#
+# $Id: login.defs 3038 2009-07-23 20:41:35Z nekral-guest $
+#
+
+#
+# Delay in seconds before being allowed another attempt after a login failure
+#
+FAIL_DELAY 3
+
+#
+# Enable logging and display of /var/log/faillog login failure info.
+#
+FAILLOG_ENAB yes
+
+#
+# Enable display of unknown usernames when login failures are recorded.
+#
+LOG_UNKFAIL_ENAB no
+
+#
+# Enable logging of successful logins
+#
+LOG_OK_LOGINS no
+
+#
+# Enable logging and display of /var/log/lastlog login time info.
+#
+LASTLOG_ENAB yes
+
+#
+# Enable checking and display of mailbox status upon login.
+#
+# Disable if the shell startup files already check for mail
+# ("mailx -e" or equivalent).
+#
+MAIL_CHECK_ENAB yes
+
+#
+# Enable additional checks upon password changes.
+#
+OBSCURE_CHECKS_ENAB yes
+
+#
+# Enable checking of time restrictions specified in /etc/porttime.
+#
+PORTTIME_CHECKS_ENAB yes
+
+#
+# Enable setting of ulimit, umask, and niceness from passwd gecos field.
+#
+QUOTAS_ENAB yes
+
+#
+# Enable "syslog" logging of su activity - in addition to sulog file logging.
+# SYSLOG_SG_ENAB does the same for newgrp and sg.
+#
+SYSLOG_SU_ENAB yes
+SYSLOG_SG_ENAB yes
+
+#
+# If defined, either full pathname of a file containing device names or
+# a ":" delimited list of device names. Root logins will be allowed only
+# upon these devices.
+#
+CONSOLE /etc/securetty
+#CONSOLE console:tty01:tty02:tty03:tty04
+
+#
+# If defined, all su activity is logged to this file.
+#
+#SULOG_FILE /var/log/sulog
+
+#
+# If defined, ":" delimited list of "message of the day" files to
+# be displayed upon login.
+#
+MOTD_FILE /etc/motd
+#MOTD_FILE /etc/motd:/usr/lib/news/news-motd
+
+#
+# If defined, this file will be output before each login prompt.
+#
+#ISSUE_FILE /etc/issue
+
+#
+# If defined, file which maps tty line to TERM environment parameter.
+# Each line of the file is in a format something like "vt100 tty01".
+#
+#TTYTYPE_FILE /etc/ttytype
+
+#
+# If defined, login failures will be logged here in a utmp format.
+# last, when invoked as lastb, will read /var/log/btmp, so...
+#
+FTMP_FILE /var/log/btmp
+
+#
+# If defined, name of file whose presence which will inhibit non-root
+# logins. The contents of this file should be a message indicating
+# why logins are inhibited.
+#
+NOLOGINS_FILE /etc/nologin
+
+#
+# If defined, the command name to display when running "su -". For
+# example, if this is defined as "su" then a "ps" will display the
+# command is "-su". If not defined, then "ps" would display the
+# name of the shell actually being run, e.g. something like "-sh".
+#
+SU_NAME su
+
+#
+# *REQUIRED*
+# Directory where mailboxes reside, _or_ name of file, relative to the
+# home directory. If you _do_ define both, MAIL_DIR takes precedence.
+#
+MAIL_DIR /var/spool/mail
+#MAIL_FILE .mail
+
+#
+# If defined, file which inhibits all the usual chatter during the login
+# sequence. If a full pathname, then hushed mode will be enabled if the
+# user's name or shell are found in the file. If not a full pathname, then
+# hushed mode will be enabled if the file exists in the user's home directory.
+#
+HUSHLOGIN_FILE .hushlogin
+#HUSHLOGIN_FILE /etc/hushlogins
+
+#
+# If defined, either a TZ environment parameter spec or the
+# fully-rooted pathname of a file containing such a spec.
+#
+#ENV_TZ TZ=CST6CDT
+#ENV_TZ /etc/tzname
+
+#
+# If defined, an HZ environment parameter spec.
+#
+# for Linux/x86
+ENV_HZ HZ=100
+# For Linux/Alpha...
+#ENV_HZ HZ=1024
+
+#
+# *REQUIRED* The default PATH settings, for superuser and normal users.
+#
+# (they are minimal, add the rest in the shell startup files)
+ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin
+ENV_PATH PATH=/usr/local/bin:/bin:/usr/bin
+
+#
+# Terminal permissions
+#
+# TTYGROUP Login tty will be assigned this group ownership.
+# TTYPERM Login tty will be set to this permission.
+#
+# If you have a "write" program which is "setgid" to a special group
+# which owns the terminals, define TTYGROUP to the group number and
+# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign
+# TTYPERM to either 622 or 600.
+#
+TTYGROUP tty
+TTYPERM 0620
+
+#
+# Login configuration initializations:
+#
+# ERASECHAR Terminal ERASE character ('\010' = backspace).
+# KILLCHAR Terminal KILL character ('\025' = CTRL/U).
+# ULIMIT Default "ulimit" value.
+#
+# The ERASECHAR and KILLCHAR are used only on System V machines.
+# The ULIMIT is used only if the system supports it.
+# (now it works with setrlimit too; ulimit is in 512-byte units)
+#
+# Prefix these values with "0" to get octal, "0x" to get hexadecimal.
+#
+ERASECHAR 0177
+KILLCHAR 025
+#ULIMIT 2097152
+
+# Default initial "umask" value.
+# UMASK is also used by useradd and newusers to set the mode of new home
+# directories.
+# 022 is the default value, but 027, or even 077, could be considered
+# better for privacy. There is no One True Answer here: each sysadmin
+# must make up her mind.
+UMASK 022
+
+#
+# Password aging controls:
+#
+# PASS_MAX_DAYS Maximum number of days a password may be used.
+# PASS_MIN_DAYS Minimum number of days allowed between password changes.
+# PASS_MIN_LEN Minimum acceptable password length.
+# PASS_WARN_AGE Number of days warning given before a password expires.
+#
+PASS_MAX_DAYS 99999
+PASS_MIN_DAYS 0
+PASS_MIN_LEN 5
+PASS_WARN_AGE 7
+
+#
+# If "yes", the user must be listed as a member of the first gid 0 group
+# in /etc/group (called "root" on most Linux systems) to be able to "su"
+# to uid 0 accounts. If the group doesn't exist or is empty, no one
+# will be able to "su" to uid 0.
+#
+SU_WHEEL_ONLY no
+
+#
+# If compiled with cracklib support, where are the dictionaries
+#
+#CRACKLIB_DICTPATH /var/cache/cracklib/cracklib_dict
+
+#
+# Min/max values for automatic uid selection in useradd
+#
+UID_MIN 1000
+UID_MAX 60000
+# System accounts
+SYS_UID_MIN 101
+SYS_UID_MAX 999
+
+#
+# Min/max values for automatic gid selection in groupadd
+#
+GID_MIN 1000
+GID_MAX 60000
+# System accounts
+SYS_GID_MIN 101
+SYS_GID_MAX 999
+
+#
+# Max number of login retries if password is bad
+#
+LOGIN_RETRIES 5
+
+#
+# Max time in seconds for login
+#
+LOGIN_TIMEOUT 60
+
+#
+# Maximum number of attempts to change password if rejected (too easy)
+#
+PASS_CHANGE_TRIES 5
+
+#
+# Warn about weak passwords (but still allow them) if you are root.
+#
+PASS_ALWAYS_WARN yes
+
+#
+# Number of significant characters in the password for crypt().
+# Default is 8, don't change unless your crypt() is better.
+# Ignored if MD5_CRYPT_ENAB set to "yes".
+#
+#PASS_MAX_LEN 8
+
+#
+# Require password before chfn/chsh can make any changes.
+#
+CHFN_AUTH yes
+
+#
+# Which fields may be changed by regular users using chfn - use
+# any combination of letters "frwh" (full name, room number, work
+# phone, home phone). If not defined, no changes are allowed.
+# For backward compatibility, "yes" = "rwh" and "no" = "frwh".
+#
+CHFN_RESTRICT frwh
+
+#
+# Password prompt (%s will be replaced by user name).
+#
+# XXX - it doesn't work correctly yet, for now leave it commented out
+# to use the default which is just "Password: ".
+#LOGIN_STRING "%s's Password: "
+
+#
+# Only works if compiled with MD5_CRYPT defined:
+# If set to "yes", new passwords will be encrypted using the MD5-based
+# algorithm compatible with the one used by recent releases of FreeBSD.
+# It supports passwords of unlimited length and longer salt strings.
+# Set to "no" if you need to copy encrypted passwords to other systems
+# which don't understand the new algorithm. Default is "no".
+#
+# This variable is deprecated. You should use ENCRYPT_METHOD.
+#
+#MD5_CRYPT_ENAB no
+
+#
+# Only works if compiled with ENCRYPTMETHOD_SELECT defined:
+# If set to MD5 , MD5-based algorithm will be used for encrypting password
+# If set to SHA256, SHA256-based algorithm will be used for encrypting password
+# If set to SHA512, SHA512-based algorithm will be used for encrypting password
+# If set to DES, DES-based algorithm will be used for encrypting password (default)
+# Overrides the MD5_CRYPT_ENAB option
+#
+ENCRYPT_METHOD SHA256
+
+#
+# Only works if ENCRYPT_METHOD is set to SHA256 or SHA512.
+#
+# Define the number of SHA rounds.
+# With a lot of rounds, it is more difficult to brute forcing the password.
+# But note also that it more CPU resources will be needed to authenticate
+# users.
+#
+# If not specified, the libc will choose the default number of rounds (5000).
+# The values must be inside the 1000-999999999 range.
+# If only one of the MIN or MAX values is set, then this value will be used.
+# If MIN > MAX, the highest value will be used.
+#
+# SHA_CRYPT_MIN_ROUNDS 5000
+# SHA_CRYPT_MAX_ROUNDS 5000
+
+#
+# List of groups to add to the user's supplementary group set
+# when logging in on the console (as determined by the CONSOLE
+# setting). Default is none.
+#
+# Use with caution - it is possible for users to gain permanent
+# access to these groups, even when not logged in on the console.
+# How to do it is left as an exercise for the reader...
+#
+# Most of these groups are self-explanatory, but in the case of
+# "lp", it is because group lp is needed to use a scanner that
+# is part of a multifunction printer.
+#
+# Note that users are added to these default groups only when
+# logging into a shell with /bin/login, not when using a login
+# manager such as kdm. In that case, users who should have
+# hardware access must be added to the appropriate groups
+# when the user is added with adduser or useradd, or by editing
+# /etc/group directly, preferably using "vigr"
+#
+CONSOLE_GROUPS floppy:audio:cdrom:video:lp:scanner
+
+#
+# Should login be allowed if we can't cd to the home directory?
+# Default in no.
+#
+DEFAULT_HOME yes
+
+#
+# If this file exists and is readable, login environment will be
+# read from it. Every line should be in the form name=value.
+#
+ENVIRON_FILE /etc/environment
+
+#
+# If defined, this command is run when removing a user.
+# It should remove any at/cron/print jobs etc. owned by
+# the user to be removed (passed as the first argument).
+#
+#USERDEL_CMD /usr/sbin/userdel_local
+
+#
+# Enable setting of the umask group bits to be the same as owner bits
+# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is
+# the same as gid, and username is the same as the primary group name.
+#
+# This also enables userdel to remove user groups if no members exist.
+#
+USERGROUPS_ENAB yes
+
+#
+# If set to a non-nul number, the shadow utilities will make sure that
+# groups never have more than this number of users on one line.
+# This permit to support split groups (groups split into multiple lines,
+# with the same group ID, to avoid limitation of the line length in the
+# group file).
+#
+# 0 is the default value and disables this feature.
+#
+#MAX_MEMBERS_PER_GROUP 0
+
+#
+# If useradd should create home directories for users by default (non
+# system users only)
+# This option is overridden with the -M or -m flags on the useradd command
+# line.
+#
+#CREATE_HOME yes
+
diff --git a/patches/source/shadow/patches/README_PATCHES b/patches/source/shadow/patches/README_PATCHES
new file mode 100644
index 000000000..1d1f2173a
--- /dev/null
+++ b/patches/source/shadow/patches/README_PATCHES
@@ -0,0 +1,10 @@
+
+r3054.diff: Fixed wrong format string
+r3055.diff: Help output to stderr not stdout.
+r3060.diff: Fix memory leaks
+r3062.diff: Avoid memzero() on a possibly NULL pointer.
+r3096.diff: Fix parsing of gshadow entries.
+r3090.diff: Fix improper sanitizing of locale variables.
+r3160.diff: Fixed limits support (non PAM enabled versions only)
+r3194.diff: shell's name must be -su when a su fakes a login.
+r3299.diff: man/ru/Makefile.am: Remove double inclusion of $(man_nopam)
diff --git a/patches/source/shadow/patches/unused/r3299.diff b/patches/source/shadow/patches/unused/r3299.diff
new file mode 100644
index 000000000..a46b18f05
--- /dev/null
+++ b/patches/source/shadow/patches/unused/r3299.diff
@@ -0,0 +1,12 @@
+Index: man/ru/Makefile.am
+===================================================================
+--- man/ru/Makefile.am (revision 3298)
++++ man/ru/Makefile.am (revision 3299)
+@@ -1,7 +1,6 @@
+ mandir = @mandir@/ru
+
+ man_MANS = \
+- $(man_nopam) \
+ chage.1 \
+ chfn.1 \
+ chgpasswd.8 \
diff --git a/patches/source/shadow/shadow.CVE-2005-4890.relax.diff b/patches/source/shadow/shadow.CVE-2005-4890.relax.diff
new file mode 100644
index 000000000..98425e16a
--- /dev/null
+++ b/patches/source/shadow/shadow.CVE-2005-4890.relax.diff
@@ -0,0 +1,35 @@
+From 0f6a809b7c4c9a8f4adb5b25808dd68000e17aa2 Mon Sep 17 00:00:00 2001
+From: mancha <mancha1@hush.com>
+Date: Wed, 04 Dec 2013
+Subject: restrict "su -c" only when callee is not root
+
+Shadow 4.1.5 addressed a tty-hijacking vulnerability in "su -c"
+(CVE-2005-4890) by detaching the controlling terminal in the non-PAM
+case via a TIOCNOTTY request.
+
+Bi-directional protection is excessive and breaks a commonly-used
+methods for privilege escalation on non-PAM systems (e.g. xterm -e
+/bin/su -s /bin/bash -c /bin/bash myscript).
+
+This patch relaxes the restriction and only detaches the controlling
+tty when the callee is not root (which is, after all, the threat vector).
+
+---
+ src/su.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/src/su.c
++++ b/src/su.c
+@@ -1076,10 +1076,10 @@ int main (int argc, char **argv)
+
+ set_environment (pw);
+
+- if (!doshell) {
++ if (!doshell && pw->pw_uid != 0) {
+ /* There is no need for a controlling terminal.
+ * This avoids the callee to inject commands on
+- * the caller's tty. */
++ * the caller's tty when the callee is not root. */
+ int err = -1;
+
+ #ifdef USE_PAM
diff --git a/patches/source/shadow/shadow.SlackBuild b/patches/source/shadow/shadow.SlackBuild
new file mode 100755
index 000000000..e5143b8d4
--- /dev/null
+++ b/patches/source/shadow/shadow.SlackBuild
@@ -0,0 +1,175 @@
+#!/bin/sh
+
+# Copyright 2005-2014 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=shadow
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-3_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:--j6}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-shadow
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf shadow-$VERSION
+tar xvf $CWD/shadow-$VERSION.tar.?z* || exit 1
+cd shadow-$VERSION
+
+# Apply some patches taken from the svn trunk that
+# fix some of the more serious bugs in 4.1.4.3:
+for patch in $CWD/patches/*.diff.gz ; do
+ zcat $patch | patch -p0 --verbose || exit 1
+done
+
+# Patch to handle newer crypt() that may return NULL:
+zcat $CWD/shadow.glibc217-crypt.diff.gz | patch -p1 --verbose || exit 1
+
+# Relax the restrictions on "su -c" when it is used to become root.
+# It's not likely that root is going to try to inject commands back into
+# the user's shell to hack it, and the unnecessary restriction is causing
+# breakage:
+zcat $CWD/shadow.CVE-2005-4890.relax.diff.gz | patch -p1 --verbose || exit 1
+
+# Re-run automake because of r3299 patch to man/ru/Makefile.am:
+# (not used because it doesn't work... above patch does the intended fix)
+#automake -f
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/shadow-$VERSION \
+ --disable-shared \
+ --without-libcrack \
+ --build=$ARCH-slackware-linux
+
+# --enable-utmpx # defaults to 'no'
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Fix user group = 100:
+zcat $CWD/useradd.gz > $PKG/etc/default/useradd
+
+# /bin/groups is provided by coreutils.
+rm -f $PKG/bin/groups
+find $PKG -name groups.1 -exec rm {} \;
+
+# Install a login.defs with unsurprising defaults:
+rm -f $PKG/etc/login.defs
+zcat $CWD/login.defs.gz > $PKG/etc/login.defs.new
+
+mv $PKG/etc/login.access $PKG/etc/login.access.new
+
+# I don't think this works well enough to recommend it.
+#mv $PKG/etc/limits $PKG/etc/limits.new
+rm -f $PKG/etc/limits
+
+# Add the friendly 'adduser' script:
+cat $CWD/adduser > $PKG/usr/sbin/adduser
+chmod 0755 $PKG/usr/sbin/adduser
+
+# Add sulogin to the package:
+cp -a src/sulogin $PKG/sbin
+( cd $PKG/bin ; ln -s ../sbin/sulogin )
+
+# Add the empty faillog log file:
+mkdir -p $PKG/var/log
+touch $PKG/var/log/faillog.new
+
+# Put some stuff back in "old" locations and make symlinks for compat
+( cd $PKG/usr/bin
+ mv faillog ../sbin
+ mv lastlog ../sbin
+ ln -s ../sbin/faillog
+ ln -s ../sbin/lastlog
+)
+
+# Use 4711 rather than 4755 permissions where setuid root is required:
+find $PKG -type f -perm 4755 -exec chmod 4711 "{}" \;
+
+# Compress and if needed symlink the man pages:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+mkdir -p $PKG/usr/doc/shadow-$VERSION
+cp -a \
+ COPYING* NEWS README* TODO doc/{README*,HOWTO,WISHLIST,*.txt} \
+ $PKG/usr/doc/shadow-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/shadow-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/shadow/shadow.glibc217-crypt.diff b/patches/source/shadow/shadow.glibc217-crypt.diff
new file mode 100644
index 000000000..e26ca10bb
--- /dev/null
+++ b/patches/source/shadow/shadow.glibc217-crypt.diff
@@ -0,0 +1,258 @@
+From a616a72160c17fa193ad6ad95eb2c869633f4fe9 Mon Sep 17 00:00:00 2001
+From: mancha <mancha1@hush.com>
+Date: Fri, 4 Oct 2013 11:25:43
+Subject: [PATCH] Improve handling of NULL returns from crypt().
+
+Signed-off-by: mancha <mancha1@hush.com>
+---
+ ChangeLog | 15 +++++++++++++++
+ lib/encrypt.c | 7 +++----
+ lib/pwauth.c | 7 ++++++-
+ libmisc/valid.c | 1 +
+ src/chgpasswd.c | 4 ++++
+ src/chpasswd.c | 4 ++++
+ src/gpasswd.c | 4 ++++
+ src/newgrp.c | 3 ++-
+ src/newusers.c | 26 +++++++++++++++++++++-----
+ src/passwd.c | 15 +++++++++++++++
+ 10 files changed, 75 insertions(+), 11 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index aab00ae..1416a38 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,18 @@
++2013-05-06 mancha <mancha1@hush.com>
++
++ * lib/encrypt.c: crypt() in glibc/eglibc 2.17 now fails if passed
++ a salt that violates specs. On Linux, crypt() also fails with
++ DES/MD5 salts in FIPS140 mode. Rather than exit() on NULL returns
++ we send them back to the caller for appropriate handling.
++ * lib/pwauth.c: Handle NULL return from crypt().
++ * libmisc/valid.c: Likewise.
++ * src/chgpasswd.c: Likewise.
++ * src/chpasswd.c: Likewise.
++ * src/gpasswd.c: Likewise.
++ * src/newgrp.c: Likewise.
++ * src/newusers.c: Likewise.
++ * src/passwd.c: Likewise.
++
+ 2012-05-25 Nicolas François <nicolas.francois@centraliens.net>
+
+ * NEWS: Set release date.
+diff --git a/lib/encrypt.c b/lib/encrypt.c
+index 7daa8da..49cb691 100644
+--- a/lib/encrypt.c
++++ b/lib/encrypt.c
+@@ -49,11 +49,10 @@
+ if (!cp) {
+ /*
+ * Single Unix Spec: crypt() may return a null pointer,
+- * and set errno to indicate an error. The caller doesn't
+- * expect us to return NULL, so...
++ * and set errno to indicate an error. In this case return
++ * the NULL so the caller can handle appropriately.
+ */
+- perror ("crypt");
+- exit (EXIT_FAILURE);
++ return cp;
+ }
+
+ /* The GNU crypt does not return NULL if the algorithm is not
+diff --git a/lib/pwauth.c b/lib/pwauth.c
+index 4b26daa..086a72e 100644
+--- a/lib/pwauth.c
++++ b/lib/pwauth.c
+@@ -73,6 +73,7 @@ int pw_auth (const char *cipher,
+ char prompt[1024];
+ char *clear = NULL;
+ const char *cp;
++ const char *encrypted;
+ int retval;
+
+ #ifdef SKEY
+@@ -177,7 +178,11 @@ int pw_auth (const char *cipher,
+ * the results there as well.
+ */
+
+- retval = strcmp (pw_encrypt (input, cipher), cipher);
++ encrypted = pw_encrypt (input, cipher);
++ if (encrypted!=NULL)
++ retval = strcmp (encrypted, cipher);
++ else
++ retval = -1;
+
+ #ifdef SKEY
+ /*
+diff --git a/libmisc/valid.c b/libmisc/valid.c
+index aa0390a..4b85d67 100644
+--- a/libmisc/valid.c
++++ b/libmisc/valid.c
+@@ -95,6 +95,7 @@ bool valid (const char *password, const struct passwd *ent)
+ */
+
+ if ( (NULL != ent->pw_name)
++ && (NULL != encrypted)
+ && (strcmp (encrypted, ent->pw_passwd) == 0)) {
+ return true;
+ } else {
+diff --git a/src/chgpasswd.c b/src/chgpasswd.c
+index 0f41d0b..6c42a09 100644
+--- a/src/chgpasswd.c
++++ b/src/chgpasswd.c
+@@ -469,6 +469,10 @@ int main (int argc, char **argv)
+ #endif
+ cp = pw_encrypt (newpwd,
+ crypt_make_salt (crypt_method, arg));
++ if (cp == NULL) {
++ perror ("crypt");
++ exit (EXIT_FAILURE);
++ }
+ }
+
+ /*
+diff --git a/src/chpasswd.c b/src/chpasswd.c
+index 928e2d7..4968b0d 100644
+--- a/src/chpasswd.c
++++ b/src/chpasswd.c
+@@ -492,6 +492,10 @@ int main (int argc, char **argv)
+ #endif
+ cp = pw_encrypt (newpwd,
+ crypt_make_salt(crypt_method, arg));
++ if (cp == NULL) {
++ perror ("crypt");
++ exit (EXIT_FAILURE);
++ }
+ }
+
+ /*
+diff --git a/src/gpasswd.c b/src/gpasswd.c
+index df8d714..0043610 100644
+--- a/src/gpasswd.c
++++ b/src/gpasswd.c
+@@ -939,6 +939,10 @@ static void change_passwd (struct group *gr)
+ }
+
+ cp = pw_encrypt (pass, crypt_make_salt (NULL, NULL));
++ if (cp==NULL) {
++ perror ("crypt");
++ exit (EXIT_FAILURE);
++ }
+ memzero (pass, sizeof pass);
+ #ifdef SHADOWGRP
+ if (is_shadowgrp) {
+diff --git a/src/newgrp.c b/src/newgrp.c
+index 9330c72..6b87761 100644
+--- a/src/newgrp.c
++++ b/src/newgrp.c
+@@ -184,7 +184,8 @@ static void check_perms (const struct group *grp,
+ cpasswd = pw_encrypt (cp, grp->gr_passwd);
+ strzero (cp);
+
+- if (grp->gr_passwd[0] == '\0' ||
++ if (cpasswd == NULL ||
++ grp->gr_passwd[0] == '\0' ||
+ strcmp (cpasswd, grp->gr_passwd) != 0) {
+ #ifdef WITH_AUDIT
+ snprintf (audit_buf, sizeof(audit_buf),
+diff --git a/src/newusers.c b/src/newusers.c
+index 994898e..5f83a6a 100644
+--- a/src/newusers.c
++++ b/src/newusers.c
+@@ -387,6 +387,7 @@ static int add_user (const char *name, uid_t uid, gid_t gid)
+ static void update_passwd (struct passwd *pwd, const char *password)
+ {
+ void *crypt_arg = NULL;
++ char *cp;
+ if (crypt_method != NULL) {
+ #ifdef USE_SHA_CRYPT
+ if (sflg) {
+@@ -398,9 +399,13 @@ static void update_passwd (struct passwd *pwd, const char *password)
+ if ((crypt_method != NULL) && (0 == strcmp(crypt_method, "NONE"))) {
+ pwd->pw_passwd = (char *)password;
+ } else {
+- pwd->pw_passwd = pw_encrypt (password,
+- crypt_make_salt (crypt_method,
+- crypt_arg));
++ cp=pw_encrypt (password, crypt_make_salt (crypt_method,
++ crypt_arg));
++ if (cp == NULL) {
++ perror ("crypt");
++ exit (EXIT_FAILURE);
++ }
++ pwd->pw_passwd = cp;
+ }
+ }
+ #endif /* !USE_PAM */
+@@ -412,6 +417,7 @@ static int add_passwd (struct passwd *pwd, const char *password)
+ {
+ const struct spwd *sp;
+ struct spwd spent;
++ char *cp;
+
+ #ifndef USE_PAM
+ void *crypt_arg = NULL;
+@@ -448,7 +454,12 @@ static int add_passwd (struct passwd *pwd, const char *password)
+ } else {
+ const char *salt = crypt_make_salt (crypt_method,
+ crypt_arg);
+- spent.sp_pwdp = pw_encrypt (password, salt);
++ cp = pw_encrypt (password, salt);
++ if (cp == NULL) {
++ perror ("crypt");
++ exit (EXIT_FAILURE);
++ }
++ spent.sp_pwdp = cp;
+ }
+ spent.sp_lstchg = (long) time ((time_t *) 0) / SCALE;
+ if (0 == spent.sp_lstchg) {
+@@ -492,7 +503,12 @@ static int add_passwd (struct passwd *pwd, const char *password)
+ spent.sp_pwdp = (char *)password;
+ } else {
+ const char *salt = crypt_make_salt (crypt_method, crypt_arg);
+- spent.sp_pwdp = pw_encrypt (password, salt);
++ cp = pw_encrypt (password, salt);
++ if (cp == NULL) {
++ perror ("crypt");
++ exit (EXIT_FAILURE);
++ }
++ spent.sp_pwdp = cp;
+ }
+ #else
+ /*
+diff --git a/src/passwd.c b/src/passwd.c
+index ac90aa3..ae26666 100644
+--- a/src/passwd.c
++++ b/src/passwd.c
+@@ -242,6 +242,17 @@ static int new_password (const struct pa
+ }
+
+ cipher = pw_encrypt (clear, crypt_passwd);
++ if (cipher == NULL) {
++ strzero (clear);
++ (void) fprintf (stderr,
++ _("Failed to crypt password for %s.\n"),
++ pw->pw_name);
++ SYSLOG ((LOG_INFO,
++ "failed to crypt password for %s",
++ pw->pw_name));
++ return -1;
++ }
++
+ if (strcmp (cipher, crypt_passwd) != 0) {
+ strzero (clear);
+ strzero (cipher);
+@@ -349,6 +360,10 @@ static int new_password (const struct pa
+ * Encrypt the password, then wipe the cleartext password.
+ */
+ cp = pw_encrypt (pass, crypt_make_salt (NULL, NULL));
++ if (cp == NULL) {
++ perror ("crypt");
++ exit (EXIT_FAILURE);
++ }
+ memzero (pass, sizeof pass);
+
+ #ifdef HAVE_LIBCRACK_HIST
+--
+1.7.11.4
+
diff --git a/patches/source/shadow/shadow.url b/patches/source/shadow/shadow.url
new file mode 100644
index 000000000..b18864a85
--- /dev/null
+++ b/patches/source/shadow/shadow.url
@@ -0,0 +1 @@
+ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow
diff --git a/patches/source/shadow/slack-desc b/patches/source/shadow/slack-desc
new file mode 100644
index 000000000..57749146e
--- /dev/null
+++ b/patches/source/shadow/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+shadow: shadow (shadow password suite)
+shadow:
+shadow: This set of login related programs utilizes an alternate, non-readable
+shadow: file to contain the actual encrypted passwords. This is presumed to
+shadow: increase system security by increasing the difficulty with which
+shadow: system crackers obtain encrypted passwords. It was written by
+shadow: Julianne Frances Haugh and the Linux port is maintained by Tomasz
+shadow: Kloczko.
+shadow:
+shadow: This package provides 'login', which is needed to log into the system.
+shadow:
diff --git a/patches/source/shadow/useradd b/patches/source/shadow/useradd
new file mode 100644
index 000000000..f3205e496
--- /dev/null
+++ b/patches/source/shadow/useradd
@@ -0,0 +1,8 @@
+# useradd defaults file
+GROUP=100
+HOME=/home
+INACTIVE=-1
+EXPIRE=
+SHELL=/bin/bash
+SKEL=/etc/skel
+CREATE_MAIL_SPOOL=yes
diff --git a/patches/source/stunnel/doinst.sh b/patches/source/stunnel/doinst.sh
new file mode 100644
index 000000000..21f004b02
--- /dev/null
+++ b/patches/source/stunnel/doinst.sh
@@ -0,0 +1,12 @@
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+config etc/stunnel/openssl.cnf.new
diff --git a/patches/source/stunnel/generate-stunnel-key.sh b/patches/source/stunnel/generate-stunnel-key.sh
new file mode 100644
index 000000000..b24b4ba8a
--- /dev/null
+++ b/patches/source/stunnel/generate-stunnel-key.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+USE_DH=0
+
+openssl req -new -x509 -days 365 -nodes \
+ -config ./openssl.cnf -out stunnel.pem -keyout stunnel.pem
+
+test $USE_DH -eq 0 || openssl gendh >> stunnel.pem
+
+openssl x509 -subject -dates -fingerprint -noout \
+ -in stunnel.pem
+
+chmod 600 stunnel.pem
+rm -f stunnel.rnd
diff --git a/patches/source/stunnel/slack-desc b/patches/source/stunnel/slack-desc
new file mode 100644
index 000000000..f8ee5bc47
--- /dev/null
+++ b/patches/source/stunnel/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+stunnel: stunnel (Universal SSL tunnel)
+stunnel:
+stunnel: The stunnel program is designed to work as an SSL encryption wrapper
+stunnel: between remote client and local (inetd-startable) or remote servers.
+stunnel: The goal is to facilitate SSL encryption and authentication for
+stunnel: non-SSL-aware programs.
+stunnel:
+stunnel: stunnel can be used to add SSL functionality to commonly used inetd
+stunnel: daemons like POP-2, POP-3 and IMAP servers without any changes in the
+stunnel: programs' code.
+stunnel:
diff --git a/patches/source/stunnel/stunnel.SlackBuild b/patches/source/stunnel/stunnel.SlackBuild
new file mode 100755
index 000000000..31d893977
--- /dev/null
+++ b/patches/source/stunnel/stunnel.SlackBuild
@@ -0,0 +1,140 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=stunnel
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-2_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-stunnel
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf stunnel-$VERSION
+tar xvf $CWD/stunnel-$VERSION.tar.?z || exit 1
+cd stunnel-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --exec-prefix= \
+ --sysconfdir=/etc \
+ --datadir=/usr/share \
+ --mandir=/usr/man \
+ --sbindir=/usr/sbin \
+ --bindir=/usr/bin \
+ --localstatedir=/var \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+
+# This used to be installed in /usr/sbin, so it would probably be nice to
+# link from there:
+mkdir -p $PKG/usr/sbin
+( cd $PKG/usr/sbin
+ ln -sf ../bin/stunnel .
+ ln -sf ../bin/stunnel3 .
+)
+
+mkdir -p $PKG/var/run/stunnel
+# This will produce a useless key.
+make -i install DESTDIR=$PKG
+# Get rid of key, so nobody tries to use it:
+rm -f $PKG/etc/stunnel/stunnel.pem
+# Add cnf:
+cat tools/openssl.cnf > $PKG/etc/stunnel/openssl.cnf.new
+cat $CWD/generate-stunnel-key.sh > $PKG/etc/stunnel/generate-stunnel-key.sh
+chmod 755 $PKG/etc/stunnel/generate-stunnel-key.sh
+
+mkdir -p $PKG/usr/doc/stunnel-$VERSION
+mv $PKG/usr/share/doc/stunnel/* $PKG/usr/doc/stunnel-$VERSION
+rmdir $PKG/usr/share/doc/stunnel
+rmdir $PKG/usr/share/doc
+rmdir $PKG/usr/share
+
+mkdir -p $PKG/usr/man/pl/man8
+mv $PKG/usr/man/man8/stunnel.pl.8 $PKG/usr/man/pl/man8/stunnel.8
+mkdir -p $PKG/usr/man/fr/man8
+mv $PKG/usr/man/man8/stunnel.fr.8 $PKG/usr/man/fr/man8/stunnel.8
+gzip -9 $PKG/usr/man/*/man?/*.? $PKG/usr/man/man?/*.?
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# The 4.15 version of stunnel caused some bizarre perms, so
+# we'll protect against that:
+chmod 0755 $PKG/var/lib
+chown root:root $PKG/var/lib
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/stunnel-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/subversion/get-svn-book.sh b/patches/source/subversion/get-svn-book.sh
new file mode 100755
index 000000000..e88530d32
--- /dev/null
+++ b/patches/source/subversion/get-svn-book.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+CWD=`pwd`
+
+# Add the latest copy of the Subversion book:
+( cd $CWD
+ lftpget http://svnbook.red-bean.com/en/1.7/svn-book-html.tar.bz2
+ chmod 644 svn-book-html.tar.bz2
+)
+
diff --git a/patches/source/subversion/slack-desc b/patches/source/subversion/slack-desc
new file mode 100644
index 000000000..af2ef0b61
--- /dev/null
+++ b/patches/source/subversion/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+subversion: subversion (a version control system)
+subversion:
+subversion: Subversion is a version control system which allows you to keep old
+subversion: versions of files and directories (usually source code), and keep a
+subversion: log of who, when, and why changes occurred, similar to other such
+subversion: systems like CVS, RCS or SCCS. Subversion keeps all the information
+subversion: to permit extracting previous versions of those files at any time.
+subversion:
+subversion: For more information about the Subversion project, visit:
+subversion: http://subversion.apache.org
+subversion:
diff --git a/patches/source/subversion/subversion.CVE-2015-5343.diff b/patches/source/subversion/subversion.CVE-2015-5343.diff
new file mode 100644
index 000000000..59482aeec
--- /dev/null
+++ b/patches/source/subversion/subversion.CVE-2015-5343.diff
@@ -0,0 +1,16 @@
+--- ./subversion/mod_dav_svn/util.c.orig 2013-11-14 15:11:33.000000000 -0600
++++ ./subversion/mod_dav_svn/util.c 2016-04-05 13:02:22.610756129 -0500
+@@ -753,7 +753,12 @@
+
+ if (content_length)
+ {
+- buf = svn_stringbuf_create_ensure(content_length, pool);
++ /* Do not allocate more than 1 MB until we receive request body. */
++ apr_size_t alloc_len = 1 * 1024 *1024;
++ if (content_length < alloc_len)
++ alloc_len = (apr_size_t) content_length;
++
++ buf = svn_stringbuf_create_ensure(alloc_len, pool);
+ }
+ else
+ {
diff --git a/patches/source/subversion/subversion.CVE-2016-2167.diff b/patches/source/subversion/subversion.CVE-2016-2167.diff
new file mode 100644
index 000000000..891cc59aa
--- /dev/null
+++ b/patches/source/subversion/subversion.CVE-2016-2167.diff
@@ -0,0 +1,11 @@
+--- ./subversion/svnserve/cyrus_auth.c.orig 2014-01-26 22:04:31.000000000 -0600
++++ ./subversion/svnserve/cyrus_auth.c 2016-04-30 15:00:31.936038054 -0500
+@@ -73,6 +73,8 @@
+ {
+ /* The only valid realm is user_realm (i.e. the repository's realm).
+ If the user gave us another realm, complain. */
++ if (realm_len != inlen-(pos-in+1))
++ return SASL_BADPROT;
+ if (strncmp(pos+1, user_realm, inlen-(pos-in+1)) != 0)
+ return SASL_BADPROT;
+ }
diff --git a/patches/source/subversion/subversion.CVE-2016-2168.diff b/patches/source/subversion/subversion.CVE-2016-2168.diff
new file mode 100644
index 000000000..24741ca66
--- /dev/null
+++ b/patches/source/subversion/subversion.CVE-2016-2168.diff
@@ -0,0 +1,32 @@
+--- ./subversion/mod_authz_svn/mod_authz_svn.c.orig 2015-07-26 19:23:40.000000000 -0500
++++ ./subversion/mod_authz_svn/mod_authz_svn.c 2016-04-30 15:03:26.649048795 -0500
+@@ -415,6 +415,8 @@
+
+ if (r->method_number == M_MOVE || r->method_number == M_COPY)
+ {
++ apr_status_t status;
++
+ dest_uri = apr_table_get(r->headers_in, "Destination");
+
+ /* Decline MOVE or COPY when there is no Destination uri, this will
+@@ -423,7 +425,19 @@
+ if (!dest_uri)
+ return DECLINED;
+
+- apr_uri_parse(r->pool, dest_uri, &parsed_dest_uri);
++ status = apr_uri_parse(r->pool, dest_uri, &parsed_dest_uri);
++ if (status)
++ {
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
++ "Invalid URI in Destination header");
++ return HTTP_BAD_REQUEST;
++ }
++ if (!parsed_dest_uri.path)
++ {
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ "Invalid URI in Destination header");
++ return HTTP_BAD_REQUEST;
++ }
+
+ ap_unescape_url(parsed_dest_uri.path);
+ dest_uri = parsed_dest_uri.path;
diff --git a/patches/source/subversion/subversion.CVE-2017-9800.diff b/patches/source/subversion/subversion.CVE-2017-9800.diff
new file mode 100644
index 000000000..56562213a
--- /dev/null
+++ b/patches/source/subversion/subversion.CVE-2017-9800.diff
@@ -0,0 +1,105 @@
+Patch for Subversion 1.8.18 (works on 1.7.x with an offset)
+Index: subversion/libsvn_ra_svn/client.c
+===================================================================
+--- subversion/libsvn_ra_svn/client.c (revision 1803926)
++++ subversion/libsvn_ra_svn/client.c (working copy)
+@@ -46,6 +46,7 @@
+ #include "svn_props.h"
+ #include "svn_mergeinfo.h"
+ #include "svn_version.h"
++#include "svn_ctype.h"
+
+ #include "svn_private_config.h"
+
+@@ -395,7 +396,7 @@
+ * versions have it too. If the user is using some other ssh
+ * implementation that doesn't accept it, they can override it
+ * in the [tunnels] section of the config. */
+- val = "$SVN_SSH ssh -q";
++ val = "$SVN_SSH ssh -q --";
+ }
+
+ if (!val || !*val)
+@@ -435,7 +436,7 @@
+ ;
+ *argv = apr_palloc(pool, (n + 4) * sizeof(char *));
+ memcpy((void *) *argv, cmd_argv, n * sizeof(char *));
+- (*argv)[n++] = svn_path_uri_decode(hostinfo, pool);
++ (*argv)[n++] = hostinfo;
+ (*argv)[n++] = "svnserve";
+ (*argv)[n++] = "-t";
+ (*argv)[n] = NULL;
+@@ -716,7 +717,33 @@
+ }
+
+
++/* A simple whitelist to ensure the following are valid:
++ * user@server
++ * [::1]:22
++ * server-name
++ * server_name
++ * 127.0.0.1
++ * with an extra restriction that a leading '-' is invalid.
++ */
++static svn_boolean_t
++is_valid_hostinfo(const char *hostinfo)
++{
++ const char *p = hostinfo;
+
++ if (p[0] == '-')
++ return FALSE;
++
++ while (*p)
++ {
++ if (!svn_ctype_isalnum(*p) && !strchr(":.-_[]@", *p))
++ return FALSE;
++
++ ++p;
++ }
++
++ return TRUE;
++}
++
+ static svn_error_t *ra_svn_open(svn_ra_session_t *session,
+ const char **corrected_url,
+ const char *url,
+@@ -740,8 +767,17 @@
+ parse_tunnel(url, &tunnel, pool);
+
+ if (tunnel)
+- SVN_ERR(find_tunnel_agent(tunnel, uri.hostinfo, &tunnel_argv, config,
+- pool));
++ {
++ const char *decoded_hostinfo;
++
++ decoded_hostinfo = svn_path_uri_decode(uri.hostinfo, pool);
++ if (!is_valid_hostinfo(decoded_hostinfo))
++ return svn_error_createf(SVN_ERR_BAD_URL, NULL, _("Invalid host '%s'"),
++ uri.hostinfo);
++
++ SVN_ERR(find_tunnel_agent(tunnel, decoded_hostinfo, &tunnel_argv,
++ config, pool));
++ }
+ else
+ tunnel_argv = NULL;
+
+Index: subversion/libsvn_subr/config_file.c
+===================================================================
+--- subversion/libsvn_subr/config_file.c (revision 1803926)
++++ subversion/libsvn_subr/config_file.c (working copy)
+@@ -1134,12 +1134,12 @@
+ "### passed to the tunnel agent as <user>@<hostname>.) If the" NL
+ "### built-in ssh scheme were not predefined, it could be defined" NL
+ "### as:" NL
+- "# ssh = $SVN_SSH ssh -q" NL
++ "# ssh = $SVN_SSH ssh -q --" NL
+ "### If you wanted to define a new 'rsh' scheme, to be used with" NL
+ "### 'svn+rsh:' URLs, you could do so as follows:" NL
+- "# rsh = rsh" NL
++ "# rsh = rsh --" NL
+ "### Or, if you wanted to specify a full path and arguments:" NL
+- "# rsh = /path/to/rsh -l myusername" NL
++ "# rsh = /path/to/rsh -l myusername --" NL
+ "### On Windows, if you are specifying a full path to a command," NL
+ "### use a forward slash (/) or a paired backslash (\\\\) as the" NL
+ "### path separator. A single backslash will be treated as an" NL
diff --git a/patches/source/subversion/subversion.SlackBuild b/patches/source/subversion/subversion.SlackBuild
new file mode 100755
index 000000000..6f9370d7e
--- /dev/null
+++ b/patches/source/subversion/subversion.SlackBuild
@@ -0,0 +1,183 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 2016 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+VERSION=${VERSION:-$(echo subversion-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-3_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-subversion
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf subversion-$VERSION
+tar xvf $CWD/subversion-$VERSION.tar.?z* || exit 1
+cd subversion-$VERSION || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+zcat $CWD/subversion.CVE-2015-5343.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/subversion.CVE-2016-2167.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/subversion.CVE-2016-2168.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/subversion.CVE-2017-9800.diff.gz | patch -p0 --verbose || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/subversion-$VERSION \
+ --enable-shared \
+ --disable-static \
+ --with-apr=/usr \
+ --with-apr-util=/usr \
+ --with-apxs=/usr/bin/apxs \
+ --with-neon=/usr \
+ --with-zlib=/usr \
+ --with-pic \
+ --with-ssl \
+ --build=$ARCH-slackware-linux || exit 1
+
+# Not currently compiling with gcc-4.7.1, but we'll try it again later:
+# --with-kwallet \
+#
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+make install-tools DESTDIR=$PKG || exit 1
+make install-docs DESTDIR=$PKG || exit 1
+
+# Install python bindings
+make swig-py
+make install-swig-py DESTDIR=$PKG
+PYTHON_VER=$(python -c 'import sys; print "%d.%d" % sys.version_info[:2]')
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/python${PYTHON_VER}/site-packages
+mv $PKG/usr/lib${LIBDIRSUFFIX}/svn-python/* \
+ $PKG/usr/lib${LIBDIRSUFFIX}/python${PYTHON_VER}/site-packages
+rmdir $PKG/usr/lib${LIBDIRSUFFIX}/svn-python
+
+# Perl bindings
+make swig-pl-lib
+make install-swig-pl-lib DESTDIR=$PKG
+( cd subversion/bindings/swig/perl/native
+ perl Makefile.PL
+ make install_vendor DESTDIR=$PKG
+)
+eval $(perl '-V:archlib')
+mv $PKG/$archlib/perllocal.pod $PKG/$archlib/subversion.pod
+
+# Ruby bindings
+make swig-rb
+make install-swig-rb DESTDIR=$PKG
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+rm -rf $PKG/usr/info
+# Something doesn't honor --mandir
+mv $PKG/usr/share/man/man3 $PKG/usr/man
+gzip -9 $PKG/usr/man/man?/*
+rmdir $PKG/usr/share/man
+
+# What is this junk for? Since I don't know, I'll erase it. :-)
+rm -rf $PKG/usr/build
+
+mkdir -p $PKG/usr/doc/subversion-$VERSION
+cp -a \
+ BUGS COMMITTERS COPYING* HACKING INSTALL README TRANSLATING doc \
+ $PKG/usr/doc/subversion-$VERSION
+# too big && useless for most || if you think not, can be found in the source tarball
+rm -rf $PKG/usr/doc/subversion-$VERSION/doc/tools
+# Add the HTML svn book:
+( cd $PKG/usr/doc/subversion-$VERSION
+ tar xf $CWD/svn-book-html.tar.bz2
+ mv svn-book-html book
+ cd book
+ chown -R root:root .
+ find . -type d -exec chmod 0755 {} \;
+ find . -type f -exec chmod 0644 {} \;
+ find . -perm 2755 -exec chmod 0755 {} \;
+ find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+)
+
+# If there's a CHANGES file, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r CHANGES ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat CHANGES | head -n 1000 > $DOCSDIR/CHANGES
+ touch -r CHANGES $DOCSDIR/CHANGES
+fi
+
+# This removes our DESTDIR from the packlist filenames, to keep perl's
+# internal inventories consistent and correct.
+find $PKG -name .packlist | while read plist ; do
+ sed -e "s%$PKG%%g" \
+ -e "s%/share/man%/man%g" \
+ -re "s%\.([1-9]n?|3pm)$%&.gz%g # extend man filenames for .gz" \
+ ${plist} > ${plist}.new
+ mv -f ${plist}.new ${plist}
+done
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/subversion-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/sudo/doinst.sh b/patches/source/sudo/doinst.sh
new file mode 100644
index 000000000..01e3d173e
--- /dev/null
+++ b/patches/source/sudo/doinst.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+config etc/sudoers.new
+rm -f etc/sudoers.new
diff --git a/patches/source/sudo/slack-desc b/patches/source/sudo/slack-desc
new file mode 100644
index 000000000..66f1aa8c9
--- /dev/null
+++ b/patches/source/sudo/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+sudo: sudo (give limited root privileges to certain users)
+sudo:
+sudo: 'sudo' is a command that allows users to execute some commands as
+sudo: root. The /etc/sudoers file (edited with 'visudo') specifies which
+sudo: users have access to sudo and which commands they can run. 'sudo'
+sudo: logs all its activities to /var/log/ so the system administrator
+sudo: can keep an eye on things.
+sudo:
+sudo:
+sudo:
+sudo:
diff --git a/patches/source/sudo/sudo.SlackBuild b/patches/source/sudo/sudo.SlackBuild
new file mode 100755
index 000000000..6afa1b61c
--- /dev/null
+++ b/patches/source/sudo/sudo.SlackBuild
@@ -0,0 +1,122 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 2015 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=sudo
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-sudo
+
+rm -rf $PKG
+mkdir -p $TMP $PKG/var/db
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
+
+cd $TMP
+rm -rf sudo-$VERSION
+tar xvf $CWD/sudo-$VERSION.tar.?z* || exit 1
+cd sudo-$VERSION
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sbindir=/usr/sbin \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/sudo-$VERSION \
+ --with-env-editor \
+ --disable-pam-session \
+ --with-pam=no \
+ --with-rundir=/var/db/sudo \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+( cd $PKG/usr/bin
+ chmod 4711 sudo
+ ln -sf sudo sudoedit
+)
+chmod 755 $PKG/usr/sbin/visudo
+
+rm -f $PKG/usr/man/man8/sudoedit.8
+gzip -9 $PKG/usr/man/man?/*.?
+( cd $PKG/usr/man/man8 ; ln -sf sudo.8.gz sudoedit.8.gz )
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mv $PKG/etc/sudoers $PKG/etc/sudoers.new
+
+rm -r $PKG/usr/doc/sudo-$VERSION
+mkdir -p $PKG/usr/doc/sudo-$VERSION
+cp -a \
+ INSTALL NEWS README* \
+ doc/{CONTRIBUTORS,HISTORY,LICENSE,TROUBLESHOOTING,UPGRADE} \
+ $PKG/usr/doc/sudo-$VERSION
+chmod 644 $PKG/usr/doc/sudo-$VERSION/*
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/sudo-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/tcpdump/slack-desc b/patches/source/tcpdump/slack-desc
new file mode 100644
index 000000000..5e9696434
--- /dev/null
+++ b/patches/source/tcpdump/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+tcpdump: tcpdump (network monitoring tool)
+tcpdump:
+tcpdump: Tcpdump is a tool for network monitoring and data acquisition. You
+tcpdump: can use it to dump information on all the packets on a network that
+tcpdump: match a boolean expression. Tcpdump uses libpcap, a system
+tcpdump: independent interface for user-level packet capture.
+tcpdump:
+tcpdump: Project homepage: http://www.tcpdump.org
+tcpdump:
+tcpdump:
+tcpdump:
diff --git a/patches/source/tcpdump/tcpdump.SlackBuild b/patches/source/tcpdump/tcpdump.SlackBuild
new file mode 100755
index 000000000..d20e45c0c
--- /dev/null
+++ b/patches/source/tcpdump/tcpdump.SlackBuild
@@ -0,0 +1,104 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=tcpdump
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-tcpdump
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf tcpdump-$VERSION
+
+# To (try to) avoid weird errors, take an axe to this:
+rm -rf $TMP/libpcap-?.?.?
+
+tar xvf $CWD/tcpdump-$VERSION.tar.xz || exit 1
+cd tcpdump-$VERSION || exit 1
+find . -type d -name CVS -depth -exec rm -rf {} \;
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/tcpdump-$VERSION \
+ --enable-ipv6 \
+ --build=$ARCH-slackware-linux
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Strange, two identical files:
+( cd $PKG/usr/sbin
+ rm -f tcpdump
+ ln -s tcpdump.$VERSION tcpdump
+) || exit 1
+
+mkdir -p $PKG/usr/doc/tcpdump-$VERSION
+cp -a \
+ CHANGES CREDITS FILES INSTALL.txt LICENSE README* VERSION \
+ $PKG/usr/doc/tcpdump-$VERSION
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Compress man pages
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
+)
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/tcpdump-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/udisks/slack-desc b/patches/source/udisks/slack-desc
new file mode 100644
index 000000000..a85adeb4d
--- /dev/null
+++ b/patches/source/udisks/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+udisks: udisks (storage device daemon)
+udisks:
+udisks: The udisks project provides a storage daemon that implements D-Bus
+udisks: interfaces that can be used to query and manipulate storage devices.
+udisks:
+udisks: It also includes a command-line tool, udisks(1), that can be used to
+udisks: query and control the daemon.
+udisks:
+udisks: Homepage: http://www.freedesktop.org/wiki/Software/udisks
+udisks:
+udisks:
diff --git a/patches/source/udisks/udisks.SlackBuild b/patches/source/udisks/udisks.SlackBuild
new file mode 100755
index 000000000..da99dc0d5
--- /dev/null
+++ b/patches/source/udisks/udisks.SlackBuild
@@ -0,0 +1,119 @@
+#!/bin/sh
+
+# Slackware build script for udisks
+
+# Copyright 2010, 2011, 2014 Robby Workman, Northport, Alabama, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Modified 2012 by Eric Hameleers <alien at slackware.com> for ARM port.
+
+
+PKGNAM=udisks
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+NUMJOBS=${NUMJOBS:--j7}
+
+# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
+if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i486 ;;
+ armv7hl) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.xz
+cd $PKGNAM-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --build=$TARGET
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+# Move the bash completion file to the right place
+mkdir -p $PKG/etc/bash_completion.d
+mv $PKG/etc/profile.d/udisks-bash-completion.sh \
+ $PKG/etc/bash_completion.d/udisks
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING ChangeLog HACKING INSTALL NEWS README \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/patches/source/udisks/udisks.url b/patches/source/udisks/udisks.url
new file mode 100644
index 000000000..cef0134ba
--- /dev/null
+++ b/patches/source/udisks/udisks.url
@@ -0,0 +1 @@
+http://hal.freedesktop.org/releases/
diff --git a/patches/source/udisks2/doinst.sh b/patches/source/udisks2/doinst.sh
new file mode 100644
index 000000000..c186599af
--- /dev/null
+++ b/patches/source/udisks2/doinst.sh
@@ -0,0 +1,12 @@
+# udisks2 is stupid about testing files before using them. If /etc/crypttab
+# does not exist, it will fill the log with "errors" as it tries to open the
+# nonexistent file. There's really no reason that a system without encrypted
+# volumes should require this file, but nobody upstream cares to fix the
+# problem (and the code's too messy for me to find it), so we have little
+# choice but to trowel over this. (sigh)
+
+if [ ! -r etc/crypttab ]; then
+ # echo "HEY, EVERYONE SHOULD HAVE A CRYPTTAB!!!" (just kidding)
+ touch etc/crypttab
+fi
+
diff --git a/patches/source/udisks2/slack-desc b/patches/source/udisks2/slack-desc
new file mode 100644
index 000000000..0d6d44272
--- /dev/null
+++ b/patches/source/udisks2/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+udisks2: udisks2 (storage device daemon v2)
+udisks2:
+udisks2: The udisks project provides a storage daemon that implements D-Bus
+udisks2: interfaces that can be used to query and manipulate storage devices.
+udisks2:
+udisks2: It also includes a command-line tool, udisks(1), that can be used to
+udisks2: query and control the daemon.
+udisks2:
+udisks2: Homepage: http://www.freedesktop.org/wiki/Software/udisks
+udisks2:
+udisks2:
diff --git a/patches/source/udisks2/udisks2.SlackBuild b/patches/source/udisks2/udisks2.SlackBuild
new file mode 100755
index 000000000..cc0f3db18
--- /dev/null
+++ b/patches/source/udisks2/udisks2.SlackBuild
@@ -0,0 +1,139 @@
+#!/bin/sh
+
+# Slackware build script for udisks
+
+# Copyright 2010, 2011 Robby Workman, Northport, Alabama, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Modified 2012 by Eric Hameleers <alien at slackware.com> for ARM port.
+
+PKGNAM=udisks2
+SRCNAM=udisks
+VERSION=${VERSION:-$(echo $SRCNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+NUMJOBS=${NUMJOBS:--j7}
+
+# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
+if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i486 ;;
+ armv7hl) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.xz || exit 1
+cd $SRCNAM-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --disable-static \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --build=$TARGET || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Don't ship .la files:
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING* HACKING INSTALL NEWS README* \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/patches/source/vim/doinst.sh b/patches/source/vim/doinst.sh
new file mode 100644
index 000000000..f1ccd5ca3
--- /dev/null
+++ b/patches/source/vim/doinst.sh
@@ -0,0 +1,5 @@
+
+# If there's no vi link, take over:
+if [ ! -r usr/bin/vi ]; then
+ ( cd usr/bin ; ln -sf vim vi )
+fi
diff --git a/patches/source/vim/gvim.desktop b/patches/source/vim/gvim.desktop
new file mode 100644
index 000000000..520c72e61
--- /dev/null
+++ b/patches/source/vim/gvim.desktop
@@ -0,0 +1,120 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Vi IMproved
+Name[af]=Vi Verbeterde
+Name[ar]=ÙÙŠ.أي المحسن
+Name[bn]=ভি-আই উনà§à¦¨à¦¤
+Name[br]=Vi gwellaet
+Name[ca]=Vi millorat
+Name[cy]=VIM (Vi wedi'i wella)
+Name[da]=Vi IMproved (Vi forbedret)
+Name[eo]=VIM
+Name[fa]=Vi پیشرÙت کرده VIM
+Name[hi]=वीआई इमà¥à¤ªà¥à¤°à¥‚वà¥à¤¡
+Name[hu]=VIM
+Name[is]=Vi endurbættur (vim)
+Name[it]=Vi iMproved
+Name[ko]=ë” ë‚˜ì€ Vi
+Name[mn]=СайжирÑан Vi
+Name[nso]=KAonafaditswe ka Vi
+Name[oc]=VI aMillorat
+Name[pl]=Poprawiony VI (vim)
+Name[pt_BR]=Vi melhorado
+Name[ru]=Улучшенный vi
+Name[rw]=Vi Ivuguruwe
+Name[sl]=Izboljšani vi (vim)
+Name[sv]=Förbättrad Vi
+Name[ta]=Vi மேமà¯à®ªà®Ÿà¯à®¤à¯à®¤à®ªà¯à®ªà®Ÿà¯à®Ÿ
+Name[tg]=Vi пешрафт кардаи VIM
+Name[th]=VI IMprove
+Name[uz]=Яхшиланган Vi
+Name[ven]=Vi Khwinifhadzhwa
+Name[vi]=Vi Cải tiến
+Name[wa]=VIM
+Name[zh_CN]=改进的 VI (VIM)
+Name[zh_TW]=VIM
+Name[zu]=I-Vi yenziwe ngcono
+GenericName=Text Editor
+GenericName[af]=Teks Redigeerder
+GenericName[ar]=محرر نصوص
+GenericName[az]=Mətn Editoru
+GenericName[be]=ТÑкÑтавы Ñ€Ñдактар
+GenericName[bg]=ТекÑтов редактор
+GenericName[bn]=টেকà§à¦¸à¦Ÿ সমà§à¦ªà¦¾à¦¦à¦•
+GenericName[br]=Aozer skrid
+GenericName[bs]=Tekst editor
+GenericName[ca]=Editor de text
+GenericName[cs]=Textový editor
+GenericName[cy]=Golygydd Testun
+GenericName[da]= Teksteditor
+GenericName[de]=Texteditor
+GenericName[el]=ΕπεξεÏγαστής κειμένου
+GenericName[eo]=Tekstredaktilo
+GenericName[es]=Editor de texto
+GenericName[et]=Tekstiredaktor
+GenericName[eu]=Testu editorea
+GenericName[fa]=ویرایشگر متن
+GenericName[fi]=Tekstieditori
+GenericName[fo]=Tekstritil
+GenericName[fr]=Éditeur de texte
+GenericName[fy]=Tekst Bewurker
+GenericName[ga]=Eagarthóir Téacs
+GenericName[gl]=Editor de Textos
+GenericName[he]=עורך טקסט
+GenericName[hi]=पाठ संपादक
+GenericName[hr]=UreÄ‘ivaÄ teksta
+GenericName[hsb]=Wobdźěłar tekstow
+GenericName[hu]=Szövegszerkesztő
+GenericName[is]=Textaritill
+GenericName[it]=Editor di testi
+GenericName[ja]=テキストエディタ
+GenericName[km]=កម្មវិធី​វាយ​អážáŸ’ážáž”áž‘
+GenericName[ko]=글월 편집기
+GenericName[lo]=ເຄື່ອງມືà»àºà»‰à»„ຂຂà»à»‰àº„ວາມ
+GenericName[lt]=Teksto rengyklÄ—
+GenericName[lv]=Teksta Redaktors
+GenericName[mk]=Уредувач на текÑÑ‚
+GenericName[mn]=ТекÑÑ‚ боловÑруулагч
+GenericName[ms]=Penyunting Teks
+GenericName[mt]=Editur tat-test
+GenericName[nb]=Skriveprogram
+GenericName[nds]=Texteditor
+GenericName[nl]=Teksteditor
+GenericName[nn]=Skriveprogram
+GenericName[nso]=Mofetosi wa Sengwalwana
+GenericName[pa]=ਪਾਠ ਸੰਪਾਦਕ
+GenericName[pl]=Edytor tekstu
+GenericName[pt]=Editor de Texto
+GenericName[pt_BR]=Editor de Texto
+GenericName[ro]=Editor de text
+GenericName[ru]=ТекÑтовый редактор
+GenericName[rw]=Muhinduzi Umwandiko
+GenericName[se]=Čállinprográmma
+GenericName[sk]=Textový editor
+GenericName[sl]=Urejevalnik besedil
+GenericName[sr]=Уређивач текÑта
+GenericName[sr@Latn]=UreÄ‘ivaÄ teksta
+GenericName[ss]=Sihleli sembhalo
+GenericName[sv]=Texteditor
+GenericName[ta]=உரை தொகà¯à®ªà¯à®ªà®¾à®³à®°à¯
+GenericName[tg]=Муҳаррири матн
+GenericName[th]=โปรà¹à¸à¸£à¸¡à¹à¸à¹‰à¹„ขข้อความ
+GenericName[tr]=Metin Düzenleyici
+GenericName[tt]=Mäten Tözätkeçe
+GenericName[uk]=Редактор текÑтів
+GenericName[uz]=Матн таҳрирчи
+GenericName[ven]=Musengulusi wa Manwalwa
+GenericName[vi]=Trình soạn văn bản
+GenericName[wa]=Aspougneu di tecse
+GenericName[xh]=Umhleli Wombhalo
+GenericName[zh_CN]=文本编辑器
+GenericName[zh_TW]=文字編輯器
+GenericName[zu]=Umlungisi wombhalo
+MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
+Exec=gvim -f %f
+Icon=gvim.png
+Type=Application
+Terminal=false
+X-KDE-StartupNotify=true
+X-KDE-AuthorizeAction=shell_access
+Categories=TextEditor;
diff --git a/patches/source/vim/gvim.png b/patches/source/vim/gvim.png
new file mode 100644
index 000000000..2bdc8bd8c
--- /dev/null
+++ b/patches/source/vim/gvim.png
Binary files differ
diff --git a/patches/source/vim/patches/7.4.001 b/patches/source/vim/patches/7.4.001
new file mode 100644
index 000000000..5788972a5
--- /dev/null
+++ b/patches/source/vim/patches/7.4.001
@@ -0,0 +1,489 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.001
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.001
+Problem: Character classes such as [a-z] to not react to 'ignorecase'.
+ Breaks man page highlighting. (Mario Grgic)
+Solution: Add separate items for classes that react to 'ignorecase'. Clean
+ up logic handling character classes. Add more tests.
+Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok
+
+
+*** ../vim-7.4.000/src/regexp_nfa.c 2013-08-01 18:27:51.000000000 +0200
+--- src/regexp_nfa.c 2013-08-14 11:49:50.000000000 +0200
+***************
+*** 29,34 ****
+--- 29,37 ----
+ # define NFA_REGEXP_DEBUG_LOG "nfa_regexp_debug.log"
+ #endif
+
++ /* Added to NFA_ANY - NFA_NUPPER_IC to include a NL. */
++ #define NFA_ADD_NL 31
++
+ enum
+ {
+ NFA_SPLIT = -1024,
+***************
+*** 183,188 ****
+--- 186,198 ----
+ NFA_NLOWER, /* Match non-lowercase char */
+ NFA_UPPER, /* Match uppercase char */
+ NFA_NUPPER, /* Match non-uppercase char */
++ NFA_LOWER_IC, /* Match [a-z] */
++ NFA_NLOWER_IC, /* Match [^a-z] */
++ NFA_UPPER_IC, /* Match [A-Z] */
++ NFA_NUPPER_IC, /* Match [^A-Z] */
++
++ NFA_FIRST_NL = NFA_ANY + NFA_ADD_NL,
++ NFA_LAST_NL = NFA_NUPPER_IC + NFA_ADD_NL,
+
+ NFA_CURSOR, /* Match cursor pos */
+ NFA_LNUM, /* Match line number */
+***************
+*** 199,207 ****
+ NFA_MARK_LT, /* Match < mark */
+ NFA_VISUAL, /* Match Visual area */
+
+- NFA_FIRST_NL = NFA_ANY + ADD_NL,
+- NFA_LAST_NL = NFA_NUPPER + ADD_NL,
+-
+ /* Character classes [:alnum:] etc */
+ NFA_CLASS_ALNUM,
+ NFA_CLASS_ALPHA,
+--- 209,214 ----
+***************
+*** 578,583 ****
+--- 585,592 ----
+ * On failure, return 0 (=FAIL)
+ * Start points to the first char of the range, while end should point
+ * to the closing brace.
++ * Keep in mind that 'ignorecase' applies at execution time, thus [a-z] may
++ * need to be interpreted as [a-zA-Z].
+ */
+ static int
+ nfa_recognize_char_class(start, end, extra_newl)
+***************
+*** 681,687 ****
+ return FAIL;
+
+ if (newl == TRUE)
+! extra_newl = ADD_NL;
+
+ switch (config)
+ {
+--- 690,696 ----
+ return FAIL;
+
+ if (newl == TRUE)
+! extra_newl = NFA_ADD_NL;
+
+ switch (config)
+ {
+***************
+*** 710,722 ****
+ case CLASS_not | CLASS_az | CLASS_AZ:
+ return extra_newl + NFA_NALPHA;
+ case CLASS_az:
+! return extra_newl + NFA_LOWER;
+ case CLASS_not | CLASS_az:
+! return extra_newl + NFA_NLOWER;
+ case CLASS_AZ:
+! return extra_newl + NFA_UPPER;
+ case CLASS_not | CLASS_AZ:
+! return extra_newl + NFA_NUPPER;
+ }
+ return FAIL;
+ }
+--- 719,731 ----
+ case CLASS_not | CLASS_az | CLASS_AZ:
+ return extra_newl + NFA_NALPHA;
+ case CLASS_az:
+! return extra_newl + NFA_LOWER_IC;
+ case CLASS_not | CLASS_az:
+! return extra_newl + NFA_NLOWER_IC;
+ case CLASS_AZ:
+! return extra_newl + NFA_UPPER_IC;
+ case CLASS_not | CLASS_AZ:
+! return extra_newl + NFA_NUPPER_IC;
+ }
+ return FAIL;
+ }
+***************
+*** 914,920 ****
+ break;
+ }
+
+! extra = ADD_NL;
+
+ /* "\_[" is collection plus newline */
+ if (c == '[')
+--- 923,929 ----
+ break;
+ }
+
+! extra = NFA_ADD_NL;
+
+ /* "\_[" is collection plus newline */
+ if (c == '[')
+***************
+*** 970,976 ****
+ }
+ #endif
+ EMIT(nfa_classcodes[p - classchars]);
+! if (extra == ADD_NL)
+ {
+ EMIT(NFA_NEWL);
+ EMIT(NFA_OR);
+--- 979,985 ----
+ }
+ #endif
+ EMIT(nfa_classcodes[p - classchars]);
+! if (extra == NFA_ADD_NL)
+ {
+ EMIT(NFA_NEWL);
+ EMIT(NFA_OR);
+***************
+*** 1240,1260 ****
+ {
+ /*
+ * Try to reverse engineer character classes. For example,
+! * recognize that [0-9] stands for \d and [A-Za-z_] with \h,
+ * and perform the necessary substitutions in the NFA.
+ */
+ result = nfa_recognize_char_class(regparse, endp,
+! extra == ADD_NL);
+ if (result != FAIL)
+ {
+! if (result >= NFA_DIGIT && result <= NFA_NUPPER)
+! EMIT(result);
+! else /* must be char class + newline */
+ {
+! EMIT(result - ADD_NL);
+ EMIT(NFA_NEWL);
+ EMIT(NFA_OR);
+ }
+ regparse = endp;
+ mb_ptr_adv(regparse);
+ return OK;
+--- 1249,1269 ----
+ {
+ /*
+ * Try to reverse engineer character classes. For example,
+! * recognize that [0-9] stands for \d and [A-Za-z_] for \h,
+ * and perform the necessary substitutions in the NFA.
+ */
+ result = nfa_recognize_char_class(regparse, endp,
+! extra == NFA_ADD_NL);
+ if (result != FAIL)
+ {
+! if (result >= NFA_FIRST_NL && result <= NFA_LAST_NL)
+ {
+! EMIT(result - NFA_ADD_NL);
+ EMIT(NFA_NEWL);
+ EMIT(NFA_OR);
+ }
++ else
++ EMIT(result);
+ regparse = endp;
+ mb_ptr_adv(regparse);
+ return OK;
+***************
+*** 1504,1510 ****
+ * collection, add an OR below. But not for negated
+ * range. */
+ if (!negated)
+! extra = ADD_NL;
+ }
+ else
+ {
+--- 1513,1519 ----
+ * collection, add an OR below. But not for negated
+ * range. */
+ if (!negated)
+! extra = NFA_ADD_NL;
+ }
+ else
+ {
+***************
+*** 1537,1543 ****
+ EMIT(NFA_END_COLL);
+
+ /* \_[] also matches \n but it's not negated */
+! if (extra == ADD_NL)
+ {
+ EMIT(reg_string ? NL : NFA_NEWL);
+ EMIT(NFA_OR);
+--- 1546,1552 ----
+ EMIT(NFA_END_COLL);
+
+ /* \_[] also matches \n but it's not negated */
+! if (extra == NFA_ADD_NL)
+ {
+ EMIT(reg_string ? NL : NFA_NEWL);
+ EMIT(NFA_OR);
+***************
+*** 2011,2017 ****
+ if (c >= NFA_FIRST_NL && c <= NFA_LAST_NL)
+ {
+ addnl = TRUE;
+! c -= ADD_NL;
+ }
+
+ STRCPY(code, "");
+--- 2020,2026 ----
+ if (c >= NFA_FIRST_NL && c <= NFA_LAST_NL)
+ {
+ addnl = TRUE;
+! c -= NFA_ADD_NL;
+ }
+
+ STRCPY(code, "");
+***************
+*** 2217,2222 ****
+--- 2226,2235 ----
+ case NFA_NLOWER:STRCPY(code, "NFA_NLOWER"); break;
+ case NFA_UPPER: STRCPY(code, "NFA_UPPER"); break;
+ case NFA_NUPPER:STRCPY(code, "NFA_NUPPER"); break;
++ case NFA_LOWER_IC: STRCPY(code, "NFA_LOWER_IC"); break;
++ case NFA_NLOWER_IC: STRCPY(code, "NFA_NLOWER_IC"); break;
++ case NFA_UPPER_IC: STRCPY(code, "NFA_UPPER_IC"); break;
++ case NFA_NUPPER_IC: STRCPY(code, "NFA_NUPPER_IC"); break;
+
+ default:
+ STRCPY(code, "CHAR(x)");
+***************
+*** 2687,2692 ****
+--- 2700,2709 ----
+ case NFA_NLOWER:
+ case NFA_UPPER:
+ case NFA_NUPPER:
++ case NFA_LOWER_IC:
++ case NFA_NLOWER_IC:
++ case NFA_UPPER_IC:
++ case NFA_NUPPER_IC:
+ /* possibly non-ascii */
+ #ifdef FEAT_MBYTE
+ if (has_mbyte)
+***************
+*** 3841,3846 ****
+--- 3858,3867 ----
+ case NFA_NLOWER:
+ case NFA_UPPER:
+ case NFA_NUPPER:
++ case NFA_LOWER_IC:
++ case NFA_NLOWER_IC:
++ case NFA_UPPER_IC:
++ case NFA_NUPPER_IC:
+ case NFA_START_COLL:
+ case NFA_START_NEG_COLL:
+ case NFA_NEWL:
+***************
+*** 5872,5877 ****
+--- 5893,5920 ----
+ ADD_STATE_IF_MATCH(t->state);
+ break;
+
++ case NFA_LOWER_IC: /* [a-z] */
++ result = ri_lower(curc) || (ireg_ic && ri_upper(curc));
++ ADD_STATE_IF_MATCH(t->state);
++ break;
++
++ case NFA_NLOWER_IC: /* [^a-z] */
++ result = curc != NUL
++ && !(ri_lower(curc) || (ireg_ic && ri_upper(curc)));
++ ADD_STATE_IF_MATCH(t->state);
++ break;
++
++ case NFA_UPPER_IC: /* [A-Z] */
++ result = ri_upper(curc) || (ireg_ic && ri_lower(curc));
++ ADD_STATE_IF_MATCH(t->state);
++ break;
++
++ case NFA_NUPPER_IC: /* ^[A-Z] */
++ result = curc != NUL
++ && !(ri_upper(curc) || (ireg_ic && ri_lower(curc)));
++ ADD_STATE_IF_MATCH(t->state);
++ break;
++
+ case NFA_BACKREF1:
+ case NFA_BACKREF2:
+ case NFA_BACKREF3:
+*** ../vim-7.4.000/src/testdir/test64.in 2013-08-01 17:45:33.000000000 +0200
+--- src/testdir/test64.in 2013-08-14 11:50:11.000000000 +0200
+***************
+*** 289,303 ****
+ :call add(tl, [2, '.a\%$', " a\n "])
+ :call add(tl, [2, '.a\%$', " a\n_a", "_a"])
+ :"
+! :"""" Test recognition of some character classes
+! :call add(tl, [2, '[0-9]', '8', '8'])
+! :call add(tl, [2, '[^0-9]', '8'])
+! :call add(tl, [2, '[0-9a-fA-F]*', '0a7', '0a7'])
+! :call add(tl, [2, '[^0-9A-Fa-f]\+', '0a7'])
+! :call add(tl, [2, '[a-z_A-Z0-9]\+', 'aso_sfoij', 'aso_sfoij'])
+! :call add(tl, [2, '[a-z]', 'a', 'a'])
+! :call add(tl, [2, '[a-zA-Z]', 'a', 'a'])
+! :call add(tl, [2, '[A-Z]', 'a'])
+ :call add(tl, [2, '\C[^A-Z]\+', 'ABCOIJDEOIFNSD jsfoij sa', ' jsfoij sa'])
+ :"
+ :"""" Tests for \z features
+--- 289,317 ----
+ :call add(tl, [2, '.a\%$', " a\n "])
+ :call add(tl, [2, '.a\%$', " a\n_a", "_a"])
+ :"
+! :"""" Test recognition of character classes
+! :call add(tl, [2, '[0-7]\+', 'x0123456789x', '01234567'])
+! :call add(tl, [2, '[^0-7]\+', '0a;X+% 897', 'a;X+% 89'])
+! :call add(tl, [2, '[0-9]\+', 'x0123456789x', '0123456789'])
+! :call add(tl, [2, '[^0-9]\+', '0a;X+% 9', 'a;X+% '])
+! :call add(tl, [2, '[0-9a-fA-F]\+', 'x0189abcdefg', '0189abcdef'])
+! :call add(tl, [2, '[^0-9A-Fa-f]\+', '0189g;X+% ab', 'g;X+% '])
+! :call add(tl, [2, '[a-z_A-Z0-9]\+', ';+aso_SfOij ', 'aso_SfOij'])
+! :call add(tl, [2, '[^a-z_A-Z0-9]\+', 'aSo_;+% sfOij', ';+% '])
+! :call add(tl, [2, '[a-z_A-Z]\+', '0abyz_ABYZ;', 'abyz_ABYZ'])
+! :call add(tl, [2, '[^a-z_A-Z]\+', 'abAB_09;+% yzYZ', '09;+% '])
+! :call add(tl, [2, '[a-z]\+', '0abcxyz1', 'abcxyz'])
+! :call add(tl, [2, '[a-z]\+', 'AabxyzZ', 'abxyz'])
+! :call add(tl, [2, '[^a-z]\+', 'a;X09+% x', ';X09+% '])
+! :call add(tl, [2, '[^a-z]\+', 'abX0;%yz', 'X0;%'])
+! :call add(tl, [2, '[a-zA-Z]\+', '0abABxzXZ9', 'abABxzXZ'])
+! :call add(tl, [2, '[^a-zA-Z]\+', 'ab09_;+ XZ', '09_;+ '])
+! :call add(tl, [2, '[A-Z]\+', 'aABXYZz', 'ABXYZ'])
+! :call add(tl, [2, '[^A-Z]\+', 'ABx0;%YZ', 'x0;%'])
+! :call add(tl, [2, '[a-z]\+\c', '0abxyzABXYZ;', 'abxyzABXYZ'])
+! :call add(tl, [2, '[A-Z]\+\c', '0abABxzXZ9', 'abABxzXZ'])
+! :call add(tl, [2, '\c[^a-z]\+', 'ab09_;+ XZ', '09_;+ '])
+! :call add(tl, [2, '\c[^A-Z]\+', 'ab09_;+ XZ', '09_;+ '])
+ :call add(tl, [2, '\C[^A-Z]\+', 'ABCOIJDEOIFNSD jsfoij sa', ' jsfoij sa'])
+ :"
+ :"""" Tests for \z features
+*** ../vim-7.4.000/src/testdir/test64.ok 2013-08-01 18:28:56.000000000 +0200
+--- src/testdir/test64.ok 2013-08-14 11:50:37.000000000 +0200
+***************
+*** 650,679 ****
+ OK 0 - .a\%$
+ OK 1 - .a\%$
+ OK 2 - .a\%$
+! OK 0 - [0-9]
+! OK 1 - [0-9]
+! OK 2 - [0-9]
+! OK 0 - [^0-9]
+! OK 1 - [^0-9]
+! OK 2 - [^0-9]
+! OK 0 - [0-9a-fA-F]*
+! OK 1 - [0-9a-fA-F]*
+! OK 2 - [0-9a-fA-F]*
+ OK 0 - [^0-9A-Fa-f]\+
+ OK 1 - [^0-9A-Fa-f]\+
+ OK 2 - [^0-9A-Fa-f]\+
+ OK 0 - [a-z_A-Z0-9]\+
+ OK 1 - [a-z_A-Z0-9]\+
+ OK 2 - [a-z_A-Z0-9]\+
+! OK 0 - [a-z]
+! OK 1 - [a-z]
+! OK 2 - [a-z]
+! OK 0 - [a-zA-Z]
+! OK 1 - [a-zA-Z]
+! OK 2 - [a-zA-Z]
+! OK 0 - [A-Z]
+! OK 1 - [A-Z]
+! OK 2 - [A-Z]
+ OK 0 - \C[^A-Z]\+
+ OK 1 - \C[^A-Z]\+
+ OK 2 - \C[^A-Z]\+
+--- 650,721 ----
+ OK 0 - .a\%$
+ OK 1 - .a\%$
+ OK 2 - .a\%$
+! OK 0 - [0-7]\+
+! OK 1 - [0-7]\+
+! OK 2 - [0-7]\+
+! OK 0 - [^0-7]\+
+! OK 1 - [^0-7]\+
+! OK 2 - [^0-7]\+
+! OK 0 - [0-9]\+
+! OK 1 - [0-9]\+
+! OK 2 - [0-9]\+
+! OK 0 - [^0-9]\+
+! OK 1 - [^0-9]\+
+! OK 2 - [^0-9]\+
+! OK 0 - [0-9a-fA-F]\+
+! OK 1 - [0-9a-fA-F]\+
+! OK 2 - [0-9a-fA-F]\+
+ OK 0 - [^0-9A-Fa-f]\+
+ OK 1 - [^0-9A-Fa-f]\+
+ OK 2 - [^0-9A-Fa-f]\+
+ OK 0 - [a-z_A-Z0-9]\+
+ OK 1 - [a-z_A-Z0-9]\+
+ OK 2 - [a-z_A-Z0-9]\+
+! OK 0 - [^a-z_A-Z0-9]\+
+! OK 1 - [^a-z_A-Z0-9]\+
+! OK 2 - [^a-z_A-Z0-9]\+
+! OK 0 - [a-z_A-Z]\+
+! OK 1 - [a-z_A-Z]\+
+! OK 2 - [a-z_A-Z]\+
+! OK 0 - [^a-z_A-Z]\+
+! OK 1 - [^a-z_A-Z]\+
+! OK 2 - [^a-z_A-Z]\+
+! OK 0 - [a-z]\+
+! OK 1 - [a-z]\+
+! OK 2 - [a-z]\+
+! OK 0 - [a-z]\+
+! OK 1 - [a-z]\+
+! OK 2 - [a-z]\+
+! OK 0 - [^a-z]\+
+! OK 1 - [^a-z]\+
+! OK 2 - [^a-z]\+
+! OK 0 - [^a-z]\+
+! OK 1 - [^a-z]\+
+! OK 2 - [^a-z]\+
+! OK 0 - [a-zA-Z]\+
+! OK 1 - [a-zA-Z]\+
+! OK 2 - [a-zA-Z]\+
+! OK 0 - [^a-zA-Z]\+
+! OK 1 - [^a-zA-Z]\+
+! OK 2 - [^a-zA-Z]\+
+! OK 0 - [A-Z]\+
+! OK 1 - [A-Z]\+
+! OK 2 - [A-Z]\+
+! OK 0 - [^A-Z]\+
+! OK 1 - [^A-Z]\+
+! OK 2 - [^A-Z]\+
+! OK 0 - [a-z]\+\c
+! OK 1 - [a-z]\+\c
+! OK 2 - [a-z]\+\c
+! OK 0 - [A-Z]\+\c
+! OK 1 - [A-Z]\+\c
+! OK 2 - [A-Z]\+\c
+! OK 0 - \c[^a-z]\+
+! OK 1 - \c[^a-z]\+
+! OK 2 - \c[^a-z]\+
+! OK 0 - \c[^A-Z]\+
+! OK 1 - \c[^A-Z]\+
+! OK 2 - \c[^A-Z]\+
+ OK 0 - \C[^A-Z]\+
+ OK 1 - \C[^A-Z]\+
+ OK 2 - \C[^A-Z]\+
+*** ../vim-7.4.000/src/version.c 2013-08-10 13:29:20.000000000 +0200
+--- src/version.c 2013-08-14 11:54:57.000000000 +0200
+***************
+*** 729,730 ****
+--- 729,732 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1,
+ /**/
+
+--
+How many light bulbs does it take to change a person?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.002 b/patches/source/vim/patches/7.4.002
new file mode 100644
index 000000000..d92f4de6c
--- /dev/null
+++ b/patches/source/vim/patches/7.4.002
@@ -0,0 +1,77 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.002
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4b.002
+Problem: Pattern with two alternative look-behind matches does not match.
+ (Amadeus Demarzi)
+Solution: When comparing PIMs also compare their state ID to see if they are
+ different.
+Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok
+
+
+*** ../vim-7.4.001/src/regexp_nfa.c 2013-08-14 12:05:54.000000000 +0200
+--- src/regexp_nfa.c 2013-08-14 13:12:09.000000000 +0200
+***************
+*** 3782,3787 ****
+--- 3782,3790 ----
+ if (two_unused)
+ /* one is used and two is not: not equal */
+ return FALSE;
++ /* compare the state id */
++ if (one->state->id != two->state->id)
++ return FALSE;
+ /* compare the position */
+ if (REG_MULTI)
+ return one->end.pos.lnum == two->end.pos.lnum
+*** ../vim-7.4.001/src/testdir/test64.in 2013-08-14 12:05:54.000000000 +0200
+--- src/testdir/test64.in 2013-08-14 12:58:38.000000000 +0200
+***************
+*** 421,426 ****
+--- 421,429 ----
+ :call add(tl, [2, '\(foo\)\@<=\>', 'barfoo', '', 'foo'])
+ :call add(tl, [2, '\(foo\)\@<=.*', 'foobar', 'bar', 'foo'])
+ :"
++ :" complicated look-behind match
++ :call add(tl, [2, '\(r\@<=\|\w\@<!\)\/', 'x = /word/;', '/'])
++ :"
+ :""""" \@>
+ :call add(tl, [2, '\(a*\)\@>a', 'aaaa'])
+ :call add(tl, [2, '\(a*\)\@>b', 'aaab', 'aaab', 'aaa'])
+*** ../vim-7.4.001/src/testdir/test64.ok 2013-08-14 12:05:54.000000000 +0200
+--- src/testdir/test64.ok 2013-08-14 13:14:09.000000000 +0200
+***************
+*** 974,979 ****
+--- 974,982 ----
+ OK 0 - \(foo\)\@<=.*
+ OK 1 - \(foo\)\@<=.*
+ OK 2 - \(foo\)\@<=.*
++ OK 0 - \(r\@<=\|\w\@<!\)\/
++ OK 1 - \(r\@<=\|\w\@<!\)\/
++ OK 2 - \(r\@<=\|\w\@<!\)\/
+ OK 0 - \(a*\)\@>a
+ OK 1 - \(a*\)\@>a
+ OK 2 - \(a*\)\@>a
+*** ../vim-7.4.001/src/version.c 2013-08-14 12:05:54.000000000 +0200
+--- src/version.c 2013-08-14 13:13:45.000000000 +0200
+***************
+*** 729,730 ****
+--- 729,732 ----
+ { /* Add new patch number below this line */
++ /**/
++ 2,
+ /**/
+
+--
+From "know your smileys":
+ :-)-O Smiling doctor with stethoscope
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.003 b/patches/source/vim/patches/7.4.003
new file mode 100644
index 000000000..9aad3c8c8
--- /dev/null
+++ b/patches/source/vim/patches/7.4.003
@@ -0,0 +1,100 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.003
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.003
+Problem: Memory access error in Ruby syntax highlighting. (Christopher Chow)
+Solution: Refresh stale pointer. (James McCoy)
+Files: src/regexp_nfa.c
+
+
+*** ../vim-7.4.002/src/regexp_nfa.c 2013-08-14 13:31:03.000000000 +0200
+--- src/regexp_nfa.c 2013-08-14 14:02:06.000000000 +0200
+***************
+*** 4120,4126 ****
+ sub = &subs->norm;
+ }
+ #ifdef FEAT_SYN_HL
+! else if (state->c >= NFA_ZOPEN)
+ {
+ subidx = state->c - NFA_ZOPEN;
+ sub = &subs->synt;
+--- 4120,4126 ----
+ sub = &subs->norm;
+ }
+ #ifdef FEAT_SYN_HL
+! else if (state->c >= NFA_ZOPEN && state->c <= NFA_ZOPEN9)
+ {
+ subidx = state->c - NFA_ZOPEN;
+ sub = &subs->synt;
+***************
+*** 4189,4194 ****
+--- 4189,4201 ----
+ }
+
+ subs = addstate(l, state->out, subs, pim, off);
++ /* "subs" may have changed, need to set "sub" again */
++ #ifdef FEAT_SYN_HL
++ if (state->c >= NFA_ZOPEN && state->c <= NFA_ZOPEN9)
++ sub = &subs->synt;
++ else
++ #endif
++ sub = &subs->norm;
+
+ if (save_in_use == -1)
+ {
+***************
+*** 4237,4243 ****
+ sub = &subs->norm;
+ }
+ #ifdef FEAT_SYN_HL
+! else if (state->c >= NFA_ZCLOSE)
+ {
+ subidx = state->c - NFA_ZCLOSE;
+ sub = &subs->synt;
+--- 4244,4250 ----
+ sub = &subs->norm;
+ }
+ #ifdef FEAT_SYN_HL
+! else if (state->c >= NFA_ZCLOSE && state->c <= NFA_ZCLOSE9)
+ {
+ subidx = state->c - NFA_ZCLOSE;
+ sub = &subs->synt;
+***************
+*** 4281,4286 ****
+--- 4288,4300 ----
+ }
+
+ subs = addstate(l, state->out, subs, pim, off);
++ /* "subs" may have changed, need to set "sub" again */
++ #ifdef FEAT_SYN_HL
++ if (state->c >= NFA_ZCLOSE && state->c <= NFA_ZCLOSE9)
++ sub = &subs->synt;
++ else
++ #endif
++ sub = &subs->norm;
+
+ if (REG_MULTI)
+ sub->list.multi[subidx].end = save_lpos;
+*** ../vim-7.4.002/src/version.c 2013-08-14 13:31:03.000000000 +0200
+--- src/version.c 2013-08-14 14:03:51.000000000 +0200
+***************
+*** 729,730 ****
+--- 729,732 ----
+ { /* Add new patch number below this line */
++ /**/
++ 3,
+ /**/
+
+--
+Where do you want to crash today?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.004 b/patches/source/vim/patches/7.4.004
new file mode 100644
index 000000000..f629d673f
--- /dev/null
+++ b/patches/source/vim/patches/7.4.004
@@ -0,0 +1,232 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.004
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.004
+Problem: When closing a window fails ":bwipe" may hang.
+Solution: Let win_close() return FAIL and break out of the loop.
+Files: src/window.c, src/proto/window.pro, src/buffer.c
+
+
+*** ../vim-7.4.003/src/window.c 2013-07-24 17:38:29.000000000 +0200
+--- src/window.c 2013-08-14 16:52:44.000000000 +0200
+***************
+*** 2172,2179 ****
+ * If "free_buf" is TRUE related buffer may be unloaded.
+ *
+ * Called by :quit, :close, :xit, :wq and findtag().
+ */
+! void
+ win_close(win, free_buf)
+ win_T *win;
+ int free_buf;
+--- 2172,2180 ----
+ * If "free_buf" is TRUE related buffer may be unloaded.
+ *
+ * Called by :quit, :close, :xit, :wq and findtag().
++ * Returns FAIL when the window was not closed.
+ */
+! int
+ win_close(win, free_buf)
+ win_T *win;
+ int free_buf;
+***************
+*** 2190,2210 ****
+ if (last_window())
+ {
+ EMSG(_("E444: Cannot close last window"));
+! return;
+ }
+
+ #ifdef FEAT_AUTOCMD
+ if (win->w_closing || (win->w_buffer != NULL && win->w_buffer->b_closing))
+! return; /* window is already being closed */
+ if (win == aucmd_win)
+ {
+ EMSG(_("E813: Cannot close autocmd window"));
+! return;
+ }
+ if ((firstwin == aucmd_win || lastwin == aucmd_win) && one_window())
+ {
+ EMSG(_("E814: Cannot close window, only autocmd window would remain"));
+! return;
+ }
+ #endif
+
+--- 2191,2211 ----
+ if (last_window())
+ {
+ EMSG(_("E444: Cannot close last window"));
+! return FAIL;
+ }
+
+ #ifdef FEAT_AUTOCMD
+ if (win->w_closing || (win->w_buffer != NULL && win->w_buffer->b_closing))
+! return FAIL; /* window is already being closed */
+ if (win == aucmd_win)
+ {
+ EMSG(_("E813: Cannot close autocmd window"));
+! return FAIL;
+ }
+ if ((firstwin == aucmd_win || lastwin == aucmd_win) && one_window())
+ {
+ EMSG(_("E814: Cannot close window, only autocmd window would remain"));
+! return FAIL;
+ }
+ #endif
+
+***************
+*** 2212,2218 ****
+ * and then close the window and the tab page to avoid that curwin and
+ * curtab are invalid while we are freeing memory. */
+ if (close_last_window_tabpage(win, free_buf, prev_curtab))
+! return;
+
+ /* When closing the help window, try restoring a snapshot after closing
+ * the window. Otherwise clear the snapshot, it's now invalid. */
+--- 2213,2219 ----
+ * and then close the window and the tab page to avoid that curwin and
+ * curtab are invalid while we are freeing memory. */
+ if (close_last_window_tabpage(win, free_buf, prev_curtab))
+! return FAIL;
+
+ /* When closing the help window, try restoring a snapshot after closing
+ * the window. Otherwise clear the snapshot, it's now invalid. */
+***************
+*** 2240,2261 ****
+ win->w_closing = TRUE;
+ apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, FALSE, curbuf);
+ if (!win_valid(win))
+! return;
+ win->w_closing = FALSE;
+ if (last_window())
+! return;
+ }
+ win->w_closing = TRUE;
+ apply_autocmds(EVENT_WINLEAVE, NULL, NULL, FALSE, curbuf);
+ if (!win_valid(win))
+! return;
+ win->w_closing = FALSE;
+ if (last_window())
+! return;
+ # ifdef FEAT_EVAL
+ /* autocmds may abort script processing */
+ if (aborting())
+! return;
+ # endif
+ }
+ #endif
+--- 2241,2262 ----
+ win->w_closing = TRUE;
+ apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, FALSE, curbuf);
+ if (!win_valid(win))
+! return FAIL;
+ win->w_closing = FALSE;
+ if (last_window())
+! return FAIL;
+ }
+ win->w_closing = TRUE;
+ apply_autocmds(EVENT_WINLEAVE, NULL, NULL, FALSE, curbuf);
+ if (!win_valid(win))
+! return FAIL;
+ win->w_closing = FALSE;
+ if (last_window())
+! return FAIL;
+ # ifdef FEAT_EVAL
+ /* autocmds may abort script processing */
+ if (aborting())
+! return FAIL;
+ # endif
+ }
+ #endif
+***************
+*** 2303,2309 ****
+ * other window or moved to another tab page. */
+ else if (!win_valid(win) || last_window() || curtab != prev_curtab
+ || close_last_window_tabpage(win, free_buf, prev_curtab))
+! return;
+
+ /* Free the memory used for the window and get the window that received
+ * the screen space. */
+--- 2304,2310 ----
+ * other window or moved to another tab page. */
+ else if (!win_valid(win) || last_window() || curtab != prev_curtab
+ || close_last_window_tabpage(win, free_buf, prev_curtab))
+! return FAIL;
+
+ /* Free the memory used for the window and get the window that received
+ * the screen space. */
+***************
+*** 2383,2388 ****
+--- 2384,2390 ----
+ #endif
+
+ redraw_all_later(NOT_VALID);
++ return OK;
+ }
+
+ /*
+*** ../vim-7.4.003/src/proto/window.pro 2013-08-10 13:37:30.000000000 +0200
+--- src/proto/window.pro 2013-08-14 16:52:50.000000000 +0200
+***************
+*** 9,15 ****
+ void win_equal __ARGS((win_T *next_curwin, int current, int dir));
+ void close_windows __ARGS((buf_T *buf, int keep_curwin));
+ int one_window __ARGS((void));
+! void win_close __ARGS((win_T *win, int free_buf));
+ void win_close_othertab __ARGS((win_T *win, int free_buf, tabpage_T *tp));
+ void win_free_all __ARGS((void));
+ win_T *winframe_remove __ARGS((win_T *win, int *dirp, tabpage_T *tp));
+--- 9,15 ----
+ void win_equal __ARGS((win_T *next_curwin, int current, int dir));
+ void close_windows __ARGS((buf_T *buf, int keep_curwin));
+ int one_window __ARGS((void));
+! int win_close __ARGS((win_T *win, int free_buf));
+ void win_close_othertab __ARGS((win_T *win, int free_buf, tabpage_T *tp));
+ void win_free_all __ARGS((void));
+ win_T *winframe_remove __ARGS((win_T *win, int *dirp, tabpage_T *tp));
+*** ../vim-7.4.003/src/buffer.c 2013-07-17 16:39:00.000000000 +0200
+--- src/buffer.c 2013-08-14 16:54:34.000000000 +0200
+***************
+*** 1186,1192 ****
+ && !(curwin->w_closing || curwin->w_buffer->b_closing)
+ # endif
+ && (firstwin != lastwin || first_tabpage->tp_next != NULL))
+! win_close(curwin, FALSE);
+ #endif
+
+ /*
+--- 1186,1195 ----
+ && !(curwin->w_closing || curwin->w_buffer->b_closing)
+ # endif
+ && (firstwin != lastwin || first_tabpage->tp_next != NULL))
+! {
+! if (win_close(curwin, FALSE) == FAIL)
+! break;
+! }
+ #endif
+
+ /*
+*** ../vim-7.4.003/src/version.c 2013-08-14 14:18:37.000000000 +0200
+--- src/version.c 2013-08-14 17:10:23.000000000 +0200
+***************
+*** 729,730 ****
+--- 729,732 ----
+ { /* Add new patch number below this line */
++ /**/
++ 4,
+ /**/
+
+--
+From "know your smileys":
+ *<|:-) Santa Claus (Ho Ho Ho)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.005 b/patches/source/vim/patches/7.4.005
new file mode 100644
index 000000000..f85d1f0e3
--- /dev/null
+++ b/patches/source/vim/patches/7.4.005
@@ -0,0 +1,48 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.005
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.005
+Problem: Using "vaB" while 'virtualedit' is set selects the wrong area.
+ (Dimitar Dimitrov)
+Solution: Reset coladd when finding a match.
+Files: src/search.c
+
+
+*** ../vim-7.4.004/src/search.c 2013-07-17 19:20:47.000000000 +0200
+--- src/search.c 2013-08-14 17:32:38.000000000 +0200
+***************
+*** 1760,1765 ****
+--- 1760,1768 ----
+ #endif
+
+ pos = curwin->w_cursor;
++ #ifdef FEAT_VIRTUALEDIT
++ pos.coladd = 0;
++ #endif
+ linep = ml_get(pos.lnum);
+
+ cpo_match = (vim_strchr(p_cpo, CPO_MATCH) != NULL);
+*** ../vim-7.4.004/src/version.c 2013-08-14 17:11:14.000000000 +0200
+--- src/version.c 2013-08-14 17:38:05.000000000 +0200
+***************
+*** 729,730 ****
+--- 729,732 ----
+ { /* Add new patch number below this line */
++ /**/
++ 5,
+ /**/
+
+--
+You can't have everything. Where would you put it?
+ -- Steven Wright
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.006 b/patches/source/vim/patches/7.4.006
new file mode 100644
index 000000000..55d3802c4
--- /dev/null
+++ b/patches/source/vim/patches/7.4.006
@@ -0,0 +1,66 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.006
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.006
+Problem: mkdir("foo/bar/", "p") gives an error message. (David Barnett)
+Solution: Remove the trailing slash. (lcd)
+Files: src/eval.c
+
+
+*** ../vim-7.4.005/src/eval.c 2013-07-05 18:23:42.000000000 +0200
+--- src/eval.c 2013-08-22 12:00:28.000000000 +0200
+***************
+*** 14292,14297 ****
+--- 14292,14301 ----
+ return;
+
+ dir = get_tv_string_buf(&argvars[0], buf);
++ if (*gettail(dir) == NUL)
++ /* remove trailing slashes */
++ *gettail_sep(dir) = NUL;
++
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+ if (argvars[2].v_type != VAR_UNKNOWN)
+***************
+*** 14299,14305 ****
+ if (prot != -1 && STRCMP(get_tv_string(&argvars[1]), "p") == 0)
+ mkdir_recurse(dir, prot);
+ }
+! rettv->vval.v_number = prot != -1 ? vim_mkdir_emsg(dir, prot) : 0;
+ }
+ #endif
+
+--- 14303,14309 ----
+ if (prot != -1 && STRCMP(get_tv_string(&argvars[1]), "p") == 0)
+ mkdir_recurse(dir, prot);
+ }
+! rettv->vval.v_number = prot == -1 ? FAIL : vim_mkdir_emsg(dir, prot);
+ }
+ #endif
+
+*** ../vim-7.4.005/src/version.c 2013-08-14 17:45:25.000000000 +0200
+--- src/version.c 2013-08-22 12:02:46.000000000 +0200
+***************
+*** 729,730 ****
+--- 729,732 ----
+ { /* Add new patch number below this line */
++ /**/
++ 6,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+97. Your mother tells you to remember something, and you look for
+ a File/Save command.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.007 b/patches/source/vim/patches/7.4.007
new file mode 100644
index 000000000..5495ffbf9
--- /dev/null
+++ b/patches/source/vim/patches/7.4.007
@@ -0,0 +1,95 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.007
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.007
+Problem: Creating a preview window on startup leaves the screen layout in a
+ messed up state. (Marius Gedminas)
+Solution: Don't change firstwin. (Christian Brabandt)
+Files: src/main.c
+
+
+*** ../vim-7.4.006/src/main.c 2013-07-03 12:36:49.000000000 +0200
+--- src/main.c 2013-08-22 14:02:39.000000000 +0200
+***************
+*** 2727,2732 ****
+--- 2727,2733 ----
+ int arg_idx; /* index in argument list */
+ int i;
+ int advance = TRUE;
++ win_T *win;
+
+ # ifdef FEAT_AUTOCMD
+ /*
+***************
+*** 2816,2839 ****
+ # ifdef FEAT_AUTOCMD
+ --autocmd_no_enter;
+ # endif
+ #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+! /*
+! * Avoid making a preview window the current window.
+! */
+! if (firstwin->w_p_pvw)
+ {
+! win_T *win;
+!
+! for (win = firstwin; win != NULL; win = win->w_next)
+! if (!win->w_p_pvw)
+! {
+! firstwin = win;
+! break;
+! }
+ }
+ #endif
+! /* make the first window the current window */
+! win_enter(firstwin, FALSE);
+
+ # ifdef FEAT_AUTOCMD
+ --autocmd_no_leave;
+--- 2817,2838 ----
+ # ifdef FEAT_AUTOCMD
+ --autocmd_no_enter;
+ # endif
++
++ /* make the first window the current window */
++ win = firstwin;
+ #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+! /* Avoid making a preview window the current window. */
+! while (win->w_p_pvw)
+ {
+! win = win->w_next;
+! if (win == NULL)
+! {
+! win = firstwin;
+! break;
+! }
+ }
+ #endif
+! win_enter(win, FALSE);
+
+ # ifdef FEAT_AUTOCMD
+ --autocmd_no_leave;
+*** ../vim-7.4.006/src/version.c 2013-08-22 12:06:50.000000000 +0200
+--- src/version.c 2013-08-22 14:04:11.000000000 +0200
+***************
+*** 729,730 ****
+--- 729,732 ----
+ { /* Add new patch number below this line */
++ /**/
++ 7,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+105. When someone asks you for your address, you tell them your URL.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.008 b/patches/source/vim/patches/7.4.008
new file mode 100644
index 000000000..6abd493f9
--- /dev/null
+++ b/patches/source/vim/patches/7.4.008
@@ -0,0 +1,71 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.008
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.008
+Problem: New regexp engine can't be interrupted.
+Solution: Check for CTRL-C pressed. (Yasuhiro Matsumoto)
+Files: src/regexp_nfa.c, src/regexp.c
+
+
+*** ../vim-7.4.007/src/regexp_nfa.c 2013-08-14 14:18:37.000000000 +0200
+--- src/regexp_nfa.c 2013-08-25 16:55:56.000000000 +0200
+***************
+*** 5089,5094 ****
+--- 5089,5100 ----
+ return FALSE;
+ }
+ #endif
++ /* Some patterns may take a long time to match, especially when using
++ * recursive_regmatch(). Allow interrupting them with CTRL-C. */
++ fast_breakcheck();
++ if (got_int)
++ return FALSE;
++
+ nfa_match = FALSE;
+
+ /* Allocate memory for the lists of nodes. */
+*** ../vim-7.4.007/src/regexp.c 2013-08-01 18:31:30.000000000 +0200
+--- src/regexp.c 2013-08-25 16:57:35.000000000 +0200
+***************
+*** 4311,4318 ****
+ */
+ for (;;)
+ {
+! /* Some patterns may cause a long time to match, even though they are not
+! * illegal. E.g., "\([a-z]\+\)\+Q". Allow breaking them with CTRL-C. */
+ fast_breakcheck();
+
+ #ifdef DEBUG
+--- 4311,4318 ----
+ */
+ for (;;)
+ {
+! /* Some patterns may take a long time to match, e.g., "\([a-z]\+\)\+Q".
+! * Allow interrupting them with CTRL-C. */
+ fast_breakcheck();
+
+ #ifdef DEBUG
+*** ../vim-7.4.007/src/version.c 2013-08-22 14:14:23.000000000 +0200
+--- src/version.c 2013-08-25 16:57:51.000000000 +0200
+***************
+*** 729,730 ****
+--- 729,732 ----
+ { /* Add new patch number below this line */
++ /**/
++ 8,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+124. You begin conversations with, "Who is your internet service provider?"
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.009 b/patches/source/vim/patches/7.4.009
new file mode 100644
index 000000000..f5e5fa609
--- /dev/null
+++ b/patches/source/vim/patches/7.4.009
@@ -0,0 +1,64 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.009
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.009
+Problem: When a file was not decrypted (yet), writing it may destroy the
+ contents.
+Solution: Mark the file as readonly until decryption was done. (Christian
+ Brabandt)
+Files: src/fileio.c
+
+
+*** ../vim-7.4.008/src/fileio.c 2013-08-05 21:58:03.000000000 +0200
+--- src/fileio.c 2013-08-25 17:45:27.000000000 +0200
+***************
+*** 2926,2934 ****
+--- 2926,2939 ----
+ int *did_ask; /* flag: whether already asked for key */
+ {
+ int method = crypt_method_from_magic((char *)ptr, *sizep);
++ int b_p_ro = curbuf->b_p_ro;
+
+ if (method >= 0)
+ {
++ /* Mark the buffer as read-only until the decryption has taken place.
++ * Avoids accidentally overwriting the file with garbage. */
++ curbuf->b_p_ro = TRUE;
++
+ set_crypt_method(curbuf, method);
+ if (method > 0)
+ (void)blowfish_self_test();
+***************
+*** 2977,2982 ****
+--- 2982,2989 ----
+ *sizep -= CRYPT_MAGIC_LEN + salt_len + seed_len;
+ mch_memmove(ptr, ptr + CRYPT_MAGIC_LEN + salt_len + seed_len,
+ (size_t)*sizep);
++ /* Restore the read-only flag. */
++ curbuf->b_p_ro = b_p_ro;
+ }
+ }
+ /* When starting to edit a new file which does not have encryption, clear
+*** ../vim-7.4.008/src/version.c 2013-08-25 17:01:36.000000000 +0200
+--- src/version.c 2013-08-25 17:44:30.000000000 +0200
+***************
+*** 729,730 ****
+--- 729,732 ----
+ { /* Add new patch number below this line */
++ /**/
++ 9,
+ /**/
+
+--
+I have a watch cat! Just break in and she'll watch.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.010 b/patches/source/vim/patches/7.4.010
new file mode 100644
index 000000000..fee6ba5b4
--- /dev/null
+++ b/patches/source/vim/patches/7.4.010
@@ -0,0 +1,79 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.010
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.010 (after 7.4.006)
+Problem: Crash with invalid argument to mkdir().
+Solution: Check for empty string. (lcd47)
+Files: src/eval.c
+
+
+*** ../vim-7.4.009/src/eval.c 2013-08-22 12:06:50.000000000 +0200
+--- src/eval.c 2013-08-30 15:47:47.000000000 +0200
+***************
+*** 14292,14309 ****
+ return;
+
+ dir = get_tv_string_buf(&argvars[0], buf);
+! if (*gettail(dir) == NUL)
+! /* remove trailing slashes */
+! *gettail_sep(dir) = NUL;
+!
+! if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+! if (argvars[2].v_type != VAR_UNKNOWN)
+! prot = get_tv_number_chk(&argvars[2], NULL);
+! if (prot != -1 && STRCMP(get_tv_string(&argvars[1]), "p") == 0)
+! mkdir_recurse(dir, prot);
+ }
+- rettv->vval.v_number = prot == -1 ? FAIL : vim_mkdir_emsg(dir, prot);
+ }
+ #endif
+
+--- 14292,14314 ----
+ return;
+
+ dir = get_tv_string_buf(&argvars[0], buf);
+! if (*dir == NUL)
+! rettv->vval.v_number = FAIL;
+! else
+ {
+! if (*gettail(dir) == NUL)
+! /* remove trailing slashes */
+! *gettail_sep(dir) = NUL;
+!
+! if (argvars[1].v_type != VAR_UNKNOWN)
+! {
+! if (argvars[2].v_type != VAR_UNKNOWN)
+! prot = get_tv_number_chk(&argvars[2], NULL);
+! if (prot != -1 && STRCMP(get_tv_string(&argvars[1]), "p") == 0)
+! mkdir_recurse(dir, prot);
+! }
+! rettv->vval.v_number = prot == -1 ? FAIL : vim_mkdir_emsg(dir, prot);
+ }
+ }
+ #endif
+
+*** ../vim-7.4.009/src/version.c 2013-08-25 17:46:05.000000000 +0200
+--- src/version.c 2013-08-30 15:48:37.000000000 +0200
+***************
+*** 729,730 ****
+--- 729,732 ----
+ { /* Add new patch number below this line */
++ /**/
++ 10,
+ /**/
+
+--
+I wish there was a knob on the TV to turn up the intelligence.
+There's a knob called "brightness", but it doesn't seem to work.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.011 b/patches/source/vim/patches/7.4.011
new file mode 100644
index 000000000..efff82c5e
--- /dev/null
+++ b/patches/source/vim/patches/7.4.011
@@ -0,0 +1,100 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.011
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.011
+Problem: Cannot find out if "acl" and "xpm" features are supported.
+Solution: Add "acl" and "xpm" to the list of features. (Ken Takata)
+Files: src/eval.c, src/version.c
+
+
+*** ../vim-7.4.010/src/eval.c 2013-08-30 16:00:04.000000000 +0200
+--- src/eval.c 2013-08-30 16:34:12.000000000 +0200
+***************
+*** 12135,12140 ****
+--- 12135,12143 ----
+ #ifndef CASE_INSENSITIVE_FILENAME
+ "fname_case",
+ #endif
++ #ifdef HAVE_ACL
++ "acl",
++ #endif
+ #ifdef FEAT_ARABIC
+ "arabic",
+ #endif
+***************
+*** 12538,12544 ****
+ "xfontset",
+ #endif
+ #ifdef FEAT_XPM_W32
+! "xpm_w32",
+ #endif
+ #ifdef USE_XSMP
+ "xsmp",
+--- 12541,12552 ----
+ "xfontset",
+ #endif
+ #ifdef FEAT_XPM_W32
+! "xpm",
+! "xpm_w32", /* for backward compatibility */
+! #else
+! # if defined(HAVE_XPM)
+! "xpm",
+! # endif
+ #endif
+ #ifdef USE_XSMP
+ "xsmp",
+*** ../vim-7.4.010/src/version.c 2013-08-30 16:00:04.000000000 +0200
+--- src/version.c 2013-08-30 16:34:37.000000000 +0200
+***************
+*** 60,65 ****
+--- 60,70 ----
+
+ static char *(features[]) =
+ {
++ #ifdef HAVE_ACL
++ "+acl",
++ #else
++ "-acl",
++ #endif
+ #ifdef AMIGA /* only for Amiga systems */
+ # ifdef FEAT_ARP
+ "+ARP",
+***************
+*** 721,726 ****
+--- 726,737 ----
+ # else
+ "-xpm_w32",
+ # endif
++ #else
++ # ifdef HAVE_XPM
++ "+xpm",
++ # else
++ "-xpm",
++ # endif
+ #endif
+ NULL
+ };
+*** ../vim-7.4.010/src/version.c 2013-08-30 16:00:04.000000000 +0200
+--- src/version.c 2013-08-30 16:34:37.000000000 +0200
+***************
+*** 729,730 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 11,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+141. You'd rather go to http://www.weather.com/ than look out your window.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.012 b/patches/source/vim/patches/7.4.012
new file mode 100644
index 000000000..f831442ea
--- /dev/null
+++ b/patches/source/vim/patches/7.4.012
@@ -0,0 +1,202 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.012
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.012
+Problem: MS-Windows: resolving shortcut does not work properly with
+ multi-byte characters.
+Solution: Use wide system functions. (Ken Takata)
+Files: src/os_mswin.c
+
+
+*** ../vim-7.4.011/src/os_mswin.c 2013-06-16 16:41:11.000000000 +0200
+--- src/os_mswin.c 2013-08-30 16:43:23.000000000 +0200
+***************
+*** 1761,1769 ****
+ IPersistFile *ppf = NULL;
+ OLECHAR wsz[MAX_PATH];
+ WIN32_FIND_DATA ffd; // we get those free of charge
+! TCHAR buf[MAX_PATH]; // could have simply reused 'wsz'...
+ char_u *rfname = NULL;
+ int len;
+
+ /* Check if the file name ends in ".lnk". Avoid calling
+ * CoCreateInstance(), it's quite slow. */
+--- 1761,1773 ----
+ IPersistFile *ppf = NULL;
+ OLECHAR wsz[MAX_PATH];
+ WIN32_FIND_DATA ffd; // we get those free of charge
+! CHAR buf[MAX_PATH]; // could have simply reused 'wsz'...
+ char_u *rfname = NULL;
+ int len;
++ # ifdef FEAT_MBYTE
++ IShellLinkW *pslw = NULL;
++ WIN32_FIND_DATAW ffdw; // we get those free of charge
++ # endif
+
+ /* Check if the file name ends in ".lnk". Avoid calling
+ * CoCreateInstance(), it's quite slow. */
+***************
+*** 1775,1792 ****
+
+ CoInitialize(NULL);
+
+ // create a link manager object and request its interface
+ hr = CoCreateInstance(
+ &CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
+ &IID_IShellLink, (void**)&psl);
+ if (hr != S_OK)
+! goto shortcut_error;
+
+ // Get a pointer to the IPersistFile interface.
+ hr = psl->lpVtbl->QueryInterface(
+ psl, &IID_IPersistFile, (void**)&ppf);
+ if (hr != S_OK)
+! goto shortcut_error;
+
+ // full path string must be in Unicode.
+ MultiByteToWideChar(CP_ACP, 0, fname, -1, wsz, MAX_PATH);
+--- 1779,1840 ----
+
+ CoInitialize(NULL);
+
++ # ifdef FEAT_MBYTE
++ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
++ {
++ // create a link manager object and request its interface
++ hr = CoCreateInstance(
++ &CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
++ &IID_IShellLinkW, (void**)&pslw);
++ if (hr == S_OK)
++ {
++ WCHAR *p = enc_to_utf16(fname, NULL);
++
++ if (p != NULL)
++ {
++ // Get a pointer to the IPersistFile interface.
++ hr = pslw->lpVtbl->QueryInterface(
++ pslw, &IID_IPersistFile, (void**)&ppf);
++ if (hr != S_OK)
++ goto shortcut_errorw;
++
++ // "load" the name and resolve the link
++ hr = ppf->lpVtbl->Load(ppf, p, STGM_READ);
++ if (hr != S_OK)
++ goto shortcut_errorw;
++ # if 0 // This makes Vim wait a long time if the target does not exist.
++ hr = pslw->lpVtbl->Resolve(pslw, NULL, SLR_NO_UI);
++ if (hr != S_OK)
++ goto shortcut_errorw;
++ # endif
++
++ // Get the path to the link target.
++ ZeroMemory(wsz, MAX_PATH * sizeof(WCHAR));
++ hr = pslw->lpVtbl->GetPath(pslw, wsz, MAX_PATH, &ffdw, 0);
++ if (hr == S_OK && wsz[0] != NUL)
++ rfname = utf16_to_enc(wsz, NULL);
++
++ shortcut_errorw:
++ vim_free(p);
++ if (hr == S_OK)
++ goto shortcut_end;
++ }
++ }
++ /* Retry with non-wide function (for Windows 98). */
++ }
++ # endif
+ // create a link manager object and request its interface
+ hr = CoCreateInstance(
+ &CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
+ &IID_IShellLink, (void**)&psl);
+ if (hr != S_OK)
+! goto shortcut_end;
+
+ // Get a pointer to the IPersistFile interface.
+ hr = psl->lpVtbl->QueryInterface(
+ psl, &IID_IPersistFile, (void**)&ppf);
+ if (hr != S_OK)
+! goto shortcut_end;
+
+ // full path string must be in Unicode.
+ MultiByteToWideChar(CP_ACP, 0, fname, -1, wsz, MAX_PATH);
+***************
+*** 1794,1805 ****
+ // "load" the name and resolve the link
+ hr = ppf->lpVtbl->Load(ppf, wsz, STGM_READ);
+ if (hr != S_OK)
+! goto shortcut_error;
+! #if 0 // This makes Vim wait a long time if the target doesn't exist.
+ hr = psl->lpVtbl->Resolve(psl, NULL, SLR_NO_UI);
+ if (hr != S_OK)
+! goto shortcut_error;
+! #endif
+
+ // Get the path to the link target.
+ ZeroMemory(buf, MAX_PATH);
+--- 1842,1853 ----
+ // "load" the name and resolve the link
+ hr = ppf->lpVtbl->Load(ppf, wsz, STGM_READ);
+ if (hr != S_OK)
+! goto shortcut_end;
+! # if 0 // This makes Vim wait a long time if the target doesn't exist.
+ hr = psl->lpVtbl->Resolve(psl, NULL, SLR_NO_UI);
+ if (hr != S_OK)
+! goto shortcut_end;
+! # endif
+
+ // Get the path to the link target.
+ ZeroMemory(buf, MAX_PATH);
+***************
+*** 1807,1818 ****
+ if (hr == S_OK && buf[0] != NUL)
+ rfname = vim_strsave(buf);
+
+! shortcut_error:
+ // Release all interface pointers (both belong to the same object)
+ if (ppf != NULL)
+ ppf->lpVtbl->Release(ppf);
+ if (psl != NULL)
+ psl->lpVtbl->Release(psl);
+
+ CoUninitialize();
+ return rfname;
+--- 1855,1870 ----
+ if (hr == S_OK && buf[0] != NUL)
+ rfname = vim_strsave(buf);
+
+! shortcut_end:
+ // Release all interface pointers (both belong to the same object)
+ if (ppf != NULL)
+ ppf->lpVtbl->Release(ppf);
+ if (psl != NULL)
+ psl->lpVtbl->Release(psl);
++ # ifdef FEAT_MBYTE
++ if (pslw != NULL)
++ pslw->lpVtbl->Release(pslw);
++ # endif
+
+ CoUninitialize();
+ return rfname;
+*** ../vim-7.4.011/src/version.c 2013-08-30 16:35:41.000000000 +0200
+--- src/version.c 2013-08-30 16:39:40.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 12,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+142. You dream about creating the world's greatest web site.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.013 b/patches/source/vim/patches/7.4.013
new file mode 100644
index 000000000..dcbe0fb3e
--- /dev/null
+++ b/patches/source/vim/patches/7.4.013
@@ -0,0 +1,99 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.013
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.013
+Problem: File name buffer too small for utf-8.
+Solution: Use character count instead of byte count. (Ken Takata)
+Files: src/os_mswin.c
+
+
+*** ../vim-7.4.012/src/os_mswin.c 2013-08-30 16:44:15.000000000 +0200
+--- src/os_mswin.c 2013-08-30 16:47:54.000000000 +0200
+***************
+*** 456,462 ****
+--- 456,469 ----
+ int
+ mch_isFullName(char_u *fname)
+ {
++ #ifdef FEAT_MBYTE
++ /* WinNT and later can use _MAX_PATH wide characters for a pathname, which
++ * means that the maximum pathname is _MAX_PATH * 3 bytes when 'enc' is
++ * UTF-8. */
++ char szName[_MAX_PATH * 3 + 1];
++ #else
+ char szName[_MAX_PATH + 1];
++ #endif
+
+ /* A name like "d:/foo" and "//server/share" is absolute */
+ if ((fname[0] && fname[1] == ':' && (fname[2] == '/' || fname[2] == '\\'))
+***************
+*** 464,470 ****
+ return TRUE;
+
+ /* A name that can't be made absolute probably isn't absolute. */
+! if (mch_FullName(fname, szName, _MAX_PATH, FALSE) == FAIL)
+ return FALSE;
+
+ return pathcmp(fname, szName, -1) == 0;
+--- 471,477 ----
+ return TRUE;
+
+ /* A name that can't be made absolute probably isn't absolute. */
+! if (mch_FullName(fname, szName, sizeof(szName) - 1, FALSE) == FAIL)
+ return FALSE;
+
+ return pathcmp(fname, szName, -1) == 0;
+***************
+*** 498,507 ****
+ int
+ vim_stat(const char *name, struct stat *stp)
+ {
+ char buf[_MAX_PATH + 1];
+ char *p;
+
+! vim_strncpy((char_u *)buf, (char_u *)name, _MAX_PATH);
+ p = buf + strlen(buf);
+ if (p > buf)
+ mb_ptr_back(buf, p);
+--- 505,521 ----
+ int
+ vim_stat(const char *name, struct stat *stp)
+ {
++ #ifdef FEAT_MBYTE
++ /* WinNT and later can use _MAX_PATH wide characters for a pathname, which
++ * means that the maximum pathname is _MAX_PATH * 3 bytes when 'enc' is
++ * UTF-8. */
++ char buf[_MAX_PATH * 3 + 1];
++ #else
+ char buf[_MAX_PATH + 1];
++ #endif
+ char *p;
+
+! vim_strncpy((char_u *)buf, (char_u *)name, sizeof(buf) - 1);
+ p = buf + strlen(buf);
+ if (p > buf)
+ mb_ptr_back(buf, p);
+*** ../vim-7.4.012/src/version.c 2013-08-30 16:44:15.000000000 +0200
+--- src/version.c 2013-08-30 16:47:36.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 13,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+143. You dream in pallettes of 216 websafe colors.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.014 b/patches/source/vim/patches/7.4.014
new file mode 100644
index 000000000..f6554337f
--- /dev/null
+++ b/patches/source/vim/patches/7.4.014
@@ -0,0 +1,102 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.014
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.014
+Problem: MS-Windows: check for writing to device does not work.
+Solution: Fix #ifdefs. (Ken Takata)
+Files: src/fileio.c
+
+
+*** ../vim-7.4.013/src/fileio.c 2013-08-25 17:46:05.000000000 +0200
+--- src/fileio.c 2013-08-30 16:56:46.000000000 +0200
+***************
+*** 428,440 ****
+ }
+ }
+
+- #ifdef UNIX
+- /*
+- * On Unix it is possible to read a directory, so we have to
+- * check for it before the mch_open().
+- */
+ if (!read_stdin && !read_buffer)
+ {
+ perm = mch_getperm(fname);
+ if (perm >= 0 && !S_ISREG(perm) /* not a regular file ... */
+ # ifdef S_ISFIFO
+--- 428,440 ----
+ }
+ }
+
+ if (!read_stdin && !read_buffer)
+ {
++ #ifdef UNIX
++ /*
++ * On Unix it is possible to read a directory, so we have to
++ * check for it before the mch_open().
++ */
+ perm = mch_getperm(fname);
+ if (perm >= 0 && !S_ISREG(perm) /* not a regular file ... */
+ # ifdef S_ISFIFO
+***************
+*** 457,464 ****
+ msg_scroll = msg_save;
+ return FAIL;
+ }
+!
+! # if defined(MSDOS) || defined(MSWIN) || defined(OS2)
+ /*
+ * MS-Windows allows opening a device, but we will probably get stuck
+ * trying to read it.
+--- 457,464 ----
+ msg_scroll = msg_save;
+ return FAIL;
+ }
+! #endif
+! #if defined(MSDOS) || defined(MSWIN) || defined(OS2)
+ /*
+ * MS-Windows allows opening a device, but we will probably get stuck
+ * trying to read it.
+***************
+*** 470,478 ****
+ msg_scroll = msg_save;
+ return FAIL;
+ }
+- # endif
+- }
+ #endif
+
+ /* Set default or forced 'fileformat' and 'binary'. */
+ set_file_options(set_options, eap);
+--- 470,477 ----
+ msg_scroll = msg_save;
+ return FAIL;
+ }
+ #endif
++ }
+
+ /* Set default or forced 'fileformat' and 'binary'. */
+ set_file_options(set_options, eap);
+*** ../vim-7.4.013/src/version.c 2013-08-30 16:51:15.000000000 +0200
+--- src/version.c 2013-08-30 16:54:33.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 14,
+ /**/
+
+--
+Drink wet cement and get really stoned.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.015 b/patches/source/vim/patches/7.4.015
new file mode 100644
index 000000000..e8b284d12
--- /dev/null
+++ b/patches/source/vim/patches/7.4.015
@@ -0,0 +1,106 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.015
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.015
+Problem: MS-Windows: Detecting node type does not work for multi-byte
+ characters.
+Solution: Use wide character function when needed. (Ken Takata)
+Files: src/os_win32.c
+
+
+*** ../vim-7.4.014/src/os_win32.c 2013-08-10 12:39:12.000000000 +0200
+--- src/os_win32.c 2013-08-30 17:09:47.000000000 +0200
+***************
+*** 3107,3112 ****
+--- 3107,3115 ----
+ {
+ HANDLE hFile;
+ int type;
++ #ifdef FEAT_MBYTE
++ WCHAR *wn = NULL;
++ #endif
+
+ /* We can't open a file with a name "\\.\con" or "\\.\prn" and trying to
+ * read from it later will cause Vim to hang. Thus return NODE_WRITABLE
+***************
+*** 3114,3127 ****
+ if (STRNCMP(name, "\\\\.\\", 4) == 0)
+ return NODE_WRITABLE;
+
+! hFile = CreateFile(name, /* file name */
+! GENERIC_WRITE, /* access mode */
+! 0, /* share mode */
+! NULL, /* security descriptor */
+! OPEN_EXISTING, /* creation disposition */
+! 0, /* file attributes */
+! NULL); /* handle to template file */
+
+ if (hFile == INVALID_HANDLE_VALUE)
+ return NODE_NORMAL;
+
+--- 3117,3157 ----
+ if (STRNCMP(name, "\\\\.\\", 4) == 0)
+ return NODE_WRITABLE;
+
+! #ifdef FEAT_MBYTE
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! wn = enc_to_utf16(name, NULL);
+! if (wn != NULL)
+! {
+! hFile = CreateFileW(wn, /* file name */
+! GENERIC_WRITE, /* access mode */
+! 0, /* share mode */
+! NULL, /* security descriptor */
+! OPEN_EXISTING, /* creation disposition */
+! 0, /* file attributes */
+! NULL); /* handle to template file */
+! if (hFile == INVALID_HANDLE_VALUE
+! && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
+! {
+! /* Retry with non-wide function (for Windows 98). */
+! vim_free(wn);
+! wn = NULL;
+! }
+! }
+! }
+! if (wn == NULL)
+! #endif
+! hFile = CreateFile(name, /* file name */
+! GENERIC_WRITE, /* access mode */
+! 0, /* share mode */
+! NULL, /* security descriptor */
+! OPEN_EXISTING, /* creation disposition */
+! 0, /* file attributes */
+! NULL); /* handle to template file */
+
++ #ifdef FEAT_MBYTE
++ vim_free(wn);
++ #endif
+ if (hFile == INVALID_HANDLE_VALUE)
+ return NODE_NORMAL;
+
+*** ../vim-7.4.014/src/version.c 2013-08-30 17:06:56.000000000 +0200
+--- src/version.c 2013-08-30 17:09:35.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 15,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+144. You eagerly await the update of the "Cool Site of the Day."
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.016 b/patches/source/vim/patches/7.4.016
new file mode 100644
index 000000000..c58c605f5
--- /dev/null
+++ b/patches/source/vim/patches/7.4.016
@@ -0,0 +1,221 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.016
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.016
+Problem: MS-Windows: File name completion doesn't work properly with
+ Chinese characters. (Yue Wu)
+Solution: Add fname_casew(). (Ken Takata)
+Files: src/os_win32.c
+
+
+*** ../vim-7.4.015/src/os_win32.c 2013-08-30 17:11:29.000000000 +0200
+--- src/os_win32.c 2013-08-30 17:28:30.000000000 +0200
+***************
+*** 2500,2508 ****
+--- 2500,2624 ----
+ }
+
+
++ #ifdef FEAT_MBYTE
++ /*
++ * fname_casew(): Wide version of fname_case(). Set the case of the file name,
++ * if it already exists. When "len" is > 0, also expand short to long
++ * filenames.
++ * Return FAIL if wide functions are not available, OK otherwise.
++ * NOTE: much of this is identical to fname_case(), keep in sync!
++ */
++ static int
++ fname_casew(
++ WCHAR *name,
++ int len)
++ {
++ WCHAR szTrueName[_MAX_PATH + 2];
++ WCHAR szTrueNameTemp[_MAX_PATH + 2];
++ WCHAR *ptrue, *ptruePrev;
++ WCHAR *porig, *porigPrev;
++ int flen;
++ WIN32_FIND_DATAW fb;
++ HANDLE hFind;
++ int c;
++ int slen;
++
++ flen = (int)wcslen(name);
++ if (flen > _MAX_PATH)
++ return OK;
++
++ /* slash_adjust(name) not needed, already adjusted by fname_case(). */
++
++ /* Build the new name in szTrueName[] one component at a time. */
++ porig = name;
++ ptrue = szTrueName;
++
++ if (iswalpha(porig[0]) && porig[1] == L':')
++ {
++ /* copy leading drive letter */
++ *ptrue++ = *porig++;
++ *ptrue++ = *porig++;
++ *ptrue = NUL; /* in case nothing follows */
++ }
++
++ while (*porig != NUL)
++ {
++ /* copy \ characters */
++ while (*porig == psepc)
++ *ptrue++ = *porig++;
++
++ ptruePrev = ptrue;
++ porigPrev = porig;
++ while (*porig != NUL && *porig != psepc)
++ {
++ *ptrue++ = *porig++;
++ }
++ *ptrue = NUL;
++
++ /* To avoid a slow failure append "\*" when searching a directory,
++ * server or network share. */
++ wcscpy(szTrueNameTemp, szTrueName);
++ slen = (int)wcslen(szTrueNameTemp);
++ if (*porig == psepc && slen + 2 < _MAX_PATH)
++ wcscpy(szTrueNameTemp + slen, L"\\*");
++
++ /* Skip "", "." and "..". */
++ if (ptrue > ptruePrev
++ && (ptruePrev[0] != L'.'
++ || (ptruePrev[1] != NUL
++ && (ptruePrev[1] != L'.' || ptruePrev[2] != NUL)))
++ && (hFind = FindFirstFileW(szTrueNameTemp, &fb))
++ != INVALID_HANDLE_VALUE)
++ {
++ c = *porig;
++ *porig = NUL;
++
++ /* Only use the match when it's the same name (ignoring case) or
++ * expansion is allowed and there is a match with the short name
++ * and there is enough room. */
++ if (_wcsicoll(porigPrev, fb.cFileName) == 0
++ || (len > 0
++ && (_wcsicoll(porigPrev, fb.cAlternateFileName) == 0
++ && (int)(ptruePrev - szTrueName)
++ + (int)wcslen(fb.cFileName) < len)))
++ {
++ wcscpy(ptruePrev, fb.cFileName);
++
++ /* Look for exact match and prefer it if found. Must be a
++ * long name, otherwise there would be only one match. */
++ while (FindNextFileW(hFind, &fb))
++ {
++ if (*fb.cAlternateFileName != NUL
++ && (wcscoll(porigPrev, fb.cFileName) == 0
++ || (len > 0
++ && (_wcsicoll(porigPrev,
++ fb.cAlternateFileName) == 0
++ && (int)(ptruePrev - szTrueName)
++ + (int)wcslen(fb.cFileName) < len))))
++ {
++ wcscpy(ptruePrev, fb.cFileName);
++ break;
++ }
++ }
++ }
++ FindClose(hFind);
++ *porig = c;
++ ptrue = ptruePrev + wcslen(ptruePrev);
++ }
++ else if (hFind == INVALID_HANDLE_VALUE
++ && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
++ return FAIL;
++ }
++
++ wcscpy(name, szTrueName);
++ return OK;
++ }
++ #endif
++
+ /*
+ * fname_case(): Set the case of the file name, if it already exists.
+ * When "len" is > 0, also expand short to long filenames.
++ * NOTE: much of this is identical to fname_casew(), keep in sync!
+ */
+ void
+ fname_case(
+***************
+*** 2520,2530 ****
+ int slen;
+
+ flen = (int)STRLEN(name);
+! if (flen == 0 || flen > _MAX_PATH)
+ return;
+
+ slash_adjust(name);
+
+ /* Build the new name in szTrueName[] one component at a time. */
+ porig = name;
+ ptrue = szTrueName;
+--- 2636,2679 ----
+ int slen;
+
+ flen = (int)STRLEN(name);
+! if (flen == 0)
+ return;
+
+ slash_adjust(name);
+
++ #ifdef FEAT_MBYTE
++ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
++ {
++ WCHAR *p = enc_to_utf16(name, NULL);
++
++ if (p != NULL)
++ {
++ char_u *q;
++ WCHAR buf[_MAX_PATH + 2];
++
++ wcscpy(buf, p);
++ vim_free(p);
++
++ if (fname_casew(buf, (len > 0) ? _MAX_PATH : 0) == OK)
++ {
++ q = utf16_to_enc(buf, NULL);
++ if (q != NULL)
++ {
++ vim_strncpy(name, q, (len > 0) ? len - 1 : flen);
++ vim_free(q);
++ return;
++ }
++ }
++ }
++ /* Retry with non-wide function (for Windows 98). */
++ }
++ #endif
++
++ /* If 'enc' is utf-8, flen can be larger than _MAX_PATH.
++ * So we should check this after calling wide function. */
++ if (flen > _MAX_PATH)
++ return;
++
+ /* Build the new name in szTrueName[] one component at a time. */
+ porig = name;
+ ptrue = szTrueName;
+*** ../vim-7.4.015/src/version.c 2013-08-30 17:11:29.000000000 +0200
+--- src/version.c 2013-08-30 17:15:06.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 16,
+ /**/
+
+--
+Fingers not found - Pound head on keyboard to continue.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.017 b/patches/source/vim/patches/7.4.017
new file mode 100644
index 000000000..7d7fad83f
--- /dev/null
+++ b/patches/source/vim/patches/7.4.017
@@ -0,0 +1,78 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.017
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.017
+Problem: ":help !!" does not find the "!!" tag in the help file. (Ben
+ Fritz)
+Solution: When reading the start of the tags file do parse lines that are
+ not header lines.
+Files: src/tag.c
+
+
+*** ../vim-7.4.016/src/tag.c 2013-06-15 22:26:26.000000000 +0200
+--- src/tag.c 2013-09-05 12:03:38.000000000 +0200
+***************
+*** 1797,1809 ****
+ */
+ if (state == TS_START)
+ {
+! /* The header ends when the line sorts below "!_TAG_".
+! * There may be non-header items before the header though,
+! * e.g. "!" itself. When case is folded lower case letters
+! * sort before "_". */
+ if (STRNCMP(lbuf, "!_TAG_", 6) <= 0
+ || (lbuf[0] == '!' && ASCII_ISLOWER(lbuf[1])))
+ {
+ /*
+ * Read header line.
+ */
+--- 1797,1812 ----
+ */
+ if (state == TS_START)
+ {
+! /* The header ends when the line sorts below "!_TAG_". When
+! * case is folded lower case letters sort before "_". */
+ if (STRNCMP(lbuf, "!_TAG_", 6) <= 0
+ || (lbuf[0] == '!' && ASCII_ISLOWER(lbuf[1])))
+ {
++ if (STRNCMP(lbuf, "!_TAG_", 6) != 0)
++ /* Non-header item before the header, e.g. "!" itself.
++ */
++ goto parse_line;
++
+ /*
+ * Read header line.
+ */
+***************
+*** 1898,1903 ****
+--- 1901,1907 ----
+ #endif
+ }
+
++ parse_line:
+ /*
+ * Figure out where the different strings are in this line.
+ * For "normal" tags: Do a quick check if the tag matches.
+*** ../vim-7.4.016/src/version.c 2013-08-30 17:29:10.000000000 +0200
+--- src/version.c 2013-09-05 12:02:01.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 17,
+ /**/
+
+--
+An error has occurred. Hit any user to continue.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.018 b/patches/source/vim/patches/7.4.018
new file mode 100644
index 000000000..2214c30b2
--- /dev/null
+++ b/patches/source/vim/patches/7.4.018
@@ -0,0 +1,45 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.018
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.018
+Problem: When completing item becomes unselected. (Shougo Matsu)
+Solution: Revert patch 7.3.1269.
+Files: src/edit.c
+
+
+*** ../vim-7.4.017/src/edit.c 2013-07-04 20:22:25.000000000 +0200
+--- src/edit.c 2013-09-05 12:39:53.000000000 +0200
+***************
+*** 3467,3473 ****
+ }
+
+ compl_enter_selects = !compl_used_match;
+- compl_shown_match = compl_curr_match = compl_first_match;
+
+ /* Show the popup menu with a different set of matches. */
+ ins_compl_show_pum();
+--- 3467,3472 ----
+*** ../vim-7.4.017/src/version.c 2013-09-05 12:06:26.000000000 +0200
+--- src/version.c 2013-09-05 12:40:34.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 18,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+169. You hire a housekeeper for your home page.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.019 b/patches/source/vim/patches/7.4.019
new file mode 100644
index 000000000..b1532c19c
--- /dev/null
+++ b/patches/source/vim/patches/7.4.019
@@ -0,0 +1,61 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.019
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.019
+Problem: MS-Windows: File name completion doesn't work properly with
+ Chinese characters. (Yue Wu)
+Solution: Take care of multi-byte characters when looking for the start of
+ the file name. (Ken Takata)
+Files: src/edit.c
+
+
+*** ../vim-7.4.018/src/edit.c 2013-09-05 12:49:48.000000000 +0200
+--- src/edit.c 2013-09-05 13:45:27.000000000 +0200
+***************
+*** 5183,5190 ****
+ }
+ else if (ctrl_x_mode == CTRL_X_FILES)
+ {
+! while (--startcol >= 0 && vim_isfilec(line[startcol]))
+! ;
+ compl_col += ++startcol;
+ compl_length = (int)curs_col - startcol;
+ compl_pattern = addstar(line + compl_col, compl_length,
+--- 5183,5196 ----
+ }
+ else if (ctrl_x_mode == CTRL_X_FILES)
+ {
+! char_u *p = line + startcol;
+!
+! /* Go back to just before the first filename character. */
+! mb_ptr_back(line, p);
+! while (vim_isfilec(PTR2CHAR(p)) && p >= line)
+! mb_ptr_back(line, p);
+! startcol = p - line;
+!
+ compl_col += ++startcol;
+ compl_length = (int)curs_col - startcol;
+ compl_pattern = addstar(line + compl_col, compl_length,
+*** ../vim-7.4.018/src/version.c 2013-09-05 12:49:48.000000000 +0200
+--- src/version.c 2013-09-05 13:41:47.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 19,
+ /**/
+
+--
+ Very funny, Scotty. Now beam down my clothes.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.020 b/patches/source/vim/patches/7.4.020
new file mode 100644
index 000000000..942d82fe2
--- /dev/null
+++ b/patches/source/vim/patches/7.4.020
@@ -0,0 +1,82 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.020
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.020
+Problem: NFA engine matches too much with \@>. (John McGowan)
+Solution: When a whole pattern match is found stop searching.
+Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok
+
+
+*** ../vim-7.4.019/src/regexp_nfa.c 2013-08-25 17:01:36.000000000 +0200
+--- src/regexp_nfa.c 2013-09-05 15:59:44.000000000 +0200
+***************
+*** 5322,5328 ****
+ log_subsexpr(m);
+ #endif
+ nfa_match = TRUE;
+! break;
+
+ case NFA_START_INVISIBLE:
+ case NFA_START_INVISIBLE_FIRST:
+--- 5322,5331 ----
+ log_subsexpr(m);
+ #endif
+ nfa_match = TRUE;
+! /* See comment above at "goto nextchar". */
+! if (nextlist->n == 0)
+! clen = 0;
+! goto nextchar;
+
+ case NFA_START_INVISIBLE:
+ case NFA_START_INVISIBLE_FIRST:
+*** ../vim-7.4.019/src/testdir/test64.in 2013-08-14 13:31:03.000000000 +0200
+--- src/testdir/test64.in 2013-09-05 15:35:44.000000000 +0200
+***************
+*** 427,432 ****
+--- 427,433 ----
+ :""""" \@>
+ :call add(tl, [2, '\(a*\)\@>a', 'aaaa'])
+ :call add(tl, [2, '\(a*\)\@>b', 'aaab', 'aaab', 'aaa'])
++ :call add(tl, [2, '^\(.\{-}b\)\@>.', ' abcbd', ' abc', ' ab'])
+ :" TODO: BT engine does not restore submatch after failure
+ :call add(tl, [1, '\(a*\)\@>a\|a\+', 'aaaa', 'aaaa'])
+ :"
+*** ../vim-7.4.019/src/testdir/test64.ok 2013-08-14 13:31:03.000000000 +0200
+--- src/testdir/test64.ok 2013-09-05 16:03:34.000000000 +0200
+***************
+*** 983,988 ****
+--- 983,991 ----
+ OK 0 - \(a*\)\@>b
+ OK 1 - \(a*\)\@>b
+ OK 2 - \(a*\)\@>b
++ OK 0 - ^\(.\{-}b\)\@>.
++ OK 1 - ^\(.\{-}b\)\@>.
++ OK 2 - ^\(.\{-}b\)\@>.
+ OK 0 - \(a*\)\@>a\|a\+
+ OK 2 - \(a*\)\@>a\|a\+
+ OK 0 - \_[^8-9]\+
+*** ../vim-7.4.019/src/version.c 2013-09-05 13:50:49.000000000 +0200
+--- src/version.c 2013-09-05 16:04:32.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 20,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+173. You keep tracking down the email addresses of all your friends
+ (even childhood friends).
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.021 b/patches/source/vim/patches/7.4.021
new file mode 100644
index 000000000..0936d9a19
--- /dev/null
+++ b/patches/source/vim/patches/7.4.021
@@ -0,0 +1,86 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.021
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.021
+Problem: NFA regexp: Using \ze in one branch which doesn't match may cause
+ end of another branch to be wrong. (William Fugh)
+Solution: Set end position if it wasn't set yet.
+Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok
+
+
+*** ../vim-7.4.020/src/regexp_nfa.c 2013-09-05 16:05:32.000000000 +0200
+--- src/regexp_nfa.c 2013-09-05 20:56:25.000000000 +0200
+***************
+*** 4209,4218 ****
+ break;
+
+ case NFA_MCLOSE:
+! if (nfa_has_zend)
+ {
+! /* Do not overwrite the position set by \ze. If no \ze
+! * encountered end will be set in nfa_regtry(). */
+ subs = addstate(l, state->out, subs, pim, off);
+ break;
+ }
+--- 4209,4219 ----
+ break;
+
+ case NFA_MCLOSE:
+! if (nfa_has_zend && (REG_MULTI
+! ? subs->norm.list.multi[0].end.lnum >= 0
+! : subs->norm.list.line[0].end != NULL))
+ {
+! /* Do not overwrite the position set by \ze. */
+ subs = addstate(l, state->out, subs, pim, off);
+ break;
+ }
+*** ../vim-7.4.020/src/testdir/test64.in 2013-09-05 16:05:32.000000000 +0200
+--- src/testdir/test64.in 2013-09-05 20:55:18.000000000 +0200
+***************
+*** 328,333 ****
+--- 328,334 ----
+ :call add(tl, [2, 'abc \zsmatch\ze abc', 'abc abc abc match abc abc', 'match'])
+ :call add(tl, [2, '\v(a \zsif .*){2}', 'a if then a if last', 'if last', 'a if last'])
+ :call add(tl, [2, '\>\zs.', 'aword. ', '.'])
++ :call add(tl, [2, '\s\+\ze\[/\|\s\zs\s\+', 'is [a t', ' '])
+ :"
+ :"""" Tests for \@= and \& features
+ :call add(tl, [2, 'abc\@=', 'abc', 'ab'])
+*** ../vim-7.4.020/src/testdir/test64.ok 2013-09-05 16:05:32.000000000 +0200
+--- src/testdir/test64.ok 2013-09-05 21:09:56.000000000 +0200
+***************
+*** 752,757 ****
+--- 752,760 ----
+ OK 0 - \>\zs.
+ OK 1 - \>\zs.
+ OK 2 - \>\zs.
++ OK 0 - \s\+\ze\[/\|\s\zs\s\+
++ OK 1 - \s\+\ze\[/\|\s\zs\s\+
++ OK 2 - \s\+\ze\[/\|\s\zs\s\+
+ OK 0 - abc\@=
+ OK 1 - abc\@=
+ OK 2 - abc\@=
+*** ../vim-7.4.020/src/version.c 2013-09-05 16:05:32.000000000 +0200
+--- src/version.c 2013-09-05 21:11:38.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 21,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+174. You know what a listserv is.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.022 b/patches/source/vim/patches/7.4.022
new file mode 100644
index 000000000..81a0901f5
--- /dev/null
+++ b/patches/source/vim/patches/7.4.022
@@ -0,0 +1,148 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.022
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.022
+Problem: Deadlock while exiting, because of allocating memory.
+Solution: Do not use gettext() in deathtrap(). (James McCoy)
+Files: src/os_unix.c, src/misc1.c
+
+
+*** ../vim-7.4.021/src/os_unix.c 2013-07-03 16:32:32.000000000 +0200
+--- src/os_unix.c 2013-09-05 21:40:06.000000000 +0200
+***************
+*** 957,964 ****
+
+ /*
+ * This function handles deadly signals.
+! * It tries to preserve any swap file and exit properly.
+ * (partly from Elvis).
+ */
+ static RETSIGTYPE
+ deathtrap SIGDEFARG(sigarg)
+--- 957,966 ----
+
+ /*
+ * This function handles deadly signals.
+! * It tries to preserve any swap files and exit properly.
+ * (partly from Elvis).
++ * NOTE: Avoid unsafe functions, such as allocating memory, they can result in
++ * a deadlock.
+ */
+ static RETSIGTYPE
+ deathtrap SIGDEFARG(sigarg)
+***************
+*** 1090,1107 ****
+ }
+ if (entered == 2)
+ {
+! OUT_STR(_("Vim: Double signal, exiting\n"));
+ out_flush();
+ getout(1);
+ }
+
+ #ifdef SIGHASARG
+! sprintf((char *)IObuff, _("Vim: Caught deadly signal %s\n"),
+ signal_info[i].name);
+ #else
+! sprintf((char *)IObuff, _("Vim: Caught deadly signal\n"));
+ #endif
+! preserve_exit(); /* preserve files and exit */
+
+ #ifdef NBDEBUG
+ reset_signals();
+--- 1092,1114 ----
+ }
+ if (entered == 2)
+ {
+! /* No translation, it may call malloc(). */
+! OUT_STR("Vim: Double signal, exiting\n");
+ out_flush();
+ getout(1);
+ }
+
++ /* No translation, it may call malloc(). */
+ #ifdef SIGHASARG
+! sprintf((char *)IObuff, "Vim: Caught deadly signal %s\n",
+ signal_info[i].name);
+ #else
+! sprintf((char *)IObuff, "Vim: Caught deadly signal\n");
+ #endif
+!
+! /* Preserve files and exit. This sets the really_exiting flag to prevent
+! * calling free(). */
+! preserve_exit();
+
+ #ifdef NBDEBUG
+ reset_signals();
+*** ../vim-7.4.021/src/misc1.c 2013-08-03 17:29:33.000000000 +0200
+--- src/misc1.c 2013-09-05 21:34:04.000000000 +0200
+***************
+*** 9174,9179 ****
+--- 9174,9181 ----
+ /*
+ * Preserve files and exit.
+ * When called IObuff must contain a message.
++ * NOTE: This may be called from deathtrap() in a signal handler, avoid unsafe
++ * functions, such as allocating memory.
+ */
+ void
+ preserve_exit()
+***************
+*** 9196,9202 ****
+ {
+ if (buf->b_ml.ml_mfp != NULL && buf->b_ml.ml_mfp->mf_fname != NULL)
+ {
+! OUT_STR(_("Vim: preserving files...\n"));
+ screen_start(); /* don't know where cursor is now */
+ out_flush();
+ ml_sync_all(FALSE, FALSE); /* preserve all swap files */
+--- 9198,9204 ----
+ {
+ if (buf->b_ml.ml_mfp != NULL && buf->b_ml.ml_mfp->mf_fname != NULL)
+ {
+! OUT_STR("Vim: preserving files...\n");
+ screen_start(); /* don't know where cursor is now */
+ out_flush();
+ ml_sync_all(FALSE, FALSE); /* preserve all swap files */
+***************
+*** 9206,9212 ****
+
+ ml_close_all(FALSE); /* close all memfiles, without deleting */
+
+! OUT_STR(_("Vim: Finished.\n"));
+
+ getout(1);
+ }
+--- 9208,9214 ----
+
+ ml_close_all(FALSE); /* close all memfiles, without deleting */
+
+! OUT_STR("Vim: Finished.\n");
+
+ getout(1);
+ }
+*** ../vim-7.4.021/src/version.c 2013-09-05 21:15:38.000000000 +0200
+--- src/version.c 2013-09-05 21:30:18.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 22,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+175. You send yourself e-mail before you go to bed to remind you
+ what to do when you wake up.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.023 b/patches/source/vim/patches/7.4.023
new file mode 100644
index 000000000..03005213e
--- /dev/null
+++ b/patches/source/vim/patches/7.4.023
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.023
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.023
+Problem: Compiler warning on 64 bit windows.
+Solution: Add type cast. (Mike Williams)
+Files: src/edit.c
+
+
+*** ../vim-7.4.022/src/edit.c 2013-09-05 13:50:49.000000000 +0200
+--- src/edit.c 2013-09-06 17:32:55.000000000 +0200
+***************
+*** 5189,5195 ****
+ mb_ptr_back(line, p);
+ while (vim_isfilec(PTR2CHAR(p)) && p >= line)
+ mb_ptr_back(line, p);
+! startcol = p - line;
+
+ compl_col += ++startcol;
+ compl_length = (int)curs_col - startcol;
+--- 5189,5195 ----
+ mb_ptr_back(line, p);
+ while (vim_isfilec(PTR2CHAR(p)) && p >= line)
+ mb_ptr_back(line, p);
+! startcol = (int)(p - line);
+
+ compl_col += ++startcol;
+ compl_length = (int)curs_col - startcol;
+*** ../vim-7.4.022/src/version.c 2013-09-05 21:41:35.000000000 +0200
+--- src/version.c 2013-09-06 17:33:41.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 23,
+ /**/
+
+--
+Wizards had always known that the act of observation changed the thing that
+was observed, and sometimes forgot that it also changed the observer too.
+ Terry Pratchett - Interesting times
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.024 b/patches/source/vim/patches/7.4.024
new file mode 100644
index 000000000..da0df9c6f
--- /dev/null
+++ b/patches/source/vim/patches/7.4.024
@@ -0,0 +1,61 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.024
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.024
+Problem: When root edits a file the undo file is owned by root while the
+ edited file may be owned by another user, which is not allowed.
+ (cac2s)
+Solution: Accept an undo file owned by the current user.
+Files: src/undo.c
+
+
+*** ../vim-7.4.023/src/undo.c 2013-06-10 20:13:37.000000000 +0200
+--- src/undo.c 2013-09-07 15:45:56.000000000 +0200
+***************
+*** 1604,1613 ****
+
+ #ifdef UNIX
+ /* For safety we only read an undo file if the owner is equal to the
+! * owner of the text file. */
+ if (mch_stat((char *)orig_name, &st_orig) >= 0
+ && mch_stat((char *)file_name, &st_undo) >= 0
+! && st_orig.st_uid != st_undo.st_uid)
+ {
+ if (p_verbose > 0)
+ {
+--- 1604,1614 ----
+
+ #ifdef UNIX
+ /* For safety we only read an undo file if the owner is equal to the
+! * owner of the text file or equal to the current user. */
+ if (mch_stat((char *)orig_name, &st_orig) >= 0
+ && mch_stat((char *)file_name, &st_undo) >= 0
+! && st_orig.st_uid != st_undo.st_uid
+! && st_undo.st_uid != getuid())
+ {
+ if (p_verbose > 0)
+ {
+*** ../vim-7.4.023/src/version.c 2013-09-07 16:35:38.000000000 +0200
+--- src/version.c 2013-09-08 15:38:52.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 24,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+186. You overstay in the office so you can have more time surfing the net.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.025 b/patches/source/vim/patches/7.4.025
new file mode 100644
index 000000000..9ead176eb
--- /dev/null
+++ b/patches/source/vim/patches/7.4.025
@@ -0,0 +1,62 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.025
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.025 (after 7.4.019
+Problem: Reading before start of a string.
+Solution: Do not call mb_ptr_back() at start of a string. (Dominique Pelle)
+Files: src/edit.c
+
+
+*** ../vim-7.4.024/src/edit.c 2013-09-07 16:35:38.000000000 +0200
+--- src/edit.c 2013-09-08 15:57:20.000000000 +0200
+***************
+*** 5187,5197 ****
+
+ /* Go back to just before the first filename character. */
+ mb_ptr_back(line, p);
+! while (vim_isfilec(PTR2CHAR(p)) && p >= line)
+ mb_ptr_back(line, p);
+! startcol = (int)(p - line);
+
+! compl_col += ++startcol;
+ compl_length = (int)curs_col - startcol;
+ compl_pattern = addstar(line + compl_col, compl_length,
+ EXPAND_FILES);
+--- 5187,5199 ----
+
+ /* Go back to just before the first filename character. */
+ mb_ptr_back(line, p);
+! while (p > line && vim_isfilec(PTR2CHAR(p)))
+ mb_ptr_back(line, p);
+! startcol = (int)(p - line) + 1;
+! if (p == line && vim_isfilec(PTR2CHAR(p)))
+! startcol = 0;
+
+! compl_col += startcol;
+ compl_length = (int)curs_col - startcol;
+ compl_pattern = addstar(line + compl_col, compl_length,
+ EXPAND_FILES);
+*** ../vim-7.4.024/src/version.c 2013-09-08 15:40:45.000000000 +0200
+--- src/version.c 2013-09-08 15:52:39.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 25,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+188. You purchase a laptop so you can surf while sitting on the can.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.026 b/patches/source/vim/patches/7.4.026
new file mode 100644
index 000000000..8add91f7a
--- /dev/null
+++ b/patches/source/vim/patches/7.4.026
@@ -0,0 +1,65 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.026
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.026
+Problem: Clang warning for int shift overflow.
+Solution: Use unsigned and cast back to int. (Dominique Pelle)
+Files: src/misc2.c
+
+
+*** ../vim-7.4.025/src/misc2.c 2013-07-07 16:03:35.000000000 +0200
+--- src/misc2.c 2013-09-08 16:04:54.000000000 +0200
+***************
+*** 6496,6508 ****
+ get4c(fd)
+ FILE *fd;
+ {
+! int n;
+
+! n = getc(fd);
+! n = (n << 8) + getc(fd);
+! n = (n << 8) + getc(fd);
+! n = (n << 8) + getc(fd);
+! return n;
+ }
+
+ /*
+--- 6496,6510 ----
+ get4c(fd)
+ FILE *fd;
+ {
+! /* Use unsigned rather than int otherwise result is undefined
+! * when left-shift sets the MSB. */
+! unsigned n;
+
+! n = (unsigned)getc(fd);
+! n = (n << 8) + (unsigned)getc(fd);
+! n = (n << 8) + (unsigned)getc(fd);
+! n = (n << 8) + (unsigned)getc(fd);
+! return (int)n;
+ }
+
+ /*
+*** ../vim-7.4.025/src/version.c 2013-09-08 16:03:40.000000000 +0200
+--- src/version.c 2013-09-08 16:05:40.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 26,
+ /**/
+
+--
+A computer program does what you tell it to do, not what you want it to do.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.027 b/patches/source/vim/patches/7.4.027
new file mode 100644
index 000000000..ab43d59ac
--- /dev/null
+++ b/patches/source/vim/patches/7.4.027
@@ -0,0 +1,89 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.027
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.027 (after 7.4.025)
+Problem: Another valgrind error when using CTRL-X CTRL-F at the start of
+ the line. (Dominique Pelle)
+Solution: Don't call mb_ptr_back() at the start of the line. Add a test.
+Files: src/edit.c, src/testdir/test32.in
+
+
+*** ../vim-7.4.026/src/edit.c 2013-09-08 16:03:40.000000000 +0200
+--- src/edit.c 2013-09-08 18:18:32.000000000 +0200
+***************
+*** 5183,5197 ****
+ }
+ else if (ctrl_x_mode == CTRL_X_FILES)
+ {
+- char_u *p = line + startcol;
+-
+ /* Go back to just before the first filename character. */
+! mb_ptr_back(line, p);
+! while (p > line && vim_isfilec(PTR2CHAR(p)))
+ mb_ptr_back(line, p);
+! startcol = (int)(p - line) + 1;
+! if (p == line && vim_isfilec(PTR2CHAR(p)))
+! startcol = 0;
+
+ compl_col += startcol;
+ compl_length = (int)curs_col - startcol;
+--- 5183,5201 ----
+ }
+ else if (ctrl_x_mode == CTRL_X_FILES)
+ {
+ /* Go back to just before the first filename character. */
+! if (startcol > 0)
+! {
+! char_u *p = line + startcol;
+!
+ mb_ptr_back(line, p);
+! while (p > line && vim_isfilec(PTR2CHAR(p)))
+! mb_ptr_back(line, p);
+! if (p == line && vim_isfilec(PTR2CHAR(p)))
+! startcol = 0;
+! else
+! startcol = (int)(p - line) + 1;
+! }
+
+ compl_col += startcol;
+ compl_length = (int)curs_col - startcol;
+*** ../vim-7.4.026/src/testdir/test32.in 2010-05-15 13:04:10.000000000 +0200
+--- src/testdir/test32.in 2013-09-08 18:08:07.000000000 +0200
+***************
+*** 36,41 ****
+--- 36,44 ----
+ :w Xtest11.one
+ :w Xtest11.two
+ OIXA
++ :" use CTRL-X CTRL-F to complete Xtest11.one, remove it and then use
++ :" CTRL-X CTRL-F again to verify this doesn't cause trouble.
++ OXddk
+ :se cpt=w
+ OST
+ :se cpt=u nohid
+*** ../vim-7.4.026/src/version.c 2013-09-08 16:07:03.000000000 +0200
+--- src/version.c 2013-09-08 18:14:17.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 27,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+190. You quickly hand over your wallet, leather jacket, and car keys
+ during a mugging, then proceed to beat the crap out of your
+ assailant when he asks for your laptop.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.028 b/patches/source/vim/patches/7.4.028
new file mode 100644
index 000000000..4a0e3cf9d
--- /dev/null
+++ b/patches/source/vim/patches/7.4.028
@@ -0,0 +1,753 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.028
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.028
+Problem: Equivalence classes are not working for multi-byte characters.
+Solution: Copy the rules from the old to the new regexp engine. Add a test
+ to check both engines.
+Files: src/regexp_nfa.c, src/testdir/test44.in, src/testdir/test99.in,
+ src/testdir/test99.ok, src/testdir/Make_amiga.mak,
+ src/testdir/Make_dos.mak, src/testdir/Make_ming.mak,
+ src/testdir/Make_os2.mak, src/testdir/Make_vms.mms,
+ src/testdir/Makefile
+
+
+*** ../vim-7.4.027/src/regexp_nfa.c 2013-09-05 21:15:38.000000000 +0200
+--- src/regexp_nfa.c 2013-09-19 16:40:08.000000000 +0200
+***************
+*** 742,748 ****
+ nfa_emit_equi_class(c)
+ int c;
+ {
+! #define EMIT2(c) EMIT(c); EMIT(NFA_CONCAT);
+
+ #ifdef FEAT_MBYTE
+ if (enc_utf8 || STRCMP(p_enc, "latin1") == 0
+--- 742,753 ----
+ nfa_emit_equi_class(c)
+ int c;
+ {
+! #define EMIT2(c) EMIT(c); EMIT(NFA_CONCAT);
+! #ifdef FEAT_MBYTE
+! # define EMITMBC(c) EMIT(c); EMIT(NFA_CONCAT);
+! #else
+! # define EMITMBC(c)
+! #endif
+
+ #ifdef FEAT_MBYTE
+ if (enc_utf8 || STRCMP(p_enc, "latin1") == 0
+***************
+*** 753,844 ****
+ {
+ case 'A': case 0300: case 0301: case 0302:
+ case 0303: case 0304: case 0305:
+! EMIT2('A'); EMIT2(0300); EMIT2(0301);
+! EMIT2(0302); EMIT2(0303); EMIT2(0304);
+! EMIT2(0305);
+ return OK;
+
+ case 'C': case 0307:
+! EMIT2('C'); EMIT2(0307);
+ return OK;
+
+ case 'E': case 0310: case 0311: case 0312: case 0313:
+! EMIT2('E'); EMIT2(0310); EMIT2(0311);
+! EMIT2(0312); EMIT2(0313);
+ return OK;
+
+ case 'I': case 0314: case 0315: case 0316: case 0317:
+! EMIT2('I'); EMIT2(0314); EMIT2(0315);
+! EMIT2(0316); EMIT2(0317);
+ return OK;
+
+ case 'N': case 0321:
+! EMIT2('N'); EMIT2(0321);
+ return OK;
+
+ case 'O': case 0322: case 0323: case 0324: case 0325:
+! case 0326:
+! EMIT2('O'); EMIT2(0322); EMIT2(0323);
+! EMIT2(0324); EMIT2(0325); EMIT2(0326);
+ return OK;
+
+ case 'U': case 0331: case 0332: case 0333: case 0334:
+! EMIT2('U'); EMIT2(0331); EMIT2(0332);
+! EMIT2(0333); EMIT2(0334);
+ return OK;
+
+ case 'Y': case 0335:
+! EMIT2('Y'); EMIT2(0335);
+ return OK;
+
+ case 'a': case 0340: case 0341: case 0342:
+ case 0343: case 0344: case 0345:
+! EMIT2('a'); EMIT2(0340); EMIT2(0341);
+! EMIT2(0342); EMIT2(0343); EMIT2(0344);
+! EMIT2(0345);
+ return OK;
+
+ case 'c': case 0347:
+! EMIT2('c'); EMIT2(0347);
+ return OK;
+
+ case 'e': case 0350: case 0351: case 0352: case 0353:
+! EMIT2('e'); EMIT2(0350); EMIT2(0351);
+! EMIT2(0352); EMIT2(0353);
+ return OK;
+
+ case 'i': case 0354: case 0355: case 0356: case 0357:
+! EMIT2('i'); EMIT2(0354); EMIT2(0355);
+! EMIT2(0356); EMIT2(0357);
+ return OK;
+
+ case 'n': case 0361:
+! EMIT2('n'); EMIT2(0361);
+ return OK;
+
+ case 'o': case 0362: case 0363: case 0364: case 0365:
+! case 0366:
+! EMIT2('o'); EMIT2(0362); EMIT2(0363);
+! EMIT2(0364); EMIT2(0365); EMIT2(0366);
+ return OK;
+
+ case 'u': case 0371: case 0372: case 0373: case 0374:
+! EMIT2('u'); EMIT2(0371); EMIT2(0372);
+! EMIT2(0373); EMIT2(0374);
+ return OK;
+
+ case 'y': case 0375: case 0377:
+! EMIT2('y'); EMIT2(0375); EMIT2(0377);
+ return OK;
+
+! default:
+! return FAIL;
+ }
+ }
+
+! EMIT(c);
+ return OK;
+ #undef EMIT2
+ }
+
+ /*
+--- 758,1095 ----
+ {
+ case 'A': case 0300: case 0301: case 0302:
+ case 0303: case 0304: case 0305:
+! CASEMBC(0x100) CASEMBC(0x102) CASEMBC(0x104) CASEMBC(0x1cd)
+! CASEMBC(0x1de) CASEMBC(0x1e0) CASEMBC(0x1ea2)
+! EMIT2('A'); EMIT2(0300); EMIT2(0301); EMIT2(0302);
+! EMIT2(0303); EMIT2(0304); EMIT2(0305);
+! EMITMBC(0x100) EMITMBC(0x102) EMITMBC(0x104)
+! EMITMBC(0x1cd) EMITMBC(0x1de) EMITMBC(0x1e0)
+! EMITMBC(0x1ea2)
+! return OK;
+!
+! case 'B': CASEMBC(0x1e02) CASEMBC(0x1e06)
+! EMIT2('B'); EMITMBC(0x1e02) EMITMBC(0x1e06)
+ return OK;
+
+ case 'C': case 0307:
+! CASEMBC(0x106) CASEMBC(0x108) CASEMBC(0x10a) CASEMBC(0x10c)
+! EMIT2('C'); EMIT2(0307); EMITMBC(0x106) EMITMBC(0x108)
+! EMITMBC(0x10a) EMITMBC(0x10c)
+! return OK;
+!
+! case 'D': CASEMBC(0x10e) CASEMBC(0x110) CASEMBC(0x1e0a)
+! CASEMBC(0x1e0e) CASEMBC(0x1e10)
+! EMIT2('D'); EMITMBC(0x10e) EMITMBC(0x110) EMITMBC(0x1e0a)
+! EMITMBC(0x1e0e) EMITMBC(0x1e10)
+ return OK;
+
+ case 'E': case 0310: case 0311: case 0312: case 0313:
+! CASEMBC(0x112) CASEMBC(0x114) CASEMBC(0x116) CASEMBC(0x118)
+! CASEMBC(0x11a) CASEMBC(0x1eba) CASEMBC(0x1ebc)
+! EMIT2('E'); EMIT2(0310); EMIT2(0311); EMIT2(0312);
+! EMIT2(0313);
+! EMITMBC(0x112) EMITMBC(0x114) EMITMBC(0x116)
+! EMITMBC(0x118) EMITMBC(0x11a) EMITMBC(0x1eba)
+! EMITMBC(0x1ebc)
+! return OK;
+!
+! case 'F': CASEMBC(0x1e1e)
+! EMIT2('F'); EMITMBC(0x1e1e)
+! return OK;
+!
+! case 'G': CASEMBC(0x11c) CASEMBC(0x11e) CASEMBC(0x120)
+! CASEMBC(0x122) CASEMBC(0x1e4) CASEMBC(0x1e6) CASEMBC(0x1f4)
+! CASEMBC(0x1e20)
+! EMIT2('G'); EMITMBC(0x11c) EMITMBC(0x11e) EMITMBC(0x120)
+! EMITMBC(0x122) EMITMBC(0x1e4) EMITMBC(0x1e6)
+! EMITMBC(0x1f4) EMITMBC(0x1e20)
+! return OK;
+!
+! case 'H': CASEMBC(0x124) CASEMBC(0x126) CASEMBC(0x1e22)
+! CASEMBC(0x1e26) CASEMBC(0x1e28)
+! EMIT2('H'); EMITMBC(0x124) EMITMBC(0x126) EMITMBC(0x1e22)
+! EMITMBC(0x1e26) EMITMBC(0x1e28)
+ return OK;
+
+ case 'I': case 0314: case 0315: case 0316: case 0317:
+! CASEMBC(0x128) CASEMBC(0x12a) CASEMBC(0x12c) CASEMBC(0x12e)
+! CASEMBC(0x130) CASEMBC(0x1cf) CASEMBC(0x1ec8)
+! EMIT2('I'); EMIT2(0314); EMIT2(0315); EMIT2(0316);
+! EMIT2(0317); EMITMBC(0x128) EMITMBC(0x12a)
+! EMITMBC(0x12c) EMITMBC(0x12e) EMITMBC(0x130)
+! EMITMBC(0x1cf) EMITMBC(0x1ec8)
+! return OK;
+!
+! case 'J': CASEMBC(0x134)
+! EMIT2('J'); EMITMBC(0x134)
+! return OK;
+!
+! case 'K': CASEMBC(0x136) CASEMBC(0x1e8) CASEMBC(0x1e30)
+! CASEMBC(0x1e34)
+! EMIT2('K'); EMITMBC(0x136) EMITMBC(0x1e8) EMITMBC(0x1e30)
+! EMITMBC(0x1e34)
+! return OK;
+!
+! case 'L': CASEMBC(0x139) CASEMBC(0x13b) CASEMBC(0x13d)
+! CASEMBC(0x13f) CASEMBC(0x141) CASEMBC(0x1e3a)
+! EMIT2('L'); EMITMBC(0x139) EMITMBC(0x13b) EMITMBC(0x13d)
+! EMITMBC(0x13f) EMITMBC(0x141) EMITMBC(0x1e3a)
+! return OK;
+!
+! case 'M': CASEMBC(0x1e3e) CASEMBC(0x1e40)
+! EMIT2('M'); EMITMBC(0x1e3e) EMITMBC(0x1e40)
+ return OK;
+
+ case 'N': case 0321:
+! CASEMBC(0x143) CASEMBC(0x145) CASEMBC(0x147) CASEMBC(0x1e44)
+! CASEMBC(0x1e48)
+! EMIT2('N'); EMIT2(0321); EMITMBC(0x143) EMITMBC(0x145)
+! EMITMBC(0x147) EMITMBC(0x1e44) EMITMBC(0x1e48)
+ return OK;
+
+ case 'O': case 0322: case 0323: case 0324: case 0325:
+! case 0326: case 0330:
+! CASEMBC(0x14c) CASEMBC(0x14e) CASEMBC(0x150) CASEMBC(0x1a0)
+! CASEMBC(0x1d1) CASEMBC(0x1ea) CASEMBC(0x1ec) CASEMBC(0x1ece)
+! EMIT2('O'); EMIT2(0322); EMIT2(0323); EMIT2(0324);
+! EMIT2(0325); EMIT2(0326); EMIT2(0330);
+! EMITMBC(0x14c) EMITMBC(0x14e) EMITMBC(0x150)
+! EMITMBC(0x1a0) EMITMBC(0x1d1) EMITMBC(0x1ea)
+! EMITMBC(0x1ec) EMITMBC(0x1ece)
+! return OK;
+!
+! case 'P': case 0x1e54: case 0x1e56:
+! EMIT2('P'); EMITMBC(0x1e54) EMITMBC(0x1e56)
+! return OK;
+!
+! case 'R': CASEMBC(0x154) CASEMBC(0x156) CASEMBC(0x158)
+! CASEMBC(0x1e58) CASEMBC(0x1e5e)
+! EMIT2('R'); EMITMBC(0x154) EMITMBC(0x156) EMITMBC(0x158)
+! EMITMBC(0x1e58) EMITMBC(0x1e5e)
+! return OK;
+!
+! case 'S': CASEMBC(0x15a) CASEMBC(0x15c) CASEMBC(0x15e)
+! CASEMBC(0x160) CASEMBC(0x1e60)
+! EMIT2('S'); EMITMBC(0x15a) EMITMBC(0x15c) EMITMBC(0x15e)
+! EMITMBC(0x160) EMITMBC(0x1e60)
+! return OK;
+!
+! case 'T': CASEMBC(0x162) CASEMBC(0x164) CASEMBC(0x166)
+! CASEMBC(0x1e6a) CASEMBC(0x1e6e)
+! EMIT2('T'); EMITMBC(0x162) EMITMBC(0x164) EMITMBC(0x166)
+! EMITMBC(0x1e6a) EMITMBC(0x1e6e)
+ return OK;
+
+ case 'U': case 0331: case 0332: case 0333: case 0334:
+! CASEMBC(0x168) CASEMBC(0x16a) CASEMBC(0x16c) CASEMBC(0x16e)
+! CASEMBC(0x170) CASEMBC(0x172) CASEMBC(0x1af) CASEMBC(0x1d3)
+! CASEMBC(0x1ee6)
+! EMIT2('U'); EMIT2(0331); EMIT2(0332); EMIT2(0333);
+! EMIT2(0334); EMITMBC(0x168) EMITMBC(0x16a)
+! EMITMBC(0x16c) EMITMBC(0x16e) EMITMBC(0x170)
+! EMITMBC(0x172) EMITMBC(0x1af) EMITMBC(0x1d3)
+! EMITMBC(0x1ee6)
+! return OK;
+!
+! case 'V': CASEMBC(0x1e7c)
+! EMIT2('V'); EMITMBC(0x1e7c)
+! return OK;
+!
+! case 'W': CASEMBC(0x174) CASEMBC(0x1e80) CASEMBC(0x1e82)
+! CASEMBC(0x1e84) CASEMBC(0x1e86)
+! EMIT2('W'); EMITMBC(0x174) EMITMBC(0x1e80) EMITMBC(0x1e82)
+! EMITMBC(0x1e84) EMITMBC(0x1e86)
+! return OK;
+!
+! case 'X': CASEMBC(0x1e8a) CASEMBC(0x1e8c)
+! EMIT2('X'); EMITMBC(0x1e8a) EMITMBC(0x1e8c)
+ return OK;
+
+ case 'Y': case 0335:
+! CASEMBC(0x176) CASEMBC(0x178) CASEMBC(0x1e8e) CASEMBC(0x1ef2)
+! CASEMBC(0x1ef6) CASEMBC(0x1ef8)
+! EMIT2('Y'); EMIT2(0335); EMITMBC(0x176) EMITMBC(0x178)
+! EMITMBC(0x1e8e) EMITMBC(0x1ef2) EMITMBC(0x1ef6)
+! EMITMBC(0x1ef8)
+! return OK;
+!
+! case 'Z': CASEMBC(0x179) CASEMBC(0x17b) CASEMBC(0x17d)
+! CASEMBC(0x1b5) CASEMBC(0x1e90) CASEMBC(0x1e94)
+! EMIT2('Z'); EMITMBC(0x179) EMITMBC(0x17b) EMITMBC(0x17d)
+! EMITMBC(0x1b5) EMITMBC(0x1e90) EMITMBC(0x1e94)
+ return OK;
+
+ case 'a': case 0340: case 0341: case 0342:
+ case 0343: case 0344: case 0345:
+! CASEMBC(0x101) CASEMBC(0x103) CASEMBC(0x105) CASEMBC(0x1ce)
+! CASEMBC(0x1df) CASEMBC(0x1e1) CASEMBC(0x1ea3)
+! EMIT2('a'); EMIT2(0340); EMIT2(0341); EMIT2(0342);
+! EMIT2(0343); EMIT2(0344); EMIT2(0345);
+! EMITMBC(0x101) EMITMBC(0x103) EMITMBC(0x105)
+! EMITMBC(0x1ce) EMITMBC(0x1df) EMITMBC(0x1e1)
+! EMITMBC(0x1ea3)
+! return OK;
+!
+! case 'b': CASEMBC(0x1e03) CASEMBC(0x1e07)
+! EMIT2('b'); EMITMBC(0x1e03) EMITMBC(0x1e07)
+ return OK;
+
+ case 'c': case 0347:
+! CASEMBC(0x107) CASEMBC(0x109) CASEMBC(0x10b) CASEMBC(0x10d)
+! EMIT2('c'); EMIT2(0347); EMITMBC(0x107) EMITMBC(0x109)
+! EMITMBC(0x10b) EMITMBC(0x10d)
+! return OK;
+!
+! case 'd': CASEMBC(0x10f) CASEMBC(0x111) CASEMBC(0x1d0b)
+! CASEMBC(0x1e11)
+! EMIT2('d'); EMITMBC(0x10f) EMITMBC(0x111) EMITMBC(0x1e0b)
+! EMITMBC(0x01e0f) EMITMBC(0x1e11)
+ return OK;
+
+ case 'e': case 0350: case 0351: case 0352: case 0353:
+! CASEMBC(0x113) CASEMBC(0x115) CASEMBC(0x117) CASEMBC(0x119)
+! CASEMBC(0x11b) CASEMBC(0x1ebb) CASEMBC(0x1ebd)
+! EMIT2('e'); EMIT2(0350); EMIT2(0351); EMIT2(0352);
+! EMIT2(0353); EMITMBC(0x113) EMITMBC(0x115)
+! EMITMBC(0x117) EMITMBC(0x119) EMITMBC(0x11b)
+! EMITMBC(0x1ebb) EMITMBC(0x1ebd)
+! return OK;
+!
+! case 'f': CASEMBC(0x1e1f)
+! EMIT2('f'); EMITMBC(0x1e1f)
+! return OK;
+!
+! case 'g': CASEMBC(0x11d) CASEMBC(0x11f) CASEMBC(0x121)
+! CASEMBC(0x123) CASEMBC(0x1e5) CASEMBC(0x1e7) CASEMBC(0x1f5)
+! CASEMBC(0x1e21)
+! EMIT2('g'); EMITMBC(0x11d) EMITMBC(0x11f) EMITMBC(0x121)
+! EMITMBC(0x123) EMITMBC(0x1e5) EMITMBC(0x1e7)
+! EMITMBC(0x1f5) EMITMBC(0x1e21)
+! return OK;
+!
+! case 'h': CASEMBC(0x125) CASEMBC(0x127) CASEMBC(0x1e23)
+! CASEMBC(0x1e27) CASEMBC(0x1e29) CASEMBC(0x1e96)
+! EMIT2('h'); EMITMBC(0x125) EMITMBC(0x127) EMITMBC(0x1e23)
+! EMITMBC(0x1e27) EMITMBC(0x1e29) EMITMBC(0x1e96)
+ return OK;
+
+ case 'i': case 0354: case 0355: case 0356: case 0357:
+! CASEMBC(0x129) CASEMBC(0x12b) CASEMBC(0x12d) CASEMBC(0x12f)
+! CASEMBC(0x1d0) CASEMBC(0x1ec9)
+! EMIT2('i'); EMIT2(0354); EMIT2(0355); EMIT2(0356);
+! EMIT2(0357); EMITMBC(0x129) EMITMBC(0x12b)
+! EMITMBC(0x12d) EMITMBC(0x12f) EMITMBC(0x1d0)
+! EMITMBC(0x1ec9)
+! return OK;
+!
+! case 'j': CASEMBC(0x135) CASEMBC(0x1f0)
+! EMIT2('j'); EMITMBC(0x135) EMITMBC(0x1f0)
+! return OK;
+!
+! case 'k': CASEMBC(0x137) CASEMBC(0x1e9) CASEMBC(0x1e31)
+! CASEMBC(0x1e35)
+! EMIT2('k'); EMITMBC(0x137) EMITMBC(0x1e9) EMITMBC(0x1e31)
+! EMITMBC(0x1e35)
+! return OK;
+!
+! case 'l': CASEMBC(0x13a) CASEMBC(0x13c) CASEMBC(0x13e)
+! CASEMBC(0x140) CASEMBC(0x142) CASEMBC(0x1e3b)
+! EMIT2('l'); EMITMBC(0x13a) EMITMBC(0x13c) EMITMBC(0x13e)
+! EMITMBC(0x140) EMITMBC(0x142) EMITMBC(0x1e3b)
+! return OK;
+!
+! case 'm': CASEMBC(0x1e3f) CASEMBC(0x1e41)
+! EMIT2('m'); EMITMBC(0x1e3f) EMITMBC(0x1e41)
+ return OK;
+
+ case 'n': case 0361:
+! CASEMBC(0x144) CASEMBC(0x146) CASEMBC(0x148) CASEMBC(0x149)
+! CASEMBC(0x1e45) CASEMBC(0x1e49)
+! EMIT2('n'); EMIT2(0361); EMITMBC(0x144) EMITMBC(0x146)
+! EMITMBC(0x148) EMITMBC(0x149) EMITMBC(0x1e45)
+! EMITMBC(0x1e49)
+ return OK;
+
+ case 'o': case 0362: case 0363: case 0364: case 0365:
+! case 0366: case 0370:
+! CASEMBC(0x14d) CASEMBC(0x14f) CASEMBC(0x151) CASEMBC(0x1a1)
+! CASEMBC(0x1d2) CASEMBC(0x1eb) CASEMBC(0x1ed) CASEMBC(0x1ecf)
+! EMIT2('o'); EMIT2(0362); EMIT2(0363); EMIT2(0364);
+! EMIT2(0365); EMIT2(0366); EMIT2(0370);
+! EMITMBC(0x14d) EMITMBC(0x14f) EMITMBC(0x151)
+! EMITMBC(0x1a1) EMITMBC(0x1d2) EMITMBC(0x1eb)
+! EMITMBC(0x1ed) EMITMBC(0x1ecf)
+! return OK;
+!
+! case 'p': CASEMBC(0x1e55) CASEMBC(0x1e57)
+! EMIT2('p'); EMITMBC(0x1e55) EMITMBC(0x1e57)
+! return OK;
+!
+! case 'r': CASEMBC(0x155) CASEMBC(0x157) CASEMBC(0x159)
+! CASEMBC(0x1e59) CASEMBC(0x1e5f)
+! EMIT2('r'); EMITMBC(0x155) EMITMBC(0x157) EMITMBC(0x159)
+! EMITMBC(0x1e59) EMITMBC(0x1e5f)
+! return OK;
+!
+! case 's': CASEMBC(0x15b) CASEMBC(0x15d) CASEMBC(0x15f)
+! CASEMBC(0x161) CASEMBC(0x1e61)
+! EMIT2('s'); EMITMBC(0x15b) EMITMBC(0x15d) EMITMBC(0x15f)
+! EMITMBC(0x161) EMITMBC(0x1e61)
+! return OK;
+!
+! case 't': CASEMBC(0x163) CASEMBC(0x165) CASEMBC(0x167)
+! CASEMBC(0x1e6b) CASEMBC(0x1e6f) CASEMBC(0x1e97)
+! EMIT2('t'); EMITMBC(0x163) EMITMBC(0x165) EMITMBC(0x167)
+! EMITMBC(0x1e6b) EMITMBC(0x1e6f) EMITMBC(0x1e97)
+ return OK;
+
+ case 'u': case 0371: case 0372: case 0373: case 0374:
+! CASEMBC(0x169) CASEMBC(0x16b) CASEMBC(0x16d) CASEMBC(0x16f)
+! CASEMBC(0x171) CASEMBC(0x173) CASEMBC(0x1b0) CASEMBC(0x1d4)
+! CASEMBC(0x1ee7)
+! EMIT2('u'); EMIT2(0371); EMIT2(0372); EMIT2(0373);
+! EMIT2(0374); EMITMBC(0x169) EMITMBC(0x16b)
+! EMITMBC(0x16d) EMITMBC(0x16f) EMITMBC(0x171)
+! EMITMBC(0x173) EMITMBC(0x1b0) EMITMBC(0x1d4)
+! EMITMBC(0x1ee7)
+! return OK;
+!
+! case 'v': CASEMBC(0x1e7d)
+! EMIT2('v'); EMITMBC(0x1e7d)
+! return OK;
+!
+! case 'w': CASEMBC(0x175) CASEMBC(0x1e81) CASEMBC(0x1e83)
+! CASEMBC(0x1e85) CASEMBC(0x1e87) CASEMBC(0x1e98)
+! EMIT2('w'); EMITMBC(0x175) EMITMBC(0x1e81) EMITMBC(0x1e83)
+! EMITMBC(0x1e85) EMITMBC(0x1e87) EMITMBC(0x1e98)
+! return OK;
+!
+! case 'x': CASEMBC(0x1e8b) CASEMBC(0x1e8d)
+! EMIT2('x'); EMITMBC(0x1e8b) EMITMBC(0x1e8d)
+ return OK;
+
+ case 'y': case 0375: case 0377:
+! CASEMBC(0x177) CASEMBC(0x1e8f) CASEMBC(0x1e99)
+! CASEMBC(0x1ef3) CASEMBC(0x1ef7) CASEMBC(0x1ef9)
+! EMIT2('y'); EMIT2(0375); EMIT2(0377); EMITMBC(0x177)
+! EMITMBC(0x1e8f) EMITMBC(0x1e99) EMITMBC(0x1ef3)
+! EMITMBC(0x1ef7) EMITMBC(0x1ef9)
+! return OK;
+!
+! case 'z': CASEMBC(0x17a) CASEMBC(0x17c) CASEMBC(0x17e)
+! CASEMBC(0x1b6) CASEMBC(0x1e91) CASEMBC(0x1e95)
+! EMIT2('z'); EMITMBC(0x17a) EMITMBC(0x17c) EMITMBC(0x17e)
+! EMITMBC(0x1b6) EMITMBC(0x1e91) EMITMBC(0x1e95)
+ return OK;
+
+! /* default: character itself */
+ }
+ }
+
+! EMIT2(c);
+ return OK;
+ #undef EMIT2
++ #undef EMITMBC
+ }
+
+ /*
+*** ../vim-7.4.027/src/testdir/test44.in 2013-05-26 14:16:31.000000000 +0200
+--- src/testdir/test44.in 2013-09-19 16:49:14.000000000 +0200
+***************
+*** 1,9 ****
+--- 1,11 ----
+ Tests for regexp with multi-byte encoding and various magic settings.
+ Test matchstr() with a count and multi-byte chars.
++ See test99 for exactly the same test with re=2.
+
+ STARTTEST
+ :so mbyte.vim
+ :set nocompatible encoding=utf-8 termencoding=latin1 viminfo+=nviminfo
++ :set re=1
+ /^1
+ /a*b\{2}c\+/e
+ x/\Md\*e\{2}f\+/e
+*** ../vim-7.4.027/src/testdir/test99.in 2013-09-19 16:59:30.000000000 +0200
+--- src/testdir/test99.in 2013-09-19 16:50:00.000000000 +0200
+***************
+*** 0 ****
+--- 1,68 ----
++ Tests for regexp with multi-byte encoding and various magic settings.
++ Test matchstr() with a count and multi-byte chars.
++ See test44 for exactly the same test with re=1.
++
++ STARTTEST
++ :so mbyte.vim
++ :set nocompatible encoding=utf-8 termencoding=latin1 viminfo+=nviminfo
++ :set re=2
++ /^1
++ /a*b\{2}c\+/e
++ x/\Md\*e\{2}f\+/e
++ x:set nomagic
++ /g\*h\{2}i\+/e
++ x/\mj*k\{2}l\+/e
++ x/\vm*n{2}o+/e
++ x/\V^aa$
++ x:set magic
++ /\v(a)(b)\2\1\1/e
++ x/\V[ab]\(\[xy]\)\1
++ x:" Now search for multi-byte without composing char
++ /ม
++ x:" Now search for multi-byte with composing char
++ /ม่
++ x:" find word by change of word class
++ /ã¡\<カヨ\>ã¯
++ x:" Test \%u, [\u] and friends
++ /\%u20ac
++ x/[\u4f7f\u5929]\+
++ x/\%U12345678
++ x/[\U1234abcd\u1234\uabcd]
++ x/\%d21879b
++ x/ [[=A=]]* [[=B=]]* [[=C=]]* [[=D=]]* [[=E=]]* [[=F=]]* [[=G=]]* [[=H=]]* [[=I=]]* [[=J=]]* [[=K=]]* [[=L=]]* [[=M=]]* [[=N=]]* [[=O=]]* [[=P=]]* [[=Q=]]* [[=R=]]* [[=S=]]* [[=T=]]* [[=U=]]* [[=V=]]* [[=W=]]* [[=X=]]* [[=Y=]]* [[=Z=]]*/e
++ x/ [[=a=]]* [[=b=]]* [[=c=]]* [[=d=]]* [[=e=]]* [[=f=]]* [[=g=]]* [[=h=]]* [[=i=]]* [[=j=]]* [[=k=]]* [[=l=]]* [[=m=]]* [[=n=]]* [[=o=]]* [[=p=]]* [[=q=]]* [[=r=]]* [[=s=]]* [[=t=]]* [[=u=]]* [[=v=]]* [[=w=]]* [[=x=]]* [[=y=]]* [[=z=]]*/e
++ x:" Test backwards search from a multi-byte char
++ /x
++ x?.
++ x:let @w=':%s#comb[i]nations#Å“Ì„á¹£Ìm̥̄ᾱ̆Ì#g'
++ :@w
++ :?^1?,$w! test.out
++ :e! test.out
++ G:put =matchstr(\"×בגד\", \".\", 0, 2) " ב
++ :put =matchstr(\"×בגד\", \"..\", 0, 2) " בג
++ :put =matchstr(\"×בגד\", \".\", 0, 0) " ×
++ :put =matchstr(\"×בגד\", \".\", 4, -1) " ×’
++ :w!
++ :qa!
++ ENDTEST
++
++ 1 a aa abb abbccc
++ 2 d dd dee deefff
++ 3 g gg ghh ghhiii
++ 4 j jj jkk jkklll
++ 5 m mm mnn mnnooo
++ 6 x ^aa$ x
++ 7 (a)(b) abbaa
++ 8 axx [ab]xx
++ 9 หม่x อมx
++ a อมx หม่x
++ b ã¡ã‚«ãƒ¨ã¯
++ c x ¬€x
++ d 天使x
++ e ü’…™¸y
++ f ü’Š¯z
++ g aå•·bb
++ h AÀÃÂÃÄÅĀĂĄÇǞǠẢ BḂḆ CÇĆĈĊČ DÄŽÄḊḎḠEÈÉÊËĒĔĖĘĚẺẼ FḞ GĜĞĠĢǤǦǴḠ HĤĦḢḦḨ IÃŒÃÃŽÃĨĪĬĮİÇỈ JÄ´ KĶǨḰḴ LĹĻĽĿÅḺ MḾṀ NÑŃŅŇṄṈ OÒÓÔÕÖØŌŎÅƠǑǪǬỎ PṔṖ Q RŔŖŘṘṞ SŚŜŞŠṠ TŢŤŦṪṮ UÙÚÛÜŨŪŬŮŰŲƯǓỦ Vá¹¼ WŴẀẂẄẆ XẊẌ YÃŶŸẎỲỶỸ ZŹŻŽƵáºáº”
++ i aàáâãäåÄăąǎǟǡả bḃḇ cÃ§Ä‡Ä‰Ä‹Ä dÄđḋá¸á¸‘ eèéêëēĕėęěẻẽ fḟ gÄğġģǥǧǵḡ hĥħḣḧḩẖ iìíîïĩīĭįÇỉ jĵǰ kķǩḱḵ lĺļľŀłḻ mḿṠnñńņňʼnṅṉ oòóôõöøÅÅÅ‘Æ¡Ç’Ç«Ç­á» pṕṗ q rŕŗřṙṟ sÅ›Åşšṡ tţťŧṫṯẗ uùúûüũūŭůűųưǔủ vá¹½ wŵáºáºƒáº…ẇẘ xẋẠyýÿŷáºáº™á»³á»·á»¹ zźżžƶẑẕ
++ j 0123â¤x
++ k combinations
+*** ../vim-7.4.027/src/testdir/test99.ok 2013-09-19 16:59:30.000000000 +0200
+--- src/testdir/test99.ok 2013-09-19 16:50:16.000000000 +0200
+***************
+*** 0 ****
+--- 1,24 ----
++ 1 a aa abb abbcc
++ 2 d dd dee deeff
++ 3 g gg ghh ghhii
++ 4 j jj jkk jkkll
++ 5 m mm mnn mnnoo
++ 6 x aa$ x
++ 7 (a)(b) abba
++ 8 axx ab]xx
++ 9 หม่x อx
++ a อมx หx
++ b カヨã¯
++ c x ¬x
++ d 使x
++ e y
++ f z
++ g abb
++ h AÀÃÂÃÄÅĀĂĄÇǞǠẢ BḂḆ CÇĆĈĊČ DÄŽÄḊḎḠEÈÉÊËĒĔĖĘĚẺẼ FḞ GĜĞĠĢǤǦǴḠ HĤĦḢḦḨ IÃŒÃÃŽÃĨĪĬĮİÇỈ JÄ´ KĶǨḰḴ LĹĻĽĿÅḺ MḾṀ NÑŃŅŇṄṈ OÒÓÔÕÖØŌŎÅƠǑǪǬỎ PṔṖ Q RŔŖŘṘṞ SŚŜŞŠṠ TŢŤŦṪṮ UÙÚÛÜŨŪŬŮŰŲƯǓỦ Vá¹¼ WŴẀẂẄẆ XẊẌ YÃŶŸẎỲỶỸ ZŹŻŽƵáº
++ i aàáâãäåÄăąǎǟǡả bḃḇ cÃ§Ä‡Ä‰Ä‹Ä dÄđḋá¸á¸‘ eèéêëēĕėęěẻẽ fḟ gÄğġģǥǧǵḡ hĥħḣḧḩẖ iìíîïĩīĭįÇỉ jĵǰ kķǩḱḵ lĺļľŀłḻ mḿṠnñńņňʼnṅṉ oòóôõöøÅÅÅ‘Æ¡Ç’Ç«Ç­á» pṕṗ q rŕŗřṙṟ sÅ›Åşšṡ tţťŧṫṯẗ uùúûüũūŭůűųưǔủ vá¹½ wŵáºáºƒáº…ẇẘ xẋẠyýÿŷáºáº™á»³á»·á»¹ zźżžƶẑ
++ j 012â¤
++ k Å“Ì„á¹£Ìm̥̄ᾱ̆Ì
++ ב
++ בג
++ ×
++ ×’
+*** ../vim-7.4.027/src/testdir/Make_amiga.mak 2013-07-09 13:40:02.000000000 +0200
+--- src/testdir/Make_amiga.mak 2013-09-19 16:51:48.000000000 +0200
+***************
+*** 33,39 ****
+ test76.out test77.out test78.out test79.out test80.out \
+ test81.out test82.out test83.out test84.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+! test94.out test95.out test96.out test97.out test98.out
+
+ .SUFFIXES: .in .out
+
+--- 33,40 ----
+ test76.out test77.out test78.out test79.out test80.out \
+ test81.out test82.out test83.out test84.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+! test94.out test95.out test96.out test97.out test98.out \
+! test99.out
+
+ .SUFFIXES: .in .out
+
+***************
+*** 148,150 ****
+--- 149,152 ----
+ test96.out: test96.in
+ test97.out: test97.in
+ test98.out: test98.in
++ test99.out: test99.in
+*** ../vim-7.4.027/src/testdir/Make_dos.mak 2013-07-09 13:40:30.000000000 +0200
+--- src/testdir/Make_dos.mak 2013-09-19 16:51:56.000000000 +0200
+***************
+*** 32,38 ****
+ test79.out test80.out test81.out test82.out test83.out \
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+! test94.out test95.out test96.out test98.out
+
+ SCRIPTS32 = test50.out test70.out
+
+--- 32,38 ----
+ test79.out test80.out test81.out test82.out test83.out \
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+! test94.out test95.out test96.out test98.out test99.out
+
+ SCRIPTS32 = test50.out test70.out
+
+*** ../vim-7.4.027/src/testdir/Make_ming.mak 2013-07-09 13:40:38.000000000 +0200
+--- src/testdir/Make_ming.mak 2013-09-19 16:52:01.000000000 +0200
+***************
+*** 52,58 ****
+ test79.out test80.out test81.out test82.out test83.out \
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+! test94.out test95.out test96.out test98.out
+
+ SCRIPTS32 = test50.out test70.out
+
+--- 52,58 ----
+ test79.out test80.out test81.out test82.out test83.out \
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+! test94.out test95.out test96.out test98.out test99.out
+
+ SCRIPTS32 = test50.out test70.out
+
+*** ../vim-7.4.027/src/testdir/Make_os2.mak 2013-07-09 13:40:43.000000000 +0200
+--- src/testdir/Make_os2.mak 2013-09-19 16:52:07.000000000 +0200
+***************
+*** 34,40 ****
+ test76.out test77.out test78.out test79.out test80.out \
+ test81.out test82.out test83.out test84.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+! test94.out test95.out test96.out test98.out
+
+ .SUFFIXES: .in .out
+
+--- 34,40 ----
+ test76.out test77.out test78.out test79.out test80.out \
+ test81.out test82.out test83.out test84.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+! test94.out test95.out test96.out test98.out test99.out
+
+ .SUFFIXES: .in .out
+
+*** ../vim-7.4.027/src/testdir/Make_vms.mms 2013-07-09 13:40:47.000000000 +0200
+--- src/testdir/Make_vms.mms 2013-09-19 16:52:13.000000000 +0200
+***************
+*** 4,10 ****
+ # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
+ # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
+ #
+! # Last change: 2013 Jul 09
+ #
+ # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
+ # Edit the lines in the Configuration section below to select.
+--- 4,10 ----
+ # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
+ # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
+ #
+! # Last change: 2013 Sep 19
+ #
+ # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
+ # Edit the lines in the Configuration section below to select.
+***************
+*** 78,84 ****
+ test77.out test78.out test79.out test80.out test81.out \
+ test82.out test83.out test84.out test88.out test89.out \
+ test90.out test91.out test92.out test93.out test94.out \
+! test95.out test96.out test97.out test98.out
+
+ # Known problems:
+ # Test 30: a problem around mac format - unknown reason
+--- 78,84 ----
+ test77.out test78.out test79.out test80.out test81.out \
+ test82.out test83.out test84.out test88.out test89.out \
+ test90.out test91.out test92.out test93.out test94.out \
+! test95.out test96.out test97.out test98.out test99.out
+
+ # Known problems:
+ # Test 30: a problem around mac format - unknown reason
+*** ../vim-7.4.027/src/testdir/Makefile 2013-08-10 14:20:20.000000000 +0200
+--- src/testdir/Makefile 2013-09-19 16:52:22.000000000 +0200
+***************
+*** 29,35 ****
+ test79.out test80.out test81.out test82.out test83.out \
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+! test94.out test95.out test96.out test97.out test98.out
+
+ SCRIPTS_GUI = test16.out
+
+--- 29,36 ----
+ test79.out test80.out test81.out test82.out test83.out \
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+! test94.out test95.out test96.out test97.out test98.out \
+! test99.out
+
+ SCRIPTS_GUI = test16.out
+
+*** ../vim-7.4.027/src/version.c 2013-09-08 20:00:45.000000000 +0200
+--- src/version.c 2013-09-19 13:54:35.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 28,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+232. You start conversations with, "Have you gotten an ISDN line?"
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.029 b/patches/source/vim/patches/7.4.029
new file mode 100644
index 000000000..b87e3a356
--- /dev/null
+++ b/patches/source/vim/patches/7.4.029
@@ -0,0 +1,63 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.029
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.029
+Problem: An error in a pattern is reported twice.
+Solution: Remove the retry with the backtracking engine, it won't work.
+Files: src/regexp.c
+
+
+*** ../vim-7.4.028/src/regexp.c 2013-08-25 17:01:36.000000000 +0200
+--- src/regexp.c 2013-09-19 17:03:31.000000000 +0200
+***************
+*** 8016,8027 ****
+ }
+ #endif
+ /*
+! * If NFA engine failed, then revert to the backtracking engine.
+! * Except when there was a syntax error, which was properly handled by
+! * NFA engine.
+! */
+ if (regexp_engine == AUTOMATIC_ENGINE)
+ prog = bt_regengine.regcomp(expr, re_flags);
+ }
+
+ return prog;
+--- 8016,8026 ----
+ }
+ #endif
+ /*
+! * If the NFA engine failed, the backtracking engine won't work either.
+! *
+ if (regexp_engine == AUTOMATIC_ENGINE)
+ prog = bt_regengine.regcomp(expr, re_flags);
++ */
+ }
+
+ return prog;
+*** ../vim-7.4.028/src/version.c 2013-09-19 17:00:14.000000000 +0200
+--- src/version.c 2013-09-19 17:01:13.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 29,
+ /**/
+
+--
+The term "free software" is defined by Richard M. Stallman as
+being software that isn't necessarily for free. Confusing?
+Let's call it "Stallman software" then!
+ -- Bram Moolenaar
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.030 b/patches/source/vim/patches/7.4.030
new file mode 100644
index 000000000..d685df673
--- /dev/null
+++ b/patches/source/vim/patches/7.4.030
@@ -0,0 +1,109 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.030
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.030
+Problem: The -mno-cygwin argument is no longer supported by Cygwin.
+Solution: Remove the arguments. (Steve Hall)
+Files: src/GvimExt/Make_cyg.mak, src/Make_cyg.mak, src/xxd/Make_cyg.mak
+
+
+*** ../vim-7.4.029/src/GvimExt/Make_cyg.mak 2011-09-30 16:45:49.000000000 +0200
+--- src/GvimExt/Make_cyg.mak 2013-09-19 20:46:46.000000000 +0200
+***************
+*** 31,42 ****
+ ifeq ($(CROSS),yes)
+ DEL = rm
+ ifeq ($(MINGWOLD),yes)
+! CXXFLAGS := -O2 -mno-cygwin -fvtable-thunks
+ else
+! CXXFLAGS := -O2 -mno-cygwin
+ endif
+ else
+! CXXFLAGS := -O2 -mno-cygwin
+ ifneq (sh.exe, $(SHELL))
+ DEL = rm
+ else
+--- 31,42 ----
+ ifeq ($(CROSS),yes)
+ DEL = rm
+ ifeq ($(MINGWOLD),yes)
+! CXXFLAGS := -O2 -fvtable-thunks
+ else
+! CXXFLAGS := -O2
+ endif
+ else
+! CXXFLAGS := -O2
+ ifneq (sh.exe, $(SHELL))
+ DEL = rm
+ else
+*** ../vim-7.4.029/src/Make_cyg.mak 2013-07-06 13:32:11.000000000 +0200
+--- src/Make_cyg.mak 2013-09-19 20:46:55.000000000 +0200
+***************
+*** 1,6 ****
+ #
+ # Makefile for VIM on Win32, using Cygnus gcc
+! # Last updated by Dan Sharp. Last Change: 2013 Apr 22
+ #
+ # Also read INSTALLpc.txt!
+ #
+--- 1,6 ----
+ #
+ # Makefile for VIM on Win32, using Cygnus gcc
+! # Last updated by Dan Sharp. Last Change: 2013 Sep 19
+ #
+ # Also read INSTALLpc.txt!
+ #
+***************
+*** 439,446 ****
+ ##############################
+ ifeq (yes, $(USEDLL))
+ DEFINES += -D_MAX_PATH=256 -D__CYGWIN__
+- else
+- INCLUDES += -mno-cygwin
+ endif
+
+ ##############################
+--- 439,444 ----
+*** ../vim-7.4.029/src/xxd/Make_cyg.mak 2010-05-15 13:04:06.000000000 +0200
+--- src/xxd/Make_cyg.mak 2013-09-19 20:47:05.000000000 +0200
+***************
+*** 8,14 ****
+ DEFINES =
+ LIBS = -lc
+ else
+! DEFINES = -mno-cygwin
+ LIBS =
+ endif
+
+--- 8,14 ----
+ DEFINES =
+ LIBS = -lc
+ else
+! DEFINES =
+ LIBS =
+ endif
+
+*** ../vim-7.4.029/src/version.c 2013-09-19 17:03:57.000000000 +0200
+--- src/version.c 2013-09-19 20:46:32.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 30,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+237. You tattoo your email address on your forehead.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.031 b/patches/source/vim/patches/7.4.031
new file mode 100644
index 000000000..f4e49d86b
--- /dev/null
+++ b/patches/source/vim/patches/7.4.031
@@ -0,0 +1,54 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.031
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.031
+Problem: ":diffoff!" resets options even when 'diff' is not set. (Charles
+ Cooper)
+Solution: Only resets related options in a window where 'diff' is set.
+Files: src/diff.c
+
+
+*** ../vim-7.4.030/src/diff.c 2013-07-17 13:43:15.000000000 +0200
+--- src/diff.c 2013-09-20 19:58:47.000000000 +0200
+***************
+*** 1203,1209 ****
+
+ for (wp = firstwin; wp != NULL; wp = wp->w_next)
+ {
+! if (wp == curwin || (eap->forceit && wp->w_p_diff))
+ {
+ /* Set 'diff', 'scrollbind' off and 'wrap' on. If option values
+ * were saved in diff_win_options() restore them. */
+--- 1203,1209 ----
+
+ for (wp = firstwin; wp != NULL; wp = wp->w_next)
+ {
+! if (eap->forceit ? wp->w_p_diff : wp == curwin)
+ {
+ /* Set 'diff', 'scrollbind' off and 'wrap' on. If option values
+ * were saved in diff_win_options() restore them. */
+*** ../vim-7.4.030/src/version.c 2013-09-19 20:48:59.000000000 +0200
+--- src/version.c 2013-09-20 19:59:45.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 31,
+ /**/
+
+--
+"Marriage is a wonderful institution...
+but who wants to live in an institution?"
+ - Groucho Marx
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.032 b/patches/source/vim/patches/7.4.032
new file mode 100644
index 000000000..9e25dc4ee
--- /dev/null
+++ b/patches/source/vim/patches/7.4.032
@@ -0,0 +1,82 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.032
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.032
+Problem: NFA engine does not match the NUL character. (Jonathon Merz)
+Solution: Ues 0x0a instead of NUL. (Christian Brabandt)
+Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok
+
+
+*** ../vim-7.4.031/src/regexp_nfa.c 2013-09-19 17:00:14.000000000 +0200
+--- src/regexp_nfa.c 2013-09-22 13:53:46.000000000 +0200
+***************
+*** 1383,1390 ****
+ EMSG2_RET_FAIL(
+ _("E678: Invalid character after %s%%[dxouU]"),
+ reg_magic == MAGIC_ALL);
+ /* TODO: what if a composing character follows? */
+! EMIT(nr);
+ }
+ break;
+
+--- 1383,1391 ----
+ EMSG2_RET_FAIL(
+ _("E678: Invalid character after %s%%[dxouU]"),
+ reg_magic == MAGIC_ALL);
++ /* A NUL is stored in the text as NL */
+ /* TODO: what if a composing character follows? */
+! EMIT(nr == 0 ? 0x0a : nr);
+ }
+ break;
+
+*** ../vim-7.4.031/src/testdir/test64.in 2013-09-05 21:15:38.000000000 +0200
+--- src/testdir/test64.in 2013-09-22 13:51:53.000000000 +0200
+***************
+*** 373,378 ****
+--- 373,379 ----
+ :call add(tl, [2, '\%x20', 'yes no', ' '])
+ :call add(tl, [2, '\%u0020', 'yes no', ' '])
+ :call add(tl, [2, '\%U00000020', 'yes no', ' '])
++ :call add(tl, [2, '\%d0', "yes\x0ano", "\x0a"])
+ :"
+ :""""" \%[abc]
+ :call add(tl, [2, 'foo\%[bar]', 'fobar'])
+*** ../vim-7.4.031/src/testdir/test64.ok 2013-09-05 21:15:38.000000000 +0200
+--- src/testdir/test64.ok 2013-09-22 13:52:41.000000000 +0200
+***************
+*** 863,868 ****
+--- 863,871 ----
+ OK 0 - \%U00000020
+ OK 1 - \%U00000020
+ OK 2 - \%U00000020
++ OK 0 - \%d0
++ OK 1 - \%d0
++ OK 2 - \%d0
+ OK 0 - foo\%[bar]
+ OK 1 - foo\%[bar]
+ OK 2 - foo\%[bar]
+*** ../vim-7.4.031/src/version.c 2013-09-20 20:13:48.000000000 +0200
+--- src/version.c 2013-09-22 13:56:45.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 32,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+247. You use www.switchboard.com instead of dialing 411 and 555-12-12
+ for directory assistance.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.033 b/patches/source/vim/patches/7.4.033
new file mode 100644
index 000000000..7eba8a0af
--- /dev/null
+++ b/patches/source/vim/patches/7.4.033
@@ -0,0 +1,116 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.033
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.033
+Problem: When the terminal has only 20 lines test 92 and 93 overwrite the
+ input file.
+Solution: Explicitly write test.out. Check that the terminal is large enough
+ to run the tests. (Hirohito Higashi)
+Files: src/testdir/test92.in, src/testdir/test93.in,
+ src/testdir/test1.in, src/testdir/Makefile
+
+
+*** ../vim-7.4.032/src/testdir/test92.in 2013-04-18 23:33:45.000000000 +0200
+--- src/testdir/test92.in 2013-09-22 14:45:06.000000000 +0200
+***************
+*** 33,39 ****
+ :mksession! test.out
+ :new test.out
+ :v/\(^ *normal! 0\|^ *exe 'normal!\)/d
+! :w
+ :qa!
+ ENDTEST
+
+--- 33,39 ----
+ :mksession! test.out
+ :new test.out
+ :v/\(^ *normal! 0\|^ *exe 'normal!\)/d
+! :w! test.out
+ :qa!
+ ENDTEST
+
+*** ../vim-7.4.032/src/testdir/test93.in 2013-02-26 17:13:01.000000000 +0100
+--- src/testdir/test93.in 2013-09-22 14:45:17.000000000 +0200
+***************
+*** 33,39 ****
+ :mksession! test.out
+ :new test.out
+ :v/\(^ *normal! 0\|^ *exe 'normal!\)/d
+! :w
+ :qa!
+ ENDTEST
+
+--- 33,39 ----
+ :mksession! test.out
+ :new test.out
+ :v/\(^ *normal! 0\|^ *exe 'normal!\)/d
+! :w! test.out
+ :qa!
+ ENDTEST
+
+*** ../vim-7.4.032/src/testdir/test1.in 2012-04-05 16:37:37.000000000 +0200
+--- src/testdir/test1.in 2013-09-22 14:52:43.000000000 +0200
+***************
+*** 18,23 ****
+--- 18,27 ----
+ Similar logic is applied to the +lua feature, using lua.vim.
+
+ STARTTEST
++ :" If columns or lines are too small, create wrongtermsize.
++ :" (Some tests will fail. When columns and/or lines are small)
++ :if &lines < 24 || &columns < 80 | sp another | w! wrongtermsize | qa! | endif
++ :"
+ :" Write a single line to test.out to check if testing works at all.
+ :%d
+ athis is a test:w! test.out
+*** ../vim-7.4.032/src/testdir/Makefile 2013-09-19 17:00:14.000000000 +0200
+--- src/testdir/Makefile 2013-09-22 14:54:39.000000000 +0200
+***************
+*** 58,66 ****
+ -rm -rf *.out *.failed *.rej *.orig test.log $(RM_ON_RUN) $(RM_ON_START) valgrind.*
+
+ test1.out: test1.in
+! -rm -rf $*.failed $(RM_ON_RUN) $(RM_ON_START)
+ $(RUN_VIM) $*.in
+! @/bin/sh -c "if diff test.out $*.ok; \
+ then mv -f test.out $*.out; \
+ else echo; \
+ echo test1 FAILED - Something basic is wrong; \
+--- 58,70 ----
+ -rm -rf *.out *.failed *.rej *.orig test.log $(RM_ON_RUN) $(RM_ON_START) valgrind.*
+
+ test1.out: test1.in
+! -rm -rf $*.failed $(RM_ON_RUN) $(RM_ON_START) wrongtermsize
+ $(RUN_VIM) $*.in
+! @/bin/sh -c "if test -e wrongtermsize; \
+! then echo; \
+! echo test1 FAILED - terminal size must be 80x24 or larger; \
+! echo; exit 1; \
+! elif diff test.out $*.ok; \
+ then mv -f test.out $*.out; \
+ else echo; \
+ echo test1 FAILED - Something basic is wrong; \
+*** ../vim-7.4.032/src/version.c 2013-09-22 13:57:19.000000000 +0200
+--- src/version.c 2013-09-22 15:02:04.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 33,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+248. You sign your letters with your e-mail address instead of your name.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.034 b/patches/source/vim/patches/7.4.034
new file mode 100644
index 000000000..f111e1161
--- /dev/null
+++ b/patches/source/vim/patches/7.4.034
@@ -0,0 +1,180 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.034
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.034
+Problem: Using "p" in Visual block mode only changes the first line.
+Solution: Repeat the put in all text in the block. (Christian Brabandt)
+Files: runtime/doc/change.txt, src/ops.c, src/normal.c,
+ src/testdir/test20.in, src/testdir/test20.ok
+
+
+*** ../vim-7.4.033/runtime/doc/change.txt 2013-08-10 13:24:52.000000000 +0200
+--- runtime/doc/change.txt 2013-09-22 15:12:20.000000000 +0200
+***************
+*** 1069,1074 ****
+--- 1069,1079 ----
+ replace and use "0p . You can repeat this as many times as you like, the
+ unnamed register will be changed each time.
+
++ When you use a blockwise Visual mode command and yank only a single line into
++ a register, a paste on a visual selected area will paste that single line on
++ each of the selected lines (thus replacing the blockwise selected region by a
++ block of the pasted line).
++
+ *blockwise-register*
+ If you use a blockwise Visual mode command to get the text into the register,
+ the block of text will be inserted before ("P") or after ("p") the cursor
+*** ../vim-7.4.033/src/ops.c 2013-08-09 19:34:32.000000000 +0200
+--- src/ops.c 2013-09-22 15:18:03.000000000 +0200
+***************
+*** 3776,3800 ****
+ */
+ if (y_type == MCHAR && y_size == 1)
+ {
+! totlen = count * yanklen;
+! if (totlen)
+! {
+! oldp = ml_get(lnum);
+! newp = alloc_check((unsigned)(STRLEN(oldp) + totlen + 1));
+! if (newp == NULL)
+! goto end; /* alloc() will give error message */
+! mch_memmove(newp, oldp, (size_t)col);
+! ptr = newp + col;
+! for (i = 0; i < count; ++i)
+ {
+! mch_memmove(ptr, y_array[0], (size_t)yanklen);
+! ptr += yanklen;
+ }
+! STRMOVE(ptr, oldp + col);
+! ml_replace(lnum, newp, FALSE);
+! /* Put cursor on last putted char. */
+! curwin->w_cursor.col += (colnr_T)(totlen - 1);
+! }
+ curbuf->b_op_end = curwin->w_cursor;
+ /* For "CTRL-O p" in Insert mode, put cursor after last char */
+ if (totlen && (restart_edit != 0 || (flags & PUT_CURSEND)))
+--- 3776,3817 ----
+ */
+ if (y_type == MCHAR && y_size == 1)
+ {
+! do {
+! totlen = count * yanklen;
+! if (totlen > 0)
+ {
+! oldp = ml_get(lnum);
+! newp = alloc_check((unsigned)(STRLEN(oldp) + totlen + 1));
+! if (newp == NULL)
+! goto end; /* alloc() gave an error message */
+! mch_memmove(newp, oldp, (size_t)col);
+! ptr = newp + col;
+! for (i = 0; i < count; ++i)
+! {
+! mch_memmove(ptr, y_array[0], (size_t)yanklen);
+! ptr += yanklen;
+! }
+! STRMOVE(ptr, oldp + col);
+! ml_replace(lnum, newp, FALSE);
+! /* Place cursor on last putted char. */
+! if (lnum == curwin->w_cursor.lnum)
+! curwin->w_cursor.col += (colnr_T)(totlen - 1);
+ }
+! #ifdef FEAT_VISUAL
+! if (VIsual_active)
+! lnum++;
+! #endif
+! } while (
+! #ifdef FEAT_VISUAL
+! VIsual_active && lnum <= curbuf->b_visual.vi_end.lnum
+! #else
+! FALSE /* stop after 1 paste */
+! #endif
+! );
+! #ifdef FEAT_VISUAL
+! VIsual_active = FALSE;
+! #endif
+!
+ curbuf->b_op_end = curwin->w_cursor;
+ /* For "CTRL-O p" in Insert mode, put cursor after last char */
+ if (totlen && (restart_edit != 0 || (flags & PUT_CURSEND)))
+*** ../vim-7.4.033/src/normal.c 2013-07-14 13:24:37.000000000 +0200
+--- src/normal.c 2013-09-22 15:15:18.000000000 +0200
+***************
+*** 9518,9523 ****
+--- 9518,9525 ----
+ /* cursor is at the end of the line or end of file, put
+ * forward. */
+ dir = FORWARD;
++ /* May have been reset in do_put(). */
++ VIsual_active = TRUE;
+ }
+ #endif
+ do_put(cap->oap->regname, dir, cap->count1, flags);
+*** ../vim-7.4.033/src/testdir/test20.in 2010-05-15 13:04:10.000000000 +0200
+--- src/testdir/test20.in 2013-09-22 15:11:37.000000000 +0200
+***************
+*** 9,19 ****
+ @auY:quit!
+ GP
+ /start here$
+! jjlld
+! :/here$/,$-1w! test.out
+ :qa!
+ ENDTEST
+
+ test text test tex start here
+ some text
+ test text
+--- 9,25 ----
+ @auY:quit!
+ GP
+ /start here$
+! "by$jjlld
+! /456$
+! jj"bP
+! :/56$/,$-1w! test.out
+ :qa!
+ ENDTEST
+
++ 123456
++ 234567
++ 345678
++
+ test text test tex start here
+ some text
+ test text
+*** ../vim-7.4.033/src/testdir/test20.ok 2010-05-15 13:04:10.000000000 +0200
+--- src/testdir/test20.ok 2013-09-22 15:11:37.000000000 +0200
+***************
+*** 1,3 ****
+--- 1,7 ----
++ 123start here56
++ 234start here67
++ 345start here78
++
+ test text test tex rt here
+ somext
+ tesext
+*** ../vim-7.4.033/src/version.c 2013-09-22 15:03:34.000000000 +0200
+--- src/version.c 2013-09-22 15:14:04.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 34,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+249. You've forgotten what the outside looks like.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.035 b/patches/source/vim/patches/7.4.035
new file mode 100644
index 000000000..9c4664a6e
--- /dev/null
+++ b/patches/source/vim/patches/7.4.035
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.035
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.035
+Problem: MS-Windows: The mouse pointer flickers when going from command
+ line mode to Normal mode.
+Solution: Check for WM_NCMOUSEMOVE. (Ken Takata)
+Files: src/gui_w48.c
+
+
+*** ../vim-7.4.034/src/gui_w48.c 2013-08-10 13:36:45.000000000 +0200
+--- src/gui_w48.c 2013-09-22 15:41:56.000000000 +0200
+***************
+*** 1008,1014 ****
+ static LPARAM last_lParam = 0L;
+
+ /* We sometimes get a mousemove when the mouse didn't move... */
+! if (uMsg == WM_MOUSEMOVE)
+ {
+ if (lParam == last_lParam)
+ return;
+--- 1008,1014 ----
+ static LPARAM last_lParam = 0L;
+
+ /* We sometimes get a mousemove when the mouse didn't move... */
+! if (uMsg == WM_MOUSEMOVE || uMsg == WM_NCMOUSEMOVE)
+ {
+ if (lParam == last_lParam)
+ return;
+*** ../vim-7.4.034/src/version.c 2013-09-22 15:23:38.000000000 +0200
+--- src/version.c 2013-09-22 15:41:29.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 35,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+251. You've never seen your closest friends who usually live WAY too far away.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.036 b/patches/source/vim/patches/7.4.036
new file mode 100644
index 000000000..49afc269a
--- /dev/null
+++ b/patches/source/vim/patches/7.4.036
@@ -0,0 +1,273 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.036
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.036
+Problem: NFA engine does not capture group correctly when using \@>. (ZyX)
+Solution: Copy submatches before doing the recursive match.
+Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok
+
+
+*** ../vim-7.4.035/src/regexp_nfa.c 2013-09-22 13:57:19.000000000 +0200
+--- src/regexp_nfa.c 2013-09-25 16:35:54.000000000 +0200
+***************
+*** 36,42 ****
+ {
+ NFA_SPLIT = -1024,
+ NFA_MATCH,
+! NFA_SKIP_CHAR, /* matches a 0-length char */
+
+ NFA_START_COLL, /* [abc] start */
+ NFA_END_COLL, /* [abc] end */
+--- 36,42 ----
+ {
+ NFA_SPLIT = -1024,
+ NFA_MATCH,
+! NFA_EMPTY, /* matches 0-length */
+
+ NFA_START_COLL, /* [abc] start */
+ NFA_END_COLL, /* [abc] end */
+***************
+*** 2005,2012 ****
+ {
+ /* Ignore result of previous call to nfa_regatom() */
+ post_ptr = post_start + my_post_start;
+! /* NFA_SKIP_CHAR has 0-length and works everywhere */
+! EMIT(NFA_SKIP_CHAR);
+ return OK;
+ }
+
+--- 2005,2012 ----
+ {
+ /* Ignore result of previous call to nfa_regatom() */
+ post_ptr = post_start + my_post_start;
+! /* NFA_EMPTY is 0-length and works everywhere */
+! EMIT(NFA_EMPTY);
+ return OK;
+ }
+
+***************
+*** 2170,2185 ****
+ old_post_pos = (int)(post_ptr - post_start);
+ if (nfa_regconcat() == FAIL)
+ return FAIL;
+! /* if concat is empty, skip a input char. But do emit a node */
+ if (old_post_pos == (int)(post_ptr - post_start))
+! EMIT(NFA_SKIP_CHAR);
+ EMIT(NFA_CONCAT);
+ ch = peekchr();
+ }
+
+! /* Even if a branch is empty, emit one node for it */
+ if (old_post_pos == (int)(post_ptr - post_start))
+! EMIT(NFA_SKIP_CHAR);
+
+ return OK;
+ }
+--- 2170,2185 ----
+ old_post_pos = (int)(post_ptr - post_start);
+ if (nfa_regconcat() == FAIL)
+ return FAIL;
+! /* if concat is empty do emit a node */
+ if (old_post_pos == (int)(post_ptr - post_start))
+! EMIT(NFA_EMPTY);
+ EMIT(NFA_CONCAT);
+ ch = peekchr();
+ }
+
+! /* if a branch is empty, emit one node for it */
+ if (old_post_pos == (int)(post_ptr - post_start))
+! EMIT(NFA_EMPTY);
+
+ return OK;
+ }
+***************
+*** 2423,2429 ****
+ case NFA_STAR_NONGREEDY: STRCPY(code, "NFA_STAR_NONGREEDY "); break;
+ case NFA_QUEST: STRCPY(code, "NFA_QUEST"); break;
+ case NFA_QUEST_NONGREEDY: STRCPY(code, "NFA_QUEST_NON_GREEDY"); break;
+! case NFA_SKIP_CHAR: STRCPY(code, "NFA_SKIP_CHAR"); break;
+ case NFA_OR: STRCPY(code, "NFA_OR"); break;
+
+ case NFA_START_COLL: STRCPY(code, "NFA_START_COLL"); break;
+--- 2423,2429 ----
+ case NFA_STAR_NONGREEDY: STRCPY(code, "NFA_STAR_NONGREEDY "); break;
+ case NFA_QUEST: STRCPY(code, "NFA_QUEST"); break;
+ case NFA_QUEST_NONGREEDY: STRCPY(code, "NFA_QUEST_NON_GREEDY"); break;
+! case NFA_EMPTY: STRCPY(code, "NFA_EMPTY"); break;
+ case NFA_OR: STRCPY(code, "NFA_OR"); break;
+
+ case NFA_START_COLL: STRCPY(code, "NFA_START_COLL"); break;
+***************
+*** 3067,3073 ****
+ case NFA_ZSTART:
+ case NFA_ZEND:
+ case NFA_OPT_CHARS:
+! case NFA_SKIP_CHAR:
+ case NFA_START_PATTERN:
+ case NFA_END_PATTERN:
+ case NFA_COMPOSING:
+--- 3067,3073 ----
+ case NFA_ZSTART:
+ case NFA_ZEND:
+ case NFA_OPT_CHARS:
+! case NFA_EMPTY:
+ case NFA_START_PATTERN:
+ case NFA_END_PATTERN:
+ case NFA_COMPOSING:
+***************
+*** 3265,3279 ****
+ PUSH(frag(e1.start, e2.out));
+ break;
+
+! case NFA_SKIP_CHAR:
+! /* Symbol of 0-length, Used in a repetition
+! * with max/min count of 0 */
+ if (nfa_calc_size == TRUE)
+ {
+ nstate++;
+ break;
+ }
+! s = alloc_state(NFA_SKIP_CHAR, NULL, NULL);
+ if (s == NULL)
+ goto theend;
+ PUSH(frag(s, list1(&s->out)));
+--- 3265,3278 ----
+ PUSH(frag(e1.start, e2.out));
+ break;
+
+! case NFA_EMPTY:
+! /* 0-length, used in a repetition with max/min count of 0 */
+ if (nfa_calc_size == TRUE)
+ {
+ nstate++;
+ break;
+ }
+! s = alloc_state(NFA_EMPTY, NULL, NULL);
+ if (s == NULL)
+ goto theend;
+ PUSH(frag(s, list1(&s->out)));
+***************
+*** 4209,4215 ****
+ case NFA_MOPEN:
+ case NFA_ZEND:
+ case NFA_SPLIT:
+! case NFA_SKIP_CHAR:
+ /* These nodes are not added themselves but their "out" and/or
+ * "out1" may be added below. */
+ break;
+--- 4208,4214 ----
+ case NFA_MOPEN:
+ case NFA_ZEND:
+ case NFA_SPLIT:
+! case NFA_EMPTY:
+ /* These nodes are not added themselves but their "out" and/or
+ * "out1" may be added below. */
+ break;
+***************
+*** 4337,4343 ****
+ subs = addstate(l, state->out1, subs, pim, off);
+ break;
+
+! case NFA_SKIP_CHAR:
+ case NFA_NOPEN:
+ case NFA_NCLOSE:
+ subs = addstate(l, state->out, subs, pim, off);
+--- 4336,4342 ----
+ subs = addstate(l, state->out1, subs, pim, off);
+ break;
+
+! case NFA_EMPTY:
+ case NFA_NOPEN:
+ case NFA_NCLOSE:
+ subs = addstate(l, state->out, subs, pim, off);
+***************
+*** 5604,5612 ****
+ {
+ int in_use = m->norm.in_use;
+
+! /* Copy submatch info for the recursive call, so that
+! * \1 can be matched. */
+ copy_sub_off(&m->norm, &t->subs.norm);
+
+ /*
+ * First try matching the invisible match, then what
+--- 5603,5615 ----
+ {
+ int in_use = m->norm.in_use;
+
+! /* Copy submatch info for the recursive call, opposite
+! * of what happens on success below. */
+ copy_sub_off(&m->norm, &t->subs.norm);
++ #ifdef FEAT_SYN_HL
++ if (nfa_has_zsubexpr)
++ copy_sub_off(&m->synt, &t->subs.synt);
++ #endif
+
+ /*
+ * First try matching the invisible match, then what
+***************
+*** 5713,5718 ****
+--- 5716,5728 ----
+ #endif
+ break;
+ }
++ /* Copy submatch info to the recursive call, opposite of what
++ * happens afterwards. */
++ copy_sub_off(&m->norm, &t->subs.norm);
++ #ifdef FEAT_SYN_HL
++ if (nfa_has_zsubexpr)
++ copy_sub_off(&m->synt, &t->subs.synt);
++ #endif
+
+ /* First try matching the pattern. */
+ result = recursive_regmatch(t->state, NULL, prog,
+*** ../vim-7.4.035/src/testdir/test64.in 2013-09-22 13:57:19.000000000 +0200
+--- src/testdir/test64.in 2013-09-25 15:51:12.000000000 +0200
+***************
+*** 430,435 ****
+--- 430,436 ----
+ :call add(tl, [2, '\(a*\)\@>a', 'aaaa'])
+ :call add(tl, [2, '\(a*\)\@>b', 'aaab', 'aaab', 'aaa'])
+ :call add(tl, [2, '^\(.\{-}b\)\@>.', ' abcbd', ' abc', ' ab'])
++ :call add(tl, [2, '\(.\{-}\)\(\)\@>$', 'abc', 'abc', 'abc', ''])
+ :" TODO: BT engine does not restore submatch after failure
+ :call add(tl, [1, '\(a*\)\@>a\|a\+', 'aaaa', 'aaaa'])
+ :"
+*** ../vim-7.4.035/src/testdir/test64.ok 2013-09-22 13:57:19.000000000 +0200
+--- src/testdir/test64.ok 2013-09-25 16:39:31.000000000 +0200
+***************
+*** 992,997 ****
+--- 992,1000 ----
+ OK 0 - ^\(.\{-}b\)\@>.
+ OK 1 - ^\(.\{-}b\)\@>.
+ OK 2 - ^\(.\{-}b\)\@>.
++ OK 0 - \(.\{-}\)\(\)\@>$
++ OK 1 - \(.\{-}\)\(\)\@>$
++ OK 2 - \(.\{-}\)\(\)\@>$
+ OK 0 - \(a*\)\@>a\|a\+
+ OK 2 - \(a*\)\@>a\|a\+
+ OK 0 - \_[^8-9]\+
+*** ../vim-7.4.035/src/version.c 2013-09-22 15:43:34.000000000 +0200
+--- src/version.c 2013-09-25 16:40:01.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 36,
+ /**/
+
+--
+There is a fine line between courage and foolishness.
+Unfortunately, it's not a fence.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.037 b/patches/source/vim/patches/7.4.037
new file mode 100644
index 000000000..3c6369b72
--- /dev/null
+++ b/patches/source/vim/patches/7.4.037
@@ -0,0 +1,130 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.037
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.037
+Problem: Using "\ze" in a sub-pattern does not result in the end of the
+ match to be set. (Axel Bender)
+Solution: Copy the end of match position when a recursive match was
+ successful.
+Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok
+
+
+*** ../vim-7.4.036/src/regexp_nfa.c 2013-09-25 16:41:50.000000000 +0200
+--- src/regexp_nfa.c 2013-09-25 18:09:59.000000000 +0200
+***************
+*** 3822,3827 ****
+--- 3822,3828 ----
+ static void clear_sub __ARGS((regsub_T *sub));
+ static void copy_sub __ARGS((regsub_T *to, regsub_T *from));
+ static void copy_sub_off __ARGS((regsub_T *to, regsub_T *from));
++ static void copy_ze_off __ARGS((regsub_T *to, regsub_T *from));
+ static int sub_equal __ARGS((regsub_T *sub1, regsub_T *sub2));
+ static int match_backref __ARGS((regsub_T *sub, int subidx, int *bytelen));
+ static int has_state_with_pos __ARGS((nfa_list_T *l, nfa_state_T *state, regsubs_T *subs, nfa_pim_T *pim));
+***************
+*** 3909,3914 ****
+--- 3910,3938 ----
+ }
+
+ /*
++ * Like copy_sub() but only do the end of the main match if \ze is present.
++ */
++ static void
++ copy_ze_off(to, from)
++ regsub_T *to;
++ regsub_T *from;
++ {
++ if (nfa_has_zend)
++ {
++ if (REG_MULTI)
++ {
++ if (from->list.multi[0].end.lnum >= 0)
++ to->list.multi[0].end = from->list.multi[0].end;
++ }
++ else
++ {
++ if (from->list.line[0].end != NULL)
++ to->list.line[0].end = from->list.line[0].end;
++ }
++ }
++ }
++
++ /*
+ * Return TRUE if "sub1" and "sub2" have the same start positions.
+ */
+ static int
+***************
+*** 5308,5313 ****
+--- 5332,5338 ----
+ * When "nfa_endp" is not NULL it is a required end-of-match position.
+ *
+ * Return TRUE if there is a match, FALSE otherwise.
++ * When there is a match "submatch" contains the positions.
+ * Note: Caller must ensure that: start != NULL.
+ */
+ static int
+***************
+*** 5633,5638 ****
+--- 5658,5666 ----
+ if (nfa_has_zsubexpr)
+ copy_sub_off(&t->subs.synt, &m->synt);
+ #endif
++ /* If the pattern has \ze and it matched in the
++ * sub pattern, use it. */
++ copy_ze_off(&t->subs.norm, &m->norm);
+
+ /* t->state->out1 is the corresponding
+ * END_INVISIBLE node; Add its out to the current
+*** ../vim-7.4.036/src/testdir/test64.in 2013-09-25 16:41:50.000000000 +0200
+--- src/testdir/test64.in 2013-09-25 18:09:16.000000000 +0200
+***************
+*** 425,430 ****
+--- 425,431 ----
+ :"
+ :" complicated look-behind match
+ :call add(tl, [2, '\(r\@<=\|\w\@<!\)\/', 'x = /word/;', '/'])
++ :call add(tl, [2, '^[a-z]\+\ze \&\(asdf\)\@<!', 'foo bar', 'foo'])
+ :"
+ :""""" \@>
+ :call add(tl, [2, '\(a*\)\@>a', 'aaaa'])
+*** ../vim-7.4.036/src/testdir/test64.ok 2013-09-25 16:41:50.000000000 +0200
+--- src/testdir/test64.ok 2013-09-25 18:10:05.000000000 +0200
+***************
+*** 983,988 ****
+--- 983,991 ----
+ OK 0 - \(r\@<=\|\w\@<!\)\/
+ OK 1 - \(r\@<=\|\w\@<!\)\/
+ OK 2 - \(r\@<=\|\w\@<!\)\/
++ OK 0 - ^[a-z]\+\ze \&\(asdf\)\@<!
++ OK 1 - ^[a-z]\+\ze \&\(asdf\)\@<!
++ OK 2 - ^[a-z]\+\ze \&\(asdf\)\@<!
+ OK 0 - \(a*\)\@>a
+ OK 1 - \(a*\)\@>a
+ OK 2 - \(a*\)\@>a
+*** ../vim-7.4.036/src/version.c 2013-09-25 16:41:50.000000000 +0200
+--- src/version.c 2013-09-25 18:14:36.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 37,
+ /**/
+
+--
+MAN: You don't frighten us, English pig-dog! Go and boil your bottoms,
+ son of a silly person. I blow my nose on you, so-called Arthur-king,
+ you and your silly English K...kaniggets.
+ He puts hands to his ears and blows a raspberry.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.038 b/patches/source/vim/patches/7.4.038
new file mode 100644
index 000000000..0aae370e3
--- /dev/null
+++ b/patches/source/vim/patches/7.4.038
@@ -0,0 +1,116 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.038
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.038
+Problem: Using "zw" and "zg" when 'spell' is off give a confusing error
+ message. (Gary Johnson)
+Solution: Ignore the error when locating the word. Explicitly mention what
+ word was added. (Christian Brabandt)
+Files: src/normal.c, src/spell.c
+
+
+*** ../vim-7.4.037/src/normal.c 2013-09-22 15:23:38.000000000 +0200
+--- src/normal.c 2013-09-25 18:54:08.000000000 +0200
+***************
+*** 5246,5253 ****
+ {
+ pos_T pos = curwin->w_cursor;
+
+! /* Find bad word under the cursor. */
+ len = spell_move_to(curwin, FORWARD, TRUE, TRUE, NULL);
+ if (len != 0 && curwin->w_cursor.col <= pos.col)
+ ptr = ml_get_pos(&curwin->w_cursor);
+ curwin->w_cursor = pos;
+--- 5246,5257 ----
+ {
+ pos_T pos = curwin->w_cursor;
+
+! /* Find bad word under the cursor. When 'spell' is
+! * off this fails and find_ident_under_cursor() is
+! * used below. */
+! emsg_off++;
+ len = spell_move_to(curwin, FORWARD, TRUE, TRUE, NULL);
++ emsg_off--;
+ if (len != 0 && curwin->w_cursor.col <= pos.col)
+ ptr = ml_get_pos(&curwin->w_cursor);
+ curwin->w_cursor = pos;
+*** ../vim-7.4.037/src/spell.c 2013-07-17 17:28:28.000000000 +0200
+--- src/spell.c 2013-09-25 18:48:55.000000000 +0200
+***************
+*** 9479,9485 ****
+ if (undo)
+ {
+ home_replace(NULL, fname, NameBuff, MAXPATHL, TRUE);
+! smsg((char_u *)_("Word removed from %s"), NameBuff);
+ }
+ }
+ fseek(fd, fpos_next, SEEK_SET);
+--- 9479,9486 ----
+ if (undo)
+ {
+ home_replace(NULL, fname, NameBuff, MAXPATHL, TRUE);
+! smsg((char_u *)_("Word '%.*s' removed from %s"),
+! len, word, NameBuff);
+ }
+ }
+ fseek(fd, fpos_next, SEEK_SET);
+***************
+*** 9525,9531 ****
+ fclose(fd);
+
+ home_replace(NULL, fname, NameBuff, MAXPATHL, TRUE);
+! smsg((char_u *)_("Word added to %s"), NameBuff);
+ }
+ }
+
+--- 9526,9532 ----
+ fclose(fd);
+
+ home_replace(NULL, fname, NameBuff, MAXPATHL, TRUE);
+! smsg((char_u *)_("Word '%.*s' added to %s"), len, word, NameBuff);
+ }
+ }
+
+***************
+*** 10135,10141 ****
+ }
+
+ /*
+! * "z?": Find badly spelled word under or after the cursor.
+ * Give suggestions for the properly spelled word.
+ * In Visual mode use the highlighted word as the bad word.
+ * When "count" is non-zero use that suggestion.
+--- 10136,10142 ----
+ }
+
+ /*
+! * "z=": Find badly spelled word under or after the cursor.
+ * Give suggestions for the properly spelled word.
+ * In Visual mode use the highlighted word as the bad word.
+ * When "count" is non-zero use that suggestion.
+*** ../vim-7.4.037/src/version.c 2013-09-25 18:16:34.000000000 +0200
+--- src/version.c 2013-09-25 18:52:47.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 38,
+ /**/
+
+--
+MAN: Fetchez la vache!
+GUARD: Quoi?
+MAN: Fetchez la vache!
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.039 b/patches/source/vim/patches/7.4.039
new file mode 100644
index 000000000..5d653e353
--- /dev/null
+++ b/patches/source/vim/patches/7.4.039
@@ -0,0 +1,217 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.039
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.039
+Problem: MS-Windows: MSCV10 and earlier can't handle symlinks to a
+ directory properly.
+Solution: Add stat_symlink_aware() and wstat_symlink_aware(). (Ken Takata)
+Files: src/os_mswin.c, src/os_win32.c, src/os_win32.h
+
+
+*** ../vim-7.4.038/src/os_mswin.c 2013-08-30 16:51:15.000000000 +0200
+--- src/os_mswin.c 2013-09-25 19:09:53.000000000 +0200
+***************
+*** 498,503 ****
+--- 498,595 ----
+ }
+ }
+
++ static int
++ stat_symlink_aware(const char *name, struct stat *stp)
++ {
++ #if defined(_MSC_VER) && _MSC_VER < 1700
++ /* Work around for VC10 or earlier. stat() can't handle symlinks properly.
++ * VC9 or earlier: stat() doesn't support a symlink at all. It retrieves
++ * status of a symlink itself.
++ * VC10: stat() supports a symlink to a normal file, but it doesn't support
++ * a symlink to a directory (always returns an error). */
++ WIN32_FIND_DATA findData;
++ HANDLE hFind, h;
++ DWORD attr = 0;
++ BOOL is_symlink = FALSE;
++
++ hFind = FindFirstFile(name, &findData);
++ if (hFind != INVALID_HANDLE_VALUE)
++ {
++ attr = findData.dwFileAttributes;
++ if ((attr & FILE_ATTRIBUTE_REPARSE_POINT)
++ && (findData.dwReserved0 == IO_REPARSE_TAG_SYMLINK))
++ is_symlink = TRUE;
++ FindClose(hFind);
++ }
++ if (is_symlink)
++ {
++ h = CreateFile(name, FILE_READ_ATTRIBUTES,
++ FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
++ OPEN_EXISTING,
++ (attr & FILE_ATTRIBUTE_DIRECTORY)
++ ? FILE_FLAG_BACKUP_SEMANTICS : 0,
++ NULL);
++ if (h != INVALID_HANDLE_VALUE)
++ {
++ int fd, n;
++
++ fd = _open_osfhandle((intptr_t)h, _O_RDONLY);
++ n = _fstat(fd, (struct _stat*)stp);
++ _close(fd);
++ return n;
++ }
++ }
++ #endif
++ return stat(name, stp);
++ }
++
++ #ifdef FEAT_MBYTE
++ static int
++ wstat_symlink_aware(const WCHAR *name, struct _stat *stp)
++ {
++ # if defined(_MSC_VER) && _MSC_VER < 1700
++ /* Work around for VC10 or earlier. _wstat() can't handle symlinks properly.
++ * VC9 or earlier: _wstat() doesn't support a symlink at all. It retrieves
++ * status of a symlink itself.
++ * VC10: _wstat() supports a symlink to a normal file, but it doesn't
++ * support a symlink to a directory (always returns an error). */
++ int n;
++ BOOL is_symlink = FALSE;
++ HANDLE hFind, h;
++ DWORD attr = 0;
++ WIN32_FIND_DATAW findDataW;
++
++ hFind = FindFirstFileW(name, &findDataW);
++ if (hFind != INVALID_HANDLE_VALUE)
++ {
++ attr = findDataW.dwFileAttributes;
++ if ((attr & FILE_ATTRIBUTE_REPARSE_POINT)
++ && (findDataW.dwReserved0 == IO_REPARSE_TAG_SYMLINK))
++ is_symlink = TRUE;
++ FindClose(hFind);
++ }
++ if (is_symlink)
++ {
++ h = CreateFileW(name, FILE_READ_ATTRIBUTES,
++ FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
++ OPEN_EXISTING,
++ (attr & FILE_ATTRIBUTE_DIRECTORY)
++ ? FILE_FLAG_BACKUP_SEMANTICS : 0,
++ NULL);
++ if (h != INVALID_HANDLE_VALUE)
++ {
++ int fd;
++
++ fd = _open_osfhandle((intptr_t)h, _O_RDONLY);
++ n = _fstat(fd, stp);
++ _close(fd);
++ return n;
++ }
++ }
++ # endif
++ return _wstat(name, stp);
++ }
++ #endif
+
+ /*
+ * stat() can't handle a trailing '/' or '\', remove it first.
+***************
+*** 534,540 ****
+
+ if (wp != NULL)
+ {
+! n = _wstat(wp, (struct _stat *)stp);
+ vim_free(wp);
+ if (n >= 0)
+ return n;
+--- 626,632 ----
+
+ if (wp != NULL)
+ {
+! n = wstat_symlink_aware(wp, (struct _stat *)stp);
+ vim_free(wp);
+ if (n >= 0)
+ return n;
+***************
+*** 544,550 ****
+ }
+ }
+ #endif
+! return stat(buf, stp);
+ }
+
+ #if defined(FEAT_GUI_MSWIN) || defined(PROTO)
+--- 636,642 ----
+ }
+ }
+ #endif
+! return stat_symlink_aware(buf, stp);
+ }
+
+ #if defined(FEAT_GUI_MSWIN) || defined(PROTO)
+*** ../vim-7.4.038/src/os_win32.c 2013-08-30 17:29:10.000000000 +0200
+--- src/os_win32.c 2013-09-25 19:09:53.000000000 +0200
+***************
+*** 78,93 ****
+ # endif
+ #endif
+
+- /*
+- * Reparse Point
+- */
+- #ifndef FILE_ATTRIBUTE_REPARSE_POINT
+- # define FILE_ATTRIBUTE_REPARSE_POINT 0x00000400
+- #endif
+- #ifndef IO_REPARSE_TAG_SYMLINK
+- # define IO_REPARSE_TAG_SYMLINK 0xA000000C
+- #endif
+-
+ /* Record all output and all keyboard & mouse input */
+ /* #define MCH_WRITE_DUMP */
+
+--- 78,83 ----
+*** ../vim-7.4.038/src/os_win32.h 2013-07-21 17:53:13.000000000 +0200
+--- src/os_win32.h 2013-09-25 19:09:53.000000000 +0200
+***************
+*** 130,135 ****
+--- 130,148 ----
+ # define DFLT_MAXMEMTOT (5*1024) /* use up to 5 Mbyte for Vim */
+ #endif
+
++ /*
++ * Reparse Point
++ */
++ #ifndef FILE_ATTRIBUTE_REPARSE_POINT
++ # define FILE_ATTRIBUTE_REPARSE_POINT 0x00000400
++ #endif
++ #ifndef IO_REPARSE_TAG_MOUNT_POINT
++ # define IO_REPARSE_TAG_MOUNT_POINT 0xA0000003
++ #endif
++ #ifndef IO_REPARSE_TAG_SYMLINK
++ # define IO_REPARSE_TAG_SYMLINK 0xA000000C
++ #endif
++
+ #if defined(_MSC_VER) || defined(__BORLANDC__)
+ /* Support for __try / __except. All versions of MSVC and Borland C are
+ * expected to have this. Any other compilers that support it? */
+*** ../vim-7.4.038/src/version.c 2013-09-25 18:54:20.000000000 +0200
+--- src/version.c 2013-09-25 19:08:55.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 39,
+ /**/
+
+--
+ A cow comes flying over the battlements, lowing aggressively. The cow
+ lands on GALAHAD'S PAGE, squashing him completely.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.040 b/patches/source/vim/patches/7.4.040
new file mode 100644
index 000000000..a60022366
--- /dev/null
+++ b/patches/source/vim/patches/7.4.040
@@ -0,0 +1,68 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.040
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.040
+Problem: Valgrind error on exit when a script-local variable holds a
+ reference to the scope of another script.
+Solution: First clear all variables, then free the scopes. (ZyX)
+Files: src/eval.c
+
+
+*** ../vim-7.4.039/src/eval.c 2013-08-30 16:35:41.000000000 +0200
+--- src/eval.c 2013-09-25 20:28:15.000000000 +0200
+***************
+*** 915,926 ****
+ /* autoloaded script names */
+ ga_clear_strings(&ga_loaded);
+
+! /* script-local variables */
+ for (i = 1; i <= ga_scripts.ga_len; ++i)
+- {
+ vars_clear(&SCRIPT_VARS(i));
+ vim_free(SCRIPT_SV(i));
+- }
+ ga_clear(&ga_scripts);
+
+ /* unreferenced lists and dicts */
+--- 915,927 ----
+ /* autoloaded script names */
+ ga_clear_strings(&ga_loaded);
+
+! /* Script-local variables. First clear all the variables and in a second
+! * loop free the scriptvar_T, because a variable in one script might hold
+! * a reference to the whole scope of another script. */
+ for (i = 1; i <= ga_scripts.ga_len; ++i)
+ vars_clear(&SCRIPT_VARS(i));
++ for (i = 1; i <= ga_scripts.ga_len; ++i)
+ vim_free(SCRIPT_SV(i));
+ ga_clear(&ga_scripts);
+
+ /* unreferenced lists and dicts */
+*** ../vim-7.4.039/src/version.c 2013-09-25 19:13:32.000000000 +0200
+--- src/version.c 2013-09-25 20:30:06.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 40,
+ /**/
+
+--
+ A KNIGHT rides into shot and hacks him to the ground. He rides off.
+ We stay for a moment on the glade. A MIDDLE-AGED LADY in a C. & A.
+ twin-set emerges from the trees and looks in horror at the body of her
+ HUSBAND.
+MRS HISTORIAN: FRANK!
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.041 b/patches/source/vim/patches/7.4.041
new file mode 100644
index 000000000..190604e93
--- /dev/null
+++ b/patches/source/vim/patches/7.4.041
@@ -0,0 +1,61 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.041
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.041 (after 7.4.034)
+Problem: Visual selection does not remain after being copied over. (Axel
+ Bender)
+Solution: Move when VIsual_active is reset. (Christian Brabandt)
+Files: src/ops.c
+
+
+*** ../vim-7.4.040/src/ops.c 2013-09-22 15:23:38.000000000 +0200
+--- src/ops.c 2013-09-25 23:20:37.000000000 +0200
+***************
+*** 3808,3816 ****
+ FALSE /* stop after 1 paste */
+ #endif
+ );
+- #ifdef FEAT_VISUAL
+- VIsual_active = FALSE;
+- #endif
+
+ curbuf->b_op_end = curwin->w_cursor;
+ /* For "CTRL-O p" in Insert mode, put cursor after last char */
+--- 3808,3813 ----
+***************
+*** 3972,3977 ****
+--- 3969,3978 ----
+ if (regname == '=')
+ vim_free(y_array);
+
++ #ifdef FEAT_VISUAL
++ VIsual_active = FALSE;
++ #endif
++
+ /* If the cursor is past the end of the line put it at the end. */
+ adjust_cursor_eol();
+ }
+*** ../vim-7.4.040/src/version.c 2013-09-25 21:00:24.000000000 +0200
+--- src/version.c 2013-09-25 23:20:46.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 41,
+ /**/
+
+
+--
+press CTRL-ALT-DEL for more information
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.042 b/patches/source/vim/patches/7.4.042
new file mode 100644
index 000000000..648a1bfef
--- /dev/null
+++ b/patches/source/vim/patches/7.4.042
@@ -0,0 +1,71 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.042
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.042
+Problem: When using ":setlocal" for 'spell' and 'spellang' then :spelldump
+ doesn't work. (Dimitar Dimitrov)
+Solution: Copy the option variables to the new window used to show the dump.
+ (Christian Brabandt)
+Files: src/spell.c
+
+
+*** ../vim-7.4.041/src/spell.c 2013-09-25 18:54:20.000000000 +0200
+--- src/spell.c 2013-09-29 13:15:51.000000000 +0200
+***************
+*** 15569,15579 ****
+ ex_spelldump(eap)
+ exarg_T *eap;
+ {
+ if (no_spell_checking(curwin))
+ return;
+
+! /* Create a new empty buffer by splitting the window. */
+ do_cmdline_cmd((char_u *)"new");
+ if (!bufempty() || !buf_valid(curbuf))
+ return;
+
+--- 15569,15589 ----
+ ex_spelldump(eap)
+ exarg_T *eap;
+ {
++ char_u *spl;
++ long dummy;
++
+ if (no_spell_checking(curwin))
+ return;
++ get_option_value((char_u*)"spl", &dummy, &spl, OPT_LOCAL);
+
+! /* Create a new empty buffer in a new window. */
+ do_cmdline_cmd((char_u *)"new");
++
++ /* enable spelling locally in the new window */
++ set_option_value((char_u*)"spell", TRUE, (char_u*)"", OPT_LOCAL);
++ set_option_value((char_u*)"spl", dummy, spl, OPT_LOCAL);
++ vim_free(spl);
++
+ if (!bufempty() || !buf_valid(curbuf))
+ return;
+
+*** ../vim-7.4.041/src/version.c 2013-09-25 23:24:54.000000000 +0200
+--- src/version.c 2013-09-29 13:15:17.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 42,
+ /**/
+
+--
+Experience is what you get when you don't get what you want.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.043 b/patches/source/vim/patches/7.4.043
new file mode 100644
index 000000000..0c3d852ca
--- /dev/null
+++ b/patches/source/vim/patches/7.4.043
@@ -0,0 +1,89 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.043
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.043
+Problem: VMS can't handle long function names.
+Solution: Shorten may_req_ambiguous_character_width. (Samuel Ferencik)
+Files: src/main.c, src/term.c, src/proto/term.pro
+
+
+*** ../vim-7.4.042/src/main.c 2013-08-22 14:14:23.000000000 +0200
+--- src/main.c 2013-09-29 16:23:49.000000000 +0200
+***************
+*** 812,818 ****
+ starttermcap(); /* start termcap if not done by wait_return() */
+ TIME_MSG("start termcap");
+ #if defined(FEAT_TERMRESPONSE) && defined(FEAT_MBYTE)
+! may_req_ambiguous_character_width();
+ #endif
+
+ #ifdef FEAT_MOUSE
+--- 812,818 ----
+ starttermcap(); /* start termcap if not done by wait_return() */
+ TIME_MSG("start termcap");
+ #if defined(FEAT_TERMRESPONSE) && defined(FEAT_MBYTE)
+! may_req_ambiguous_char_width();
+ #endif
+
+ #ifdef FEAT_MOUSE
+*** ../vim-7.4.042/src/term.c 2013-07-04 22:29:28.000000000 +0200
+--- src/term.c 2013-09-29 16:27:12.000000000 +0200
+***************
+*** 3356,3362 ****
+ * it must be called immediately after entering termcap mode.
+ */
+ void
+! may_req_ambiguous_character_width()
+ {
+ if (u7_status == U7_GET
+ && cur_tmode == TMODE_RAW
+--- 3356,3362 ----
+ * it must be called immediately after entering termcap mode.
+ */
+ void
+! may_req_ambiguous_char_width()
+ {
+ if (u7_status == U7_GET
+ && cur_tmode == TMODE_RAW
+*** ../vim-7.4.042/src/proto/term.pro 2013-08-10 13:37:28.000000000 +0200
+--- src/proto/term.pro 2013-09-29 16:25:02.000000000 +0200
+***************
+*** 35,41 ****
+ void starttermcap __ARGS((void));
+ void stoptermcap __ARGS((void));
+ void may_req_termresponse __ARGS((void));
+! void may_req_ambiguous_character_width __ARGS((void));
+ int swapping_screen __ARGS((void));
+ void setmouse __ARGS((void));
+ int mouse_has __ARGS((int c));
+--- 35,41 ----
+ void starttermcap __ARGS((void));
+ void stoptermcap __ARGS((void));
+ void may_req_termresponse __ARGS((void));
+! void may_req_ambiguous_char_width __ARGS((void));
+ int swapping_screen __ARGS((void));
+ void setmouse __ARGS((void));
+ int mouse_has __ARGS((int c));
+*** ../vim-7.4.042/src/version.c 2013-09-29 13:38:25.000000000 +0200
+--- src/version.c 2013-09-29 16:25:16.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 43,
+ /**/
+
+--
+Back up my hard drive? I can't find the reverse switch!
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.044 b/patches/source/vim/patches/7.4.044
new file mode 100644
index 000000000..3d8832dfa
--- /dev/null
+++ b/patches/source/vim/patches/7.4.044
@@ -0,0 +1,83 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.044
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.044 (after 7.4.039)
+Problem: Can't build with old MSVC. (Wang Shoulin)
+Solution: Define OPEN_OH_ARGTYPE instead of using intptr_t directly.
+Files: src/os_mswin.c
+
+
+*** ../vim-7.4.043/src/os_mswin.c 2013-09-25 19:13:32.000000000 +0200
+--- src/os_mswin.c 2013-09-26 20:37:38.000000000 +0200
+***************
+*** 498,503 ****
+--- 498,509 ----
+ }
+ }
+
++ #if (_MSC_VER >= 1300)
++ # define OPEN_OH_ARGTYPE intptr_t
++ #else
++ # define OPEN_OH_ARGTYPE long
++ #endif
++
+ static int
+ stat_symlink_aware(const char *name, struct stat *stp)
+ {
+***************
+*** 533,539 ****
+ {
+ int fd, n;
+
+! fd = _open_osfhandle((intptr_t)h, _O_RDONLY);
+ n = _fstat(fd, (struct _stat*)stp);
+ _close(fd);
+ return n;
+--- 539,545 ----
+ {
+ int fd, n;
+
+! fd = _open_osfhandle((OPEN_OH_ARGTYPE)h, _O_RDONLY);
+ n = _fstat(fd, (struct _stat*)stp);
+ _close(fd);
+ return n;
+***************
+*** 580,586 ****
+ {
+ int fd;
+
+! fd = _open_osfhandle((intptr_t)h, _O_RDONLY);
+ n = _fstat(fd, stp);
+ _close(fd);
+ return n;
+--- 586,592 ----
+ {
+ int fd;
+
+! fd = _open_osfhandle((OPEN_OH_ARGTYPE)h, _O_RDONLY);
+ n = _fstat(fd, stp);
+ _close(fd);
+ return n;
+*** ../vim-7.4.043/src/version.c 2013-09-29 16:27:42.000000000 +0200
+--- src/version.c 2013-09-29 18:27:58.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 44,
+ /**/
+
+--
+I'd like to meet the man who invented sex and see what he's working on now.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.045 b/patches/source/vim/patches/7.4.045
new file mode 100644
index 000000000..0e82735ac
--- /dev/null
+++ b/patches/source/vim/patches/7.4.045
@@ -0,0 +1,111 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.045
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.045
+Problem: substitute() does not work properly when the pattern starts with
+ "\ze".
+Solution: Detect an empty match. (Christian Brabandt)
+Files: src/eval.c, src/testdir/test80.in, src/testdir/test80.ok
+
+
+*** ../vim-7.4.044/src/eval.c 2013-09-25 21:00:24.000000000 +0200
+--- src/eval.c 2013-09-29 21:03:22.000000000 +0200
+***************
+*** 24301,24306 ****
+--- 24301,24307 ----
+ garray_T ga;
+ char_u *ret;
+ char_u *save_cpo;
++ int zero_width;
+
+ /* Make 'cpoptions' empty, so that the 'l' flag doesn't work here */
+ save_cpo = p_cpo;
+***************
+*** 24339,24358 ****
+ (void)vim_regsub(&regmatch, sub, (char_u *)ga.ga_data
+ + ga.ga_len + i, TRUE, TRUE, FALSE);
+ ga.ga_len += i + sublen - 1;
+! /* avoid getting stuck on a match with an empty string */
+! if (tail == regmatch.endp[0])
+ {
+! if (*tail == NUL)
+! break;
+ *((char_u *)ga.ga_data + ga.ga_len) = *tail++;
+ ++ga.ga_len;
+ }
+- else
+- {
+- tail = regmatch.endp[0];
+- if (*tail == NUL)
+- break;
+- }
+ if (!do_all)
+ break;
+ }
+--- 24340,24356 ----
+ (void)vim_regsub(&regmatch, sub, (char_u *)ga.ga_data
+ + ga.ga_len + i, TRUE, TRUE, FALSE);
+ ga.ga_len += i + sublen - 1;
+! zero_width = (tail == regmatch.endp[0]
+! || regmatch.startp[0] == regmatch.endp[0]);
+! tail = regmatch.endp[0];
+! if (*tail == NUL)
+! break;
+! if (zero_width)
+ {
+! /* avoid getting stuck on a match with an empty string */
+ *((char_u *)ga.ga_data + ga.ga_len) = *tail++;
+ ++ga.ga_len;
+ }
+ if (!do_all)
+ break;
+ }
+*** ../vim-7.4.044/src/testdir/test80.in 2013-03-19 17:30:51.000000000 +0100
+--- src/testdir/test80.in 2013-09-29 20:59:00.000000000 +0200
+***************
+*** 142,147 ****
+--- 142,149 ----
+ :$put =\"\n\nTEST_7:\"
+ :$put =substitute('A A', 'A.', '\=submatch(0)', '')
+ :$put =substitute(\"B\nB\", 'B.', '\=submatch(0)', '')
++ :$put =substitute('-bb', '\zeb', 'a', 'g')
++ :$put =substitute('-bb', '\ze', 'c', 'g')
+ /^TEST_8
+ ENDTEST
+
+*** ../vim-7.4.044/src/testdir/test80.ok 2013-03-19 17:31:45.000000000 +0100
+--- src/testdir/test80.ok 2013-09-29 20:59:35.000000000 +0200
+***************
+*** 103,108 ****
+--- 103,110 ----
+ A A
+ B
+ B
++ -abab
++ c-cbcbc
+
+
+ TEST_8:
+*** ../vim-7.4.044/src/version.c 2013-09-29 19:05:17.000000000 +0200
+--- src/version.c 2013-09-29 21:04:50.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 45,
+ /**/
+
+--
+Just think of all the things we haven't thought of yet.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.046 b/patches/source/vim/patches/7.4.046
new file mode 100644
index 000000000..5bb426582
--- /dev/null
+++ b/patches/source/vim/patches/7.4.046
@@ -0,0 +1,80 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.046
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.046
+Problem: Can't use Tcl 8.6.
+Solution: Change how Tcl_FindExecutable is called. (Jan Nijtmans)
+Files: src/if_tcl.c
+
+
+*** ../vim-7.4.045/src/if_tcl.c 2013-08-02 19:31:15.000000000 +0200
+--- src/if_tcl.c 2013-10-02 13:44:48.000000000 +0200
+***************
+*** 165,170 ****
+--- 165,171 ----
+ */
+ static HANDLE hTclLib = NULL;
+ Tcl_Interp* (*dll_Tcl_CreateInterp)();
++ void (*dll_Tcl_FindExecutable)(const void *);
+
+ /*
+ * Table of name to function pointer of tcl.
+***************
+*** 175,180 ****
+--- 176,182 ----
+ TCL_PROC* ptr;
+ } tcl_funcname_table[] = {
+ {"Tcl_CreateInterp", (TCL_PROC*)&dll_Tcl_CreateInterp},
++ {"Tcl_FindExecutable", (TCL_PROC*)&dll_Tcl_FindExecutable},
+ {NULL, NULL},
+ };
+
+***************
+*** 248,258 ****
+ {
+ Tcl_Interp *interp;
+
+ if (interp = dll_Tcl_CreateInterp())
+ {
+ if (Tcl_InitStubs(interp, DYNAMIC_TCL_VER, 0))
+ {
+- Tcl_FindExecutable(find_executable_arg);
+ Tcl_DeleteInterp(interp);
+ stubs_initialized = TRUE;
+ }
+--- 250,261 ----
+ {
+ Tcl_Interp *interp;
+
++ dll_Tcl_FindExecutable(find_executable_arg);
++
+ if (interp = dll_Tcl_CreateInterp())
+ {
+ if (Tcl_InitStubs(interp, DYNAMIC_TCL_VER, 0))
+ {
+ Tcl_DeleteInterp(interp);
+ stubs_initialized = TRUE;
+ }
+*** ../vim-7.4.045/src/version.c 2013-09-29 21:11:00.000000000 +0200
+--- src/version.c 2013-10-02 13:46:47.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 46,
+ /**/
+
+--
+Not too long ago, a program was something you watched on TV...
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.047 b/patches/source/vim/patches/7.4.047
new file mode 100644
index 000000000..2871340b7
--- /dev/null
+++ b/patches/source/vim/patches/7.4.047
@@ -0,0 +1,56 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.047
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.047
+Problem: When using input() in a function invoked by a mapping it doesn't
+ work.
+Solution: Temporarily reset ex_normal_busy. (Yasuhiro Matsumoto)
+Files: src/eval.c
+
+
+*** ../vim-7.4.046/src/eval.c 2013-09-29 21:11:00.000000000 +0200
+--- src/eval.c 2013-10-02 16:40:52.000000000 +0200
+***************
+*** 13054,13062 ****
+--- 13054,13071 ----
+ }
+
+ if (defstr != NULL)
++ {
++ # ifdef FEAT_EX_EXTRA
++ int save_ex_normal_busy = ex_normal_busy;
++ ex_normal_busy = 0;
++ # endif
+ rettv->vval.v_string =
+ getcmdline_prompt(inputsecret_flag ? NUL : '@', p, echo_attr,
+ xp_type, xp_arg);
++ # ifdef FEAT_EX_EXTRA
++ ex_normal_busy = save_ex_normal_busy;
++ # endif
++ }
+ if (inputdialog && rettv->vval.v_string == NULL
+ && argvars[1].v_type != VAR_UNKNOWN
+ && argvars[2].v_type != VAR_UNKNOWN)
+*** ../vim-7.4.046/src/version.c 2013-10-02 14:25:39.000000000 +0200
+--- src/version.c 2013-10-02 16:45:45.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 47,
+ /**/
+
+--
+Not too long ago, a keyboard was something to make music with...
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.048 b/patches/source/vim/patches/7.4.048
new file mode 100644
index 000000000..6e911a0bf
--- /dev/null
+++ b/patches/source/vim/patches/7.4.048
@@ -0,0 +1,96 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.048
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.048
+Problem: Recent clang version complains about -fno-strength-reduce.
+Solution: Add a configure check for the clang version. (Kazunobu Kuriyama)
+Files: src/configure.in, src/auto/configure
+
+
+*** ../vim-7.4.047/src/configure.in 2013-08-04 20:00:50.000000000 +0200
+--- src/configure.in 2013-10-02 17:56:25.000000000 +0200
+***************
+*** 62,67 ****
+--- 62,90 ----
+ fi
+ fi
+
++ dnl clang-500.2.75 or around has abandoned -f[no-]strength-reduce and issues a
++ dnl warning when that flag is passed to. Accordingly, adjust CFLAGS based on
++ dnl the version number of the clang in use.
++ dnl Note that this does not work to get the version of clang 3.1 or 3.2.
++ AC_MSG_CHECKING(for recent clang version)
++ CLANG_VERSION_STRING=`"$CC" --version 2>/dev/null | sed -n -e 's/^.*clang.*\([[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\).*$/\1/p'`
++ if test x"$CLANG_VERSION_STRING" != x"" ; then
++ CLANG_MAJOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/\([[0-9]][[0-9]]*\)\.[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*/\1/p'`
++ CLANG_MINOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[[0-9]][[0-9]]*\.\([[0-9]][[0-9]]*\)\.[[0-9]][[0-9]]*/\1/p'`
++ CLANG_REVISION=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\.\([[0-9]][[0-9]]*\)/\1/p'`
++ CLANG_VERSION=`expr $CLANG_MAJOR '*' 1000000 '+' $CLANG_MINOR '*' 1000 '+' $CLANG_REVISION`
++ AC_MSG_RESULT($CLANG_VERSION)
++ dnl If you find the same issue with versions earlier than 500.2.75,
++ dnl change the constant 500002075 below appropriately. To get the
++ dnl integer corresponding to a version number, refer to the
++ dnl definition of CLANG_VERSION above.
++ if test "$CLANG_VERSION" -ge 500002075 ; then
++ CFLAGS=`echo "$CFLAGS" | sed -n -e 's/-fno-strength-reduce/ /p'`
++ fi
++ else
++ AC_MSG_RESULT(no)
++ fi
++
+ dnl If configure thinks we are cross compiling, there might be something
+ dnl wrong with the CC or CFLAGS settings, give a useful warning message
+ if test "$cross_compiling" = yes; then
+*** ../vim-7.4.047/src/auto/configure 2013-08-04 20:01:06.000000000 +0200
+--- src/auto/configure 2013-10-02 17:56:52.000000000 +0200
+***************
+*** 3989,3994 ****
+--- 3989,4012 ----
+ fi
+ fi
+
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recent clang version" >&5
++ $as_echo_n "checking for recent clang version... " >&6; }
++ CLANG_VERSION_STRING=`"$CC" --version 2>/dev/null | sed -n -e 's/^.*clang.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*$/\1/p'`
++ if test x"$CLANG_VERSION_STRING" != x"" ; then
++ CLANG_MAJOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*/\1/p'`
++ CLANG_MINOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/p'`
++ CLANG_REVISION=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\)/\1/p'`
++ CLANG_VERSION=`expr $CLANG_MAJOR '*' 1000000 '+' $CLANG_MINOR '*' 1000 '+' $CLANG_REVISION`
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG_VERSION" >&5
++ $as_echo "$CLANG_VERSION" >&6; }
++ if test "$CLANG_VERSION" -ge 500002075 ; then
++ CFLAGS=`echo "$CFLAGS" | sed -n -e 's/-fno-strength-reduce/ /p'`
++ fi
++ else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++ $as_echo "no" >&6; }
++ fi
++
+ if test "$cross_compiling" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&5
+ $as_echo "cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&6; }
+*** ../vim-7.4.047/src/version.c 2013-10-02 16:46:23.000000000 +0200
+--- src/version.c 2013-10-02 17:19:31.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 48,
+ /**/
+
+--
+I have to exercise early in the morning before my brain
+figures out what I'm doing.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.049 b/patches/source/vim/patches/7.4.049
new file mode 100644
index 000000000..c1a23b989
--- /dev/null
+++ b/patches/source/vim/patches/7.4.049
@@ -0,0 +1,67 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.049
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.049
+Problem: In Ex mode, when line numbers are enabled the substitute prompt is
+ wrong.
+Solution: Adjust for the line number size. (Benoit Pierre)
+Files: src/ex_cmds.c
+
+
+*** ../vim-7.4.048/src/ex_cmds.c 2013-08-07 15:15:51.000000000 +0200
+--- src/ex_cmds.c 2013-10-02 18:31:24.000000000 +0200
+***************
+*** 4740,4750 ****
+ char_u *resp;
+ colnr_T sc, ec;
+
+! print_line_no_prefix(lnum, FALSE, FALSE);
+
+ getvcol(curwin, &curwin->w_cursor, &sc, NULL, NULL);
+ curwin->w_cursor.col = regmatch.endpos[0].col - 1;
+ getvcol(curwin, &curwin->w_cursor, NULL, NULL, &ec);
+ msg_start();
+ for (i = 0; i < (long)sc; ++i)
+ msg_putchar(' ');
+--- 4740,4756 ----
+ char_u *resp;
+ colnr_T sc, ec;
+
+! print_line_no_prefix(lnum, do_number, do_list);
+
+ getvcol(curwin, &curwin->w_cursor, &sc, NULL, NULL);
+ curwin->w_cursor.col = regmatch.endpos[0].col - 1;
+ getvcol(curwin, &curwin->w_cursor, NULL, NULL, &ec);
++ if (do_number || curwin->w_p_nu)
++ {
++ int numw = number_width(curwin) + 1;
++ sc += numw;
++ ec += numw;
++ }
+ msg_start();
+ for (i = 0; i < (long)sc; ++i)
+ msg_putchar(' ');
+*** ../vim-7.4.048/src/version.c 2013-10-02 18:22:58.000000000 +0200
+--- src/version.c 2013-10-02 18:33:22.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 49,
+ /**/
+
+--
+What the word 'politics' means: 'Poli' in Latin meaning 'many' and 'tics'
+meaning 'bloodsucking creatures'.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.050 b/patches/source/vim/patches/7.4.050
new file mode 100644
index 000000000..afe2b044f
--- /dev/null
+++ b/patches/source/vim/patches/7.4.050
@@ -0,0 +1,90 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.050
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.050
+Problem: "gn" selects too much for the pattern "\d" when there are two
+ lines with a single digit. (Ryan Carney)
+Solution: Adjust the logic of is_one_char(). (Christian Brabandt)
+Files: src/search.c, src/testdir/test53.in, src/testdir/test53.ok
+
+
+*** ../vim-7.4.049/src/search.c 2013-08-14 17:45:25.000000000 +0200
+--- src/search.c 2013-10-02 21:49:40.000000000 +0200
+***************
+*** 4680,4687 ****
+ && regmatch.startpos[0].lnum == regmatch.endpos[0].lnum
+ && regmatch.startpos[0].col == regmatch.endpos[0].col);
+
+! if (!result && incl(&pos) == 0 && pos.col == regmatch.endpos[0].col)
+! result = TRUE;
+ }
+
+ called_emsg |= save_called_emsg;
+--- 4680,4687 ----
+ && regmatch.startpos[0].lnum == regmatch.endpos[0].lnum
+ && regmatch.startpos[0].col == regmatch.endpos[0].col);
+
+! if (!result && inc(&pos) >= 0 && pos.col == regmatch.endpos[0].col)
+! result = TRUE;
+ }
+
+ called_emsg |= save_called_emsg;
+*** ../vim-7.4.049/src/testdir/test53.in 2013-06-30 14:31:56.000000000 +0200
+--- src/testdir/test53.in 2013-10-02 21:47:10.000000000 +0200
+***************
+*** 46,51 ****
+--- 46,54 ----
+ :set selection=exclusive
+ $cgNmongoose/i
+ cgnj
++ :" Make sure there is no other match y uppercase.
++ /x59
++ gggnd
+ :/^start:/,/^end:/wq! test.out
+ ENDTEST
+
+***************
+*** 75,78 ****
+--- 78,84 ----
+ uniquepattern uniquepattern
+ my very excellent mother just served us nachos
+ for (i=0; i<=10; i++)
++ Y
++ text
++ Y
+ end:
+*** ../vim-7.4.049/src/testdir/test53.ok 2013-06-30 14:31:56.000000000 +0200
+--- src/testdir/test53.ok 2013-10-02 21:47:34.000000000 +0200
+***************
+*** 27,30 ****
+--- 27,33 ----
+ uniquepattern
+ my very excellent mongoose just served us nachos
+ for (j=0; i<=10; i++)
++
++ text
++ Y
+ end:
+*** ../vim-7.4.049/src/version.c 2013-10-02 18:43:00.000000000 +0200
+--- src/version.c 2013-10-02 21:51:34.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 50,
+ /**/
+
+--
+Why doesn't Tarzan have a beard?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.051 b/patches/source/vim/patches/7.4.051
new file mode 100644
index 000000000..ca5c3a04e
--- /dev/null
+++ b/patches/source/vim/patches/7.4.051
@@ -0,0 +1,67 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.051
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.051
+Problem: Syntax highlighting a Yaml file causes a crash. (Blake Preston)
+Solution: Copy the pim structure before calling addstate() to avoid it
+ becoming invalide when the state list is reallocated.
+Files: src/regexp_nfa.c
+
+
+*** ../vim-7.4.050/src/regexp_nfa.c 2013-09-25 18:16:34.000000000 +0200
+--- src/regexp_nfa.c 2013-10-06 15:44:31.000000000 +0200
+***************
+*** 6458,6463 ****
+--- 6458,6464 ----
+ if (add_state != NULL)
+ {
+ nfa_pim_T *pim;
++ nfa_pim_T pim_copy;
+
+ if (t->pim.result == NFA_PIM_UNUSED)
+ pim = NULL;
+***************
+*** 6531,6536 ****
+--- 6532,6546 ----
+ pim = NULL;
+ }
+
++ /* If "pim" points into l->t it will become invalid when
++ * adding the state causes the list to be reallocated. Make a
++ * local copy to avoid that. */
++ if (pim == &t->pim)
++ {
++ copy_pim(&pim_copy, pim);
++ pim = &pim_copy;
++ }
++
+ if (add_here)
+ addstate_here(thislist, add_state, &t->subs, pim, &listidx);
+ else
+*** ../vim-7.4.050/src/version.c 2013-10-02 21:54:57.000000000 +0200
+--- src/version.c 2013-10-06 15:21:16.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 51,
+ /**/
+
+--
+GUARD #2: It could be carried by an African swallow!
+GUARD #1: Oh, yeah, an African swallow maybe, but not a European swallow,
+ that's my point.
+GUARD #2: Oh, yeah, I agree with that...
+ The Quest for the Holy Grail (Monty Python)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.052 b/patches/source/vim/patches/7.4.052
new file mode 100644
index 000000000..502d07b56
--- /dev/null
+++ b/patches/source/vim/patches/7.4.052
@@ -0,0 +1,197 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.052
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.052
+Problem: With 'fo' set to "a2" inserting a space in the first column may
+ cause the cursor to jump to the previous line.
+Solution: Handle the case when there is no comment leader properly. (Tor
+ Perkins) Also fix that cursor is in the wrong place when spaces
+ get replaced with a Tab.
+Files: src/misc1.c, src/ops.c, src/testdir/test68.in,
+ src/testdir/test68.ok
+
+
+*** ../vim-7.4.051/src/misc1.c 2013-09-05 21:41:35.000000000 +0200
+--- src/misc1.c 2013-10-06 17:46:18.000000000 +0200
+***************
+*** 303,312 ****
+ ml_replace(curwin->w_cursor.lnum, newline, FALSE);
+ if (flags & SIN_CHANGED)
+ changed_bytes(curwin->w_cursor.lnum, 0);
+! /* Correct saved cursor position if it's after the indent. */
+! if (saved_cursor.lnum == curwin->w_cursor.lnum
+! && saved_cursor.col >= (colnr_T)(p - oldline))
+! saved_cursor.col += ind_len - (colnr_T)(p - oldline);
+ retval = TRUE;
+ }
+ else
+--- 303,320 ----
+ ml_replace(curwin->w_cursor.lnum, newline, FALSE);
+ if (flags & SIN_CHANGED)
+ changed_bytes(curwin->w_cursor.lnum, 0);
+! /* Correct saved cursor position if it is in this line. */
+! if (saved_cursor.lnum == curwin->w_cursor.lnum)
+! {
+! if (saved_cursor.col >= (colnr_T)(p - oldline))
+! /* cursor was after the indent, adjust for the number of
+! * bytes added/removed */
+! saved_cursor.col += ind_len - (colnr_T)(p - oldline);
+! else if (saved_cursor.col >= (colnr_T)(s - newline))
+! /* cursor was in the indent, and is now after it, put it back
+! * at the start of the indent (replacing spaces with TAB) */
+! saved_cursor.col = (colnr_T)(s - newline);
+! }
+ retval = TRUE;
+ }
+ else
+***************
+*** 1581,1589 ****
+
+ #if defined(FEAT_COMMENTS) || defined(PROTO)
+ /*
+! * get_leader_len() returns the length of the prefix of the given string
+! * which introduces a comment. If this string is not a comment then 0 is
+! * returned.
+ * When "flags" is not NULL, it is set to point to the flags of the recognized
+ * comment leader.
+ * "backward" must be true for the "O" command.
+--- 1589,1597 ----
+
+ #if defined(FEAT_COMMENTS) || defined(PROTO)
+ /*
+! * get_leader_len() returns the length in bytes of the prefix of the given
+! * string which introduces a comment. If this string is not a comment then
+! * 0 is returned.
+ * When "flags" is not NULL, it is set to point to the flags of the recognized
+ * comment leader.
+ * "backward" must be true for the "O" command.
+*** ../vim-7.4.051/src/ops.c 2013-09-25 23:24:54.000000000 +0200
+--- src/ops.c 2013-10-06 17:11:51.000000000 +0200
+***************
+*** 4989,4995 ****
+
+ /*
+ * When still in same paragraph, join the lines together. But
+! * first delete the comment leader from the second line.
+ */
+ if (!is_end_par)
+ {
+--- 4989,4995 ----
+
+ /*
+ * When still in same paragraph, join the lines together. But
+! * first delete the leader from the second line.
+ */
+ if (!is_end_par)
+ {
+***************
+*** 4999,5009 ****
+ if (line_count < 0 && u_save_cursor() == FAIL)
+ break;
+ #ifdef FEAT_COMMENTS
+- (void)del_bytes((long)next_leader_len, FALSE, FALSE);
+ if (next_leader_len > 0)
+ mark_col_adjust(curwin->w_cursor.lnum, (colnr_T)0, 0L,
+ (long)-next_leader_len);
+ #endif
+ curwin->w_cursor.lnum--;
+ if (do_join(2, TRUE, FALSE, FALSE) == FAIL)
+ {
+--- 4999,5023 ----
+ if (line_count < 0 && u_save_cursor() == FAIL)
+ break;
+ #ifdef FEAT_COMMENTS
+ if (next_leader_len > 0)
++ {
++ (void)del_bytes((long)next_leader_len, FALSE, FALSE);
+ mark_col_adjust(curwin->w_cursor.lnum, (colnr_T)0, 0L,
+ (long)-next_leader_len);
++ } else
+ #endif
++ if (second_indent > 0) /* the "leader" for FO_Q_SECOND */
++ {
++ char_u *p = ml_get_curline();
++ int indent = skipwhite(p) - p;
++
++ if (indent > 0)
++ {
++ (void)del_bytes(indent, FALSE, FALSE);
++ mark_col_adjust(curwin->w_cursor.lnum,
++ (colnr_T)0, 0L, (long)-indent);
++ }
++ }
+ curwin->w_cursor.lnum--;
+ if (do_join(2, TRUE, FALSE, FALSE) == FAIL)
+ {
+*** ../vim-7.4.051/src/testdir/test68.in 2012-07-25 15:57:06.000000000 +0200
+--- src/testdir/test68.in 2013-10-06 16:20:33.000000000 +0200
+***************
+*** 62,67 ****
+--- 62,81 ----
+ }
+
+ STARTTEST
++ /^{/+3
++ :set tw=5 fo=t2a si
++ i A_
++ ENDTEST
++
++ {
++
++ x a
++ b
++ c
++
++ }
++
++ STARTTEST
+ /^{/+1
+ :set tw=5 fo=qn comments=:#
+ gwap
+*** ../vim-7.4.051/src/testdir/test68.ok 2012-07-25 16:03:05.000000000 +0200
+--- src/testdir/test68.ok 2013-10-06 16:20:33.000000000 +0200
+***************
+*** 43,48 ****
+--- 43,57 ----
+
+
+ {
++
++ x a
++ b_
++ c
++
++ }
++
++
++ {
+ # 1 a
+ # b
+ }
+*** ../vim-7.4.051/src/version.c 2013-10-06 15:46:06.000000000 +0200
+--- src/version.c 2013-10-06 17:25:27.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 52,
+ /**/
+
+--
+ARTHUR: Will you ask your master if he wants to join my court at Camelot?!
+GUARD #1: But then of course African swallows are not migratory.
+GUARD #2: Oh, yeah...
+GUARD #1: So they couldn't bring a coconut back anyway...
+ The Quest for the Holy Grail (Monty Python)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.053 b/patches/source/vim/patches/7.4.053
new file mode 100644
index 000000000..22724fc70
--- /dev/null
+++ b/patches/source/vim/patches/7.4.053
@@ -0,0 +1,45 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.053
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.053
+Problem: Test75 has a wrong header. (ZyX)
+Solution: Fix the text and remove leading ".
+Files: src/testdir/test75.in
+
+
+*** ../vim-7.4.052/src/testdir/test75.in 2013-06-29 13:48:42.000000000 +0200
+--- src/testdir/test75.in 2013-10-19 20:28:53.000000000 +0200
+***************
+*** 1,4 ****
+! " Tests for functions.
+
+ STARTTEST
+ :so small.vim
+--- 1,4 ----
+! Tests for maparg().
+
+ STARTTEST
+ :so small.vim
+*** ../vim-7.4.052/src/version.c 2013-10-06 17:46:48.000000000 +0200
+--- src/version.c 2013-11-02 04:18:07.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 53,
+ /**/
+
+--
+Every exit is an entrance into something else.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.054 b/patches/source/vim/patches/7.4.054
new file mode 100644
index 000000000..0fcffac2d
--- /dev/null
+++ b/patches/source/vim/patches/7.4.054
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.054
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.054
+Problem: Reading past end of the 'stl' string.
+Solution: Don't increment pointer when already at the NUL. (Christian
+ Brabandt)
+Files: src/buffer.c
+
+
+*** ../vim-7.4.053/src/buffer.c 2013-08-14 17:11:14.000000000 +0200
+--- src/buffer.c 2013-11-02 04:34:26.000000000 +0100
+***************
+*** 4062,4068 ****
+ item[curitem].minwid = -syn_namen2id(t, (int)(s - t));
+ curitem++;
+ }
+! ++s;
+ continue;
+ }
+
+--- 4062,4069 ----
+ item[curitem].minwid = -syn_namen2id(t, (int)(s - t));
+ curitem++;
+ }
+! if (*s != NUL)
+! ++s;
+ continue;
+ }
+
+*** ../vim-7.4.053/src/version.c 2013-11-02 04:19:10.000000000 +0100
+--- src/version.c 2013-11-02 04:31:50.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 54,
+ /**/
+
+--
+Every person is responsible for the choices he makes.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.055 b/patches/source/vim/patches/7.4.055
new file mode 100644
index 000000000..b6adc044f
--- /dev/null
+++ b/patches/source/vim/patches/7.4.055
@@ -0,0 +1,138 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.055
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.055
+Problem: Mac: Where availability macros are defined depends on the system.
+Solution: Add a configure check. (Felix Bünemann)
+Files: src/config.h.in, src/configure.in, src/auto/configure,
+ src/os_mac.h
+
+*** ../vim-7.4.054/src/config.h.in 2013-02-26 14:18:19.000000000 +0100
+--- src/config.h.in 2013-11-02 20:52:08.000000000 +0100
+***************
+*** 442,444 ****
+--- 442,447 ----
+
+ /* Define if you want Cygwin to use the WIN32 clipboard, not compatible with X11*/
+ #undef FEAT_CYGWIN_WIN32_CLIPBOARD
++
++ /* Define if we have AvailabilityMacros.h on Mac OS X */
++ #undef HAVE_AVAILABILITYMACROS_H
+*** ../vim-7.4.054/src/configure.in 2013-10-02 18:22:58.000000000 +0200
+--- src/configure.in 2013-11-02 20:58:58.000000000 +0100
+***************
+*** 206,211 ****
+--- 206,215 ----
+ dnl TODO: use -arch i386 on Intel machines
+ CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
+
++ dnl Mac OS X 10.9+ no longer include AvailabilityMacros.h in Carbon
++ dnl so we need to include it to have access to version macros.
++ AC_CHECK_HEADER(AvailabilityMacros.h, [AC_DEFINE(HAVE_AVAILABILITYMACROS_H, 1, [ Define if we have AvailabilityMacros.h on Mac OS X ])])
++
+ dnl If Carbon is found, assume we don't want X11
+ dnl unless it was specifically asked for (--with-x)
+ dnl or Motif, Athena or GTK GUI is used.
+*** ../vim-7.4.054/src/auto/configure 2013-10-02 18:22:58.000000000 +0200
+--- src/auto/configure 2013-11-02 21:00:40.000000000 +0100
+***************
+*** 4223,4229 ****
+ OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
+ CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
+
+! # On IRIX 5.3, sys/types and inttypes.h are conflicting.
+ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+ do :
+--- 4223,4229 ----
+ OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
+ CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
+
+! # On IRIX 5.3, sys/types and inttypes.h are conflicting.
+ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+ do :
+***************
+*** 4241,4247 ****
+ done
+
+
+! ac_fn_c_check_header_mongrel "$LINENO" "Carbon/Carbon.h" "ac_cv_header_Carbon_Carbon_h" "$ac_includes_default"
+ if test "x$ac_cv_header_Carbon_Carbon_h" = x""yes; then :
+ CARBON=yes
+ fi
+--- 4241,4256 ----
+ done
+
+
+! ac_fn_c_check_header_mongrel "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default"
+! if test "x$ac_cv_header_AvailabilityMacros_h" = x""yes; then :
+!
+! $as_echo "#define HAVE_AVAILABILITYMACROS_H 1" >>confdefs.h
+!
+! fi
+!
+!
+!
+! ac_fn_c_check_header_mongrel "$LINENO" "Carbon/Carbon.h" "ac_cv_header_Carbon_Carbon_h" "$ac_includes_default"
+ if test "x$ac_cv_header_Carbon_Carbon_h" = x""yes; then :
+ CARBON=yes
+ fi
+*** ../vim-7.4.054/src/os_mac.h 2013-05-06 04:06:04.000000000 +0200
+--- src/os_mac.h 2013-11-02 20:59:46.000000000 +0100
+***************
+*** 16,21 ****
+--- 16,26 ----
+ # define OPAQUE_TOOLBOX_STRUCTS 0
+ #endif
+
++ /* Include MAC_OS_X_VERSION_* macros */
++ #ifdef HAVE_AVAILABILITYMACROS_H
++ # include <AvailabilityMacros.h>
++ #endif
++
+ /*
+ * Macintosh machine-dependent things.
+ *
+***************
+*** 263,269 ****
+ #endif
+
+ /* Some "prep work" definition to be able to compile the MacOS X
+! * version with os_unix.x instead of os_mac.c. Based on the result
+ * of ./configure for console MacOS X.
+ */
+
+--- 268,274 ----
+ #endif
+
+ /* Some "prep work" definition to be able to compile the MacOS X
+! * version with os_unix.c instead of os_mac.c. Based on the result
+ * of ./configure for console MacOS X.
+ */
+
+*** ../vim-7.4.054/src/version.c 2013-11-02 04:39:34.000000000 +0100
+--- src/version.c 2013-11-02 21:01:10.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 55,
+ /**/
+
+--
+You can be stopped by the police for biking over 65 miles per hour.
+You are not allowed to walk across a street on your hands.
+ [real standing laws in Connecticut, United States of America]
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.056 b/patches/source/vim/patches/7.4.056
new file mode 100644
index 000000000..e8c1a346f
--- /dev/null
+++ b/patches/source/vim/patches/7.4.056
@@ -0,0 +1,51 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.056
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.056
+Problem: Mac: Compilation problem with OS X 10.9 Mavericks.
+Solution: Include AvailabilityMacros.h when available. (Kazunobu Kuriyama)
+Files: src/os_unix.c
+
+
+*** ../vim-7.4.055/src/os_unix.c 2013-09-05 21:41:35.000000000 +0200
+--- src/os_unix.c 2013-11-02 21:46:05.000000000 +0100
+***************
+*** 804,809 ****
+--- 804,815 ----
+ * completely full.
+ */
+
++ #if defined(HAVE_AVAILABILITYMACROS_H) \
++ && defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) \
++ && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1090)
++ # include <AvailabilityMacros.h>
++ #endif
++
+ #ifndef SIGSTKSZ
+ # define SIGSTKSZ 8000 /* just a guess of how much stack is needed... */
+ #endif
+*** ../vim-7.4.055/src/version.c 2013-11-02 21:04:32.000000000 +0100
+--- src/version.c 2013-11-02 21:44:10.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 56,
+ /**/
+
+--
+If an elephant is left tied to a parking meter, the parking fee has to be paid
+just as it would for a vehicle.
+ [real standing law in Florida, United States of America]
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.057 b/patches/source/vim/patches/7.4.057
new file mode 100644
index 000000000..aee16b6aa
--- /dev/null
+++ b/patches/source/vim/patches/7.4.057
@@ -0,0 +1,252 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.057
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.057
+Problem: byteidx() does not work for composing characters.
+Solution: Add byteidxcomp().
+Files: src/eval.c, src/testdir/test69.in, src/testdir/test69.ok,
+ runtime/doc/eval.txt
+
+
+*** ../vim-7.4.056/src/eval.c 2013-10-02 16:46:23.000000000 +0200
+--- src/eval.c 2013-11-02 22:30:08.000000000 +0100
+***************
+*** 474,480 ****
+--- 474,482 ----
+ static void f_bufnr __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_bufwinnr __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_byte2line __ARGS((typval_T *argvars, typval_T *rettv));
++ static void byteidx __ARGS((typval_T *argvars, typval_T *rettv, int comp));
+ static void f_byteidx __ARGS((typval_T *argvars, typval_T *rettv));
++ static void f_byteidxcomp __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_call __ARGS((typval_T *argvars, typval_T *rettv));
+ #ifdef FEAT_FLOAT
+ static void f_ceil __ARGS((typval_T *argvars, typval_T *rettv));
+***************
+*** 7861,7866 ****
+--- 7863,7869 ----
+ {"bufwinnr", 1, 1, f_bufwinnr},
+ {"byte2line", 1, 1, f_byte2line},
+ {"byteidx", 2, 2, f_byteidx},
++ {"byteidxcomp", 2, 2, f_byteidxcomp},
+ {"call", 2, 3, f_call},
+ #ifdef FEAT_FLOAT
+ {"ceil", 1, 1, f_ceil},
+***************
+*** 9177,9189 ****
+ #endif
+ }
+
+- /*
+- * "byteidx()" function
+- */
+ static void
+! f_byteidx(argvars, rettv)
+ typval_T *argvars;
+ typval_T *rettv;
+ {
+ #ifdef FEAT_MBYTE
+ char_u *t;
+--- 9180,9190 ----
+ #endif
+ }
+
+ static void
+! byteidx(argvars, rettv, comp)
+ typval_T *argvars;
+ typval_T *rettv;
++ int comp;
+ {
+ #ifdef FEAT_MBYTE
+ char_u *t;
+***************
+*** 9203,9209 ****
+ {
+ if (*t == NUL) /* EOL reached */
+ return;
+! t += (*mb_ptr2len)(t);
+ }
+ rettv->vval.v_number = (varnumber_T)(t - str);
+ #else
+--- 9204,9213 ----
+ {
+ if (*t == NUL) /* EOL reached */
+ return;
+! if (enc_utf8 && comp)
+! t += utf_ptr2len(t);
+! else
+! t += (*mb_ptr2len)(t);
+ }
+ rettv->vval.v_number = (varnumber_T)(t - str);
+ #else
+***************
+*** 9212,9217 ****
+--- 9216,9243 ----
+ #endif
+ }
+
++ /*
++ * "byteidx()" function
++ */
++ static void
++ f_byteidx(argvars, rettv)
++ typval_T *argvars;
++ typval_T *rettv;
++ {
++ byteidx(argvars, rettv, FALSE);
++ }
++
++ /*
++ * "byteidxcomp()" function
++ */
++ static void
++ f_byteidxcomp(argvars, rettv)
++ typval_T *argvars;
++ typval_T *rettv;
++ {
++ byteidx(argvars, rettv, TRUE);
++ }
++
+ int
+ func_call(name, args, selfdict, rettv)
+ char_u *name;
+*** ../vim-7.4.056/src/testdir/test69.in 2013-03-07 18:30:50.000000000 +0100
+--- src/testdir/test69.in 2013-11-02 22:46:02.000000000 +0100
+***************
+*** 1,6 ****
+--- 1,7 ----
+ Test for multi-byte text formatting.
+ Also test, that 'mps' with multibyte chars works.
+ And test "ra" on multi-byte characters.
++ Also test byteidx() and byteidxcomp()
+
+ STARTTEST
+ :so mbyte.vim
+***************
+*** 154,159 ****
+--- 155,175 ----
+ ï½ï½b
+
+ STARTTEST
++ :let a = '.é.' " one char of two bytes
++ :let b = '.eÌ.' " normal e with composing char
++ /^byteidx
++ :put =string([byteidx(a, 0), byteidx(a, 1), byteidx(a, 2), byteidx(a, 3), byteidx(a, 4)])
++ :put =string([byteidx(b, 0), byteidx(b, 1), byteidx(b, 2), byteidx(b, 3), byteidx(b, 4)])
++ /^byteidxcomp
++ :put =string([byteidxcomp(a, 0), byteidxcomp(a, 1), byteidxcomp(a, 2), byteidxcomp(a, 3), byteidxcomp(a, 4)])
++ :let b = '.eÌ.'
++ :put =string([byteidxcomp(b, 0), byteidxcomp(b, 1), byteidxcomp(b, 2), byteidxcomp(b, 3), byteidxcomp(b, 4), byteidxcomp(b, 5)])
++ ENDTEST
++
++ byteidx
++ byteidxcomp
++
++ STARTTEST
+ :g/^STARTTEST/.,/^ENDTEST/d
+ :1;/^Results/,$wq! test.out
+ ENDTEST
+*** ../vim-7.4.056/src/testdir/test69.ok 2013-03-07 18:31:32.000000000 +0100
+--- src/testdir/test69.ok 2013-11-02 22:43:25.000000000 +0100
+***************
+*** 149,151 ****
+--- 149,159 ----
+ aaaa
+ aaa
+
++
++ byteidx
++ [0, 1, 3, 4, -1]
++ [0, 1, 4, 5, -1]
++ byteidxcomp
++ [0, 1, 3, 4, -1]
++ [0, 1, 2, 4, 5, -1]
++
+*** ../vim-7.4.056/runtime/doc/eval.txt 2013-08-10 13:24:53.000000000 +0200
+--- runtime/doc/eval.txt 2013-11-02 23:27:24.000000000 +0100
+***************
+*** 1712,1717 ****
+--- 1713,1719 ----
+ bufwinnr( {expr}) Number window number of buffer {expr}
+ byte2line( {byte}) Number line number at byte count {byte}
+ byteidx( {expr}, {nr}) Number byte index of {nr}'th char in {expr}
++ byteidxcomp( {expr}, {nr}) Number byte index of {nr}'th char in {expr}
+ call( {func}, {arglist} [, {dict}])
+ any call {func} with arguments {arglist}
+ ceil( {expr}) Float round {expr} up
+***************
+*** 2260,2266 ****
+ {expr}. Use zero for the first character, it returns zero.
+ This function is only useful when there are multibyte
+ characters, otherwise the returned value is equal to {nr}.
+! Composing characters are counted as a separate character.
+ Example : >
+ echo matchstr(str, ".", byteidx(str, 3))
+ < will display the fourth character. Another way to do the
+--- 2262,2271 ----
+ {expr}. Use zero for the first character, it returns zero.
+ This function is only useful when there are multibyte
+ characters, otherwise the returned value is equal to {nr}.
+! Composing characters are not counted separately, their byte
+! length is added to the preceding base character. See
+! |byteidxcomp()| below for counting composing characters
+! separately.
+ Example : >
+ echo matchstr(str, ".", byteidx(str, 3))
+ < will display the fourth character. Another way to do the
+***************
+*** 2269,2275 ****
+ echo strpart(s, 0, byteidx(s, 1))
+ < If there are less than {nr} characters -1 is returned.
+ If there are exactly {nr} characters the length of the string
+! is returned.
+
+ call({func}, {arglist} [, {dict}]) *call()* *E699*
+ Call function {func} with the items in |List| {arglist} as
+--- 2274,2293 ----
+ echo strpart(s, 0, byteidx(s, 1))
+ < If there are less than {nr} characters -1 is returned.
+ If there are exactly {nr} characters the length of the string
+! in bytes is returned.
+!
+! byteidxcomp({expr}, {nr}) *byteidxcomp()*
+! Like byteidx(), except that a composing character is counted
+! as a separate character. Example: >
+! let s = 'e' . nr2char(0x301)
+! echo byteidx(s, 1)
+! echo byteidxcomp(s, 1)
+! echo byteidxcomp(s, 2)
+! < The first and third echo result in 3 ('e' plus composing
+! character is 3 bytes), the second echo results in 1 ('e' is
+! one byte).
+! Only works different from byteidx() when 'encoding' is set to
+! a Unicode encoding.
+
+ call({func}, {arglist} [, {dict}]) *call()* *E699*
+ Call function {func} with the items in |List| {arglist} as
+*** ../vim-7.4.056/src/version.c 2013-11-02 21:49:28.000000000 +0100
+--- src/version.c 2013-11-02 22:45:13.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 57,
+ /**/
+
+--
+Any sufficiently advanced technology is indistinguishable from magic.
+ Arthur C. Clarke
+Any sufficiently advanced bug is indistinguishable from a feature.
+ Rich Kulawiec
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.058 b/patches/source/vim/patches/7.4.058
new file mode 100644
index 000000000..0715c848d
--- /dev/null
+++ b/patches/source/vim/patches/7.4.058
@@ -0,0 +1,67 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.058
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.058
+Problem: Warnings on 64 bit Windows.
+Solution: Add type casts. (Mike Williams)
+Files: src/ops.c
+
+
+*** ../vim-7.4.057/src/ops.c 2013-10-06 17:46:48.000000000 +0200
+--- src/ops.c 2013-11-02 23:56:15.000000000 +0100
+***************
+*** 5009,5022 ****
+ if (second_indent > 0) /* the "leader" for FO_Q_SECOND */
+ {
+ char_u *p = ml_get_curline();
+! int indent = skipwhite(p) - p;
+
+ if (indent > 0)
+ {
+ (void)del_bytes(indent, FALSE, FALSE);
+ mark_col_adjust(curwin->w_cursor.lnum,
+ (colnr_T)0, 0L, (long)-indent);
+! }
+ }
+ curwin->w_cursor.lnum--;
+ if (do_join(2, TRUE, FALSE, FALSE) == FAIL)
+--- 5009,5022 ----
+ if (second_indent > 0) /* the "leader" for FO_Q_SECOND */
+ {
+ char_u *p = ml_get_curline();
+! int indent = (int)(skipwhite(p) - p);
+
+ if (indent > 0)
+ {
+ (void)del_bytes(indent, FALSE, FALSE);
+ mark_col_adjust(curwin->w_cursor.lnum,
+ (colnr_T)0, 0L, (long)-indent);
+! }
+ }
+ curwin->w_cursor.lnum--;
+ if (do_join(2, TRUE, FALSE, FALSE) == FAIL)
+*** ../vim-7.4.057/src/version.c 2013-11-02 23:29:17.000000000 +0100
+--- src/version.c 2013-11-02 23:55:01.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 58,
+ /**/
+
+--
+Citizens are not allowed to attend a movie house or theater nor ride in a
+public streetcar within at least four hours after eating garlic.
+ [real standing law in Indiana, United States of America]
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.059 b/patches/source/vim/patches/7.4.059
new file mode 100644
index 000000000..b00cbfe04
--- /dev/null
+++ b/patches/source/vim/patches/7.4.059
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.059
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.059
+Problem: set_last_cursor() may encounter w_buffer being NULL. (Matt
+ Mkaniaris)
+Solution: Check for NULL.
+Files: src/mark.c
+
+
+*** ../vim-7.4.058/src/mark.c 2013-08-02 17:22:10.000000000 +0200
+--- src/mark.c 2013-11-03 00:18:35.000000000 +0100
+***************
+*** 1374,1380 ****
+ set_last_cursor(win)
+ win_T *win;
+ {
+! win->w_buffer->b_last_cursor = win->w_cursor;
+ }
+
+ #if defined(EXITFREE) || defined(PROTO)
+--- 1374,1381 ----
+ set_last_cursor(win)
+ win_T *win;
+ {
+! if (win->w_buffer != NULL)
+! win->w_buffer->b_last_cursor = win->w_cursor;
+ }
+
+ #if defined(EXITFREE) || defined(PROTO)
+*** ../vim-7.4.058/src/version.c 2013-11-02 23:59:30.000000000 +0100
+--- src/version.c 2013-11-03 00:17:55.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 59,
+ /**/
+
+--
+How do you know when you have run out of invisible ink?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.060 b/patches/source/vim/patches/7.4.060
new file mode 100644
index 000000000..d6a767275
--- /dev/null
+++ b/patches/source/vim/patches/7.4.060
@@ -0,0 +1,71 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.060
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.060
+Problem: Declaration has wrong return type for PyObject_SetAttrString().
+Solution: Use int instead of PyObject. (Andreas Schwab)
+Files: src/if_python.c, src/if_python3.c
+
+
+*** ../vim-7.4.059/src/if_python.c 2013-07-09 21:40:11.000000000 +0200
+--- src/if_python.c 2013-11-03 00:24:57.000000000 +0100
+***************
+*** 359,365 ****
+ static PyObject *(*dll_PyRun_String)(char *, int, PyObject *, PyObject *);
+ static PyObject* (*dll_PyObject_GetAttrString)(PyObject *, const char *);
+ static int (*dll_PyObject_HasAttrString)(PyObject *, const char *);
+! static PyObject* (*dll_PyObject_SetAttrString)(PyObject *, const char *, PyObject *);
+ static PyObject* (*dll_PyObject_CallFunctionObjArgs)(PyObject *, ...);
+ static PyObject* (*dll_PyObject_CallFunction)(PyObject *, char *, ...);
+ static PyObject* (*dll_PyObject_Call)(PyObject *, PyObject *, PyObject *);
+--- 359,365 ----
+ static PyObject *(*dll_PyRun_String)(char *, int, PyObject *, PyObject *);
+ static PyObject* (*dll_PyObject_GetAttrString)(PyObject *, const char *);
+ static int (*dll_PyObject_HasAttrString)(PyObject *, const char *);
+! static int (*dll_PyObject_SetAttrString)(PyObject *, const char *, PyObject *);
+ static PyObject* (*dll_PyObject_CallFunctionObjArgs)(PyObject *, ...);
+ static PyObject* (*dll_PyObject_CallFunction)(PyObject *, char *, ...);
+ static PyObject* (*dll_PyObject_Call)(PyObject *, PyObject *, PyObject *);
+*** ../vim-7.4.059/src/if_python3.c 2013-07-09 21:53:21.000000000 +0200
+--- src/if_python3.c 2013-11-03 00:24:57.000000000 +0100
+***************
+*** 302,308 ****
+ static PyObject* (*py3_PyRun_String)(char *, int, PyObject *, PyObject *);
+ static PyObject* (*py3_PyObject_GetAttrString)(PyObject *, const char *);
+ static int (*py3_PyObject_HasAttrString)(PyObject *, const char *);
+! static PyObject* (*py3_PyObject_SetAttrString)(PyObject *, const char *, PyObject *);
+ static PyObject* (*py3_PyObject_CallFunctionObjArgs)(PyObject *, ...);
+ static PyObject* (*py3__PyObject_CallFunction_SizeT)(PyObject *, char *, ...);
+ static PyObject* (*py3_PyObject_Call)(PyObject *, PyObject *, PyObject *);
+--- 302,308 ----
+ static PyObject* (*py3_PyRun_String)(char *, int, PyObject *, PyObject *);
+ static PyObject* (*py3_PyObject_GetAttrString)(PyObject *, const char *);
+ static int (*py3_PyObject_HasAttrString)(PyObject *, const char *);
+! static int (*py3_PyObject_SetAttrString)(PyObject *, const char *, PyObject *);
+ static PyObject* (*py3_PyObject_CallFunctionObjArgs)(PyObject *, ...);
+ static PyObject* (*py3__PyObject_CallFunction_SizeT)(PyObject *, char *, ...);
+ static PyObject* (*py3_PyObject_Call)(PyObject *, PyObject *, PyObject *);
+*** ../vim-7.4.059/src/version.c 2013-11-03 00:20:46.000000000 +0100
+--- src/version.c 2013-11-03 00:26:19.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 60,
+ /**/
+
+--
+Kisses may last for as much as, but no more than, five minutes.
+ [real standing law in Iowa, United States of America]
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.061 b/patches/source/vim/patches/7.4.061
new file mode 100644
index 000000000..ebd5b2d78
--- /dev/null
+++ b/patches/source/vim/patches/7.4.061
@@ -0,0 +1,144 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.061
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.061 (after 7.4.055 and 7.4.056)
+Problem: Availability macros configure check in wrong place.
+Solution: Also check when not using Darwin. Remove version check.
+Files: src/configure.in, src/auto/configure, src/os_unix.c
+
+
+*** ../vim-7.4.060/src/configure.in 2013-11-02 21:04:32.000000000 +0100
+--- src/configure.in 2013-11-03 00:34:07.000000000 +0100
+***************
+*** 206,215 ****
+ dnl TODO: use -arch i386 on Intel machines
+ CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
+
+- dnl Mac OS X 10.9+ no longer include AvailabilityMacros.h in Carbon
+- dnl so we need to include it to have access to version macros.
+- AC_CHECK_HEADER(AvailabilityMacros.h, [AC_DEFINE(HAVE_AVAILABILITYMACROS_H, 1, [ Define if we have AvailabilityMacros.h on Mac OS X ])])
+-
+ dnl If Carbon is found, assume we don't want X11
+ dnl unless it was specifically asked for (--with-x)
+ dnl or Motif, Athena or GTK GUI is used.
+--- 206,211 ----
+***************
+*** 232,237 ****
+--- 228,237 ----
+ AC_MSG_RESULT(no)
+ fi
+
++ dnl Mac OS X 10.9+ no longer include AvailabilityMacros.h in Carbon
++ dnl so we need to include it to have access to version macros.
++ AC_CHECK_HEADER(AvailabilityMacros.h, HAVE_AVAILABILITYMACROS_H=1)
++
+ AC_SUBST(OS_EXTRA_SRC)
+ AC_SUBST(OS_EXTRA_OBJ)
+
+*** ../vim-7.4.060/src/auto/configure 2013-11-02 21:04:32.000000000 +0100
+--- src/auto/configure 2013-11-03 00:36:20.000000000 +0100
+***************
+*** 4223,4229 ****
+ OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
+ CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
+
+! # On IRIX 5.3, sys/types and inttypes.h are conflicting.
+ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+ do :
+--- 4223,4229 ----
+ OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
+ CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
+
+! # On IRIX 5.3, sys/types and inttypes.h are conflicting.
+ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+ do :
+***************
+*** 4241,4256 ****
+ done
+
+
+! ac_fn_c_check_header_mongrel "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default"
+! if test "x$ac_cv_header_AvailabilityMacros_h" = x""yes; then :
+!
+! $as_echo "#define HAVE_AVAILABILITYMACROS_H 1" >>confdefs.h
+!
+! fi
+!
+!
+!
+! ac_fn_c_check_header_mongrel "$LINENO" "Carbon/Carbon.h" "ac_cv_header_Carbon_Carbon_h" "$ac_includes_default"
+ if test "x$ac_cv_header_Carbon_Carbon_h" = x""yes; then :
+ CARBON=yes
+ fi
+--- 4241,4247 ----
+ done
+
+
+! ac_fn_c_check_header_mongrel "$LINENO" "Carbon/Carbon.h" "ac_cv_header_Carbon_Carbon_h" "$ac_includes_default"
+ if test "x$ac_cv_header_Carbon_Carbon_h" = x""yes; then :
+ CARBON=yes
+ fi
+***************
+*** 4272,4277 ****
+--- 4263,4275 ----
+ $as_echo "no" >&6; }
+ fi
+
++ ac_fn_c_check_header_mongrel "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default"
++ if test "x$ac_cv_header_AvailabilityMacros_h" = x""yes; then :
++ HAVE_AVAILABILITYMACROS_H=1
++ fi
++
++
++
+
+
+
+*** ../vim-7.4.060/src/os_unix.c 2013-11-02 21:49:28.000000000 +0100
+--- src/os_unix.c 2013-11-03 00:34:29.000000000 +0100
+***************
+*** 804,812 ****
+ * completely full.
+ */
+
+! #if defined(HAVE_AVAILABILITYMACROS_H) \
+! && defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) \
+! && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1090)
+ # include <AvailabilityMacros.h>
+ #endif
+
+--- 804,810 ----
+ * completely full.
+ */
+
+! #if defined(HAVE_AVAILABILITYMACROS_H)
+ # include <AvailabilityMacros.h>
+ #endif
+
+*** ../vim-7.4.060/src/version.c 2013-11-03 00:28:20.000000000 +0100
+--- src/version.c 2013-11-03 00:37:02.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 61,
+ /**/
+
+--
+It is illegal to rob a bank and then shoot at the bank teller with a water
+pistol.
+ [real standing law in Louisana, United States of America]
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.062 b/patches/source/vim/patches/7.4.062
new file mode 100644
index 000000000..dad0a420c
--- /dev/null
+++ b/patches/source/vim/patches/7.4.062
@@ -0,0 +1,87 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.062
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.062 (after 7.4.061)
+Problem: Configure check for AvailabilityMacros.h is wrong.
+Solution: Use AC_CHECK_HEADERS().
+Files: src/configure.in, src/auto/configure
+
+
+*** ../vim-7.4.061/src/configure.in 2013-11-03 00:40:54.000000000 +0100
+--- src/configure.in 2013-11-03 20:19:42.000000000 +0100
+***************
+*** 230,236 ****
+
+ dnl Mac OS X 10.9+ no longer include AvailabilityMacros.h in Carbon
+ dnl so we need to include it to have access to version macros.
+! AC_CHECK_HEADER(AvailabilityMacros.h, HAVE_AVAILABILITYMACROS_H=1)
+
+ AC_SUBST(OS_EXTRA_SRC)
+ AC_SUBST(OS_EXTRA_OBJ)
+--- 230,236 ----
+
+ dnl Mac OS X 10.9+ no longer include AvailabilityMacros.h in Carbon
+ dnl so we need to include it to have access to version macros.
+! AC_CHECK_HEADERS(AvailabilityMacros.h)
+
+ AC_SUBST(OS_EXTRA_SRC)
+ AC_SUBST(OS_EXTRA_OBJ)
+*** ../vim-7.4.061/src/auto/configure 2013-11-03 00:40:54.000000000 +0100
+--- src/auto/configure 2013-11-03 20:22:56.000000000 +0100
+***************
+*** 4263,4273 ****
+ $as_echo "no" >&6; }
+ fi
+
+! ac_fn_c_check_header_mongrel "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default"
+ if test "x$ac_cv_header_AvailabilityMacros_h" = x""yes; then :
+! HAVE_AVAILABILITYMACROS_H=1
+ fi
+
+
+
+
+--- 4263,4279 ----
+ $as_echo "no" >&6; }
+ fi
+
+! for ac_header in AvailabilityMacros.h
+! do :
+! ac_fn_c_check_header_mongrel "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default"
+ if test "x$ac_cv_header_AvailabilityMacros_h" = x""yes; then :
+! cat >>confdefs.h <<_ACEOF
+! #define HAVE_AVAILABILITYMACROS_H 1
+! _ACEOF
+!
+ fi
+
++ done
+
+
+
+*** ../vim-7.4.061/src/version.c 2013-11-03 00:40:54.000000000 +0100
+--- src/version.c 2013-11-03 20:25:31.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 62,
+ /**/
+
+--
+Yesterday, all my deadlines seemed so far away
+now it looks as though it's freeze in four days
+oh I believe in cvs..
+ [ CVS log "Beatles style" for FreeBSD ports/INDEX, Satoshi Asami ]
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.063 b/patches/source/vim/patches/7.4.063
new file mode 100644
index 000000000..b72b0b764
--- /dev/null
+++ b/patches/source/vim/patches/7.4.063
@@ -0,0 +1,105 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.063
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.063
+Problem: Crash when using invalid key in Python dictionary.
+Solution: Check for object to be NULL. Add tests. (ZyX)
+Files: src/if_py_both.h, src/testdir/test86.in, src/testdir/test86.ok,
+ src/testdir/test87.in, src/testdir/test87.ok
+
+
+*** ../vim-7.4.062/src/if_py_both.h 2013-07-24 17:09:19.000000000 +0200
+--- src/if_py_both.h 2013-11-04 00:27:40.000000000 +0100
+***************
+*** 1624,1629 ****
+--- 1624,1632 ----
+ PyObject *rObj = _DictionaryItem(self, keyObject, DICT_FLAG_RETURN_BOOL);
+ int ret;
+
++ if (rObj == NULL)
++ return -1;
++
+ ret = (rObj == Py_True);
+
+ Py_DECREF(rObj);
+*** ../vim-7.4.062/src/testdir/test86.in 2013-07-13 14:00:31.000000000 +0200
+--- src/testdir/test86.in 2013-11-04 00:27:11.000000000 +0100
+***************
+*** 1088,1093 ****
+--- 1088,1096 ----
+ stringtochars_test('d.get(%s)')
+ ee('d.pop("a")')
+ ee('dl.pop("a")')
++ cb.append(">> DictionaryContains")
++ ee('"" in d')
++ ee('0 in d')
+ cb.append(">> DictionaryIterNext")
+ ee('for i in ned: ned["a"] = 1')
+ del i
+*** ../vim-7.4.062/src/testdir/test86.ok 2013-06-23 16:38:39.000000000 +0200
+--- src/testdir/test86.ok 2013-11-04 00:27:11.000000000 +0100
+***************
+*** 516,521 ****
+--- 516,524 ----
+ <<< Finished
+ d.pop("a"):KeyError:('a',)
+ dl.pop("a"):error:('dictionary is locked',)
++ >> DictionaryContains
++ "" in d:ValueError:('empty keys are not allowed',)
++ 0 in d:TypeError:('expected str() or unicode() instance, but got int',)
+ >> DictionaryIterNext
+ for i in ned: ned["a"] = 1:RuntimeError:('hashtab changed during iteration',)
+ >> DictionaryAssItem
+*** ../vim-7.4.062/src/testdir/test87.in 2013-07-06 13:41:30.000000000 +0200
+--- src/testdir/test87.in 2013-11-04 00:27:11.000000000 +0100
+***************
+*** 1039,1044 ****
+--- 1039,1047 ----
+ stringtochars_test('d.get(%s)')
+ ee('d.pop("a")')
+ ee('dl.pop("a")')
++ cb.append(">> DictionaryContains")
++ ee('"" in d')
++ ee('0 in d')
+ cb.append(">> DictionaryIterNext")
+ ee('for i in ned: ned["a"] = 1')
+ del i
+*** ../vim-7.4.062/src/testdir/test87.ok 2013-06-23 16:38:39.000000000 +0200
+--- src/testdir/test87.ok 2013-11-04 00:27:11.000000000 +0100
+***************
+*** 505,510 ****
+--- 505,513 ----
+ <<< Finished
+ d.pop("a"):(<class 'KeyError'>, KeyError('a',))
+ dl.pop("a"):(<class 'vim.error'>, error('dictionary is locked',))
++ >> DictionaryContains
++ "" in d:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
++ 0 in d:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
+ >> DictionaryIterNext
+ for i in ned: ned["a"] = 1:(<class 'RuntimeError'>, RuntimeError('hashtab changed during iteration',))
+ >> DictionaryAssItem
+*** ../vim-7.4.062/src/version.c 2013-11-03 20:26:27.000000000 +0100
+--- src/version.c 2013-11-04 00:26:39.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 63,
+ /**/
+
+--
+A parent can be arrested if his child cannot hold back a burp during a church
+service.
+ [real standing law in Nebraska, United States of America]
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.064 b/patches/source/vim/patches/7.4.064
new file mode 100644
index 000000000..771320851
--- /dev/null
+++ b/patches/source/vim/patches/7.4.064
Binary files differ
diff --git a/patches/source/vim/patches/7.4.065 b/patches/source/vim/patches/7.4.065
new file mode 100644
index 000000000..fd17fa06e
--- /dev/null
+++ b/patches/source/vim/patches/7.4.065
@@ -0,0 +1,70 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.065
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.065
+Problem: When recording, the character typed at the hit-enter prompt is
+ recorded twice. (Urtica Dioica)
+Solution: Avoid recording the character twice. (Christian Brabandt)
+Files: src/message.c
+
+
+*** ../vim-7.4.064/src/message.c 2013-08-09 20:30:45.000000000 +0200
+--- src/message.c 2013-11-04 01:56:09.000000000 +0100
+***************
+*** 887,892 ****
+--- 887,894 ----
+ int oldState;
+ int tmpState;
+ int had_got_int;
++ int save_Recording;
++ FILE *save_scriptout;
+
+ if (redraw == TRUE)
+ must_redraw = CLEAR;
+***************
+*** 957,967 ****
+--- 959,979 ----
+ * typeahead buffer. */
+ ++no_mapping;
+ ++allow_keys;
++
++ /* Temporarily disable Recording. If Recording is active, the
++ * character will be recorded later, since it will be added to the
++ * typebuf after the loop */
++ save_Recording = Recording;
++ save_scriptout = scriptout;
++ Recording = FALSE;
++ scriptout = NULL;
+ c = safe_vgetc();
+ if (had_got_int && !global_busy)
+ got_int = FALSE;
+ --no_mapping;
+ --allow_keys;
++ Recording = save_Recording;
++ scriptout = save_scriptout;
+
+ #ifdef FEAT_CLIPBOARD
+ /* Strange way to allow copying (yanking) a modeless selection at
+*** ../vim-7.4.064/src/version.c 2013-11-04 01:41:11.000000000 +0100
+--- src/version.c 2013-11-04 01:53:19.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 65,
+ /**/
+
+--
+Zen Microsystems: we're the om in .commmmmmmmm
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.066 b/patches/source/vim/patches/7.4.066
new file mode 100644
index 000000000..edab09261
--- /dev/null
+++ b/patches/source/vim/patches/7.4.066
@@ -0,0 +1,354 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.066
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.066
+Problem: MS-Windows: When there is a colon in the file name (sub-stream
+ feature) the swap file name is wrong.
+Solution: Change the colon to "%". (Yasuhiro Matsumoto)
+Files: src/fileio.c, src/memline.c, src/misc1.c, src/proto/misc1.pro
+
+
+*** ../vim-7.4.065/src/memline.c 2013-05-06 04:01:02.000000000 +0200
+--- src/memline.c 2013-11-04 02:52:44.000000000 +0100
+***************
+*** 4014,4019 ****
+--- 4014,4026 ----
+ else
+ retval = concat_fnames(dname, tail, TRUE);
+
++ #ifdef WIN3264
++ if (retval != NULL)
++ for (t = gettail(retval); *t != NUL; mb_ptr_adv(t))
++ if (*t == ':')
++ *t = '%';
++ #endif
++
+ return retval;
+ }
+
+***************
+*** 4137,4148 ****
+ #ifndef SHORT_FNAME
+ int r;
+ #endif
+
+ #if !defined(SHORT_FNAME) \
+! && ((!defined(UNIX) && !defined(OS2)) || defined(ARCHIE))
+ # define CREATE_DUMMY_FILE
+ FILE *dummyfd = NULL;
+
+ /*
+ * If we start editing a new file, e.g. "test.doc", which resides on an
+ * MSDOS compatible filesystem, it is possible that the file
+--- 4144,4172 ----
+ #ifndef SHORT_FNAME
+ int r;
+ #endif
++ char_u *buf_fname = buf->b_fname;
+
+ #if !defined(SHORT_FNAME) \
+! && ((!defined(UNIX) && !defined(OS2)) || defined(ARCHIE))
+ # define CREATE_DUMMY_FILE
+ FILE *dummyfd = NULL;
+
++ # ifdef WIN3264
++ if (buf_fname != NULL && !mch_isFullName(buf_fname)
++ && vim_strchr(gettail(buf_fname), ':'))
++ {
++ char_u *t;
++
++ buf_fname = vim_strsave(buf_fname);
++ if (buf_fname == NULL)
++ buf_fname = buf->b_fname;
++ else
++ for (t = gettail(buf_fname); *t != NUL; mb_ptr_adv(t))
++ if (*t == ':')
++ *t = '%';
++ }
++ # endif
++
+ /*
+ * If we start editing a new file, e.g. "test.doc", which resides on an
+ * MSDOS compatible filesystem, it is possible that the file
+***************
+*** 4150,4158 ****
+ * this problem we temporarily create "test.doc". Don't do this when the
+ * check below for a 8.3 file name is used.
+ */
+! if (!(buf->b_p_sn || buf->b_shortname) && buf->b_fname != NULL
+! && mch_getperm(buf->b_fname) < 0)
+! dummyfd = mch_fopen((char *)buf->b_fname, "w");
+ #endif
+
+ /*
+--- 4174,4182 ----
+ * this problem we temporarily create "test.doc". Don't do this when the
+ * check below for a 8.3 file name is used.
+ */
+! if (!(buf->b_p_sn || buf->b_shortname) && buf_fname != NULL
+! && mch_getperm(buf_fname) < 0)
+! dummyfd = mch_fopen((char *)buf_fname, "w");
+ #endif
+
+ /*
+***************
+*** 4171,4177 ****
+ if (dir_name == NULL) /* out of memory */
+ fname = NULL;
+ else
+! fname = makeswapname(buf->b_fname, buf->b_ffname, buf, dir_name);
+
+ for (;;)
+ {
+--- 4195,4201 ----
+ if (dir_name == NULL) /* out of memory */
+ fname = NULL;
+ else
+! fname = makeswapname(buf_fname, buf->b_ffname, buf, dir_name);
+
+ for (;;)
+ {
+***************
+*** 4204,4210 ****
+ * It either contains two dots, is longer than 8 chars, or starts
+ * with a dot.
+ */
+! tail = gettail(buf->b_fname);
+ if ( vim_strchr(tail, '.') != NULL
+ || STRLEN(tail) > (size_t)8
+ || *gettail(fname) == '.')
+--- 4228,4234 ----
+ * It either contains two dots, is longer than 8 chars, or starts
+ * with a dot.
+ */
+! tail = gettail(buf_fname);
+ if ( vim_strchr(tail, '.') != NULL
+ || STRLEN(tail) > (size_t)8
+ || *gettail(fname) == '.')
+***************
+*** 4273,4279 ****
+ {
+ buf->b_shortname = TRUE;
+ vim_free(fname);
+! fname = makeswapname(buf->b_fname, buf->b_ffname,
+ buf, dir_name);
+ continue; /* try again with b_shortname set */
+ }
+--- 4297,4303 ----
+ {
+ buf->b_shortname = TRUE;
+ vim_free(fname);
+! fname = makeswapname(buf_fname, buf->b_ffname,
+ buf, dir_name);
+ continue; /* try again with b_shortname set */
+ }
+***************
+*** 4344,4350 ****
+ {
+ buf->b_shortname = TRUE;
+ vim_free(fname);
+! fname = makeswapname(buf->b_fname, buf->b_ffname,
+ buf, dir_name);
+ continue; /* try again with '.' replaced with '_' */
+ }
+--- 4368,4374 ----
+ {
+ buf->b_shortname = TRUE;
+ vim_free(fname);
+! fname = makeswapname(buf_fname, buf->b_ffname,
+ buf, dir_name);
+ continue; /* try again with '.' replaced with '_' */
+ }
+***************
+*** 4356,4362 ****
+ * viewing a help file or when the path of the file is different
+ * (happens when all .swp files are in one directory).
+ */
+! if (!recoverymode && buf->b_fname != NULL
+ && !buf->b_help && !(buf->b_flags & BF_DUMMY))
+ {
+ int fd;
+--- 4380,4386 ----
+ * viewing a help file or when the path of the file is different
+ * (happens when all .swp files are in one directory).
+ */
+! if (!recoverymode && buf_fname != NULL
+ && !buf->b_help && !(buf->b_flags & BF_DUMMY))
+ {
+ int fd;
+***************
+*** 4433,4439 ****
+ {
+ fclose(dummyfd);
+ dummyfd = NULL;
+! mch_remove(buf->b_fname);
+ did_use_dummy = TRUE;
+ }
+ #endif
+--- 4457,4463 ----
+ {
+ fclose(dummyfd);
+ dummyfd = NULL;
+! mch_remove(buf_fname);
+ did_use_dummy = TRUE;
+ }
+ #endif
+***************
+*** 4448,4454 ****
+ * user anyway.
+ */
+ if (swap_exists_action != SEA_NONE
+! && has_autocmd(EVENT_SWAPEXISTS, buf->b_fname, buf))
+ choice = do_swapexists(buf, fname);
+
+ if (choice == 0)
+--- 4472,4478 ----
+ * user anyway.
+ */
+ if (swap_exists_action != SEA_NONE
+! && has_autocmd(EVENT_SWAPEXISTS, buf_fname, buf))
+ choice = do_swapexists(buf, fname);
+
+ if (choice == 0)
+***************
+*** 4549,4555 ****
+ #ifdef CREATE_DUMMY_FILE
+ /* Going to try another name, need the dummy file again. */
+ if (did_use_dummy)
+! dummyfd = mch_fopen((char *)buf->b_fname, "w");
+ #endif
+ }
+ }
+--- 4573,4579 ----
+ #ifdef CREATE_DUMMY_FILE
+ /* Going to try another name, need the dummy file again. */
+ if (did_use_dummy)
+! dummyfd = mch_fopen((char *)buf_fname, "w");
+ #endif
+ }
+ }
+***************
+*** 4581,4589 ****
+ if (dummyfd != NULL) /* file has been created temporarily */
+ {
+ fclose(dummyfd);
+! mch_remove(buf->b_fname);
+ }
+ #endif
+ return fname;
+ }
+
+--- 4605,4617 ----
+ if (dummyfd != NULL) /* file has been created temporarily */
+ {
+ fclose(dummyfd);
+! mch_remove(buf_fname);
+ }
+ #endif
++ #ifdef WIN3264
++ if (buf_fname != buf->b_fname)
++ vim_free(buf_fname);
++ #endif
+ return fname;
+ }
+
+*** ../vim-7.4.065/src/misc1.c 2013-10-06 17:46:48.000000000 +0200
+--- src/misc1.c 2013-11-04 02:44:28.000000000 +0100
+***************
+*** 4808,4816 ****
+
+ if (fname == NULL)
+ return (char_u *)"";
+! for (p1 = p2 = fname; *p2; ) /* find last part of path */
+ {
+! if (vim_ispathsep(*p2))
+ p1 = p2 + 1;
+ mb_ptr_adv(p2);
+ }
+--- 4808,4816 ----
+
+ if (fname == NULL)
+ return (char_u *)"";
+! for (p1 = p2 = get_past_head(fname); *p2; ) /* find last part of path */
+ {
+! if (vim_ispathsep_nocolon(*p2))
+ p1 = p2 + 1;
+ mb_ptr_adv(p2);
+ }
+***************
+*** 4929,4935 ****
+ }
+
+ /*
+! * return TRUE if 'c' is a path separator.
+ */
+ int
+ vim_ispathsep(c)
+--- 4929,4936 ----
+ }
+
+ /*
+! * Return TRUE if 'c' is a path separator.
+! * Note that for MS-Windows this includes the colon.
+ */
+ int
+ vim_ispathsep(c)
+***************
+*** 4952,4957 ****
+--- 4953,4972 ----
+ #endif
+ }
+
++ /*
++ * Like vim_ispathsep(c), but exclude the colon for MS-Windows.
++ */
++ int
++ vim_ispathsep_nocolon(c)
++ int c;
++ {
++ return vim_ispathsep(c)
++ #ifdef BACKSLASH_IN_FILENAME
++ && c != ':'
++ #endif
++ ;
++ }
++
+ #if defined(FEAT_SEARCHPATH) || defined(PROTO)
+ /*
+ * return TRUE if 'c' is a path list separator.
+*** ../vim-7.4.065/src/proto/misc1.pro 2013-08-10 13:37:20.000000000 +0200
+--- src/proto/misc1.pro 2013-11-04 02:44:30.000000000 +0100
+***************
+*** 69,74 ****
+--- 69,75 ----
+ char_u *getnextcomp __ARGS((char_u *fname));
+ char_u *get_past_head __ARGS((char_u *path));
+ int vim_ispathsep __ARGS((int c));
++ int vim_ispathsep_nocolon __ARGS((int c));
+ int vim_ispathlistsep __ARGS((int c));
+ void shorten_dir __ARGS((char_u *str));
+ int dir_of_file_exists __ARGS((char_u *fname));
+*** ../vim-7.4.065/src/version.c 2013-11-04 02:00:55.000000000 +0100
+--- src/version.c 2013-11-04 02:50:35.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 66,
+ /**/
+
+--
+Females are strictly forbidden to appear unshaven in public.
+ [real standing law in New Mexico, United States of America]
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.067 b/patches/source/vim/patches/7.4.067
new file mode 100644
index 000000000..75a89c2aa
--- /dev/null
+++ b/patches/source/vim/patches/7.4.067
@@ -0,0 +1,126 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.067
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.067
+Problem: After inserting comment leader, CTRL-\ CTRL-O does move the
+ cursor. (Wiktor Ruben)
+Solution: Avoid moving the cursor. (Christian Brabandt)
+Files: src/edit.c
+
+
+*** ../vim-7.4.066/src/edit.c 2013-09-08 20:00:45.000000000 +0200
+--- src/edit.c 2013-11-04 03:57:43.000000000 +0100
+***************
+*** 199,205 ****
+ static void spell_back_to_badword __ARGS((void));
+ static int spell_bad_len = 0; /* length of located bad word */
+ #endif
+! static void stop_insert __ARGS((pos_T *end_insert_pos, int esc));
+ static int echeck_abbr __ARGS((int));
+ static int replace_pop __ARGS((void));
+ static void replace_join __ARGS((int off));
+--- 199,205 ----
+ static void spell_back_to_badword __ARGS((void));
+ static int spell_bad_len = 0; /* length of located bad word */
+ #endif
+! static void stop_insert __ARGS((pos_T *end_insert_pos, int esc, int nomove));
+ static int echeck_abbr __ARGS((int));
+ static int replace_pop __ARGS((void));
+ static void replace_join __ARGS((int off));
+***************
+*** 6698,6704 ****
+ if (!arrow_used) /* something has been inserted */
+ {
+ AppendToRedobuff(ESC_STR);
+! stop_insert(end_insert_pos, FALSE);
+ arrow_used = TRUE; /* this means we stopped the current insert */
+ }
+ #ifdef FEAT_SPELL
+--- 6698,6704 ----
+ if (!arrow_used) /* something has been inserted */
+ {
+ AppendToRedobuff(ESC_STR);
+! stop_insert(end_insert_pos, FALSE, FALSE);
+ arrow_used = TRUE; /* this means we stopped the current insert */
+ }
+ #ifdef FEAT_SPELL
+***************
+*** 6787,6795 ****
+ * to another window/buffer.
+ */
+ static void
+! stop_insert(end_insert_pos, esc)
+ pos_T *end_insert_pos;
+ int esc; /* called by ins_esc() */
+ {
+ int cc;
+ char_u *ptr;
+--- 6787,6796 ----
+ * to another window/buffer.
+ */
+ static void
+! stop_insert(end_insert_pos, esc, nomove)
+ pos_T *end_insert_pos;
+ int esc; /* called by ins_esc() */
++ int nomove; /* <c-\><c-o>, don't move cursor */
+ {
+ int cc;
+ char_u *ptr;
+***************
+*** 6860,6866 ****
+ * Do this when ESC was used or moving the cursor up/down.
+ * Check for the old position still being valid, just in case the text
+ * got changed unexpectedly. */
+! if (did_ai && (esc || (vim_strchr(p_cpo, CPO_INDENT) == NULL
+ && curwin->w_cursor.lnum != end_insert_pos->lnum))
+ && end_insert_pos->lnum <= curbuf->b_ml.ml_line_count)
+ {
+--- 6861,6867 ----
+ * Do this when ESC was used or moving the cursor up/down.
+ * Check for the old position still being valid, just in case the text
+ * got changed unexpectedly. */
+! if (!nomove && did_ai && (esc || (vim_strchr(p_cpo, CPO_INDENT) == NULL
+ && curwin->w_cursor.lnum != end_insert_pos->lnum))
+ && end_insert_pos->lnum <= curbuf->b_ml.ml_line_count)
+ {
+***************
+*** 8377,8383 ****
+ disabled_redraw = TRUE;
+ return FALSE; /* repeat the insert */
+ }
+! stop_insert(&curwin->w_cursor, TRUE);
+ undisplay_dollar();
+ }
+
+--- 8378,8384 ----
+ disabled_redraw = TRUE;
+ return FALSE; /* repeat the insert */
+ }
+! stop_insert(&curwin->w_cursor, TRUE, nomove);
+ undisplay_dollar();
+ }
+
+*** ../vim-7.4.066/src/version.c 2013-11-04 02:53:46.000000000 +0100
+--- src/version.c 2013-11-04 03:57:29.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 67,
+ /**/
+
+--
+Beer & pretzels can't be served at the same time in any bar or restaurant.
+ [real standing law in North Dakota, United States of America]
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.068 b/patches/source/vim/patches/7.4.068
new file mode 100644
index 000000000..a90933856
--- /dev/null
+++ b/patches/source/vim/patches/7.4.068
@@ -0,0 +1,131 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.068
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.068
+Problem: Cannot build Vim on Mac with non-Apple compilers.
+Solution: Remove the -no-cpp-precomp flag. (Misty De Meo)
+Files: src/configure.in, src/auto/configure, src/osdef.sh
+
+
+*** ../vim-7.4.067/src/configure.in 2013-11-03 20:26:26.000000000 +0100
+--- src/configure.in 2013-11-04 04:53:51.000000000 +0100
+***************
+*** 204,210 ****
+ OS_EXTRA_SRC="os_macosx.m os_mac_conv.c";
+ OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
+ dnl TODO: use -arch i386 on Intel machines
+! CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
+
+ dnl If Carbon is found, assume we don't want X11
+ dnl unless it was specifically asked for (--with-x)
+--- 204,211 ----
+ OS_EXTRA_SRC="os_macosx.m os_mac_conv.c";
+ OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
+ dnl TODO: use -arch i386 on Intel machines
+! dnl Removed -no-cpp-precomp, only for very old compilers.
+! CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX"
+
+ dnl If Carbon is found, assume we don't want X11
+ dnl unless it was specifically asked for (--with-x)
+***************
+*** 262,269 ****
+ ])
+ if test "$GCC" = yes -a "$local_dir" != no; then
+ echo 'void f(){}' > conftest.c
+! dnl -no-cpp-precomp is needed for OS X 10.2 (Ben Fowler)
+! have_local_include=`${CC-cc} -no-cpp-precomp -c -v conftest.c 2>&1 | grep "${local_dir}/include"`
+ have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/lib"`
+ rm -f conftest.c conftest.o
+ fi
+--- 263,270 ----
+ ])
+ if test "$GCC" = yes -a "$local_dir" != no; then
+ echo 'void f(){}' > conftest.c
+! dnl Removed -no-cpp-precomp, only needed for OS X 10.2 (Ben Fowler)
+! have_local_include=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/include"`
+ have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/lib"`
+ rm -f conftest.c conftest.o
+ fi
+*** ../vim-7.4.067/src/auto/configure 2013-11-03 20:26:27.000000000 +0100
+--- src/auto/configure 2013-11-04 04:54:16.000000000 +0100
+***************
+*** 4221,4227 ****
+ MACOSX=yes
+ OS_EXTRA_SRC="os_macosx.m os_mac_conv.c";
+ OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
+! CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
+
+ # On IRIX 5.3, sys/types and inttypes.h are conflicting.
+ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+--- 4221,4227 ----
+ MACOSX=yes
+ OS_EXTRA_SRC="os_macosx.m os_mac_conv.c";
+ OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
+! CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX"
+
+ # On IRIX 5.3, sys/types and inttypes.h are conflicting.
+ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+***************
+*** 4311,4317 ****
+
+ if test "$GCC" = yes -a "$local_dir" != no; then
+ echo 'void f(){}' > conftest.c
+! have_local_include=`${CC-cc} -no-cpp-precomp -c -v conftest.c 2>&1 | grep "${local_dir}/include"`
+ have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/lib"`
+ rm -f conftest.c conftest.o
+ fi
+--- 4311,4317 ----
+
+ if test "$GCC" = yes -a "$local_dir" != no; then
+ echo 'void f(){}' > conftest.c
+! have_local_include=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/include"`
+ have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/lib"`
+ rm -f conftest.c conftest.o
+ fi
+*** ../vim-7.4.067/src/osdef.sh 2010-05-15 13:04:08.000000000 +0200
+--- src/osdef.sh 2013-11-04 04:51:36.000000000 +0100
+***************
+*** 47,57 ****
+ #endif
+ EOF
+
+! # Mac uses precompiled headers, but we need real headers here.
+! case `uname` in
+! Darwin) $CC -I. -I$srcdir -E -no-cpp-precomp osdef0.c >osdef0.cc;;
+! *) $CC -I. -I$srcdir -E osdef0.c >osdef0.cc;;
+! esac
+
+ # insert a space in front of each line, so that a function name at the
+ # start of the line is matched with "[)*, ]\1[ (]"
+--- 47,53 ----
+ #endif
+ EOF
+
+! $CC -I. -I$srcdir -E osdef0.c >osdef0.cc
+
+ # insert a space in front of each line, so that a function name at the
+ # start of the line is matched with "[)*, ]\1[ (]"
+*** ../vim-7.4.067/src/version.c 2013-11-04 04:20:28.000000000 +0100
+--- src/version.c 2013-11-04 04:51:51.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 68,
+ /**/
+
+--
+Violators can be fined, arrested or jailed for making ugly faces at a dog.
+ [real standing law in Oklahoma, United States of America]
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.069 b/patches/source/vim/patches/7.4.069
new file mode 100644
index 000000000..ac52affcf
--- /dev/null
+++ b/patches/source/vim/patches/7.4.069
@@ -0,0 +1,2559 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.069
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.069
+Problem: Cannot right shift lines starting with #.
+Solution: Allow the right shift when 'cino' contains #N with N > 0.
+ (Christian Brabandt)
+ Refactor parsing 'cino', store the values in the buffer.
+Files: runtime/doc/indent.txt, src/buffer.c, src/edit.c, src/eval.c,
+ src/ex_getln.c, src/fold.c, src/misc1.c, src/ops.c,
+ src/proto/misc1.pro, src/proto/option.pro, src/structs.h,
+ src/option.c
+
+
+*** ../vim-7.4.068/runtime/doc/indent.txt 2013-08-10 13:24:56.000000000 +0200
+--- runtime/doc/indent.txt 2013-11-05 07:10:56.000000000 +0100
+***************
+*** 545,554 ****
+ (default 70 lines).
+
+ *cino-#*
+! #N When N is non-zero recognize shell/Perl comments, starting with
+! '#'. Default N is zero: don't recognize '#' comments. Note
+! that lines starting with # will still be seen as preprocessor
+! lines.
+
+
+ The defaults, spelled out in full, are:
+--- 545,556 ----
+ (default 70 lines).
+
+ *cino-#*
+! #N When N is non-zero recognize shell/Perl comments starting with
+! '#', do not recognize preprocessor lines; allow right-shifting
+! lines that start with "#".
+! When N is zero (default): don't recognize '#' comments, do
+! recognize preprocessor lines; right-shifting lines that start
+! with "#" does not work.
+
+
+ The defaults, spelled out in full, are:
+***************
+*** 556,562 ****
+ c3,C0,/0,(2s,us,U0,w0,W0,k0,m0,j0,J0,)20,*70,#0
+
+ Vim puts a line in column 1 if:
+! - It starts with '#' (preprocessor directives), if 'cinkeys' contains '#'.
+ - It starts with a label (a keyword followed by ':', other than "case" and
+ "default") and 'cinoptions' does not contain an 'L' entry with a positive
+ value.
+--- 558,564 ----
+ c3,C0,/0,(2s,us,U0,w0,W0,k0,m0,j0,J0,)20,*70,#0
+
+ Vim puts a line in column 1 if:
+! - It starts with '#' (preprocessor directives), if 'cinkeys' contains '#0'.
+ - It starts with a label (a keyword followed by ':', other than "case" and
+ "default") and 'cinoptions' does not contain an 'L' entry with a positive
+ value.
+***************
+*** 581,588 ****
+
+ Clojure indentation differs somewhat from traditional Lisps, due in part to
+ the use of square and curly brackets, and otherwise by community convention.
+! These conventions are not always universally followed, so the Clojure indent
+! script offers a few configurable options, listed below.
+
+ If the current vim does not include searchpairpos(), the indent script falls
+ back to normal 'lisp' indenting, and the following options are ignored.
+--- 583,590 ----
+
+ Clojure indentation differs somewhat from traditional Lisps, due in part to
+ the use of square and curly brackets, and otherwise by community convention.
+! These conventions are not universally followed, so the Clojure indent script
+! offers a few configurable options, listed below.
+
+ If the current vim does not include searchpairpos(), the indent script falls
+ back to normal 'lisp' indenting, and the following options are ignored.
+*** ../vim-7.4.068/src/buffer.c 2013-11-02 04:39:34.000000000 +0100
+--- src/buffer.c 2013-11-05 06:18:54.000000000 +0100
+***************
+*** 211,217 ****
+--- 211,220 ----
+
+ /* if first time loading this buffer, init b_chartab[] */
+ if (curbuf->b_flags & BF_NEVERLOADED)
++ {
+ (void)buf_init_chartab(curbuf, FALSE);
++ parse_cino(curbuf);
++ }
+
+ /*
+ * Set/reset the Changed flag first, autocmds may change the buffer.
+*** ../vim-7.4.068/src/edit.c 2013-11-04 04:20:28.000000000 +0100
+--- src/edit.c 2013-11-05 06:12:45.000000000 +0100
+***************
+*** 8958,8964 ****
+
+ *inserted_space_p = FALSE;
+ if (p_sta && in_indent)
+! ts = (int)get_sw_value();
+ else
+ ts = (int)get_sts_value();
+ /* Compute the virtual column where we want to be. Since
+--- 8958,8964 ----
+
+ *inserted_space_p = FALSE;
+ if (p_sta && in_indent)
+! ts = (int)get_sw_value(curbuf);
+ else
+ ts = (int)get_sts_value();
+ /* Compute the virtual column where we want to be. Since
+***************
+*** 9647,9653 ****
+ * When nothing special, insert TAB like a normal character
+ */
+ if (!curbuf->b_p_et
+! && !(p_sta && ind && curbuf->b_p_ts != get_sw_value())
+ && get_sts_value() == 0)
+ return TRUE;
+
+--- 9647,9653 ----
+ * When nothing special, insert TAB like a normal character
+ */
+ if (!curbuf->b_p_et
+! && !(p_sta && ind && curbuf->b_p_ts != get_sw_value(curbuf))
+ && get_sts_value() == 0)
+ return TRUE;
+
+***************
+*** 9663,9669 ****
+ AppendToRedobuff((char_u *)"\t");
+
+ if (p_sta && ind) /* insert tab in indent, use 'shiftwidth' */
+! temp = (int)get_sw_value();
+ else if (curbuf->b_p_sts != 0) /* use 'softtabstop' when set */
+ temp = (int)get_sts_value();
+ else /* otherwise use 'tabstop' */
+--- 9663,9669 ----
+ AppendToRedobuff((char_u *)"\t");
+
+ if (p_sta && ind) /* insert tab in indent, use 'shiftwidth' */
+! temp = (int)get_sw_value(curbuf);
+ else if (curbuf->b_p_sts != 0) /* use 'softtabstop' when set */
+ temp = (int)get_sts_value();
+ else /* otherwise use 'tabstop' */
+*** ../vim-7.4.068/src/eval.c 2013-11-02 23:29:17.000000000 +0100
+--- src/eval.c 2013-11-05 06:12:49.000000000 +0100
+***************
+*** 16934,16940 ****
+ typval_T *argvars UNUSED;
+ typval_T *rettv;
+ {
+! rettv->vval.v_number = get_sw_value();
+ }
+
+ /*
+--- 16934,16940 ----
+ typval_T *argvars UNUSED;
+ typval_T *rettv;
+ {
+! rettv->vval.v_number = get_sw_value(curbuf);
+ }
+
+ /*
+*** ../vim-7.4.068/src/ex_getln.c 2013-07-05 19:44:21.000000000 +0200
+--- src/ex_getln.c 2013-11-05 06:12:57.000000000 +0100
+***************
+*** 2280,2286 ****
+
+ if (c1 == Ctrl_T)
+ {
+! long sw = get_sw_value();
+
+ p = (char_u *)line_ga.ga_data;
+ p[line_ga.ga_len] = NUL;
+--- 2280,2286 ----
+
+ if (c1 == Ctrl_T)
+ {
+! long sw = get_sw_value(curbuf);
+
+ p = (char_u *)line_ga.ga_data;
+ p[line_ga.ga_len] = NUL;
+***************
+*** 2337,2343 ****
+ p[line_ga.ga_len] = NUL;
+ indent = get_indent_str(p, 8);
+ --indent;
+! indent -= indent % get_sw_value();
+ }
+ while (get_indent_str(p, 8) > indent)
+ {
+--- 2337,2343 ----
+ p[line_ga.ga_len] = NUL;
+ indent = get_indent_str(p, 8);
+ --indent;
+! indent -= indent % get_sw_value(curbuf);
+ }
+ while (get_indent_str(p, 8) > indent)
+ {
+***************
+*** 4178,4184 ****
+ /*
+ * Prepare a string for expansion.
+ * When expanding file names: The string will be used with expand_wildcards().
+! * Copy the file name into allocated memory and add a '*' at the end.
+ * When expanding other names: The string will be used with regcomp(). Copy
+ * the name into allocated memory and prepend "^".
+ */
+--- 4178,4184 ----
+ /*
+ * Prepare a string for expansion.
+ * When expanding file names: The string will be used with expand_wildcards().
+! * Copy "fname[len]" into allocated memory and add a '*' at the end.
+ * When expanding other names: The string will be used with regcomp(). Copy
+ * the name into allocated memory and prepend "^".
+ */
+*** ../vim-7.4.068/src/fold.c 2013-06-15 16:57:24.000000000 +0200
+--- src/fold.c 2013-11-05 06:13:03.000000000 +0100
+***************
+*** 3052,3058 ****
+ flp->lvl = -1;
+ }
+ else
+! flp->lvl = get_indent_buf(buf, lnum) / get_sw_value();
+ if (flp->lvl > flp->wp->w_p_fdn)
+ {
+ flp->lvl = flp->wp->w_p_fdn;
+--- 3052,3058 ----
+ flp->lvl = -1;
+ }
+ else
+! flp->lvl = get_indent_buf(buf, lnum) / get_sw_value(curbuf);
+ if (flp->lvl > flp->wp->w_p_fdn)
+ {
+ flp->lvl = flp->wp->w_p_fdn;
+*** ../vim-7.4.068/src/misc1.c 2013-11-04 02:53:46.000000000 +0100
+--- src/misc1.c 2013-11-05 06:45:15.000000000 +0100
+***************
+*** 1405,1411 ****
+ #ifdef FEAT_SMARTINDENT
+ if (did_si)
+ {
+! int sw = (int)get_sw_value();
+
+ if (p_sr)
+ newindent -= newindent % sw;
+--- 1405,1411 ----
+ #ifdef FEAT_SMARTINDENT
+ if (did_si)
+ {
+! int sw = (int)get_sw_value(curbuf);
+
+ if (p_sr)
+ newindent -= newindent % sw;
+***************
+*** 5342,5349 ****
+ static int find_match __ARGS((int lookfor, linenr_T ourscope, int ind_maxparen, int ind_maxcomment));
+ static int cin_is_cpp_namespace __ARGS((char_u *));
+
+- static int ind_hash_comment = 0; /* # starts a comment */
+-
+ /*
+ * Skip over white space and C comments within the line.
+ * Also skip over Perl/shell comments if desired.
+--- 5342,5347 ----
+***************
+*** 5360,5366 ****
+
+ /* Perl/shell # comment comment continues until eol. Require a space
+ * before # to avoid recognizing $#array. */
+! if (ind_hash_comment != 0 && s != prev_s && *s == '#')
+ {
+ s += STRLEN(s);
+ break;
+--- 5358,5364 ----
+
+ /* Perl/shell # comment comment continues until eol. Require a space
+ * before # to avoid recognizing $#array. */
+! if (curbuf->b_ind_hash_comment != 0 && s != prev_s && *s == '#')
+ {
+ s += STRLEN(s);
+ break;
+***************
+*** 6639,6839 ****
+ return retval;
+ }
+
+! int
+! get_c_indent()
+ {
+! int sw = (int)get_sw_value();
+
+ /*
+! * spaces from a block's opening brace the prevailing indent for that
+! * block should be
+ */
+
+! int ind_level = sw;
+
+! /*
+! * spaces from the edge of the line an open brace that's at the end of a
+! * line is imagined to be.
+! */
+! int ind_open_imag = 0;
+
+! /*
+! * spaces from the prevailing indent for a line that is not preceded by
+! * an opening brace.
+! */
+! int ind_no_brace = 0;
+!
+! /*
+! * column where the first { of a function should be located }
+! */
+! int ind_first_open = 0;
+
+! /*
+! * spaces from the prevailing indent a leftmost open brace should be
+! * located
+! */
+! int ind_open_extra = 0;
+
+! /*
+! * spaces from the matching open brace (real location for one at the left
+ * edge; imaginary location from one that ends a line) the matching close
+! * brace should be located
+! */
+! int ind_close_extra = 0;
+
+! /*
+! * spaces from the edge of the line an open brace sitting in the leftmost
+! * column is imagined to be
+! */
+! int ind_open_left_imag = 0;
+
+! /*
+! * Spaces jump labels should be shifted to the left if N is non-negative,
+! * otherwise the jump label will be put to column 1.
+! */
+! int ind_jump_label = -1;
+
+! /*
+! * spaces from the switch() indent a "case xx" label should be located
+! */
+! int ind_case = sw;
+
+! /*
+! * spaces from the "case xx:" code after a switch() should be located
+! */
+! int ind_case_code = sw;
+
+! /*
+! * lineup break at end of case in switch() with case label
+! */
+! int ind_case_break = 0;
+
+! /*
+! * spaces from the class declaration indent a scope declaration label
+! * should be located
+! */
+! int ind_scopedecl = sw;
+
+! /*
+! * spaces from the scope declaration label code should be located
+! */
+! int ind_scopedecl_code = sw;
+
+! /*
+! * amount K&R-style parameters should be indented
+! */
+! int ind_param = sw;
+
+! /*
+! * amount a function type spec should be indented
+! */
+! int ind_func_type = sw;
+
+! /*
+! * amount a cpp base class declaration or constructor initialization
+! * should be indented
+! */
+! int ind_cpp_baseclass = sw;
+
+! /*
+! * additional spaces beyond the prevailing indent a continuation line
+! * should be located
+! */
+! int ind_continuation = sw;
+
+! /*
+! * spaces from the indent of the line with an unclosed parentheses
+! */
+! int ind_unclosed = sw * 2;
+
+! /*
+! * spaces from the indent of the line with an unclosed parentheses, which
+! * itself is also unclosed
+! */
+! int ind_unclosed2 = sw;
+
+! /*
+! * suppress ignoring spaces from the indent of a line starting with an
+! * unclosed parentheses.
+! */
+! int ind_unclosed_noignore = 0;
+
+! /*
+! * If the opening paren is the last nonwhite character on the line, and
+! * ind_unclosed_wrapped is nonzero, use this indent relative to the outer
+! * context (for very long lines).
+! */
+! int ind_unclosed_wrapped = 0;
+
+! /*
+! * suppress ignoring white space when lining up with the character after
+! * an unclosed parentheses.
+! */
+! int ind_unclosed_whiteok = 0;
+
+! /*
+! * indent a closing parentheses under the line start of the matching
+! * opening parentheses.
+! */
+! int ind_matching_paren = 0;
+
+! /*
+! * indent a closing parentheses under the previous line.
+! */
+! int ind_paren_prev = 0;
+
+! /*
+! * Extra indent for comments.
+! */
+! int ind_comment = 0;
+
+! /*
+! * spaces from the comment opener when there is nothing after it.
+! */
+! int ind_in_comment = 3;
+
+! /*
+! * boolean: if non-zero, use ind_in_comment even if there is something
+! * after the comment opener.
+! */
+! int ind_in_comment2 = 0;
+
+! /*
+! * max lines to search for an open paren
+! */
+! int ind_maxparen = 20;
+
+! /*
+! * max lines to search for an open comment
+! */
+! int ind_maxcomment = 70;
+
+! /*
+! * handle braces for java code
+! */
+! int ind_java = 0;
+
+! /*
+! * not to confuse JS object properties with labels
+! */
+! int ind_js = 0;
+
+! /*
+! * handle blocked cases correctly
+! */
+! int ind_keep_case_label = 0;
+
+! /*
+! * handle C++ namespace
+! */
+! int ind_cpp_namespace = 0;
+
+! /*
+! * handle continuation lines containing conditions of if(), for() and
+! * while()
+! */
+! int ind_if_for_while = 0;
+
+ pos_T cur_curpos;
+ int amount;
+ int scope_amount;
+--- 6637,6865 ----
+ return retval;
+ }
+
+! /*
+! * Parse 'cinoptions' and set the values in "curbuf".
+! * Must be called when 'cinoptions', 'shiftwidth' and/or 'tabstop' changes.
+! */
+! void
+! parse_cino(buf)
+! buf_T *buf;
+ {
+! char_u *p;
+! char_u *l;
+! char_u *digits;
+! int n;
+! int divider;
+! int fraction = 0;
+! int sw = (int)get_sw_value(buf);
+
+ /*
+! * Set the default values.
+ */
++ /* Spaces from a block's opening brace the prevailing indent for that
++ * block should be. */
++ buf->b_ind_level = sw;
+
+! /* Spaces from the edge of the line an open brace that's at the end of a
+! * line is imagined to be. */
+! buf->b_ind_open_imag = 0;
+
+! /* Spaces from the prevailing indent for a line that is not preceded by
+! * an opening brace. */
+! buf->b_ind_no_brace = 0;
+
+! /* Column where the first { of a function should be located }. */
+! buf->b_ind_first_open = 0;
+
+! /* Spaces from the prevailing indent a leftmost open brace should be
+! * located. */
+! buf->b_ind_open_extra = 0;
+
+! /* Spaces from the matching open brace (real location for one at the left
+ * edge; imaginary location from one that ends a line) the matching close
+! * brace should be located. */
+! buf->b_ind_close_extra = 0;
+
+! /* Spaces from the edge of the line an open brace sitting in the leftmost
+! * column is imagined to be. */
+! buf->b_ind_open_left_imag = 0;
+
+! /* Spaces jump labels should be shifted to the left if N is non-negative,
+! * otherwise the jump label will be put to column 1. */
+! buf->b_ind_jump_label = -1;
+
+! /* Spaces from the switch() indent a "case xx" label should be located. */
+! buf->b_ind_case = sw;
+
+! /* Spaces from the "case xx:" code after a switch() should be located. */
+! buf->b_ind_case_code = sw;
+
+! /* Lineup break at end of case in switch() with case label. */
+! buf->b_ind_case_break = 0;
+
+! /* Spaces from the class declaration indent a scope declaration label
+! * should be located. */
+! buf->b_ind_scopedecl = sw;
+
+! /* Spaces from the scope declaration label code should be located. */
+! buf->b_ind_scopedecl_code = sw;
+
+! /* Amount K&R-style parameters should be indented. */
+! buf->b_ind_param = sw;
+
+! /* Amount a function type spec should be indented. */
+! buf->b_ind_func_type = sw;
+
+! /* Amount a cpp base class declaration or constructor initialization
+! * should be indented. */
+! buf->b_ind_cpp_baseclass = sw;
+
+! /* additional spaces beyond the prevailing indent a continuation line
+! * should be located. */
+! buf->b_ind_continuation = sw;
+
+! /* Spaces from the indent of the line with an unclosed parentheses. */
+! buf->b_ind_unclosed = sw * 2;
+
+! /* Spaces from the indent of the line with an unclosed parentheses, which
+! * itself is also unclosed. */
+! buf->b_ind_unclosed2 = sw;
+
+! /* Suppress ignoring spaces from the indent of a line starting with an
+! * unclosed parentheses. */
+! buf->b_ind_unclosed_noignore = 0;
+
+! /* If the opening paren is the last nonwhite character on the line, and
+! * b_ind_unclosed_wrapped is nonzero, use this indent relative to the outer
+! * context (for very long lines). */
+! buf->b_ind_unclosed_wrapped = 0;
+
+! /* Suppress ignoring white space when lining up with the character after
+! * an unclosed parentheses. */
+! buf->b_ind_unclosed_whiteok = 0;
+
+! /* Indent a closing parentheses under the line start of the matching
+! * opening parentheses. */
+! buf->b_ind_matching_paren = 0;
+
+! /* Indent a closing parentheses under the previous line. */
+! buf->b_ind_paren_prev = 0;
+
+! /* Extra indent for comments. */
+! buf->b_ind_comment = 0;
+
+! /* Spaces from the comment opener when there is nothing after it. */
+! buf->b_ind_in_comment = 3;
+
+! /* Boolean: if non-zero, use b_ind_in_comment even if there is something
+! * after the comment opener. */
+! buf->b_ind_in_comment2 = 0;
+
+! /* Max lines to search for an open paren. */
+! buf->b_ind_maxparen = 20;
+
+! /* Max lines to search for an open comment. */
+! buf->b_ind_maxcomment = 70;
+
+! /* Handle braces for java code. */
+! buf->b_ind_java = 0;
+
+! /* Not to confuse JS object properties with labels. */
+! buf->b_ind_js = 0;
+
+! /* Handle blocked cases correctly. */
+! buf->b_ind_keep_case_label = 0;
+
+! /* Handle C++ namespace. */
+! buf->b_ind_cpp_namespace = 0;
+
+! /* Handle continuation lines containing conditions of if(), for() and
+! * while(). */
+! buf->b_ind_if_for_while = 0;
+!
+! for (p = buf->b_p_cino; *p; )
+! {
+! l = p++;
+! if (*p == '-')
+! ++p;
+! digits = p; /* remember where the digits start */
+! n = getdigits(&p);
+! divider = 0;
+! if (*p == '.') /* ".5s" means a fraction */
+! {
+! fraction = atol((char *)++p);
+! while (VIM_ISDIGIT(*p))
+! {
+! ++p;
+! if (divider)
+! divider *= 10;
+! else
+! divider = 10;
+! }
+! }
+! if (*p == 's') /* "2s" means two times 'shiftwidth' */
+! {
+! if (p == digits)
+! n = sw; /* just "s" is one 'shiftwidth' */
+! else
+! {
+! n *= sw;
+! if (divider)
+! n += (sw * fraction + divider / 2) / divider;
+! }
+! ++p;
+! }
+! if (l[1] == '-')
+! n = -n;
+
++ /* When adding an entry here, also update the default 'cinoptions' in
++ * doc/indent.txt, and add explanation for it! */
++ switch (*l)
++ {
++ case '>': buf->b_ind_level = n; break;
++ case 'e': buf->b_ind_open_imag = n; break;
++ case 'n': buf->b_ind_no_brace = n; break;
++ case 'f': buf->b_ind_first_open = n; break;
++ case '{': buf->b_ind_open_extra = n; break;
++ case '}': buf->b_ind_close_extra = n; break;
++ case '^': buf->b_ind_open_left_imag = n; break;
++ case 'L': buf->b_ind_jump_label = n; break;
++ case ':': buf->b_ind_case = n; break;
++ case '=': buf->b_ind_case_code = n; break;
++ case 'b': buf->b_ind_case_break = n; break;
++ case 'p': buf->b_ind_param = n; break;
++ case 't': buf->b_ind_func_type = n; break;
++ case '/': buf->b_ind_comment = n; break;
++ case 'c': buf->b_ind_in_comment = n; break;
++ case 'C': buf->b_ind_in_comment2 = n; break;
++ case 'i': buf->b_ind_cpp_baseclass = n; break;
++ case '+': buf->b_ind_continuation = n; break;
++ case '(': buf->b_ind_unclosed = n; break;
++ case 'u': buf->b_ind_unclosed2 = n; break;
++ case 'U': buf->b_ind_unclosed_noignore = n; break;
++ case 'W': buf->b_ind_unclosed_wrapped = n; break;
++ case 'w': buf->b_ind_unclosed_whiteok = n; break;
++ case 'm': buf->b_ind_matching_paren = n; break;
++ case 'M': buf->b_ind_paren_prev = n; break;
++ case ')': buf->b_ind_maxparen = n; break;
++ case '*': buf->b_ind_maxcomment = n; break;
++ case 'g': buf->b_ind_scopedecl = n; break;
++ case 'h': buf->b_ind_scopedecl_code = n; break;
++ case 'j': buf->b_ind_java = n; break;
++ case 'J': buf->b_ind_js = n; break;
++ case 'l': buf->b_ind_keep_case_label = n; break;
++ case '#': buf->b_ind_hash_comment = n; break;
++ case 'N': buf->b_ind_cpp_namespace = n; break;
++ case 'k': buf->b_ind_if_for_while = n; break;
++ }
++ if (*p == ',')
++ ++p;
++ }
++ }
++
++ int
++ get_c_indent()
++ {
+ pos_T cur_curpos;
+ int amount;
+ int scope_amount;
+***************
+*** 6868,6877 ****
+
+ int whilelevel;
+ linenr_T lnum;
+- char_u *options;
+- char_u *digits;
+- int fraction = 0; /* init for GCC */
+- int divider;
+ int n;
+ int iscase;
+ int lookfor_break;
+--- 6894,6899 ----
+***************
+*** 6880,6962 ****
+ int original_line_islabel;
+ int added_to_amount = 0;
+
+! for (options = curbuf->b_p_cino; *options; )
+! {
+! l = options++;
+! if (*options == '-')
+! ++options;
+! digits = options; /* remember where the digits start */
+! n = getdigits(&options);
+! divider = 0;
+! if (*options == '.') /* ".5s" means a fraction */
+! {
+! fraction = atol((char *)++options);
+! while (VIM_ISDIGIT(*options))
+! {
+! ++options;
+! if (divider)
+! divider *= 10;
+! else
+! divider = 10;
+! }
+! }
+! if (*options == 's') /* "2s" means two times 'shiftwidth' */
+! {
+! if (options == digits)
+! n = sw; /* just "s" is one 'shiftwidth' */
+! else
+! {
+! n *= sw;
+! if (divider)
+! n += (sw * fraction + divider / 2) / divider;
+! }
+! ++options;
+! }
+! if (l[1] == '-')
+! n = -n;
+! /* When adding an entry here, also update the default 'cinoptions' in
+! * doc/indent.txt, and add explanation for it! */
+! switch (*l)
+! {
+! case '>': ind_level = n; break;
+! case 'e': ind_open_imag = n; break;
+! case 'n': ind_no_brace = n; break;
+! case 'f': ind_first_open = n; break;
+! case '{': ind_open_extra = n; break;
+! case '}': ind_close_extra = n; break;
+! case '^': ind_open_left_imag = n; break;
+! case 'L': ind_jump_label = n; break;
+! case ':': ind_case = n; break;
+! case '=': ind_case_code = n; break;
+! case 'b': ind_case_break = n; break;
+! case 'p': ind_param = n; break;
+! case 't': ind_func_type = n; break;
+! case '/': ind_comment = n; break;
+! case 'c': ind_in_comment = n; break;
+! case 'C': ind_in_comment2 = n; break;
+! case 'i': ind_cpp_baseclass = n; break;
+! case '+': ind_continuation = n; break;
+! case '(': ind_unclosed = n; break;
+! case 'u': ind_unclosed2 = n; break;
+! case 'U': ind_unclosed_noignore = n; break;
+! case 'W': ind_unclosed_wrapped = n; break;
+! case 'w': ind_unclosed_whiteok = n; break;
+! case 'm': ind_matching_paren = n; break;
+! case 'M': ind_paren_prev = n; break;
+! case ')': ind_maxparen = n; break;
+! case '*': ind_maxcomment = n; break;
+! case 'g': ind_scopedecl = n; break;
+! case 'h': ind_scopedecl_code = n; break;
+! case 'j': ind_java = n; break;
+! case 'J': ind_js = n; break;
+! case 'l': ind_keep_case_label = n; break;
+! case '#': ind_hash_comment = n; break;
+! case 'N': ind_cpp_namespace = n; break;
+! case 'k': ind_if_for_while = n; break;
+! }
+! if (*options == ',')
+! ++options;
+! }
+
+ /* remember where the cursor was when we started */
+ cur_curpos = curwin->w_cursor;
+--- 6902,6909 ----
+ int original_line_islabel;
+ int added_to_amount = 0;
+
+! /* make a copy, value is changed below */
+! int ind_continuation = curbuf->b_ind_continuation;
+
+ /* remember where the cursor was when we started */
+ cur_curpos = curwin->w_cursor;
+***************
+*** 6990,7011 ****
+
+ curwin->w_cursor.col = 0;
+
+! original_line_islabel = cin_islabel(ind_maxcomment); /* XXX */
+
+ /*
+ * #defines and so on always go at the left when included in 'cinkeys'.
+ */
+ if (*theline == '#' && (*linecopy == '#' || in_cinkeys('#', ' ', TRUE)))
+! {
+! amount = 0;
+! }
+
+ /*
+ * Is it a non-case label? Then that goes at the left margin too unless:
+ * - JS flag is set.
+ * - 'L' item has a positive value.
+ */
+! else if (original_line_islabel && !ind_js && ind_jump_label < 0)
+ {
+ amount = 0;
+ }
+--- 6937,6957 ----
+
+ curwin->w_cursor.col = 0;
+
+! original_line_islabel = cin_islabel(curbuf->b_ind_maxcomment); /* XXX */
+
+ /*
+ * #defines and so on always go at the left when included in 'cinkeys'.
+ */
+ if (*theline == '#' && (*linecopy == '#' || in_cinkeys('#', ' ', TRUE)))
+! amount = curbuf->b_ind_hash_comment;
+
+ /*
+ * Is it a non-case label? Then that goes at the left margin too unless:
+ * - JS flag is set.
+ * - 'L' item has a positive value.
+ */
+! else if (original_line_islabel && !curbuf->b_ind_js
+! && curbuf->b_ind_jump_label < 0)
+ {
+ amount = 0;
+ }
+***************
+*** 7027,7033 ****
+ * comment, try using the 'comments' option.
+ */
+ else if (!cin_iscomment(theline)
+! && (trypos = find_start_comment(ind_maxcomment)) != NULL) /* XXX */
+ {
+ int lead_start_len = 2;
+ int lead_middle_len = 1;
+--- 6973,6980 ----
+ * comment, try using the 'comments' option.
+ */
+ else if (!cin_iscomment(theline)
+! && (trypos = find_start_comment(curbuf->b_ind_maxcomment)) != NULL)
+! /* XXX */
+ {
+ int lead_start_len = 2;
+ int lead_middle_len = 1;
+***************
+*** 7161,7167 ****
+ }
+ if (amount == -1) /* use the comment opener */
+ {
+! if (!ind_in_comment2)
+ {
+ start = ml_get(trypos->lnum);
+ look = start + trypos->col + 2; /* skip / and * */
+--- 7108,7114 ----
+ }
+ if (amount == -1) /* use the comment opener */
+ {
+! if (!curbuf->b_ind_in_comment2)
+ {
+ start = ml_get(trypos->lnum);
+ look = start + trypos->col + 2; /* skip / and * */
+***************
+*** 7170,7177 ****
+ }
+ getvcol(curwin, trypos, &col, NULL, NULL);
+ amount = col;
+! if (ind_in_comment2 || *look == NUL)
+! amount += ind_in_comment;
+ }
+ }
+ }
+--- 7117,7124 ----
+ }
+ getvcol(curwin, trypos, &col, NULL, NULL);
+ amount = col;
+! if (curbuf->b_ind_in_comment2 || *look == NUL)
+! amount += curbuf->b_ind_in_comment;
+ }
+ }
+ }
+***************
+*** 7179,7187 ****
+ /*
+ * Are we inside parentheses or braces?
+ */ /* XXX */
+! else if (((trypos = find_match_paren(ind_maxparen, ind_maxcomment)) != NULL
+! && ind_java == 0)
+! || (tryposBrace = find_start_brace(ind_maxcomment)) != NULL
+ || trypos != NULL)
+ {
+ if (trypos != NULL && tryposBrace != NULL)
+--- 7126,7136 ----
+ /*
+ * Are we inside parentheses or braces?
+ */ /* XXX */
+! else if (((trypos = find_match_paren(curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment)) != NULL
+! && curbuf->b_ind_java == 0)
+! || (tryposBrace =
+! find_start_brace(curbuf->b_ind_maxcomment)) != NULL
+ || trypos != NULL)
+ {
+ if (trypos != NULL && tryposBrace != NULL)
+***************
+*** 7202,7208 ****
+ * If the matching paren is more than one line away, use the indent of
+ * a previous non-empty line that matches the same paren.
+ */
+! if (theline[0] == ')' && ind_paren_prev)
+ {
+ /* Line up with the start of the matching paren line. */
+ amount = get_indent_lnum(curwin->w_cursor.lnum - 1); /* XXX */
+--- 7151,7157 ----
+ * If the matching paren is more than one line away, use the indent of
+ * a previous non-empty line that matches the same paren.
+ */
+! if (theline[0] == ')' && curbuf->b_ind_paren_prev)
+ {
+ /* Line up with the start of the matching paren line. */
+ amount = get_indent_lnum(curwin->w_cursor.lnum - 1); /* XXX */
+***************
+*** 7221,7227 ****
+ curwin->w_cursor.lnum = lnum;
+
+ /* Skip a comment. XXX */
+! if ((trypos = find_start_comment(ind_maxcomment)) != NULL)
+ {
+ lnum = trypos->lnum + 1;
+ continue;
+--- 7170,7177 ----
+ curwin->w_cursor.lnum = lnum;
+
+ /* Skip a comment. XXX */
+! if ((trypos = find_start_comment(curbuf->b_ind_maxcomment))
+! != NULL)
+ {
+ lnum = trypos->lnum + 1;
+ continue;
+***************
+*** 7229,7236 ****
+
+ /* XXX */
+ if ((trypos = find_match_paren(
+! corr_ind_maxparen(ind_maxparen, &cur_curpos),
+! ind_maxcomment)) != NULL
+ && trypos->lnum == our_paren_pos.lnum
+ && trypos->col == our_paren_pos.col)
+ {
+--- 7179,7186 ----
+
+ /* XXX */
+ if ((trypos = find_match_paren(
+! corr_ind_maxparen(curbuf->b_ind_maxparen, &cur_curpos),
+! curbuf->b_ind_maxcomment)) != NULL
+ && trypos->lnum == our_paren_pos.lnum
+ && trypos->col == our_paren_pos.col)
+ {
+***************
+*** 7258,7264 ****
+ int ignore_paren_col = 0;
+ int is_if_for_while = 0;
+
+! if (ind_if_for_while)
+ {
+ /* Look for the outermost opening parenthesis on this line
+ * and check whether it belongs to an "if", "for" or "while". */
+--- 7208,7214 ----
+ int ignore_paren_col = 0;
+ int is_if_for_while = 0;
+
+! if (curbuf->b_ind_if_for_while)
+ {
+ /* Look for the outermost opening parenthesis on this line
+ * and check whether it belongs to an "if", "for" or "while". */
+***************
+*** 7273,7279 ****
+ curwin->w_cursor.lnum = outermost.lnum;
+ curwin->w_cursor.col = outermost.col;
+
+! trypos = find_match_paren(ind_maxparen, ind_maxcomment);
+ } while (trypos && trypos->lnum == outermost.lnum);
+
+ curwin->w_cursor = cursor_save;
+--- 7223,7230 ----
+ curwin->w_cursor.lnum = outermost.lnum;
+ curwin->w_cursor.col = outermost.col;
+
+! trypos = find_match_paren(curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment);
+ } while (trypos && trypos->lnum == outermost.lnum);
+
+ curwin->w_cursor = cursor_save;
+***************
+*** 7284,7290 ****
+ cin_is_if_for_while_before_offset(line, &outermost.col);
+ }
+
+! amount = skip_label(our_paren_pos.lnum, &look, ind_maxcomment);
+ look = skipwhite(look);
+ if (*look == '(')
+ {
+--- 7235,7242 ----
+ cin_is_if_for_while_before_offset(line, &outermost.col);
+ }
+
+! amount = skip_label(our_paren_pos.lnum, &look,
+! curbuf->b_ind_maxcomment);
+ look = skipwhite(look);
+ if (*look == '(')
+ {
+***************
+*** 7298,7304 ****
+ line = ml_get_curline();
+ look_col = (int)(look - line);
+ curwin->w_cursor.col = look_col + 1;
+! if ((trypos = findmatchlimit(NULL, ')', 0, ind_maxparen))
+ != NULL
+ && trypos->lnum == our_paren_pos.lnum
+ && trypos->col < our_paren_pos.col)
+--- 7250,7257 ----
+ line = ml_get_curline();
+ look_col = (int)(look - line);
+ curwin->w_cursor.col = look_col + 1;
+! if ((trypos = findmatchlimit(NULL, ')', 0,
+! curbuf->b_ind_maxparen))
+ != NULL
+ && trypos->lnum == our_paren_pos.lnum
+ && trypos->col < our_paren_pos.col)
+***************
+*** 7307,7330 ****
+ curwin->w_cursor.lnum = save_lnum;
+ look = ml_get(our_paren_pos.lnum) + look_col;
+ }
+! if (theline[0] == ')' || (ind_unclosed == 0 && is_if_for_while == 0)
+! || (!ind_unclosed_noignore && *look == '('
+ && ignore_paren_col == 0))
+ {
+ /*
+ * If we're looking at a close paren, line up right there;
+ * otherwise, line up with the next (non-white) character.
+! * When ind_unclosed_wrapped is set and the matching paren is
+ * the last nonwhite character of the line, use either the
+ * indent of the current line or the indentation of the next
+! * outer paren and add ind_unclosed_wrapped (for very long
+ * lines).
+ */
+ if (theline[0] != ')')
+ {
+ cur_amount = MAXCOL;
+ l = ml_get(our_paren_pos.lnum);
+! if (ind_unclosed_wrapped
+ && cin_ends_in(l, (char_u *)"(", NULL))
+ {
+ /* look for opening unmatched paren, indent one level
+--- 7260,7284 ----
+ curwin->w_cursor.lnum = save_lnum;
+ look = ml_get(our_paren_pos.lnum) + look_col;
+ }
+! if (theline[0] == ')' || (curbuf->b_ind_unclosed == 0
+! && is_if_for_while == 0)
+! || (!curbuf->b_ind_unclosed_noignore && *look == '('
+ && ignore_paren_col == 0))
+ {
+ /*
+ * If we're looking at a close paren, line up right there;
+ * otherwise, line up with the next (non-white) character.
+! * When b_ind_unclosed_wrapped is set and the matching paren is
+ * the last nonwhite character of the line, use either the
+ * indent of the current line or the indentation of the next
+! * outer paren and add b_ind_unclosed_wrapped (for very long
+ * lines).
+ */
+ if (theline[0] != ')')
+ {
+ cur_amount = MAXCOL;
+ l = ml_get(our_paren_pos.lnum);
+! if (curbuf->b_ind_unclosed_wrapped
+ && cin_ends_in(l, (char_u *)"(", NULL))
+ {
+ /* look for opening unmatched paren, indent one level
+***************
+*** 7346,7354 ****
+ }
+
+ our_paren_pos.col = 0;
+! amount += n * ind_unclosed_wrapped;
+ }
+! else if (ind_unclosed_whiteok)
+ our_paren_pos.col++;
+ else
+ {
+--- 7300,7308 ----
+ }
+
+ our_paren_pos.col = 0;
+! amount += n * curbuf->b_ind_unclosed_wrapped;
+ }
+! else if (curbuf->b_ind_unclosed_whiteok)
+ our_paren_pos.col++;
+ else
+ {
+***************
+*** 7374,7385 ****
+ }
+ }
+
+! if (theline[0] == ')' && ind_matching_paren)
+ {
+ /* Line up with the start of the matching paren line. */
+ }
+! else if ((ind_unclosed == 0 && is_if_for_while == 0)
+! || (!ind_unclosed_noignore
+ && *look == '(' && ignore_paren_col == 0))
+ {
+ if (cur_amount != MAXCOL)
+--- 7328,7339 ----
+ }
+ }
+
+! if (theline[0] == ')' && curbuf->b_ind_matching_paren)
+ {
+ /* Line up with the start of the matching paren line. */
+ }
+! else if ((curbuf->b_ind_unclosed == 0 && is_if_for_while == 0)
+! || (!curbuf->b_ind_unclosed_noignore
+ && *look == '(' && ignore_paren_col == 0))
+ {
+ if (cur_amount != MAXCOL)
+***************
+*** 7387,7425 ****
+ }
+ else
+ {
+! /* Add ind_unclosed2 for each '(' before our matching one, but
+! * ignore (void) before the line (ignore_paren_col). */
+ col = our_paren_pos.col;
+ while ((int)our_paren_pos.col > ignore_paren_col)
+ {
+ --our_paren_pos.col;
+ switch (*ml_get_pos(&our_paren_pos))
+ {
+! case '(': amount += ind_unclosed2;
+ col = our_paren_pos.col;
+ break;
+! case ')': amount -= ind_unclosed2;
+ col = MAXCOL;
+ break;
+ }
+ }
+
+! /* Use ind_unclosed once, when the first '(' is not inside
+ * braces */
+ if (col == MAXCOL)
+! amount += ind_unclosed;
+ else
+ {
+ curwin->w_cursor.lnum = our_paren_pos.lnum;
+ curwin->w_cursor.col = col;
+! if (find_match_paren(ind_maxparen, ind_maxcomment) != NULL)
+! amount += ind_unclosed2;
+ else
+ {
+ if (is_if_for_while)
+! amount += ind_if_for_while;
+ else
+! amount += ind_unclosed;
+ }
+ }
+ /*
+--- 7341,7380 ----
+ }
+ else
+ {
+! /* Add b_ind_unclosed2 for each '(' before our matching one,
+! * but ignore (void) before the line (ignore_paren_col). */
+ col = our_paren_pos.col;
+ while ((int)our_paren_pos.col > ignore_paren_col)
+ {
+ --our_paren_pos.col;
+ switch (*ml_get_pos(&our_paren_pos))
+ {
+! case '(': amount += curbuf->b_ind_unclosed2;
+ col = our_paren_pos.col;
+ break;
+! case ')': amount -= curbuf->b_ind_unclosed2;
+ col = MAXCOL;
+ break;
+ }
+ }
+
+! /* Use b_ind_unclosed once, when the first '(' is not inside
+ * braces */
+ if (col == MAXCOL)
+! amount += curbuf->b_ind_unclosed;
+ else
+ {
+ curwin->w_cursor.lnum = our_paren_pos.lnum;
+ curwin->w_cursor.col = col;
+! if (find_match_paren(curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment) != NULL)
+! amount += curbuf->b_ind_unclosed2;
+ else
+ {
+ if (is_if_for_while)
+! amount += curbuf->b_ind_if_for_while;
+ else
+! amount += curbuf->b_ind_unclosed;
+ }
+ }
+ /*
+***************
+*** 7437,7443 ****
+
+ /* add extra indent for a comment */
+ if (cin_iscomment(theline))
+! amount += ind_comment;
+ }
+
+ /*
+--- 7392,7398 ----
+
+ /* add extra indent for a comment */
+ if (cin_iscomment(theline))
+! amount += curbuf->b_ind_comment;
+ }
+
+ /*
+***************
+*** 7480,7487 ****
+ */
+ lnum = ourscope;
+ if (find_last_paren(start, '(', ')')
+! && (trypos = find_match_paren(ind_maxparen,
+! ind_maxcomment)) != NULL)
+ lnum = trypos->lnum;
+
+ /*
+--- 7435,7442 ----
+ */
+ lnum = ourscope;
+ if (find_last_paren(start, '(', ')')
+! && (trypos = find_match_paren(curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment)) != NULL)
+ lnum = trypos->lnum;
+
+ /*
+***************
+*** 7490,7500 ****
+ * ldfd) {
+ * }
+ */
+! if (ind_js || (ind_keep_case_label
+ && cin_iscase(skipwhite(ml_get_curline()), FALSE)))
+ amount = get_indent();
+ else
+! amount = skip_label(lnum, &l, ind_maxcomment);
+
+ start_brace = BRACE_AT_END;
+ }
+--- 7445,7455 ----
+ * ldfd) {
+ * }
+ */
+! if (curbuf->b_ind_js || (curbuf->b_ind_keep_case_label
+ && cin_iscase(skipwhite(ml_get_curline()), FALSE)))
+ amount = get_indent();
+ else
+! amount = skip_label(lnum, &l, curbuf->b_ind_maxcomment);
+
+ start_brace = BRACE_AT_END;
+ }
+***************
+*** 7510,7516 ****
+ * they may want closing braces to line up with something
+ * other than the open brace. indulge them, if so.
+ */
+! amount += ind_close_extra;
+ }
+ else
+ {
+--- 7465,7471 ----
+ * they may want closing braces to line up with something
+ * other than the open brace. indulge them, if so.
+ */
+! amount += curbuf->b_ind_close_extra;
+ }
+ else
+ {
+***************
+*** 7523,7536 ****
+ lookfor = LOOKFOR_INITIAL;
+ if (cin_iselse(theline))
+ lookfor = LOOKFOR_IF;
+! else if (cin_iswhileofdo(theline, cur_curpos.lnum, ind_maxparen))
+! /* XXX */
+ lookfor = LOOKFOR_DO;
+ if (lookfor != LOOKFOR_INITIAL)
+ {
+ curwin->w_cursor.lnum = cur_curpos.lnum;
+! if (find_match(lookfor, ourscope, ind_maxparen,
+! ind_maxcomment) == OK)
+ {
+ amount = get_indent(); /* XXX */
+ goto theend;
+--- 7478,7491 ----
+ lookfor = LOOKFOR_INITIAL;
+ if (cin_iselse(theline))
+ lookfor = LOOKFOR_IF;
+! else if (cin_iswhileofdo(theline, cur_curpos.lnum,
+! curbuf->b_ind_maxparen)) /* XXX */
+ lookfor = LOOKFOR_DO;
+ if (lookfor != LOOKFOR_INITIAL)
+ {
+ curwin->w_cursor.lnum = cur_curpos.lnum;
+! if (find_match(lookfor, ourscope, curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment) == OK)
+ {
+ amount = get_indent(); /* XXX */
+ goto theend;
+***************
+*** 7547,7558 ****
+ /*
+ * if the '{' is _really_ at the left margin, use the imaginary
+ * location of a left-margin brace. Otherwise, correct the
+! * location for ind_open_extra.
+ */
+
+ if (start_brace == BRACE_IN_COL0) /* '{' is in column 0 */
+ {
+! amount = ind_open_left_imag;
+ lookfor_cpp_namespace = TRUE;
+ }
+ else if (start_brace == BRACE_AT_START &&
+--- 7502,7513 ----
+ /*
+ * if the '{' is _really_ at the left margin, use the imaginary
+ * location of a left-margin brace. Otherwise, correct the
+! * location for b_ind_open_extra.
+ */
+
+ if (start_brace == BRACE_IN_COL0) /* '{' is in column 0 */
+ {
+! amount = curbuf->b_ind_open_left_imag;
+ lookfor_cpp_namespace = TRUE;
+ }
+ else if (start_brace == BRACE_AT_START &&
+***************
+*** 7565,7580 ****
+ {
+ if (start_brace == BRACE_AT_END) /* '{' is at end of line */
+ {
+! amount += ind_open_imag;
+
+ l = skipwhite(ml_get_curline());
+ if (cin_is_cpp_namespace(l))
+! amount += ind_cpp_namespace;
+ }
+ else
+ {
+! /* Compensate for adding ind_open_extra later. */
+! amount -= ind_open_extra;
+ if (amount < 0)
+ amount = 0;
+ }
+--- 7520,7535 ----
+ {
+ if (start_brace == BRACE_AT_END) /* '{' is at end of line */
+ {
+! amount += curbuf->b_ind_open_imag;
+
+ l = skipwhite(ml_get_curline());
+ if (cin_is_cpp_namespace(l))
+! amount += curbuf->b_ind_cpp_namespace;
+ }
+ else
+ {
+! /* Compensate for adding b_ind_open_extra later. */
+! amount -= curbuf->b_ind_open_extra;
+ if (amount < 0)
+ amount = 0;
+ }
+***************
+*** 7585,7604 ****
+ if (cin_iscase(theline, FALSE)) /* it's a switch() label */
+ {
+ lookfor = LOOKFOR_CASE; /* find a previous switch() label */
+! amount += ind_case;
+ }
+ else if (cin_isscopedecl(theline)) /* private:, ... */
+ {
+ lookfor = LOOKFOR_SCOPEDECL; /* class decl is this block */
+! amount += ind_scopedecl;
+ }
+ else
+ {
+! if (ind_case_break && cin_isbreak(theline)) /* break; ... */
+ lookfor_break = TRUE;
+
+ lookfor = LOOKFOR_INITIAL;
+! amount += ind_level; /* ind_level from start of block */
+ }
+ scope_amount = amount;
+ whilelevel = 0;
+--- 7540,7561 ----
+ if (cin_iscase(theline, FALSE)) /* it's a switch() label */
+ {
+ lookfor = LOOKFOR_CASE; /* find a previous switch() label */
+! amount += curbuf->b_ind_case;
+ }
+ else if (cin_isscopedecl(theline)) /* private:, ... */
+ {
+ lookfor = LOOKFOR_SCOPEDECL; /* class decl is this block */
+! amount += curbuf->b_ind_scopedecl;
+ }
+ else
+ {
+! if (curbuf->b_ind_case_break && cin_isbreak(theline))
+! /* break; ... */
+ lookfor_break = TRUE;
+
+ lookfor = LOOKFOR_INITIAL;
+! /* b_ind_level from start of block */
+! amount += curbuf->b_ind_level;
+ }
+ scope_amount = amount;
+ whilelevel = 0;
+***************
+*** 7636,7649 ****
+ {
+ if (curwin->w_cursor.lnum == 0
+ || curwin->w_cursor.lnum
+! < ourscope - ind_maxparen)
+ {
+! /* nothing found (abuse ind_maxparen as limit)
+! * assume terminated line (i.e. a variable
+ * initialization) */
+ if (cont_amount > 0)
+ amount = cont_amount;
+! else if (!ind_js)
+ amount += ind_continuation;
+ break;
+ }
+--- 7593,7606 ----
+ {
+ if (curwin->w_cursor.lnum == 0
+ || curwin->w_cursor.lnum
+! < ourscope - curbuf->b_ind_maxparen)
+ {
+! /* nothing found (abuse curbuf->b_ind_maxparen as
+! * limit) assume terminated line (i.e. a variable
+ * initialization) */
+ if (cont_amount > 0)
+ amount = cont_amount;
+! else if (!curbuf->b_ind_js)
+ amount += ind_continuation;
+ break;
+ }
+***************
+*** 7654,7660 ****
+ * If we're in a comment now, skip to the start of the
+ * comment.
+ */
+! trypos = find_start_comment(ind_maxcomment);
+ if (trypos != NULL)
+ {
+ curwin->w_cursor.lnum = trypos->lnum + 1;
+--- 7611,7617 ----
+ * If we're in a comment now, skip to the start of the
+ * comment.
+ */
+! trypos = find_start_comment(curbuf->b_ind_maxcomment);
+ if (trypos != NULL)
+ {
+ curwin->w_cursor.lnum = trypos->lnum + 1;
+***************
+*** 7680,7686 ****
+ */
+ if (start_brace != BRACE_IN_COL0
+ || !cin_isfuncdecl(&l, curwin->w_cursor.lnum,
+! 0, ind_maxparen, ind_maxcomment))
+ {
+ /* if the line is terminated with another ','
+ * it is a continued variable initialization.
+--- 7637,7644 ----
+ */
+ if (start_brace != BRACE_IN_COL0
+ || !cin_isfuncdecl(&l, curwin->w_cursor.lnum,
+! 0, curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment))
+ {
+ /* if the line is terminated with another ','
+ * it is a continued variable initialization.
+***************
+*** 7711,7721 ****
+ */ /* XXX */
+ trypos = NULL;
+ if (find_last_paren(l, '(', ')'))
+! trypos = find_match_paren(ind_maxparen,
+! ind_maxcomment);
+
+ if (trypos == NULL && find_last_paren(l, '{', '}'))
+! trypos = find_start_brace(ind_maxcomment);
+
+ if (trypos != NULL)
+ {
+--- 7669,7681 ----
+ */ /* XXX */
+ trypos = NULL;
+ if (find_last_paren(l, '(', ')'))
+! trypos = find_match_paren(
+! curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment);
+
+ if (trypos == NULL && find_last_paren(l, '{', '}'))
+! trypos = find_start_brace(
+! curbuf->b_ind_maxcomment);
+
+ if (trypos != NULL)
+ {
+***************
+*** 7750,7757 ****
+ amount = scope_amount;
+ if (theline[0] == '{')
+ {
+! amount += ind_open_extra;
+! added_to_amount = ind_open_extra;
+ }
+ }
+
+--- 7710,7717 ----
+ amount = scope_amount;
+ if (theline[0] == '{')
+ {
+! amount += curbuf->b_ind_open_extra;
+! added_to_amount = curbuf->b_ind_open_extra;
+ }
+ }
+
+***************
+*** 7773,7779 ****
+
+ /* If we're in a comment now, skip to the start of
+ * the comment. */
+! trypos = find_start_comment(ind_maxcomment);
+ if (trypos != NULL)
+ {
+ curwin->w_cursor.lnum = trypos->lnum + 1;
+--- 7733,7740 ----
+
+ /* If we're in a comment now, skip to the start of
+ * the comment. */
+! trypos = find_start_comment(
+! curbuf->b_ind_maxcomment);
+ if (trypos != NULL)
+ {
+ curwin->w_cursor.lnum = trypos->lnum + 1;
+***************
+*** 7788,7794 ****
+ /* Finally the actual check for "namespace". */
+ if (cin_is_cpp_namespace(l))
+ {
+! amount += ind_cpp_namespace - added_to_amount;
+ break;
+ }
+
+--- 7749,7756 ----
+ /* Finally the actual check for "namespace". */
+ if (cin_is_cpp_namespace(l))
+ {
+! amount += curbuf->b_ind_cpp_namespace
+! - added_to_amount;
+ break;
+ }
+
+***************
+*** 7802,7808 ****
+ /*
+ * If we're in a comment now, skip to the start of the comment.
+ */ /* XXX */
+! if ((trypos = find_start_comment(ind_maxcomment)) != NULL)
+ {
+ curwin->w_cursor.lnum = trypos->lnum + 1;
+ curwin->w_cursor.col = 0;
+--- 7764,7771 ----
+ /*
+ * If we're in a comment now, skip to the start of the comment.
+ */ /* XXX */
+! if ((trypos = find_start_comment(curbuf->b_ind_maxcomment))
+! != NULL)
+ {
+ curwin->w_cursor.lnum = trypos->lnum + 1;
+ curwin->w_cursor.col = 0;
+***************
+*** 7856,7863 ****
+ * Check that this case label is not for another
+ * switch()
+ */ /* XXX */
+! if ((trypos = find_start_brace(ind_maxcomment)) ==
+! NULL || trypos->lnum == ourscope)
+ {
+ amount = get_indent(); /* XXX */
+ break;
+--- 7819,7827 ----
+ * Check that this case label is not for another
+ * switch()
+ */ /* XXX */
+! if ((trypos = find_start_brace(
+! curbuf->b_ind_maxcomment)) == NULL
+! || trypos->lnum == ourscope)
+ {
+ amount = get_indent(); /* XXX */
+ break;
+***************
+*** 7900,7908 ****
+ if (l != NULL && cin_is_cinword(l))
+ {
+ if (theline[0] == '{')
+! amount += ind_open_extra;
+ else
+! amount += ind_level + ind_no_brace;
+ }
+ break;
+ }
+--- 7864,7873 ----
+ if (l != NULL && cin_is_cinword(l))
+ {
+ if (theline[0] == '{')
+! amount += curbuf->b_ind_open_extra;
+ else
+! amount += curbuf->b_ind_level
+! + curbuf->b_ind_no_brace;
+ }
+ break;
+ }
+***************
+*** 7916,7923 ****
+ * -> y = 1;
+ */
+ scope_amount = get_indent() + (iscase /* XXX */
+! ? ind_case_code : ind_scopedecl_code);
+! lookfor = ind_case_break ? LOOKFOR_NOBREAK : LOOKFOR_ANY;
+ continue;
+ }
+
+--- 7881,7890 ----
+ * -> y = 1;
+ */
+ scope_amount = get_indent() + (iscase /* XXX */
+! ? curbuf->b_ind_case_code
+! : curbuf->b_ind_scopedecl_code);
+! lookfor = curbuf->b_ind_case_break
+! ? LOOKFOR_NOBREAK : LOOKFOR_ANY;
+ continue;
+ }
+
+***************
+*** 7928,7934 ****
+ if (lookfor == LOOKFOR_CASE || lookfor == LOOKFOR_SCOPEDECL)
+ {
+ if (find_last_paren(l, '{', '}') && (trypos =
+! find_start_brace(ind_maxcomment)) != NULL)
+ {
+ curwin->w_cursor.lnum = trypos->lnum + 1;
+ curwin->w_cursor.col = 0;
+--- 7895,7901 ----
+ if (lookfor == LOOKFOR_CASE || lookfor == LOOKFOR_SCOPEDECL)
+ {
+ if (find_last_paren(l, '{', '}') && (trypos =
+! find_start_brace(curbuf->b_ind_maxcomment)) != NULL)
+ {
+ curwin->w_cursor.lnum = trypos->lnum + 1;
+ curwin->w_cursor.col = 0;
+***************
+*** 7939,7945 ****
+ /*
+ * Ignore jump labels with nothing after them.
+ */
+! if (!ind_js && cin_islabel(ind_maxcomment))
+ {
+ l = after_label(ml_get_curline());
+ if (l == NULL || cin_nocode(l))
+--- 7906,7912 ----
+ /*
+ * Ignore jump labels with nothing after them.
+ */
+! if (!curbuf->b_ind_js && cin_islabel(curbuf->b_ind_maxcomment))
+ {
+ l = after_label(ml_get_curline());
+ if (l == NULL || cin_nocode(l))
+***************
+*** 7962,7968 ****
+ * constructor initialization?
+ */ /* XXX */
+ n = FALSE;
+! if (lookfor != LOOKFOR_TERM && ind_cpp_baseclass > 0)
+ {
+ n = cin_is_cpp_baseclass(&col);
+ l = ml_get_curline();
+--- 7929,7935 ----
+ * constructor initialization?
+ */ /* XXX */
+ n = FALSE;
+! if (lookfor != LOOKFOR_TERM && curbuf->b_ind_cpp_baseclass > 0)
+ {
+ n = cin_is_cpp_baseclass(&col);
+ l = ml_get_curline();
+***************
+*** 7985,7992 ****
+ }
+ else
+ /* XXX */
+! amount = get_baseclass_amount(col, ind_maxparen,
+! ind_maxcomment, ind_cpp_baseclass);
+ break;
+ }
+ else if (lookfor == LOOKFOR_CPP_BASECLASS)
+--- 7952,7961 ----
+ }
+ else
+ /* XXX */
+! amount = get_baseclass_amount(col,
+! curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment,
+! curbuf->b_ind_cpp_baseclass);
+ break;
+ }
+ else if (lookfor == LOOKFOR_CPP_BASECLASS)
+***************
+*** 8029,8036 ****
+ */
+ (void)find_last_paren(l, '(', ')');
+ trypos = find_match_paren(
+! corr_ind_maxparen(ind_maxparen, &cur_curpos),
+! ind_maxcomment);
+
+ /*
+ * If we are looking for ',', we also look for matching
+--- 7998,8005 ----
+ */
+ (void)find_last_paren(l, '(', ')');
+ trypos = find_match_paren(
+! corr_ind_maxparen(curbuf->b_ind_maxparen,
+! &cur_curpos), curbuf->b_ind_maxcomment);
+
+ /*
+ * If we are looking for ',', we also look for matching
+***************
+*** 8038,8044 ****
+ */
+ if (trypos == NULL && terminated == ','
+ && find_last_paren(l, '{', '}'))
+! trypos = find_start_brace(ind_maxcomment);
+
+ if (trypos != NULL)
+ {
+--- 8007,8013 ----
+ */
+ if (trypos == NULL && terminated == ','
+ && find_last_paren(l, '{', '}'))
+! trypos = find_start_brace(curbuf->b_ind_maxcomment);
+
+ if (trypos != NULL)
+ {
+***************
+*** 8081,8089 ****
+ * Get indent and pointer to text for current line,
+ * ignoring any jump label. XXX
+ */
+! if (!ind_js)
+ cur_amount = skip_label(curwin->w_cursor.lnum,
+! &l, ind_maxcomment);
+ else
+ cur_amount = get_indent();
+ /*
+--- 8050,8058 ----
+ * Get indent and pointer to text for current line,
+ * ignoring any jump label. XXX
+ */
+! if (!curbuf->b_ind_js)
+ cur_amount = skip_label(curwin->w_cursor.lnum,
+! &l, curbuf->b_ind_maxcomment);
+ else
+ cur_amount = get_indent();
+ /*
+***************
+*** 8098,8113 ****
+ {
+ amount = cur_amount;
+ /*
+! * Only add ind_open_extra when the current line
+ * doesn't start with a '{', which must have a match
+ * in the same line (scope is the same). Probably:
+ * { 1, 2 },
+ * -> { 3, 4 }
+ */
+ if (*skipwhite(l) != '{')
+! amount += ind_open_extra;
+
+! if (ind_cpp_baseclass)
+ {
+ /* have to look back, whether it is a cpp base
+ * class declaration or initialization */
+--- 8067,8082 ----
+ {
+ amount = cur_amount;
+ /*
+! * Only add b_ind_open_extra when the current line
+ * doesn't start with a '{', which must have a match
+ * in the same line (scope is the same). Probably:
+ * { 1, 2 },
+ * -> { 3, 4 }
+ */
+ if (*skipwhite(l) != '{')
+! amount += curbuf->b_ind_open_extra;
+
+! if (curbuf->b_ind_cpp_baseclass)
+ {
+ /* have to look back, whether it is a cpp base
+ * class declaration or initialization */
+***************
+*** 8155,8164 ****
+ */
+ amount = cur_amount;
+ if (theline[0] == '{')
+! amount += ind_open_extra;
+ if (lookfor != LOOKFOR_TERM)
+ {
+! amount += ind_level + ind_no_brace;
+ break;
+ }
+
+--- 8124,8134 ----
+ */
+ amount = cur_amount;
+ if (theline[0] == '{')
+! amount += curbuf->b_ind_open_extra;
+ if (lookfor != LOOKFOR_TERM)
+ {
+! amount += curbuf->b_ind_level
+! + curbuf->b_ind_no_brace;
+ break;
+ }
+
+***************
+*** 8192,8201 ****
+ curwin->w_cursor.col =
+ (colnr_T)(l - ml_get_curline()) + 1;
+
+! if ((trypos = find_start_brace(ind_maxcomment))
+! == NULL
+ || find_match(LOOKFOR_IF, trypos->lnum,
+! ind_maxparen, ind_maxcomment) == FAIL)
+ break;
+ }
+ }
+--- 8162,8172 ----
+ curwin->w_cursor.col =
+ (colnr_T)(l - ml_get_curline()) + 1;
+
+! if ((trypos = find_start_brace(
+! curbuf->b_ind_maxcomment)) == NULL
+ || find_match(LOOKFOR_IF, trypos->lnum,
+! curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment) == FAIL)
+ break;
+ }
+ }
+***************
+*** 8232,8238 ****
+ * enumerations/initializations. */
+ if (terminated == ',')
+ {
+! if (ind_cpp_baseclass == 0)
+ break;
+
+ lookfor = LOOKFOR_CPP_BASECLASS;
+--- 8203,8209 ----
+ * enumerations/initializations. */
+ if (terminated == ',')
+ {
+! if (curbuf->b_ind_cpp_baseclass == 0)
+ break;
+
+ lookfor = LOOKFOR_CPP_BASECLASS;
+***************
+*** 8290,8297 ****
+ * If so: Ignore until the matching "do".
+ */
+ /* XXX */
+! else if (cin_iswhileofdo_end(terminated, ind_maxparen,
+! ind_maxcomment))
+ {
+ /*
+ * Found an unterminated line after a while ();, line up
+--- 8261,8268 ----
+ * If so: Ignore until the matching "do".
+ */
+ /* XXX */
+! else if (cin_iswhileofdo_end(terminated, curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment))
+ {
+ /*
+ * Found an unterminated line after a while ();, line up
+***************
+*** 8315,8321 ****
+ lookfor = LOOKFOR_TERM;
+ amount = get_indent(); /* XXX */
+ if (theline[0] == '{')
+! amount += ind_open_extra;
+ }
+ ++whilelevel;
+ }
+--- 8286,8292 ----
+ lookfor = LOOKFOR_TERM;
+ amount = get_indent(); /* XXX */
+ if (theline[0] == '{')
+! amount += curbuf->b_ind_open_extra;
+ }
+ ++whilelevel;
+ }
+***************
+*** 8408,8415 ****
+ term_again:
+ l = ml_get_curline();
+ if (find_last_paren(l, '(', ')')
+! && (trypos = find_match_paren(ind_maxparen,
+! ind_maxcomment)) != NULL)
+ {
+ /*
+ * Check if we are on a case label now. This is
+--- 8379,8387 ----
+ term_again:
+ l = ml_get_curline();
+ if (find_last_paren(l, '(', ')')
+! && (trypos = find_match_paren(
+! curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment)) != NULL)
+ {
+ /*
+ * Check if we are on a case label now. This is
+***************
+*** 8436,8456 ****
+ * stat;
+ * }
+ */
+! iscase = (ind_keep_case_label && cin_iscase(l, FALSE));
+
+ /*
+ * Get indent and pointer to text for current line,
+ * ignoring any jump label.
+ */
+ amount = skip_label(curwin->w_cursor.lnum,
+! &l, ind_maxcomment);
+
+ if (theline[0] == '{')
+! amount += ind_open_extra;
+! /* See remark above: "Only add ind_open_extra.." */
+ l = skipwhite(l);
+ if (*l == '{')
+! amount -= ind_open_extra;
+ lookfor = iscase ? LOOKFOR_ANY : LOOKFOR_TERM;
+
+ /*
+--- 8408,8429 ----
+ * stat;
+ * }
+ */
+! iscase = (curbuf->b_ind_keep_case_label
+! && cin_iscase(l, FALSE));
+
+ /*
+ * Get indent and pointer to text for current line,
+ * ignoring any jump label.
+ */
+ amount = skip_label(curwin->w_cursor.lnum,
+! &l, curbuf->b_ind_maxcomment);
+
+ if (theline[0] == '{')
+! amount += curbuf->b_ind_open_extra;
+! /* See remark above: "Only add b_ind_open_extra.." */
+ l = skipwhite(l);
+ if (*l == '{')
+! amount -= curbuf->b_ind_open_extra;
+ lookfor = iscase ? LOOKFOR_ANY : LOOKFOR_TERM;
+
+ /*
+***************
+*** 8466,8475 ****
+ && cin_iselse(l)
+ && whilelevel == 0)
+ {
+! if ((trypos = find_start_brace(ind_maxcomment))
+! == NULL
+ || find_match(LOOKFOR_IF, trypos->lnum,
+! ind_maxparen, ind_maxcomment) == FAIL)
+ break;
+ continue;
+ }
+--- 8439,8449 ----
+ && cin_iselse(l)
+ && whilelevel == 0)
+ {
+! if ((trypos = find_start_brace(
+! curbuf->b_ind_maxcomment)) == NULL
+ || find_match(LOOKFOR_IF, trypos->lnum,
+! curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment) == FAIL)
+ break;
+ continue;
+ }
+***************
+*** 8480,8487 ****
+ */
+ l = ml_get_curline();
+ if (find_last_paren(l, '{', '}')
+! && (trypos = find_start_brace(ind_maxcomment))
+! != NULL) /* XXX */
+ {
+ curwin->w_cursor = *trypos;
+ /* if not "else {" check for terminated again */
+--- 8454,8461 ----
+ */
+ l = ml_get_curline();
+ if (find_last_paren(l, '{', '}')
+! && (trypos = find_start_brace(
+! curbuf->b_ind_maxcomment)) != NULL) /* XXX */
+ {
+ curwin->w_cursor = *trypos;
+ /* if not "else {" check for terminated again */
+***************
+*** 8500,8510 ****
+
+ /* add extra indent for a comment */
+ if (cin_iscomment(theline))
+! amount += ind_comment;
+
+ /* subtract extra left-shift for jump labels */
+! if (ind_jump_label > 0 && original_line_islabel)
+! amount -= ind_jump_label;
+ }
+
+ /*
+--- 8474,8484 ----
+
+ /* add extra indent for a comment */
+ if (cin_iscomment(theline))
+! amount += curbuf->b_ind_comment;
+
+ /* subtract extra left-shift for jump labels */
+! if (curbuf->b_ind_jump_label > 0 && original_line_islabel)
+! amount -= curbuf->b_ind_jump_label;
+ }
+
+ /*
+***************
+*** 8525,8531 ****
+
+ if (theline[0] == '{')
+ {
+! amount = ind_first_open;
+ }
+
+ /*
+--- 8499,8505 ----
+
+ if (theline[0] == '{')
+ {
+! amount = curbuf->b_ind_first_open;
+ }
+
+ /*
+***************
+*** 8543,8552 ****
+ && !cin_ends_in(theline, (char_u *)",", NULL)
+ && cin_isfuncdecl(NULL, cur_curpos.lnum + 1,
+ cur_curpos.lnum + 1,
+! ind_maxparen, ind_maxcomment)
+ && !cin_isterminated(theline, FALSE, TRUE))
+ {
+! amount = ind_func_type;
+ }
+ else
+ {
+--- 8517,8527 ----
+ && !cin_ends_in(theline, (char_u *)",", NULL)
+ && cin_isfuncdecl(NULL, cur_curpos.lnum + 1,
+ cur_curpos.lnum + 1,
+! curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment)
+ && !cin_isterminated(theline, FALSE, TRUE))
+ {
+! amount = curbuf->b_ind_func_type;
+ }
+ else
+ {
+***************
+*** 8565,8571 ****
+ /*
+ * If we're in a comment now, skip to the start of the comment.
+ */ /* XXX */
+! if ((trypos = find_start_comment(ind_maxcomment)) != NULL)
+ {
+ curwin->w_cursor.lnum = trypos->lnum + 1;
+ curwin->w_cursor.col = 0;
+--- 8540,8547 ----
+ /*
+ * If we're in a comment now, skip to the start of the comment.
+ */ /* XXX */
+! if ((trypos = find_start_comment(
+! curbuf->b_ind_maxcomment)) != NULL)
+ {
+ curwin->w_cursor.lnum = trypos->lnum + 1;
+ curwin->w_cursor.col = 0;
+***************
+*** 8577,8583 ****
+ * constructor initialization?
+ */ /* XXX */
+ n = FALSE;
+! if (ind_cpp_baseclass != 0 && theline[0] != '{')
+ {
+ n = cin_is_cpp_baseclass(&col);
+ l = ml_get_curline();
+--- 8553,8559 ----
+ * constructor initialization?
+ */ /* XXX */
+ n = FALSE;
+! if (curbuf->b_ind_cpp_baseclass != 0 && theline[0] != '{')
+ {
+ n = cin_is_cpp_baseclass(&col);
+ l = ml_get_curline();
+***************
+*** 8585,8592 ****
+ if (n)
+ {
+ /* XXX */
+! amount = get_baseclass_amount(col, ind_maxparen,
+! ind_maxcomment, ind_cpp_baseclass);
+ break;
+ }
+
+--- 8561,8569 ----
+ if (n)
+ {
+ /* XXX */
+! amount = get_baseclass_amount(col, curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment,
+! curbuf->b_ind_cpp_baseclass);
+ break;
+ }
+
+***************
+*** 8617,8624 ****
+ {
+ /* take us back to opening paren */
+ if (find_last_paren(l, '(', ')')
+! && (trypos = find_match_paren(ind_maxparen,
+! ind_maxcomment)) != NULL)
+ curwin->w_cursor = *trypos;
+
+ /* For a line ending in ',' that is a continuation line go
+--- 8594,8602 ----
+ {
+ /* take us back to opening paren */
+ if (find_last_paren(l, '(', ')')
+! && (trypos = find_match_paren(
+! curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment)) != NULL)
+ curwin->w_cursor = *trypos;
+
+ /* For a line ending in ',' that is a continuation line go
+***************
+*** 8650,8656 ****
+ * not in a comment, put it the left margin.
+ */
+ if (cin_isfuncdecl(NULL, cur_curpos.lnum, 0,
+! ind_maxparen, ind_maxcomment)) /* XXX */
+ break;
+ l = ml_get_curline();
+
+--- 8628,8635 ----
+ * not in a comment, put it the left margin.
+ */
+ if (cin_isfuncdecl(NULL, cur_curpos.lnum, 0,
+! curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment)) /* XXX */
+ break;
+ l = ml_get_curline();
+
+***************
+*** 8699,8707 ****
+ * parameters.
+ */
+ if (cin_isfuncdecl(&l, curwin->w_cursor.lnum, 0,
+! ind_maxparen, ind_maxcomment))
+ {
+! amount = ind_param;
+ break;
+ }
+
+--- 8678,8687 ----
+ * parameters.
+ */
+ if (cin_isfuncdecl(&l, curwin->w_cursor.lnum, 0,
+! curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment))
+ {
+! amount = curbuf->b_ind_param;
+ break;
+ }
+
+***************
+*** 8730,8737 ****
+ */
+ find_last_paren(l, '(', ')');
+
+! if ((trypos = find_match_paren(ind_maxparen,
+! ind_maxcomment)) != NULL)
+ curwin->w_cursor = *trypos;
+ amount = get_indent(); /* XXX */
+ break;
+--- 8710,8717 ----
+ */
+ find_last_paren(l, '(', ')');
+
+! if ((trypos = find_match_paren(curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment)) != NULL)
+ curwin->w_cursor = *trypos;
+ amount = get_indent(); /* XXX */
+ break;
+***************
+*** 8739,8745 ****
+
+ /* add extra indent for a comment */
+ if (cin_iscomment(theline))
+! amount += ind_comment;
+
+ /* add extra indent if the previous line ended in a backslash:
+ * "asdfasdf\
+--- 8719,8725 ----
+
+ /* add extra indent for a comment */
+ if (cin_iscomment(theline))
+! amount += curbuf->b_ind_comment;
+
+ /* add extra indent if the previous line ended in a backslash:
+ * "asdfasdf\
+*** ../vim-7.4.068/src/ops.c 2013-11-04 01:41:11.000000000 +0100
+--- src/ops.c 2013-11-05 06:13:27.000000000 +0100
+***************
+*** 336,342 ****
+ {
+ int count;
+ int i, j;
+! int p_sw = (int)get_sw_value();
+
+ count = get_indent(); /* get current indent */
+
+--- 336,342 ----
+ {
+ int count;
+ int i, j;
+! int p_sw = (int)get_sw_value(curbuf);
+
+ count = get_indent(); /* get current indent */
+
+***************
+*** 392,398 ****
+ int total;
+ char_u *newp, *oldp;
+ int oldcol = curwin->w_cursor.col;
+! int p_sw = (int)get_sw_value();
+ int p_ts = (int)curbuf->b_p_ts;
+ struct block_def bd;
+ int incr;
+--- 392,398 ----
+ int total;
+ char_u *newp, *oldp;
+ int oldcol = curwin->w_cursor.col;
+! int p_sw = (int)get_sw_value(curbuf);
+ int p_ts = (int)curbuf->b_p_ts;
+ struct block_def bd;
+ int incr;
+***************
+*** 4046,4052 ****
+ # endif
+ # endif
+ # ifdef FEAT_CINDENT
+! (curbuf->b_p_cin && in_cinkeys('#', ' ', TRUE))
+ # endif
+ ;
+ }
+--- 4046,4053 ----
+ # endif
+ # endif
+ # ifdef FEAT_CINDENT
+! (curbuf->b_p_cin && in_cinkeys('#', ' ', TRUE)
+! && curbuf->b_ind_hash_comment == 0)
+ # endif
+ ;
+ }
+*** ../vim-7.4.068/src/proto/misc1.pro 2013-11-04 02:53:46.000000000 +0100
+--- src/proto/misc1.pro 2013-11-05 06:08:46.000000000 +0100
+***************
+*** 84,89 ****
+--- 84,90 ----
+ int cin_islabel __ARGS((int ind_maxcomment));
+ int cin_iscase __ARGS((char_u *s, int strict));
+ int cin_isscopedecl __ARGS((char_u *s));
++ void parse_cino __ARGS((buf_T *buf));
+ int get_c_indent __ARGS((void));
+ int get_expr_indent __ARGS((void));
+ int get_lisp_indent __ARGS((void));
+*** ../vim-7.4.068/src/proto/option.pro 2013-08-10 13:37:22.000000000 +0200
+--- src/proto/option.pro 2013-11-05 06:14:46.000000000 +0100
+***************
+*** 59,65 ****
+ void save_file_ff __ARGS((buf_T *buf));
+ int file_ff_differs __ARGS((buf_T *buf, int ignore_empty));
+ int check_ff_value __ARGS((char_u *p));
+! long get_sw_value __ARGS((void));
+ long get_sts_value __ARGS((void));
+ void find_mps_values __ARGS((int *initc, int *findc, int *backwards, int switchit));
+ /* vim: set ft=c : */
+--- 59,65 ----
+ void save_file_ff __ARGS((buf_T *buf));
+ int file_ff_differs __ARGS((buf_T *buf, int ignore_empty));
+ int check_ff_value __ARGS((char_u *p));
+! long get_sw_value __ARGS((buf_T *buf));
+ long get_sts_value __ARGS((void));
+ void find_mps_values __ARGS((int *initc, int *findc, int *backwards, int switchit));
+ /* vim: set ft=c : */
+*** ../vim-7.4.068/src/structs.h 2013-07-03 15:35:59.000000000 +0200
+--- src/structs.h 2013-11-05 05:08:26.000000000 +0100
+***************
+*** 1633,1638 ****
+--- 1633,1677 ----
+
+ /* end of buffer options */
+
++ #ifdef FEAT_CINDENT
++ /* values set from b_p_cino */
++ int b_ind_level;
++ int b_ind_open_imag;
++ int b_ind_no_brace;
++ int b_ind_first_open;
++ int b_ind_open_extra;
++ int b_ind_close_extra;
++ int b_ind_open_left_imag;
++ int b_ind_jump_label;
++ int b_ind_case;
++ int b_ind_case_code;
++ int b_ind_case_break;
++ int b_ind_param;
++ int b_ind_func_type;
++ int b_ind_comment;
++ int b_ind_in_comment;
++ int b_ind_in_comment2;
++ int b_ind_cpp_baseclass;
++ int b_ind_continuation;
++ int b_ind_unclosed;
++ int b_ind_unclosed2;
++ int b_ind_unclosed_noignore;
++ int b_ind_unclosed_wrapped;
++ int b_ind_unclosed_whiteok;
++ int b_ind_matching_paren;
++ int b_ind_paren_prev;
++ int b_ind_maxparen;
++ int b_ind_maxcomment;
++ int b_ind_scopedecl;
++ int b_ind_scopedecl_code;
++ int b_ind_java;
++ int b_ind_js;
++ int b_ind_keep_case_label;
++ int b_ind_hash_comment;
++ int b_ind_cpp_namespace;
++ int b_ind_if_for_while;
++ #endif
++
+ linenr_T b_no_eol_lnum; /* non-zero lnum when last line of next binary
+ * write should not have an end-of-line */
+
+*** ../vim-7.4.068/src/option.c 2013-07-17 21:39:13.000000000 +0200
+--- src/option.c 2013-11-05 06:58:04.000000000 +0100
+***************
+*** 5372,5377 ****
+--- 5372,5378 ----
+ #ifdef FEAT_CINDENT
+ check_string_option(&buf->b_p_cink);
+ check_string_option(&buf->b_p_cino);
++ parse_cino(buf);
+ #endif
+ #ifdef FEAT_AUTOCMD
+ check_string_option(&buf->b_p_ft);
+***************
+*** 6990,6995 ****
+--- 6991,7005 ----
+ }
+ #endif
+
++ #ifdef FEAT_CINDENT
++ /* 'cinoptions' */
++ else if (gvarp == &p_cino)
++ {
++ /* TODO: recognize errors */
++ parse_cino(curbuf);
++ }
++ #endif
++
+ /* Options that are a list of flags. */
+ else
+ {
+***************
+*** 8338,8351 ****
+ curwin->w_p_fdc = 12;
+ }
+ }
+
+ /* 'shiftwidth' or 'tabstop' */
+ else if (pp == &curbuf->b_p_sw || pp == &curbuf->b_p_ts)
+ {
+ if (foldmethodIsIndent(curwin))
+ foldUpdateAll(curwin);
+ }
+! #endif /* FEAT_FOLDING */
+
+ #ifdef FEAT_MBYTE
+ /* 'maxcombine' */
+--- 8348,8371 ----
+ curwin->w_p_fdc = 12;
+ }
+ }
++ #endif /* FEAT_FOLDING */
+
++ #if defined(FEAT_FOLDING) || defined(FEAT_CINDENT)
+ /* 'shiftwidth' or 'tabstop' */
+ else if (pp == &curbuf->b_p_sw || pp == &curbuf->b_p_ts)
+ {
++ # ifdef FEAT_FOLDING
+ if (foldmethodIsIndent(curwin))
+ foldUpdateAll(curwin);
++ # endif
++ # ifdef FEAT_CINDENT
++ /* When 'shiftwidth' changes, or it's zero and 'tabstop' changes:
++ * parse 'cinoptions'. */
++ if (pp == &curbuf->b_p_sw || curbuf->b_p_sw == 0)
++ parse_cino(curbuf);
++ # endif
+ }
+! #endif
+
+ #ifdef FEAT_MBYTE
+ /* 'maxcombine' */
+***************
+*** 11729,11737 ****
+ * 'tabstop' value when 'shiftwidth' is zero.
+ */
+ long
+! get_sw_value()
+ {
+! return curbuf->b_p_sw ? curbuf->b_p_sw : curbuf->b_p_ts;
+ }
+
+ /*
+--- 11749,11758 ----
+ * 'tabstop' value when 'shiftwidth' is zero.
+ */
+ long
+! get_sw_value(buf)
+! buf_T *buf;
+ {
+! return buf->b_p_sw ? buf->b_p_sw : buf->b_p_ts;
+ }
+
+ /*
+***************
+*** 11741,11747 ****
+ long
+ get_sts_value()
+ {
+! return curbuf->b_p_sts < 0 ? get_sw_value() : curbuf->b_p_sts;
+ }
+
+ /*
+--- 11762,11768 ----
+ long
+ get_sts_value()
+ {
+! return curbuf->b_p_sts < 0 ? get_sw_value(curbuf) : curbuf->b_p_sts;
+ }
+
+ /*
+*** ../vim-7.4.068/src/version.c 2013-11-04 04:57:46.000000000 +0100
+--- src/version.c 2013-11-05 04:55:36.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 69,
+ /**/
+
+--
+A special cleaning ordinance bans housewives from hiding dirt and dust under a
+rug in a dwelling.
+ [real standing law in Pennsylvania, United States of America]
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.070 b/patches/source/vim/patches/7.4.070
new file mode 100644
index 000000000..749b7445b
--- /dev/null
+++ b/patches/source/vim/patches/7.4.070
@@ -0,0 +1,47 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.070
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.070 (after 7.4.069)
+Problem: Can't compile with tiny features. (Tony Mechelynck)
+Solution: Add #ifdef.
+Files: src/buffer.c
+
+
+*** ../vim-7.4.069/src/buffer.c 2013-11-05 07:12:59.000000000 +0100
+--- src/buffer.c 2013-11-05 17:37:27.000000000 +0100
+***************
+*** 213,219 ****
+--- 213,221 ----
+ if (curbuf->b_flags & BF_NEVERLOADED)
+ {
+ (void)buf_init_chartab(curbuf, FALSE);
++ #ifdef FEAT_CINDENT
+ parse_cino(curbuf);
++ #endif
+ }
+
+ /*
+*** ../vim-7.4.069/src/version.c 2013-11-05 07:12:59.000000000 +0100
+--- src/version.c 2013-11-05 17:38:56.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 70,
+ /**/
+
+--
+No man may purchase alcohol without written consent from his wife.
+ [real standing law in Pennsylvania, United States of America]
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.071 b/patches/source/vim/patches/7.4.071
new file mode 100644
index 000000000..71b2984e5
--- /dev/null
+++ b/patches/source/vim/patches/7.4.071
@@ -0,0 +1,1302 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.071
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.071 (after 7.4.069)
+Problem: Passing limits around too often.
+Solution: Use limits from buffer.
+Files: src/edit.c, src/misc1.c, src/proto/misc1.pro
+
+
+*** ../vim-7.4.070/src/edit.c 2013-11-05 07:12:59.000000000 +0100
+--- src/edit.c 2013-11-06 03:19:10.000000000 +0100
+***************
+*** 7857,7864 ****
+ if (try_match && keytyped == ':')
+ {
+ p = ml_get_curline();
+! if (cin_iscase(p, FALSE) || cin_isscopedecl(p)
+! || cin_islabel(30))
+ return TRUE;
+ /* Need to get the line again after cin_islabel(). */
+ p = ml_get_curline();
+--- 7857,7863 ----
+ if (try_match && keytyped == ':')
+ {
+ p = ml_get_curline();
+! if (cin_iscase(p, FALSE) || cin_isscopedecl(p) || cin_islabel())
+ return TRUE;
+ /* Need to get the line again after cin_islabel(). */
+ p = ml_get_curline();
+***************
+*** 7868,7874 ****
+ {
+ p[curwin->w_cursor.col - 1] = ' ';
+ i = (cin_iscase(p, FALSE) || cin_isscopedecl(p)
+! || cin_islabel(30));
+ p = ml_get_curline();
+ p[curwin->w_cursor.col - 1] = ':';
+ if (i)
+--- 7867,7873 ----
+ {
+ p[curwin->w_cursor.col - 1] = ' ';
+ i = (cin_iscase(p, FALSE) || cin_isscopedecl(p)
+! || cin_islabel());
+ p = ml_get_curline();
+ p[curwin->w_cursor.col - 1] = ':';
+ if (i)
+*** ../vim-7.4.070/src/misc1.c 2013-11-05 07:12:59.000000000 +0100
+--- src/misc1.c 2013-11-06 03:46:59.000000000 +0100
+***************
+*** 5191,5201 ****
+--- 5191,5208 ----
+ #if defined(FEAT_CINDENT) || defined(FEAT_SYN_HL)
+
+ static char_u *skip_string __ARGS((char_u *p));
++ static pos_T *ind_find_start_comment __ARGS((void));
+
+ /*
+ * Find the start of a comment, not knowing if we are in a comment right now.
+ * Search starts at w_cursor.lnum and goes backwards.
+ */
++ static pos_T *
++ ind_find_start_comment() /* XXX */
++ {
++ return find_start_comment(curbuf->b_ind_maxcomment);
++ }
++
+ pos_T *
+ find_start_comment(ind_maxcomment) /* XXX */
+ int ind_maxcomment;
+***************
+*** 5313,5319 ****
+ static int cin_isdefault __ARGS((char_u *));
+ static char_u *after_label __ARGS((char_u *l));
+ static int get_indent_nolabel __ARGS((linenr_T lnum));
+! static int skip_label __ARGS((linenr_T, char_u **pp, int ind_maxcomment));
+ static int cin_first_id_amount __ARGS((void));
+ static int cin_get_equal_amount __ARGS((linenr_T lnum));
+ static int cin_ispreproc __ARGS((char_u *));
+--- 5320,5326 ----
+ static int cin_isdefault __ARGS((char_u *));
+ static char_u *after_label __ARGS((char_u *l));
+ static int get_indent_nolabel __ARGS((linenr_T lnum));
+! static int skip_label __ARGS((linenr_T, char_u **pp));
+ static int cin_first_id_amount __ARGS((void));
+ static int cin_get_equal_amount __ARGS((linenr_T lnum));
+ static int cin_ispreproc __ARGS((char_u *));
+***************
+*** 5322,5345 ****
+ static int cin_islinecomment __ARGS((char_u *));
+ static int cin_isterminated __ARGS((char_u *, int, int));
+ static int cin_isinit __ARGS((void));
+! static int cin_isfuncdecl __ARGS((char_u **, linenr_T, linenr_T, int, int));
+ static int cin_isif __ARGS((char_u *));
+ static int cin_iselse __ARGS((char_u *));
+ static int cin_isdo __ARGS((char_u *));
+! static int cin_iswhileofdo __ARGS((char_u *, linenr_T, int));
+ static int cin_is_if_for_while_before_offset __ARGS((char_u *line, int *poffset));
+! static int cin_iswhileofdo_end __ARGS((int terminated, int ind_maxparen, int ind_maxcomment));
+ static int cin_isbreak __ARGS((char_u *));
+ static int cin_is_cpp_baseclass __ARGS((colnr_T *col));
+! static int get_baseclass_amount __ARGS((int col, int ind_maxparen, int ind_maxcomment, int ind_cpp_baseclass));
+ static int cin_ends_in __ARGS((char_u *, char_u *, char_u *));
+ static int cin_starts_with __ARGS((char_u *s, char *word));
+ static int cin_skip2pos __ARGS((pos_T *trypos));
+! static pos_T *find_start_brace __ARGS((int));
+! static pos_T *find_match_paren __ARGS((int, int));
+! static int corr_ind_maxparen __ARGS((int ind_maxparen, pos_T *startpos));
+ static int find_last_paren __ARGS((char_u *l, int start, int end));
+! static int find_match __ARGS((int lookfor, linenr_T ourscope, int ind_maxparen, int ind_maxcomment));
+ static int cin_is_cpp_namespace __ARGS((char_u *));
+
+ /*
+--- 5329,5352 ----
+ static int cin_islinecomment __ARGS((char_u *));
+ static int cin_isterminated __ARGS((char_u *, int, int));
+ static int cin_isinit __ARGS((void));
+! static int cin_isfuncdecl __ARGS((char_u **, linenr_T, linenr_T));
+ static int cin_isif __ARGS((char_u *));
+ static int cin_iselse __ARGS((char_u *));
+ static int cin_isdo __ARGS((char_u *));
+! static int cin_iswhileofdo __ARGS((char_u *, linenr_T));
+ static int cin_is_if_for_while_before_offset __ARGS((char_u *line, int *poffset));
+! static int cin_iswhileofdo_end __ARGS((int terminated));
+ static int cin_isbreak __ARGS((char_u *));
+ static int cin_is_cpp_baseclass __ARGS((colnr_T *col));
+! static int get_baseclass_amount __ARGS((int col));
+ static int cin_ends_in __ARGS((char_u *, char_u *, char_u *));
+ static int cin_starts_with __ARGS((char_u *s, char *word));
+ static int cin_skip2pos __ARGS((pos_T *trypos));
+! static pos_T *find_start_brace __ARGS((void));
+! static pos_T *find_match_paren __ARGS((int));
+! static int corr_ind_maxparen __ARGS((pos_T *startpos));
+ static int find_last_paren __ARGS((char_u *l, int start, int end));
+! static int find_match __ARGS((int lookfor, linenr_T ourscope));
+ static int cin_is_cpp_namespace __ARGS((char_u *));
+
+ /*
+***************
+*** 5444,5451 ****
+ * Note: curwin->w_cursor must be where we are looking for the label.
+ */
+ int
+! cin_islabel(ind_maxcomment) /* XXX */
+! int ind_maxcomment;
+ {
+ char_u *s;
+
+--- 5451,5457 ----
+ * Note: curwin->w_cursor must be where we are looking for the label.
+ */
+ int
+! cin_islabel() /* XXX */
+ {
+ char_u *s;
+
+***************
+*** 5479,5485 ****
+ * If we're in a comment now, skip to the start of the comment.
+ */
+ curwin->w_cursor.col = 0;
+! if ((trypos = find_start_comment(ind_maxcomment)) != NULL) /* XXX */
+ curwin->w_cursor = *trypos;
+
+ line = ml_get_curline();
+--- 5485,5491 ----
+ * If we're in a comment now, skip to the start of the comment.
+ */
+ curwin->w_cursor.col = 0;
+! if ((trypos = ind_find_start_comment()) != NULL) /* XXX */
+ curwin->w_cursor = *trypos;
+
+ line = ml_get_curline();
+***************
+*** 5725,5734 ****
+ * ^
+ */
+ static int
+! skip_label(lnum, pp, ind_maxcomment)
+ linenr_T lnum;
+ char_u **pp;
+- int ind_maxcomment;
+ {
+ char_u *l;
+ int amount;
+--- 5731,5739 ----
+ * ^
+ */
+ static int
+! skip_label(lnum, pp)
+ linenr_T lnum;
+ char_u **pp;
+ {
+ char_u *l;
+ int amount;
+***************
+*** 5738,5745 ****
+ curwin->w_cursor.lnum = lnum;
+ l = ml_get_curline();
+ /* XXX */
+! if (cin_iscase(l, FALSE) || cin_isscopedecl(l)
+! || cin_islabel(ind_maxcomment))
+ {
+ amount = get_indent_nolabel(lnum);
+ l = after_label(ml_get_curline());
+--- 5743,5749 ----
+ curwin->w_cursor.lnum = lnum;
+ l = ml_get_curline();
+ /* XXX */
+! if (cin_iscase(l, FALSE) || cin_isscopedecl(l) || cin_islabel())
+ {
+ amount = get_indent_nolabel(lnum);
+ l = after_label(ml_get_curline());
+***************
+*** 5983,5994 ****
+ * "min_lnum" is the line before which we will not be looking.
+ */
+ static int
+! cin_isfuncdecl(sp, first_lnum, min_lnum, ind_maxparen, ind_maxcomment)
+ char_u **sp;
+ linenr_T first_lnum;
+ linenr_T min_lnum;
+- int ind_maxparen;
+- int ind_maxcomment;
+ {
+ char_u *s;
+ linenr_T lnum = first_lnum;
+--- 5987,5996 ----
+ * "min_lnum" is the line before which we will not be looking.
+ */
+ static int
+! cin_isfuncdecl(sp, first_lnum, min_lnum)
+ char_u **sp;
+ linenr_T first_lnum;
+ linenr_T min_lnum;
+ {
+ char_u *s;
+ linenr_T lnum = first_lnum;
+***************
+*** 6002,6008 ****
+ s = *sp;
+
+ if (find_last_paren(s, '(', ')')
+! && (trypos = find_match_paren(ind_maxparen, ind_maxcomment)) != NULL)
+ {
+ lnum = trypos->lnum;
+ if (lnum < min_lnum)
+--- 6004,6010 ----
+ s = *sp;
+
+ if (find_last_paren(s, '(', ')')
+! && (trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL)
+ {
+ lnum = trypos->lnum;
+ if (lnum < min_lnum)
+***************
+*** 6110,6119 ****
+ * ')' and ';'. The condition may be spread over several lines.
+ */
+ static int
+! cin_iswhileofdo(p, lnum, ind_maxparen) /* XXX */
+ char_u *p;
+ linenr_T lnum;
+- int ind_maxparen;
+ {
+ pos_T cursor_save;
+ pos_T *trypos;
+--- 6112,6120 ----
+ * ')' and ';'. The condition may be spread over several lines.
+ */
+ static int
+! cin_iswhileofdo(p, lnum) /* XXX */
+ char_u *p;
+ linenr_T lnum;
+ {
+ pos_T cursor_save;
+ pos_T *trypos;
+***************
+*** 6133,6139 ****
+ ++p;
+ ++curwin->w_cursor.col;
+ }
+! if ((trypos = findmatchlimit(NULL, 0, 0, ind_maxparen)) != NULL
+ && *cin_skipcomment(ml_get_pos(trypos) + 1) == ';')
+ retval = TRUE;
+ curwin->w_cursor = cursor_save;
+--- 6134,6141 ----
+ ++p;
+ ++curwin->w_cursor.col;
+ }
+! if ((trypos = findmatchlimit(NULL, 0, 0,
+! curbuf->b_ind_maxparen)) != NULL
+ && *cin_skipcomment(ml_get_pos(trypos) + 1) == ';')
+ retval = TRUE;
+ curwin->w_cursor = cursor_save;
+***************
+*** 6196,6205 ****
+ * Adjust the cursor to the line with "while".
+ */
+ static int
+! cin_iswhileofdo_end(terminated, ind_maxparen, ind_maxcomment)
+ int terminated;
+- int ind_maxparen;
+- int ind_maxcomment;
+ {
+ char_u *line;
+ char_u *p;
+--- 6198,6205 ----
+ * Adjust the cursor to the line with "while".
+ */
+ static int
+! cin_iswhileofdo_end(terminated)
+ int terminated;
+ {
+ char_u *line;
+ char_u *p;
+***************
+*** 6223,6229 ****
+ * before the matching '('. XXX */
+ i = (int)(p - line);
+ curwin->w_cursor.col = i;
+! trypos = find_match_paren(ind_maxparen, ind_maxcomment);
+ if (trypos != NULL)
+ {
+ s = cin_skipcomment(ml_get(trypos->lnum));
+--- 6223,6229 ----
+ * before the matching '('. XXX */
+ i = (int)(p - line);
+ curwin->w_cursor.col = i;
+! trypos = find_match_paren(curbuf->b_ind_maxparen);
+ if (trypos != NULL)
+ {
+ s = cin_skipcomment(ml_get(trypos->lnum));
+***************
+*** 6415,6425 ****
+ }
+
+ static int
+! get_baseclass_amount(col, ind_maxparen, ind_maxcomment, ind_cpp_baseclass)
+ int col;
+- int ind_maxparen;
+- int ind_maxcomment;
+- int ind_cpp_baseclass;
+ {
+ int amount;
+ colnr_T vcol;
+--- 6415,6422 ----
+ }
+
+ static int
+! get_baseclass_amount(col)
+ int col;
+ {
+ int amount;
+ colnr_T vcol;
+***************
+*** 6429,6439 ****
+ {
+ amount = get_indent();
+ if (find_last_paren(ml_get_curline(), '(', ')')
+! && (trypos = find_match_paren(ind_maxparen,
+! ind_maxcomment)) != NULL)
+ amount = get_indent_lnum(trypos->lnum); /* XXX */
+ if (!cin_ends_in(ml_get_curline(), (char_u *)",", NULL))
+! amount += ind_cpp_baseclass;
+ }
+ else
+ {
+--- 6426,6435 ----
+ {
+ amount = get_indent();
+ if (find_last_paren(ml_get_curline(), '(', ')')
+! && (trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL)
+ amount = get_indent_lnum(trypos->lnum); /* XXX */
+ if (!cin_ends_in(ml_get_curline(), (char_u *)",", NULL))
+! amount += curbuf->b_ind_cpp_baseclass;
+ }
+ else
+ {
+***************
+*** 6441,6448 ****
+ getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL);
+ amount = (int)vcol;
+ }
+! if (amount < ind_cpp_baseclass)
+! amount = ind_cpp_baseclass;
+ return amount;
+ }
+
+--- 6437,6444 ----
+ getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL);
+ amount = (int)vcol;
+ }
+! if (amount < curbuf->b_ind_cpp_baseclass)
+! amount = curbuf->b_ind_cpp_baseclass;
+ return amount;
+ }
+
+***************
+*** 6526,6533 ****
+ /* } */
+
+ static pos_T *
+! find_start_brace(ind_maxcomment) /* XXX */
+! int ind_maxcomment;
+ {
+ pos_T cursor_save;
+ pos_T *trypos;
+--- 6522,6528 ----
+ /* } */
+
+ static pos_T *
+! find_start_brace() /* XXX */
+ {
+ pos_T cursor_save;
+ pos_T *trypos;
+***************
+*** 6543,6549 ****
+ pos = NULL;
+ /* ignore the { if it's in a // or / * * / comment */
+ if ((colnr_T)cin_skip2pos(trypos) == trypos->col
+! && (pos = find_start_comment(ind_maxcomment)) == NULL) /* XXX */
+ break;
+ if (pos != NULL)
+ curwin->w_cursor.lnum = pos->lnum;
+--- 6538,6544 ----
+ pos = NULL;
+ /* ignore the { if it's in a // or / * * / comment */
+ if ((colnr_T)cin_skip2pos(trypos) == trypos->col
+! && (pos = ind_find_start_comment()) == NULL) /* XXX */
+ break;
+ if (pos != NULL)
+ curwin->w_cursor.lnum = pos->lnum;
+***************
+*** 6557,6565 ****
+ * Return NULL if no match found.
+ */
+ static pos_T *
+! find_match_paren(ind_maxparen, ind_maxcomment) /* XXX */
+ int ind_maxparen;
+- int ind_maxcomment;
+ {
+ pos_T cursor_save;
+ pos_T *trypos;
+--- 6552,6559 ----
+ * Return NULL if no match found.
+ */
+ static pos_T *
+! find_match_paren(ind_maxparen) /* XXX */
+ int ind_maxparen;
+ {
+ pos_T cursor_save;
+ pos_T *trypos;
+***************
+*** 6576,6582 ****
+ pos_copy = *trypos; /* copy trypos, findmatch will change it */
+ trypos = &pos_copy;
+ curwin->w_cursor = *trypos;
+! if (find_start_comment(ind_maxcomment) != NULL) /* XXX */
+ trypos = NULL;
+ }
+ }
+--- 6570,6576 ----
+ pos_copy = *trypos; /* copy trypos, findmatch will change it */
+ trypos = &pos_copy;
+ curwin->w_cursor = *trypos;
+! if (ind_find_start_comment() != NULL) /* XXX */
+ trypos = NULL;
+ }
+ }
+***************
+*** 6591,6605 ****
+ * looking a few lines further.
+ */
+ static int
+! corr_ind_maxparen(ind_maxparen, startpos)
+! int ind_maxparen;
+ pos_T *startpos;
+ {
+ long n = (long)startpos->lnum - (long)curwin->w_cursor.lnum;
+
+! if (n > 0 && n < ind_maxparen / 2)
+! return ind_maxparen - (int)n;
+! return ind_maxparen;
+ }
+
+ /*
+--- 6585,6598 ----
+ * looking a few lines further.
+ */
+ static int
+! corr_ind_maxparen(startpos)
+ pos_T *startpos;
+ {
+ long n = (long)startpos->lnum - (long)curwin->w_cursor.lnum;
+
+! if (n > 0 && n < curbuf->b_ind_maxparen / 2)
+! return curbuf->b_ind_maxparen - (int)n;
+! return curbuf->b_ind_maxparen;
+ }
+
+ /*
+***************
+*** 6937,6943 ****
+
+ curwin->w_cursor.col = 0;
+
+! original_line_islabel = cin_islabel(curbuf->b_ind_maxcomment); /* XXX */
+
+ /*
+ * #defines and so on always go at the left when included in 'cinkeys'.
+--- 6930,6936 ----
+
+ curwin->w_cursor.col = 0;
+
+! original_line_islabel = cin_islabel(); /* XXX */
+
+ /*
+ * #defines and so on always go at the left when included in 'cinkeys'.
+***************
+*** 6973,6979 ****
+ * comment, try using the 'comments' option.
+ */
+ else if (!cin_iscomment(theline)
+! && (trypos = find_start_comment(curbuf->b_ind_maxcomment)) != NULL)
+ /* XXX */
+ {
+ int lead_start_len = 2;
+--- 6966,6972 ----
+ * comment, try using the 'comments' option.
+ */
+ else if (!cin_iscomment(theline)
+! && (trypos = ind_find_start_comment()) != NULL)
+ /* XXX */
+ {
+ int lead_start_len = 2;
+***************
+*** 7126,7136 ****
+ /*
+ * Are we inside parentheses or braces?
+ */ /* XXX */
+! else if (((trypos = find_match_paren(curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment)) != NULL
+ && curbuf->b_ind_java == 0)
+! || (tryposBrace =
+! find_start_brace(curbuf->b_ind_maxcomment)) != NULL
+ || trypos != NULL)
+ {
+ if (trypos != NULL && tryposBrace != NULL)
+--- 7119,7127 ----
+ /*
+ * Are we inside parentheses or braces?
+ */ /* XXX */
+! else if (((trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL
+ && curbuf->b_ind_java == 0)
+! || (tryposBrace = find_start_brace()) != NULL
+ || trypos != NULL)
+ {
+ if (trypos != NULL && tryposBrace != NULL)
+***************
+*** 7170,7177 ****
+ curwin->w_cursor.lnum = lnum;
+
+ /* Skip a comment. XXX */
+! if ((trypos = find_start_comment(curbuf->b_ind_maxcomment))
+! != NULL)
+ {
+ lnum = trypos->lnum + 1;
+ continue;
+--- 7161,7167 ----
+ curwin->w_cursor.lnum = lnum;
+
+ /* Skip a comment. XXX */
+! if ((trypos = ind_find_start_comment()) != NULL)
+ {
+ lnum = trypos->lnum + 1;
+ continue;
+***************
+*** 7179,7186 ****
+
+ /* XXX */
+ if ((trypos = find_match_paren(
+! corr_ind_maxparen(curbuf->b_ind_maxparen, &cur_curpos),
+! curbuf->b_ind_maxcomment)) != NULL
+ && trypos->lnum == our_paren_pos.lnum
+ && trypos->col == our_paren_pos.col)
+ {
+--- 7169,7175 ----
+
+ /* XXX */
+ if ((trypos = find_match_paren(
+! corr_ind_maxparen(&cur_curpos))) != NULL
+ && trypos->lnum == our_paren_pos.lnum
+ && trypos->col == our_paren_pos.col)
+ {
+***************
+*** 7223,7230 ****
+ curwin->w_cursor.lnum = outermost.lnum;
+ curwin->w_cursor.col = outermost.col;
+
+! trypos = find_match_paren(curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment);
+ } while (trypos && trypos->lnum == outermost.lnum);
+
+ curwin->w_cursor = cursor_save;
+--- 7212,7218 ----
+ curwin->w_cursor.lnum = outermost.lnum;
+ curwin->w_cursor.col = outermost.col;
+
+! trypos = find_match_paren(curbuf->b_ind_maxparen);
+ } while (trypos && trypos->lnum == outermost.lnum);
+
+ curwin->w_cursor = cursor_save;
+***************
+*** 7235,7242 ****
+ cin_is_if_for_while_before_offset(line, &outermost.col);
+ }
+
+! amount = skip_label(our_paren_pos.lnum, &look,
+! curbuf->b_ind_maxcomment);
+ look = skipwhite(look);
+ if (*look == '(')
+ {
+--- 7223,7229 ----
+ cin_is_if_for_while_before_offset(line, &outermost.col);
+ }
+
+! amount = skip_label(our_paren_pos.lnum, &look);
+ look = skipwhite(look);
+ if (*look == '(')
+ {
+***************
+*** 7366,7373 ****
+ {
+ curwin->w_cursor.lnum = our_paren_pos.lnum;
+ curwin->w_cursor.col = col;
+! if (find_match_paren(curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment) != NULL)
+ amount += curbuf->b_ind_unclosed2;
+ else
+ {
+--- 7353,7359 ----
+ {
+ curwin->w_cursor.lnum = our_paren_pos.lnum;
+ curwin->w_cursor.col = col;
+! if (find_match_paren(curbuf->b_ind_maxparen) != NULL)
+ amount += curbuf->b_ind_unclosed2;
+ else
+ {
+***************
+*** 7435,7442 ****
+ */
+ lnum = ourscope;
+ if (find_last_paren(start, '(', ')')
+! && (trypos = find_match_paren(curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment)) != NULL)
+ lnum = trypos->lnum;
+
+ /*
+--- 7421,7428 ----
+ */
+ lnum = ourscope;
+ if (find_last_paren(start, '(', ')')
+! && (trypos = find_match_paren(curbuf->b_ind_maxparen))
+! != NULL)
+ lnum = trypos->lnum;
+
+ /*
+***************
+*** 7449,7455 ****
+ && cin_iscase(skipwhite(ml_get_curline()), FALSE)))
+ amount = get_indent();
+ else
+! amount = skip_label(lnum, &l, curbuf->b_ind_maxcomment);
+
+ start_brace = BRACE_AT_END;
+ }
+--- 7435,7441 ----
+ && cin_iscase(skipwhite(ml_get_curline()), FALSE)))
+ amount = get_indent();
+ else
+! amount = skip_label(lnum, &l);
+
+ start_brace = BRACE_AT_END;
+ }
+***************
+*** 7478,7491 ****
+ lookfor = LOOKFOR_INITIAL;
+ if (cin_iselse(theline))
+ lookfor = LOOKFOR_IF;
+! else if (cin_iswhileofdo(theline, cur_curpos.lnum,
+! curbuf->b_ind_maxparen)) /* XXX */
+ lookfor = LOOKFOR_DO;
+ if (lookfor != LOOKFOR_INITIAL)
+ {
+ curwin->w_cursor.lnum = cur_curpos.lnum;
+! if (find_match(lookfor, ourscope, curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment) == OK)
+ {
+ amount = get_indent(); /* XXX */
+ goto theend;
+--- 7464,7475 ----
+ lookfor = LOOKFOR_INITIAL;
+ if (cin_iselse(theline))
+ lookfor = LOOKFOR_IF;
+! else if (cin_iswhileofdo(theline, cur_curpos.lnum)) /* XXX */
+ lookfor = LOOKFOR_DO;
+ if (lookfor != LOOKFOR_INITIAL)
+ {
+ curwin->w_cursor.lnum = cur_curpos.lnum;
+! if (find_match(lookfor, ourscope) == OK)
+ {
+ amount = get_indent(); /* XXX */
+ goto theend;
+***************
+*** 7611,7617 ****
+ * If we're in a comment now, skip to the start of the
+ * comment.
+ */
+! trypos = find_start_comment(curbuf->b_ind_maxcomment);
+ if (trypos != NULL)
+ {
+ curwin->w_cursor.lnum = trypos->lnum + 1;
+--- 7595,7601 ----
+ * If we're in a comment now, skip to the start of the
+ * comment.
+ */
+! trypos = ind_find_start_comment();
+ if (trypos != NULL)
+ {
+ curwin->w_cursor.lnum = trypos->lnum + 1;
+***************
+*** 7636,7644 ****
+ * (it's a variable declaration).
+ */
+ if (start_brace != BRACE_IN_COL0
+! || !cin_isfuncdecl(&l, curwin->w_cursor.lnum,
+! 0, curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment))
+ {
+ /* if the line is terminated with another ','
+ * it is a continued variable initialization.
+--- 7620,7626 ----
+ * (it's a variable declaration).
+ */
+ if (start_brace != BRACE_IN_COL0
+! || !cin_isfuncdecl(&l, curwin->w_cursor.lnum, 0))
+ {
+ /* if the line is terminated with another ','
+ * it is a continued variable initialization.
+***************
+*** 7670,7681 ****
+ trypos = NULL;
+ if (find_last_paren(l, '(', ')'))
+ trypos = find_match_paren(
+! curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment);
+
+ if (trypos == NULL && find_last_paren(l, '{', '}'))
+! trypos = find_start_brace(
+! curbuf->b_ind_maxcomment);
+
+ if (trypos != NULL)
+ {
+--- 7652,7661 ----
+ trypos = NULL;
+ if (find_last_paren(l, '(', ')'))
+ trypos = find_match_paren(
+! curbuf->b_ind_maxparen);
+
+ if (trypos == NULL && find_last_paren(l, '{', '}'))
+! trypos = find_start_brace();
+
+ if (trypos != NULL)
+ {
+***************
+*** 7733,7740 ****
+
+ /* If we're in a comment now, skip to the start of
+ * the comment. */
+! trypos = find_start_comment(
+! curbuf->b_ind_maxcomment);
+ if (trypos != NULL)
+ {
+ curwin->w_cursor.lnum = trypos->lnum + 1;
+--- 7713,7719 ----
+
+ /* If we're in a comment now, skip to the start of
+ * the comment. */
+! trypos = ind_find_start_comment();
+ if (trypos != NULL)
+ {
+ curwin->w_cursor.lnum = trypos->lnum + 1;
+***************
+*** 7764,7771 ****
+ /*
+ * If we're in a comment now, skip to the start of the comment.
+ */ /* XXX */
+! if ((trypos = find_start_comment(curbuf->b_ind_maxcomment))
+! != NULL)
+ {
+ curwin->w_cursor.lnum = trypos->lnum + 1;
+ curwin->w_cursor.col = 0;
+--- 7743,7749 ----
+ /*
+ * If we're in a comment now, skip to the start of the comment.
+ */ /* XXX */
+! if ((trypos = ind_find_start_comment()) != NULL)
+ {
+ curwin->w_cursor.lnum = trypos->lnum + 1;
+ curwin->w_cursor.col = 0;
+***************
+*** 7819,7826 ****
+ * Check that this case label is not for another
+ * switch()
+ */ /* XXX */
+! if ((trypos = find_start_brace(
+! curbuf->b_ind_maxcomment)) == NULL
+ || trypos->lnum == ourscope)
+ {
+ amount = get_indent(); /* XXX */
+--- 7797,7803 ----
+ * Check that this case label is not for another
+ * switch()
+ */ /* XXX */
+! if ((trypos = find_start_brace()) == NULL
+ || trypos->lnum == ourscope)
+ {
+ amount = get_indent(); /* XXX */
+***************
+*** 7894,7901 ****
+ */
+ if (lookfor == LOOKFOR_CASE || lookfor == LOOKFOR_SCOPEDECL)
+ {
+! if (find_last_paren(l, '{', '}') && (trypos =
+! find_start_brace(curbuf->b_ind_maxcomment)) != NULL)
+ {
+ curwin->w_cursor.lnum = trypos->lnum + 1;
+ curwin->w_cursor.col = 0;
+--- 7871,7878 ----
+ */
+ if (lookfor == LOOKFOR_CASE || lookfor == LOOKFOR_SCOPEDECL)
+ {
+! if (find_last_paren(l, '{', '}')
+! && (trypos = find_start_brace()) != NULL)
+ {
+ curwin->w_cursor.lnum = trypos->lnum + 1;
+ curwin->w_cursor.col = 0;
+***************
+*** 7906,7912 ****
+ /*
+ * Ignore jump labels with nothing after them.
+ */
+! if (!curbuf->b_ind_js && cin_islabel(curbuf->b_ind_maxcomment))
+ {
+ l = after_label(ml_get_curline());
+ if (l == NULL || cin_nocode(l))
+--- 7883,7889 ----
+ /*
+ * Ignore jump labels with nothing after them.
+ */
+! if (!curbuf->b_ind_js && cin_islabel())
+ {
+ l = after_label(ml_get_curline());
+ if (l == NULL || cin_nocode(l))
+***************
+*** 7952,7961 ****
+ }
+ else
+ /* XXX */
+! amount = get_baseclass_amount(col,
+! curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment,
+! curbuf->b_ind_cpp_baseclass);
+ break;
+ }
+ else if (lookfor == LOOKFOR_CPP_BASECLASS)
+--- 7929,7935 ----
+ }
+ else
+ /* XXX */
+! amount = get_baseclass_amount(col);
+ break;
+ }
+ else if (lookfor == LOOKFOR_CPP_BASECLASS)
+***************
+*** 7997,8005 ****
+ * matching it will take us back to the start of the line.
+ */
+ (void)find_last_paren(l, '(', ')');
+! trypos = find_match_paren(
+! corr_ind_maxparen(curbuf->b_ind_maxparen,
+! &cur_curpos), curbuf->b_ind_maxcomment);
+
+ /*
+ * If we are looking for ',', we also look for matching
+--- 7971,7977 ----
+ * matching it will take us back to the start of the line.
+ */
+ (void)find_last_paren(l, '(', ')');
+! trypos = find_match_paren(corr_ind_maxparen(&cur_curpos));
+
+ /*
+ * If we are looking for ',', we also look for matching
+***************
+*** 8007,8013 ****
+ */
+ if (trypos == NULL && terminated == ','
+ && find_last_paren(l, '{', '}'))
+! trypos = find_start_brace(curbuf->b_ind_maxcomment);
+
+ if (trypos != NULL)
+ {
+--- 7979,7985 ----
+ */
+ if (trypos == NULL && terminated == ','
+ && find_last_paren(l, '{', '}'))
+! trypos = find_start_brace();
+
+ if (trypos != NULL)
+ {
+***************
+*** 8051,8058 ****
+ * ignoring any jump label. XXX
+ */
+ if (!curbuf->b_ind_js)
+! cur_amount = skip_label(curwin->w_cursor.lnum,
+! &l, curbuf->b_ind_maxcomment);
+ else
+ cur_amount = get_indent();
+ /*
+--- 8023,8029 ----
+ * ignoring any jump label. XXX
+ */
+ if (!curbuf->b_ind_js)
+! cur_amount = skip_label(curwin->w_cursor.lnum, &l);
+ else
+ cur_amount = get_indent();
+ /*
+***************
+*** 8162,8172 ****
+ curwin->w_cursor.col =
+ (colnr_T)(l - ml_get_curline()) + 1;
+
+! if ((trypos = find_start_brace(
+! curbuf->b_ind_maxcomment)) == NULL
+! || find_match(LOOKFOR_IF, trypos->lnum,
+! curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment) == FAIL)
+ break;
+ }
+ }
+--- 8133,8141 ----
+ curwin->w_cursor.col =
+ (colnr_T)(l - ml_get_curline()) + 1;
+
+! if ((trypos = find_start_brace()) == NULL
+! || find_match(LOOKFOR_IF, trypos->lnum)
+! == FAIL)
+ break;
+ }
+ }
+***************
+*** 8261,8268 ****
+ * If so: Ignore until the matching "do".
+ */
+ /* XXX */
+! else if (cin_iswhileofdo_end(terminated, curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment))
+ {
+ /*
+ * Found an unterminated line after a while ();, line up
+--- 8230,8236 ----
+ * If so: Ignore until the matching "do".
+ */
+ /* XXX */
+! else if (cin_iswhileofdo_end(terminated))
+ {
+ /*
+ * Found an unterminated line after a while ();, line up
+***************
+*** 8380,8387 ****
+ l = ml_get_curline();
+ if (find_last_paren(l, '(', ')')
+ && (trypos = find_match_paren(
+! curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment)) != NULL)
+ {
+ /*
+ * Check if we are on a case label now. This is
+--- 8348,8354 ----
+ l = ml_get_curline();
+ if (find_last_paren(l, '(', ')')
+ && (trypos = find_match_paren(
+! curbuf->b_ind_maxparen)) != NULL)
+ {
+ /*
+ * Check if we are on a case label now. This is
+***************
+*** 8415,8422 ****
+ * Get indent and pointer to text for current line,
+ * ignoring any jump label.
+ */
+! amount = skip_label(curwin->w_cursor.lnum,
+! &l, curbuf->b_ind_maxcomment);
+
+ if (theline[0] == '{')
+ amount += curbuf->b_ind_open_extra;
+--- 8382,8388 ----
+ * Get indent and pointer to text for current line,
+ * ignoring any jump label.
+ */
+! amount = skip_label(curwin->w_cursor.lnum, &l);
+
+ if (theline[0] == '{')
+ amount += curbuf->b_ind_open_extra;
+***************
+*** 8439,8449 ****
+ && cin_iselse(l)
+ && whilelevel == 0)
+ {
+! if ((trypos = find_start_brace(
+! curbuf->b_ind_maxcomment)) == NULL
+! || find_match(LOOKFOR_IF, trypos->lnum,
+! curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment) == FAIL)
+ break;
+ continue;
+ }
+--- 8405,8413 ----
+ && cin_iselse(l)
+ && whilelevel == 0)
+ {
+! if ((trypos = find_start_brace()) == NULL
+! || find_match(LOOKFOR_IF, trypos->lnum)
+! == FAIL)
+ break;
+ continue;
+ }
+***************
+*** 8453,8461 ****
+ * that block.
+ */
+ l = ml_get_curline();
+! if (find_last_paren(l, '{', '}')
+! && (trypos = find_start_brace(
+! curbuf->b_ind_maxcomment)) != NULL) /* XXX */
+ {
+ curwin->w_cursor = *trypos;
+ /* if not "else {" check for terminated again */
+--- 8417,8424 ----
+ * that block.
+ */
+ l = ml_get_curline();
+! if (find_last_paren(l, '{', '}') /* XXX */
+! && (trypos = find_start_brace()) != NULL)
+ {
+ curwin->w_cursor = *trypos;
+ /* if not "else {" check for terminated again */
+***************
+*** 8516,8524 ****
+ && !cin_ends_in(theline, (char_u *)":", NULL)
+ && !cin_ends_in(theline, (char_u *)",", NULL)
+ && cin_isfuncdecl(NULL, cur_curpos.lnum + 1,
+! cur_curpos.lnum + 1,
+! curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment)
+ && !cin_isterminated(theline, FALSE, TRUE))
+ {
+ amount = curbuf->b_ind_func_type;
+--- 8479,8485 ----
+ && !cin_ends_in(theline, (char_u *)":", NULL)
+ && !cin_ends_in(theline, (char_u *)",", NULL)
+ && cin_isfuncdecl(NULL, cur_curpos.lnum + 1,
+! cur_curpos.lnum + 1)
+ && !cin_isterminated(theline, FALSE, TRUE))
+ {
+ amount = curbuf->b_ind_func_type;
+***************
+*** 8540,8547 ****
+ /*
+ * If we're in a comment now, skip to the start of the comment.
+ */ /* XXX */
+! if ((trypos = find_start_comment(
+! curbuf->b_ind_maxcomment)) != NULL)
+ {
+ curwin->w_cursor.lnum = trypos->lnum + 1;
+ curwin->w_cursor.col = 0;
+--- 8501,8507 ----
+ /*
+ * If we're in a comment now, skip to the start of the comment.
+ */ /* XXX */
+! if ((trypos = ind_find_start_comment()) != NULL)
+ {
+ curwin->w_cursor.lnum = trypos->lnum + 1;
+ curwin->w_cursor.col = 0;
+***************
+*** 8561,8569 ****
+ if (n)
+ {
+ /* XXX */
+! amount = get_baseclass_amount(col, curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment,
+! curbuf->b_ind_cpp_baseclass);
+ break;
+ }
+
+--- 8521,8527 ----
+ if (n)
+ {
+ /* XXX */
+! amount = get_baseclass_amount(col);
+ break;
+ }
+
+***************
+*** 8595,8602 ****
+ /* take us back to opening paren */
+ if (find_last_paren(l, '(', ')')
+ && (trypos = find_match_paren(
+! curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment)) != NULL)
+ curwin->w_cursor = *trypos;
+
+ /* For a line ending in ',' that is a continuation line go
+--- 8553,8559 ----
+ /* take us back to opening paren */
+ if (find_last_paren(l, '(', ')')
+ && (trypos = find_match_paren(
+! curbuf->b_ind_maxparen)) != NULL)
+ curwin->w_cursor = *trypos;
+
+ /* For a line ending in ',' that is a continuation line go
+***************
+*** 8627,8635 ****
+ * If the line looks like a function declaration, and we're
+ * not in a comment, put it the left margin.
+ */
+! if (cin_isfuncdecl(NULL, cur_curpos.lnum, 0,
+! curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment)) /* XXX */
+ break;
+ l = ml_get_curline();
+
+--- 8584,8590 ----
+ * If the line looks like a function declaration, and we're
+ * not in a comment, put it the left margin.
+ */
+! if (cin_isfuncdecl(NULL, cur_curpos.lnum, 0)) /* XXX */
+ break;
+ l = ml_get_curline();
+
+***************
+*** 8677,8685 ****
+ * line (and the ones that follow) needs to be indented as
+ * parameters.
+ */
+! if (cin_isfuncdecl(&l, curwin->w_cursor.lnum, 0,
+! curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment))
+ {
+ amount = curbuf->b_ind_param;
+ break;
+--- 8632,8638 ----
+ * line (and the ones that follow) needs to be indented as
+ * parameters.
+ */
+! if (cin_isfuncdecl(&l, curwin->w_cursor.lnum, 0))
+ {
+ amount = curbuf->b_ind_param;
+ break;
+***************
+*** 8710,8717 ****
+ */
+ find_last_paren(l, '(', ')');
+
+! if ((trypos = find_match_paren(curbuf->b_ind_maxparen,
+! curbuf->b_ind_maxcomment)) != NULL)
+ curwin->w_cursor = *trypos;
+ amount = get_indent(); /* XXX */
+ break;
+--- 8663,8669 ----
+ */
+ find_last_paren(l, '(', ')');
+
+! if ((trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL)
+ curwin->w_cursor = *trypos;
+ amount = get_indent(); /* XXX */
+ break;
+***************
+*** 8754,8764 ****
+ }
+
+ static int
+! find_match(lookfor, ourscope, ind_maxparen, ind_maxcomment)
+ int lookfor;
+ linenr_T ourscope;
+- int ind_maxparen;
+- int ind_maxcomment;
+ {
+ char_u *look;
+ pos_T *theirscope;
+--- 8706,8714 ----
+ }
+
+ static int
+! find_match(lookfor, ourscope)
+ int lookfor;
+ linenr_T ourscope;
+ {
+ char_u *look;
+ pos_T *theirscope;
+***************
+*** 8788,8800 ****
+ if (cin_iselse(look)
+ || cin_isif(look)
+ || cin_isdo(look) /* XXX */
+! || cin_iswhileofdo(look, curwin->w_cursor.lnum, ind_maxparen))
+ {
+ /*
+ * if we've gone outside the braces entirely,
+ * we must be out of scope...
+ */
+! theirscope = find_start_brace(ind_maxcomment); /* XXX */
+ if (theirscope == NULL)
+ break;
+
+--- 8738,8750 ----
+ if (cin_iselse(look)
+ || cin_isif(look)
+ || cin_isdo(look) /* XXX */
+! || cin_iswhileofdo(look, curwin->w_cursor.lnum))
+ {
+ /*
+ * if we've gone outside the braces entirely,
+ * we must be out of scope...
+ */
+! theirscope = find_start_brace(); /* XXX */
+ if (theirscope == NULL)
+ break;
+
+***************
+*** 8832,8838 ****
+ * if it was a "while" then we need to go back to
+ * another "do", so increment whilelevel. XXX
+ */
+! if (cin_iswhileofdo(look, curwin->w_cursor.lnum, ind_maxparen))
+ {
+ ++whilelevel;
+ continue;
+--- 8782,8788 ----
+ * if it was a "while" then we need to go back to
+ * another "do", so increment whilelevel. XXX
+ */
+! if (cin_iswhileofdo(look, curwin->w_cursor.lnum))
+ {
+ ++whilelevel;
+ continue;
+*** ../vim-7.4.070/src/proto/misc1.pro 2013-11-05 07:12:59.000000000 +0100
+--- src/proto/misc1.pro 2013-11-06 03:19:45.000000000 +0100
+***************
+*** 81,87 ****
+ char_u *FullName_save __ARGS((char_u *fname, int force));
+ pos_T *find_start_comment __ARGS((int ind_maxcomment));
+ void do_c_expr_indent __ARGS((void));
+! int cin_islabel __ARGS((int ind_maxcomment));
+ int cin_iscase __ARGS((char_u *s, int strict));
+ int cin_isscopedecl __ARGS((char_u *s));
+ void parse_cino __ARGS((buf_T *buf));
+--- 81,87 ----
+ char_u *FullName_save __ARGS((char_u *fname, int force));
+ pos_T *find_start_comment __ARGS((int ind_maxcomment));
+ void do_c_expr_indent __ARGS((void));
+! int cin_islabel __ARGS((void));
+ int cin_iscase __ARGS((char_u *s, int strict));
+ int cin_isscopedecl __ARGS((char_u *s));
+ void parse_cino __ARGS((buf_T *buf));
+*** ../vim-7.4.070/src/version.c 2013-11-05 17:40:47.000000000 +0100
+--- src/version.c 2013-11-06 03:43:44.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 71,
+ /**/
+
+--
+A law to reduce crime states: "It is mandatory for a motorist with criminal
+intentions to stop at the city limits and telephone the chief of police as he
+is entering the town.
+ [real standing law in Washington, United States of America]
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.072 b/patches/source/vim/patches/7.4.072
new file mode 100644
index 000000000..e96888e7a
--- /dev/null
+++ b/patches/source/vim/patches/7.4.072
@@ -0,0 +1,61 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.072
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.072
+Problem: Crash when using Insert mode completion.
+Solution: Avoid going past the end of pum_array. (idea by Fransisco Lopes)
+Files: src/popupmnu.c
+
+
+*** ../vim-7.4.071/src/popupmnu.c 2011-08-17 18:04:28.000000000 +0200
+--- src/popupmnu.c 2013-11-02 04:01:06.000000000 +0100
+***************
+*** 282,287 ****
+--- 282,291 ----
+ int round;
+ int n;
+
++ /* Never display more than we have */
++ if (pum_first > pum_size - pum_height)
++ pum_first = pum_size - pum_height;
++
+ if (pum_scrollbar)
+ {
+ thumb_heigth = pum_height * pum_height / pum_size;
+***************
+*** 672,681 ****
+ #endif
+ }
+
+- /* Never display more than we have */
+- if (pum_first > pum_size - pum_height)
+- pum_first = pum_size - pum_height;
+-
+ if (!resized)
+ pum_redraw();
+
+--- 676,681 ----
+*** ../vim-7.4.071/src/version.c 2013-11-06 04:01:31.000000000 +0100
+--- src/version.c 2013-11-06 04:03:18.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 72,
+ /**/
+
+--
+No children may attend school with their breath smelling of "wild onions."
+ [real standing law in West Virginia, United States of America]
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.073 b/patches/source/vim/patches/7.4.073
new file mode 100644
index 000000000..7d9cedcff
--- /dev/null
+++ b/patches/source/vim/patches/7.4.073
@@ -0,0 +1,404 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.073
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.073
+Problem: Setting undolevels for one buffer changes undo in another.
+Solution: Make 'undolevels' a global-local option. (Christian Brabandt)
+Files: runtime/doc/options.txt, src/buffer.c, src/option.c, src/option.h
+ src/structs.h, src/undo.c
+
+
+*** ../vim-7.4.072/runtime/doc/options.txt 2013-08-10 13:24:57.000000000 +0200
+--- runtime/doc/options.txt 2013-11-06 04:18:43.000000000 +0100
+***************
+*** 7594,7600 ****
+ *'undolevels'* *'ul'*
+ 'undolevels' 'ul' number (default 100, 1000 for Unix, VMS,
+ Win32 and OS/2)
+! global
+ {not in Vi}
+ Maximum number of changes that can be undone. Since undo information
+ is kept in memory, higher numbers will cause more memory to be used
+--- 7594,7600 ----
+ *'undolevels'* *'ul'*
+ 'undolevels' 'ul' number (default 100, 1000 for Unix, VMS,
+ Win32 and OS/2)
+! global or local to buffer |global-local|
+ {not in Vi}
+ Maximum number of changes that can be undone. Since undo information
+ is kept in memory, higher numbers will cause more memory to be used
+***************
+*** 7605,7612 ****
+ < But you can also get Vi compatibility by including the 'u' flag in
+ 'cpoptions', and still be able to use CTRL-R to repeat undo.
+ Also see |undo-two-ways|.
+! Set to a negative number for no undo at all: >
+! set ul=-1
+ < This helps when you run out of memory for a single change.
+ Also see |clear-undo|.
+
+--- 7605,7613 ----
+ < But you can also get Vi compatibility by including the 'u' flag in
+ 'cpoptions', and still be able to use CTRL-R to repeat undo.
+ Also see |undo-two-ways|.
+! Set to -1 for no undo at all. You might want to do this only for the
+! current buffer: >
+! setlocal ul=-1
+ < This helps when you run out of memory for a single change.
+ Also see |clear-undo|.
+
+*** ../vim-7.4.072/src/buffer.c 2013-11-05 17:40:47.000000000 +0100
+--- src/buffer.c 2013-11-06 04:25:27.000000000 +0100
+***************
+*** 1949,1954 ****
+--- 1949,1955 ----
+ clear_string_option(&buf->b_p_qe);
+ #endif
+ buf->b_p_ar = -1;
++ buf->b_p_ul = NO_LOCAL_UNDOLEVEL;
+ }
+
+ /*
+*** ../vim-7.4.072/src/option.c 2013-11-05 07:12:59.000000000 +0100
+--- src/option.c 2013-11-06 04:34:23.000000000 +0100
+***************
+*** 234,239 ****
+--- 234,240 ----
+ #ifdef FEAT_STL_OPT
+ # define PV_STL OPT_BOTH(OPT_WIN(WV_STL))
+ #endif
++ #define PV_UL OPT_BOTH(OPT_BUF(BV_UL))
+ #ifdef FEAT_WINDOWS
+ # define PV_WFH OPT_WIN(WV_WFH)
+ #endif
+***************
+*** 2683,2689 ****
+ #endif
+ {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"undolevels", "ul", P_NUM|P_VI_DEF,
+! (char_u *)&p_ul, PV_NONE,
+ {
+ #if defined(UNIX) || defined(WIN3264) || defined(OS2) || defined(VMS)
+ (char_u *)1000L,
+--- 2684,2690 ----
+ #endif
+ {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"undolevels", "ul", P_NUM|P_VI_DEF,
+! (char_u *)&p_ul, PV_UL,
+ {
+ #if defined(UNIX) || defined(WIN3264) || defined(OS2) || defined(VMS)
+ (char_u *)1000L,
+***************
+*** 3313,3318 ****
+--- 3314,3320 ----
+
+ curbuf->b_p_initialized = TRUE;
+ curbuf->b_p_ar = -1; /* no local 'autoread' value */
++ curbuf->b_p_ul = NO_LOCAL_UNDOLEVEL;
+ check_buf_options(curbuf);
+ check_win_options(curwin);
+ check_options();
+***************
+*** 4512,4519 ****
+ ((flags & P_VI_DEF) || cp_val)
+ ? VI_DEFAULT : VIM_DEFAULT];
+ else if (nextchar == '<')
+! value = *(long *)get_varp_scope(&(options[opt_idx]),
+! OPT_GLOBAL);
+ else if (((long *)varp == &p_wc
+ || (long *)varp == &p_wcm)
+ && (*arg == '<'
+--- 4514,4529 ----
+ ((flags & P_VI_DEF) || cp_val)
+ ? VI_DEFAULT : VIM_DEFAULT];
+ else if (nextchar == '<')
+! {
+! /* For 'undolevels' NO_LOCAL_UNDOLEVEL means to
+! * use the global value. */
+! if ((long *)varp == &curbuf->b_p_ul
+! && opt_flags == OPT_LOCAL)
+! value = NO_LOCAL_UNDOLEVEL;
+! else
+! value = *(long *)get_varp_scope(
+! &(options[opt_idx]), OPT_GLOBAL);
+! }
+ else if (((long *)varp == &p_wc
+ || (long *)varp == &p_wcm)
+ && (*arg == '<'
+***************
+*** 8487,8492 ****
+--- 8497,8509 ----
+ u_sync(TRUE);
+ p_ul = value;
+ }
++ else if (pp == &curbuf->b_p_ul)
++ {
++ /* use the old value, otherwise u_sync() may not work properly */
++ curbuf->b_p_ul = old_value;
++ u_sync(TRUE);
++ curbuf->b_p_ul = value;
++ }
+
+ #ifdef FEAT_LINEBREAK
+ /* 'numberwidth' must be positive */
+***************
+*** 9720,9726 ****
+ /*
+ * Unset local option value, similar to ":set opt<".
+ */
+-
+ void
+ unset_global_local_option(name, from)
+ char_u *name;
+--- 9737,9742 ----
+***************
+*** 9793,9798 ****
+--- 9809,9817 ----
+ clear_string_option(&((win_T *)from)->w_p_stl);
+ break;
+ #endif
++ case PV_UL:
++ buf->b_p_ul = NO_LOCAL_UNDOLEVEL;
++ break;
+ }
+ }
+
+***************
+*** 9841,9846 ****
+--- 9860,9866 ----
+ #ifdef FEAT_STL_OPT
+ case PV_STL: return (char_u *)&(curwin->w_p_stl);
+ #endif
++ case PV_UL: return (char_u *)&(curbuf->b_p_ul);
+ }
+ return NULL; /* "cannot happen" */
+ }
+***************
+*** 9905,9910 ****
+--- 9925,9932 ----
+ case PV_STL: return *curwin->w_p_stl != NUL
+ ? (char_u *)&(curwin->w_p_stl) : p->var;
+ #endif
++ case PV_UL: return curbuf->b_p_ul != NO_LOCAL_UNDOLEVEL
++ ? (char_u *)&(curbuf->b_p_ul) : p->var;
+
+ #ifdef FEAT_ARABIC
+ case PV_ARAB: return (char_u *)&(curwin->w_p_arab);
+***************
+*** 10445,10450 ****
+--- 10467,10473 ----
+ /* options that are normally global but also have a local value
+ * are not copied, start using the global value */
+ buf->b_p_ar = -1;
++ buf->b_p_ul = NO_LOCAL_UNDOLEVEL;
+ #ifdef FEAT_QUICKFIX
+ buf->b_p_gp = empty_option;
+ buf->b_p_mp = empty_option;
+*** ../vim-7.4.072/src/option.h 2013-06-26 18:41:39.000000000 +0200
+--- src/option.h 2013-11-06 04:17:40.000000000 +0100
+***************
+*** 1031,1036 ****
+--- 1031,1037 ----
+ , BV_TW
+ , BV_TX
+ , BV_UDF
++ , BV_UL
+ , BV_WM
+ , BV_COUNT /* must be the last one */
+ };
+***************
+*** 1109,1111 ****
+--- 1110,1115 ----
+ , WV_WRAP
+ , WV_COUNT /* must be the last one */
+ };
++
++ /* Value for b_p_ul indicating the global value must be used. */
++ #define NO_LOCAL_UNDOLEVEL -123456
+*** ../vim-7.4.072/src/structs.h 2013-11-05 07:12:59.000000000 +0100
+--- src/structs.h 2013-11-06 04:26:17.000000000 +0100
+***************
+*** 1627,1632 ****
+--- 1627,1633 ----
+ char_u *b_p_dict; /* 'dictionary' local value */
+ char_u *b_p_tsr; /* 'thesaurus' local value */
+ #endif
++ long b_p_ul; /* 'undolevels' local value */
+ #ifdef FEAT_PERSISTENT_UNDO
+ int b_p_udf; /* 'undofile' */
+ #endif
+*** ../vim-7.4.072/src/undo.c 2013-09-08 15:40:45.000000000 +0200
+--- src/undo.c 2013-11-06 04:33:12.000000000 +0100
+***************
+*** 83,88 ****
+--- 83,89 ----
+
+ #include "vim.h"
+
++ static long get_undolevel __ARGS((void));
+ static void u_unch_branch __ARGS((u_header_T *uhp));
+ static u_entry_T *u_get_headentry __ARGS((void));
+ static void u_getbot __ARGS((void));
+***************
+*** 336,341 ****
+--- 337,353 ----
+ }
+
+ /*
++ * Get the undolevle value for the current buffer.
++ */
++ static long
++ get_undolevel()
++ {
++ if (curbuf->b_p_ul == NO_LOCAL_UNDOLEVEL)
++ return p_ul;
++ return curbuf->b_p_ul;
++ }
++
++ /*
+ * Common code for various ways to save text before a change.
+ * "top" is the line above the first changed line.
+ * "bot" is the line below the last changed line.
+***************
+*** 419,425 ****
+ curbuf->b_new_change = TRUE;
+ #endif
+
+! if (p_ul >= 0)
+ {
+ /*
+ * Make a new header entry. Do this first so that we don't mess
+--- 431,437 ----
+ curbuf->b_new_change = TRUE;
+ #endif
+
+! if (get_undolevel() >= 0)
+ {
+ /*
+ * Make a new header entry. Do this first so that we don't mess
+***************
+*** 449,455 ****
+ /*
+ * free headers to keep the size right
+ */
+! while (curbuf->b_u_numhead > p_ul && curbuf->b_u_oldhead != NULL)
+ {
+ u_header_T *uhfree = curbuf->b_u_oldhead;
+
+--- 461,468 ----
+ /*
+ * free headers to keep the size right
+ */
+! while (curbuf->b_u_numhead > get_undolevel()
+! && curbuf->b_u_oldhead != NULL)
+ {
+ u_header_T *uhfree = curbuf->b_u_oldhead;
+
+***************
+*** 530,536 ****
+ }
+ else
+ {
+! if (p_ul < 0) /* no undo at all */
+ return OK;
+
+ /*
+--- 543,549 ----
+ }
+ else
+ {
+! if (get_undolevel() < 0) /* no undo at all */
+ return OK;
+
+ /*
+***************
+*** 1972,1978 ****
+ {
+ if (curbuf->b_u_curhead == NULL) /* first undo */
+ curbuf->b_u_curhead = curbuf->b_u_newhead;
+! else if (p_ul > 0) /* multi level undo */
+ /* get next undo */
+ curbuf->b_u_curhead = curbuf->b_u_curhead->uh_next.ptr;
+ /* nothing to undo */
+--- 1985,1991 ----
+ {
+ if (curbuf->b_u_curhead == NULL) /* first undo */
+ curbuf->b_u_curhead = curbuf->b_u_newhead;
+! else if (get_undolevel() > 0) /* multi level undo */
+ /* get next undo */
+ curbuf->b_u_curhead = curbuf->b_u_curhead->uh_next.ptr;
+ /* nothing to undo */
+***************
+*** 1993,1999 ****
+ }
+ else
+ {
+! if (curbuf->b_u_curhead == NULL || p_ul <= 0)
+ {
+ beep_flush(); /* nothing to redo */
+ if (count == startcount - 1)
+--- 2006,2012 ----
+ }
+ else
+ {
+! if (curbuf->b_u_curhead == NULL || get_undolevel() <= 0)
+ {
+ beep_flush(); /* nothing to redo */
+ if (count == startcount - 1)
+***************
+*** 2751,2757 ****
+ if (im_is_preediting())
+ return; /* XIM is busy, don't break an undo sequence */
+ #endif
+! if (p_ul < 0)
+ curbuf->b_u_synced = TRUE; /* no entries, nothing to do */
+ else
+ {
+--- 2764,2770 ----
+ if (im_is_preediting())
+ return; /* XIM is busy, don't break an undo sequence */
+ #endif
+! if (get_undolevel() < 0)
+ curbuf->b_u_synced = TRUE; /* no entries, nothing to do */
+ else
+ {
+***************
+*** 2911,2917 ****
+ }
+ if (!curbuf->b_u_synced)
+ return; /* already unsynced */
+! if (p_ul < 0)
+ return; /* no entries, nothing to do */
+ else
+ {
+--- 2924,2930 ----
+ }
+ if (!curbuf->b_u_synced)
+ return; /* already unsynced */
+! if (get_undolevel() < 0)
+ return; /* no entries, nothing to do */
+ else
+ {
+*** ../vim-7.4.072/src/version.c 2013-11-06 04:04:29.000000000 +0100
+--- src/version.c 2013-11-06 05:21:43.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 73,
+ /**/
+
+--
+Living on Earth includes an annual free trip around the Sun.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.074 b/patches/source/vim/patches/7.4.074
new file mode 100644
index 000000000..70045c088
--- /dev/null
+++ b/patches/source/vim/patches/7.4.074
@@ -0,0 +1,67 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.074
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.074
+Problem: When undo'ing all changes and creating a new change the undo
+ structure is incorrect. (Christian Brabandt)
+Solution: When deleting the branch starting at the old header, delete the
+ whole branch, not just the first entry.
+Files: src/undo.c
+
+
+*** ../vim-7.4.073/src/undo.c 2013-11-06 05:26:08.000000000 +0100
+--- src/undo.c 2013-11-07 03:01:42.000000000 +0100
+***************
+*** 3121,3127 ****
+ * all the pointers. */
+ if (uhp == buf->b_u_oldhead)
+ {
+! u_freeheader(buf, uhp, uhpp);
+ return;
+ }
+
+--- 3121,3128 ----
+ * all the pointers. */
+ if (uhp == buf->b_u_oldhead)
+ {
+! while (buf->b_u_oldhead != NULL)
+! u_freeheader(buf, buf->b_u_oldhead, uhpp);
+ return;
+ }
+
+*** ../vim-7.4.073/src/version.c 2013-11-06 05:26:08.000000000 +0100
+--- src/version.c 2013-11-07 03:03:02.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 74,
+ /**/
+
+--
+LETTERS TO THE EDITOR (The Times of London)
+
+Dear Sir,
+
+I am firmly opposed to the spread of microchips either to the home or
+to the office.  We have more than enough of them foisted upon us in
+public places.  They are a disgusting Americanism, and can only result
+in the farmers being forced to grow smaller potatoes, which in turn
+will cause massive unemployment in the already severely depressed
+agricultural industry.
+
+Yours faithfully,
+        Capt. Quinton D'Arcy, J. P.
+        Sevenoaks
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.075 b/patches/source/vim/patches/7.4.075
new file mode 100644
index 000000000..f7ba21e1f
--- /dev/null
+++ b/patches/source/vim/patches/7.4.075
@@ -0,0 +1,290 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.075
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.075
+Problem: Locally setting 'undolevels' is not tested.
+Solution: Add a test. (Christian Brabandt)
+Files: src/testdir/test100.in, src/testdir/test100.ok,
+ src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
+ src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
+ src/testdir/Make_vms.mms, src/testdir/Makefile, src/Makefile
+
+
+*** ../vim-7.4.074/src/testdir/test100.in 2013-11-07 03:24:56.000000000 +0100
+--- src/testdir/test100.in 2013-11-07 03:20:32.000000000 +0100
+***************
+*** 0 ****
+--- 1,42 ----
++ Tests for 'undolevel' setting being global-local
++
++ STARTTEST
++ :so small.vim
++ :set nocompatible viminfo+=nviminfo ul=5
++ :fu! FillBuffer()
++ :for i in range(1,13)
++ :put=i
++ :exe "setg ul=" . &g:ul
++ :endfor
++ :endfu
++ :fu! UndoLevel()
++ :redir @a | setglobal undolevels? | echon ' global' | setlocal undolevels? | echon ' local' |redir end
++ :$put a
++ :endfu
++ :new one
++ :0put ='ONE: expecting global undolevels: 5, local undolevels: -123456 (default)'
++ :call FillBuffer()
++ :call feedkeys(":earlier 10\n", 't')
++ :call UndoLevel()
++ :%w! test.out
++ :new two
++ :0put ='TWO: expecting global undolevels: 5, local undolevels: 2 (first) then 10 (afterwards)'
++ :setlocal ul=2
++ :call FillBuffer()
++ :call feedkeys(":earlier 10\n", 't')
++ :call UndoLevel()
++ :setlocal ul=10
++ :call UndoLevel()
++ :%w >> test.out
++ :wincmd p
++ :redir >>test.out | echo "global value shouldn't be changed and still be 5!" | echo 'ONE: expecting global undolevels: 5, local undolevels: -123456 (default)'|:setglobal undolevels? | echon ' global' | setlocal undolevels? | echon ' local' |echo "" |redir end
++ :new three
++ :setglobal ul=50
++ :1put ='global value should be changed to 50'
++ :2put ='THREE: expecting global undolevels: 50, local undolevels: -123456 (default)'
++ :call UndoLevel()
++ :%w >> test.out
++ :"sleep 10
++ :qa!
++ ENDTEST
++
+*** ../vim-7.4.074/src/testdir/test100.ok 2013-11-07 03:24:56.000000000 +0100
+--- src/testdir/test100.ok 2013-11-07 03:11:51.000000000 +0100
+***************
+*** 0 ****
+--- 1,41 ----
++ ONE: expecting global undolevels: 5, local undolevels: -123456 (default)
++ 1
++ 2
++ 3
++ 4
++ 5
++ 6
++ 7
++
++
++ undolevels=5 global
++ undolevels=-123456 local
++ TWO: expecting global undolevels: 5, local undolevels: 2 (first) then 10 (afterwards)
++ 1
++ 2
++ 3
++ 4
++ 5
++ 6
++ 7
++ 8
++ 9
++ 10
++
++
++ undolevels=5 global
++ undolevels=2 local
++
++ undolevels=5 global
++ undolevels=10 local
++
++ global value shouldn't be changed and still be 5!
++ ONE: expecting global undolevels: 5, local undolevels: -123456 (default)
++ undolevels=5 global
++ undolevels=-123456 local
++
++ global value should be changed to 50
++ THREE: expecting global undolevels: 50, local undolevels: -123456 (default)
++
++ undolevels=50 global
++ undolevels=-123456 local
+*** ../vim-7.4.074/src/testdir/Make_amiga.mak 2013-09-19 17:00:14.000000000 +0200
+--- src/testdir/Make_amiga.mak 2013-11-07 03:07:57.000000000 +0100
+***************
+*** 34,40 ****
+ test81.out test82.out test83.out test84.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+! test99.out
+
+ .SUFFIXES: .in .out
+
+--- 34,40 ----
+ test81.out test82.out test83.out test84.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+! test99.out test100.out
+
+ .SUFFIXES: .in .out
+
+***************
+*** 150,152 ****
+--- 150,153 ----
+ test97.out: test97.in
+ test98.out: test98.in
+ test99.out: test99.in
++ test100.out: test100.in
+*** ../vim-7.4.074/src/testdir/Make_dos.mak 2013-09-19 17:00:14.000000000 +0200
+--- src/testdir/Make_dos.mak 2013-11-07 03:08:05.000000000 +0100
+***************
+*** 32,38 ****
+ test79.out test80.out test81.out test82.out test83.out \
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+! test94.out test95.out test96.out test98.out test99.out
+
+ SCRIPTS32 = test50.out test70.out
+
+--- 32,39 ----
+ test79.out test80.out test81.out test82.out test83.out \
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+! test94.out test95.out test96.out test98.out test99.out \
+! test100.out
+
+ SCRIPTS32 = test50.out test70.out
+
+*** ../vim-7.4.074/src/testdir/Make_ming.mak 2013-09-19 17:00:14.000000000 +0200
+--- src/testdir/Make_ming.mak 2013-11-07 03:08:12.000000000 +0100
+***************
+*** 52,58 ****
+ test79.out test80.out test81.out test82.out test83.out \
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+! test94.out test95.out test96.out test98.out test99.out
+
+ SCRIPTS32 = test50.out test70.out
+
+--- 52,59 ----
+ test79.out test80.out test81.out test82.out test83.out \
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+! test94.out test95.out test96.out test98.out test99.out \
+! test100out
+
+ SCRIPTS32 = test50.out test70.out
+
+*** ../vim-7.4.074/src/testdir/Make_os2.mak 2013-09-19 17:00:14.000000000 +0200
+--- src/testdir/Make_os2.mak 2013-11-07 03:08:18.000000000 +0100
+***************
+*** 34,40 ****
+ test76.out test77.out test78.out test79.out test80.out \
+ test81.out test82.out test83.out test84.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+! test94.out test95.out test96.out test98.out test99.out
+
+ .SUFFIXES: .in .out
+
+--- 34,41 ----
+ test76.out test77.out test78.out test79.out test80.out \
+ test81.out test82.out test83.out test84.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+! test94.out test95.out test96.out test98.out test99.out \
+! test100.out
+
+ .SUFFIXES: .in .out
+
+*** ../vim-7.4.074/src/testdir/Make_vms.mms 2013-09-19 17:00:14.000000000 +0200
+--- src/testdir/Make_vms.mms 2013-11-07 03:08:24.000000000 +0100
+***************
+*** 4,10 ****
+ # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
+ # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
+ #
+! # Last change: 2013 Sep 19
+ #
+ # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
+ # Edit the lines in the Configuration section below to select.
+--- 4,10 ----
+ # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
+ # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
+ #
+! # Last change: 2013 Nov 07
+ #
+ # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
+ # Edit the lines in the Configuration section below to select.
+***************
+*** 78,84 ****
+ test77.out test78.out test79.out test80.out test81.out \
+ test82.out test83.out test84.out test88.out test89.out \
+ test90.out test91.out test92.out test93.out test94.out \
+! test95.out test96.out test97.out test98.out test99.out
+
+ # Known problems:
+ # Test 30: a problem around mac format - unknown reason
+--- 78,85 ----
+ test77.out test78.out test79.out test80.out test81.out \
+ test82.out test83.out test84.out test88.out test89.out \
+ test90.out test91.out test92.out test93.out test94.out \
+! test95.out test96.out test97.out test98.out test99.out \
+! test100.out
+
+ # Known problems:
+ # Test 30: a problem around mac format - unknown reason
+*** ../vim-7.4.074/src/testdir/Makefile 2013-09-22 15:03:34.000000000 +0200
+--- src/testdir/Makefile 2013-11-07 03:08:31.000000000 +0100
+***************
+*** 30,36 ****
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+! test99.out
+
+ SCRIPTS_GUI = test16.out
+
+--- 30,36 ----
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+! test99.out test100.out
+
+ SCRIPTS_GUI = test16.out
+
+*** ../vim-7.4.074/src/Makefile 2013-08-10 14:21:15.000000000 +0200
+--- src/Makefile 2013-11-07 03:10:40.000000000 +0100
+***************
+*** 1882,1888 ****
+ test60 test61 test62 test63 test64 test65 test66 test67 test68 test69 \
+ test70 test71 test72 test73 test74 test75 test76 test77 test78 test79 \
+ test80 test81 test82 test83 test84 test85 test86 test87 test88 test89 \
+! test90 test91 test92 test93 test94 test95 test96 test97 test98 test99:
+ cd testdir; rm $@.out; $(MAKE) -f Makefile $@.out VIMPROG=../$(VIMTARGET)
+
+ testclean:
+--- 1883,1890 ----
+ test60 test61 test62 test63 test64 test65 test66 test67 test68 test69 \
+ test70 test71 test72 test73 test74 test75 test76 test77 test78 test79 \
+ test80 test81 test82 test83 test84 test85 test86 test87 test88 test89 \
+! test90 test91 test92 test93 test94 test95 test96 test97 test98 test99 \
+! test100 test101 test102 test103 test104 test105 test106 test107:
+ cd testdir; rm $@.out; $(MAKE) -f Makefile $@.out VIMPROG=../$(VIMTARGET)
+
+ testclean:
+*** ../vim-7.4.074/src/version.c 2013-11-07 03:04:06.000000000 +0100
+--- src/version.c 2013-11-07 03:10:10.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 75,
+ /**/
+
+--
+Why is "abbreviation" such a long word?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.076 b/patches/source/vim/patches/7.4.076
new file mode 100644
index 000000000..fa9abbc25
--- /dev/null
+++ b/patches/source/vim/patches/7.4.076
@@ -0,0 +1,66 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.076
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.076
+Problem: "cgn" does not wrap around the end of the file. (Dimitrov
+ Dimitrov)
+Solution: Restore 'wrapscan' earlier. (Christian Brabandt)
+Files: src/search.c
+
+
+*** ../vim-7.4.075/src/search.c 2013-10-02 21:54:57.000000000 +0200
+--- src/search.c 2013-11-07 04:38:46.000000000 +0100
+***************
+*** 4592,4598 ****
+ ml_get(curwin->w_buffer->b_ml.ml_line_count));
+ }
+ }
+!
+ }
+
+ start_pos = pos;
+--- 4592,4598 ----
+ ml_get(curwin->w_buffer->b_ml.ml_line_count));
+ }
+ }
+! p_ws = old_p_ws;
+ }
+
+ start_pos = pos;
+***************
+*** 4607,4613 ****
+ if (!VIsual_active)
+ VIsual = start_pos;
+
+- p_ws = old_p_ws;
+ curwin->w_cursor = pos;
+ VIsual_active = TRUE;
+ VIsual_mode = 'v';
+--- 4607,4612 ----
+*** ../vim-7.4.075/src/version.c 2013-11-07 03:25:51.000000000 +0100
+--- src/version.c 2013-11-07 04:44:44.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 76,
+ /**/
+
+--
+INSPECTOR END OF FILM: Move along. There's nothing to see! Keep moving!
+ [Suddenly he notices the cameras.]
+INSPECTOR END OF FILM: (to Camera) All right, put that away sonny.
+ [He walks over to it and puts his hand over the lens.]
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.077 b/patches/source/vim/patches/7.4.077
new file mode 100644
index 000000000..fd2d3d7c2
--- /dev/null
+++ b/patches/source/vim/patches/7.4.077
@@ -0,0 +1,63 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.077
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.077
+Problem: DOS installer creates shortcut without a path, resulting in the
+ current directory to be C:\Windows\system32.
+Solution: Use environment variables.
+Files: src/dosinst.c
+
+
+*** ../vim-7.4.076/src/dosinst.c 2013-05-06 04:06:04.000000000 +0200
+--- src/dosinst.c 2013-11-06 18:18:47.000000000 +0100
+***************
+*** 1773,1781 ****
+
+ /*
+ * We used to use "homedir" as the working directory, but that is a bad choice
+! * on multi-user systems. Not specifying a directory appears to work best.
+ */
+! #define WORKDIR ""
+
+ /*
+ * Create shortcut(s) in the Start Menu\Programs\Vim folder.
+--- 1773,1783 ----
+
+ /*
+ * We used to use "homedir" as the working directory, but that is a bad choice
+! * on multi-user systems. However, not specifying a directory results in the
+! * current directory to be c:\Windows\system32 on Windows 7. Use environment
+! * variables instead.
+ */
+! #define WORKDIR "%HOMEDRIVE%%HOMEPATH%"
+
+ /*
+ * Create shortcut(s) in the Start Menu\Programs\Vim folder.
+*** ../vim-7.4.076/src/version.c 2013-11-07 04:46:43.000000000 +0100
+--- src/version.c 2013-11-07 04:47:42.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 77,
+ /**/
+
+--
+JOHN CLEESE PLAYED: SECOND SOLDIER WITH A KEEN INTEREST IN BIRDS, LARGE MAN
+ WITH DEAD BODY, BLACK KNIGHT, MR NEWT (A VILLAGE
+ BLACKSMITH INTERESTED IN BURNING WITCHES), A QUITE
+ EXTRAORDINARILY RUDE FRENCHMAN, TIM THE WIZARD, SIR
+ LAUNCELOT
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.078 b/patches/source/vim/patches/7.4.078
new file mode 100644
index 000000000..56b507634
--- /dev/null
+++ b/patches/source/vim/patches/7.4.078
@@ -0,0 +1,114 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.078
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.078
+Problem: MSVC 2013 is not supported.
+Solution: Recognize and support MSVC 2013. (Ed Brown)
+Files: src/Make_mvc.mak
+
+
+*** ../vim-7.4.077/src/Make_mvc.mak 2013-07-09 13:13:12.000000000 +0200
+--- src/Make_mvc.mak 2013-11-08 03:12:48.000000000 +0100
+***************
+*** 424,429 ****
+--- 424,432 ----
+ !if "$(_NMAKE_VER)" == "11.00.60610.1"
+ MSVCVER = 11.0
+ !endif
++ !if "$(_NMAKE_VER)" == "12.00.21005.1"
++ MSVCVER = 12.0
++ !endif
+ !endif
+
+ # Abort building VIM if version of VC is unrecognised.
+***************
+*** 438,444 ****
+ !endif
+
+ # Convert processor ID to MVC-compatible number
+! !if ("$(MSVCVER)" != "8.0") && ("$(MSVCVER)" != "9.0") && ("$(MSVCVER)" != "10.0") && ("$(MSVCVER)" != "11.0")
+ !if "$(CPUNR)" == "i386"
+ CPUARG = /G3
+ !elseif "$(CPUNR)" == "i486"
+--- 441,447 ----
+ !endif
+
+ # Convert processor ID to MVC-compatible number
+! !if ("$(MSVCVER)" != "8.0") && ("$(MSVCVER)" != "9.0") && ("$(MSVCVER)" != "10.0") && ("$(MSVCVER)" != "11.0") && ("$(MSVCVER)" != "12.0")
+ !if "$(CPUNR)" == "i386"
+ CPUARG = /G3
+ !elseif "$(CPUNR)" == "i486"
+***************
+*** 472,478 ****
+ OPTFLAG = /Ox
+ !endif
+
+! !if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0")
+ # Use link time code generation if not worried about size
+ !if "$(OPTIMIZE)" != "SPACE"
+ OPTFLAG = $(OPTFLAG) /GL
+--- 475,481 ----
+ OPTFLAG = /Ox
+ !endif
+
+! !if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0") || ("$(MSVCVER)" == "12.0")
+ # Use link time code generation if not worried about size
+ !if "$(OPTIMIZE)" != "SPACE"
+ OPTFLAG = $(OPTFLAG) /GL
+***************
+*** 485,491 ****
+ !endif
+
+ # Static code analysis generally available starting with VS2012
+! !if ("$(ANALYZE)" == "yes") && ("$(MSVCVER)" == "11.0")
+ CFLAGS=$(CFLAGS) /analyze
+ !endif
+
+--- 488,494 ----
+ !endif
+
+ # Static code analysis generally available starting with VS2012
+! !if ("$(ANALYZE)" == "yes") && ("$(MSVCVER)" == "11.0") && ("$(MSVCVER)" == "12.0")
+ CFLAGS=$(CFLAGS) /analyze
+ !endif
+
+***************
+*** 943,949 ****
+
+ # Report link time code generation progress if used.
+ !ifdef NODEBUG
+! !if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0")
+ !if "$(OPTIMIZE)" != "SPACE"
+ LINKARGS1 = $(LINKARGS1) /LTCG:STATUS
+ !endif
+--- 946,952 ----
+
+ # Report link time code generation progress if used.
+ !ifdef NODEBUG
+! !if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0") || ("$(MSVCVER)" == "12.0")
+ !if "$(OPTIMIZE)" != "SPACE"
+ LINKARGS1 = $(LINKARGS1) /LTCG:STATUS
+ !endif
+*** ../vim-7.4.077/src/version.c 2013-11-07 04:49:23.000000000 +0100
+--- src/version.c 2013-11-08 03:13:56.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 78,
+ /**/
+
+--
+Every time I lose weight, it finds me again!
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.079 b/patches/source/vim/patches/7.4.079
new file mode 100644
index 000000000..fbda97d82
--- /dev/null
+++ b/patches/source/vim/patches/7.4.079
@@ -0,0 +1,470 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.079
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.079
+Problem: A script cannot detect whether 'hlsearch' highlighting is actually
+ displayed.
+Solution: Add the "v:hlsearch" variable. (ZyX)
+Files: src/runtime/doc/eval.txt, src/eval.c, src/ex_docmd.c,
+ src/option.c, src/screen.c, src/search.c, src/tag.c, src/vim.h,
+ src/testdir/test101.in, src/testdir/test101.ok,
+ src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
+ src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
+ src/testdir/Make_vms.mms, src/testdir/Makefile
+
+
+diff: ../vim-7.4.078/src/runtime/doc/eval.txt: No such file or directory
+diff: src/runtime/doc/eval.txt: No such file or directory
+*** ../vim-7.4.078/src/eval.c 2013-11-05 07:12:59.000000000 +0100
+--- src/eval.c 2013-11-08 04:11:46.000000000 +0100
+***************
+*** 356,361 ****
+--- 356,362 ----
+ {VV_NAME("mouse_col", VAR_NUMBER), 0},
+ {VV_NAME("operator", VAR_STRING), VV_RO},
+ {VV_NAME("searchforward", VAR_NUMBER), 0},
++ {VV_NAME("hlsearch", VAR_NUMBER), 0},
+ {VV_NAME("oldfiles", VAR_LIST), 0},
+ {VV_NAME("windowid", VAR_NUMBER), VV_RO},
+ };
+***************
+*** 871,876 ****
+--- 872,878 ----
+ hash_add(&compat_hashtab, p->vv_di.di_key);
+ }
+ set_vim_var_nr(VV_SEARCHFORWARD, 1L);
++ set_vim_var_nr(VV_HLSEARCH, 1L);
+ set_reg_var(0); /* default for v:register is not 0 but '"' */
+
+ #ifdef EBCDIC
+***************
+*** 20613,20618 ****
+--- 20615,20627 ----
+ v->di_tv.vval.v_number = get_tv_number(tv);
+ if (STRCMP(varname, "searchforward") == 0)
+ set_search_direction(v->di_tv.vval.v_number ? '/' : '?');
++ #ifdef FEAT_SEARCH_EXTRA
++ else if (STRCMP(varname, "hlsearch") == 0)
++ {
++ no_hlsearch = !v->di_tv.vval.v_number;
++ redraw_all_later(SOME_VALID);
++ }
++ #endif
+ }
+ return;
+ }
+*** ../vim-7.4.078/src/ex_docmd.c 2013-07-24 15:09:37.000000000 +0200
+--- src/ex_docmd.c 2013-11-08 04:17:01.000000000 +0100
+***************
+*** 11389,11395 ****
+ ex_nohlsearch(eap)
+ exarg_T *eap UNUSED;
+ {
+! no_hlsearch = TRUE;
+ redraw_all_later(SOME_VALID);
+ }
+
+--- 11389,11395 ----
+ ex_nohlsearch(eap)
+ exarg_T *eap UNUSED;
+ {
+! SET_NO_HLSEARCH(TRUE);
+ redraw_all_later(SOME_VALID);
+ }
+
+*** ../vim-7.4.078/src/option.c 2013-11-06 05:26:08.000000000 +0100
+--- src/option.c 2013-11-08 04:17:32.000000000 +0100
+***************
+*** 7811,7817 ****
+ /* when 'hlsearch' is set or reset: reset no_hlsearch */
+ else if ((int *)varp == &p_hls)
+ {
+! no_hlsearch = FALSE;
+ }
+ #endif
+
+--- 7811,7817 ----
+ /* when 'hlsearch' is set or reset: reset no_hlsearch */
+ else if ((int *)varp == &p_hls)
+ {
+! SET_NO_HLSEARCH(FALSE);
+ }
+ #endif
+
+*** ../vim-7.4.078/src/screen.c 2013-07-13 12:23:00.000000000 +0200
+--- src/screen.c 2013-11-08 04:17:48.000000000 +0100
+***************
+*** 7447,7453 ****
+ {
+ /* don't free regprog in the match list, it's a copy */
+ vim_regfree(shl->rm.regprog);
+! no_hlsearch = TRUE;
+ }
+ shl->rm.regprog = NULL;
+ shl->lnum = 0;
+--- 7447,7453 ----
+ {
+ /* don't free regprog in the match list, it's a copy */
+ vim_regfree(shl->rm.regprog);
+! SET_NO_HLSEARCH(TRUE);
+ }
+ shl->rm.regprog = NULL;
+ shl->lnum = 0;
+*** ../vim-7.4.078/src/search.c 2013-11-07 04:46:43.000000000 +0100
+--- src/search.c 2013-11-08 04:18:57.000000000 +0100
+***************
+*** 289,295 ****
+ /* If 'hlsearch' set and search pat changed: need redraw. */
+ if (p_hls)
+ redraw_all_later(SOME_VALID);
+! no_hlsearch = FALSE;
+ #endif
+ }
+ }
+--- 289,295 ----
+ /* If 'hlsearch' set and search pat changed: need redraw. */
+ if (p_hls)
+ redraw_all_later(SOME_VALID);
+! SET_NO_HLSEARCH(FALSE);
+ #endif
+ }
+ }
+***************
+*** 333,339 ****
+ spats[1] = saved_spats[1];
+ last_idx = saved_last_idx;
+ # ifdef FEAT_SEARCH_EXTRA
+! no_hlsearch = saved_no_hlsearch;
+ # endif
+ }
+ }
+--- 333,339 ----
+ spats[1] = saved_spats[1];
+ last_idx = saved_last_idx;
+ # ifdef FEAT_SEARCH_EXTRA
+! SET_NO_HLSEARCH(saved_no_hlsearch);
+ # endif
+ }
+ }
+***************
+*** 1148,1154 ****
+ if (no_hlsearch && !(options & SEARCH_KEEP))
+ {
+ redraw_all_later(SOME_VALID);
+! no_hlsearch = FALSE;
+ }
+ #endif
+
+--- 1148,1154 ----
+ if (no_hlsearch && !(options & SEARCH_KEEP))
+ {
+ redraw_all_later(SOME_VALID);
+! SET_NO_HLSEARCH(FALSE);
+ }
+ #endif
+
+***************
+*** 5561,5567 ****
+ spats[idx].off.off = off;
+ #ifdef FEAT_SEARCH_EXTRA
+ if (setlast)
+! no_hlsearch = !hlsearch_on;
+ #endif
+ }
+ }
+--- 5561,5569 ----
+ spats[idx].off.off = off;
+ #ifdef FEAT_SEARCH_EXTRA
+ if (setlast)
+! {
+! SET_NO_HLSEARCH(!hlsearch_on);
+! }
+ #endif
+ }
+ }
+*** ../vim-7.4.078/src/tag.c 2013-09-05 12:06:26.000000000 +0200
+--- src/tag.c 2013-11-08 04:19:14.000000000 +0100
+***************
+*** 3330,3336 ****
+ #ifdef FEAT_SEARCH_EXTRA
+ /* restore no_hlsearch when keeping the old search pattern */
+ if (search_options)
+! no_hlsearch = save_no_hlsearch;
+ #endif
+
+ /* Return OK if jumped to another file (at least we found the file!). */
+--- 3330,3338 ----
+ #ifdef FEAT_SEARCH_EXTRA
+ /* restore no_hlsearch when keeping the old search pattern */
+ if (search_options)
+! {
+! SET_NO_HLSEARCH(save_no_hlsearch);
+! }
+ #endif
+
+ /* Return OK if jumped to another file (at least we found the file!). */
+*** ../vim-7.4.078/src/vim.h 2013-08-02 16:02:27.000000000 +0200
+--- src/vim.h 2013-11-08 04:16:57.000000000 +0100
+***************
+*** 1864,1872 ****
+ #define VV_MOUSE_COL 51
+ #define VV_OP 52
+ #define VV_SEARCHFORWARD 53
+! #define VV_OLDFILES 54
+! #define VV_WINDOWID 55
+! #define VV_LEN 56 /* number of v: vars */
+
+ #ifdef FEAT_CLIPBOARD
+
+--- 1864,1873 ----
+ #define VV_MOUSE_COL 51
+ #define VV_OP 52
+ #define VV_SEARCHFORWARD 53
+! #define VV_HLSEARCH 54
+! #define VV_OLDFILES 55
+! #define VV_WINDOWID 56
+! #define VV_LEN 57 /* number of v: vars */
+
+ #ifdef FEAT_CLIPBOARD
+
+***************
+*** 2246,2249 ****
+--- 2247,2256 ----
+ /* Character used as separated in autoload function/variable names. */
+ #define AUTOLOAD_CHAR '#'
+
++ #ifdef FEAT_EVAL
++ # define SET_NO_HLSEARCH(flag) no_hlsearch = (flag); set_vim_var_nr(VV_HLSEARCH, !no_hlsearch)
++ #else
++ # define SET_NO_HLSEARCH(flag) no_hlsearch = (flag)
++ #endif
++
+ #endif /* VIM__H */
+*** ../vim-7.4.078/src/testdir/test101.in 2013-11-08 04:28:49.000000000 +0100
+--- src/testdir/test101.in 2013-11-08 04:11:46.000000000 +0100
+***************
+*** 0 ****
+--- 1,45 ----
++ Test for v:hlsearch vim: set ft=vim :
++
++ STARTTEST
++ :" Last abc: Q
++ :so small.vim
++ :new
++ :call setline(1, repeat(['aaa'], 10))
++ :set hlsearch nolazyredraw
++ :let r=[]
++ :command -nargs=0 -bar AddR :call add(r, [screenattr(1, 1), v:hlsearch])
++ /aaa
++ :AddR
++ :nohlsearch
++ :AddR
++ :let v:hlsearch=1
++ :AddR
++ :let v:hlsearch=0
++ :AddR
++ :set hlsearch
++ :AddR
++ :let v:hlsearch=0
++ :AddR
++ n:AddR
++ :let v:hlsearch=0
++ :AddR
++ /
++ :AddR
++ :let r1=r[0][0]
++ :" I guess it is not guaranteed that screenattr outputs always the same character
++ :call map(r, 'v:val[1].":".(v:val[0]==r1?"highlighted":"not highlighted")')
++ :try
++ : let v:hlsearch=[]
++ :catch
++ : call add(r, matchstr(v:exception,'^Vim(let):E\d\+:'))
++ :endtry
++ :bwipeout!
++ :$put=r
++ :call garbagecollect(1)
++ :"
++ :/^start:/,$wq! test.out
++ :" vim: et ts=4 isk-=\:
++ :call getchar()
++ ENDTEST
++
++ start:
+*** ../vim-7.4.078/src/testdir/test101.ok 2013-11-08 04:28:49.000000000 +0100
+--- src/testdir/test101.ok 2013-11-08 04:11:46.000000000 +0100
+***************
+*** 0 ****
+--- 1,11 ----
++ start:
++ 1:highlighted
++ 0:not highlighted
++ 1:highlighted
++ 0:not highlighted
++ 1:highlighted
++ 0:not highlighted
++ 1:highlighted
++ 0:not highlighted
++ 1:highlighted
++ Vim(let):E706:
+*** ../vim-7.4.078/src/testdir/Make_amiga.mak 2013-11-07 03:25:51.000000000 +0100
+--- src/testdir/Make_amiga.mak 2013-11-08 04:22:13.000000000 +0100
+***************
+*** 34,40 ****
+ test81.out test82.out test83.out test84.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+! test99.out test100.out
+
+ .SUFFIXES: .in .out
+
+--- 34,40 ----
+ test81.out test82.out test83.out test84.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+! test99.out test100.out test101.out
+
+ .SUFFIXES: .in .out
+
+***************
+*** 151,153 ****
+--- 151,154 ----
+ test98.out: test98.in
+ test99.out: test99.in
+ test100.out: test100.in
++ test101.out: test101.in
+*** ../vim-7.4.078/src/testdir/Make_dos.mak 2013-11-07 03:25:51.000000000 +0100
+--- src/testdir/Make_dos.mak 2013-11-08 04:22:17.000000000 +0100
+***************
+*** 33,39 ****
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100.out
+
+ SCRIPTS32 = test50.out test70.out
+
+--- 33,39 ----
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100.out test101.out
+
+ SCRIPTS32 = test50.out test70.out
+
+*** ../vim-7.4.078/src/testdir/Make_ming.mak 2013-11-07 03:25:51.000000000 +0100
+--- src/testdir/Make_ming.mak 2013-11-08 04:22:19.000000000 +0100
+***************
+*** 53,59 ****
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100out
+
+ SCRIPTS32 = test50.out test70.out
+
+--- 53,59 ----
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100out test101.out
+
+ SCRIPTS32 = test50.out test70.out
+
+*** ../vim-7.4.078/src/testdir/Make_os2.mak 2013-11-07 03:25:51.000000000 +0100
+--- src/testdir/Make_os2.mak 2013-11-08 04:22:21.000000000 +0100
+***************
+*** 35,41 ****
+ test81.out test82.out test83.out test84.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100.out
+
+ .SUFFIXES: .in .out
+
+--- 35,41 ----
+ test81.out test82.out test83.out test84.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100.out test101.out
+
+ .SUFFIXES: .in .out
+
+*** ../vim-7.4.078/src/testdir/Make_vms.mms 2013-11-07 03:25:51.000000000 +0100
+--- src/testdir/Make_vms.mms 2013-11-08 04:22:23.000000000 +0100
+***************
+*** 4,10 ****
+ # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
+ # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
+ #
+! # Last change: 2013 Nov 07
+ #
+ # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
+ # Edit the lines in the Configuration section below to select.
+--- 4,10 ----
+ # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
+ # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
+ #
+! # Last change: 2013 Nov 08
+ #
+ # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
+ # Edit the lines in the Configuration section below to select.
+***************
+*** 79,85 ****
+ test82.out test83.out test84.out test88.out test89.out \
+ test90.out test91.out test92.out test93.out test94.out \
+ test95.out test96.out test97.out test98.out test99.out \
+! test100.out
+
+ # Known problems:
+ # Test 30: a problem around mac format - unknown reason
+--- 79,85 ----
+ test82.out test83.out test84.out test88.out test89.out \
+ test90.out test91.out test92.out test93.out test94.out \
+ test95.out test96.out test97.out test98.out test99.out \
+! test100.out test101.out
+
+ # Known problems:
+ # Test 30: a problem around mac format - unknown reason
+*** ../vim-7.4.078/src/testdir/Makefile 2013-11-07 03:25:51.000000000 +0100
+--- src/testdir/Makefile 2013-11-08 04:22:26.000000000 +0100
+***************
+*** 30,36 ****
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+! test99.out test100.out
+
+ SCRIPTS_GUI = test16.out
+
+--- 30,36 ----
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+! test99.out test100.out test101.out
+
+ SCRIPTS_GUI = test16.out
+
+*** ../vim-7.4.078/src/version.c 2013-11-08 03:15:39.000000000 +0100
+--- src/version.c 2013-11-08 04:11:08.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 79,
+ /**/
+
+--
+Corn oil comes from corn and olive oil comes from olives, so where
+does baby oil come from?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.080 b/patches/source/vim/patches/7.4.080
new file mode 100644
index 000000000..eeec1decb
--- /dev/null
+++ b/patches/source/vim/patches/7.4.080
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.080
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.080 (after 7.4.079)
+Problem: Missing documentation for v:hlsearch.
+Solution: Include the right file in the patch.
+Files: runtime/doc/eval.txt
+
+
+*** ../vim-7.4.079/runtime/doc/eval.txt 2013-11-02 23:29:17.000000000 +0100
+--- runtime/doc/eval.txt 2013-11-08 04:20:27.000000000 +0100
+***************
+*** 1454,1459 ****
+--- 1455,1467 ----
+ v:foldstart Used for 'foldtext': first line of closed fold.
+ Read-only in the |sandbox|. |fold-foldtext|
+
++ *v:hlsearch* *hlsearch-variable*
++ v:hlsearch Variable that determines whether search highlighting is on.
++ Makes sense only if 'hlsearch' is enabled which requires
++ |+extra_search|. Setting this variable to zero acts the like
++ |:nohlsearch| command, setting it to one acts like >
++ let &hlsearch = &hlsearch
++ <
+ *v:insertmode* *insertmode-variable*
+ v:insertmode Used for the |InsertEnter| and |InsertChange| autocommand
+ events. Values:
+*** ../vim-7.4.079/src/version.c 2013-11-08 04:30:06.000000000 +0100
+--- src/version.c 2013-11-09 01:42:56.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 80,
+ /**/
+
+--
+The chat program is in public domain. This is not the GNU public license.
+If it breaks then you get to keep both pieces.
+ -- Copyright notice for the chat program
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.081 b/patches/source/vim/patches/7.4.081
new file mode 100644
index 000000000..b2c61d9ac
--- /dev/null
+++ b/patches/source/vim/patches/7.4.081
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.081
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.081 (after 7.4.078)
+Problem: Wrong logic when ANALYZE is "yes".
+Solution: Use or instead of and. (KF Leong)
+Files: src/Make_mvc.mak
+
+
+*** ../vim-7.4.080/src/Make_mvc.mak 2013-11-08 03:15:39.000000000 +0100
+--- src/Make_mvc.mak 2013-11-08 18:02:54.000000000 +0100
+***************
+*** 488,494 ****
+ !endif
+
+ # Static code analysis generally available starting with VS2012
+! !if ("$(ANALYZE)" == "yes") && ("$(MSVCVER)" == "11.0") && ("$(MSVCVER)" == "12.0")
+ CFLAGS=$(CFLAGS) /analyze
+ !endif
+
+--- 488,494 ----
+ !endif
+
+ # Static code analysis generally available starting with VS2012
+! !if ("$(ANALYZE)" == "yes") && (("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0") || ("$(MSVCVER)" == "12.0"))
+ CFLAGS=$(CFLAGS) /analyze
+ !endif
+
+*** ../vim-7.4.080/src/version.c 2013-11-09 01:44:38.000000000 +0100
+--- src/version.c 2013-11-09 02:31:34.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 81,
+ /**/
+
+--
+Wi n0t trei a h0liday in Sweden thi yer?
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.082 b/patches/source/vim/patches/7.4.082
new file mode 100644
index 000000000..03089d662
--- /dev/null
+++ b/patches/source/vim/patches/7.4.082
@@ -0,0 +1,344 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.082
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.082
+Problem: Using "gf" in a changed buffer suggests adding "!", which is not
+ possible. (Tim Chase)
+Solution: Pass a flag to check_changed() wether adding ! make sense.
+Files: src/vim.h, src/ex_cmds2.c, src/proto/ex_cmds2.pro, src/globals.h,
+ src/ex_cmds.c, src/ex_docmd.c
+
+
+*** ../vim-7.4.081/src/vim.h 2013-11-08 04:30:06.000000000 +0100
+--- src/vim.h 2013-11-09 03:00:00.000000000 +0100
+***************
+*** 1176,1181 ****
+--- 1176,1190 ----
+ #define RESIZE_BOTH 15 /* resize in both directions */
+
+ /*
++ * flags for check_changed()
++ */
++ #define CCGD_AW 1 /* do autowrite if buffer was changed */
++ #define CCGD_MULTWIN 2 /* check also when several wins for the buf */
++ #define CCGD_FORCEIT 4 /* ! used */
++ #define CCGD_ALLBUF 8 /* may write all buffers */
++ #define CCGD_EXCMD 16 /* may suggest using ! */
++
++ /*
+ * "flags" values for option-setting functions.
+ * When OPT_GLOBAL and OPT_LOCAL are both missing, set both local and global
+ * values, get local value.
+*** ../vim-7.4.081/src/ex_cmds2.c 2013-06-28 20:14:53.000000000 +0200
+--- src/ex_cmds2.c 2013-11-09 03:14:44.000000000 +0100
+***************
+*** 1436,1455 ****
+ }
+
+ /*
+! * return TRUE if buffer was changed and cannot be abandoned.
+ */
+ int
+! check_changed(buf, checkaw, mult_win, forceit, allbuf)
+ buf_T *buf;
+! int checkaw; /* do autowrite if buffer was changed */
+! int mult_win; /* check also when several wins for the buf */
+! int forceit;
+! int allbuf UNUSED; /* may write all buffers */
+ {
+ if ( !forceit
+ && bufIsChanged(buf)
+! && (mult_win || buf->b_nwindows <= 1)
+! && (!checkaw || autowrite(buf, forceit) == FAIL))
+ {
+ #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
+ if ((p_confirm || cmdmod.confirm) && p_write)
+--- 1436,1455 ----
+ }
+
+ /*
+! * Return TRUE if buffer was changed and cannot be abandoned.
+! * For flags use the CCGD_ values.
+ */
+ int
+! check_changed(buf, flags)
+ buf_T *buf;
+! int flags;
+ {
++ int forceit = (flags & CCGD_FORCEIT);
++
+ if ( !forceit
+ && bufIsChanged(buf)
+! && ((flags & CCGD_MULTWIN) || buf->b_nwindows <= 1)
+! && (!(flags & CCGD_AW) || autowrite(buf, forceit) == FAIL))
+ {
+ #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
+ if ((p_confirm || cmdmod.confirm) && p_write)
+***************
+*** 1457,1463 ****
+ buf_T *buf2;
+ int count = 0;
+
+! if (allbuf)
+ for (buf2 = firstbuf; buf2 != NULL; buf2 = buf2->b_next)
+ if (bufIsChanged(buf2)
+ && (buf2->b_ffname != NULL
+--- 1457,1463 ----
+ buf_T *buf2;
+ int count = 0;
+
+! if (flags & CCGD_ALLBUF)
+ for (buf2 = firstbuf; buf2 != NULL; buf2 = buf2->b_next)
+ if (bufIsChanged(buf2)
+ && (buf2->b_ffname != NULL
+***************
+*** 1480,1486 ****
+ return bufIsChanged(buf);
+ }
+ #endif
+! EMSG(_(e_nowrtmsg));
+ return TRUE;
+ }
+ return FALSE;
+--- 1480,1489 ----
+ return bufIsChanged(buf);
+ }
+ #endif
+! if (flags & CCGD_EXCMD)
+! EMSG(_(e_nowrtmsg));
+! else
+! EMSG(_(e_nowrtmsg_nobang));
+ return TRUE;
+ }
+ return FALSE;
+***************
+*** 1690,1696 ****
+ {
+ /* Try auto-writing the buffer. If this fails but the buffer no
+ * longer exists it's not changed, that's OK. */
+! if (check_changed(buf, p_awa, TRUE, FALSE, TRUE) && buf_valid(buf))
+ break; /* didn't save - still changes */
+ }
+ }
+--- 1693,1701 ----
+ {
+ /* Try auto-writing the buffer. If this fails but the buffer no
+ * longer exists it's not changed, that's OK. */
+! if (check_changed(buf, (p_awa ? CCGD_AW : 0)
+! | CCGD_MULTWIN
+! | CCGD_ALLBUF) && buf_valid(buf))
+ break; /* didn't save - still changes */
+ }
+ }
+***************
+*** 2274,2280 ****
+ vim_free(p);
+ }
+ if ((!P_HID(curbuf) || !other)
+! && check_changed(curbuf, TRUE, !other, eap->forceit, FALSE))
+ return;
+ }
+
+--- 2279,2288 ----
+ vim_free(p);
+ }
+ if ((!P_HID(curbuf) || !other)
+! && check_changed(curbuf, CCGD_AW
+! | (other ? 0 : CCGD_MULTWIN)
+! | (eap->forceit ? CCGD_FORCEIT : 0)
+! | CCGD_EXCMD))
+ return;
+ }
+
+***************
+*** 2315,2321 ****
+ */
+ if ( P_HID(curbuf)
+ || eap->cmdidx == CMD_snext
+! || !check_changed(curbuf, TRUE, FALSE, eap->forceit, FALSE))
+ {
+ if (*eap->arg != NUL) /* redefine file list */
+ {
+--- 2323,2331 ----
+ */
+ if ( P_HID(curbuf)
+ || eap->cmdidx == CMD_snext
+! || !check_changed(curbuf, CCGD_AW
+! | (eap->forceit ? CCGD_FORCEIT : 0)
+! | CCGD_EXCMD))
+ {
+ if (*eap->arg != NUL) /* redefine file list */
+ {
+***************
+*** 2458,2464 ****
+ if (eap->cmdidx == CMD_windo
+ || eap->cmdidx == CMD_tabdo
+ || P_HID(curbuf)
+! || !check_changed(curbuf, TRUE, FALSE, eap->forceit, FALSE))
+ {
+ /* start at the first argument/window/buffer */
+ i = 0;
+--- 2468,2476 ----
+ if (eap->cmdidx == CMD_windo
+ || eap->cmdidx == CMD_tabdo
+ || P_HID(curbuf)
+! || !check_changed(curbuf, CCGD_AW
+! | (eap->forceit ? CCGD_FORCEIT : 0)
+! | CCGD_EXCMD))
+ {
+ /* start at the first argument/window/buffer */
+ i = 0;
+*** ../vim-7.4.081/src/proto/ex_cmds2.pro 2013-08-10 13:37:10.000000000 +0200
+--- src/proto/ex_cmds2.pro 2013-11-09 03:18:02.000000000 +0100
+***************
+*** 35,41 ****
+ int prof_def_func __ARGS((void));
+ int autowrite __ARGS((buf_T *buf, int forceit));
+ void autowrite_all __ARGS((void));
+! int check_changed __ARGS((buf_T *buf, int checkaw, int mult_win, int forceit, int allbuf));
+ void browse_save_fname __ARGS((buf_T *buf));
+ void dialog_changed __ARGS((buf_T *buf, int checkall));
+ int can_abandon __ARGS((buf_T *buf, int forceit));
+--- 35,41 ----
+ int prof_def_func __ARGS((void));
+ int autowrite __ARGS((buf_T *buf, int forceit));
+ void autowrite_all __ARGS((void));
+! int check_changed __ARGS((buf_T *buf, int flags));
+ void browse_save_fname __ARGS((buf_T *buf));
+ void dialog_changed __ARGS((buf_T *buf, int checkall));
+ int can_abandon __ARGS((buf_T *buf, int forceit));
+*** ../vim-7.4.081/src/globals.h 2013-07-04 19:53:44.000000000 +0200
+--- src/globals.h 2013-11-09 03:05:54.000000000 +0100
+***************
+*** 1490,1495 ****
+--- 1490,1496 ----
+ EXTERN char_u e_notopen[] INIT(= N_("E484: Can't open file %s"));
+ EXTERN char_u e_notread[] INIT(= N_("E485: Can't read file %s"));
+ EXTERN char_u e_nowrtmsg[] INIT(= N_("E37: No write since last change (add ! to override)"));
++ EXTERN char_u e_nowrtmsg_nobang[] INIT(= N_("E37: No write since last change"));
+ EXTERN char_u e_null[] INIT(= N_("E38: Null argument"));
+ #ifdef FEAT_DIGRAPHS
+ EXTERN char_u e_number_exp[] INIT(= N_("E39: Number expected"));
+*** ../vim-7.4.081/src/ex_cmds.c 2013-10-02 18:43:00.000000000 +0200
+--- src/ex_cmds.c 2013-11-09 03:19:25.000000000 +0100
+***************
+*** 3253,3260 ****
+ if ( ((!other_file && !(flags & ECMD_OLDBUF))
+ || (curbuf->b_nwindows == 1
+ && !(flags & (ECMD_HIDE | ECMD_ADDBUF))))
+! && check_changed(curbuf, p_awa, !other_file,
+! (flags & ECMD_FORCEIT), FALSE))
+ {
+ if (fnum == 0 && other_file && ffname != NULL)
+ (void)setaltfname(ffname, sfname, newlnum < 0 ? 0 : newlnum);
+--- 3253,3262 ----
+ if ( ((!other_file && !(flags & ECMD_OLDBUF))
+ || (curbuf->b_nwindows == 1
+ && !(flags & (ECMD_HIDE | ECMD_ADDBUF))))
+! && check_changed(curbuf, (p_awa ? CCGD_AW : 0)
+! | (other_file ? 0 : CCGD_MULTWIN)
+! | ((flags & ECMD_FORCEIT) ? CCGD_FORCEIT : 0)
+! | (eap == NULL ? 0 : CCGD_EXCMD)))
+ {
+ if (fnum == 0 && other_file && ffname != NULL)
+ (void)setaltfname(ffname, sfname, newlnum < 0 ? 0 : newlnum);
+***************
+*** 7664,7670 ****
+ # ifdef FEAT_WINDOWS
+ ++emsg_off;
+ # endif
+! split = check_changed(curbuf, TRUE, FALSE, FALSE, FALSE);
+ # ifdef FEAT_WINDOWS
+ --emsg_off;
+ # else
+--- 7666,7672 ----
+ # ifdef FEAT_WINDOWS
+ ++emsg_off;
+ # endif
+! split = check_changed(curbuf, CCGD_AW | CCGD_EXCMD);
+ # ifdef FEAT_WINDOWS
+ --emsg_off;
+ # else
+*** ../vim-7.4.081/src/ex_docmd.c 2013-11-08 04:30:06.000000000 +0100
+--- src/ex_docmd.c 2013-11-09 03:30:10.000000000 +0100
+***************
+*** 6565,6571 ****
+ if (check_more(FALSE, eap->forceit) == OK && only_one_window())
+ exiting = TRUE;
+ if ((!P_HID(curbuf)
+! && check_changed(curbuf, p_awa, FALSE, eap->forceit, FALSE))
+ || check_more(TRUE, eap->forceit) == FAIL
+ || (only_one_window() && check_changed_any(eap->forceit)))
+ {
+--- 6565,6573 ----
+ if (check_more(FALSE, eap->forceit) == OK && only_one_window())
+ exiting = TRUE;
+ if ((!P_HID(curbuf)
+! && check_changed(curbuf, (p_awa ? CCGD_AW : 0)
+! | (eap->forceit ? CCGD_FORCEIT : 0)
+! | CCGD_EXCMD))
+ || check_more(TRUE, eap->forceit) == FAIL
+ || (only_one_window() && check_changed_any(eap->forceit)))
+ {
+***************
+*** 7099,7105 ****
+ if (!P_HID(curbuf) && !split)
+ {
+ ++emsg_off;
+! split = check_changed(curbuf, TRUE, FALSE, FALSE, FALSE);
+ --emsg_off;
+ }
+ if (split)
+--- 7101,7107 ----
+ if (!P_HID(curbuf) && !split)
+ {
+ ++emsg_off;
+! split = check_changed(curbuf, CCGD_AW);
+ --emsg_off;
+ }
+ if (split)
+***************
+*** 7361,7367 ****
+ {
+ /* Set recoverymode right away to avoid the ATTENTION prompt. */
+ recoverymode = TRUE;
+! if (!check_changed(curbuf, p_awa, TRUE, eap->forceit, FALSE)
+ && (*eap->arg == NUL
+ || setfname(curbuf, eap->arg, NULL, TRUE) == OK))
+ ml_recover();
+--- 7363,7373 ----
+ {
+ /* Set recoverymode right away to avoid the ATTENTION prompt. */
+ recoverymode = TRUE;
+! if (!check_changed(curbuf, (p_awa ? CCGD_AW : 0)
+! | CCGD_MULTWIN
+! | (eap->forceit ? CCGD_FORCEIT : 0)
+! | CCGD_EXCMD)
+!
+ && (*eap->arg == NUL
+ || setfname(curbuf, eap->arg, NULL, TRUE) == OK))
+ ml_recover();
+*** ../vim-7.4.081/src/version.c 2013-11-09 02:32:15.000000000 +0100
+--- src/version.c 2013-11-09 03:26:06.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 82,
+ /**/
+
+--
+People who want to share their religious views with you
+almost never want you to share yours with them.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.083 b/patches/source/vim/patches/7.4.083
new file mode 100644
index 000000000..c71450eb6
--- /dev/null
+++ b/patches/source/vim/patches/7.4.083
@@ -0,0 +1,136 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.083
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.083
+Problem: It's hard to avoid adding a used pattern to the search history.
+Solution: Add the ":keeppatterns" modifier. (Christian Brabandt)
+Files: runtime/doc/cmdline.txt, src/ex_cmds.h, src/ex_docmd.c,
+ src/ex_getln.c, src/structs.h
+
+
+*** ../vim-7.4.082/runtime/doc/cmdline.txt 2013-08-10 13:24:52.000000000 +0200
+--- runtime/doc/cmdline.txt 2013-11-09 04:26:30.000000000 +0100
+***************
+*** 356,361 ****
+--- 356,365 ----
+ List the recent five entries from all histories: >
+ :history all -5,
+
++ :keepp[atterns] {command} *:keepp* *:keeppatterns*
++ Execute {command}, without adding anything to the search
++ history
++
+ ==============================================================================
+ 2. Command-line completion *cmdline-completion*
+
+*** ../vim-7.4.082/src/ex_cmds.h 2013-06-08 15:08:20.000000000 +0200
+--- src/ex_cmds.h 2013-11-09 04:26:30.000000000 +0100
+***************
+*** 477,482 ****
+--- 477,484 ----
+ NEEDARG|EXTRA|NOTRLCOM),
+ EX(CMD_keepjumps, "keepjumps", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM),
++ EX(CMD_keeppatterns, "keeppatterns", ex_wrongmodifier,
++ NEEDARG|EXTRA|NOTRLCOM),
+ EX(CMD_keepalt, "keepalt", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM),
+ EX(CMD_list, "list", ex_print,
+*** ../vim-7.4.082/src/ex_docmd.c 2013-11-09 03:31:45.000000000 +0100
+--- src/ex_docmd.c 2013-11-09 04:31:36.000000000 +0100
+***************
+*** 1843,1848 ****
+--- 1843,1853 ----
+ cmdmod.keepalt = TRUE;
+ continue;
+ }
++ if (checkforcmd(&ea.cmd, "keeppatterns", 5))
++ {
++ cmdmod.keeppatterns = TRUE;
++ continue;
++ }
+ if (!checkforcmd(&ea.cmd, "keepjumps", 5))
+ break;
+ cmdmod.keepjumps = TRUE;
+***************
+*** 2584,2589 ****
+--- 2589,2595 ----
+ case CMD_keepalt:
+ case CMD_keepjumps:
+ case CMD_keepmarks:
++ case CMD_keeppatterns:
+ case CMD_leftabove:
+ case CMD_let:
+ case CMD_lockmarks:
+***************
+*** 3089,3094 ****
+--- 3095,3101 ----
+ {"keepalt", 5, FALSE},
+ {"keepjumps", 5, FALSE},
+ {"keepmarks", 3, FALSE},
++ {"keeppatterns", 5, FALSE},
+ {"leftabove", 5, FALSE},
+ {"lockmarks", 3, FALSE},
+ {"noautocmd", 3, FALSE},
+***************
+*** 3597,3602 ****
+--- 3604,3610 ----
+ case CMD_keepalt:
+ case CMD_keepjumps:
+ case CMD_keepmarks:
++ case CMD_keeppatterns:
+ case CMD_leftabove:
+ case CMD_lockmarks:
+ case CMD_rightbelow:
+*** ../vim-7.4.082/src/ex_getln.c 2013-11-05 07:12:59.000000000 +0100
+--- src/ex_getln.c 2013-11-09 04:26:30.000000000 +0100
+***************
+*** 5498,5503 ****
+--- 5498,5506 ----
+ if (hislen == 0) /* no history */
+ return;
+
++ if (cmdmod.keeppatterns && histype == HIST_SEARCH)
++ return;
++
+ /*
+ * Searches inside the same mapping overwrite each other, so that only
+ * the last line is kept. Be careful not to remove a line that was moved
+*** ../vim-7.4.082/src/structs.h 2013-11-06 05:26:08.000000000 +0100
+--- src/structs.h 2013-11-09 04:26:30.000000000 +0100
+***************
+*** 542,547 ****
+--- 542,548 ----
+ int keepmarks; /* TRUE when ":keepmarks" was used */
+ int keepjumps; /* TRUE when ":keepjumps" was used */
+ int lockmarks; /* TRUE when ":lockmarks" was used */
++ int keeppatterns; /* TRUE when ":keeppatterns" was used */
+ # ifdef FEAT_AUTOCMD
+ char_u *save_ei; /* saved value of 'eventignore' */
+ # endif
+*** ../vim-7.4.082/src/version.c 2013-11-09 03:31:45.000000000 +0100
+--- src/version.c 2013-11-09 04:29:07.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 83,
+ /**/
+
+--
+I am always surprised in the Linux world how quickly solutions can be
+obtained. (Imagine sending an email to Bill Gates, asking why Windows
+crashed, and how to fix it... and then getting an answer that fixed the
+problem... <0>_<0> !) -- Mark Langdon
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.084 b/patches/source/vim/patches/7.4.084
new file mode 100644
index 000000000..142e251d3
--- /dev/null
+++ b/patches/source/vim/patches/7.4.084
@@ -0,0 +1,184 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.084
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.084
+Problem: Python: interrupt not being properly discarded. (Yggdroot Chen)
+Solution: Discard interrupt in VimTryEnd. (ZyX)
+Files: src/if_py_both.h, src/testdir/test86.in, src/testdir/test86.ok,
+ src/testdir/test87.in, src/testdir/test87.ok
+
+
+*** ../vim-7.4.083/src/if_py_both.h 2013-11-04 00:34:47.000000000 +0100
+--- src/if_py_both.h 2013-11-11 00:56:41.000000000 +0100
+***************
+*** 558,564 ****
+ /* Keyboard interrupt should be preferred over anything else */
+ if (got_int)
+ {
+! did_throw = got_int = FALSE;
+ PyErr_SetNone(PyExc_KeyboardInterrupt);
+ return -1;
+ }
+--- 558,568 ----
+ /* Keyboard interrupt should be preferred over anything else */
+ if (got_int)
+ {
+! if (current_exception != NULL)
+! discard_current_exception();
+! else
+! need_rethrow = did_throw = FALSE;
+! got_int = FALSE;
+ PyErr_SetNone(PyExc_KeyboardInterrupt);
+ return -1;
+ }
+***************
+*** 567,573 ****
+ /* Python exception is preferred over vim one; unlikely to occur though */
+ else if (PyErr_Occurred())
+ {
+! did_throw = FALSE;
+ return -1;
+ }
+ /* Finally transform VimL exception to python one */
+--- 571,580 ----
+ /* Python exception is preferred over vim one; unlikely to occur though */
+ else if (PyErr_Occurred())
+ {
+! if (current_exception != NULL)
+! discard_current_exception();
+! else
+! need_rethrow = did_throw = FALSE;
+ return -1;
+ }
+ /* Finally transform VimL exception to python one */
+*** ../vim-7.4.083/src/testdir/test86.in 2013-11-04 00:34:47.000000000 +0100
+--- src/testdir/test86.in 2013-11-11 00:56:11.000000000 +0100
+***************
+*** 1281,1286 ****
+--- 1281,1317 ----
+ EOF
+ :delfunction Exe
+ :"
++ :" Regression: interrupting vim.command propagates to next vim.command
++ py << EOF
++ def test_keyboard_interrupt():
++ try:
++ vim.command('while 1 | endwhile')
++ except KeyboardInterrupt:
++ cb.append('Caught KeyboardInterrupt')
++ except Exception:
++ cb.append('!!!!!!!! Caught exception: ' + repr(sys.exc_info))
++ else:
++ cb.append('!!!!!!!! No exception')
++ try:
++ vim.command('$ put =\'Running :put\'')
++ except KeyboardInterrupt:
++ cb.append('!!!!!!!! Caught KeyboardInterrupt')
++ except Exception:
++ cb.append('!!!!!!!! Caught exception: ' + repr(sys.exc_info))
++ else:
++ cb.append('No exception')
++ EOF
++ :debuggreedy
++ :call inputsave()
++ :call feedkeys("s\ns\ns\ns\nq\n")
++ :redir => output
++ :debug silent! py test_keyboard_interrupt()
++ :redir END
++ :0 debuggreedy
++ :silent $put =output
++ :unlet output
++ :py del test_keyboard_interrupt
++ :"
+ :" Cleanup
+ py << EOF
+ del cb
+*** ../vim-7.4.083/src/testdir/test86.ok 2013-11-04 00:34:47.000000000 +0100
+--- src/testdir/test86.ok 2013-11-11 00:56:11.000000000 +0100
+***************
+*** 1198,1200 ****
+--- 1198,1204 ----
+ vim.eval("Exe('echoerr ''jkl''')"):error:('Vim(echoerr):jkl',)
+ vim.eval("Exe('xxx_non_existent_command_xxx')"):error:('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',)
+ vim.bindeval("Exe('xxx_non_existent_command_xxx')"):error:('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',)
++ Caught KeyboardInterrupt
++ Running :put
++ No exception
++
+*** ../vim-7.4.083/src/testdir/test87.in 2013-11-04 00:34:47.000000000 +0100
+--- src/testdir/test87.in 2013-11-11 00:56:11.000000000 +0100
+***************
+*** 1232,1237 ****
+--- 1232,1268 ----
+ EOF
+ :delfunction Exe
+ :"
++ :" Regression: interrupting vim.command propagates to next vim.command
++ py3 << EOF
++ def test_keyboard_interrupt():
++ try:
++ vim.command('while 1 | endwhile')
++ except KeyboardInterrupt:
++ cb.append('Caught KeyboardInterrupt')
++ except Exception as e:
++ cb.append('!!!!!!!! Caught exception: ' + repr(e))
++ else:
++ cb.append('!!!!!!!! No exception')
++ try:
++ vim.command('$ put =\'Running :put\'')
++ except KeyboardInterrupt:
++ cb.append('!!!!!!!! Caught KeyboardInterrupt')
++ except Exception as e:
++ cb.append('!!!!!!!! Caught exception: ' + repr(e))
++ else:
++ cb.append('No exception')
++ EOF
++ :debuggreedy
++ :call inputsave()
++ :call feedkeys("s\ns\ns\ns\nq\n")
++ :redir => output
++ :debug silent! py3 test_keyboard_interrupt()
++ :redir END
++ :0 debuggreedy
++ :silent $put =output
++ :unlet output
++ :py3 del test_keyboard_interrupt
++ :"
+ :" Cleanup
+ py3 << EOF
+ del cb
+*** ../vim-7.4.083/src/testdir/test87.ok 2013-11-04 00:34:47.000000000 +0100
+--- src/testdir/test87.ok 2013-11-11 00:56:11.000000000 +0100
+***************
+*** 1187,1189 ****
+--- 1187,1193 ----
+ vim.eval("Exe('echoerr ''jkl''')"):(<class 'vim.error'>, error('Vim(echoerr):jkl',))
+ vim.eval("Exe('xxx_non_existent_command_xxx')"):(<class 'vim.error'>, error('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',))
+ vim.bindeval("Exe('xxx_non_existent_command_xxx')"):(<class 'vim.error'>, error('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',))
++ Caught KeyboardInterrupt
++ Running :put
++ No exception
++
+*** ../vim-7.4.083/src/version.c 2013-11-09 05:30:18.000000000 +0100
+--- src/version.c 2013-11-11 00:55:23.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 84,
+ /**/
+
+--
+Computers make very fast, very accurate, mistakes.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.085 b/patches/source/vim/patches/7.4.085
new file mode 100644
index 000000000..a6e9a8047
--- /dev/null
+++ b/patches/source/vim/patches/7.4.085
@@ -0,0 +1,118 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.085
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.085
+Problem: When inserting text in Visual block mode and moving the cursor the
+ wrong text gets repeated in other lines.
+Solution: Use the '[ mark to find the start of the actually inserted text.
+ (Christian Brabandt)
+Files: src/ops.c, src/testdir/test39.in, src/testdir/test39.ok
+
+
+*** ../vim-7.4.084/src/ops.c 2013-11-05 07:12:59.000000000 +0100
+--- src/ops.c 2013-11-11 01:23:14.000000000 +0100
+***************
+*** 2640,2645 ****
+--- 2640,2670 ----
+ {
+ struct block_def bd2;
+
++ /* The user may have moved the cursor before inserting something, try
++ * to adjust the block for that. */
++ if (oap->start.lnum == curbuf->b_op_start.lnum)
++ {
++ if (oap->op_type == OP_INSERT
++ && oap->start.col != curbuf->b_op_start.col)
++ {
++ oap->start.col = curbuf->b_op_start.col;
++ pre_textlen -= getviscol2(oap->start.col, oap->start.coladd)
++ - oap->start_vcol;
++ oap->start_vcol = getviscol2(oap->start.col, oap->start.coladd);
++ }
++ else if (oap->op_type == OP_APPEND
++ && oap->end.col >= curbuf->b_op_start.col)
++ {
++ oap->start.col = curbuf->b_op_start.col;
++ /* reset pre_textlen to the value of OP_INSERT */
++ pre_textlen += bd.textlen;
++ pre_textlen -= getviscol2(oap->start.col, oap->start.coladd)
++ - oap->start_vcol;
++ oap->start_vcol = getviscol2(oap->start.col, oap->start.coladd);
++ oap->op_type = OP_INSERT;
++ }
++ }
++
+ /*
+ * Spaces and tabs in the indent may have changed to other spaces and
+ * tabs. Get the starting column again and correct the length.
+*** ../vim-7.4.084/src/testdir/test39.in 2013-11-04 01:41:11.000000000 +0100
+--- src/testdir/test39.in 2013-11-11 01:20:51.000000000 +0100
+***************
+*** 19,24 ****
+--- 19,28 ----
+ :" Test block-change
+ G$khhhhhkkcmno
+ :$-4,$w! test.out
++ :" Test block-insert using cursor keys for movement
++ /^aaaa/
++ :exe ":norm! l\<C-V>jjjlllI\<Right>\<Right> \<Esc>"
++ :/^aa/,/^$/w >> test.out
+ :" gUe must uppercase a whole word, also when ß changes to SS
+ Gothe youtußeuu endYpk0wgUe
+ :" gUfx must uppercase until x, inclusive.
+***************
+*** 40,45 ****
+--- 44,54 ----
+ :qa!
+ ENDTEST
+
++ aaaaaa
++ bbbbbb
++ cccccc
++ dddddd
++
+ abcdefghijklm
+ abcdefghijklm
+ abcdefghijklm
+*** ../vim-7.4.084/src/testdir/test39.ok 2013-11-04 01:41:11.000000000 +0100
+--- src/testdir/test39.ok 2013-11-11 01:20:51.000000000 +0100
+***************
+*** 3,8 ****
+--- 3,13 ----
+ axyzqqqqef mno ghijklm
+ axyzqqqqefgmnoklm
+ abcdqqqqijklm
++ aaa aaa
++ bbb bbb
++ ccc ccc
++ ddd ddd
++
+ the YOUTUSSEUU end
+ - yOUSSTUSSEXu -
+ THE YOUTUSSEUU END
+*** ../vim-7.4.084/src/version.c 2013-11-11 01:05:43.000000000 +0100
+--- src/version.c 2013-11-11 01:18:01.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 85,
+ /**/
+
+--
+SOLDIER: What? Ridden on a horse?
+ARTHUR: Yes!
+SOLDIER: You're using coconuts!
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.086 b/patches/source/vim/patches/7.4.086
new file mode 100644
index 000000000..46f9eb90a
--- /dev/null
+++ b/patches/source/vim/patches/7.4.086
@@ -0,0 +1,145 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.086
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.086
+Problem: Skipping over an expression when not evaluating it does not work
+ properly for dict members.
+Solution: Skip over unrecognized expression. (ZyX)
+Files: src/eval.c, src/testdir/test34.in, src/testdir/test34.ok
+
+
+*** ../vim-7.4.085/src/eval.c 2013-11-08 04:30:06.000000000 +0100
+--- src/eval.c 2013-11-11 04:11:38.000000000 +0100
+***************
+*** 19845,19868 ****
+ while (ret == OK
+ && (**arg == '['
+ || (**arg == '.' && rettv->v_type == VAR_DICT)
+! || (**arg == '(' && rettv->v_type == VAR_FUNC))
+ && !vim_iswhite(*(*arg - 1)))
+ {
+ if (**arg == '(')
+ {
+ /* need to copy the funcref so that we can clear rettv */
+! functv = *rettv;
+! rettv->v_type = VAR_UNKNOWN;
+
+! /* Invoke the function. Recursive! */
+! s = functv.vval.v_string;
+ ret = get_func_tv(s, (int)STRLEN(s), rettv, arg,
+ curwin->w_cursor.lnum, curwin->w_cursor.lnum,
+ &len, evaluate, selfdict);
+
+ /* Clear the funcref afterwards, so that deleting it while
+ * evaluating the arguments is possible (see test55). */
+! clear_tv(&functv);
+
+ /* Stop the expression evaluation when immediately aborting on
+ * error, or when an interrupt occurred or an exception was thrown
+--- 19845,19874 ----
+ while (ret == OK
+ && (**arg == '['
+ || (**arg == '.' && rettv->v_type == VAR_DICT)
+! || (**arg == '(' && (!evaluate || rettv->v_type == VAR_FUNC)))
+ && !vim_iswhite(*(*arg - 1)))
+ {
+ if (**arg == '(')
+ {
+ /* need to copy the funcref so that we can clear rettv */
+! if (evaluate)
+! {
+! functv = *rettv;
+! rettv->v_type = VAR_UNKNOWN;
+
+! /* Invoke the function. Recursive! */
+! s = functv.vval.v_string;
+! }
+! else
+! s = (char_u *)"";
+ ret = get_func_tv(s, (int)STRLEN(s), rettv, arg,
+ curwin->w_cursor.lnum, curwin->w_cursor.lnum,
+ &len, evaluate, selfdict);
+
+ /* Clear the funcref afterwards, so that deleting it while
+ * evaluating the arguments is possible (see test55). */
+! if (evaluate)
+! clear_tv(&functv);
+
+ /* Stop the expression evaluation when immediately aborting on
+ * error, or when an interrupt occurred or an exception was thrown
+*** ../vim-7.4.085/src/testdir/test34.in 2012-07-16 16:51:29.000000000 +0200
+--- src/testdir/test34.in 2013-11-11 04:10:13.000000000 +0100
+***************
+*** 1,6 ****
+--- 1,7 ----
+ Test for user functions.
+ Also test an <expr> mapping calling a function.
+ Also test that a builtin function cannot be replaced.
++ Also test for regression when calling arbitrary expression.
+
+ STARTTEST
+ :so small.vim
+***************
+*** 62,68 ****
+ [(one again:call append(line('$'), max([1, 2, 3]))
+ :call extend(g:, {'max': function('min')})
+ :call append(line('$'), max([1, 2, 3]))
+! :$-7,$w! test.out
+ :delfunc Table
+ :delfunc Compute
+ :delfunc Expr1
+--- 63,79 ----
+ [(one again:call append(line('$'), max([1, 2, 3]))
+ :call extend(g:, {'max': function('min')})
+ :call append(line('$'), max([1, 2, 3]))
+! :try
+! : " Regression: the first line below used to throw ?E110: Missing ')'?
+! : " Second is here just to prove that this line is correct when not skipping
+! : " rhs of &&.
+! : $put =(0&&(function('tr'))(1, 2, 3))
+! : $put =(1&&(function('tr'))(1, 2, 3))
+! :catch
+! : $put ='!!! Unexpected exception:'
+! : $put =v:exception
+! :endtry
+! :$-9,$w! test.out
+ :delfunc Table
+ :delfunc Compute
+ :delfunc Expr1
+*** ../vim-7.4.085/src/testdir/test34.ok 2012-07-16 16:43:15.000000000 +0200
+--- src/testdir/test34.ok 2013-11-11 04:10:13.000000000 +0100
+***************
+*** 6,8 ****
+--- 6,10 ----
+ 1. one again
+ 3
+ 3
++ 0
++ 1
+*** ../vim-7.4.085/src/version.c 2013-11-11 01:29:16.000000000 +0100
+--- src/version.c 2013-11-11 04:15:59.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 86,
+ /**/
+
+--
+ARTHUR: The swallow may fly south with the sun, or the house martin or the
+ plover seek warmer hot lands in winter, yet these are not strangers to
+ our land.
+SOLDIER: Are you suggesting coconuts migrate?
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.087 b/patches/source/vim/patches/7.4.087
new file mode 100644
index 000000000..b8c1a48a9
--- /dev/null
+++ b/patches/source/vim/patches/7.4.087
@@ -0,0 +1,56 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.087
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.087
+Problem: Compiler warning on 64 bit Windows systems.
+Solution: Fix type cast. (Mike Williams)
+Files: src/ops.c
+
+
+*** ../vim-7.4.086/src/ops.c 2013-11-11 01:29:16.000000000 +0100
+--- src/ops.c 2013-11-11 23:16:06.000000000 +0100
+***************
+*** 2193,2199 ****
+ else
+ {
+ /* Replacing with \r or \n means splitting the line. */
+! after_p = alloc_check((unsigned)oldlen + 1 + n - STRLEN(newp));
+ if (after_p != NULL)
+ STRMOVE(after_p, oldp);
+ }
+--- 2193,2200 ----
+ else
+ {
+ /* Replacing with \r or \n means splitting the line. */
+! after_p = alloc_check(
+! (unsigned)(oldlen + 1 + n - STRLEN(newp)));
+ if (after_p != NULL)
+ STRMOVE(after_p, oldp);
+ }
+*** ../vim-7.4.086/src/version.c 2013-11-11 04:25:48.000000000 +0100
+--- src/version.c 2013-11-11 23:16:23.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 87,
+ /**/
+
+
+--
+SECOND SOLDIER: It could be carried by an African swallow!
+FIRST SOLDIER: Oh yes! An African swallow maybe ... but not a European
+ swallow. that's my point.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.088 b/patches/source/vim/patches/7.4.088
new file mode 100644
index 000000000..62dc91cac
--- /dev/null
+++ b/patches/source/vim/patches/7.4.088
@@ -0,0 +1,564 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.088
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.088
+Problem: When spell checking is enabled Asian characters are always marked
+ as error.
+Solution: When 'spelllang' contains "cjk" do not mark Asian characters as
+ error. (Ken Takata)
+Files: runtime/doc/options.txt, runtime/doc/spell.txt, src/mbyte.c,
+ src/option.c, src/spell.c, src/structs.h
+
+
+*** ../vim-7.4.087/runtime/doc/options.txt 2013-11-06 05:26:08.000000000 +0100
+--- runtime/doc/options.txt 2013-11-12 04:00:51.000000000 +0100
+***************
+*** 6555,6560 ****
+--- 6555,6563 ----
+ region by listing them: "en_us,en_ca" supports both US and Canadian
+ English, but not words specific for Australia, New Zealand or Great
+ Britain.
++ If the name "cjk" is included East Asian characters are excluded from
++ spell checking. This is useful when editing text that also has Asian
++ words.
+ *E757*
+ As a special case the name of a .spl file can be given as-is. The
+ first "_xx" in the name is removed and used as the region name
+*** ../vim-7.4.087/runtime/doc/spell.txt 2013-08-10 13:25:01.000000000 +0200
+--- runtime/doc/spell.txt 2013-11-12 04:02:27.000000000 +0100
+***************
+*** 269,274 ****
+--- 269,281 ----
+ latin1 yi transliterated Yiddish
+ utf-8 yi-tr transliterated Yiddish
+
++ *spell-cjk*
++ Chinese, Japanese and other East Asian characters are normally marked as
++ errors, because spell checking of these characters is not supported. If
++ 'spelllang' includes "cjk", these characters are not marked as errors. This
++ is useful when editing text with spell checking while some Asian words are
++ present.
++
+
+ SPELL FILES *spell-load*
+
+*** ../vim-7.4.087/src/mbyte.c 2013-07-05 20:07:21.000000000 +0200
+--- src/mbyte.c 2013-11-12 03:55:50.000000000 +0100
+***************
+*** 947,954 ****
+ {
+ case 0x2121: /* ZENKAKU space */
+ return 0;
+! case 0x2122: /* KU-TEN (Japanese comma) */
+! case 0x2123: /* TOU-TEN (Japanese period) */
+ case 0x2124: /* ZENKAKU comma */
+ case 0x2125: /* ZENKAKU period */
+ return 1;
+--- 947,954 ----
+ {
+ case 0x2121: /* ZENKAKU space */
+ return 0;
+! case 0x2122: /* TOU-TEN (Japanese comma) */
+! case 0x2123: /* KU-TEN (Japanese period) */
+ case 0x2124: /* ZENKAKU comma */
+ case 0x2125: /* ZENKAKU period */
+ return 1;
+***************
+*** 2477,2485 ****
+ /* sorted list of non-overlapping intervals */
+ static struct clinterval
+ {
+! unsigned short first;
+! unsigned short last;
+! unsigned short class;
+ } classes[] =
+ {
+ {0x037e, 0x037e, 1}, /* Greek question mark */
+--- 2477,2485 ----
+ /* sorted list of non-overlapping intervals */
+ static struct clinterval
+ {
+! unsigned int first;
+! unsigned int last;
+! unsigned int class;
+ } classes[] =
+ {
+ {0x037e, 0x037e, 1}, /* Greek question mark */
+***************
+*** 2544,2549 ****
+--- 2544,2553 ----
+ {0xff1a, 0xff20, 1}, /* half/fullwidth ASCII */
+ {0xff3b, 0xff40, 1}, /* half/fullwidth ASCII */
+ {0xff5b, 0xff65, 1}, /* half/fullwidth ASCII */
++ {0x20000, 0x2a6df, 0x4e00}, /* CJK Ideographs */
++ {0x2a700, 0x2b73f, 0x4e00}, /* CJK Ideographs */
++ {0x2b740, 0x2b81f, 0x4e00}, /* CJK Ideographs */
++ {0x2f800, 0x2fa1f, 0x4e00}, /* CJK Ideographs */
+ };
+ int bot = 0;
+ int top = sizeof(classes) / sizeof(struct clinterval) - 1;
+***************
+*** 2563,2571 ****
+ while (top >= bot)
+ {
+ mid = (bot + top) / 2;
+! if (classes[mid].last < c)
+ bot = mid + 1;
+! else if (classes[mid].first > c)
+ top = mid - 1;
+ else
+ return (int)classes[mid].class;
+--- 2567,2575 ----
+ while (top >= bot)
+ {
+ mid = (bot + top) / 2;
+! if (classes[mid].last < (unsigned int)c)
+ bot = mid + 1;
+! else if (classes[mid].first > (unsigned int)c)
+ top = mid - 1;
+ else
+ return (int)classes[mid].class;
+*** ../vim-7.4.087/src/option.c 2013-11-08 04:30:06.000000000 +0100
+--- src/option.c 2013-11-12 04:34:46.000000000 +0100
+***************
+*** 7122,7127 ****
+--- 7122,7132 ----
+ if (varp == &(curwin->w_s->b_p_spl))
+ {
+ char_u fname[200];
++ char_u *q = curwin->w_s->b_p_spl;
++
++ /* Skip the first name if it is "cjk". */
++ if (STRNCMP(q, "cjk,", 4) == 0)
++ q += 4;
+
+ /*
+ * Source the spell/LANG.vim in 'runtimepath'.
+***************
+*** 7129,7139 ****
+ * Use the first name in 'spelllang' up to '_region' or
+ * '.encoding'.
+ */
+! for (p = curwin->w_s->b_p_spl; *p != NUL; ++p)
+ if (vim_strchr((char_u *)"_.,", *p) != NULL)
+ break;
+! vim_snprintf((char *)fname, 200, "spell/%.*s.vim",
+! (int)(p - curwin->w_s->b_p_spl), curwin->w_s->b_p_spl);
+ source_runtime(fname, TRUE);
+ }
+ #endif
+--- 7134,7143 ----
+ * Use the first name in 'spelllang' up to '_region' or
+ * '.encoding'.
+ */
+! for (p = q; *p != NUL; ++p)
+ if (vim_strchr((char_u *)"_.,", *p) != NULL)
+ break;
+! vim_snprintf((char *)fname, 200, "spell/%.*s.vim", (int)(p - q), q);
+ source_runtime(fname, TRUE);
+ }
+ #endif
+*** ../vim-7.4.087/src/spell.c 2013-09-29 13:38:25.000000000 +0200
+--- src/spell.c 2013-11-12 04:37:33.000000000 +0100
+***************
+*** 754,762 ****
+ static void clear_spell_chartab __ARGS((spelltab_T *sp));
+ static int set_spell_finish __ARGS((spelltab_T *new_st));
+ static int spell_iswordp __ARGS((char_u *p, win_T *wp));
+! static int spell_iswordp_nmw __ARGS((char_u *p));
+ #ifdef FEAT_MBYTE
+! static int spell_mb_isword_class __ARGS((int cl));
+ static int spell_iswordp_w __ARGS((int *p, win_T *wp));
+ #endif
+ static int write_spell_prefcond __ARGS((FILE *fd, garray_T *gap));
+--- 754,762 ----
+ static void clear_spell_chartab __ARGS((spelltab_T *sp));
+ static int set_spell_finish __ARGS((spelltab_T *new_st));
+ static int spell_iswordp __ARGS((char_u *p, win_T *wp));
+! static int spell_iswordp_nmw __ARGS((char_u *p, win_T *wp));
+ #ifdef FEAT_MBYTE
+! static int spell_mb_isword_class __ARGS((int cl, win_T *wp));
+ static int spell_iswordp_w __ARGS((int *p, win_T *wp));
+ #endif
+ static int write_spell_prefcond __ARGS((FILE *fd, garray_T *gap));
+***************
+*** 1149,1155 ****
+
+ /* When we are at a non-word character there is no error, just
+ * skip over the character (try looking for a word after it). */
+! else if (!spell_iswordp_nmw(ptr))
+ {
+ if (capcol != NULL && wp->w_s->b_cap_prog != NULL)
+ {
+--- 1149,1155 ----
+
+ /* When we are at a non-word character there is no error, just
+ * skip over the character (try looking for a word after it). */
+! else if (!spell_iswordp_nmw(ptr, wp))
+ {
+ if (capcol != NULL && wp->w_s->b_cap_prog != NULL)
+ {
+***************
+*** 1561,1567 ****
+ * accept a no-caps word, even when the dictionary
+ * word specifies ONECAP. */
+ mb_ptr_back(mip->mi_word, p);
+! if (spell_iswordp_nmw(p)
+ ? capflags == WF_ONECAP
+ : (flags & WF_ONECAP) != 0
+ && capflags != WF_ONECAP)
+--- 1561,1567 ----
+ * accept a no-caps word, even when the dictionary
+ * word specifies ONECAP. */
+ mb_ptr_back(mip->mi_word, p);
+! if (spell_iswordp_nmw(p, mip->mi_win)
+ ? capflags == WF_ONECAP
+ : (flags & WF_ONECAP) != 0
+ && capflags != WF_ONECAP)
+***************
+*** 4234,4240 ****
+ if (spl_copy == NULL)
+ goto theend;
+
+! /* loop over comma separated language names. */
+ for (splp = spl_copy; *splp != NUL; )
+ {
+ /* Get one language name. */
+--- 4234,4242 ----
+ if (spl_copy == NULL)
+ goto theend;
+
+! wp->w_s->b_cjk = 0;
+!
+! /* Loop over comma separated language names. */
+ for (splp = spl_copy; *splp != NUL; )
+ {
+ /* Get one language name. */
+***************
+*** 4242,4247 ****
+--- 4244,4255 ----
+ region = NULL;
+ len = (int)STRLEN(lang);
+
++ if (STRCMP(lang, "cjk") == 0)
++ {
++ wp->w_s->b_cjk = 1;
++ continue;
++ }
++
+ /* If the name ends in ".spl" use it as the name of the spell file.
+ * If there is a region name let "region" point to it and remove it
+ * from the name. */
+***************
+*** 4601,4607 ****
+ int past_second = FALSE; /* past second word char */
+
+ /* find first letter */
+! for (p = word; !spell_iswordp_nmw(p); mb_ptr_adv(p))
+ if (end == NULL ? *p == NUL : p >= end)
+ return 0; /* only non-word characters, illegal word */
+ #ifdef FEAT_MBYTE
+--- 4609,4615 ----
+ int past_second = FALSE; /* past second word char */
+
+ /* find first letter */
+! for (p = word; !spell_iswordp_nmw(p, curwin); mb_ptr_adv(p))
+ if (end == NULL ? *p == NUL : p >= end)
+ return 0; /* only non-word characters, illegal word */
+ #ifdef FEAT_MBYTE
+***************
+*** 4617,4623 ****
+ * But a word with an upper char only at start is a ONECAP.
+ */
+ for ( ; end == NULL ? *p != NUL : p < end; mb_ptr_adv(p))
+! if (spell_iswordp_nmw(p))
+ {
+ c = PTR2CHAR(p);
+ if (!SPELL_ISUPPER(c))
+--- 4625,4631 ----
+ * But a word with an upper char only at start is a ONECAP.
+ */
+ for ( ; end == NULL ? *p != NUL : p < end; mb_ptr_adv(p))
+! if (spell_iswordp_nmw(p, curwin))
+ {
+ c = PTR2CHAR(p);
+ if (!SPELL_ISUPPER(c))
+***************
+*** 9907,9913 ****
+
+ c = mb_ptr2char(s);
+ if (c > 255)
+! return spell_mb_isword_class(mb_get_class(s));
+ return spelltab.st_isw[c];
+ }
+ #endif
+--- 9915,9921 ----
+
+ c = mb_ptr2char(s);
+ if (c > 255)
+! return spell_mb_isword_class(mb_get_class(s), wp);
+ return spelltab.st_isw[c];
+ }
+ #endif
+***************
+*** 9920,9927 ****
+ * Unlike spell_iswordp() this doesn't check for "midword" characters.
+ */
+ static int
+! spell_iswordp_nmw(p)
+ char_u *p;
+ {
+ #ifdef FEAT_MBYTE
+ int c;
+--- 9928,9936 ----
+ * Unlike spell_iswordp() this doesn't check for "midword" characters.
+ */
+ static int
+! spell_iswordp_nmw(p, wp)
+ char_u *p;
++ win_T *wp;
+ {
+ #ifdef FEAT_MBYTE
+ int c;
+***************
+*** 9930,9936 ****
+ {
+ c = mb_ptr2char(p);
+ if (c > 255)
+! return spell_mb_isword_class(mb_get_class(p));
+ return spelltab.st_isw[c];
+ }
+ #endif
+--- 9939,9945 ----
+ {
+ c = mb_ptr2char(p);
+ if (c > 255)
+! return spell_mb_isword_class(mb_get_class(p), wp);
+ return spelltab.st_isw[c];
+ }
+ #endif
+***************
+*** 9942,9952 ****
+ * Return TRUE if word class indicates a word character.
+ * Only for characters above 255.
+ * Unicode subscript and superscript are not considered word characters.
+ */
+ static int
+! spell_mb_isword_class(cl)
+! int cl;
+ {
+ return cl >= 2 && cl != 0x2070 && cl != 0x2080;
+ }
+
+--- 9951,9966 ----
+ * Return TRUE if word class indicates a word character.
+ * Only for characters above 255.
+ * Unicode subscript and superscript are not considered word characters.
++ * See also dbcs_class() and utf_class() in mbyte.c.
+ */
+ static int
+! spell_mb_isword_class(cl, wp)
+! int cl;
+! win_T *wp;
+ {
++ if (wp->w_s->b_cjk)
++ /* East Asian characters are not considered word characters. */
++ return cl == 2 || cl == 0x2800;
+ return cl >= 2 && cl != 0x2070 && cl != 0x2080;
+ }
+
+***************
+*** 9971,9979 ****
+ if (*s > 255)
+ {
+ if (enc_utf8)
+! return spell_mb_isword_class(utf_class(*s));
+ if (enc_dbcs)
+! return dbcs_class((unsigned)*s >> 8, *s & 0xff) >= 2;
+ return 0;
+ }
+ return spelltab.st_isw[*s];
+--- 9985,9994 ----
+ if (*s > 255)
+ {
+ if (enc_utf8)
+! return spell_mb_isword_class(utf_class(*s), wp);
+ if (enc_dbcs)
+! return spell_mb_isword_class(
+! dbcs_class((unsigned)*s >> 8, *s & 0xff), wp);
+ return 0;
+ }
+ return spelltab.st_isw[*s];
+***************
+*** 10193,10205 ****
+ line = ml_get_curline();
+ p = line + curwin->w_cursor.col;
+ /* Backup to before start of word. */
+! while (p > line && spell_iswordp_nmw(p))
+ mb_ptr_back(line, p);
+ /* Forward to start of word. */
+! while (*p != NUL && !spell_iswordp_nmw(p))
+ mb_ptr_adv(p);
+
+! if (!spell_iswordp_nmw(p)) /* No word found. */
+ {
+ beep_flush();
+ return;
+--- 10208,10220 ----
+ line = ml_get_curline();
+ p = line + curwin->w_cursor.col;
+ /* Backup to before start of word. */
+! while (p > line && spell_iswordp_nmw(p, curwin))
+ mb_ptr_back(line, p);
+ /* Forward to start of word. */
+! while (*p != NUL && !spell_iswordp_nmw(p, curwin))
+ mb_ptr_adv(p);
+
+! if (!spell_iswordp_nmw(p, curwin)) /* No word found. */
+ {
+ beep_flush();
+ return;
+***************
+*** 10436,10442 ****
+ for (;;)
+ {
+ mb_ptr_back(line, p);
+! if (p == line || spell_iswordp_nmw(p))
+ break;
+ if (vim_regexec(&regmatch, p, 0)
+ && regmatch.endp[0] == line + endcol)
+--- 10451,10457 ----
+ for (;;)
+ {
+ mb_ptr_back(line, p);
+! if (p == line || spell_iswordp_nmw(p, curwin))
+ break;
+ if (vim_regexec(&regmatch, p, 0)
+ && regmatch.endp[0] == line + endcol)
+***************
+*** 11645,11651 ****
+
+ /* When appending a compound word after a word character don't
+ * use Onecap. */
+! if (p != NULL && spell_iswordp_nmw(p))
+ c &= ~WF_ONECAP;
+ make_case_word(tword + sp->ts_splitoff,
+ preword + sp->ts_prewordlen, c);
+--- 11660,11666 ----
+
+ /* When appending a compound word after a word character don't
+ * use Onecap. */
+! if (p != NULL && spell_iswordp_nmw(p, curwin))
+ c &= ~WF_ONECAP;
+ make_case_word(tword + sp->ts_splitoff,
+ preword + sp->ts_prewordlen, c);
+***************
+*** 11895,11901 ****
+ * character when the word ends. But only when the
+ * good word can end. */
+ if (((!try_compound && !spell_iswordp_nmw(fword
+! + sp->ts_fidx))
+ || fword_ends)
+ && fword[sp->ts_fidx] != NUL
+ && goodword_ends)
+--- 11910,11917 ----
+ * character when the word ends. But only when the
+ * good word can end. */
+ if (((!try_compound && !spell_iswordp_nmw(fword
+! + sp->ts_fidx,
+! curwin))
+ || fword_ends)
+ && fword[sp->ts_fidx] != NUL
+ && goodword_ends)
+***************
+*** 14226,14232 ****
+ }
+ else
+ {
+! if (spell_iswordp_nmw(s))
+ *t++ = *s;
+ ++s;
+ }
+--- 14242,14248 ----
+ }
+ else
+ {
+! if (spell_iswordp_nmw(s, curwin))
+ *t++ = *s;
+ ++s;
+ }
+***************
+*** 14521,14527 ****
+ else
+ {
+ did_white = FALSE;
+! if (!spell_iswordp_nmw(t))
+ continue;
+ }
+ }
+--- 14537,14543 ----
+ else
+ {
+ did_white = FALSE;
+! if (!spell_iswordp_nmw(t, curwin))
+ continue;
+ }
+ }
+***************
+*** 16045,16051 ****
+ for (p = line + startcol; p > line; )
+ {
+ mb_ptr_back(line, p);
+! if (spell_iswordp_nmw(p))
+ break;
+ }
+
+--- 16061,16067 ----
+ for (p = line + startcol; p > line; )
+ {
+ mb_ptr_back(line, p);
+! if (spell_iswordp_nmw(p, curwin))
+ break;
+ }
+
+*** ../vim-7.4.087/src/structs.h 2013-11-09 05:30:18.000000000 +0100
+--- src/structs.h 2013-11-12 03:55:50.000000000 +0100
+***************
+*** 1310,1315 ****
+--- 1310,1318 ----
+ regprog_T *b_cap_prog; /* program for 'spellcapcheck' */
+ char_u *b_p_spf; /* 'spellfile' */
+ char_u *b_p_spl; /* 'spelllang' */
++ # ifdef FEAT_MBYTE
++ int b_cjk; /* all CJK letters as OK */
++ # endif
+ #endif
+ #if !defined(FEAT_SYN_HL) && !defined(FEAT_SPELL)
+ int dummy;
+*** ../vim-7.4.087/src/version.c 2013-11-11 23:17:31.000000000 +0100
+--- src/version.c 2013-11-12 03:59:03.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 88,
+ /**/
+
+--
+THEOREM: VI is perfect.
+PROOF: VI in roman numerals is 6. The natural numbers < 6 which divide 6 are
+1, 2, and 3. 1+2+3 = 6. So 6 is a perfect number. Therefore, VI is perfect.
+QED
+ -- Arthur Tateishi
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.089 b/patches/source/vim/patches/7.4.089
new file mode 100644
index 000000000..80697cef2
--- /dev/null
+++ b/patches/source/vim/patches/7.4.089
@@ -0,0 +1,47 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.089
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.089
+Problem: When editing a file in a directory mounted through sshfs Vim
+ doesn't set the security context on a renamed file.
+Solution: Add mch_copy_sec() to vim_rename(). (Peter Backes)
+Files: src/fileio.c
+
+
+*** ../vim-7.4.088/src/fileio.c 2013-08-30 17:06:56.000000000 +0200
+--- src/fileio.c 2013-11-12 05:07:22.000000000 +0100
+***************
+*** 6707,6712 ****
+--- 6707,6715 ----
+ mch_set_acl(to, acl);
+ mch_free_acl(acl);
+ #endif
++ #ifdef HAVE_SELINUX
++ mch_copy_sec(from, to)
++ #endif
+ if (errmsg != NULL)
+ {
+ EMSG2(errmsg, to);
+*** ../vim-7.4.088/src/version.c 2013-11-12 04:43:57.000000000 +0100
+--- src/version.c 2013-11-12 05:11:02.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 89,
+ /**/
+
+--
+Kiss me twice. I'm schizophrenic.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.090 b/patches/source/vim/patches/7.4.090
new file mode 100644
index 000000000..a7ee9275d
--- /dev/null
+++ b/patches/source/vim/patches/7.4.090
@@ -0,0 +1,223 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.090
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.090
+Problem: Win32: When a directory name contains an exclamation mark,
+ completion doesn't complete the contents of the directory.
+Solution: Escape the exclamation mark. (Jan Stocker)
+Files: src/ex_getln.c, src/testdir/test102.in, src/testdir/test102.ok
+ src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
+ src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
+ src/testdir/Make_vms.mms, src/testdir/Makefile
+
+
+*** ../vim-7.4.089/src/ex_getln.c 2013-11-09 05:30:18.000000000 +0100
+--- src/ex_getln.c 2013-11-12 05:23:15.000000000 +0100
+***************
+*** 3852,3860 ****
+ char_u buf[20];
+ int j = 0;
+
+! /* Don't escape '[' and '{' if they are in 'isfname'. */
+ for (p = PATH_ESC_CHARS; *p != NUL; ++p)
+! if ((*p != '[' && *p != '{') || !vim_isfilec(*p))
+ buf[j++] = *p;
+ buf[j] = NUL;
+ p = vim_strsave_escaped(fname, buf);
+--- 3852,3860 ----
+ char_u buf[20];
+ int j = 0;
+
+! /* Don't escape '[', '{' and '!' if they are in 'isfname'. */
+ for (p = PATH_ESC_CHARS; *p != NUL; ++p)
+! if ((*p != '[' && *p != '{' && *p != '!') || !vim_isfilec(*p))
+ buf[j++] = *p;
+ buf[j] = NUL;
+ p = vim_strsave_escaped(fname, buf);
+*** ../vim-7.4.089/src/testdir/test102.in 2013-11-12 05:27:48.000000000 +0100
+--- src/testdir/test102.in 2013-11-12 05:21:26.000000000 +0100
+***************
+*** 0 ****
+--- 1,12 ----
++ Test if fnameescape is correct for special chars like !
++
++ STARTTEST
++ :%d
++ :let fname = 'Xspa ce'
++ :try | exe "w! " . fnameescape(fname) | put='Space' | endtry
++ :let fname = 'Xemark!'
++ :try | exe "w! " . fnameescape(fname) | put='ExclamationMark' | endtry
++ :w! test.out
++ :qa!
++ ENDTEST
++
+*** ../vim-7.4.089/src/testdir/test102.ok 2013-11-12 05:27:48.000000000 +0100
+--- src/testdir/test102.ok 2013-11-12 05:21:19.000000000 +0100
+***************
+*** 0 ****
+--- 1,3 ----
++
++ Space
++ ExclamationMark
+*** ../vim-7.4.089/src/testdir/Make_amiga.mak 2013-11-08 04:30:06.000000000 +0100
+--- src/testdir/Make_amiga.mak 2013-11-12 05:20:03.000000000 +0100
+***************
+*** 34,40 ****
+ test81.out test82.out test83.out test84.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+! test99.out test100.out test101.out
+
+ .SUFFIXES: .in .out
+
+--- 34,40 ----
+ test81.out test82.out test83.out test84.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+! test99.out test100.out test101.out test102.out
+
+ .SUFFIXES: .in .out
+
+***************
+*** 152,154 ****
+--- 152,155 ----
+ test99.out: test99.in
+ test100.out: test100.in
+ test101.out: test101.in
++ test102.out: test102.in
+*** ../vim-7.4.089/src/testdir/Make_dos.mak 2013-11-08 04:30:06.000000000 +0100
+--- src/testdir/Make_dos.mak 2013-11-12 05:20:10.000000000 +0100
+***************
+*** 33,39 ****
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100.out test101.out
+
+ SCRIPTS32 = test50.out test70.out
+
+--- 33,39 ----
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100.out test101.out test102.out
+
+ SCRIPTS32 = test50.out test70.out
+
+*** ../vim-7.4.089/src/testdir/Make_ming.mak 2013-11-08 04:30:06.000000000 +0100
+--- src/testdir/Make_ming.mak 2013-11-12 05:20:14.000000000 +0100
+***************
+*** 53,59 ****
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100out test101.out
+
+ SCRIPTS32 = test50.out test70.out
+
+--- 53,59 ----
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100out test101.out test102.out
+
+ SCRIPTS32 = test50.out test70.out
+
+*** ../vim-7.4.089/src/testdir/Make_os2.mak 2013-11-08 04:30:06.000000000 +0100
+--- src/testdir/Make_os2.mak 2013-11-12 05:20:18.000000000 +0100
+***************
+*** 35,41 ****
+ test81.out test82.out test83.out test84.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100.out test101.out
+
+ .SUFFIXES: .in .out
+
+--- 35,41 ----
+ test81.out test82.out test83.out test84.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100.out test101.out test102.out
+
+ .SUFFIXES: .in .out
+
+*** ../vim-7.4.089/src/testdir/Make_vms.mms 2013-11-08 04:30:06.000000000 +0100
+--- src/testdir/Make_vms.mms 2013-11-12 05:20:21.000000000 +0100
+***************
+*** 4,10 ****
+ # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
+ # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
+ #
+! # Last change: 2013 Nov 08
+ #
+ # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
+ # Edit the lines in the Configuration section below to select.
+--- 4,10 ----
+ # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
+ # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
+ #
+! # Last change: 2013 Nov 12
+ #
+ # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
+ # Edit the lines in the Configuration section below to select.
+***************
+*** 79,85 ****
+ test82.out test83.out test84.out test88.out test89.out \
+ test90.out test91.out test92.out test93.out test94.out \
+ test95.out test96.out test97.out test98.out test99.out \
+! test100.out test101.out
+
+ # Known problems:
+ # Test 30: a problem around mac format - unknown reason
+--- 79,85 ----
+ test82.out test83.out test84.out test88.out test89.out \
+ test90.out test91.out test92.out test93.out test94.out \
+ test95.out test96.out test97.out test98.out test99.out \
+! test100.out test101.out test102.out
+
+ # Known problems:
+ # Test 30: a problem around mac format - unknown reason
+*** ../vim-7.4.089/src/testdir/Makefile 2013-11-08 04:30:06.000000000 +0100
+--- src/testdir/Makefile 2013-11-12 05:20:32.000000000 +0100
+***************
+*** 30,36 ****
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+! test99.out test100.out test101.out
+
+ SCRIPTS_GUI = test16.out
+
+--- 30,36 ----
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+! test99.out test100.out test101.out test102.out
+
+ SCRIPTS_GUI = test16.out
+
+*** ../vim-7.4.089/src/version.c 2013-11-12 05:11:58.000000000 +0100
+--- src/version.c 2013-11-12 05:24:24.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 90,
+ /**/
+
+--
+If you don't get everything you want, think of
+everything you didn't get and don't want.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.091 b/patches/source/vim/patches/7.4.091
new file mode 100644
index 000000000..230601df3
--- /dev/null
+++ b/patches/source/vim/patches/7.4.091
@@ -0,0 +1,59 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.091
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.091 (after 7.4.089)
+Problem: Missing semicolon.
+Solution: Add the semicolon.
+Files: src/fileio.c
+
+
+*** ../vim-7.4.090/src/fileio.c 2013-11-12 05:11:58.000000000 +0100
+--- src/fileio.c 2013-11-12 18:07:47.000000000 +0100
+***************
+*** 6708,6714 ****
+ mch_free_acl(acl);
+ #endif
+ #ifdef HAVE_SELINUX
+! mch_copy_sec(from, to)
+ #endif
+ if (errmsg != NULL)
+ {
+--- 6708,6714 ----
+ mch_free_acl(acl);
+ #endif
+ #ifdef HAVE_SELINUX
+! mch_copy_sec(from, to);
+ #endif
+ if (errmsg != NULL)
+ {
+*** ../vim-7.4.090/src/version.c 2013-11-12 05:28:08.000000000 +0100
+--- src/version.c 2013-11-12 18:08:33.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 91,
+ /**/
+
+--
+CART DRIVER: Bring out your dead!
+ We follow the cart through a wretched, impoverished plague-ridden village.
+ A few starved mongrels run about in the mud scavenging. In the open
+ doorway of one house perhaps we jug glimpse a pair of legs dangling from
+ the ceiling. In another doorway an OLD WOMAN is beating a cat against a
+ wall rather like one does with a mat. The cart passes round a dead donkey
+ or cow in the mud. And a MAN tied to a cart is being hammered to death by
+ four NUNS with huge mallets.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.092 b/patches/source/vim/patches/7.4.092
new file mode 100644
index 000000000..e74888eba
--- /dev/null
+++ b/patches/source/vim/patches/7.4.092
@@ -0,0 +1,62 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.092
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.092 (after 7.4.088)
+Problem: Can't build small version.
+Solution: Add #ifdef where the b_cjk flag is used. (Ken Takata)
+Files: src/spell.c
+
+
+*** ../vim-7.4.091/src/spell.c 2013-11-12 04:43:57.000000000 +0100
+--- src/spell.c 2013-11-14 03:51:24.000000000 +0100
+***************
+*** 4234,4240 ****
+--- 4234,4242 ----
+ if (spl_copy == NULL)
+ goto theend;
+
++ #ifdef FEAT_MBYTE
+ wp->w_s->b_cjk = 0;
++ #endif
+
+ /* Loop over comma separated language names. */
+ for (splp = spl_copy; *splp != NUL; )
+***************
+*** 4246,4252 ****
+--- 4248,4256 ----
+
+ if (STRCMP(lang, "cjk") == 0)
+ {
++ #ifdef FEAT_MBYTE
+ wp->w_s->b_cjk = 1;
++ #endif
+ continue;
+ }
+
+*** ../vim-7.4.091/src/version.c 2013-11-12 18:09:20.000000000 +0100
+--- src/version.c 2013-11-14 03:52:18.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 92,
+ /**/
+
+--
+ARTHUR: Old woman!
+DENNIS: Man!
+ARTHUR: Man. I'm sorry. Old man, What knight live in that castle over there?
+DENNIS: I'm thirty-seven.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.093 b/patches/source/vim/patches/7.4.093
new file mode 100644
index 000000000..24da0a8f3
--- /dev/null
+++ b/patches/source/vim/patches/7.4.093
@@ -0,0 +1,72 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.093
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.093
+Problem: Configure can't use LuaJIT on ubuntu 12.04.
+Solution: Adjust the configure regexp that locates the version number.
+ (Charles Strahan)
+Files: src/configure.in, src/auto/configure
+
+
+*** ../vim-7.4.092/src/configure.in 2013-11-04 04:57:46.000000000 +0100
+--- src/configure.in 2013-11-17 20:12:04.000000000 +0100
+***************
+*** 496,502 ****
+ if test "X$vi_cv_path_luajit" != "X"; then
+ dnl -- find LuaJIT version
+ AC_CACHE_CHECK(LuaJIT version, vi_cv_version_luajit,
+! [ vi_cv_version_luajit=`${vi_cv_path_luajit} -v | sed 's/LuaJIT \([[0-9.]]*\)\.[[0-9]] .*/\1/'` ])
+ AC_CACHE_CHECK(Lua version of LuaJIT, vi_cv_version_lua_luajit,
+ [ vi_cv_version_lua_luajit=`${vi_cv_path_luajit} -e "print(_VERSION)" | sed 's/.* //'` ])
+ vi_cv_path_lua="$vi_cv_path_luajit"
+--- 496,502 ----
+ if test "X$vi_cv_path_luajit" != "X"; then
+ dnl -- find LuaJIT version
+ AC_CACHE_CHECK(LuaJIT version, vi_cv_version_luajit,
+! [ vi_cv_version_luajit=`${vi_cv_path_luajit} -v 2>&1 | sed 's/LuaJIT \([[0-9.]]*\)\.[[0-9]]\(-[[a-z0-9]]\+\)\? .*/\1/'` ])
+ AC_CACHE_CHECK(Lua version of LuaJIT, vi_cv_version_lua_luajit,
+ [ vi_cv_version_lua_luajit=`${vi_cv_path_luajit} -e "print(_VERSION)" | sed 's/.* //'` ])
+ vi_cv_path_lua="$vi_cv_path_luajit"
+*** ../vim-7.4.092/src/auto/configure 2013-11-04 04:57:46.000000000 +0100
+--- src/auto/configure 2013-11-17 20:13:30.000000000 +0100
+***************
+*** 4743,4749 ****
+ if test "${vi_cv_version_luajit+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+! vi_cv_version_luajit=`${vi_cv_path_luajit} -v | sed 's/LuaJIT \([0-9.]*\)\.[0-9] .*/\1/'`
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_luajit" >&5
+ $as_echo "$vi_cv_version_luajit" >&6; }
+--- 4743,4749 ----
+ if test "${vi_cv_version_luajit+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+! vi_cv_version_luajit=`${vi_cv_path_luajit} -v 2>&1 | sed 's/LuaJIT \([0-9.]*\)\.[0-9]\(-[a-z0-9]\+\)\? .*/\1/'`
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_luajit" >&5
+ $as_echo "$vi_cv_version_luajit" >&6; }
+*** ../vim-7.4.092/src/version.c 2013-11-14 03:54:02.000000000 +0100
+--- src/version.c 2013-11-17 20:13:43.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 93,
+ /**/
+
+--
+"Beware of bugs in the above code; I have only proved
+it correct, not tried it." -- Donald Knuth
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.094 b/patches/source/vim/patches/7.4.094
new file mode 100644
index 000000000..96ebc4d41
--- /dev/null
+++ b/patches/source/vim/patches/7.4.094
@@ -0,0 +1,139 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.094
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.094
+Problem: Configure may not find that -lint is needed for gettext().
+Solution: Check for gettext() with empty $LIBS. (Thomas De Schampheleire)
+Files: src/configure.in, src/auto/configure
+
+
+*** ../vim-7.4.093/src/configure.in 2013-11-17 20:17:05.000000000 +0100
+--- src/configure.in 2013-11-17 20:23:49.000000000 +0100
+***************
+*** 3725,3730 ****
+--- 3725,3733 ----
+ fi
+
+ dnl Check if gettext() is working and if it needs -lintl
++ dnl We take care to base this on an empty LIBS: on some systems libelf would be
++ dnl in LIBS and implicitly take along libintl. The final LIBS would then not
++ dnl contain libintl, and the link step would fail due to -Wl,--as-needed.
+ AC_MSG_CHECKING(--disable-nls argument)
+ AC_ARG_ENABLE(nls,
+ [ --disable-nls Don't support NLS (gettext()).], ,
+***************
+*** 3743,3758 ****
+ if test -f po/Makefile; then
+ have_gettext="no"
+ if test -n "$MSGFMT"; then
+ AC_TRY_LINK(
+ [#include <libintl.h>],
+ [gettext("Test");],
+! AC_MSG_RESULT([gettext() works]); have_gettext="yes",
+! olibs=$LIBS
+! LIBS="$LIBS -lintl"
+ AC_TRY_LINK(
+ [#include <libintl.h>],
+ [gettext("Test");],
+! AC_MSG_RESULT([gettext() works with -lintl]); have_gettext="yes",
+ AC_MSG_RESULT([gettext() doesn't work]);
+ LIBS=$olibs))
+ else
+--- 3746,3763 ----
+ if test -f po/Makefile; then
+ have_gettext="no"
+ if test -n "$MSGFMT"; then
++ olibs=$LIBS
++ LIBS=""
+ AC_TRY_LINK(
+ [#include <libintl.h>],
+ [gettext("Test");],
+! AC_MSG_RESULT([gettext() works]); have_gettext="yes"; LIBS=$olibs,
+! LIBS="-lintl"
+ AC_TRY_LINK(
+ [#include <libintl.h>],
+ [gettext("Test");],
+! AC_MSG_RESULT([gettext() works with -lintl]); have_gettext="yes";
+! LIBS="$olibs -lintl",
+ AC_MSG_RESULT([gettext() doesn't work]);
+ LIBS=$olibs))
+ else
+*** ../vim-7.4.093/src/auto/configure 2013-11-17 20:17:05.000000000 +0100
+--- src/auto/configure 2013-11-17 20:25:13.000000000 +0100
+***************
+*** 12690,12695 ****
+--- 12690,12697 ----
+ if test -f po/Makefile; then
+ have_gettext="no"
+ if test -n "$MSGFMT"; then
++ olibs=$LIBS
++ LIBS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+ #include <libintl.h>
+***************
+*** 12703,12712 ****
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works" >&5
+! $as_echo "gettext() works" >&6; }; have_gettext="yes"
+ else
+! olibs=$LIBS
+! LIBS="$LIBS -lintl"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+ #include <libintl.h>
+--- 12705,12713 ----
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works" >&5
+! $as_echo "gettext() works" >&6; }; have_gettext="yes"; LIBS=$olibs
+ else
+! LIBS="-lintl"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+ #include <libintl.h>
+***************
+*** 12720,12726 ****
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works with -lintl" >&5
+! $as_echo "gettext() works with -lintl" >&6; }; have_gettext="yes"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() doesn't work" >&5
+ $as_echo "gettext() doesn't work" >&6; };
+--- 12721,12728 ----
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works with -lintl" >&5
+! $as_echo "gettext() works with -lintl" >&6; }; have_gettext="yes";
+! LIBS="$olibs -lintl"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() doesn't work" >&5
+ $as_echo "gettext() doesn't work" >&6; };
+*** ../vim-7.4.093/src/version.c 2013-11-17 20:17:05.000000000 +0100
+--- src/version.c 2013-11-17 20:27:43.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 94,
+ /**/
+
+--
+BLACK KNIGHT: The Black Knight always triumphs. Have at you!
+ ARTHUR takes his last leg off. The BLACK KNIGHT's body lands upright.
+BLACK KNIGHT: All right, we'll call it a draw.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.095 b/patches/source/vim/patches/7.4.095
new file mode 100644
index 000000000..f7abfcafb
--- /dev/null
+++ b/patches/source/vim/patches/7.4.095
@@ -0,0 +1,73 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.095
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.095 (after 7.4.093)
+Problem: Regexp for LuaJIT version doesn't work on BSD.
+Solution: Use "*" instead of "\+" and "\?". (Ozaki)
+Files: src/configure.in, src/auto/configure
+
+
+*** ../vim-7.4.094/src/configure.in 2013-11-17 20:32:49.000000000 +0100
+--- src/configure.in 2013-11-21 12:04:46.000000000 +0100
+***************
+*** 496,502 ****
+ if test "X$vi_cv_path_luajit" != "X"; then
+ dnl -- find LuaJIT version
+ AC_CACHE_CHECK(LuaJIT version, vi_cv_version_luajit,
+! [ vi_cv_version_luajit=`${vi_cv_path_luajit} -v 2>&1 | sed 's/LuaJIT \([[0-9.]]*\)\.[[0-9]]\(-[[a-z0-9]]\+\)\? .*/\1/'` ])
+ AC_CACHE_CHECK(Lua version of LuaJIT, vi_cv_version_lua_luajit,
+ [ vi_cv_version_lua_luajit=`${vi_cv_path_luajit} -e "print(_VERSION)" | sed 's/.* //'` ])
+ vi_cv_path_lua="$vi_cv_path_luajit"
+--- 496,502 ----
+ if test "X$vi_cv_path_luajit" != "X"; then
+ dnl -- find LuaJIT version
+ AC_CACHE_CHECK(LuaJIT version, vi_cv_version_luajit,
+! [ vi_cv_version_luajit=`${vi_cv_path_luajit} -v 2>&1 | sed 's/LuaJIT \([[0-9.]]*\)\.[[0-9]]\(-[[a-z0-9]]*\)* .*/\1/'` ])
+ AC_CACHE_CHECK(Lua version of LuaJIT, vi_cv_version_lua_luajit,
+ [ vi_cv_version_lua_luajit=`${vi_cv_path_luajit} -e "print(_VERSION)" | sed 's/.* //'` ])
+ vi_cv_path_lua="$vi_cv_path_luajit"
+*** ../vim-7.4.094/src/auto/configure 2013-11-17 20:32:49.000000000 +0100
+--- src/auto/configure 2013-11-21 12:07:39.000000000 +0100
+***************
+*** 4743,4749 ****
+ if test "${vi_cv_version_luajit+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+! vi_cv_version_luajit=`${vi_cv_path_luajit} -v 2>&1 | sed 's/LuaJIT \([0-9.]*\)\.[0-9]\(-[a-z0-9]\+\)\? .*/\1/'`
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_luajit" >&5
+ $as_echo "$vi_cv_version_luajit" >&6; }
+--- 4743,4749 ----
+ if test "${vi_cv_version_luajit+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+! vi_cv_version_luajit=`${vi_cv_path_luajit} -v 2>&1 | sed 's/LuaJIT \([0-9.]*\)\.[0-9]\(-[a-z0-9]*\)* .*/\1/'`
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_luajit" >&5
+ $as_echo "$vi_cv_version_luajit" >&6; }
+*** ../vim-7.4.094/src/version.c 2013-11-17 20:32:49.000000000 +0100
+--- src/version.c 2013-11-21 12:06:26.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 95,
+ /**/
+
+--
+Our job was to build a computer information system for the branch banks. We
+were the perfect people for the job: Dean had seen a computer once, and I had
+heard Dean talk about it.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.096 b/patches/source/vim/patches/7.4.096
new file mode 100644
index 000000000..be20959b3
--- /dev/null
+++ b/patches/source/vim/patches/7.4.096
@@ -0,0 +1,96 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.096
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.096
+Problem: Can't change directory to an UNC path.
+Solution: Use win32_getattrs() in mch_getperm(). (Christian Brabandt)
+Files: src/os_win32.c
+
+
+*** ../vim-7.4.095/src/os_win32.c 2013-09-25 19:13:32.000000000 +0200
+--- src/os_win32.c 2013-11-21 12:31:52.000000000 +0100
+***************
+*** 2841,2858 ****
+ }
+
+ /*
+! * get file permissions for `name'
+! * -1 : error
+! * else mode_t
+ */
+ long
+ mch_getperm(char_u *name)
+ {
+ struct stat st;
+! int n;
+
+ n = mch_stat(name, &st);
+! return n == 0 ? (int)st.st_mode : -1;
+ }
+
+
+--- 2841,2860 ----
+ }
+
+ /*
+! * Get file permissions for "name".
+! * Return mode_t or -1 for error.
+ */
+ long
+ mch_getperm(char_u *name)
+ {
+ struct stat st;
+! int n;
+
++ if (name[0] == '\\' && name[1] == '\\')
++ /* UNC path */
++ return (long)win32_getattrs(name);
+ n = mch_stat(name, &st);
+! return n == 0 ? (long)st.st_mode : -1L;
+ }
+
+
+***************
+*** 3094,3101 ****
+ * -1 : error
+ * else FILE_ATTRIBUTE_* defined in winnt.h
+ */
+! static
+! int
+ win32_getattrs(char_u *name)
+ {
+ int attr;
+--- 3096,3102 ----
+ * -1 : error
+ * else FILE_ATTRIBUTE_* defined in winnt.h
+ */
+! static int
+ win32_getattrs(char_u *name)
+ {
+ int attr;
+*** ../vim-7.4.095/src/version.c 2013-11-21 12:17:46.000000000 +0100
+--- src/version.c 2013-11-21 12:32:46.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 96,
+ /**/
+
+--
+If your company is not involved in something called "ISO 9000" you probably
+have no idea what it is. If your company _is_ involved in ISO 9000 then you
+definitely have no idea what it is.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.097 b/patches/source/vim/patches/7.4.097
new file mode 100644
index 000000000..cfb618398
--- /dev/null
+++ b/patches/source/vim/patches/7.4.097
@@ -0,0 +1,50 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.097
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.097 (after 7.4.034)
+Problem: Unexpected behavior change related to 'virtualedit'. (Ingo Karkat)
+Solution: Update the valid cursor position. (Christian Brabandt)
+Files: src/ops.c
+
+
+*** ../vim-7.4.096/src/ops.c 2013-11-11 23:17:31.000000000 +0100
+--- src/ops.c 2013-11-21 13:21:24.000000000 +0100
+***************
+*** 3844,3850 ****
+--- 3844,3854 ----
+ ml_replace(lnum, newp, FALSE);
+ /* Place cursor on last putted char. */
+ if (lnum == curwin->w_cursor.lnum)
++ {
++ /* make sure curwin->w_virtcol is updated */
++ changed_cline_bef_curs();
+ curwin->w_cursor.col += (colnr_T)(totlen - 1);
++ }
+ }
+ #ifdef FEAT_VISUAL
+ if (VIsual_active)
+*** ../vim-7.4.096/src/version.c 2013-11-21 12:34:07.000000000 +0100
+--- src/version.c 2013-11-21 13:08:27.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 97,
+ /**/
+
+--
+The only way the average employee can speak to an executive is by taking a
+second job as a golf caddie.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.098 b/patches/source/vim/patches/7.4.098
new file mode 100644
index 000000000..78af90e21
--- /dev/null
+++ b/patches/source/vim/patches/7.4.098
@@ -0,0 +1,243 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.098
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.098
+Problem: When using ":'<,'>del" errors may be given for the visual line
+ numbers being out of range.
+Solution: Reset Visual mode in ":del". (Lech Lorens)
+Files: src/ex_docmd.c, src/testdir/test103.in, src/testdir/test103.ok,
+ src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
+ src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
+ src/testdir/Make_vms.mms, src/testdir/Makefile
+
+
+*** ../vim-7.4.097/src/ex_docmd.c 2013-11-09 05:30:18.000000000 +0100
+--- src/ex_docmd.c 2013-11-21 14:04:55.000000000 +0100
+***************
+*** 8570,8575 ****
+--- 8570,8580 ----
+ beginline(BL_SOL | BL_FIX);
+ }
+
++ #if defined(FEAT_VISUAL)
++ if (VIsual_active)
++ end_visual_mode();
++ #endif
++
+ switch (eap->cmdidx)
+ {
+ case CMD_delete:
+*** ../vim-7.4.097/src/testdir/test103.in 2013-11-21 14:21:12.000000000 +0100
+--- src/testdir/test103.in 2013-11-21 14:02:09.000000000 +0100
+***************
+*** 0 ****
+--- 1,37 ----
++ Test for visual mode not being reset causing E315 error.
++ STARTTEST
++ :so small.vim
++ :enew
++ :let g:msg="Everything's fine."
++ :function! TriggerTheProblem()
++ : " At this point there is no visual selection because :call reset it.
++ : " Let's restore the selection:
++ : normal gv
++ : '<,'>del _
++ : try
++ : exe "normal \<Esc>"
++ : catch /^Vim\%((\a\+)\)\=:E315/
++ : echom 'Snap! E315 error!'
++ : let g:msg='Snap! E315 error!'
++ : endtry
++ :endfunction
++ :enew
++ :setl buftype=nofile
++ :call append(line('$'), 'Delete this line.')
++ :"
++ :"
++ :" NOTE: this has to be done by a call to a function because executing :del the
++ :" ex-way will require the colon operator which resets the visual mode thus
++ :" preventing the problem:
++ :"
++ GV:call TriggerTheProblem()
++ :%del _
++ :call append(line('$'), g:msg)
++ :w! test.out
++ :brewind
++ ENDTEST
++
++ STARTTEST
++ :qa!
++ ENDTEST
++
+*** ../vim-7.4.097/src/testdir/test103.ok 2013-11-21 14:21:12.000000000 +0100
+--- src/testdir/test103.ok 2013-11-21 14:02:28.000000000 +0100
+***************
+*** 0 ****
+--- 1,2 ----
++
++ Everything's fine.
+*** ../vim-7.4.097/src/testdir/Make_amiga.mak 2013-11-12 05:28:08.000000000 +0100
+--- src/testdir/Make_amiga.mak 2013-11-21 14:02:51.000000000 +0100
+***************
+*** 34,40 ****
+ test81.out test82.out test83.out test84.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+! test99.out test100.out test101.out test102.out
+
+ .SUFFIXES: .in .out
+
+--- 34,40 ----
+ test81.out test82.out test83.out test84.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+! test99.out test100.out test101.out test102.out test103.out
+
+ .SUFFIXES: .in .out
+
+***************
+*** 153,155 ****
+--- 153,156 ----
+ test100.out: test100.in
+ test101.out: test101.in
+ test102.out: test102.in
++ test103.out: test103.in
+*** ../vim-7.4.097/src/testdir/Make_dos.mak 2013-11-12 05:28:08.000000000 +0100
+--- src/testdir/Make_dos.mak 2013-11-21 14:02:58.000000000 +0100
+***************
+*** 33,39 ****
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100.out test101.out test102.out
+
+ SCRIPTS32 = test50.out test70.out
+
+--- 33,39 ----
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100.out test101.out test102.out test103.out
+
+ SCRIPTS32 = test50.out test70.out
+
+*** ../vim-7.4.097/src/testdir/Make_ming.mak 2013-11-12 05:28:08.000000000 +0100
+--- src/testdir/Make_ming.mak 2013-11-21 14:03:01.000000000 +0100
+***************
+*** 53,59 ****
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100out test101.out test102.out
+
+ SCRIPTS32 = test50.out test70.out
+
+--- 53,59 ----
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100out test101.out test102.out test103.out
+
+ SCRIPTS32 = test50.out test70.out
+
+*** ../vim-7.4.097/src/testdir/Make_os2.mak 2013-11-12 05:28:08.000000000 +0100
+--- src/testdir/Make_os2.mak 2013-11-21 14:03:03.000000000 +0100
+***************
+*** 35,41 ****
+ test81.out test82.out test83.out test84.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100.out test101.out test102.out
+
+ .SUFFIXES: .in .out
+
+--- 35,41 ----
+ test81.out test82.out test83.out test84.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100.out test101.out test102.out test103.out
+
+ .SUFFIXES: .in .out
+
+*** ../vim-7.4.097/src/testdir/Make_vms.mms 2013-11-12 05:28:08.000000000 +0100
+--- src/testdir/Make_vms.mms 2013-11-21 14:03:13.000000000 +0100
+***************
+*** 4,10 ****
+ # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
+ # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
+ #
+! # Last change: 2013 Nov 12
+ #
+ # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
+ # Edit the lines in the Configuration section below to select.
+--- 4,10 ----
+ # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
+ # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
+ #
+! # Last change: 2013 Nov 21
+ #
+ # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
+ # Edit the lines in the Configuration section below to select.
+***************
+*** 79,85 ****
+ test82.out test83.out test84.out test88.out test89.out \
+ test90.out test91.out test92.out test93.out test94.out \
+ test95.out test96.out test97.out test98.out test99.out \
+! test100.out test101.out test102.out
+
+ # Known problems:
+ # Test 30: a problem around mac format - unknown reason
+--- 79,85 ----
+ test82.out test83.out test84.out test88.out test89.out \
+ test90.out test91.out test92.out test93.out test94.out \
+ test95.out test96.out test97.out test98.out test99.out \
+! test100.out test101.out test102.out test103.out
+
+ # Known problems:
+ # Test 30: a problem around mac format - unknown reason
+*** ../vim-7.4.097/src/testdir/Makefile 2013-11-12 05:28:08.000000000 +0100
+--- src/testdir/Makefile 2013-11-21 14:03:23.000000000 +0100
+***************
+*** 30,36 ****
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+! test99.out test100.out test101.out test102.out
+
+ SCRIPTS_GUI = test16.out
+
+--- 30,36 ----
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+! test99.out test100.out test101.out test102.out test103.out
+
+ SCRIPTS_GUI = test16.out
+
+*** ../vim-7.4.097/src/version.c 2013-11-21 13:24:36.000000000 +0100
+--- src/version.c 2013-11-21 14:20:34.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 98,
+ /**/
+
+--
+I recommend ordering large cargo containers of paper towels to make up
+whatever budget underruns you have. Paper products are always useful and they
+have the advantage of being completely flushable if you need to make room in
+the storage area later.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.099 b/patches/source/vim/patches/7.4.099
new file mode 100644
index 000000000..a9cf63689
--- /dev/null
+++ b/patches/source/vim/patches/7.4.099
@@ -0,0 +1,113 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.099
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.099
+Problem: Append in blockwise Visual mode with "$" is wrong.
+Solution: After "$" don't use the code that checks if the cursor was moved.
+ (Hirohito Higashi, Ken Takata)
+Files: src/ops.c, src/testdir/test39.in, src/testdir/test39.ok
+
+
+*** ../vim-7.4.098/src/ops.c 2013-11-21 13:24:36.000000000 +0100
+--- src/ops.c 2013-11-21 14:33:57.000000000 +0100
+***************
+*** 2643,2649 ****
+
+ /* The user may have moved the cursor before inserting something, try
+ * to adjust the block for that. */
+! if (oap->start.lnum == curbuf->b_op_start.lnum)
+ {
+ if (oap->op_type == OP_INSERT
+ && oap->start.col != curbuf->b_op_start.col)
+--- 2643,2649 ----
+
+ /* The user may have moved the cursor before inserting something, try
+ * to adjust the block for that. */
+! if (oap->start.lnum == curbuf->b_op_start.lnum && !bd.is_MAX)
+ {
+ if (oap->op_type == OP_INSERT
+ && oap->start.col != curbuf->b_op_start.col)
+*** ../vim-7.4.098/src/testdir/test39.in 2013-11-11 01:29:16.000000000 +0100
+--- src/testdir/test39.in 2013-11-21 14:25:55.000000000 +0100
+***************
+*** 23,28 ****
+--- 23,40 ----
+ /^aaaa/
+ :exe ":norm! l\<C-V>jjjlllI\<Right>\<Right> \<Esc>"
+ :/^aa/,/^$/w >> test.out
++ :" Test for Visual block was created with the last <C-v>$
++ /^A23$/
++ :exe ":norm! l\<C-V>j$Aab\<Esc>"
++ :.,/^$/w >> test.out
++ :" Test for Visual block was created with the middle <C-v>$ (1)
++ /^B23$/
++ :exe ":norm! l\<C-V>j$hAab\<Esc>"
++ :.,/^$/w >> test.out
++ :" Test for Visual block was created with the middle <C-v>$ (2)
++ /^C23$/
++ :exe ":norm! l\<C-V>j$hhAab\<Esc>"
++ :.,/^$/w >> test.out
+ :" gUe must uppercase a whole word, also when ß changes to SS
+ Gothe youtußeuu endYpk0wgUe
+ :" gUfx must uppercase until x, inclusive.
+***************
+*** 49,54 ****
+--- 61,75 ----
+ cccccc
+ dddddd
+
++ A23
++ 4567
++
++ B23
++ 4567
++
++ C23
++ 4567
++
+ abcdefghijklm
+ abcdefghijklm
+ abcdefghijklm
+*** ../vim-7.4.098/src/testdir/test39.ok 2013-11-11 01:29:16.000000000 +0100
+--- src/testdir/test39.ok 2013-11-21 14:25:10.000000000 +0100
+***************
+*** 8,13 ****
+--- 8,22 ----
+ ccc ccc
+ ddd ddd
+
++ A23ab
++ 4567ab
++
++ B23 ab
++ 4567ab
++
++ C23ab
++ 456ab7
++
+ the YOUTUSSEUU end
+ - yOUSSTUSSEXu -
+ THE YOUTUSSEUU END
+*** ../vim-7.4.098/src/version.c 2013-11-21 14:21:25.000000000 +0100
+--- src/version.c 2013-11-21 14:34:28.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 99,
+ /**/
+
+--
+If the Universe is constantly expanding, why can't I ever find a parking space?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.100 b/patches/source/vim/patches/7.4.100
new file mode 100644
index 000000000..c3c0cb647
--- /dev/null
+++ b/patches/source/vim/patches/7.4.100
@@ -0,0 +1,82 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.100
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.100
+Problem: NFA regexp doesn't handle backreference correctly. (Ryuichi
+ Hayashida, Urtica Dioica)
+Solution: Always add NFA_SKIP, also when it already exists at the start
+ position.
+Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok
+
+
+*** ../vim-7.4.099/src/regexp_nfa.c 2013-10-06 15:46:06.000000000 +0200
+--- src/regexp_nfa.c 2013-11-21 15:58:58.000000000 +0100
+***************
+*** 4278,4284 ****
+ * endless loop for "\(\)*" */
+
+ default:
+! if (state->lastlist[nfa_ll_index] == l->id)
+ {
+ /* This state is already in the list, don't add it again,
+ * unless it is an MOPEN that is used for a backreference or
+--- 4278,4284 ----
+ * endless loop for "\(\)*" */
+
+ default:
+! if (state->lastlist[nfa_ll_index] == l->id && state->c != NFA_SKIP)
+ {
+ /* This state is already in the list, don't add it again,
+ * unless it is an MOPEN that is used for a backreference or
+*** ../vim-7.4.099/src/testdir/test64.in 2013-09-25 18:16:34.000000000 +0200
+--- src/testdir/test64.in 2013-11-21 15:58:19.000000000 +0100
+***************
+*** 406,411 ****
+--- 406,412 ----
+ :call add(tl, [2, '^.*\.\(.*\)/.\+\(\1\)\@<!$', 'foo.bat/foo.bat'])
+ :call add(tl, [2, '^.*\.\(.*\)/.\+\(\1\)\@<=$', 'foo.bat/foo.bat', 'foo.bat/foo.bat', 'bat', 'bat'])
+ :call add(tl, [2, '\\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}', '2013-06-27${0}', '${0}', '0'])
++ :call add(tl, [2, '^\(a*\)\1$', 'aaaaaaaa', 'aaaaaaaa', 'aaaa'])
+ :"
+ :"""" Look-behind with limit
+ :call add(tl, [2, '<\@<=span.', 'xxspanxx<spanyyy', 'spany'])
+*** ../vim-7.4.099/src/testdir/test64.ok 2013-09-25 18:16:34.000000000 +0200
+--- src/testdir/test64.ok 2013-11-21 15:59:04.000000000 +0100
+***************
+*** 944,949 ****
+--- 944,952 ----
+ OK 0 - \\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}
+ OK 1 - \\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}
+ OK 2 - \\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}
++ OK 0 - ^\(a*\)\1$
++ OK 1 - ^\(a*\)\1$
++ OK 2 - ^\(a*\)\1$
+ OK 0 - <\@<=span.
+ OK 1 - <\@<=span.
+ OK 2 - <\@<=span.
+*** ../vim-7.4.099/src/version.c 2013-11-21 14:39:58.000000000 +0100
+--- src/version.c 2013-11-21 16:02:27.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 100,
+ /**/
+
+--
+Sometimes you can protect millions of dollars in your budget simply by buying
+a bag of cookies, dropping it on the budget anylyst's desk, and saying
+something deeply personal such as "How was your weekend, big guy?"
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.101 b/patches/source/vim/patches/7.4.101
new file mode 100644
index 000000000..99150ef9a
--- /dev/null
+++ b/patches/source/vim/patches/7.4.101
@@ -0,0 +1,93 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.101
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.101
+Problem: Using \1 in pattern goes one line too far. (Bohr Shaw, John Little)
+Solution: Only advance the match end for the matched characters in the last
+ line.
+Files: src/regexp.c, src/testdir/test64.in, src/testdir/test64.ok
+
+
+*** ../vim-7.4.100/src/regexp.c 2013-09-19 17:03:57.000000000 +0200
+--- src/regexp.c 2013-11-21 16:58:38.000000000 +0100
+***************
+*** 6455,6461 ****
+ /*
+ * Check whether a backreference matches.
+ * Returns RA_FAIL, RA_NOMATCH or RA_MATCH.
+! * If "bytelen" is not NULL, it is set to the bytelength of the whole match.
+ */
+ static int
+ match_with_backref(start_lnum, start_col, end_lnum, end_col, bytelen)
+--- 6455,6462 ----
+ /*
+ * Check whether a backreference matches.
+ * Returns RA_FAIL, RA_NOMATCH or RA_MATCH.
+! * If "bytelen" is not NULL, it is set to the byte length of the match in the
+! * last line.
+ */
+ static int
+ match_with_backref(start_lnum, start_col, end_lnum, end_col, bytelen)
+***************
+*** 6511,6516 ****
+--- 6512,6519 ----
+
+ /* Advance to next line. */
+ reg_nextline();
++ if (bytelen != NULL)
++ *bytelen = 0;
+ ++clnum;
+ ccol = 0;
+ if (got_int)
+*** ../vim-7.4.100/src/testdir/test64.in 2013-11-21 16:03:35.000000000 +0100
+--- src/testdir/test64.in 2013-11-21 16:56:20.000000000 +0100
+***************
+*** 507,512 ****
+--- 507,514 ----
+ :" Check a pattern with a line break and ^ and $
+ :call add(tl, [2, 'a\n^b$\n^c', ['a', 'b', 'c'], ['XX']])
+ :"
++ :call add(tl, [2, '\(^.\+\n\)\1', [' dog', ' dog', 'asdf'], ['XXasdf']])
++ :"
+ :"""" Run the multi-line tests
+ :"
+ :$put ='multi-line tests'
+*** ../vim-7.4.100/src/testdir/test64.ok 2013-11-21 16:03:35.000000000 +0100
+--- src/testdir/test64.ok 2013-11-21 16:57:41.000000000 +0100
+***************
+*** 1031,1036 ****
+--- 1031,1039 ----
+ OK 0 - a\n^b$\n^c
+ OK 1 - a\n^b$\n^c
+ OK 2 - a\n^b$\n^c
++ OK 0 - \(^.\+\n\)\1
++ OK 1 - \(^.\+\n\)\1
++ OK 2 - \(^.\+\n\)\1
+
+ <T="5">Ta 5</Title>
+ <T="7">Ac 7</Title>
+*** ../vim-7.4.100/src/version.c 2013-11-21 16:03:35.000000000 +0100
+--- src/version.c 2013-11-21 16:44:00.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 101,
+ /**/
+
+--
+The budget process was invented by an alien race of sadistic beings who
+resemble large cats.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.102 b/patches/source/vim/patches/7.4.102
new file mode 100644
index 000000000..b41341301
--- /dev/null
+++ b/patches/source/vim/patches/7.4.102
@@ -0,0 +1,84 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.102
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.102
+Problem: Crash when interrupting "z=".
+Solution: Add safety check for word length. (Christian Brabandt, Dominique
+ Pelle)
+Files: src/spell.c
+
+
+*** ../vim-7.4.101/src/spell.c 2013-11-14 03:54:02.000000000 +0100
+--- src/spell.c 2013-11-21 17:37:04.000000000 +0100
+***************
+*** 13398,13406 ****
+
+ /* Lookup the word "orgnr" one of the two tries. */
+ n = 0;
+- wlen = 0;
+ wordcount = 0;
+! for (;;)
+ {
+ i = 1;
+ if (wordcount == orgnr && byts[n + 1] == NUL)
+--- 13398,13405 ----
+
+ /* Lookup the word "orgnr" one of the two tries. */
+ n = 0;
+ wordcount = 0;
+! for (wlen = 0; wlen < MAXWLEN - 3; ++wlen)
+ {
+ i = 1;
+ if (wordcount == orgnr && byts[n + 1] == NUL)
+***************
+*** 13414,13419 ****
+--- 13413,13419 ----
+ if (i > byts[n]) /* safety check */
+ {
+ STRCPY(theword + wlen, "BAD");
++ wlen += 3;
+ goto badword;
+ }
+
+***************
+*** 13426,13432 ****
+ wordcount += wc;
+ }
+
+! theword[wlen++] = byts[n + i];
+ n = idxs[n + i];
+ }
+ badword:
+--- 13426,13432 ----
+ wordcount += wc;
+ }
+
+! theword[wlen] = byts[n + i];
+ n = idxs[n + i];
+ }
+ badword:
+*** ../vim-7.4.101/src/version.c 2013-11-21 17:12:55.000000000 +0100
+--- src/version.c 2013-11-21 17:38:21.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 102,
+ /**/
+
+--
+Engineers will go without food and hygiene for days to solve a problem.
+(Other times just because they forgot.)
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.103 b/patches/source/vim/patches/7.4.103
new file mode 100644
index 000000000..4dbce9970
--- /dev/null
+++ b/patches/source/vim/patches/7.4.103
@@ -0,0 +1,93 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.103
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.103
+Problem: Dos installer uses an old way to escape spaces in the diff
+ command.
+Solution: Adjust the quoting to the new default shellxquote. (Ben Fritz)
+Files: src/dosinst.c
+
+
+*** ../vim-7.4.102/src/dosinst.c 2013-11-07 04:49:23.000000000 +0100
+--- src/dosinst.c 2013-11-21 18:12:13.000000000 +0100
+***************
+*** 1192,1214 ****
+ fprintf(fd, " if arg3 =~ ' ' | let arg3 = '\"' . arg3 . '\"' | endif\n");
+
+ /* If the path has a space: When using cmd.exe (Win NT/2000/XP) put
+! * quotes around the whole command and around the diff command.
+ * Otherwise put a double quote just before the space and at the
+ * end of the command. Putting quotes around the whole thing
+ * doesn't work on Win 95/98/ME. This is mostly guessed! */
+- fprintf(fd, " let eq = ''\n");
+ fprintf(fd, " if $VIMRUNTIME =~ ' '\n");
+ fprintf(fd, " if &sh =~ '\\<cmd'\n");
+! fprintf(fd, " let cmd = '\"\"' . $VIMRUNTIME . '\\diff\"'\n");
+! fprintf(fd, " let eq = '\"'\n");
+ fprintf(fd, " else\n");
+ fprintf(fd, " let cmd = substitute($VIMRUNTIME, ' ', '\" ', '') . '\\diff\"'\n");
+ fprintf(fd, " endif\n");
+ fprintf(fd, " else\n");
+ fprintf(fd, " let cmd = $VIMRUNTIME . '\\diff'\n");
+ fprintf(fd, " endif\n");
+! fprintf(fd, " silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq\n");
+!
+ fprintf(fd, "endfunction\n");
+ fprintf(fd, "\n");
+ }
+--- 1192,1220 ----
+ fprintf(fd, " if arg3 =~ ' ' | let arg3 = '\"' . arg3 . '\"' | endif\n");
+
+ /* If the path has a space: When using cmd.exe (Win NT/2000/XP) put
+! * quotes around the diff command and rely on the default value of
+! * shellxquote to solve the quoting problem for the whole command.
+! *
+ * Otherwise put a double quote just before the space and at the
+ * end of the command. Putting quotes around the whole thing
+ * doesn't work on Win 95/98/ME. This is mostly guessed! */
+ fprintf(fd, " if $VIMRUNTIME =~ ' '\n");
+ fprintf(fd, " if &sh =~ '\\<cmd'\n");
+! fprintf(fd, " if empty(&shellxquote)\n");
+! fprintf(fd, " let l:shxq_sav = ''\n");
+! fprintf(fd, " set shellxquote&\n");
+! fprintf(fd, " endif\n");
+! fprintf(fd, " let cmd = '\"' . $VIMRUNTIME . '\\diff\"'\n");
+ fprintf(fd, " else\n");
+ fprintf(fd, " let cmd = substitute($VIMRUNTIME, ' ', '\" ', '') . '\\diff\"'\n");
+ fprintf(fd, " endif\n");
+ fprintf(fd, " else\n");
+ fprintf(fd, " let cmd = $VIMRUNTIME . '\\diff'\n");
+ fprintf(fd, " endif\n");
+! fprintf(fd, " silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3\n");
+! fprintf(fd, " if exists('l:shxq_sav')\n");
+! fprintf(fd, " let &shellxquote=l:shxq_sav\n");
+! fprintf(fd, " endif\n");
+ fprintf(fd, "endfunction\n");
+ fprintf(fd, "\n");
+ }
+*** ../vim-7.4.102/src/version.c 2013-11-21 17:42:26.000000000 +0100
+--- src/version.c 2013-11-21 18:11:08.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 103,
+ /**/
+
+--
+The fastest way to get an engineer to solve a problem is to declare that the
+problem is unsolvable. No engineer can walk away from an unsolvable problem
+until it's solved.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.104 b/patches/source/vim/patches/7.4.104
new file mode 100644
index 000000000..6e51568a3
--- /dev/null
+++ b/patches/source/vim/patches/7.4.104
@@ -0,0 +1,107 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.104
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.104
+Problem: ":help s/\_" reports an internal error. (John Beckett)
+Solution: Check for NUL and invalid character classes.
+Files: src/regexp_nfa.c
+
+
+*** ../vim-7.4.103/src/regexp_nfa.c 2013-11-21 16:03:35.000000000 +0100
+--- src/regexp_nfa.c 2013-11-28 14:05:34.000000000 +0100
+***************
+*** 239,245 ****
+--- 239,247 ----
+ NFA_UPPER, NFA_NUPPER
+ };
+
++ static char_u e_nul_found[] = N_("E865: (NFA) Regexp end encountered prematurely");
+ static char_u e_misplaced[] = N_("E866: (NFA regexp) Misplaced %c");
++ static char_u e_ill_char_class[] = N_("E877: (NFA regexp) Invalid character class: %ld");
+
+ /* NFA regexp \ze operator encountered. */
+ static int nfa_has_zend;
+***************
+*** 1137,1143 ****
+ switch (c)
+ {
+ case NUL:
+! EMSG_RET_FAIL(_("E865: (NFA) Regexp end encountered prematurely"));
+
+ case Magic('^'):
+ EMIT(NFA_BOL);
+--- 1139,1145 ----
+ switch (c)
+ {
+ case NUL:
+! EMSG_RET_FAIL(_(e_nul_found));
+
+ case Magic('^'):
+ EMIT(NFA_BOL);
+***************
+*** 1160,1165 ****
+--- 1162,1170 ----
+
+ case Magic('_'):
+ c = no_Magic(getchr());
++ if (c == NUL)
++ EMSG_RET_FAIL(_(e_nul_found));
++
+ if (c == '^') /* "\_^" is start-of-line */
+ {
+ EMIT(NFA_BOL);
+***************
+*** 1216,1221 ****
+--- 1221,1232 ----
+ p = vim_strchr(classchars, no_Magic(c));
+ if (p == NULL)
+ {
++ if (extra == NFA_ADD_NL)
++ {
++ EMSGN(_(e_ill_char_class), c);
++ rc_did_emsg = TRUE;
++ return FAIL;
++ }
+ EMSGN("INTERNAL: Unknown character class char: %ld", c);
+ return FAIL;
+ }
+***************
+*** 4733,4739 ****
+
+ default:
+ /* should not be here :P */
+! EMSGN("E877: (NFA regexp) Invalid character class: %ld", class);
+ return FAIL;
+ }
+ return FAIL;
+--- 4744,4750 ----
+
+ default:
+ /* should not be here :P */
+! EMSGN(_(e_ill_char_class), class);
+ return FAIL;
+ }
+ return FAIL;
+*** ../vim-7.4.103/src/version.c 2013-11-21 18:13:26.000000000 +0100
+--- src/version.c 2013-11-28 14:06:59.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 104,
+ /**/
+
+--
+Everybody wants to go to heaven, but nobody wants to die.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.105 b/patches/source/vim/patches/7.4.105
new file mode 100644
index 000000000..f219ac6ff
--- /dev/null
+++ b/patches/source/vim/patches/7.4.105
@@ -0,0 +1,58 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.105
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.105
+Problem: Completing a tag pattern may give an error for invalid pattern.
+Solution: Suppress the error, just return no matches.
+Files: src/tag.c
+
+
+*** ../vim-7.4.104/src/tag.c 2013-11-08 04:30:06.000000000 +0100
+--- src/tag.c 2013-11-28 14:27:38.000000000 +0100
+***************
+*** 1326,1331 ****
+--- 1326,1332 ----
+ int match_no_ic = 0;/* matches with rm_ic == FALSE */
+ int match_re; /* match with regexp */
+ int matchoff = 0;
++ int save_emsg_off;
+
+ #ifdef FEAT_EMACS_TAGS
+ /*
+***************
+*** 1442,1448 ****
+--- 1443,1452 ----
+ if (p_tl != 0 && orgpat.len > p_tl) /* adjust for 'taglength' */
+ orgpat.len = p_tl;
+
++ save_emsg_off = emsg_off;
++ emsg_off = TRUE; /* don't want error for invalid RE here */
+ prepare_pats(&orgpat, has_re);
++ emsg_off = save_emsg_off;
+ if (has_re && orgpat.regmatch.regprog == NULL)
+ goto findtag_end;
+
+*** ../vim-7.4.104/src/version.c 2013-11-28 14:20:11.000000000 +0100
+--- src/version.c 2013-11-28 14:30:35.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 105,
+ /**/
+
+--
+The goal of science is to build better mousetraps.
+The goal of nature is to build better mice.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.106 b/patches/source/vim/patches/7.4.106
new file mode 100644
index 000000000..13ab0b117
--- /dev/null
+++ b/patches/source/vim/patches/7.4.106
@@ -0,0 +1,68 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.106
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.106
+Problem: Can't build with Ruby using Cygwin.
+Solution: Fix library name in makefile. (Steve Hall)
+Files: src/Make_cyg.mak
+
+
+*** ../vim-7.4.105/src/Make_cyg.mak 2013-09-19 20:48:59.000000000 +0200
+--- src/Make_cyg.mak 2013-11-28 16:29:52.000000000 +0100
+***************
+*** 1,6 ****
+ #
+ # Makefile for VIM on Win32, using Cygnus gcc
+! # Last updated by Dan Sharp. Last Change: 2013 Sep 19
+ #
+ # Also read INSTALLpc.txt!
+ #
+--- 1,6 ----
+ #
+ # Makefile for VIM on Win32, using Cygnus gcc
+! # Last updated by Dan Sharp. Last Change: 2013 Nov 28
+ #
+ # Also read INSTALLpc.txt!
+ #
+***************
+*** 272,278 ****
+ DEFINES += -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\"
+ DEFINES += -DDYNAMIC_RUBY_VER=$(RUBY_VER)
+ else
+! EXTRA_LIBS += $(RUBY)/lib/$(RUBY_INSTALL_NAME).lib
+ endif
+ endif
+
+--- 272,278 ----
+ DEFINES += -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\"
+ DEFINES += -DDYNAMIC_RUBY_VER=$(RUBY_VER)
+ else
+! EXTRA_LIBS += $(RUBY)/lib/$(RUBY_INSTALL_NAME)
+ endif
+ endif
+
+*** ../vim-7.4.105/src/version.c 2013-11-28 14:36:24.000000000 +0100
+--- src/version.c 2013-11-28 16:29:25.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 106,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+7. You finally do take that vacation, but only after buying a cellular modem
+ and a laptop.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.107 b/patches/source/vim/patches/7.4.107
new file mode 100644
index 000000000..5ac7189f1
--- /dev/null
+++ b/patches/source/vim/patches/7.4.107
@@ -0,0 +1,639 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.107
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.107
+Problem: Python: When vim.eval() encounters a Vim error, a try/catch in the
+ Python code doesn't catch it. (Yggdroot Chen)
+Solution: Throw exceptions on errors in vim.eval(). (ZyX)
+Files: src/ex_eval.c, src/if_py_both.h, src/proto/ex_eval.pro,
+ src/testdir/test86.in, src/testdir/test86.ok,
+ src/testdir/test87.in, src/testdir/test87.ok
+
+
+*** ../vim-7.4.106/src/ex_eval.c 2013-06-08 15:50:28.000000000 +0200
+--- src/ex_eval.c 2013-11-28 16:59:09.000000000 +0100
+***************
+*** 321,326 ****
+--- 321,337 ----
+ }
+
+ /*
++ * Free global "*msg_list" and the messages it contains, then set "*msg_list"
++ * to NULL.
++ */
++ void
++ free_global_msglist()
++ {
++ free_msglist(*msg_list);
++ *msg_list = NULL;
++ }
++
++ /*
+ * Throw the message specified in the call to cause_errthrow() above as an
+ * error exception. If cstack is NULL, postpone the throw until do_cmdline()
+ * has returned (see do_one_cmd()).
+***************
+*** 410,475 ****
+ return TRUE;
+ }
+
+-
+ /*
+! * Throw a new exception. Return FAIL when out of memory or it was tried to
+! * throw an illegal user exception. "value" is the exception string for a user
+! * or interrupt exception, or points to a message list in case of an error
+! * exception.
+ */
+! static int
+! throw_exception(value, type, cmdname)
+ void *value;
+ int type;
+ char_u *cmdname;
+ {
+! except_T *excp;
+! char_u *p, *mesg, *val;
+ int cmdlen;
+!
+! /*
+! * Disallow faking Interrupt or error exceptions as user exceptions. They
+! * would be treated differently from real interrupt or error exceptions when
+! * no active try block is found, see do_cmdline().
+! */
+! if (type == ET_USER)
+! {
+! if (STRNCMP((char_u *)value, "Vim", 3) == 0 &&
+! (((char_u *)value)[3] == NUL || ((char_u *)value)[3] == ':' ||
+! ((char_u *)value)[3] == '('))
+! {
+! EMSG(_("E608: Cannot :throw exceptions with 'Vim' prefix"));
+! goto fail;
+! }
+! }
+!
+! excp = (except_T *)alloc((unsigned)sizeof(except_T));
+! if (excp == NULL)
+! goto nomem;
+
+ if (type == ET_ERROR)
+ {
+! /* Store the original message and prefix the exception value with
+! * "Vim:" or, if a command name is given, "Vim(cmdname):". */
+! excp->messages = (struct msglist *)value;
+! mesg = excp->messages->throw_msg;
+ if (cmdname != NULL && *cmdname != NUL)
+ {
+ cmdlen = (int)STRLEN(cmdname);
+! excp->value = vim_strnsave((char_u *)"Vim(",
+ 4 + cmdlen + 2 + (int)STRLEN(mesg));
+! if (excp->value == NULL)
+! goto nomem;
+! STRCPY(&excp->value[4], cmdname);
+! STRCPY(&excp->value[4 + cmdlen], "):");
+! val = excp->value + 4 + cmdlen + 2;
+ }
+ else
+ {
+! excp->value = vim_strnsave((char_u *)"Vim:", 4 + (int)STRLEN(mesg));
+! if (excp->value == NULL)
+! goto nomem;
+! val = excp->value + 4;
+ }
+
+ /* msg_add_fname may have been used to prefix the message with a file
+--- 421,461 ----
+ return TRUE;
+ }
+
+ /*
+! * Get an exception message that is to be stored in current_exception->value.
+ */
+! char_u *
+! get_exception_string(value, type, cmdname, should_free)
+ void *value;
+ int type;
+ char_u *cmdname;
++ int *should_free;
+ {
+! char_u *ret, *mesg;
+ int cmdlen;
+! char_u *p, *val;
+
+ if (type == ET_ERROR)
+ {
+! *should_free = FALSE;
+! mesg = ((struct msglist *)value)->throw_msg;
+ if (cmdname != NULL && *cmdname != NUL)
+ {
+ cmdlen = (int)STRLEN(cmdname);
+! ret = vim_strnsave((char_u *)"Vim(",
+ 4 + cmdlen + 2 + (int)STRLEN(mesg));
+! if (ret == NULL)
+! return ret;
+! STRCPY(&ret[4], cmdname);
+! STRCPY(&ret[4 + cmdlen], "):");
+! val = ret + 4 + cmdlen + 2;
+ }
+ else
+ {
+! ret = vim_strnsave((char_u *)"Vim:", 4 + (int)STRLEN(mesg));
+! if (ret == NULL)
+! return ret;
+! val = ret + 4;
+ }
+
+ /* msg_add_fname may have been used to prefix the message with a file
+***************
+*** 506,519 ****
+ }
+ }
+ else
+! excp->value = value;
+
+ excp->type = type;
+ excp->throw_name = vim_strsave(sourcing_name == NULL
+ ? (char_u *)"" : sourcing_name);
+ if (excp->throw_name == NULL)
+ {
+! if (type == ET_ERROR)
+ vim_free(excp->value);
+ goto nomem;
+ }
+--- 492,556 ----
+ }
+ }
+ else
+! {
+! *should_free = FALSE;
+! ret = (char_u *) value;
+! }
+!
+! return ret;
+! }
+!
+!
+! /*
+! * Throw a new exception. Return FAIL when out of memory or it was tried to
+! * throw an illegal user exception. "value" is the exception string for a
+! * user or interrupt exception, or points to a message list in case of an
+! * error exception.
+! */
+! static int
+! throw_exception(value, type, cmdname)
+! void *value;
+! int type;
+! char_u *cmdname;
+! {
+! except_T *excp;
+! int should_free;
+!
+! /*
+! * Disallow faking Interrupt or error exceptions as user exceptions. They
+! * would be treated differently from real interrupt or error exceptions
+! * when no active try block is found, see do_cmdline().
+! */
+! if (type == ET_USER)
+! {
+! if (STRNCMP((char_u *)value, "Vim", 3) == 0
+! && (((char_u *)value)[3] == NUL || ((char_u *)value)[3] == ':'
+! || ((char_u *)value)[3] == '('))
+! {
+! EMSG(_("E608: Cannot :throw exceptions with 'Vim' prefix"));
+! goto fail;
+! }
+! }
+!
+! excp = (except_T *)alloc((unsigned)sizeof(except_T));
+! if (excp == NULL)
+! goto nomem;
+!
+! if (type == ET_ERROR)
+! /* Store the original message and prefix the exception value with
+! * "Vim:" or, if a command name is given, "Vim(cmdname):". */
+! excp->messages = (struct msglist *)value;
+!
+! excp->value = get_exception_string(value, type, cmdname, &should_free);
+! if (excp->value == NULL && should_free)
+! goto nomem;
+
+ excp->type = type;
+ excp->throw_name = vim_strsave(sourcing_name == NULL
+ ? (char_u *)"" : sourcing_name);
+ if (excp->throw_name == NULL)
+ {
+! if (should_free)
+ vim_free(excp->value);
+ goto nomem;
+ }
+***************
+*** 2033,2042 ****
+ /* If an error was about to be converted to an exception when
+ * enter_cleanup() was called, free the message list. */
+ if (msg_list != NULL)
+! {
+! free_msglist(*msg_list);
+! *msg_list = NULL;
+! }
+ }
+
+ /*
+--- 2070,2076 ----
+ /* If an error was about to be converted to an exception when
+ * enter_cleanup() was called, free the message list. */
+ if (msg_list != NULL)
+! free_global_msglist();
+ }
+
+ /*
+*** ../vim-7.4.106/src/if_py_both.h 2013-11-11 01:05:43.000000000 +0100
+--- src/if_py_both.h 2013-11-28 17:00:22.000000000 +0100
+***************
+*** 566,571 ****
+--- 566,593 ----
+ PyErr_SetNone(PyExc_KeyboardInterrupt);
+ return -1;
+ }
++ else if (msg_list != NULL && *msg_list != NULL)
++ {
++ int should_free;
++ char_u *msg;
++
++ msg = get_exception_string(*msg_list, ET_ERROR, NULL, &should_free);
++
++ if (msg == NULL)
++ {
++ PyErr_NoMemory();
++ return -1;
++ }
++
++ PyErr_SetVim((char *) msg);
++
++ free_global_msglist();
++
++ if (should_free)
++ vim_free(msg);
++
++ return -1;
++ }
+ else if (!did_throw)
+ return (PyErr_Occurred() ? -1 : 0);
+ /* Python exception is preferred over vim one; unlikely to occur though */
+*** ../vim-7.4.106/src/proto/ex_eval.pro 2013-08-10 13:37:10.000000000 +0200
+--- src/proto/ex_eval.pro 2013-11-28 16:56:33.000000000 +0100
+***************
+*** 4,11 ****
+--- 4,13 ----
+ int should_abort __ARGS((int retcode));
+ int aborted_in_try __ARGS((void));
+ int cause_errthrow __ARGS((char_u *mesg, int severe, int *ignore));
++ void free_global_msglist __ARGS((void));
+ void do_errthrow __ARGS((struct condstack *cstack, char_u *cmdname));
+ int do_intthrow __ARGS((struct condstack *cstack));
++ char_u *get_exception_string __ARGS((void *value, int type, char_u *cmdname, int *should_free));
+ void discard_current_exception __ARGS((void));
+ void report_make_pending __ARGS((int pending, void *value));
+ void report_resume_pending __ARGS((int pending, void *value));
+*** ../vim-7.4.106/src/testdir/test86.in 2013-11-11 01:05:43.000000000 +0100
+--- src/testdir/test86.in 2013-11-28 16:41:01.000000000 +0100
+***************
+*** 179,184 ****
+--- 179,210 ----
+ :unlockvar! l
+ :"
+ :" Function calls
++ py << EOF
++ import sys
++ def ee(expr, g=globals(), l=locals()):
++ try:
++ exec(expr, g, l)
++ except:
++ ei = sys.exc_info()
++ msg = sys.exc_info()[0].__name__ + ':' + repr(sys.exc_info()[1].args)
++ msg = msg.replace('TypeError:(\'argument 1 ', 'TypeError:(\'')
++ if expr.find('None') > -1:
++ msg = msg.replace('TypeError:(\'iteration over non-sequence\',)',
++ 'TypeError:("\'NoneType\' object is not iterable",)')
++ if expr.find('FailingNumber') > -1:
++ msg = msg.replace(', not \'FailingNumber\'', '').replace('"', '\'')
++ msg = msg.replace('TypeError:(\'iteration over non-sequence\',)',
++ 'TypeError:("\'FailingNumber\' object is not iterable",)')
++ if msg.find('(\'\'') > -1 or msg.find('(\'can\'t') > -1:
++ msg = msg.replace('(\'', '("').replace('\',)', '",)')
++ if expr == 'fd(self=[])':
++ # HACK: PyMapping_Check changed meaning
++ msg = msg.replace('AttributeError:(\'keys\',)',
++ 'TypeError:(\'unable to convert list to vim dictionary\',)')
++ vim.current.buffer.append(expr + ':' + msg)
++ else:
++ vim.current.buffer.append(expr + ':NOT FAILED')
++ EOF
+ :fun New(...)
+ : return ['NewStart']+a:000+['NewEnd']
+ :endfun
+***************
+*** 193,210 ****
+ :$put =string(l)
+ :py l.extend([l[0].name])
+ :$put =string(l)
+! :try
+! : py l[1](1, 2, 3)
+! :catch
+! : $put =v:exception[:16]
+! :endtry
+ :py f=l[0]
+ :delfunction New
+! :try
+! : py f(1, 2, 3)
+! :catch
+! : $put =v:exception[:16]
+! :endtry
+ :if has('float')
+ : let l=[0.0]
+ : py l=vim.bindeval('l')
+--- 219,228 ----
+ :$put =string(l)
+ :py l.extend([l[0].name])
+ :$put =string(l)
+! :py ee('l[1](1, 2, 3)')
+ :py f=l[0]
+ :delfunction New
+! :py ee('f(1, 2, 3)')
+ :if has('float')
+ : let l=[0.0]
+ : py l=vim.bindeval('l')
+***************
+*** 216,222 ****
+ :let messages=[]
+ :delfunction DictNew
+ py <<EOF
+- import sys
+ d=vim.bindeval('{}')
+ m=vim.bindeval('messages')
+ def em(expr, g=globals(), l=locals()):
+--- 234,239 ----
+***************
+*** 323,328 ****
+--- 340,346 ----
+ :py l[0] = t.t > 8 # check if the background thread is working
+ :py del time
+ :py del threading
++ :py del t
+ :$put =string(l)
+ :"
+ :" settrace
+***************
+*** 882,910 ****
+ :fun D()
+ :endfun
+ py << EOF
+- def ee(expr, g=globals(), l=locals()):
+- try:
+- exec(expr, g, l)
+- except:
+- ei = sys.exc_info()
+- msg = sys.exc_info()[0].__name__ + ':' + repr(sys.exc_info()[1].args)
+- msg = msg.replace('TypeError:(\'argument 1 ', 'TypeError:(\'')
+- if expr.find('None') > -1:
+- msg = msg.replace('TypeError:(\'iteration over non-sequence\',)',
+- 'TypeError:("\'NoneType\' object is not iterable",)')
+- if expr.find('FailingNumber') > -1:
+- msg = msg.replace(', not \'FailingNumber\'', '').replace('"', '\'')
+- msg = msg.replace('TypeError:(\'iteration over non-sequence\',)',
+- 'TypeError:("\'FailingNumber\' object is not iterable",)')
+- if msg.find('(\'\'') > -1 or msg.find('(\'can\'t') > -1:
+- msg = msg.replace('(\'', '("').replace('\',)', '",)')
+- if expr == 'fd(self=[])':
+- # HACK: PyMapping_Check changed meaning
+- msg = msg.replace('AttributeError:(\'keys\',)',
+- 'TypeError:(\'unable to convert list to vim dictionary\',)')
+- cb.append(expr + ':' + msg)
+- else:
+- cb.append(expr + ':NOT FAILED')
+ d = vim.Dictionary()
+ ned = vim.Dictionary(foo='bar', baz='abcD')
+ dl = vim.Dictionary(a=1)
+--- 900,905 ----
+***************
+*** 1276,1281 ****
+--- 1271,1277 ----
+ ee('vim.eval("Exe(\'throw \'\'ghi\'\'\')")')
+ ee('vim.eval("Exe(\'echoerr \'\'jkl\'\'\')")')
+ ee('vim.eval("Exe(\'xxx_non_existent_command_xxx\')")')
++ ee('vim.eval("xxx_unknown_function_xxx()")')
+ ee('vim.bindeval("Exe(\'xxx_non_existent_command_xxx\')")')
+ del Exe
+ EOF
+*** ../vim-7.4.106/src/testdir/test86.ok 2013-11-11 01:05:43.000000000 +0100
+--- src/testdir/test86.ok 2013-11-28 16:41:01.000000000 +0100
+***************
+*** 53,60 ****
+ [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd']
+ [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}]
+ [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}, 'New']
+! Vim(python):E725:
+! Vim(python):E117:
+ [0.0, 0.0]
+ KeyError
+ TypeError
+--- 53,60 ----
+ [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd']
+ [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}]
+ [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}, 'New']
+! l[1](1, 2, 3):error:('Vim:E725: Calling dict function without Dictionary: DictNew',)
+! f(1, 2, 3):error:('Vim:E117: Unknown function: New',)
+ [0.0, 0.0]
+ KeyError
+ TypeError
+***************
+*** 1197,1202 ****
+--- 1197,1203 ----
+ vim.eval("Exe('throw ''ghi''')"):error:('ghi',)
+ vim.eval("Exe('echoerr ''jkl''')"):error:('Vim(echoerr):jkl',)
+ vim.eval("Exe('xxx_non_existent_command_xxx')"):error:('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',)
++ vim.eval("xxx_unknown_function_xxx()"):error:('Vim:E117: Unknown function: xxx_unknown_function_xxx',)
+ vim.bindeval("Exe('xxx_non_existent_command_xxx')"):error:('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',)
+ Caught KeyboardInterrupt
+ Running :put
+*** ../vim-7.4.106/src/testdir/test87.in 2013-11-11 01:05:43.000000000 +0100
+--- src/testdir/test87.in 2013-11-28 16:41:01.000000000 +0100
+***************
+*** 172,177 ****
+--- 172,207 ----
+ :unlockvar! l
+ :"
+ :" Function calls
++ py3 << EOF
++ import sys
++ import re
++
++ py33_type_error_pattern = re.compile('^__call__\(\) takes (\d+) positional argument but (\d+) were given$')
++
++ def ee(expr, g=globals(), l=locals()):
++ cb = vim.current.buffer
++ try:
++ try:
++ exec(expr, g, l)
++ except Exception as e:
++ if sys.version_info >= (3, 3) and e.__class__ is AttributeError and str(e).find('has no attribute')>=0 and not str(e).startswith("'vim."):
++ cb.append(expr + ':' + repr((e.__class__, AttributeError(str(e)[str(e).rfind(" '") + 2:-1]))))
++ elif sys.version_info >= (3, 3) and e.__class__ is ImportError and str(e).find('No module named \'') >= 0:
++ cb.append(expr + ':' + repr((e.__class__, ImportError(str(e).replace("'", '')))))
++ elif sys.version_info >= (3, 3) and e.__class__ is TypeError:
++ m = py33_type_error_pattern.search(str(e))
++ if m:
++ msg = '__call__() takes exactly {0} positional argument ({1} given)'.format(m.group(1), m.group(2))
++ cb.append(expr + ':' + repr((e.__class__, TypeError(msg))))
++ else:
++ cb.append(expr + ':' + repr((e.__class__, e)))
++ else:
++ cb.append(expr + ':' + repr((e.__class__, e)))
++ else:
++ cb.append(expr + ':NOT FAILED')
++ except Exception as e:
++ cb.append(expr + '::' + repr((e.__class__, e)))
++ EOF
+ :fun New(...)
+ : return ['NewStart']+a:000+['NewEnd']
+ :endfun
+***************
+*** 186,203 ****
+ :$put =string(l)
+ :py3 l+=[l[0].name]
+ :$put =string(l)
+! :try
+! : py3 l[1](1, 2, 3)
+! :catch
+! : $put =v:exception[:13]
+! :endtry
+ :py3 f=l[0]
+ :delfunction New
+! :try
+! : py3 f(1, 2, 3)
+! :catch
+! : $put =v:exception[:13]
+! :endtry
+ :if has('float')
+ : let l=[0.0]
+ : py3 l=vim.bindeval('l')
+--- 216,225 ----
+ :$put =string(l)
+ :py3 l+=[l[0].name]
+ :$put =string(l)
+! :py3 ee('l[1](1, 2, 3)')
+ :py3 f=l[0]
+ :delfunction New
+! :py3 ee('f(1, 2, 3)')
+ :if has('float')
+ : let l=[0.0]
+ : py3 l=vim.bindeval('l')
+***************
+*** 315,320 ****
+--- 337,343 ----
+ :py3 l[0] = t.t > 8 # check if the background thread is working
+ :py3 del time
+ :py3 del threading
++ :py3 del t
+ :$put =string(l)
+ :"
+ :" settrace
+***************
+*** 829,861 ****
+ :fun D()
+ :endfun
+ py3 << EOF
+- import re
+-
+- py33_type_error_pattern = re.compile('^__call__\(\) takes (\d+) positional argument but (\d+) were given$')
+-
+- def ee(expr, g=globals(), l=locals()):
+- try:
+- try:
+- exec(expr, g, l)
+- except Exception as e:
+- if sys.version_info >= (3, 3) and e.__class__ is AttributeError and str(e).find('has no attribute')>=0 and not str(e).startswith("'vim."):
+- cb.append(expr + ':' + repr((e.__class__, AttributeError(str(e)[str(e).rfind(" '") + 2:-1]))))
+- elif sys.version_info >= (3, 3) and e.__class__ is ImportError and str(e).find('No module named \'') >= 0:
+- cb.append(expr + ':' + repr((e.__class__, ImportError(str(e).replace("'", '')))))
+- elif sys.version_info >= (3, 3) and e.__class__ is TypeError:
+- m = py33_type_error_pattern.search(str(e))
+- if m:
+- msg = '__call__() takes exactly {0} positional argument ({1} given)'.format(m.group(1), m.group(2))
+- cb.append(expr + ':' + repr((e.__class__, TypeError(msg))))
+- else:
+- cb.append(expr + ':' + repr((e.__class__, e)))
+- else:
+- cb.append(expr + ':' + repr((e.__class__, e)))
+- else:
+- cb.append(expr + ':NOT FAILED')
+- except Exception as e:
+- cb.append(expr + '::' + repr((e.__class__, e)))
+-
+ d = vim.Dictionary()
+ ned = vim.Dictionary(foo='bar', baz='abcD')
+ dl = vim.Dictionary(a=1)
+--- 852,857 ----
+***************
+*** 1227,1232 ****
+--- 1223,1229 ----
+ ee('vim.eval("Exe(\'throw \'\'ghi\'\'\')")')
+ ee('vim.eval("Exe(\'echoerr \'\'jkl\'\'\')")')
+ ee('vim.eval("Exe(\'xxx_non_existent_command_xxx\')")')
++ ee('vim.eval("xxx_unknown_function_xxx()")')
+ ee('vim.bindeval("Exe(\'xxx_non_existent_command_xxx\')")')
+ del Exe
+ EOF
+*** ../vim-7.4.106/src/testdir/test87.ok 2013-11-11 01:05:43.000000000 +0100
+--- src/testdir/test87.ok 2013-11-28 16:41:01.000000000 +0100
+***************
+*** 53,60 ****
+ [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd']
+ [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}]
+ [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}, 'New']
+! Vim(py3):E725:
+! Vim(py3):E117:
+ [0.0, 0.0]
+ KeyError
+ TypeError
+--- 53,60 ----
+ [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd']
+ [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}]
+ [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}, 'New']
+! l[1](1, 2, 3):(<class 'vim.error'>, error('Vim:E725: Calling dict function without Dictionary: DictNew',))
+! f(1, 2, 3):(<class 'vim.error'>, error('Vim:E117: Unknown function: New',))
+ [0.0, 0.0]
+ KeyError
+ TypeError
+***************
+*** 1186,1191 ****
+--- 1186,1192 ----
+ vim.eval("Exe('throw ''ghi''')"):(<class 'vim.error'>, error('ghi',))
+ vim.eval("Exe('echoerr ''jkl''')"):(<class 'vim.error'>, error('Vim(echoerr):jkl',))
+ vim.eval("Exe('xxx_non_existent_command_xxx')"):(<class 'vim.error'>, error('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',))
++ vim.eval("xxx_unknown_function_xxx()"):(<class 'vim.error'>, error('Vim:E117: Unknown function: xxx_unknown_function_xxx',))
+ vim.bindeval("Exe('xxx_non_existent_command_xxx')"):(<class 'vim.error'>, error('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',))
+ Caught KeyboardInterrupt
+ Running :put
+*** ../vim-7.4.106/src/version.c 2013-11-28 16:32:34.000000000 +0100
+--- src/version.c 2013-11-28 16:41:43.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 107,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+8. You spend half of the plane trip with your laptop on your lap...and your
+ child in the overhead compartment.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.108 b/patches/source/vim/patches/7.4.108
new file mode 100644
index 000000000..054234746
--- /dev/null
+++ b/patches/source/vim/patches/7.4.108
@@ -0,0 +1,215 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.108
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.108
+Problem: "zG" and "zW" leave temp files around on MS-Windows.
+Solution: Delete the temp files when exiting. (Ken Takata)
+Files: src/memline.c, src/proto/spell.pro, src/spell.c
+
+
+*** ../vim-7.4.107/src/memline.c 2013-11-04 02:53:46.000000000 +0100
+--- src/memline.c 2013-11-28 17:27:06.000000000 +0100
+***************
+*** 841,848 ****
+ for (buf = firstbuf; buf != NULL; buf = buf->b_next)
+ ml_close(buf, del_file && ((buf->b_flags & BF_PRESERVED) == 0
+ || vim_strchr(p_cpo, CPO_PRESERVE) == NULL));
+ #ifdef TEMPDIRNAMES
+! vim_deltempdir(); /* delete created temp directory */
+ #endif
+ }
+
+--- 841,851 ----
+ for (buf = firstbuf; buf != NULL; buf = buf->b_next)
+ ml_close(buf, del_file && ((buf->b_flags & BF_PRESERVED) == 0
+ || vim_strchr(p_cpo, CPO_PRESERVE) == NULL));
++ #ifdef FEAT_SPELL
++ spell_delete_wordlist(); /* delete the internal wordlist */
++ #endif
+ #ifdef TEMPDIRNAMES
+! vim_deltempdir(); /* delete created temp directory */
+ #endif
+ }
+
+*** ../vim-7.4.107/src/proto/spell.pro 2013-08-10 13:37:26.000000000 +0200
+--- src/proto/spell.pro 2013-11-28 17:25:59.000000000 +0100
+***************
+*** 3,8 ****
+--- 3,9 ----
+ int spell_move_to __ARGS((win_T *wp, int dir, int allwords, int curline, hlf_T *attrp));
+ void spell_cat_line __ARGS((char_u *buf, char_u *line, int maxlen));
+ char_u *did_set_spelllang __ARGS((win_T *wp));
++ void spell_delete_wordlist __ARGS((void));
+ void spell_free_all __ARGS((void));
+ void spell_reload __ARGS((void));
+ int spell_check_msm __ARGS((void));
+*** ../vim-7.4.107/src/spell.c 2013-11-21 17:42:26.000000000 +0100
+--- src/spell.c 2013-11-28 17:25:59.000000000 +0100
+***************
+*** 2180,2188 ****
+ char_u *endp;
+ hlf_T attr;
+ int len;
+! # ifdef FEAT_SYN_HL
+ int has_syntax = syntax_present(wp);
+! # endif
+ int col;
+ int can_spell;
+ char_u *buf = NULL;
+--- 2180,2188 ----
+ char_u *endp;
+ hlf_T attr;
+ int len;
+! #ifdef FEAT_SYN_HL
+ int has_syntax = syntax_present(wp);
+! #endif
+ int col;
+ int can_spell;
+ char_u *buf = NULL;
+***************
+*** 2280,2286 ****
+ : p - buf)
+ > wp->w_cursor.col)))
+ {
+! # ifdef FEAT_SYN_HL
+ if (has_syntax)
+ {
+ col = (int)(p - buf);
+--- 2280,2286 ----
+ : p - buf)
+ > wp->w_cursor.col)))
+ {
+! #ifdef FEAT_SYN_HL
+ if (has_syntax)
+ {
+ col = (int)(p - buf);
+***************
+*** 4701,4707 ****
+ return flags;
+ }
+
+! # if defined(FEAT_MBYTE) || defined(EXITFREE) || defined(PROTO)
+ /*
+ * Free all languages.
+ */
+--- 4701,4725 ----
+ return flags;
+ }
+
+! /*
+! * Delete the internal wordlist and its .spl file.
+! */
+! void
+! spell_delete_wordlist()
+! {
+! char_u fname[MAXPATHL];
+!
+! if (int_wordlist != NULL)
+! {
+! mch_remove(int_wordlist);
+! int_wordlist_spl(fname);
+! mch_remove(fname);
+! vim_free(int_wordlist);
+! int_wordlist = NULL;
+! }
+! }
+!
+! #if defined(FEAT_MBYTE) || defined(EXITFREE) || defined(PROTO)
+ /*
+ * Free all languages.
+ */
+***************
+*** 4710,4716 ****
+ {
+ slang_T *slang;
+ buf_T *buf;
+- char_u fname[MAXPATHL];
+
+ /* Go through all buffers and handle 'spelllang'. <VN> */
+ for (buf = firstbuf; buf != NULL; buf = buf->b_next)
+--- 4728,4733 ----
+***************
+*** 4723,4746 ****
+ slang_free(slang);
+ }
+
+! if (int_wordlist != NULL)
+! {
+! /* Delete the internal wordlist and its .spl file */
+! mch_remove(int_wordlist);
+! int_wordlist_spl(fname);
+! mch_remove(fname);
+! vim_free(int_wordlist);
+! int_wordlist = NULL;
+! }
+
+ vim_free(repl_to);
+ repl_to = NULL;
+ vim_free(repl_from);
+ repl_from = NULL;
+ }
+! # endif
+
+! # if defined(FEAT_MBYTE) || defined(PROTO)
+ /*
+ * Clear all spelling tables and reload them.
+ * Used after 'encoding' is set and when ":mkspell" was used.
+--- 4740,4755 ----
+ slang_free(slang);
+ }
+
+! spell_delete_wordlist();
+
+ vim_free(repl_to);
+ repl_to = NULL;
+ vim_free(repl_from);
+ repl_from = NULL;
+ }
+! #endif
+
+! #if defined(FEAT_MBYTE) || defined(PROTO)
+ /*
+ * Clear all spelling tables and reload them.
+ * Used after 'encoding' is set and when ":mkspell" was used.
+***************
+*** 4773,4779 ****
+ }
+ }
+ }
+! # endif
+
+ /*
+ * Reload the spell file "fname" if it's loaded.
+--- 4782,4788 ----
+ }
+ }
+ }
+! #endif
+
+ /*
+ * Reload the spell file "fname" if it's loaded.
+*** ../vim-7.4.107/src/version.c 2013-11-28 17:04:38.000000000 +0100
+--- src/version.c 2013-11-28 17:26:31.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 108,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+9. All your daydreaming is preoccupied with getting a faster connection to the
+ net: 28.8...ISDN...cable modem...T1...T3.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.109 b/patches/source/vim/patches/7.4.109
new file mode 100644
index 000000000..70ed86d23
--- /dev/null
+++ b/patches/source/vim/patches/7.4.109
@@ -0,0 +1,123 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.109
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.109
+Problem: ColorScheme autocommand matches with the current buffer name.
+Solution: Match with the colorscheme name. (Christian Brabandt)
+Files: runtime/doc/autocmd.txt, src/fileio.c, src/syntax.c
+
+
+*** ../vim-7.4.108/runtime/doc/autocmd.txt 2013-08-10 13:24:52.000000000 +0200
+--- runtime/doc/autocmd.txt 2013-11-28 18:44:20.000000000 +0100
+***************
+*** 480,485 ****
+--- 480,491 ----
+ |cmdwin-char|
+ *ColorScheme*
+ ColorScheme After loading a color scheme. |:colorscheme|
++ The pattern is matched against the
++ colorscheme name. <afile> can be used for the
++ name of the actual file where this option was
++ set, and <amatch> for the new colorscheme
++ name.
++
+
+ *CompleteDone*
+ CompleteDone After Insert mode completion is done. Either
+*** ../vim-7.4.108/src/fileio.c 2013-11-12 18:09:20.000000000 +0100
+--- src/fileio.c 2013-11-28 18:44:20.000000000 +0100
+***************
+*** 9330,9336 ****
+ */
+ if (fname_io == NULL)
+ {
+! if (fname != NULL && *fname != NUL)
+ autocmd_fname = fname;
+ else if (buf != NULL)
+ autocmd_fname = buf->b_ffname;
+--- 9330,9338 ----
+ */
+ if (fname_io == NULL)
+ {
+! if (event == EVENT_COLORSCHEME)
+! autocmd_fname = NULL;
+! else if (fname != NULL && *fname != NUL)
+ autocmd_fname = fname;
+ else if (buf != NULL)
+ autocmd_fname = buf->b_ffname;
+***************
+*** 9383,9396 ****
+ else
+ {
+ sfname = vim_strsave(fname);
+! /* Don't try expanding FileType, Syntax, FuncUndefined, WindowID or
+! * QuickFixCmd* */
+ if (event == EVENT_FILETYPE
+ || event == EVENT_SYNTAX
+ || event == EVENT_FUNCUNDEFINED
+ || event == EVENT_REMOTEREPLY
+ || event == EVENT_SPELLFILEMISSING
+ || event == EVENT_QUICKFIXCMDPRE
+ || event == EVENT_QUICKFIXCMDPOST)
+ fname = vim_strsave(fname);
+ else
+--- 9385,9399 ----
+ else
+ {
+ sfname = vim_strsave(fname);
+! /* Don't try expanding FileType, Syntax, FuncUndefined, WindowID,
+! * ColorScheme or QuickFixCmd* */
+ if (event == EVENT_FILETYPE
+ || event == EVENT_SYNTAX
+ || event == EVENT_FUNCUNDEFINED
+ || event == EVENT_REMOTEREPLY
+ || event == EVENT_SPELLFILEMISSING
+ || event == EVENT_QUICKFIXCMDPRE
++ || event == EVENT_COLORSCHEME
+ || event == EVENT_QUICKFIXCMDPOST)
+ fname = vim_strsave(fname);
+ else
+*** ../vim-7.4.108/src/syntax.c 2013-06-08 16:10:08.000000000 +0200
+--- src/syntax.c 2013-11-28 18:44:20.000000000 +0100
+***************
+*** 7071,7077 ****
+ retval = source_runtime(buf, FALSE);
+ vim_free(buf);
+ #ifdef FEAT_AUTOCMD
+! apply_autocmds(EVENT_COLORSCHEME, NULL, NULL, FALSE, curbuf);
+ #endif
+ }
+ recursive = FALSE;
+--- 7071,7077 ----
+ retval = source_runtime(buf, FALSE);
+ vim_free(buf);
+ #ifdef FEAT_AUTOCMD
+! apply_autocmds(EVENT_COLORSCHEME, name, curbuf->b_fname, FALSE, curbuf);
+ #endif
+ }
+ recursive = FALSE;
+*** ../vim-7.4.108/src/version.c 2013-11-28 17:41:41.000000000 +0100
+--- src/version.c 2013-11-28 18:48:42.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 109,
+ /**/
+
+--
+"How is your new girlfriend?"
+"90-60-90 man!"
+"What, pale purple?"
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.110 b/patches/source/vim/patches/7.4.110
new file mode 100644
index 000000000..0a40ee90f
--- /dev/null
+++ b/patches/source/vim/patches/7.4.110
@@ -0,0 +1,102 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.110
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.110
+Problem: "gUgn" cannot be repeeated. (Dimitar Dimitrov)
+Solution: Don't put "gn" in a different order in the redo buffer. Restore
+ 'wrapscan' when the pattern isn't found. (Christian Wellenbrock)
+Files: src/normal.c, src/search.c, src/test53.in, src/test53.ok
+
+
+*** ../vim-7.4.109/src/normal.c 2013-11-04 01:41:11.000000000 +0100
+--- src/normal.c 2013-11-28 19:02:45.000000000 +0100
+***************
+*** 962,972 ****
+ #ifdef FEAT_CMDL_INFO
+ need_flushbuf |= add_to_showcmd(ca.nchar);
+ #endif
+- /* For "gn" from redo, need to get one more char to determine the
+- * operator */
+ if (ca.nchar == 'r' || ca.nchar == '\'' || ca.nchar == '`'
+! || ca.nchar == Ctrl_BSL
+! || ((ca.nchar == 'n' || ca.nchar == 'N') && !stuff_empty()))
+ {
+ cp = &ca.extra_char; /* need to get a third character */
+ if (ca.nchar != 'r')
+--- 962,969 ----
+ #ifdef FEAT_CMDL_INFO
+ need_flushbuf |= add_to_showcmd(ca.nchar);
+ #endif
+ if (ca.nchar == 'r' || ca.nchar == '\'' || ca.nchar == '`'
+! || ca.nchar == Ctrl_BSL)
+ {
+ cp = &ca.extra_char; /* need to get a third character */
+ if (ca.nchar != 'r')
+***************
+*** 1797,1806 ****
+ * otherwise it might be the second char of the operator. */
+ if (cap->cmdchar == 'g' && (cap->nchar == 'n'
+ || cap->nchar == 'N'))
+! /* "gn" and "gN" are a bit different */
+! prep_redo(oap->regname, 0L, NUL, cap->cmdchar, cap->nchar,
+! get_op_char(oap->op_type),
+! get_extra_op_char(oap->op_type));
+ else if (cap->cmdchar != ':')
+ prep_redo(oap->regname, 0L, NUL, 'v',
+ get_op_char(oap->op_type),
+--- 1794,1802 ----
+ * otherwise it might be the second char of the operator. */
+ if (cap->cmdchar == 'g' && (cap->nchar == 'n'
+ || cap->nchar == 'N'))
+! prep_redo(oap->regname, cap->count0,
+! get_op_char(oap->op_type), get_extra_op_char(oap->op_type),
+! oap->motion_force, cap->cmdchar, cap->nchar);
+ else if (cap->cmdchar != ':')
+ prep_redo(oap->regname, 0L, NUL, 'v',
+ get_op_char(oap->op_type),
+*** ../vim-7.4.109/src/search.c 2013-11-08 04:30:06.000000000 +0100
+--- src/search.c 2013-11-28 19:05:16.000000000 +0100
+***************
+*** 4544,4550 ****
+ /* Is the pattern is zero-width? */
+ one_char = is_one_char(spats[last_idx].pat);
+ if (one_char == -1)
+! return FAIL; /* invalid pattern */
+
+ /*
+ * The trick is to first search backwards and then search forward again,
+--- 4544,4553 ----
+ /* Is the pattern is zero-width? */
+ one_char = is_one_char(spats[last_idx].pat);
+ if (one_char == -1)
+! {
+! p_ws = old_p_ws;
+! return FAIL; /* pattern not found */
+! }
+
+ /*
+ * The trick is to first search backwards and then search forward again,
+*** ../vim-7.4.109/src/version.c 2013-11-28 18:53:47.000000000 +0100
+--- src/version.c 2013-11-28 19:20:29.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 110,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+10. And even your night dreams are in HTML.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.111 b/patches/source/vim/patches/7.4.111
new file mode 100644
index 000000000..e8c7a48d8
--- /dev/null
+++ b/patches/source/vim/patches/7.4.111
@@ -0,0 +1,63 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.111
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.111
+Problem: Memory leak in Python OptionsAssItem. (Ken Takata)
+Solution: Call Py_XDECREF() where needed. (ZyX)
+Files: src/if_py_both.h
+
+
+*** ../vim-7.4.110/src/if_py_both.h 2013-11-28 17:04:38.000000000 +0100
+--- src/if_py_both.h 2013-12-07 14:23:00.000000000 +0100
+***************
+*** 3005,3015 ****
+ else
+ {
+ char_u *val;
+! PyObject *todecref;
+
+! if ((val = StringToChars(valObject, &todecref)))
+ ret = set_option_value_for(key, 0, val, opt_flags,
+ self->opt_type, self->from);
+ else
+ ret = -1;
+ }
+--- 3005,3018 ----
+ else
+ {
+ char_u *val;
+! PyObject *todecref2;
+
+! if ((val = StringToChars(valObject, &todecref2)))
+! {
+ ret = set_option_value_for(key, 0, val, opt_flags,
+ self->opt_type, self->from);
++ Py_XDECREF(todecref2);
++ }
+ else
+ ret = -1;
+ }
+*** ../vim-7.4.110/src/version.c 2013-11-28 19:27:18.000000000 +0100
+--- src/version.c 2013-12-07 14:24:16.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 111,
+ /**/
+
+--
+How To Keep A Healthy Level Of Insanity:
+12. Sing along at the opera.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.112 b/patches/source/vim/patches/7.4.112
new file mode 100644
index 000000000..ab64e1311
--- /dev/null
+++ b/patches/source/vim/patches/7.4.112
@@ -0,0 +1,70 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.112
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.112
+Problem: The defaults for 'directory' and 'backupdir' on MS-Windows do not
+ include a directory that exists.
+Solution: Use $TEMP.
+Files: src/os_dos.h
+
+
+*** ../vim-7.4.111/src/os_dos.h 2013-06-12 20:09:44.000000000 +0200
+--- src/os_dos.h 2013-12-04 15:23:22.000000000 +0100
+***************
+*** 109,115 ****
+ #endif
+
+ #ifndef DFLT_BDIR
+! # define DFLT_BDIR ".,c:\\tmp,c:\\temp" /* default for 'backupdir' */
+ #endif
+
+ #ifndef DFLT_VDIR
+--- 109,115 ----
+ #endif
+
+ #ifndef DFLT_BDIR
+! # define DFLT_BDIR ".,$TEMP,c:\\tmp,c:\\temp" /* default for 'backupdir' */
+ #endif
+
+ #ifndef DFLT_VDIR
+***************
+*** 117,123 ****
+ #endif
+
+ #ifndef DFLT_DIR
+! # define DFLT_DIR ".,c:\\tmp,c:\\temp" /* default for 'directory' */
+ #endif
+
+ #define DFLT_ERRORFILE "errors.err"
+--- 117,123 ----
+ #endif
+
+ #ifndef DFLT_DIR
+! # define DFLT_DIR ".,$TEMP,c:\\tmp,c:\\temp" /* default for 'directory' */
+ #endif
+
+ #define DFLT_ERRORFILE "errors.err"
+*** ../vim-7.4.111/src/version.c 2013-12-07 14:28:37.000000000 +0100
+--- src/version.c 2013-12-07 14:31:03.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 112,
+ /**/
+
+--
+How To Keep A Healthy Level Of Insanity:
+13. Go to a poetry recital and ask why the poems don't rhyme.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.113 b/patches/source/vim/patches/7.4.113
new file mode 100644
index 000000000..97059e551
--- /dev/null
+++ b/patches/source/vim/patches/7.4.113
@@ -0,0 +1,101 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.113
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.113
+Problem: MSVC static analysis gives warnings.
+Solution: Avoid the warnings and avoid possible bugs. (Ken Takata)
+Files: src/os_win32.c
+
+
+*** ../vim-7.4.112/src/os_win32.c 2013-11-21 12:34:07.000000000 +0100
+--- src/os_win32.c 2013-12-07 14:41:35.000000000 +0100
+***************
+*** 2509,2515 ****
+ WCHAR *porig, *porigPrev;
+ int flen;
+ WIN32_FIND_DATAW fb;
+! HANDLE hFind;
+ int c;
+ int slen;
+
+--- 2509,2515 ----
+ WCHAR *porig, *porigPrev;
+ int flen;
+ WIN32_FIND_DATAW fb;
+! HANDLE hFind = INVALID_HANDLE_VALUE;
+ int c;
+ int slen;
+
+***************
+*** 2528,2535 ****
+ /* copy leading drive letter */
+ *ptrue++ = *porig++;
+ *ptrue++ = *porig++;
+- *ptrue = NUL; /* in case nothing follows */
+ }
+
+ while (*porig != NUL)
+ {
+--- 2528,2535 ----
+ /* copy leading drive letter */
+ *ptrue++ = *porig++;
+ *ptrue++ = *porig++;
+ }
++ *ptrue = NUL; /* in case nothing follows */
+
+ while (*porig != NUL)
+ {
+***************
+*** 2673,2680 ****
+ /* copy leading drive letter */
+ *ptrue++ = *porig++;
+ *ptrue++ = *porig++;
+- *ptrue = NUL; /* in case nothing follows */
+ }
+
+ while (*porig != NUL)
+ {
+--- 2673,2680 ----
+ /* copy leading drive letter */
+ *ptrue++ = *porig++;
+ *ptrue++ = *porig++;
+ }
++ *ptrue = NUL; /* in case nothing follows */
+
+ while (*porig != NUL)
+ {
+***************
+*** 6272,6277 ****
+--- 6272,6278 ----
+ while (i > 0)
+ free(argv[--i]);
+ free(argv);
++ argv = NULL;
+ argc = 0;
+ }
+ }
+*** ../vim-7.4.112/src/version.c 2013-12-07 14:32:04.000000000 +0100
+--- src/version.c 2013-12-07 14:37:48.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 113,
+ /**/
+
+--
+How To Keep A Healthy Level Of Insanity:
+15. Five days in advance, tell your friends you can't attend their
+ party because you're not in the mood.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.114 b/patches/source/vim/patches/7.4.114
new file mode 100644
index 000000000..9b982f6b6
--- /dev/null
+++ b/patches/source/vim/patches/7.4.114
@@ -0,0 +1,56 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.114
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.114
+Problem: New GNU make outputs messages about changing directory in another
+ format.
+Solution: Recognize the new format.
+Files: src/option.h
+
+
+*** ../vim-7.4.113/src/option.h 2013-11-06 05:26:08.000000000 +0100
+--- src/option.h 2013-12-04 12:43:03.000000000 +0100
+***************
+*** 31,39 ****
+ # define DFLT_EFM "%A%p^,%C%%CC-%t-%m,%Cat line number %l in file %f,%f|%l| %m"
+ # else /* Unix, probably */
+ # ifdef EBCDIC
+! #define DFLT_EFM "%*[^ ] %*[^ ] %f:%l%*[ ]%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m"
+ # else
+! #define DFLT_EFM "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from %f:%l:%c\\,,%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-G%*[ ]from %f:%l:%c,%-G%*[ ]from %f:%l:,%-G%*[ ]from %f:%l\\,,%-G%*[ ]from %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%D%*\\a: Entering directory `%f',%X%*\\a: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m"
+ # endif
+ # endif
+ # endif
+--- 31,39 ----
+ # define DFLT_EFM "%A%p^,%C%%CC-%t-%m,%Cat line number %l in file %f,%f|%l| %m"
+ # else /* Unix, probably */
+ # ifdef EBCDIC
+! #define DFLT_EFM "%*[^ ] %*[^ ] %f:%l%*[ ]%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory [`']%f',%X%*\\a[%*\\d]: Leaving directory [`']%f',%DMaking %*\\a in %f,%f|%l| %m"
+ # else
+! #define DFLT_EFM "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from %f:%l:%c\\,,%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-G%*[ ]from %f:%l:%c,%-G%*[ ]from %f:%l:,%-G%*[ ]from %f:%l\\,,%-G%*[ ]from %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory [`']%f',%X%*\\a[%*\\d]: Leaving directory [`']%f',%D%*\\a: Entering directory [`']%f',%X%*\\a: Leaving directory [`']%f',%DMaking %*\\a in %f,%f|%l| %m"
+ # endif
+ # endif
+ # endif
+*** ../vim-7.4.113/src/version.c 2013-12-07 14:48:06.000000000 +0100
+--- src/version.c 2013-12-11 12:22:19.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 114,
+ /**/
+
+--
+Everyone has a photographic memory. Some don't have film.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.115 b/patches/source/vim/patches/7.4.115
new file mode 100644
index 000000000..1d1a561bb
--- /dev/null
+++ b/patches/source/vim/patches/7.4.115
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.115
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.115
+Problem: When using Zsh expanding ~abc doesn't work when the result
+ contains a space.
+Solution: Off-by-one error in detecting the NUL. (Pavol Juhas)
+Files: src/os_unix.c
+
+
+*** ../vim-7.4.114/src/os_unix.c 2013-11-03 00:40:54.000000000 +0100
+--- src/os_unix.c 2013-12-11 13:19:26.000000000 +0100
+***************
+*** 5990,5996 ****
+ {
+ /* If there is a NUL, set did_find_nul, else set check_spaces */
+ buffer[len] = NUL;
+! if (len && (int)STRLEN(buffer) < (int)len - 1)
+ did_find_nul = TRUE;
+ else
+ check_spaces = TRUE;
+--- 5990,5996 ----
+ {
+ /* If there is a NUL, set did_find_nul, else set check_spaces */
+ buffer[len] = NUL;
+! if (len && (int)STRLEN(buffer) < (int)len)
+ did_find_nul = TRUE;
+ else
+ check_spaces = TRUE;
+*** ../vim-7.4.114/src/version.c 2013-12-11 12:22:54.000000000 +0100
+--- src/version.c 2013-12-11 13:20:29.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 115,
+ /**/
+
+--
+Change is inevitable, except from a vending machine.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.116 b/patches/source/vim/patches/7.4.116
new file mode 100644
index 000000000..f242f0500
--- /dev/null
+++ b/patches/source/vim/patches/7.4.116
@@ -0,0 +1,46 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.116
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.116
+Problem: When a mapping starts with a space, the typed space does not show
+ up for 'showcmd'.
+Solution: Show "<20>". (Brook Hong)
+Files: src/normal.c
+
+
+*** ../vim-7.4.115/src/normal.c 2013-11-28 19:27:18.000000000 +0100
+--- src/normal.c 2013-12-07 14:30:29.000000000 +0100
+***************
+*** 4021,4026 ****
+--- 4021,4028 ----
+ #endif
+
+ p = transchar(c);
++ if (*p == ' ')
++ STRCPY(p, "<20>");
+ old_len = (int)STRLEN(showcmd_buf);
+ extra_len = (int)STRLEN(p);
+ overflow = old_len + extra_len - SHOWCMD_COLS;
+*** ../vim-7.4.115/src/version.c 2013-12-11 13:21:44.000000000 +0100
+--- src/version.c 2013-12-11 14:16:58.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 116,
+ /**/
+
+--
+Bumper sticker: Honk if you love peace and quiet.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.117 b/patches/source/vim/patches/7.4.117
new file mode 100644
index 000000000..5fb026891
--- /dev/null
+++ b/patches/source/vim/patches/7.4.117
@@ -0,0 +1,263 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.117
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.117
+Problem: Can't build with Cygwin/MingW and Perl 5.18.
+Solution: Add a linker argument for the Perl library. (Cesar Romani)
+ Adjust CFLAGS and LIB. (Cesar Romani)
+ Move including inline.h further down. (Ken Takata)
+Files: src/Make_cyg.mak, src/Make_ming.mak, src/if_perl.xs
+
+
+*** ../vim-7.4.116/src/Make_cyg.mak 2013-11-28 16:32:34.000000000 +0100
+--- src/Make_cyg.mak 2013-12-11 14:59:12.000000000 +0100
+***************
+*** 1,6 ****
+ #
+ # Makefile for VIM on Win32, using Cygnus gcc
+! # Last updated by Dan Sharp. Last Change: 2013 Nov 28
+ #
+ # Also read INSTALLpc.txt!
+ #
+--- 1,6 ----
+ #
+ # Makefile for VIM on Win32, using Cygnus gcc
+! # Last updated by Dan Sharp. Last Change: 2013 Dec 11
+ #
+ # Also read INSTALLpc.txt!
+ #
+***************
+*** 155,161 ****
+ ifeq (yes, $(DYNAMIC_PERL))
+ DEFINES += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
+ else
+! EXTRA_LIBS += $(PERL)/lib/CORE/perl$(PERL_VER).lib
+ endif
+ endif
+
+--- 155,161 ----
+ ifeq (yes, $(DYNAMIC_PERL))
+ DEFINES += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
+ else
+! EXTRA_LIBS += -L$(PERL)/lib/CORE -lperl$(PERL_VER)
+ endif
+ endif
+
+*** ../vim-7.4.116/src/Make_ming.mak 2013-07-06 13:32:11.000000000 +0200
+--- src/Make_ming.mak 2013-12-07 20:02:52.000000000 +0100
+***************
+*** 359,364 ****
+--- 359,365 ----
+
+ CFLAGS = -Iproto $(DEFINES) -pipe -w -march=$(ARCH) -Wall
+ WINDRES_FLAGS = --preprocessor="$(WINDRES_CC) -E -xc" -DRC_INVOKED
++ EXTRA_LIBS =
+
+ ifdef GETTEXT
+ DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H
+***************
+*** 377,385 ****
+ endif
+
+ ifdef PERL
+! CFLAGS += -I$(PERLLIBS) -DFEAT_PERL -L$(PERLLIBS)
+ ifeq (yes, $(DYNAMIC_PERL))
+ CFLAGS += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
+ endif
+ endif
+
+--- 378,387 ----
+ endif
+
+ ifdef PERL
+! CFLAGS += -I$(PERLLIBS) -DFEAT_PERL
+ ifeq (yes, $(DYNAMIC_PERL))
+ CFLAGS += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
++ EXTRA_LIBS += -L$(PERLLIBS) -lperl$(PERL_VER)
+ endif
+ endif
+
+***************
+*** 632,638 ****
+
+ ifdef PERL
+ ifeq (no, $(DYNAMIC_PERL))
+! LIB += -lperl$(PERL_VER)
+ endif
+ endif
+
+--- 634,640 ----
+
+ ifdef PERL
+ ifeq (no, $(DYNAMIC_PERL))
+! LIB += -L$(PERLLIBS) -lperl$(PERL_VER)
+ endif
+ endif
+
+*** ../vim-7.4.116/src/if_perl.xs 2013-08-02 19:28:50.000000000 +0200
+--- src/if_perl.xs 2013-12-11 15:02:58.000000000 +0100
+***************
+*** 14,20 ****
+ #define IN_PERL_FILE /* don't include if_perl.pro from proto.h */
+
+ /*
+! * Currently 32-bit version of ActivePerl is built with VC6.
+ * (http://community.activestate.com/faq/windows-compilers-perl-modules)
+ * It means that time_t should be 32-bit. However the default size of
+ * time_t is 64-bit since VC8. So we have to define _USE_32BIT_TIME_T.
+--- 14,21 ----
+ #define IN_PERL_FILE /* don't include if_perl.pro from proto.h */
+
+ /*
+! * Currently 32-bit version of ActivePerl is built with VC6 (or MinGW since
+! * ActivePerl 5.18).
+ * (http://community.activestate.com/faq/windows-compilers-perl-modules)
+ * It means that time_t should be 32-bit. However the default size of
+ * time_t is 64-bit since VC8. So we have to define _USE_32BIT_TIME_T.
+***************
+*** 23,28 ****
+--- 24,45 ----
+ # define _USE_32BIT_TIME_T
+ #endif
+
++ /* Work around for perl-5.18.
++ * Don't include "perl\lib\CORE\inline.h" for now,
++ * include it after Perl_sv_free2 is defined. */
++ #define PERL_NO_INLINE_FUNCTIONS
++
++ /*
++ * Prevent including winsock.h. perl.h tries to detect whether winsock.h is
++ * already included before including winsock2.h, because winsock2.h isn't
++ * compatible with winsock.h. However the detection doesn't work with some
++ * versions of MinGW. If WIN32_LEAN_AND_MEAN is defined, windows.h will not
++ * include winsock.h.
++ */
++ #ifdef WIN32
++ # define WIN32_LEAN_AND_MEAN
++ #endif
++
+ #include "vim.h"
+
+ #include <EXTERN.h>
+***************
+*** 81,90 ****
+ # define PERL5101_OR_LATER
+ #endif
+
+- #if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
+- # define PERL5180_OR_LATER
+- #endif
+-
+ #ifndef pTHX
+ # define pTHX void
+ # define pTHX_
+--- 98,103 ----
+***************
+*** 145,155 ****
+ # define perl_free dll_perl_free
+ # define Perl_get_context dll_Perl_get_context
+ # define Perl_croak dll_Perl_croak
+- # ifndef PERL5180_OR_LATER
+ # ifdef PERL5101_OR_LATER
+ # define Perl_croak_xs_usage dll_Perl_croak_xs_usage
+ # endif
+- # endif
+ # ifndef PROTO
+ # define Perl_croak_nocontext dll_Perl_croak_nocontext
+ # define Perl_call_argv dll_Perl_call_argv
+--- 158,166 ----
+***************
+*** 262,271 ****
+ static int (*perl_parse)(PerlInterpreter*, XSINIT_t, int, char**, char**);
+ static void* (*Perl_get_context)(void);
+ static void (*Perl_croak)(pTHX_ const char*, ...);
+- #ifndef PERL5180_OR_LATER
+ #ifdef PERL5101_OR_LATER
+ static void (*Perl_croak_xs_usage)(pTHX_ const CV *const, const char *const params);
+! #endif
+ #endif
+ static void (*Perl_croak_nocontext)(const char*, ...);
+ static I32 (*Perl_dowantarray)(pTHX);
+--- 273,285 ----
+ static int (*perl_parse)(PerlInterpreter*, XSINIT_t, int, char**, char**);
+ static void* (*Perl_get_context)(void);
+ static void (*Perl_croak)(pTHX_ const char*, ...);
+ #ifdef PERL5101_OR_LATER
++ /* Perl-5.18 has a different Perl_croak_xs_usage signature. */
++ # if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
++ static void (*Perl_croak_xs_usage)(const CV *const, const char *const params);
++ # else
+ static void (*Perl_croak_xs_usage)(pTHX_ const CV *const, const char *const params);
+! # endif
+ #endif
+ static void (*Perl_croak_nocontext)(const char*, ...);
+ static I32 (*Perl_dowantarray)(pTHX);
+***************
+*** 337,343 ****
+--- 351,362 ----
+ static XPV** (*Perl_TXpv_ptr)(register PerlInterpreter*);
+ static STRLEN* (*Perl_Tna_ptr)(register PerlInterpreter*);
+ #else
++ /* Perl-5.18 has a different Perl_sv_free2 signature. */
++ # if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
++ static void (*Perl_sv_free2)(pTHX_ SV*, const U32);
++ # else
+ static void (*Perl_sv_free2)(pTHX_ SV*);
++ # endif
+ static void (*Perl_sys_init)(int* argc, char*** argv);
+ static void (*Perl_sys_term)(void);
+ static void (*Perl_call_list)(pTHX_ I32, AV*);
+***************
+*** 384,394 ****
+ {"perl_parse", (PERL_PROC*)&perl_parse},
+ {"Perl_get_context", (PERL_PROC*)&Perl_get_context},
+ {"Perl_croak", (PERL_PROC*)&Perl_croak},
+- #ifndef PERL5180_OR_LATER
+ #ifdef PERL5101_OR_LATER
+ {"Perl_croak_xs_usage", (PERL_PROC*)&Perl_croak_xs_usage},
+ #endif
+- #endif
+ {"Perl_croak_nocontext", (PERL_PROC*)&Perl_croak_nocontext},
+ {"Perl_dowantarray", (PERL_PROC*)&Perl_dowantarray},
+ {"Perl_free_tmps", (PERL_PROC*)&Perl_free_tmps},
+--- 403,411 ----
+***************
+*** 492,497 ****
+--- 509,522 ----
+ {"", NULL},
+ };
+
++ /* Work around for perl-5.18.
++ * The definitions of S_SvREFCNT_inc and S_SvREFCNT_dec are needed, so include
++ * "perl\lib\CORE\inline.h", after Perl_sv_free2 is defined.
++ * The linker won't complain about undefined __impl_Perl_sv_free2. */
++ #if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
++ # include <inline.h>
++ #endif
++
+ /*
+ * Make all runtime-links of perl.
+ *
+*** ../vim-7.4.116/src/version.c 2013-12-11 14:54:58.000000000 +0100
+--- src/version.c 2013-12-11 15:00:12.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 117,
+ /**/
+
+--
+Despite the cost of living, have you noticed how it remains so popular?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.118 b/patches/source/vim/patches/7.4.118
new file mode 100644
index 000000000..04701cc40
--- /dev/null
+++ b/patches/source/vim/patches/7.4.118
@@ -0,0 +1,90 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.118
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.118
+Problem: It's possible that redrawing the status lines causes
+ win_redr_custom() to be called recursively.
+Solution: Protect against recursiveness. (Yasuhiro Matsumoto)
+Files: src/screen.c
+
+
+*** ../vim-7.4.117/src/screen.c 2013-11-08 04:30:06.000000000 +0100
+--- src/screen.c 2013-12-11 15:32:21.000000000 +0100
+***************
+*** 6653,6658 ****
+--- 6653,6659 ----
+ win_T *wp;
+ int draw_ruler; /* TRUE or FALSE */
+ {
++ static int entered = FALSE;
+ int attr;
+ int curattr;
+ int row;
+***************
+*** 6671,6676 ****
+--- 6672,6684 ----
+ win_T *ewp;
+ int p_crb_save;
+
++ /* There is a tiny chance that this gets called recursively: When
++ * redrawing a status line triggers redrawing the ruler or tabline.
++ * Avoid trouble by not allowing recursion. */
++ if (entered)
++ return;
++ entered = TRUE;
++
+ /* setup environment for the task at hand */
+ if (wp == NULL)
+ {
+***************
+*** 6746,6752 ****
+ }
+
+ if (maxwidth <= 0)
+! return;
+
+ /* Temporarily reset 'cursorbind', we don't want a side effect from moving
+ * the cursor away and back. */
+--- 6754,6760 ----
+ }
+
+ if (maxwidth <= 0)
+! goto theend;
+
+ /* Temporarily reset 'cursorbind', we don't want a side effect from moving
+ * the cursor away and back. */
+***************
+*** 6827,6832 ****
+--- 6835,6843 ----
+ while (col < Columns)
+ TabPageIdxs[col++] = fillchar;
+ }
++
++ theend:
++ entered = FALSE;
+ }
+
+ #endif /* FEAT_STL_OPT */
+*** ../vim-7.4.117/src/version.c 2013-12-11 15:06:36.000000000 +0100
+--- src/version.c 2013-12-11 15:32:16.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 118,
+ /**/
+
+--
+Nothing is fool-proof to a sufficiently talented fool.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.119 b/patches/source/vim/patches/7.4.119
new file mode 100644
index 000000000..061b81a55
--- /dev/null
+++ b/patches/source/vim/patches/7.4.119
@@ -0,0 +1,245 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.119
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.119
+Problem: Vim doesn't work well on OpenVMS.
+Solution: Fix various problems. (Samuel Ferencik)
+Files: src/os_unix.c, src/os_unix.h, src/os_vms.c
+
+
+*** ../vim-7.4.118/src/os_unix.c 2013-12-11 13:21:44.000000000 +0100
+--- src/os_unix.c 2013-12-11 16:16:03.000000000 +0100
+***************
+*** 168,174 ****
+ static pid_t wait4pid __ARGS((pid_t, waitstatus *));
+
+ static int WaitForChar __ARGS((long));
+! #if defined(__BEOS__)
+ int RealWaitForChar __ARGS((int, long, int *));
+ #else
+ static int RealWaitForChar __ARGS((int, long, int *));
+--- 168,174 ----
+ static pid_t wait4pid __ARGS((pid_t, waitstatus *));
+
+ static int WaitForChar __ARGS((long));
+! #if defined(__BEOS__) || defined(VMS)
+ int RealWaitForChar __ARGS((int, long, int *));
+ #else
+ static int RealWaitForChar __ARGS((int, long, int *));
+***************
+*** 435,441 ****
+ /* Process the queued netbeans messages. */
+ netbeans_parse_messages();
+ #endif
+- #ifndef VMS /* VMS: must try reading, WaitForChar() does nothing. */
+ /*
+ * We want to be interrupted by the winch signal
+ * or by an event on the monitored file descriptors.
+--- 435,440 ----
+***************
+*** 446,452 ****
+ handle_resize();
+ return 0;
+ }
+- #endif
+
+ /* If input was put directly in typeahead buffer bail out here. */
+ if (typebuf_changed(tb_change_cnt))
+--- 445,450 ----
+***************
+*** 5039,5044 ****
+--- 5037,5043 ----
+ return avail;
+ }
+
++ #ifndef VMS
+ /*
+ * Wait "msec" msec until a character is available from file descriptor "fd".
+ * "msec" == 0 will check for characters once.
+***************
+*** 5338,5350 ****
+ }
+ # endif
+
+- # ifdef OLD_VMS
+- /* Old VMS as v6.2 and older have broken select(). It waits more than
+- * required. Should not be used */
+- ret = 0;
+- # else
+ ret = select(maxfd + 1, &rfds, NULL, &efds, tvp);
+- # endif
+ # ifdef EINTR
+ if (ret == -1 && errno == EINTR)
+ {
+--- 5337,5343 ----
+***************
+*** 5466,5473 ****
+ return (ret > 0);
+ }
+
+- #ifndef VMS
+-
+ #ifndef NO_EXPANDPATH
+ /*
+ * Expand a path into all matching files and/or directories. Handles "*",
+--- 5459,5464 ----
+*** ../vim-7.4.118/src/os_unix.h 2013-06-12 20:09:44.000000000 +0200
+--- src/os_unix.h 2013-12-11 16:16:03.000000000 +0100
+***************
+*** 225,230 ****
+--- 225,232 ----
+ # include <starlet.h>
+ # include <socket.h>
+ # include <lib$routines.h>
++ # include <libdef.h>
++ # include <libdtdef.h>
+
+ # ifdef FEAT_GUI_GTK
+ # include "gui_gtk_vms.h"
+*** ../vim-7.4.118/src/os_vms.c 2010-06-26 06:03:31.000000000 +0200
+--- src/os_vms.c 2013-12-11 17:10:24.000000000 +0100
+***************
+*** 11,16 ****
+--- 11,33 ----
+
+ #include "vim.h"
+
++ /* define _generic_64 for use in time functions */
++ #ifndef VAX
++ # include <gen64def.h>
++ #else
++ /* based on Alpha's gen64def.h; the file is absent on VAX */
++ typedef struct _generic_64 {
++ # pragma __nomember_alignment
++ __union { /* You can treat me as... */
++ /* long long is not available on VAXen */
++ /* unsigned __int64 gen64$q_quadword; ...a single 64-bit value, or */
++
++ unsigned int gen64$l_longword [2]; /* ...two 32-bit values, or */
++ unsigned short int gen64$w_word [4]; /* ...four 16-bit values */
++ } gen64$r_quad_overlay;
++ } GENERIC_64;
++ #endif
++
+ typedef struct
+ {
+ char class;
+***************
+*** 669,671 ****
+--- 686,777 ----
+ }
+ return ;
+ }
++
++ struct typeahead_st {
++ unsigned short numchars;
++ unsigned char firstchar;
++ unsigned char reserved0;
++ unsigned long reserved1;
++ } typeahead;
++
++ /*
++ * Wait "msec" msec until a character is available from file descriptor "fd".
++ * "msec" == 0 will check for characters once.
++ * "msec" == -1 will block until a character is available.
++ */
++ int
++ RealWaitForChar(fd, msec, check_for_gpm)
++ int fd UNUSED; /* always read from iochan */
++ long msec;
++ int *check_for_gpm UNUSED;
++ {
++ int status;
++ struct _generic_64 time_curr;
++ struct _generic_64 time_diff;
++ struct _generic_64 time_out;
++ unsigned int convert_operation = LIB$K_DELTA_SECONDS_F;
++ float sec = (float) msec / 1000;
++
++ /* make sure the iochan is set */
++ if (!iochan)
++ get_tty();
++
++ if (msec > 0) {
++ /* time-out specified; convert it to absolute time */
++
++ /* get current time (number of 100ns ticks since the VMS Epoch) */
++ status = sys$gettim(&time_curr);
++ if (status != SS$_NORMAL)
++ return 0; /* error */
++
++ /* construct the delta time */
++ status = lib$cvtf_to_internal_time(
++ &convert_operation, &sec, &time_diff);
++ if (status != LIB$_NORMAL)
++ return 0; /* error */
++
++ /* add them up */
++ status = lib$add_times(
++ &time_curr,
++ &time_diff,
++ &time_out);
++ if (status != LIB$_NORMAL)
++ return 0; /* error */
++ }
++
++ while (TRUE) {
++ /* select() */
++ status = sys$qiow(0, iochan, IO$_SENSEMODE | IO$M_TYPEAHDCNT, iosb,
++ 0, 0, &typeahead, 8, 0, 0, 0, 0);
++ if (status != SS$_NORMAL || (iosb[0] & 0xFFFF) != SS$_NORMAL)
++ return 0; /* error */
++
++ if (typeahead.numchars)
++ return 1; /* ready to read */
++
++ /* there's nothing to read; what now? */
++ if (msec == 0) {
++ /* immediate time-out; return impatiently */
++ return 0;
++ }
++ else if (msec < 0) {
++ /* no time-out; wait on indefinitely */
++ continue;
++ }
++ else {
++ /* time-out needs to be checked */
++ status = sys$gettim(&time_curr);
++ if (status != SS$_NORMAL)
++ return 0; /* error */
++
++ status = lib$sub_times(
++ &time_out,
++ &time_curr,
++ &time_diff);
++ if (status != LIB$_NORMAL)
++ return 0; /* error, incl. time_diff < 0 (i.e. time-out) */
++
++ /* otherwise wait some more */
++ }
++ }
++ }
+*** ../vim-7.4.118/src/version.c 2013-12-11 15:51:54.000000000 +0100
+--- src/version.c 2013-12-11 16:09:16.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 119,
+ /**/
+
+--
+It is hard to understand how a cemetery raised its burial
+cost and blamed it on the cost of living.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.120 b/patches/source/vim/patches/7.4.120
new file mode 100644
index 000000000..4f7a17a18
--- /dev/null
+++ b/patches/source/vim/patches/7.4.120
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.120
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.120 (after 7.4.117)
+Problem: Can't build with Perl 5.18 on Linux. (Lcd 47)
+Solution: Add #ifdef. (Ken Takata)
+Files: src/if_perl.xs
+
+
+*** ../vim-7.4.119/src/if_perl.xs 2013-12-11 15:06:36.000000000 +0100
+--- src/if_perl.xs 2013-12-11 17:17:43.000000000 +0100
+***************
+*** 27,33 ****
+ /* Work around for perl-5.18.
+ * Don't include "perl\lib\CORE\inline.h" for now,
+ * include it after Perl_sv_free2 is defined. */
+! #define PERL_NO_INLINE_FUNCTIONS
+
+ /*
+ * Prevent including winsock.h. perl.h tries to detect whether winsock.h is
+--- 27,35 ----
+ /* Work around for perl-5.18.
+ * Don't include "perl\lib\CORE\inline.h" for now,
+ * include it after Perl_sv_free2 is defined. */
+! #ifdef DYNAMIC_PERL
+! # define PERL_NO_INLINE_FUNCTIONS
+! #endif
+
+ /*
+ * Prevent including winsock.h. perl.h tries to detect whether winsock.h is
+*** ../vim-7.4.119/src/version.c 2013-12-11 17:12:32.000000000 +0100
+--- src/version.c 2013-12-11 17:19:34.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 120,
+ /**/
+
+--
+Just remember...if the world didn't suck, we'd all fall off.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.121 b/patches/source/vim/patches/7.4.121
new file mode 100644
index 000000000..2e04890ec
--- /dev/null
+++ b/patches/source/vim/patches/7.4.121
@@ -0,0 +1,48 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.121
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.121
+Problem: Completion doesn't work for ":py3d" and ":py3f". (Bohr Shaw)
+Solution: Skip over letters after ":py3".
+Files: src/ex_docmd.c
+
+
+*** ../vim-7.4.120/src/ex_docmd.c 2013-11-21 14:21:25.000000000 +0100
+--- src/ex_docmd.c 2013-12-11 17:41:50.000000000 +0100
+***************
+*** 3261,3267 ****
+--- 3261,3271 ----
+ ++p;
+ /* for python 3.x: ":py3*" commands completion */
+ if (cmd[0] == 'p' && cmd[1] == 'y' && p == cmd + 2 && *p == '3')
++ {
+ ++p;
++ while (ASCII_ISALPHA(*p) || *p == '*')
++ ++p;
++ }
+ len = (int)(p - cmd);
+
+ if (len == 0)
+*** ../vim-7.4.120/src/version.c 2013-12-11 17:20:14.000000000 +0100
+--- src/version.c 2013-12-11 17:43:44.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 121,
+ /**/
+
+--
+It was recently discovered that research causes cancer in rats.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.122 b/patches/source/vim/patches/7.4.122
new file mode 100644
index 000000000..2e6e581c7
--- /dev/null
+++ b/patches/source/vim/patches/7.4.122
@@ -0,0 +1,215 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.122
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.122
+Problem: Win32: When 'encoding' is set to "utf-8" and the active codepage
+ is cp932 then ":grep" and other commands don't work for multi-byte
+ characters.
+Solution: (Yasuhiro Matsumoto)
+Files: src/os_win32.c
+
+
+*** ../vim-7.4.121/src/os_win32.c 2013-12-07 14:48:06.000000000 +0100
+--- src/os_win32.c 2013-12-11 17:57:48.000000000 +0100
+***************
+*** 3788,3793 ****
+--- 3788,3837 ----
+ }
+ #endif /* FEAT_GUI_W32 */
+
++ static BOOL
++ vim_create_process(
++ const char *cmd,
++ DWORD flags,
++ BOOL inherit_handles,
++ STARTUPINFO *si,
++ PROCESS_INFORMATION *pi)
++ {
++ # ifdef FEAT_MBYTE
++ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
++ {
++ WCHAR *wcmd = enc_to_utf16(cmd, NULL);
++
++ if (wcmd != NULL)
++ {
++ BOOL ret;
++ ret = CreateProcessW(
++ NULL, /* Executable name */
++ wcmd, /* Command to execute */
++ NULL, /* Process security attributes */
++ NULL, /* Thread security attributes */
++ inherit_handles, /* Inherit handles */
++ flags, /* Creation flags */
++ NULL, /* Environment */
++ NULL, /* Current directory */
++ si, /* Startup information */
++ pi); /* Process information */
++ vim_free(wcmd);
++ return ret;
++ }
++ }
++ #endif
++ return CreateProcess(
++ NULL, /* Executable name */
++ cmd, /* Command to execute */
++ NULL, /* Process security attributes */
++ NULL, /* Thread security attributes */
++ inherit_handles, /* Inherit handles */
++ flags, /* Creation flags */
++ NULL, /* Environment */
++ NULL, /* Current directory */
++ si, /* Startup information */
++ pi); /* Process information */
++ }
+
+
+ #if defined(FEAT_GUI_W32) || defined(PROTO)
+***************
+*** 3834,3851 ****
+ cmd += 3;
+
+ /* Now, run the command */
+! CreateProcess(NULL, /* Executable name */
+! cmd, /* Command to execute */
+! NULL, /* Process security attributes */
+! NULL, /* Thread security attributes */
+! FALSE, /* Inherit handles */
+! CREATE_DEFAULT_ERROR_MODE | /* Creation flags */
+! CREATE_NEW_CONSOLE,
+! NULL, /* Environment */
+! NULL, /* Current directory */
+! &si, /* Startup information */
+! &pi); /* Process information */
+!
+
+ /* Wait for the command to terminate before continuing */
+ if (g_PlatformId != VER_PLATFORM_WIN32s)
+--- 3878,3885 ----
+ cmd += 3;
+
+ /* Now, run the command */
+! vim_create_process(cmd, FALSE,
+! CREATE_DEFAULT_ERROR_MODE | CREATE_NEW_CONSOLE, &si, &pi);
+
+ /* Wait for the command to terminate before continuing */
+ if (g_PlatformId != VER_PLATFORM_WIN32s)
+***************
+*** 4177,4198 ****
+ p = cmd;
+ }
+
+! /* Now, run the command */
+! CreateProcess(NULL, /* Executable name */
+! p, /* Command to execute */
+! NULL, /* Process security attributes */
+! NULL, /* Thread security attributes */
+!
+! // this command can be litigious, handle inheritance was
+! // deactivated for pending temp file, but, if we deactivate
+! // it, the pipes don't work for some reason.
+! TRUE, /* Inherit handles, first deactivated,
+! * but needed */
+! CREATE_DEFAULT_ERROR_MODE, /* Creation flags */
+! NULL, /* Environment */
+! NULL, /* Current directory */
+! &si, /* Startup information */
+! &pi); /* Process information */
+
+ if (p != cmd)
+ vim_free(p);
+--- 4211,4221 ----
+ p = cmd;
+ }
+
+! /* Now, run the command.
+! * About "Inherit handles" being TRUE: this command can be litigious,
+! * handle inheritance was deactivated for pending temp file, but, if we
+! * deactivate it, the pipes don't work for some reason. */
+! vim_create_process(p, TRUE, CREATE_DEFAULT_ERROR_MODE, &si, &pi);
+
+ if (p != cmd)
+ vim_free(p);
+***************
+*** 4410,4416 ****
+ }
+ #else
+
+! # define mch_system(c, o) system(c)
+
+ #endif
+
+--- 4433,4457 ----
+ }
+ #else
+
+! # ifdef FEAT_MBYTE
+! static int
+! mch_system(char *cmd, int options)
+! {
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! WCHAR *wcmd = enc_to_utf16(cmd, NULL);
+! if (wcmd != NULL)
+! {
+! int ret = _wsystem(wcmd);
+! vim_free(wcmd);
+! return ret;
+! }
+! }
+! return system(cmd);
+! }
+! # else
+! # define mch_system(c, o) system(c)
+! # endif
+
+ #endif
+
+***************
+*** 4578,4593 ****
+ * inherit our handles which causes unpleasant dangling swap
+ * files if we exit before the spawned process
+ */
+! if (CreateProcess(NULL, // Executable name
+! newcmd, // Command to execute
+! NULL, // Process security attributes
+! NULL, // Thread security attributes
+! FALSE, // Inherit handles
+! flags, // Creation flags
+! NULL, // Environment
+! NULL, // Current directory
+! &si, // Startup information
+! &pi)) // Process information
+ x = 0;
+ else
+ {
+--- 4619,4625 ----
+ * inherit our handles which causes unpleasant dangling swap
+ * files if we exit before the spawned process
+ */
+! if (vim_create_process(newcmd, FALSE, flags, &si, &pi))
+ x = 0;
+ else
+ {
+*** ../vim-7.4.121/src/version.c 2013-12-11 17:44:33.000000000 +0100
+--- src/version.c 2013-12-11 17:48:09.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 122,
+ /**/
+
+--
+Never overestimate a man's ability to underestimate a woman.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.123 b/patches/source/vim/patches/7.4.123
new file mode 100644
index 000000000..b564fe405
--- /dev/null
+++ b/patches/source/vim/patches/7.4.123
@@ -0,0 +1,64 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.123
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.123
+Problem: Win32: Getting user name does not use wide function.
+Solution: Use GetUserNameW() if possible. (Ken Takata)
+Files: src/os_win32.c
+
+
+*** ../vim-7.4.122/src/os_win32.c 2013-12-11 17:58:29.000000000 +0100
+--- src/os_win32.c 2013-12-11 18:14:29.000000000 +0100
+***************
+*** 2768,2773 ****
+--- 2768,2793 ----
+ char szUserName[256 + 1]; /* UNLEN is 256 */
+ DWORD cch = sizeof szUserName;
+
++ #ifdef FEAT_MBYTE
++ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
++ {
++ WCHAR wszUserName[256 + 1]; /* UNLEN is 256 */
++ DWORD wcch = sizeof(wszUserName) / sizeof(WCHAR);
++
++ if (GetUserNameW(wszUserName, &wcch))
++ {
++ char_u *p = utf16_to_enc(wszUserName, NULL);
++
++ if (p != NULL)
++ {
++ vim_strncpy(s, p, len - 1);
++ vim_free(p);
++ return OK;
++ }
++ }
++ /* Retry with non-wide function (for Windows 98). */
++ }
++ #endif
+ if (GetUserName(szUserName, &cch))
+ {
+ vim_strncpy(s, szUserName, len - 1);
+*** ../vim-7.4.122/src/version.c 2013-12-11 17:58:29.000000000 +0100
+--- src/version.c 2013-12-11 18:15:48.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 123,
+ /**/
+
+--
+Everybody lies, but it doesn't matter since nobody listens.
+ -- Lieberman's Law
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.124 b/patches/source/vim/patches/7.4.124
new file mode 100644
index 000000000..7815bf5e9
--- /dev/null
+++ b/patches/source/vim/patches/7.4.124
@@ -0,0 +1,63 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.124
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.124
+Problem: Win32: Getting host name does not use wide function.
+Solution: Use GetComputerNameW() if possible. (Ken Takata)
+Files: src/os_win32.c
+
+
+*** ../vim-7.4.123/src/os_win32.c 2013-12-11 18:18:01.000000000 +0100
+--- src/os_win32.c 2013-12-11 18:19:11.000000000 +0100
+***************
+*** 2808,2813 ****
+--- 2808,2833 ----
+ {
+ DWORD cch = len;
+
++ #ifdef FEAT_MBYTE
++ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
++ {
++ WCHAR wszHostName[256 + 1];
++ DWORD wcch = sizeof(wszHostName) / sizeof(WCHAR);
++
++ if (GetComputerNameW(wszHostName, &wcch))
++ {
++ char_u *p = utf16_to_enc(wszHostName, NULL);
++
++ if (p != NULL)
++ {
++ vim_strncpy(s, p, len - 1);
++ vim_free(p);
++ return;
++ }
++ }
++ /* Retry with non-wide function (for Windows 98). */
++ }
++ #endif
+ if (!GetComputerName(s, &cch))
+ vim_strncpy(s, "PC (Win32 Vim)", len - 1);
+ }
+*** ../vim-7.4.123/src/version.c 2013-12-11 18:18:01.000000000 +0100
+--- src/version.c 2013-12-11 18:20:03.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 124,
+ /**/
+
+--
+Don't read everything you believe.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.125 b/patches/source/vim/patches/7.4.125
new file mode 100644
index 000000000..04a0fe9aa
--- /dev/null
+++ b/patches/source/vim/patches/7.4.125
@@ -0,0 +1,57 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.125
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.125
+Problem: Win32: Dealing with messages may not work for multi-byte chars.
+Solution: Use pDispatchMessage(). (Ken Takata)
+Files: src/os_win32.c
+
+
+*** ../vim-7.4.124/src/os_win32.c 2013-12-11 18:21:41.000000000 +0100
+--- src/os_win32.c 2013-12-11 18:23:47.000000000 +0100
+***************
+*** 4282,4291 ****
+ {
+ MSG msg;
+
+! if (PeekMessage(&msg, (HWND)NULL, 0, 0, PM_REMOVE))
+ {
+ TranslateMessage(&msg);
+! DispatchMessage(&msg);
+ }
+
+ /* write pipe information in the window */
+--- 4282,4291 ----
+ {
+ MSG msg;
+
+! if (pPeekMessage(&msg, (HWND)NULL, 0, 0, PM_REMOVE))
+ {
+ TranslateMessage(&msg);
+! pDispatchMessage(&msg);
+ }
+
+ /* write pipe information in the window */
+*** ../vim-7.4.124/src/version.c 2013-12-11 18:21:41.000000000 +0100
+--- src/version.c 2013-12-11 18:35:44.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 125,
+ /**/
+
+--
+Don't believe everything you hear or anything you say.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.126 b/patches/source/vim/patches/7.4.126
new file mode 100644
index 000000000..c7acae7d8
--- /dev/null
+++ b/patches/source/vim/patches/7.4.126
@@ -0,0 +1,68 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.126
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.126
+Problem: Compiler warnings for "const" and incompatible types.
+Solution: Remove "const", add type cast. (Ken Takata)
+Files: src/os_win32.c
+
+
+*** ../vim-7.4.125/src/os_win32.c 2013-12-11 18:36:28.000000000 +0100
+--- src/os_win32.c 2013-12-12 20:19:39.000000000 +0100
+***************
+*** 3830,3836 ****
+
+ static BOOL
+ vim_create_process(
+! const char *cmd,
+ DWORD flags,
+ BOOL inherit_handles,
+ STARTUPINFO *si,
+--- 3830,3836 ----
+
+ static BOOL
+ vim_create_process(
+! char *cmd,
+ DWORD flags,
+ BOOL inherit_handles,
+ STARTUPINFO *si,
+***************
+*** 3853,3859 ****
+ flags, /* Creation flags */
+ NULL, /* Environment */
+ NULL, /* Current directory */
+! si, /* Startup information */
+ pi); /* Process information */
+ vim_free(wcmd);
+ return ret;
+--- 3853,3859 ----
+ flags, /* Creation flags */
+ NULL, /* Environment */
+ NULL, /* Current directory */
+! (LPSTARTUPINFOW)si, /* Startup information */
+ pi); /* Process information */
+ vim_free(wcmd);
+ return ret;
+*** ../vim-7.4.125/src/version.c 2013-12-11 18:36:28.000000000 +0100
+--- src/version.c 2013-12-12 20:21:27.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 126,
+ /**/
+
+--
+Microsoft is to software what McDonalds is to gourmet cooking
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.127 b/patches/source/vim/patches/7.4.127
new file mode 100644
index 000000000..71ce694b4
--- /dev/null
+++ b/patches/source/vim/patches/7.4.127
@@ -0,0 +1,67 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.127
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.127
+Problem: Perl 5.18 on Unix doesn't work.
+Solution: Move workaround to after including vim.h. (Ken Takata)
+Files: src/if_perl.xs
+
+
+*** ../vim-7.4.126/src/if_perl.xs 2013-12-11 17:20:14.000000000 +0100
+--- src/if_perl.xs 2013-12-14 11:41:56.000000000 +0100
+***************
+*** 24,36 ****
+ # define _USE_32BIT_TIME_T
+ #endif
+
+- /* Work around for perl-5.18.
+- * Don't include "perl\lib\CORE\inline.h" for now,
+- * include it after Perl_sv_free2 is defined. */
+- #ifdef DYNAMIC_PERL
+- # define PERL_NO_INLINE_FUNCTIONS
+- #endif
+-
+ /*
+ * Prevent including winsock.h. perl.h tries to detect whether winsock.h is
+ * already included before including winsock2.h, because winsock2.h isn't
+--- 24,29 ----
+***************
+*** 44,49 ****
+--- 37,49 ----
+
+ #include "vim.h"
+
++ /* Work around for perl-5.18.
++ * Don't include "perl\lib\CORE\inline.h" for now,
++ * include it after Perl_sv_free2 is defined. */
++ #ifdef DYNAMIC_PERL
++ # define PERL_NO_INLINE_FUNCTIONS
++ #endif
++
+ #include <EXTERN.h>
+ #include <perl.h>
+ #include <XSUB.h>
+*** ../vim-7.4.126/src/version.c 2013-12-12 20:25:39.000000000 +0100
+--- src/version.c 2013-12-14 11:43:54.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 127,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+54. You start tilting your head sideways to smile. :-)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.128 b/patches/source/vim/patches/7.4.128
new file mode 100644
index 000000000..ead1b6766
--- /dev/null
+++ b/patches/source/vim/patches/7.4.128
@@ -0,0 +1,66 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.128
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.128
+Problem: Perl 5.18 for MSVC doesn't work.
+Solution: Add check in makefile and define __inline. (Ken Takata)
+Files: src/Make_mvc.mak, src/if_perl.xs
+
+
+*** ../vim-7.4.127/src/Make_mvc.mak 2013-11-09 02:32:15.000000000 +0100
+--- src/Make_mvc.mak 2013-12-14 11:47:37.000000000 +0100
+***************
+*** 825,831 ****
+--- 825,836 ----
+ PERL_LIB = $(PERL_INCDIR)\perl.lib
+ !else
+ PERL_DLL = perl$(PERL_VER).dll
++ !if exist($(PERL_INCDIR)\perl$(PERL_VER).lib)
+ PERL_LIB = $(PERL_INCDIR)\perl$(PERL_VER).lib
++ !else
++ # For ActivePerl 5.18 and later
++ PERL_LIB = $(PERL_INCDIR)\libperl$(PERL_VER).a
++ !endif
+ !endif
+
+ CFLAGS = $(CFLAGS) -DFEAT_PERL
+*** ../vim-7.4.127/src/if_perl.xs 2013-12-14 11:46:04.000000000 +0100
+--- src/if_perl.xs 2013-12-14 11:47:37.000000000 +0100
+***************
+*** 44,49 ****
+--- 44,54 ----
+ # define PERL_NO_INLINE_FUNCTIONS
+ #endif
+
++ /* Work around for using MSVC and ActivePerl 5.18. */
++ #ifdef _MSC_VER
++ # define __inline__ __inline
++ #endif
++
+ #include <EXTERN.h>
+ #include <perl.h>
+ #include <XSUB.h>
+*** ../vim-7.4.127/src/version.c 2013-12-14 11:46:04.000000000 +0100
+--- src/version.c 2013-12-14 11:48:51.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 128,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+55. You ask your doctor to implant a gig in your brain.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.129 b/patches/source/vim/patches/7.4.129
new file mode 100644
index 000000000..efe9a1c5d
--- /dev/null
+++ b/patches/source/vim/patches/7.4.129
@@ -0,0 +1,56 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.129
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.129
+Problem: getline(-1) returns zero. (mvxxc)
+Solution: Return an empty string.
+Files: src/eval.c
+
+
+*** ../vim-7.4.128/src/eval.c 2013-11-11 04:25:48.000000000 +0100
+--- src/eval.c 2013-12-14 12:11:27.000000000 +0100
+***************
+*** 11119,11124 ****
+--- 11119,11126 ----
+ {
+ char_u *p;
+
++ rettv->v_type = VAR_STRING;
++ rettv->vval.v_string = NULL;
+ if (retlist && rettv_list_alloc(rettv) == FAIL)
+ return;
+
+***************
+*** 11131,11138 ****
+ p = ml_get_buf(buf, start, FALSE);
+ else
+ p = (char_u *)"";
+-
+- rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = vim_strsave(p);
+ }
+ else
+--- 11133,11138 ----
+*** ../vim-7.4.128/src/version.c 2013-12-14 11:50:28.000000000 +0100
+--- src/version.c 2013-12-14 12:13:32.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 129,
+ /**/
+
+--
+Keyboard not found. Think ENTER to continue.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.130 b/patches/source/vim/patches/7.4.130
new file mode 100644
index 000000000..864d82c9d
--- /dev/null
+++ b/patches/source/vim/patches/7.4.130
@@ -0,0 +1,69 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.130
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.130
+Problem: Relative line numbers mix up windows when using folds.
+Solution: Use hasFoldingWin() instead of hasFolding(). (Lech Lorens)
+Files: src/misc2.c
+
+
+*** ../vim-7.4.129/src/misc2.c 2013-09-08 16:07:03.000000000 +0200
+--- src/misc2.c 2013-12-14 12:43:35.000000000 +0100
+***************
+*** 487,493 ****
+ {
+ while (lnum > cursor)
+ {
+! (void)hasFolding(lnum, &lnum, NULL);
+ /* if lnum and cursor are in the same fold,
+ * now lnum <= cursor */
+ if (lnum > cursor)
+--- 487,493 ----
+ {
+ while (lnum > cursor)
+ {
+! (void)hasFoldingWin(wp, lnum, &lnum, NULL, TRUE, NULL);
+ /* if lnum and cursor are in the same fold,
+ * now lnum <= cursor */
+ if (lnum > cursor)
+***************
+*** 499,505 ****
+ {
+ while (lnum < cursor)
+ {
+! (void)hasFolding(lnum, NULL, &lnum);
+ /* if lnum and cursor are in the same fold,
+ * now lnum >= cursor */
+ if (lnum < cursor)
+--- 499,505 ----
+ {
+ while (lnum < cursor)
+ {
+! (void)hasFoldingWin(wp, lnum, NULL, &lnum, TRUE, NULL);
+ /* if lnum and cursor are in the same fold,
+ * now lnum >= cursor */
+ if (lnum < cursor)
+*** ../vim-7.4.129/src/version.c 2013-12-14 12:17:34.000000000 +0100
+--- src/version.c 2013-12-14 12:44:27.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 130,
+ /**/
+
+--
+Over the years, I've developed my sense of deja vu so acutely that now
+I can remember things that *have* happened before ...
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.131 b/patches/source/vim/patches/7.4.131
new file mode 100644
index 000000000..ec04b85fd
--- /dev/null
+++ b/patches/source/vim/patches/7.4.131
@@ -0,0 +1,113 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.131
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.131
+Problem: Syncbind causes E315 errors in some situations. (Liang Li)
+Solution: Set and restore curbuf in ex_syncbind(). (Christian Brabandt)
+Files: src/ex_docmd.c, src/testdir/test37.ok
+
+
+*** ../vim-7.4.130/src/ex_docmd.c 2013-12-11 17:44:33.000000000 +0100
+--- src/ex_docmd.c 2013-12-14 12:55:05.000000000 +0100
+***************
+*** 8054,8059 ****
+--- 8054,8061 ----
+ {
+ #ifdef FEAT_SCROLLBIND
+ win_T *wp;
++ win_T *save_curwin = curwin;
++ buf_T *save_curbuf = curbuf;
+ long topline;
+ long y;
+ linenr_T old_linenr = curwin->w_cursor.lnum;
+***************
+*** 8085,8097 ****
+
+
+ /*
+! * set all scrollbind windows to the same topline
+ */
+- wp = curwin;
+ for (curwin = firstwin; curwin; curwin = curwin->w_next)
+ {
+ if (curwin->w_p_scb)
+ {
+ y = topline - curwin->w_topline;
+ if (y > 0)
+ scrollup(y, TRUE);
+--- 8087,8099 ----
+
+
+ /*
+! * Set all scrollbind windows to the same topline.
+ */
+ for (curwin = firstwin; curwin; curwin = curwin->w_next)
+ {
+ if (curwin->w_p_scb)
+ {
++ curbuf = curwin->w_buffer;
+ y = topline - curwin->w_topline;
+ if (y > 0)
+ scrollup(y, TRUE);
+***************
+*** 8105,8111 ****
+ #endif
+ }
+ }
+! curwin = wp;
+ if (curwin->w_p_scb)
+ {
+ did_syncbind = TRUE;
+--- 8107,8114 ----
+ #endif
+ }
+ }
+! curwin = save_curwin;
+! curbuf = save_curbuf;
+ if (curwin->w_p_scb)
+ {
+ did_syncbind = TRUE;
+*** ../vim-7.4.130/src/testdir/test37.ok 2010-05-15 13:04:10.000000000 +0200
+--- src/testdir/test37.ok 2013-12-14 12:54:57.000000000 +0100
+***************
+*** 27,33 ****
+
+ . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16
+ :set scrollbind
+- zt:
+- . line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15
+ :set scrollbind
+! . line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11
+--- 27,33 ----
+
+ . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16
+ :set scrollbind
+ :set scrollbind
+! . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16
+! j:
+! . line 12 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 12
+*** ../vim-7.4.130/src/version.c 2013-12-14 12:48:55.000000000 +0100
+--- src/version.c 2013-12-14 13:03:51.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 131,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+57. You begin to wonder how on earth your service provider is allowed to call
+ 200 hours per month "unlimited."
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.132 b/patches/source/vim/patches/7.4.132
new file mode 100644
index 000000000..73d7281c4
--- /dev/null
+++ b/patches/source/vim/patches/7.4.132
@@ -0,0 +1,54 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.132
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.132 (after 7.4.122)
+Problem: Win32: flags and inherit_handles arguments mixed up.
+Solution: Swap the argument. (cs86661)
+Files: src/os_win32.c
+
+
+*** ../vim-7.4.131/src/os_win32.c 2013-12-12 20:25:39.000000000 +0100
+--- src/os_win32.c 2014-01-05 13:24:15.000000000 +0100
+***************
+*** 3831,3838 ****
+ static BOOL
+ vim_create_process(
+ char *cmd,
+- DWORD flags,
+ BOOL inherit_handles,
+ STARTUPINFO *si,
+ PROCESS_INFORMATION *pi)
+ {
+--- 3831,3838 ----
+ static BOOL
+ vim_create_process(
+ char *cmd,
+ BOOL inherit_handles,
++ DWORD flags,
+ STARTUPINFO *si,
+ PROCESS_INFORMATION *pi)
+ {
+*** ../vim-7.4.131/src/version.c 2013-12-14 13:06:13.000000000 +0100
+--- src/version.c 2014-01-05 13:27:25.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 132,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+93. New mail alarm on your palmtop annoys other churchgoers.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.133 b/patches/source/vim/patches/7.4.133
new file mode 100644
index 000000000..7c4bdfad9
--- /dev/null
+++ b/patches/source/vim/patches/7.4.133
@@ -0,0 +1,74 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.133
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.133
+Problem: Clang warns for using NUL.
+Solution: Change NUL to NULL. (Dominique Pelle)
+Files: src/eval.c, src/misc2.c
+
+
+*** ../vim-7.4.132/src/eval.c 2013-12-14 12:17:34.000000000 +0100
+--- src/eval.c 2014-01-06 06:11:50.000000000 +0100
+***************
+*** 14141,14148 ****
+ }
+ else
+ {
+! list_append_string(rettv->vval.v_list, NUL, -1);
+! list_append_string(rettv->vval.v_list, NUL, -1);
+ }
+ }
+ #endif
+--- 14141,14148 ----
+ }
+ else
+ {
+! list_append_string(rettv->vval.v_list, NULL, -1);
+! list_append_string(rettv->vval.v_list, NULL, -1);
+ }
+ }
+ #endif
+*** ../vim-7.4.132/src/misc2.c 2013-12-14 12:48:55.000000000 +0100
+--- src/misc2.c 2014-01-06 06:11:50.000000000 +0100
+***************
+*** 4695,4702 ****
+ else
+ {
+ char_u *p = gettail(search_ctx->ffsc_fix_path);
+! char_u *wc_path = NUL;
+! char_u *temp = NUL;
+ int len = 0;
+
+ if (p > search_ctx->ffsc_fix_path)
+--- 4695,4702 ----
+ else
+ {
+ char_u *p = gettail(search_ctx->ffsc_fix_path);
+! char_u *wc_path = NULL;
+! char_u *temp = NULL;
+ int len = 0;
+
+ if (p > search_ctx->ffsc_fix_path)
+*** ../vim-7.4.132/src/version.c 2014-01-06 06:16:55.000000000 +0100
+--- src/version.c 2014-01-06 06:13:26.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 133,
+ /**/
+
+--
+A meeting is an event at which the minutes are kept and the hours are lost.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.134 b/patches/source/vim/patches/7.4.134
new file mode 100644
index 000000000..d8f47c570
--- /dev/null
+++ b/patches/source/vim/patches/7.4.134
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.134
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.134
+Problem: Spurious space in MingW Makefile.
+Solution: Remove the space. (Michael Soyka)
+Files: src/Make_ming.mak
+
+
+*** ../vim-7.4.133/src/Make_ming.mak 2013-12-11 15:06:36.000000000 +0100
+--- src/Make_ming.mak 2014-01-06 15:37:57.000000000 +0100
+***************
+*** 598,604 ****
+ ifeq (yes, $(GUI))
+ OBJ += $(OUTDIR)/xpm_w32.o
+ # You'll need libXpm.a from http://gnuwin32.sf.net
+! LIB += -L $(XPM)/lib -lXpm
+ endif
+ endif
+
+--- 598,604 ----
+ ifeq (yes, $(GUI))
+ OBJ += $(OUTDIR)/xpm_w32.o
+ # You'll need libXpm.a from http://gnuwin32.sf.net
+! LIB += -L$(XPM)/lib -lXpm
+ endif
+ endif
+
+*** ../vim-7.4.133/src/version.c 2014-01-06 06:18:44.000000000 +0100
+--- src/version.c 2014-01-06 15:39:32.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 134,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+115. You are late picking up your kid from school and try to explain
+ to the teacher you were stuck in Web traffic.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.135 b/patches/source/vim/patches/7.4.135
new file mode 100644
index 000000000..4f11071b5
--- /dev/null
+++ b/patches/source/vim/patches/7.4.135
@@ -0,0 +1,51 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.135
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.135
+Problem: Missing dot in MingW test Makefile.
+Solution: Add the dot. (Michael Soyka)
+Files: src/testdir/Make_ming.mak
+
+
+*** ../vim-7.4.134/src/testdir/Make_ming.mak 2013-11-21 14:21:25.000000000 +0100
+--- src/testdir/Make_ming.mak 2014-01-06 15:41:27.000000000 +0100
+***************
+*** 53,59 ****
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100out test101.out test102.out test103.out
+
+ SCRIPTS32 = test50.out test70.out
+
+--- 53,59 ----
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100.out test101.out test102.out test103.out
+
+ SCRIPTS32 = test50.out test70.out
+
+*** ../vim-7.4.134/src/version.c 2014-01-06 15:44:59.000000000 +0100
+--- src/version.c 2014-01-06 15:47:14.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 135,
+ /**/
+
+--
+Two percent of zero is almost nothing.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.136 b/patches/source/vim/patches/7.4.136
new file mode 100644
index 000000000..20976809a
--- /dev/null
+++ b/patches/source/vim/patches/7.4.136
@@ -0,0 +1,75 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.136
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.136 (after 7.4.096)
+Problem: MS-Windows: When saving a file with a UNC path the file becomes
+ read-only.
+Solution: Don't mix up Win32 attributes and Unix attributes. (Ken Takata)
+Files: src/os_mswin.c, src/os_win32.c
+
+
+*** ../vim-7.4.135/src/os_mswin.c 2013-09-29 19:05:17.000000000 +0200
+--- src/os_mswin.c 2014-01-10 13:03:19.000000000 +0100
+***************
+*** 617,624 ****
+--- 617,638 ----
+ p = buf + strlen(buf);
+ if (p > buf)
+ mb_ptr_back(buf, p);
++
++ /* Remove trailing '\\' except root path. */
+ if (p > buf && (*p == '\\' || *p == '/') && p[-1] != ':')
+ *p = NUL;
++
++ if ((buf[0] == '\\' && buf[1] == '\\') || (buf[0] == '/' && buf[1] == '/'))
++ {
++ /* UNC root path must be followed by '\\'. */
++ p = vim_strpbrk(buf + 2, "\\/");
++ if (p != NULL)
++ {
++ p = vim_strpbrk(p + 1, "\\/");
++ if (p == NULL)
++ STRCAT(buf, "\\");
++ }
++ }
+ #ifdef FEAT_MBYTE
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage
+ # ifdef __BORLANDC__
+*** ../vim-7.4.135/src/os_win32.c 2014-01-05 13:29:16.000000000 +0100
+--- src/os_win32.c 2014-01-10 12:59:32.000000000 +0100
+***************
+*** 2890,2898 ****
+ struct stat st;
+ int n;
+
+- if (name[0] == '\\' && name[1] == '\\')
+- /* UNC path */
+- return (long)win32_getattrs(name);
+ n = mch_stat(name, &st);
+ return n == 0 ? (long)st.st_mode : -1L;
+ }
+--- 2890,2895 ----
+*** ../vim-7.4.135/src/version.c 2014-01-06 15:51:46.000000000 +0100
+--- src/version.c 2014-01-10 13:04:43.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 136,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+128. You can access the Net -- via your portable and cellular phone.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.137 b/patches/source/vim/patches/7.4.137
new file mode 100644
index 000000000..4e685c139
--- /dev/null
+++ b/patches/source/vim/patches/7.4.137
@@ -0,0 +1,239 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.137
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.137
+Problem: Cannot use IME with Windows 8 console.
+Solution: Change the user of ReadConsoleInput() and PeekConsoleInput().
+ (Nobuhiro Takasaki)
+Files: src/os_win32.c
+
+
+*** ../vim-7.4.136/src/os_win32.c 2014-01-10 13:05:12.000000000 +0100
+--- src/os_win32.c 2014-01-10 13:42:19.000000000 +0100
+***************
+*** 232,237 ****
+--- 232,306 ----
+
+ static char_u *exe_path = NULL;
+
++ /*
++ * Version of ReadConsoleInput() that works with IME.
++ */
++ static BOOL
++ read_console_input(
++ HANDLE hConsoleInput,
++ PINPUT_RECORD lpBuffer,
++ DWORD nLength,
++ LPDWORD lpNumberOfEventsRead)
++ {
++ enum
++ {
++ IRSIZE = 10, /* rough value */
++ };
++ static INPUT_RECORD irCache[IRSIZE];
++ static DWORD s_dwIndex = 0;
++ static DWORD s_dwMax = 0;
++
++ if (hConsoleInput == NULL || lpBuffer == NULL)
++ return ReadConsoleInput(hConsoleInput, lpBuffer, nLength,
++ lpNumberOfEventsRead);
++
++ if (nLength == -1)
++ {
++ if (s_dwMax == 0)
++ {
++ PeekConsoleInput(hConsoleInput, lpBuffer, 1, lpNumberOfEventsRead);
++ if (*lpNumberOfEventsRead == 0)
++ return FALSE;
++ ReadConsoleInput(hConsoleInput, irCache, IRSIZE, &s_dwMax);
++ s_dwIndex = 0;
++ }
++ ((PINPUT_RECORD)lpBuffer)[0] = irCache[s_dwIndex];
++ *lpNumberOfEventsRead = 1;
++ return TRUE;
++ }
++
++ if (s_dwMax == 0)
++ {
++ ReadConsoleInput(hConsoleInput, irCache, IRSIZE, &s_dwMax);
++ s_dwIndex = 0;
++ if (s_dwMax == 0)
++ {
++ *lpNumberOfEventsRead = 0;
++ return FALSE;
++ }
++ }
++
++ ((PINPUT_RECORD)lpBuffer)[0] = irCache[s_dwIndex];
++ if (++s_dwIndex == s_dwMax)
++ s_dwMax = 0;
++ *lpNumberOfEventsRead = 1;
++ return TRUE;
++ }
++
++ /*
++ * Version of PeekConsoleInput() that works with IME.
++ */
++ static BOOL
++ peek_console_input(
++ HANDLE hConsoleInput,
++ PINPUT_RECORD lpBuffer,
++ DWORD nLength,
++ LPDWORD lpNumberOfEventsRead)
++ {
++ return read_console_input(hConsoleInput, lpBuffer, -1,
++ lpNumberOfEventsRead);
++ }
++
+ static void
+ get_exe_name(void)
+ {
+***************
+*** 1117,1123 ****
+ INPUT_RECORD ir;
+ MOUSE_EVENT_RECORD* pmer2 = &ir.Event.MouseEvent;
+
+! PeekConsoleInput(g_hConIn, &ir, 1, &cRecords);
+
+ if (cRecords == 0 || ir.EventType != MOUSE_EVENT
+ || !(pmer2->dwButtonState & LEFT_RIGHT))
+--- 1186,1192 ----
+ INPUT_RECORD ir;
+ MOUSE_EVENT_RECORD* pmer2 = &ir.Event.MouseEvent;
+
+! peek_console_input(g_hConIn, &ir, 1, &cRecords);
+
+ if (cRecords == 0 || ir.EventType != MOUSE_EVENT
+ || !(pmer2->dwButtonState & LEFT_RIGHT))
+***************
+*** 1126,1132 ****
+ {
+ if (pmer2->dwEventFlags != MOUSE_MOVED)
+ {
+! ReadConsoleInput(g_hConIn, &ir, 1, &cRecords);
+
+ return decode_mouse_event(pmer2);
+ }
+--- 1195,1201 ----
+ {
+ if (pmer2->dwEventFlags != MOUSE_MOVED)
+ {
+! read_console_input(g_hConIn, &ir, 1, &cRecords);
+
+ return decode_mouse_event(pmer2);
+ }
+***************
+*** 1134,1143 ****
+ s_yOldMouse == pmer2->dwMousePosition.Y)
+ {
+ /* throw away spurious mouse move */
+! ReadConsoleInput(g_hConIn, &ir, 1, &cRecords);
+
+ /* are there any more mouse events in queue? */
+! PeekConsoleInput(g_hConIn, &ir, 1, &cRecords);
+
+ if (cRecords==0 || ir.EventType != MOUSE_EVENT)
+ break;
+--- 1203,1212 ----
+ s_yOldMouse == pmer2->dwMousePosition.Y)
+ {
+ /* throw away spurious mouse move */
+! read_console_input(g_hConIn, &ir, 1, &cRecords);
+
+ /* are there any more mouse events in queue? */
+! peek_console_input(g_hConIn, &ir, 1, &cRecords);
+
+ if (cRecords==0 || ir.EventType != MOUSE_EVENT)
+ break;
+***************
+*** 1374,1380 ****
+ }
+
+ cRecords = 0;
+! PeekConsoleInput(g_hConIn, &ir, 1, &cRecords);
+
+ #ifdef FEAT_MBYTE_IME
+ if (State & CMDLINE && msg_row == Rows - 1)
+--- 1443,1449 ----
+ }
+
+ cRecords = 0;
+! peek_console_input(g_hConIn, &ir, 1, &cRecords);
+
+ #ifdef FEAT_MBYTE_IME
+ if (State & CMDLINE && msg_row == Rows - 1)
+***************
+*** 1405,1411 ****
+ if (ir.Event.KeyEvent.uChar.UnicodeChar == 0
+ && ir.Event.KeyEvent.wVirtualKeyCode == 13)
+ {
+! ReadConsoleInput(g_hConIn, &ir, 1, &cRecords);
+ continue;
+ }
+ #endif
+--- 1474,1480 ----
+ if (ir.Event.KeyEvent.uChar.UnicodeChar == 0
+ && ir.Event.KeyEvent.wVirtualKeyCode == 13)
+ {
+! read_console_input(g_hConIn, &ir, 1, &cRecords);
+ continue;
+ }
+ #endif
+***************
+*** 1414,1420 ****
+ return TRUE;
+ }
+
+! ReadConsoleInput(g_hConIn, &ir, 1, &cRecords);
+
+ if (ir.EventType == FOCUS_EVENT)
+ handle_focus_event(ir);
+--- 1483,1489 ----
+ return TRUE;
+ }
+
+! read_console_input(g_hConIn, &ir, 1, &cRecords);
+
+ if (ir.EventType == FOCUS_EVENT)
+ handle_focus_event(ir);
+***************
+*** 1484,1490 ****
+ return 0;
+ # endif
+ #endif
+! if (ReadConsoleInput(g_hConIn, &ir, 1, &cRecords) == 0)
+ {
+ if (did_create_conin)
+ read_error_exit();
+--- 1553,1559 ----
+ return 0;
+ # endif
+ #endif
+! if (read_console_input(g_hConIn, &ir, 1, &cRecords) == 0)
+ {
+ if (did_create_conin)
+ read_error_exit();
+*** ../vim-7.4.136/src/version.c 2014-01-10 13:05:12.000000000 +0100
+--- src/version.c 2014-01-10 13:42:34.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 137,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+131. You challenge authority and society by portnuking people
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.138 b/patches/source/vim/patches/7.4.138
new file mode 100644
index 000000000..413383c50
--- /dev/null
+++ b/patches/source/vim/patches/7.4.138
@@ -0,0 +1,55 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.138
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.138 (after 7.4.114)
+Problem: Directory change messages are not recognized.
+Solution: Fix using a character range literally. (Lech Lorens)
+Files: src/option.h
+
+
+*** ../vim-7.4.137/src/option.h 2013-12-11 12:22:54.000000000 +0100
+--- src/option.h 2014-01-10 15:17:09.000000000 +0100
+***************
+*** 31,39 ****
+ # define DFLT_EFM "%A%p^,%C%%CC-%t-%m,%Cat line number %l in file %f,%f|%l| %m"
+ # else /* Unix, probably */
+ # ifdef EBCDIC
+! #define DFLT_EFM "%*[^ ] %*[^ ] %f:%l%*[ ]%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory [`']%f',%X%*\\a[%*\\d]: Leaving directory [`']%f',%DMaking %*\\a in %f,%f|%l| %m"
+ # else
+! #define DFLT_EFM "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from %f:%l:%c\\,,%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-G%*[ ]from %f:%l:%c,%-G%*[ ]from %f:%l:,%-G%*[ ]from %f:%l\\,,%-G%*[ ]from %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory [`']%f',%X%*\\a[%*\\d]: Leaving directory [`']%f',%D%*\\a: Entering directory [`']%f',%X%*\\a: Leaving directory [`']%f',%DMaking %*\\a in %f,%f|%l| %m"
+ # endif
+ # endif
+ # endif
+--- 31,39 ----
+ # define DFLT_EFM "%A%p^,%C%%CC-%t-%m,%Cat line number %l in file %f,%f|%l| %m"
+ # else /* Unix, probably */
+ # ifdef EBCDIC
+! #define DFLT_EFM "%*[^ ] %*[^ ] %f:%l%*[ ]%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory %*[`']%f',%X%*\\a[%*\\d]: Leaving directory %*[`']%f',%DMaking %*\\a in %f,%f|%l| %m"
+ # else
+! #define DFLT_EFM "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from %f:%l:%c\\,,%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-G%*[ ]from %f:%l:%c,%-G%*[ ]from %f:%l:,%-G%*[ ]from %f:%l\\,,%-G%*[ ]from %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory %*[`']%f',%X%*\\a[%*\\d]: Leaving directory %*[`']%f',%D%*\\a: Entering directory %*[`']%f',%X%*\\a: Leaving directory %*[`']%f',%DMaking %*\\a in %f,%f|%l| %m"
+ # endif
+ # endif
+ # endif
+*** ../vim-7.4.137/src/version.c 2014-01-10 13:51:35.000000000 +0100
+--- src/version.c 2014-01-10 15:17:04.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 138,
+ /**/
+
+--
+In a world without fences, who needs Gates and Windows?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.139 b/patches/source/vim/patches/7.4.139
new file mode 100644
index 000000000..dc870dc0a
--- /dev/null
+++ b/patches/source/vim/patches/7.4.139
@@ -0,0 +1,76 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.139
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.139
+Problem: Crash when using :cd in autocommand. (François Ingelrest)
+Solution: Set w_localdir to NULL after freeing it. (Dominique Pelle)
+Files: src/ex_docmd.c, src/window.c
+
+
+*** ../vim-7.4.138/src/ex_docmd.c 2013-12-14 13:06:13.000000000 +0100
+--- src/ex_docmd.c 2014-01-10 15:39:58.000000000 +0100
+***************
+*** 8228,8233 ****
+--- 8228,8234 ----
+ int local;
+ {
+ vim_free(curwin->w_localdir);
++ curwin->w_localdir = NULL;
+ if (local)
+ {
+ /* If still in global directory, need to remember current
+***************
+*** 8244,8250 ****
+ * name. */
+ vim_free(globaldir);
+ globaldir = NULL;
+- curwin->w_localdir = NULL;
+ }
+
+ shorten_fnames(TRUE);
+--- 8245,8250 ----
+*** ../vim-7.4.138/src/window.c 2013-08-14 17:11:14.000000000 +0200
+--- src/window.c 2014-01-10 15:39:58.000000000 +0100
+***************
+*** 1216,1223 ****
+ else
+ copy_loclist(oldp, newp);
+ #endif
+! if (oldp->w_localdir != NULL)
+! newp->w_localdir = vim_strsave(oldp->w_localdir);
+
+ /* copy tagstack and folds */
+ for (i = 0; i < oldp->w_tagstacklen; i++)
+--- 1216,1223 ----
+ else
+ copy_loclist(oldp, newp);
+ #endif
+! newp->w_localdir = (oldp->w_localdir == NULL)
+! ? NULL : vim_strsave(oldp->w_localdir);
+
+ /* copy tagstack and folds */
+ for (i = 0; i < oldp->w_tagstacklen; i++)
+*** ../vim-7.4.138/src/version.c 2014-01-10 15:32:17.000000000 +0100
+--- src/version.c 2014-01-10 15:39:48.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 139,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+132. You come back and check this list every half-hour.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.140 b/patches/source/vim/patches/7.4.140
new file mode 100644
index 000000000..e493828e7
--- /dev/null
+++ b/patches/source/vim/patches/7.4.140
@@ -0,0 +1,174 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.140
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.140
+Problem: Crash when wiping out buffer triggers autocommand that wipes out
+ only other buffer.
+Solution: Do not delete the last buffer, make it empty. (Hirohito Higashi)
+Files: src/buffer.c
+
+
+*** ../vim-7.4.139/src/buffer.c 2013-11-06 05:26:08.000000000 +0100
+--- src/buffer.c 2014-01-10 16:41:22.000000000 +0100
+***************
+*** 994,999 ****
+--- 994,1043 ----
+ #if defined(FEAT_LISTCMDS) || defined(FEAT_PYTHON) \
+ || defined(FEAT_PYTHON3) || defined(PROTO)
+
++ static int empty_curbuf __ARGS((int close_others, int forceit, int action));
++
++ /*
++ * Make the current buffer empty.
++ * Used when it is wiped out and it's the last buffer.
++ */
++ static int
++ empty_curbuf(close_others, forceit, action)
++ int close_others;
++ int forceit;
++ int action;
++ {
++ int retval;
++ buf_T *buf = curbuf;
++
++ if (action == DOBUF_UNLOAD)
++ {
++ EMSG(_("E90: Cannot unload last buffer"));
++ return FAIL;
++ }
++
++ if (close_others)
++ {
++ /* Close any other windows on this buffer, then make it empty. */
++ #ifdef FEAT_WINDOWS
++ close_windows(buf, TRUE);
++ #endif
++ }
++
++ setpcmark();
++ retval = do_ecmd(0, NULL, NULL, NULL, ECMD_ONE,
++ forceit ? ECMD_FORCEIT : 0, curwin);
++
++ /*
++ * do_ecmd() may create a new buffer, then we have to delete
++ * the old one. But do_ecmd() may have done that already, check
++ * if the buffer still exists.
++ */
++ if (buf != curbuf && buf_valid(buf) && buf->b_nwindows == 0)
++ close_buffer(NULL, buf, action, FALSE);
++ if (!close_others)
++ need_fileinfo = FALSE;
++ return retval;
++ }
+ /*
+ * Implementation of the commands for the buffer list.
+ *
+***************
+*** 1114,1120 ****
+ if (unload)
+ {
+ int forward;
+- int retval;
+
+ /* When unloading or deleting a buffer that's already unloaded and
+ * unlisted: fail silently. */
+--- 1158,1163 ----
+***************
+*** 1155,1184 ****
+ if (bp->b_p_bl && bp != buf)
+ break;
+ if (bp == NULL && buf == curbuf)
+! {
+! if (action == DOBUF_UNLOAD)
+! {
+! EMSG(_("E90: Cannot unload last buffer"));
+! return FAIL;
+! }
+!
+! /* Close any other windows on this buffer, then make it empty. */
+! #ifdef FEAT_WINDOWS
+! close_windows(buf, TRUE);
+! #endif
+! setpcmark();
+! retval = do_ecmd(0, NULL, NULL, NULL, ECMD_ONE,
+! forceit ? ECMD_FORCEIT : 0, curwin);
+!
+! /*
+! * do_ecmd() may create a new buffer, then we have to delete
+! * the old one. But do_ecmd() may have done that already, check
+! * if the buffer still exists.
+! */
+! if (buf != curbuf && buf_valid(buf) && buf->b_nwindows == 0)
+! close_buffer(NULL, buf, action, FALSE);
+! return retval;
+! }
+
+ #ifdef FEAT_WINDOWS
+ /*
+--- 1198,1204 ----
+ if (bp->b_p_bl && bp != buf)
+ break;
+ if (bp == NULL && buf == curbuf)
+! return empty_curbuf(TRUE, forceit, action);
+
+ #ifdef FEAT_WINDOWS
+ /*
+***************
+*** 1212,1218 ****
+
+ /*
+ * Deleting the current buffer: Need to find another buffer to go to.
+! * There must be another, otherwise it would have been handled above.
+ * First use au_new_curbuf, if it is valid.
+ * Then prefer the buffer we most recently visited.
+ * Else try to find one that is loaded, after the current buffer,
+--- 1232,1239 ----
+
+ /*
+ * Deleting the current buffer: Need to find another buffer to go to.
+! * There should be another, otherwise it would have been handled
+! * above. However, autocommands may have deleted all buffers.
+ * First use au_new_curbuf, if it is valid.
+ * Then prefer the buffer we most recently visited.
+ * Else try to find one that is loaded, after the current buffer,
+***************
+*** 1311,1316 ****
+--- 1332,1344 ----
+ }
+ }
+
++ if (buf == NULL)
++ {
++ /* Autocommands must have wiped out all other buffers. Only option
++ * now is to make the current buffer empty. */
++ return empty_curbuf(FALSE, forceit, action);
++ }
++
+ /*
+ * make buf current buffer
+ */
+*** ../vim-7.4.139/src/version.c 2014-01-10 15:53:09.000000000 +0100
+--- src/version.c 2014-01-10 16:36:03.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 140,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+133. You communicate with people on other continents more than you
+ do with your own neighbors.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.141 b/patches/source/vim/patches/7.4.141
new file mode 100644
index 000000000..8667b7277
--- /dev/null
+++ b/patches/source/vim/patches/7.4.141
@@ -0,0 +1,88 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.141
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.141
+Problem: Problems when building with Borland: st_mode is signed short;
+ can't build with Python; temp files not ignored by Mercurial;
+ building with DEBUG doesn't define _DEBUG.
+Solution: Fix the problems. (Ken Takata)
+Files: src/Make_bc5.mak, src/if_py_both.h, src/os_win32.c
+
+
+*** ../vim-7.4.140/src/Make_bc5.mak 2013-06-03 20:09:58.000000000 +0200
+--- src/Make_bc5.mak 2014-01-10 18:12:14.000000000 +0100
+***************
+*** 419,425 ****
+ ALIGNARG = -a$(ALIGN)
+ #
+ !if ("$(DEBUG)"=="yes")
+! DEFINES=$(DEFINES) -DDEBUG
+ !endif
+ #
+ !if ("$(OLE)"=="yes")
+--- 419,425 ----
+ ALIGNARG = -a$(ALIGN)
+ #
+ !if ("$(DEBUG)"=="yes")
+! DEFINES=$(DEFINES) -DDEBUG -D_DEBUG
+ !endif
+ #
+ !if ("$(OLE)"=="yes")
+*** ../vim-7.4.140/src/if_py_both.h 2013-12-07 14:28:37.000000000 +0100
+--- src/if_py_both.h 2014-01-10 18:12:14.000000000 +0100
+***************
+*** 13,18 ****
+--- 13,23 ----
+ * Common code for if_python.c and if_python3.c.
+ */
+
++ #ifdef __BORLANDC__
++ /* Disable Warning W8060: Possibly incorrect assignment in function ... */
++ # pragma warn -8060
++ #endif
++
+ static char_u e_py_systemexit[] = "E880: Can't handle SystemExit of %s exception in vim";
+
+ #if PY_VERSION_HEX < 0x02050000
+*** ../vim-7.4.140/src/os_win32.c 2014-01-10 13:51:35.000000000 +0100
+--- src/os_win32.c 2014-01-10 18:12:14.000000000 +0100
+***************
+*** 2960,2966 ****
+ int n;
+
+ n = mch_stat(name, &st);
+! return n == 0 ? (long)st.st_mode : -1L;
+ }
+
+
+--- 2960,2966 ----
+ int n;
+
+ n = mch_stat(name, &st);
+! return n == 0 ? (long)(unsigned short)st.st_mode : -1L;
+ }
+
+
+*** ../vim-7.4.140/src/version.c 2014-01-10 16:43:09.000000000 +0100
+--- src/version.c 2014-01-10 18:14:58.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 141,
+ /**/
+
+--
+Never eat yellow snow.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.142 b/patches/source/vim/patches/7.4.142
new file mode 100644
index 000000000..0e4f8f07d
--- /dev/null
+++ b/patches/source/vim/patches/7.4.142
@@ -0,0 +1,186 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.142
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.142 (after 7.4.137)
+Problem: On MS-Windows 8 IME input doen't work correctly.
+Solution: Work around the problem. (Nobuhiro Takasaki)
+Files: src/os_win32.c
+
+
+*** ../vim-7.4.141/src/os_win32.c 2014-01-10 18:16:00.000000000 +0100
+--- src/os_win32.c 2014-01-12 13:23:24.000000000 +0100
+***************
+*** 234,289 ****
+
+ /*
+ * Version of ReadConsoleInput() that works with IME.
+ */
+ static BOOL
+ read_console_input(
+! HANDLE hConsoleInput,
+! PINPUT_RECORD lpBuffer,
+! DWORD nLength,
+! LPDWORD lpNumberOfEventsRead)
+ {
+ enum
+ {
+! IRSIZE = 10, /* rough value */
+ };
+! static INPUT_RECORD irCache[IRSIZE];
+ static DWORD s_dwIndex = 0;
+ static DWORD s_dwMax = 0;
+!
+! if (hConsoleInput == NULL || lpBuffer == NULL)
+! return ReadConsoleInput(hConsoleInput, lpBuffer, nLength,
+! lpNumberOfEventsRead);
+!
+! if (nLength == -1)
+! {
+! if (s_dwMax == 0)
+! {
+! PeekConsoleInput(hConsoleInput, lpBuffer, 1, lpNumberOfEventsRead);
+! if (*lpNumberOfEventsRead == 0)
+! return FALSE;
+! ReadConsoleInput(hConsoleInput, irCache, IRSIZE, &s_dwMax);
+! s_dwIndex = 0;
+! }
+! ((PINPUT_RECORD)lpBuffer)[0] = irCache[s_dwIndex];
+! *lpNumberOfEventsRead = 1;
+! return TRUE;
+! }
+
+ if (s_dwMax == 0)
+ {
+! ReadConsoleInput(hConsoleInput, irCache, IRSIZE, &s_dwMax);
+ s_dwIndex = 0;
+! if (s_dwMax == 0)
+ {
+! *lpNumberOfEventsRead = 0;
+! return FALSE;
+ }
+ }
+!
+! ((PINPUT_RECORD)lpBuffer)[0] = irCache[s_dwIndex];
+! if (++s_dwIndex == s_dwMax)
+ s_dwMax = 0;
+! *lpNumberOfEventsRead = 1;
+ return TRUE;
+ }
+
+--- 234,275 ----
+
+ /*
+ * Version of ReadConsoleInput() that works with IME.
++ * Works around problems on Windows 8.
+ */
+ static BOOL
+ read_console_input(
+! HANDLE hInput,
+! INPUT_RECORD *lpBuffer,
+! DWORD nLength,
+! LPDWORD lpEvents)
+ {
+ enum
+ {
+! IRSIZE = 10
+ };
+! static INPUT_RECORD s_irCache[IRSIZE];
+ static DWORD s_dwIndex = 0;
+ static DWORD s_dwMax = 0;
+! DWORD dwEvents;
+
+ if (s_dwMax == 0)
+ {
+! if (nLength == -1)
+! return PeekConsoleInput(hInput, lpBuffer, 1, lpEvents);
+! if (!ReadConsoleInput(hInput, s_irCache, IRSIZE, &dwEvents))
+! return FALSE;
+ s_dwIndex = 0;
+! s_dwMax = dwEvents;
+! if (dwEvents == 0)
+ {
+! *lpEvents = 0;
+! return TRUE;
+ }
+ }
+! *lpBuffer = s_irCache[s_dwIndex];
+! if (nLength != -1 && ++s_dwIndex >= s_dwMax)
+ s_dwMax = 0;
+! *lpEvents = 1;
+ return TRUE;
+ }
+
+***************
+*** 292,304 ****
+ */
+ static BOOL
+ peek_console_input(
+! HANDLE hConsoleInput,
+! PINPUT_RECORD lpBuffer,
+! DWORD nLength,
+! LPDWORD lpNumberOfEventsRead)
+ {
+! return read_console_input(hConsoleInput, lpBuffer, -1,
+! lpNumberOfEventsRead);
+ }
+
+ static void
+--- 278,289 ----
+ */
+ static BOOL
+ peek_console_input(
+! HANDLE hInput,
+! INPUT_RECORD *lpBuffer,
+! DWORD nLength,
+! LPDWORD lpEvents)
+ {
+! return read_console_input(hInput, lpBuffer, -1, lpEvents);
+ }
+
+ static void
+***************
+*** 585,594 ****
+ static BOOL
+ win32_enable_privilege(LPTSTR lpszPrivilege, BOOL bEnable)
+ {
+! BOOL bResult;
+! LUID luid;
+! HANDLE hToken;
+! TOKEN_PRIVILEGES tokenPrivileges;
+
+ if (!OpenProcessToken(GetCurrentProcess(),
+ TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
+--- 570,579 ----
+ static BOOL
+ win32_enable_privilege(LPTSTR lpszPrivilege, BOOL bEnable)
+ {
+! BOOL bResult;
+! LUID luid;
+! HANDLE hToken;
+! TOKEN_PRIVILEGES tokenPrivileges;
+
+ if (!OpenProcessToken(GetCurrentProcess(),
+ TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
+*** ../vim-7.4.141/src/version.c 2014-01-10 18:16:00.000000000 +0100
+--- src/version.c 2014-01-12 13:17:47.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 142,
+ /**/
+
+--
+Drink wet cement and get really stoned.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.143 b/patches/source/vim/patches/7.4.143
new file mode 100644
index 000000000..909a9e9c2
--- /dev/null
+++ b/patches/source/vim/patches/7.4.143
@@ -0,0 +1,214 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.143
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.143
+Problem: TextChangedI is not triggered.
+Solution: Reverse check for "ready". (lilydjwg)
+Files: src/edit.c
+
+
+*** ../vim-7.4.142/src/edit.c 2013-11-06 04:01:31.000000000 +0100
+--- src/edit.c 2014-01-12 13:30:53.000000000 +0100
+***************
+*** 1556,1642 ****
+ int conceal_update_lines = FALSE;
+ #endif
+
+! if (!char_avail())
+! {
+ #if defined(FEAT_AUTOCMD) || defined(FEAT_CONCEAL)
+! /* Trigger CursorMoved if the cursor moved. Not when the popup menu is
+! * visible, the command might delete it. */
+! if (ready && (
+ # ifdef FEAT_AUTOCMD
+! has_cursormovedI()
+ # endif
+ # if defined(FEAT_AUTOCMD) && defined(FEAT_CONCEAL)
+! ||
+ # endif
+ # ifdef FEAT_CONCEAL
+! curwin->w_p_cole > 0
+ # endif
+! )
+! && !equalpos(last_cursormoved, curwin->w_cursor)
+ # ifdef FEAT_INS_EXPAND
+! && !pum_visible()
+ # endif
+! )
+! {
+ # ifdef FEAT_SYN_HL
+! /* Need to update the screen first, to make sure syntax
+! * highlighting is correct after making a change (e.g., inserting
+! * a "(". The autocommand may also require a redraw, so it's done
+! * again below, unfortunately. */
+! if (syntax_present(curwin) && must_redraw)
+! update_screen(0);
+ # endif
+ # ifdef FEAT_AUTOCMD
+! if (has_cursormovedI())
+! apply_autocmds(EVENT_CURSORMOVEDI, NULL, NULL, FALSE, curbuf);
+ # endif
+ # ifdef FEAT_CONCEAL
+! if (curwin->w_p_cole > 0)
+! {
+! conceal_old_cursor_line = last_cursormoved.lnum;
+! conceal_new_cursor_line = curwin->w_cursor.lnum;
+! conceal_update_lines = TRUE;
+! }
+! # endif
+! last_cursormoved = curwin->w_cursor;
+ }
+ #endif
+ #ifdef FEAT_AUTOCMD
+! /* Trigger TextChangedI if b_changedtick differs. */
+! if (!ready && has_textchangedI()
+! && last_changedtick != curbuf->b_changedtick
+ # ifdef FEAT_INS_EXPAND
+! && !pum_visible()
+ # endif
+! )
+! {
+! if (last_changedtick_buf == curbuf)
+! apply_autocmds(EVENT_TEXTCHANGEDI, NULL, NULL, FALSE, curbuf);
+! last_changedtick_buf = curbuf;
+! last_changedtick = curbuf->b_changedtick;
+! }
+ #endif
+! if (must_redraw)
+! update_screen(0);
+! else if (clear_cmdline || redraw_cmdline)
+! showmode(); /* clear cmdline and show mode */
+ # if defined(FEAT_CONCEAL)
+! if ((conceal_update_lines
+! && (conceal_old_cursor_line != conceal_new_cursor_line
+! || conceal_cursor_line(curwin)))
+! || need_cursor_line_redraw)
+! {
+! if (conceal_old_cursor_line != conceal_new_cursor_line)
+! update_single_line(curwin, conceal_old_cursor_line);
+! update_single_line(curwin, conceal_new_cursor_line == 0
+! ? curwin->w_cursor.lnum : conceal_new_cursor_line);
+! curwin->w_valid &= ~VALID_CROW;
+! }
+! # endif
+! showruler(FALSE);
+! setcursor();
+! emsg_on_display = FALSE; /* may remove error message now */
+ }
+ }
+
+ /*
+--- 1556,1644 ----
+ int conceal_update_lines = FALSE;
+ #endif
+
+! if (char_avail())
+! return;
+!
+ #if defined(FEAT_AUTOCMD) || defined(FEAT_CONCEAL)
+! /* Trigger CursorMoved if the cursor moved. Not when the popup menu is
+! * visible, the command might delete it. */
+! if (ready && (
+ # ifdef FEAT_AUTOCMD
+! has_cursormovedI()
+ # endif
+ # if defined(FEAT_AUTOCMD) && defined(FEAT_CONCEAL)
+! ||
+ # endif
+ # ifdef FEAT_CONCEAL
+! curwin->w_p_cole > 0
+ # endif
+! )
+! && !equalpos(last_cursormoved, curwin->w_cursor)
+ # ifdef FEAT_INS_EXPAND
+! && !pum_visible()
+ # endif
+! )
+! {
+ # ifdef FEAT_SYN_HL
+! /* Need to update the screen first, to make sure syntax
+! * highlighting is correct after making a change (e.g., inserting
+! * a "(". The autocommand may also require a redraw, so it's done
+! * again below, unfortunately. */
+! if (syntax_present(curwin) && must_redraw)
+! update_screen(0);
+ # endif
+ # ifdef FEAT_AUTOCMD
+! if (has_cursormovedI())
+! apply_autocmds(EVENT_CURSORMOVEDI, NULL, NULL, FALSE, curbuf);
+ # endif
+ # ifdef FEAT_CONCEAL
+! if (curwin->w_p_cole > 0)
+! {
+! conceal_old_cursor_line = last_cursormoved.lnum;
+! conceal_new_cursor_line = curwin->w_cursor.lnum;
+! conceal_update_lines = TRUE;
+ }
++ # endif
++ last_cursormoved = curwin->w_cursor;
++ }
+ #endif
++
+ #ifdef FEAT_AUTOCMD
+! /* Trigger TextChangedI if b_changedtick differs. */
+! if (ready && has_textchangedI()
+! && last_changedtick != curbuf->b_changedtick
+ # ifdef FEAT_INS_EXPAND
+! && !pum_visible()
+ # endif
+! )
+! {
+! if (last_changedtick_buf == curbuf)
+! apply_autocmds(EVENT_TEXTCHANGEDI, NULL, NULL, FALSE, curbuf);
+! last_changedtick_buf = curbuf;
+! last_changedtick = curbuf->b_changedtick;
+! }
+ #endif
+!
+! if (must_redraw)
+! update_screen(0);
+! else if (clear_cmdline || redraw_cmdline)
+! showmode(); /* clear cmdline and show mode */
+ # if defined(FEAT_CONCEAL)
+! if ((conceal_update_lines
+! && (conceal_old_cursor_line != conceal_new_cursor_line
+! || conceal_cursor_line(curwin)))
+! || need_cursor_line_redraw)
+! {
+! if (conceal_old_cursor_line != conceal_new_cursor_line)
+! update_single_line(curwin, conceal_old_cursor_line);
+! update_single_line(curwin, conceal_new_cursor_line == 0
+! ? curwin->w_cursor.lnum : conceal_new_cursor_line);
+! curwin->w_valid &= ~VALID_CROW;
+ }
++ # endif
++ showruler(FALSE);
++ setcursor();
++ emsg_on_display = FALSE; /* may remove error message now */
+ }
+
+ /*
+*** ../vim-7.4.142/src/version.c 2014-01-12 13:24:46.000000000 +0100
+--- src/version.c 2014-01-14 12:15:50.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 143,
+ /**/
+
+--
+You are not really successful until someone claims he sat
+beside you in school.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.144 b/patches/source/vim/patches/7.4.144
new file mode 100644
index 000000000..c88e2d2c3
--- /dev/null
+++ b/patches/source/vim/patches/7.4.144
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.144
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.144
+Problem: MingW also supports intptr_t for OPEN_OH_ARGTYPE.
+Solution: Adjust #ifdef. (Ken Takata)
+Files: src/os_mswin.c
+
+
+*** ../vim-7.4.143/src/os_mswin.c 2014-01-10 13:05:12.000000000 +0100
+--- src/os_mswin.c 2014-01-14 12:15:30.000000000 +0100
+***************
+*** 498,504 ****
+ }
+ }
+
+! #if (_MSC_VER >= 1300)
+ # define OPEN_OH_ARGTYPE intptr_t
+ #else
+ # define OPEN_OH_ARGTYPE long
+--- 498,504 ----
+ }
+ }
+
+! #if (defined(_MSC_VER) && (_MSC_VER >= 1300)) || defined(__MINGW32__)
+ # define OPEN_OH_ARGTYPE intptr_t
+ #else
+ # define OPEN_OH_ARGTYPE long
+*** ../vim-7.4.143/src/version.c 2014-01-14 12:16:57.000000000 +0100
+--- src/version.c 2014-01-14 12:18:10.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 144,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+150. You find yourself counting emoticons to get to sleep.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.145 b/patches/source/vim/patches/7.4.145
new file mode 100644
index 000000000..aa7b28d09
--- /dev/null
+++ b/patches/source/vim/patches/7.4.145
@@ -0,0 +1,75 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.145
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.145
+Problem: getregtype() does not return zero for unknown register.
+Solution: Adjust documention: return empty string for unknown register.
+ Check the register name to be valid. (Yukihiro Nakadaira)
+Files: runtime/doc/eval.txt, src/ops.c
+
+
+*** ../vim-7.4.144/runtime/doc/eval.txt 2013-11-09 01:44:38.000000000 +0100
+--- runtime/doc/eval.txt 2014-01-14 12:24:35.000000000 +0100
+***************
+*** 3459,3465 ****
+ "v" for |characterwise| text
+ "V" for |linewise| text
+ "<CTRL-V>{width}" for |blockwise-visual| text
+! 0 for an empty or unknown register
+ <CTRL-V> is one character with value 0x16.
+ If {regname} is not specified, |v:register| is used.
+
+--- 3460,3466 ----
+ "v" for |characterwise| text
+ "V" for |linewise| text
+ "<CTRL-V>{width}" for |blockwise-visual| text
+! "" for an empty or unknown register
+ <CTRL-V> is one character with value 0x16.
+ If {regname} is not specified, |v:register| is used.
+
+*** ../vim-7.4.144/src/ops.c 2013-11-21 14:39:58.000000000 +0100
+--- src/ops.c 2014-01-14 12:28:33.000000000 +0100
+***************
+*** 6240,6246 ****
+ regname = may_get_selection(regname);
+ #endif
+
+! /* Should we check for a valid name? */
+ get_yank_register(regname, FALSE);
+
+ if (y_current->y_array != NULL)
+--- 6240,6248 ----
+ regname = may_get_selection(regname);
+ #endif
+
+! if (regname != NUL && !valid_yank_reg(regname, FALSE))
+! return MAUTO;
+!
+ get_yank_register(regname, FALSE);
+
+ if (y_current->y_array != NULL)
+*** ../vim-7.4.144/src/version.c 2014-01-14 12:18:41.000000000 +0100
+--- src/version.c 2014-01-14 12:26:13.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 145,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+151. You find yourself engaged to someone you've never actually met,
+ except through e-mail.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.146 b/patches/source/vim/patches/7.4.146
new file mode 100644
index 000000000..f23a77dae
--- /dev/null
+++ b/patches/source/vim/patches/7.4.146
@@ -0,0 +1,67 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.146
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.146
+Problem: When starting Vim with "-u NONE" v:oldfiles is NULL.
+Solution: Set v:oldfiles to an empty list. (Yasuhiro Matsumoto)
+Files: src/main.c
+
+
+*** ../vim-7.4.145/src/main.c 2013-09-29 16:27:42.000000000 +0200
+--- src/main.c 2014-01-14 12:53:28.000000000 +0100
+***************
+*** 702,707 ****
+--- 702,712 ----
+ TIME_MSG("reading viminfo");
+ }
+ #endif
++ #ifdef FEAT_EVAL
++ /* It's better to make v:oldfiles an empty list than NULL. */
++ if (get_vim_var_list(VV_OLDFILES) == NULL)
++ set_vim_var_list(VV_OLDFILES, list_alloc());
++ #endif
+
+ #ifdef FEAT_QUICKFIX
+ /*
+***************
+*** 1048,1054 ****
+ /* Setup to catch a terminating error from the X server. Just ignore
+ * it, restore the state and continue. This might not always work
+ * properly, but at least we don't exit unexpectedly when the X server
+! * exists while Vim is running in a console. */
+ if (!cmdwin && !noexmode && SETJMP(x_jump_env))
+ {
+ State = NORMAL;
+--- 1053,1059 ----
+ /* Setup to catch a terminating error from the X server. Just ignore
+ * it, restore the state and continue. This might not always work
+ * properly, but at least we don't exit unexpectedly when the X server
+! * exits while Vim is running in a console. */
+ if (!cmdwin && !noexmode && SETJMP(x_jump_env))
+ {
+ State = NORMAL;
+*** ../vim-7.4.145/src/version.c 2014-01-14 12:33:32.000000000 +0100
+--- src/version.c 2014-01-14 12:56:08.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 146,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+152. You find yourself falling for someone you've never seen or hardly
+ know, but, boy can he/she TYPE!!!!!!
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.147 b/patches/source/vim/patches/7.4.147
new file mode 100644
index 000000000..0df6ffa81
--- /dev/null
+++ b/patches/source/vim/patches/7.4.147
Binary files differ
diff --git a/patches/source/vim/patches/7.4.148 b/patches/source/vim/patches/7.4.148
new file mode 100644
index 000000000..582b37880
--- /dev/null
+++ b/patches/source/vim/patches/7.4.148
@@ -0,0 +1,83 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.148
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.148
+Problem: Cannot build with Cygwin and X11.
+Solution: Include Xwindows.h instead of windows.h. (Lech Lorens)
+Files: src/mbyte.c
+
+
+*** ../vim-7.4.147/src/mbyte.c 2013-11-12 04:43:57.000000000 +0100
+--- src/mbyte.c 2014-01-14 13:21:36.000000000 +0100
+***************
+*** 83,92 ****
+ # ifndef WIN32_LEAN_AND_MEAN
+ # define WIN32_LEAN_AND_MEAN
+ # endif
+! # include <windows.h>
+ # ifdef WIN32
+ # undef WIN32 /* Some windows.h define WIN32, we don't want that here. */
+ # endif
+ #endif
+
+ #if (defined(WIN3264) || defined(WIN32UNIX)) && !defined(__MINGW32__)
+--- 83,100 ----
+ # ifndef WIN32_LEAN_AND_MEAN
+ # define WIN32_LEAN_AND_MEAN
+ # endif
+! # if defined(FEAT_GUI) || defined(FEAT_XCLIPBOARD)
+! # include <X11/Xwindows.h>
+! # define WINBYTE wBYTE
+! # else
+! # include <windows.h>
+! # define WINBYTE BYTE
+! # endif
+ # ifdef WIN32
+ # undef WIN32 /* Some windows.h define WIN32, we don't want that here. */
+ # endif
++ #else
++ # define WINBYTE BYTE
+ #endif
+
+ #if (defined(WIN3264) || defined(WIN32UNIX)) && !defined(__MINGW32__)
+***************
+*** 698,704 ****
+ /* enc_dbcs is set by setting 'fileencoding'. It becomes a Windows
+ * CodePage identifier, which we can pass directly in to Windows
+ * API */
+! n = IsDBCSLeadByteEx(enc_dbcs, (BYTE)i) ? 2 : 1;
+ #else
+ # if defined(MACOS) || defined(__amigaos4__)
+ /*
+--- 706,712 ----
+ /* enc_dbcs is set by setting 'fileencoding'. It becomes a Windows
+ * CodePage identifier, which we can pass directly in to Windows
+ * API */
+! n = IsDBCSLeadByteEx(enc_dbcs, (WINBYTE)i) ? 2 : 1;
+ #else
+ # if defined(MACOS) || defined(__amigaos4__)
+ /*
+*** ../vim-7.4.147/src/version.c 2014-01-14 13:18:53.000000000 +0100
+--- src/version.c 2014-01-14 13:24:17.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 148,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+154. You fondle your mouse.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.149 b/patches/source/vim/patches/7.4.149
new file mode 100644
index 000000000..b1584205a
--- /dev/null
+++ b/patches/source/vim/patches/7.4.149
@@ -0,0 +1,822 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.149
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.149
+Problem: Get E685 error when assigning a function to an autoload variable.
+ (Yukihiro Nakadaira)
+Solution: Instead of having a global no_autoload variable, pass an autoload
+ flag down to where it is used. (ZyX)
+Files: src/eval.c, src/testdir/test55.in, src/testdir/test55.ok,
+ src/testdir/test60.in, src/testdir/test60.ok,
+ src/testdir/sautest/autoload/footest.vim
+
+
+*** ../vim-7.4.148/src/eval.c 2014-01-06 06:18:44.000000000 +0100
+--- src/eval.c 2014-01-14 15:14:05.000000000 +0100
+***************
+*** 125,133 ****
+ */
+ static hashtab_T compat_hashtab;
+
+- /* When using exists() don't auto-load a script. */
+- static int no_autoload = FALSE;
+-
+ /*
+ * When recursively copying lists and dicts we need to remember which ones we
+ * have done to avoid endless recursiveness. This unique ID is used for that.
+--- 125,130 ----
+***************
+*** 156,161 ****
+--- 153,163 ----
+ /* Values for trans_function_name() argument: */
+ #define TFN_INT 1 /* internal function name OK */
+ #define TFN_QUIET 2 /* no error messages */
++ #define TFN_NO_AUTOLOAD 4 /* do not use script autoloading */
++
++ /* Values for get_lval() flags argument: */
++ #define GLV_QUIET TFN_QUIET /* no error messages */
++ #define GLV_NO_AUTOLOAD TFN_NO_AUTOLOAD /* do not use script autoloading */
+
+ /*
+ * Structure to hold info for a user function.
+***************
+*** 390,396 ****
+ static char_u *list_arg_vars __ARGS((exarg_T *eap, char_u *arg, int *first));
+ static char_u *ex_let_one __ARGS((char_u *arg, typval_T *tv, int copy, char_u *endchars, char_u *op));
+ static int check_changedtick __ARGS((char_u *arg));
+! static char_u *get_lval __ARGS((char_u *name, typval_T *rettv, lval_T *lp, int unlet, int skip, int quiet, int fne_flags));
+ static void clear_lval __ARGS((lval_T *lp));
+ static void set_var_lval __ARGS((lval_T *lp, char_u *endp, typval_T *rettv, int copy, char_u *op));
+ static int tv_op __ARGS((typval_T *tv1, typval_T *tv2, char_u *op));
+--- 392,398 ----
+ static char_u *list_arg_vars __ARGS((exarg_T *eap, char_u *arg, int *first));
+ static char_u *ex_let_one __ARGS((char_u *arg, typval_T *tv, int copy, char_u *endchars, char_u *op));
+ static int check_changedtick __ARGS((char_u *arg));
+! static char_u *get_lval __ARGS((char_u *name, typval_T *rettv, lval_T *lp, int unlet, int skip, int flags, int fne_flags));
+ static void clear_lval __ARGS((lval_T *lp));
+ static void set_var_lval __ARGS((lval_T *lp, char_u *endp, typval_T *rettv, int copy, char_u *op));
+ static int tv_op __ARGS((typval_T *tv1, typval_T *tv2, char_u *op));
+***************
+*** 770,776 ****
+ static char_u * make_expanded_name __ARGS((char_u *in_start, char_u *expr_start, char_u *expr_end, char_u *in_end));
+ static int eval_isnamec __ARGS((int c));
+ static int eval_isnamec1 __ARGS((int c));
+! static int get_var_tv __ARGS((char_u *name, int len, typval_T *rettv, int verbose));
+ static int handle_subscript __ARGS((char_u **arg, typval_T *rettv, int evaluate, int verbose));
+ static typval_T *alloc_tv __ARGS((void));
+ static typval_T *alloc_string_tv __ARGS((char_u *string));
+--- 772,778 ----
+ static char_u * make_expanded_name __ARGS((char_u *in_start, char_u *expr_start, char_u *expr_end, char_u *in_end));
+ static int eval_isnamec __ARGS((int c));
+ static int eval_isnamec1 __ARGS((int c));
+! static int get_var_tv __ARGS((char_u *name, int len, typval_T *rettv, int verbose, int no_autoload));
+ static int handle_subscript __ARGS((char_u **arg, typval_T *rettv, int evaluate, int verbose));
+ static typval_T *alloc_tv __ARGS((void));
+ static typval_T *alloc_string_tv __ARGS((char_u *string));
+***************
+*** 781,788 ****
+ static char_u *get_tv_string __ARGS((typval_T *varp));
+ static char_u *get_tv_string_buf __ARGS((typval_T *varp, char_u *buf));
+ static char_u *get_tv_string_buf_chk __ARGS((typval_T *varp, char_u *buf));
+! static dictitem_T *find_var __ARGS((char_u *name, hashtab_T **htp));
+! static dictitem_T *find_var_in_ht __ARGS((hashtab_T *ht, int htname, char_u *varname, int writing));
+ static hashtab_T *find_var_ht __ARGS((char_u *name, char_u **varname));
+ static void vars_clear_ext __ARGS((hashtab_T *ht, int free_val));
+ static void delete_var __ARGS((hashtab_T *ht, hashitem_T *hi));
+--- 783,790 ----
+ static char_u *get_tv_string __ARGS((typval_T *varp));
+ static char_u *get_tv_string_buf __ARGS((typval_T *varp, char_u *buf));
+ static char_u *get_tv_string_buf_chk __ARGS((typval_T *varp, char_u *buf));
+! static dictitem_T *find_var __ARGS((char_u *name, hashtab_T **htp, int no_autoload));
+! static dictitem_T *find_var_in_ht __ARGS((hashtab_T *ht, int htname, char_u *varname, int no_autoload));
+ static hashtab_T *find_var_ht __ARGS((char_u *name, char_u **varname));
+ static void vars_clear_ext __ARGS((hashtab_T *ht, int free_val));
+ static void delete_var __ARGS((hashtab_T *ht, hashitem_T *hi));
+***************
+*** 1059,1065 ****
+ ga_init2(&redir_ga, (int)sizeof(char), 500);
+
+ /* Parse the variable name (can be a dict or list entry). */
+! redir_endp = get_lval(redir_varname, NULL, redir_lval, FALSE, FALSE, FALSE,
+ FNE_CHECK_START);
+ if (redir_endp == NULL || redir_lval->ll_name == NULL || *redir_endp != NUL)
+ {
+--- 1061,1067 ----
+ ga_init2(&redir_ga, (int)sizeof(char), 500);
+
+ /* Parse the variable name (can be a dict or list entry). */
+! redir_endp = get_lval(redir_varname, NULL, redir_lval, FALSE, FALSE, 0,
+ FNE_CHECK_START);
+ if (redir_endp == NULL || redir_lval->ll_name == NULL || *redir_endp != NUL)
+ {
+***************
+*** 1150,1156 ****
+ /* Call get_lval() again, if it's inside a Dict or List it may
+ * have changed. */
+ redir_endp = get_lval(redir_varname, NULL, redir_lval,
+! FALSE, FALSE, FALSE, FNE_CHECK_START);
+ if (redir_endp != NULL && redir_lval->ll_name != NULL)
+ set_var_lval(redir_lval, redir_endp, &tv, FALSE, (char_u *)".");
+ clear_lval(redir_lval);
+--- 1152,1158 ----
+ /* Call get_lval() again, if it's inside a Dict or List it may
+ * have changed. */
+ redir_endp = get_lval(redir_varname, NULL, redir_lval,
+! FALSE, FALSE, 0, FNE_CHECK_START);
+ if (redir_endp != NULL && redir_lval->ll_name != NULL)
+ set_var_lval(redir_lval, redir_endp, &tv, FALSE, (char_u *)".");
+ clear_lval(redir_lval);
+***************
+*** 2239,2245 ****
+ {
+ if (tofree != NULL)
+ name = tofree;
+! if (get_var_tv(name, len, &tv, TRUE) == FAIL)
+ error = TRUE;
+ else
+ {
+--- 2241,2247 ----
+ {
+ if (tofree != NULL)
+ name = tofree;
+! if (get_var_tv(name, len, &tv, TRUE, FALSE) == FAIL)
+ error = TRUE;
+ else
+ {
+***************
+*** 2474,2480 ****
+ {
+ lval_T lv;
+
+! p = get_lval(arg, tv, &lv, FALSE, FALSE, FALSE, FNE_CHECK_START);
+ if (p != NULL && lv.ll_name != NULL)
+ {
+ if (endchars != NULL && vim_strchr(endchars, *skipwhite(p)) == NULL)
+--- 2476,2482 ----
+ {
+ lval_T lv;
+
+! p = get_lval(arg, tv, &lv, FALSE, FALSE, 0, FNE_CHECK_START);
+ if (p != NULL && lv.ll_name != NULL)
+ {
+ if (endchars != NULL && vim_strchr(endchars, *skipwhite(p)) == NULL)
+***************
+*** 2519,2536 ****
+ * "unlet" is TRUE for ":unlet": slightly different behavior when something is
+ * wrong; must end in space or cmd separator.
+ *
+ * Returns a pointer to just after the name, including indexes.
+ * When an evaluation error occurs "lp->ll_name" is NULL;
+ * Returns NULL for a parsing error. Still need to free items in "lp"!
+ */
+ static char_u *
+! get_lval(name, rettv, lp, unlet, skip, quiet, fne_flags)
+ char_u *name;
+ typval_T *rettv;
+ lval_T *lp;
+ int unlet;
+ int skip;
+! int quiet; /* don't give error messages */
+ int fne_flags; /* flags for find_name_end() */
+ {
+ char_u *p;
+--- 2521,2542 ----
+ * "unlet" is TRUE for ":unlet": slightly different behavior when something is
+ * wrong; must end in space or cmd separator.
+ *
++ * flags:
++ * GLV_QUIET: do not give error messages
++ * GLV_NO_AUTOLOAD: do not use script autoloading
++ *
+ * Returns a pointer to just after the name, including indexes.
+ * When an evaluation error occurs "lp->ll_name" is NULL;
+ * Returns NULL for a parsing error. Still need to free items in "lp"!
+ */
+ static char_u *
+! get_lval(name, rettv, lp, unlet, skip, flags, fne_flags)
+ char_u *name;
+ typval_T *rettv;
+ lval_T *lp;
+ int unlet;
+ int skip;
+! int flags; /* GLV_ values */
+ int fne_flags; /* flags for find_name_end() */
+ {
+ char_u *p;
+***************
+*** 2544,2549 ****
+--- 2550,2556 ----
+ char_u *key = NULL;
+ int len;
+ hashtab_T *ht;
++ int quiet = flags & GLV_QUIET;
+
+ /* Clear everything in "lp". */
+ vim_memset(lp, 0, sizeof(lval_T));
+***************
+*** 2591,2597 ****
+
+ cc = *p;
+ *p = NUL;
+! v = find_var(lp->ll_name, &ht);
+ if (v == NULL && !quiet)
+ EMSG2(_(e_undefvar), lp->ll_name);
+ *p = cc;
+--- 2598,2604 ----
+
+ cc = *p;
+ *p = NUL;
+! v = find_var(lp->ll_name, &ht, flags & GLV_NO_AUTOLOAD);
+ if (v == NULL && !quiet)
+ EMSG2(_(e_undefvar), lp->ll_name);
+ *p = cc;
+***************
+*** 2904,2910 ****
+
+ /* handle +=, -= and .= */
+ if (get_var_tv(lp->ll_name, (int)STRLEN(lp->ll_name),
+! &tv, TRUE) == OK)
+ {
+ if (tv_op(&tv, rettv, op) == OK)
+ set_var(lp->ll_name, &tv, FALSE);
+--- 2911,2917 ----
+
+ /* handle +=, -= and .= */
+ if (get_var_tv(lp->ll_name, (int)STRLEN(lp->ll_name),
+! &tv, TRUE, FALSE) == OK)
+ {
+ if (tv_op(&tv, rettv, op) == OK)
+ set_var(lp->ll_name, &tv, FALSE);
+***************
+*** 3556,3562 ****
+ do
+ {
+ /* Parse the name and find the end. */
+! name_end = get_lval(arg, NULL, &lv, TRUE, eap->skip || error, FALSE,
+ FNE_CHECK_START);
+ if (lv.ll_name == NULL)
+ error = TRUE; /* error but continue parsing */
+--- 3563,3569 ----
+ do
+ {
+ /* Parse the name and find the end. */
+! name_end = get_lval(arg, NULL, &lv, TRUE, eap->skip || error, 0,
+ FNE_CHECK_START);
+ if (lv.ll_name == NULL)
+ error = TRUE; /* error but continue parsing */
+***************
+*** 3709,3715 ****
+ ret = FAIL;
+ else
+ {
+! di = find_var(lp->ll_name, NULL);
+ if (di == NULL)
+ ret = FAIL;
+ else
+--- 3716,3722 ----
+ ret = FAIL;
+ else
+ {
+! di = find_var(lp->ll_name, NULL, TRUE);
+ if (di == NULL)
+ ret = FAIL;
+ else
+***************
+*** 5179,5185 ****
+ }
+ }
+ else if (evaluate)
+! ret = get_var_tv(s, len, rettv, TRUE);
+ else
+ ret = OK;
+ }
+--- 5186,5192 ----
+ }
+ }
+ else if (evaluate)
+! ret = get_var_tv(s, len, rettv, TRUE, FALSE);
+ else
+ ret = OK;
+ }
+***************
+*** 8284,8290 ****
+
+ cc = name[*lenp];
+ name[*lenp] = NUL;
+! v = find_var(name, NULL);
+ name[*lenp] = cc;
+ if (v != NULL && v->di_tv.v_type == VAR_FUNC)
+ {
+--- 8291,8297 ----
+
+ cc = name[*lenp];
+ name[*lenp] = NUL;
+! v = find_var(name, NULL, FALSE);
+ name[*lenp] = cc;
+ if (v != NULL && v->di_tv.v_type == VAR_FUNC)
+ {
+***************
+*** 10039,10046 ****
+ int n = FALSE;
+ int len = 0;
+
+- no_autoload = TRUE;
+-
+ p = get_tv_string(&argvars[0]);
+ if (*p == '$') /* environment variable */
+ {
+--- 10046,10051 ----
+***************
+*** 10091,10097 ****
+ {
+ if (tofree != NULL)
+ name = tofree;
+! n = (get_var_tv(name, len, &tv, FALSE) == OK);
+ if (n)
+ {
+ /* handle d.key, l[idx], f(expr) */
+--- 10096,10102 ----
+ {
+ if (tofree != NULL)
+ name = tofree;
+! n = (get_var_tv(name, len, &tv, FALSE, TRUE) == OK);
+ if (n)
+ {
+ /* handle d.key, l[idx], f(expr) */
+***************
+*** 10107,10114 ****
+ }
+
+ rettv->vval.v_number = n;
+-
+- no_autoload = FALSE;
+ }
+
+ #ifdef FEAT_FLOAT
+--- 10112,10117 ----
+***************
+*** 13344,13351 ****
+ dictitem_T *di;
+
+ rettv->vval.v_number = -1;
+! end = get_lval(get_tv_string(&argvars[0]), NULL, &lv, FALSE, FALSE, FALSE,
+! FNE_CHECK_START);
+ if (end != NULL && lv.ll_name != NULL)
+ {
+ if (*end != NUL)
+--- 13347,13354 ----
+ dictitem_T *di;
+
+ rettv->vval.v_number = -1;
+! end = get_lval(get_tv_string(&argvars[0]), NULL, &lv, FALSE, FALSE,
+! GLV_NO_AUTOLOAD, FNE_CHECK_START);
+ if (end != NULL && lv.ll_name != NULL)
+ {
+ if (*end != NUL)
+***************
+*** 13358,13364 ****
+ rettv->vval.v_number = 1; /* always locked */
+ else
+ {
+! di = find_var(lv.ll_name, NULL);
+ if (di != NULL)
+ {
+ /* Consider a variable locked when:
+--- 13361,13367 ----
+ rettv->vval.v_number = 1; /* always locked */
+ else
+ {
+! di = find_var(lv.ll_name, NULL, TRUE);
+ if (di != NULL)
+ {
+ /* Consider a variable locked when:
+***************
+*** 19774,19784 ****
+ * Return OK or FAIL.
+ */
+ static int
+! get_var_tv(name, len, rettv, verbose)
+ char_u *name;
+ int len; /* length of "name" */
+ typval_T *rettv; /* NULL when only checking existence */
+ int verbose; /* may give error message */
+ {
+ int ret = OK;
+ typval_T *tv = NULL;
+--- 19777,19788 ----
+ * Return OK or FAIL.
+ */
+ static int
+! get_var_tv(name, len, rettv, verbose, no_autoload)
+ char_u *name;
+ int len; /* length of "name" */
+ typval_T *rettv; /* NULL when only checking existence */
+ int verbose; /* may give error message */
++ int no_autoload; /* do not use script autoloading */
+ {
+ int ret = OK;
+ typval_T *tv = NULL;
+***************
+*** 19805,19811 ****
+ */
+ else
+ {
+! v = find_var(name, NULL);
+ if (v != NULL)
+ tv = &v->di_tv;
+ }
+--- 19809,19815 ----
+ */
+ else
+ {
+! v = find_var(name, NULL, no_autoload);
+ if (v != NULL)
+ tv = &v->di_tv;
+ }
+***************
+*** 20207,20215 ****
+ * hashtab_T used.
+ */
+ static dictitem_T *
+! find_var(name, htp)
+ char_u *name;
+ hashtab_T **htp;
+ {
+ char_u *varname;
+ hashtab_T *ht;
+--- 20211,20220 ----
+ * hashtab_T used.
+ */
+ static dictitem_T *
+! find_var(name, htp, no_autoload)
+ char_u *name;
+ hashtab_T **htp;
++ int no_autoload;
+ {
+ char_u *varname;
+ hashtab_T *ht;
+***************
+*** 20219,20225 ****
+ *htp = ht;
+ if (ht == NULL)
+ return NULL;
+! return find_var_in_ht(ht, *name, varname, htp != NULL);
+ }
+
+ /*
+--- 20224,20230 ----
+ *htp = ht;
+ if (ht == NULL)
+ return NULL;
+! return find_var_in_ht(ht, *name, varname, no_autoload || htp != NULL);
+ }
+
+ /*
+***************
+*** 20227,20237 ****
+ * Returns NULL if not found.
+ */
+ static dictitem_T *
+! find_var_in_ht(ht, htname, varname, writing)
+ hashtab_T *ht;
+ int htname;
+ char_u *varname;
+! int writing;
+ {
+ hashitem_T *hi;
+
+--- 20232,20242 ----
+ * Returns NULL if not found.
+ */
+ static dictitem_T *
+! find_var_in_ht(ht, htname, varname, no_autoload)
+ hashtab_T *ht;
+ int htname;
+ char_u *varname;
+! int no_autoload;
+ {
+ hashitem_T *hi;
+
+***************
+*** 20263,20269 ****
+ * worked find the variable again. Don't auto-load a script if it was
+ * loaded already, otherwise it would be loaded every time when
+ * checking if a function name is a Funcref variable. */
+! if (ht == &globvarht && !writing)
+ {
+ /* Note: script_autoload() may make "hi" invalid. It must either
+ * be obtained again or not used. */
+--- 20268,20274 ----
+ * worked find the variable again. Don't auto-load a script if it was
+ * loaded already, otherwise it would be loaded every time when
+ * checking if a function name is a Funcref variable. */
+! if (ht == &globvarht && !no_autoload)
+ {
+ /* Note: script_autoload() may make "hi" invalid. It must either
+ * be obtained again or not used. */
+***************
+*** 20343,20349 ****
+ {
+ dictitem_T *v;
+
+! v = find_var(name, NULL);
+ if (v == NULL)
+ return NULL;
+ return get_tv_string(&v->di_tv);
+--- 20348,20354 ----
+ {
+ dictitem_T *v;
+
+! v = find_var(name, NULL, FALSE);
+ if (v == NULL)
+ return NULL;
+ return get_tv_string(&v->di_tv);
+***************
+*** 21672,21678 ****
+ */
+ if (fudi.fd_dict == NULL)
+ {
+! v = find_var(name, &ht);
+ if (v != NULL && v->di_tv.v_type == VAR_FUNC)
+ {
+ emsg_funcname(N_("E707: Function name conflicts with variable: %s"),
+--- 21677,21683 ----
+ */
+ if (fudi.fd_dict == NULL)
+ {
+! v = find_var(name, &ht, FALSE);
+ if (v != NULL && v->di_tv.v_type == VAR_FUNC)
+ {
+ emsg_funcname(N_("E707: Function name conflicts with variable: %s"),
+***************
+*** 21830,21837 ****
+ * Also handles a Funcref in a List or Dictionary.
+ * Returns the function name in allocated memory, or NULL for failure.
+ * flags:
+! * TFN_INT: internal function name OK
+! * TFN_QUIET: be quiet
+ * Advances "pp" to just after the function name (if no error).
+ */
+ static char_u *
+--- 21835,21843 ----
+ * Also handles a Funcref in a List or Dictionary.
+ * Returns the function name in allocated memory, or NULL for failure.
+ * flags:
+! * TFN_INT: internal function name OK
+! * TFN_QUIET: be quiet
+! * TFN_NO_AUTOLOAD: do not use script autoloading
+ * Advances "pp" to just after the function name (if no error).
+ */
+ static char_u *
+***************
+*** 21869,21875 ****
+ if (lead > 2)
+ start += lead;
+
+! end = get_lval(start, NULL, &lv, FALSE, skip, flags & TFN_QUIET,
+ lead > 2 ? 0 : FNE_CHECK_START);
+ if (end == start)
+ {
+--- 21875,21882 ----
+ if (lead > 2)
+ start += lead;
+
+! /* Note that TFN_ flags use the same values as GLV_ flags. */
+! end = get_lval(start, NULL, &lv, FALSE, skip, flags,
+ lead > 2 ? 0 : FNE_CHECK_START);
+ if (end == start)
+ {
+***************
+*** 22146,22152 ****
+ char_u *p;
+ int n = FALSE;
+
+! p = trans_function_name(&nm, FALSE, TFN_INT|TFN_QUIET, NULL);
+ nm = skipwhite(nm);
+
+ /* Only accept "funcname", "funcname ", "funcname (..." and
+--- 22153,22160 ----
+ char_u *p;
+ int n = FALSE;
+
+! p = trans_function_name(&nm, FALSE, TFN_INT|TFN_QUIET|TFN_NO_AUTOLOAD,
+! NULL);
+ nm = skipwhite(nm);
+
+ /* Only accept "funcname", "funcname ", "funcname (..." and
+***************
+*** 22393,22402 ****
+ int ret = FALSE;
+ int i;
+
+- /* Return quickly when autoload disabled. */
+- if (no_autoload)
+- return FALSE;
+-
+ /* If there is no '#' after name[0] there is no package name. */
+ p = vim_strchr(name, AUTOLOAD_CHAR);
+ if (p == NULL || p == name)
+--- 22401,22406 ----
+*** ../vim-7.4.148/src/testdir/test55.in 2013-03-07 14:33:12.000000000 +0100
+--- src/testdir/test55.in 2014-01-14 14:48:10.000000000 +0100
+***************
+*** 282,287 ****
+--- 282,294 ----
+ : $put =ps
+ : endfor
+ :endfor
++ :" :lockvar/islocked() triggering script autoloading
++ :set rtp+=./sautest
++ :lockvar g:footest#x
++ :unlockvar g:footest#x
++ :$put ='locked g:footest#x:'.islocked('g:footest#x')
++ :$put ='exists g:footest#x:'.exists('g:footest#x')
++ :$put ='g:footest#x: '.g:footest#x
+ :"
+ :" a:000 function argument
+ :" first the tests that should fail
+*** ../vim-7.4.148/src/testdir/test55.ok 2012-08-29 16:51:15.000000000 +0200
+--- src/testdir/test55.ok 2014-01-14 14:45:14.000000000 +0100
+***************
+*** 86,91 ****
+--- 86,94 ----
+ FFpFFpp
+ 0000-000
+ ppppppp
++ locked g:footest#x:-1
++ exists g:footest#x:0
++ g:footest#x: 1
+ caught a:000
+ caught a:000[0]
+ caught a:000[2]
+*** ../vim-7.4.148/src/testdir/test60.in 2010-05-15 13:04:10.000000000 +0200
+--- src/testdir/test60.in 2014-01-14 14:49:10.000000000 +0100
+***************
+*** 1,4 ****
+! Tests for the exists() function. vim: set ft=vim :
+
+ STARTTEST
+ :so small.vim
+--- 1,4 ----
+! Tests for the exists() function. vim: set ft=vim ts=8 :
+
+ STARTTEST
+ :so small.vim
+***************
+*** 11,18 ****
+ endfunction
+ :function! TestExists()
+ augroup myagroup
+! autocmd! BufEnter *.my echo 'myfile edited'
+ augroup END
+
+ let test_cases = []
+
+--- 11,20 ----
+ endfunction
+ :function! TestExists()
+ augroup myagroup
+! autocmd! BufEnter *.my echo "myfile edited"
+! autocmd! FuncUndefined UndefFun exec "fu UndefFun()\nendfu"
+ augroup END
++ set rtp+=./sautest
+
+ let test_cases = []
+
+***************
+*** 95,104 ****
+ " Non-existing user defined function
+ let test_cases += [['*MyxyzFunc', 0]]
+
+ redir! > test.out
+
+ for [test_case, result] in test_cases
+! echo test_case . ": " . result
+ call RunTest(test_case, result)
+ endfor
+
+--- 97,111 ----
+ " Non-existing user defined function
+ let test_cases += [['*MyxyzFunc', 0]]
+
++ " Function that may be created by FuncUndefined event
++ let test_cases += [['*UndefFun', 0]]
++ " Function that may be created by script autoloading
++ let test_cases += [['*footest#F', 0]]
++
+ redir! > test.out
+
+ for [test_case, result] in test_cases
+! echo test_case . ": " . result
+ call RunTest(test_case, result)
+ endfor
+
+***************
+*** 207,212 ****
+--- 214,227 ----
+ echo "FAILED"
+ endif
+
++ " Non-existing autoload variable that may be autoloaded
++ echo 'footest#x: 0'
++ if !exists('footest#x')
++ echo "OK"
++ else
++ echo "FAILED"
++ endif
++
+ " Valid local list
+ let local_list = ["blue", "orange"]
+ echo 'local_list: 1'
+***************
+*** 566,571 ****
+--- 581,590 ----
+
+ call TestFuncArg("arg1", "arg2")
+
++ echo ' g:footest#x =' g:footest#x
++ echo ' footest#F()' footest#F()
++ echo 'UndefFun()' UndefFun()
++
+ redir END
+ endfunction
+ :call TestExists()
+***************
+*** 576,580 ****
+--- 595,600 ----
+ :set ff=unix
+ :w
+ :qa!
++ :while getchar(1) | call getchar() | endwhile
+ ENDTEST
+
+*** ../vim-7.4.148/src/testdir/test60.ok 2010-05-15 13:04:10.000000000 +0200
+--- src/testdir/test60.ok 2014-01-14 14:50:50.000000000 +0100
+***************
+*** 71,76 ****
+--- 71,80 ----
+ OK
+ *MyxyzFunc: 0
+ OK
++ *UndefFun: 0
++ OK
++ *footest#F: 0
++ OK
+ :edit: 2
+ OK
+ :edit/a: 0
+***************
+*** 95,100 ****
+--- 99,106 ----
+ OK
+ local_var: 0
+ OK
++ footest#x: 0
++ OK
+ local_list: 1
+ OK
+ local_list[1]: 1
+***************
+*** 195,197 ****
+--- 201,206 ----
+ OK
+ a:2: 0
+ OK
++ g:footest#x = 1
++ footest#F() 0
++ UndefFun() 0
+*** ../vim-7.4.148/src/testdir/sautest/autoload/footest.vim 1970-01-01 01:00:00.000000000 +0100
+--- src/testdir/sautest/autoload/footest.vim 2014-01-14 14:52:06.000000000 +0100
+***************
+*** 0 ****
+--- 1,5 ----
++ " Autoload script used by test55 and test60
++ let footest#x = 1
++ func footest#F()
++ return 0
++ endfunc
+*** ../vim-7.4.148/src/version.c 2014-01-14 13:26:17.000000000 +0100
+--- src/version.c 2014-01-14 15:23:36.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 149,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+157. You fum through a magazine, you first check to see if it has a web
+ address.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.150 b/patches/source/vim/patches/7.4.150
new file mode 100644
index 000000000..528f4d6bd
--- /dev/null
+++ b/patches/source/vim/patches/7.4.150
@@ -0,0 +1,93 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.150
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.150
+Problem: :keeppatterns is not respected for :s.
+Solution: Check the keeppatterns flag. (Yasuhiro Matsumoto)
+Files: src/search.c, src/testdir/test14.in, src/testdir/test14.ok
+
+
+*** ../vim-7.4.149/src/search.c 2013-11-28 19:27:18.000000000 +0100
+--- src/search.c 2014-01-14 15:44:33.000000000 +0100
+***************
+*** 201,207 ****
+ * Save the currently used pattern in the appropriate place,
+ * unless the pattern should not be remembered.
+ */
+! if (!(options & SEARCH_KEEP))
+ {
+ /* search or global command */
+ if (pat_save == RE_SEARCH || pat_save == RE_BOTH)
+--- 201,207 ----
+ * Save the currently used pattern in the appropriate place,
+ * unless the pattern should not be remembered.
+ */
+! if (!(options & SEARCH_KEEP) && !cmdmod.keeppatterns)
+ {
+ /* search or global command */
+ if (pat_save == RE_SEARCH || pat_save == RE_BOTH)
+*** ../vim-7.4.149/src/testdir/test14.in 2013-04-03 20:59:14.000000000 +0200
+--- src/testdir/test14.in 2014-01-14 15:43:28.000000000 +0100
+***************
+*** 47,52 ****
+--- 47,61 ----
+ /two
+ :call search('.', 'c')
+ :call append(line('$'), getline('.')[col('.') - 1:])
++ :"
++ /^substitute
++ :s/foo/bar/
++ :$put =@/
++ /^substitute
++ :keeppatterns s/asdf/xyz/
++ :$put =@/
++ /^substitute
++ Y:$put =@0
+ :/^search()/,$w >>test.out
+ :qa!
+ ENDTEST
+***************
+*** 81,86 ****
+--- 90,96 ----
+
+ foobar
+
++ substitute foo asdf
+
+ one two
+ search()
+*** ../vim-7.4.149/src/testdir/test14.ok 2013-04-03 20:59:14.000000000 +0200
+--- src/testdir/test14.ok 2014-01-14 15:46:42.000000000 +0100
+***************
+*** 20,22 ****
+--- 20,25 ----
+ 1
+ 1
+ two
++ foo
++ ^substitute
++ substitute bar xyz
+*** ../vim-7.4.149/src/version.c 2014-01-14 15:24:24.000000000 +0100
+--- src/version.c 2014-01-14 15:45:34.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 150,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+158. You get a tuner card so you can watch TV while surfing.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.151 b/patches/source/vim/patches/7.4.151
new file mode 100644
index 000000000..646cc7924
--- /dev/null
+++ b/patches/source/vim/patches/7.4.151
@@ -0,0 +1,1470 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.151
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.151
+Problem: Python: slices with steps are not supported.
+Solution: Support slices in Python vim.List. (ZyX)
+Files: src/eval.c, src/if_py_both.h, src/if_python3.c, src/if_python.c,
+ src/proto/eval.pro, src/testdir/test86.in, src/testdir/test86.ok,
+ src/testdir/test87.in, src/testdir/test87.ok
+
+
+*** ../vim-7.4.150/src/eval.c 2014-01-14 15:24:24.000000000 +0100
+--- src/eval.c 2014-01-14 16:24:49.000000000 +0100
+***************
+*** 6425,6430 ****
+--- 6425,6440 ----
+ if (ni == NULL)
+ return FAIL;
+ copy_tv(tv, &ni->li_tv);
++ list_insert(l, ni, item);
++ return OK;
++ }
++
++ void
++ list_insert(l, ni, item)
++ list_T *l;
++ listitem_T *ni;
++ listitem_T *item;
++ {
+ if (item == NULL)
+ /* Append new item at end of list. */
+ list_append(l, ni);
+***************
+*** 6446,6452 ****
+ item->li_prev = ni;
+ ++l->lv_len;
+ }
+- return OK;
+ }
+
+ /*
+--- 6456,6461 ----
+*** ../vim-7.4.150/src/if_py_both.h 2014-01-10 18:16:00.000000000 +0100
+--- src/if_py_both.h 2014-01-14 16:31:49.000000000 +0100
+***************
+*** 36,43 ****
+ #define PyErr_SET_STRING(exc, str) PyErr_SetString(exc, _(str))
+ #define PyErr_SetVim(str) PyErr_SetString(VimError, str)
+ #define PyErr_SET_VIM(str) PyErr_SET_STRING(VimError, str)
+! #define PyErr_FORMAT(exc, str, tail) PyErr_Format(exc, _(str), tail)
+! #define PyErr_VIM_FORMAT(str, tail) PyErr_FORMAT(VimError, str, tail)
+
+ #define Py_TYPE_NAME(obj) (obj->ob_type->tp_name == NULL \
+ ? "(NULL)" \
+--- 36,44 ----
+ #define PyErr_SET_STRING(exc, str) PyErr_SetString(exc, _(str))
+ #define PyErr_SetVim(str) PyErr_SetString(VimError, str)
+ #define PyErr_SET_VIM(str) PyErr_SET_STRING(VimError, str)
+! #define PyErr_FORMAT(exc, str, arg) PyErr_Format(exc, _(str), arg)
+! #define PyErr_FORMAT2(exc, str, arg1, arg2) PyErr_Format(exc, _(str), arg1,arg2)
+! #define PyErr_VIM_FORMAT(str, arg) PyErr_FORMAT(VimError, str, arg)
+
+ #define Py_TYPE_NAME(obj) (obj->ob_type->tp_name == NULL \
+ ? "(NULL)" \
+***************
+*** 2108,2115 ****
+ };
+
+ static PyTypeObject ListType;
+- static PySequenceMethods ListAsSeq;
+- static PyMappingMethods ListAsMapping;
+
+ typedef struct
+ {
+--- 2109,2114 ----
+***************
+*** 2253,2259 ****
+ }
+
+ static PyObject *
+! ListItem(ListObject *self, Py_ssize_t index)
+ {
+ listitem_T *li;
+
+--- 2252,2258 ----
+ }
+
+ static PyObject *
+! ListIndex(ListObject *self, Py_ssize_t index)
+ {
+ listitem_T *li;
+
+***************
+*** 2273,2436 ****
+ return ConvertToPyObject(&li->li_tv);
+ }
+
+- #define PROC_RANGE \
+- if (last < 0) {\
+- if (last < -size) \
+- last = 0; \
+- else \
+- last += size; \
+- } \
+- if (first < 0) \
+- first = 0; \
+- if (first > size) \
+- first = size; \
+- if (last > size) \
+- last = size;
+-
+ static PyObject *
+! ListSlice(ListObject *self, Py_ssize_t first, Py_ssize_t last)
+ {
+ PyInt i;
+- PyInt size = ListLength(self);
+- PyInt n;
+ PyObject *list;
+- int reversed = 0;
+
+! PROC_RANGE
+! if (first >= last)
+! first = last;
+
+! n = last-first;
+! list = PyList_New(n);
+ if (list == NULL)
+ return NULL;
+
+! for (i = 0; i < n; ++i)
+ {
+! PyObject *item = ListItem(self, first + i);
+ if (item == NULL)
+ {
+ Py_DECREF(list);
+ return NULL;
+ }
+
+! PyList_SET_ITEM(list, ((reversed)?(n-i-1):(i)), item);
+ }
+
+ return list;
+ }
+
+- typedef struct
+- {
+- listwatch_T lw;
+- list_T *list;
+- } listiterinfo_T;
+-
+- static void
+- ListIterDestruct(listiterinfo_T *lii)
+- {
+- list_rem_watch(lii->list, &lii->lw);
+- PyMem_Free(lii);
+- }
+-
+ static PyObject *
+! ListIterNext(listiterinfo_T **lii)
+ {
+! PyObject *ret;
+!
+! if (!((*lii)->lw.lw_item))
+! return NULL;
+!
+! if (!(ret = ConvertToPyObject(&((*lii)->lw.lw_item->li_tv))))
+! return NULL;
+!
+! (*lii)->lw.lw_item = (*lii)->lw.lw_item->li_next;
+!
+! return ret;
+! }
+!
+! static PyObject *
+! ListIter(ListObject *self)
+! {
+! listiterinfo_T *lii;
+! list_T *l = self->list;
+!
+! if (!(lii = PyMem_New(listiterinfo_T, 1)))
+ {
+! PyErr_NoMemory();
+! return NULL;
+ }
+!
+! list_add_watch(l, &lii->lw);
+! lii->lw.lw_item = l->lv_first;
+! lii->list = l;
+!
+! return IterNew(lii,
+! (destructorfun) ListIterDestruct, (nextfun) ListIterNext,
+! NULL, NULL);
+! }
+!
+! static int
+! ListAssItem(ListObject *self, Py_ssize_t index, PyObject *obj)
+! {
+! typval_T tv;
+! list_T *l = self->list;
+! listitem_T *li;
+! Py_ssize_t length = ListLength(self);
+!
+! if (l->lv_lock)
+ {
+! RAISE_LOCKED_LIST;
+! return -1;
+ }
+! if (index > length || (index == length && obj == NULL))
+ {
+! PyErr_SET_STRING(PyExc_IndexError, N_("list index out of range"));
+! return -1;
+! }
+
+! if (obj == NULL)
+ {
+! li = list_find(l, (long) index);
+! list_remove(l, li, li);
+! clear_tv(&li->li_tv);
+! vim_free(li);
+! return 0;
+ }
+
+! if (ConvertFromPyObject(obj, &tv) == -1)
+! return -1;
+!
+! if (index == length)
+ {
+! if (list_append_tv(l, &tv) == FAIL)
+! {
+! clear_tv(&tv);
+! PyErr_SET_VIM(N_("failed to add item to list"));
+! return -1;
+! }
+ }
+! else
+ {
+! li = list_find(l, (long) index);
+! clear_tv(&li->li_tv);
+! copy_tv(&tv, &li->li_tv);
+! clear_tv(&tv);
+ }
+- return 0;
+ }
+
+ static int
+! ListAssSlice(ListObject *self, Py_ssize_t first, Py_ssize_t last, PyObject *obj)
+ {
+- PyInt size = ListLength(self);
+ PyObject *iterator;
+ PyObject *item;
+ listitem_T *li;
+ listitem_T *next;
+ typval_T v;
+ list_T *l = self->list;
+ PyInt i;
+
+ if (l->lv_lock)
+ {
+--- 2272,2381 ----
+ return ConvertToPyObject(&li->li_tv);
+ }
+
+ static PyObject *
+! ListSlice(ListObject *self, Py_ssize_t first, Py_ssize_t step,
+! Py_ssize_t slicelen)
+ {
+ PyInt i;
+ PyObject *list;
+
+! if (step == 0)
+! {
+! PyErr_SET_STRING(PyExc_ValueError, N_("slice step cannot be zero"));
+! return NULL;
+! }
+
+! list = PyList_New(slicelen);
+ if (list == NULL)
+ return NULL;
+
+! for (i = 0; i < slicelen; ++i)
+ {
+! PyObject *item;
+!
+! item = ListIndex(self, first + i*step);
+ if (item == NULL)
+ {
+ Py_DECREF(list);
+ return NULL;
+ }
+
+! PyList_SET_ITEM(list, i, item);
+ }
+
+ return list;
+ }
+
+ static PyObject *
+! ListItem(ListObject *self, PyObject* idx)
+ {
+! #if PY_MAJOR_VERSION < 3
+! if (PyInt_Check(idx))
+ {
+! long _idx = PyInt_AsLong(idx);
+! return ListIndex(self, _idx);
+ }
+! else
+! #endif
+! if (PyLong_Check(idx))
+ {
+! long _idx = PyLong_AsLong(idx);
+! return ListIndex(self, _idx);
+ }
+! else if (PySlice_Check(idx))
+ {
+! Py_ssize_t start, stop, step, slicelen;
+
+! if (PySlice_GetIndicesEx(idx, ListLength(self),
+! &start, &stop, &step, &slicelen) < 0)
+! return NULL;
+! return ListSlice(self, start, step, slicelen);
+! }
+! else
+ {
+! RAISE_INVALID_INDEX_TYPE(idx);
+! return NULL;
+ }
++ }
+
+! static void
+! list_restore(Py_ssize_t numadded, Py_ssize_t numreplaced, Py_ssize_t slicelen,
+! list_T *l, listitem_T **lis, listitem_T *lastaddedli)
+! {
+! while (numreplaced--)
+ {
+! list_insert(l, lis[numreplaced], lis[slicelen + numreplaced]);
+! listitem_remove(l, lis[slicelen + numreplaced]);
+ }
+! while (numadded--)
+ {
+! listitem_T *next;
+!
+! next = lastaddedli->li_prev;
+! listitem_remove(l, lastaddedli);
+! lastaddedli = next;
+ }
+ }
+
+ static int
+! ListAssSlice(ListObject *self, Py_ssize_t first,
+! Py_ssize_t step, Py_ssize_t slicelen, PyObject *obj)
+ {
+ PyObject *iterator;
+ PyObject *item;
+ listitem_T *li;
++ listitem_T *lastaddedli = NULL;
+ listitem_T *next;
+ typval_T v;
+ list_T *l = self->list;
+ PyInt i;
++ PyInt j;
++ PyInt numreplaced = 0;
++ PyInt numadded = 0;
++ PyInt size;
++ listitem_T **lis;
++
++ size = ListLength(self);
+
+ if (l->lv_lock)
+ {
+***************
+*** 2438,2444 ****
+ return -1;
+ }
+
+! PROC_RANGE
+
+ if (first == size)
+ li = NULL;
+--- 2383,2424 ----
+ return -1;
+ }
+
+! if (step == 0)
+! {
+! PyErr_SET_STRING(PyExc_ValueError, N_("slice step cannot be zero"));
+! return -1;
+! }
+!
+! if (step != 1 && slicelen == 0)
+! {
+! /* Nothing to do. Only error out if obj has some items. */
+! int ret = 0;
+!
+! if (obj == NULL)
+! return 0;
+!
+! if (!(iterator = PyObject_GetIter(obj)))
+! return -1;
+!
+! if ((item = PyIter_Next(iterator)))
+! {
+! PyErr_FORMAT(PyExc_ValueError,
+! N_("attempt to assign sequence of size greater then %d "
+! "to extended slice"), 0);
+! Py_DECREF(item);
+! ret = -1;
+! }
+! Py_DECREF(iterator);
+! return ret;
+! }
+!
+! if (obj != NULL)
+! /* XXX May allocate zero bytes. */
+! if (!(lis = PyMem_New(listitem_T *, slicelen * 2)))
+! {
+! PyErr_NoMemory();
+! return -1;
+! }
+
+ if (first == size)
+ li = NULL;
+***************
+*** 2449,2465 ****
+ {
+ PyErr_VIM_FORMAT(N_("internal error: no vim list item %d"),
+ (int)first);
+ return -1;
+ }
+! if (last > first)
+ {
+! i = last - first;
+! while (i-- && li != NULL)
+! {
+! next = li->li_next;
+ listitem_remove(l, li);
+! li = next;
+! }
+ }
+ }
+
+--- 2429,2461 ----
+ {
+ PyErr_VIM_FORMAT(N_("internal error: no vim list item %d"),
+ (int)first);
++ if (obj != NULL)
++ PyMem_Free(lis);
+ return -1;
+ }
+! i = slicelen;
+! while (i-- && li != NULL)
+ {
+! j = step;
+! next = li;
+! if (step > 0)
+! while (next != NULL && ((next = next->li_next) != NULL) && --j);
+! else
+! while (next != NULL && ((next = next->li_prev) != NULL) && ++j);
+!
+! if (obj == NULL)
+ listitem_remove(l, li);
+! else
+! lis[slicelen - i - 1] = li;
+!
+! li = next;
+! }
+! if (li == NULL && i != -1)
+! {
+! PyErr_SET_VIM(N_("internal error: not enough list items"));
+! if (obj != NULL)
+! PyMem_Free(lis);
+! return -1;
+ }
+ }
+
+***************
+*** 2467,2499 ****
+ return 0;
+
+ if (!(iterator = PyObject_GetIter(obj)))
+ return -1;
+
+ while ((item = PyIter_Next(iterator)))
+ {
+ if (ConvertFromPyObject(item, &v) == -1)
+ {
+ Py_DECREF(iterator);
+ Py_DECREF(item);
+ return -1;
+ }
+ Py_DECREF(item);
+! if (list_insert_tv(l, &v, li) == FAIL)
+ {
+ clear_tv(&v);
+ PyErr_SET_VIM(N_("internal error: failed to add item to list"));
+ return -1;
+ }
+ clear_tv(&v);
+ }
+ Py_DECREF(iterator);
+
+ if (PyErr_Occurred())
+ return -1;
+
+ return 0;
+ }
+
+ static PyObject *
+ ListConcatInPlace(ListObject *self, PyObject *obj)
+ {
+--- 2463,2634 ----
+ return 0;
+
+ if (!(iterator = PyObject_GetIter(obj)))
++ {
++ PyMem_Free(lis);
+ return -1;
++ }
+
++ i = 0;
+ while ((item = PyIter_Next(iterator)))
+ {
+ if (ConvertFromPyObject(item, &v) == -1)
+ {
+ Py_DECREF(iterator);
+ Py_DECREF(item);
++ PyMem_Free(lis);
+ return -1;
+ }
+ Py_DECREF(item);
+! if (list_insert_tv(l, &v, numreplaced < slicelen
+! ? lis[numreplaced]
+! : li) == FAIL)
+ {
+ clear_tv(&v);
+ PyErr_SET_VIM(N_("internal error: failed to add item to list"));
++ list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli);
++ PyMem_Free(lis);
+ return -1;
+ }
++ if (numreplaced < slicelen)
++ {
++ lis[slicelen + numreplaced] = lis[numreplaced]->li_prev;
++ list_remove(l, lis[numreplaced], lis[numreplaced]);
++ numreplaced++;
++ }
++ else
++ {
++ if (li)
++ lastaddedli = li->li_prev;
++ else
++ lastaddedli = l->lv_last;
++ numadded++;
++ }
+ clear_tv(&v);
++ if (step != 1 && i >= slicelen)
++ {
++ Py_DECREF(iterator);
++ PyErr_FORMAT(PyExc_ValueError,
++ N_("attempt to assign sequence of size greater then %d "
++ "to extended slice"), slicelen);
++ list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli);
++ PyMem_Free(lis);
++ return -1;
++ }
++ ++i;
+ }
+ Py_DECREF(iterator);
+
++ if (step != 1 && i != slicelen)
++ {
++ PyErr_FORMAT2(PyExc_ValueError,
++ N_("attempt to assign sequence of size %d to extended slice "
++ "of size %d"), i, slicelen);
++ list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli);
++ PyMem_Free(lis);
++ return -1;
++ }
++
+ if (PyErr_Occurred())
++ {
++ list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli);
++ PyMem_Free(lis);
+ return -1;
++ }
++
++ for (i = 0; i < numreplaced; i++)
++ listitem_free(lis[i]);
++ if (step == 1)
++ for (i = numreplaced; i < slicelen; i++)
++ listitem_remove(l, lis[i]);
++
++ PyMem_Free(lis);
+
+ return 0;
+ }
+
++ static int
++ ListAssIndex(ListObject *self, Py_ssize_t index, PyObject *obj)
++ {
++ typval_T tv;
++ list_T *l = self->list;
++ listitem_T *li;
++ Py_ssize_t length = ListLength(self);
++
++ if (l->lv_lock)
++ {
++ RAISE_LOCKED_LIST;
++ return -1;
++ }
++ if (index > length || (index == length && obj == NULL))
++ {
++ PyErr_SET_STRING(PyExc_IndexError, N_("list index out of range"));
++ return -1;
++ }
++
++ if (obj == NULL)
++ {
++ li = list_find(l, (long) index);
++ list_remove(l, li, li);
++ clear_tv(&li->li_tv);
++ vim_free(li);
++ return 0;
++ }
++
++ if (ConvertFromPyObject(obj, &tv) == -1)
++ return -1;
++
++ if (index == length)
++ {
++ if (list_append_tv(l, &tv) == FAIL)
++ {
++ clear_tv(&tv);
++ PyErr_SET_VIM(N_("failed to add item to list"));
++ return -1;
++ }
++ }
++ else
++ {
++ li = list_find(l, (long) index);
++ clear_tv(&li->li_tv);
++ copy_tv(&tv, &li->li_tv);
++ clear_tv(&tv);
++ }
++ return 0;
++ }
++
++ static Py_ssize_t
++ ListAssItem(ListObject *self, PyObject *idx, PyObject *obj)
++ {
++ #if PY_MAJOR_VERSION < 3
++ if (PyInt_Check(idx))
++ {
++ long _idx = PyInt_AsLong(idx);
++ return ListAssIndex(self, _idx, obj);
++ }
++ else
++ #endif
++ if (PyLong_Check(idx))
++ {
++ long _idx = PyLong_AsLong(idx);
++ return ListAssIndex(self, _idx, obj);
++ }
++ else if (PySlice_Check(idx))
++ {
++ Py_ssize_t start, stop, step, slicelen;
++
++ if (PySlice_GetIndicesEx(idx, ListLength(self),
++ &start, &stop, &step, &slicelen) < 0)
++ return -1;
++ return ListAssSlice(self, start, step, slicelen,
++ obj);
++ }
++ else
++ {
++ RAISE_INVALID_INDEX_TYPE(idx);
++ return -1;
++ }
++ }
++
+ static PyObject *
+ ListConcatInPlace(ListObject *self, PyObject *obj)
+ {
+***************
+*** 2520,2525 ****
+--- 2655,2710 ----
+ return (PyObject *)(self);
+ }
+
++ typedef struct
++ {
++ listwatch_T lw;
++ list_T *list;
++ } listiterinfo_T;
++
++ static void
++ ListIterDestruct(listiterinfo_T *lii)
++ {
++ list_rem_watch(lii->list, &lii->lw);
++ PyMem_Free(lii);
++ }
++
++ static PyObject *
++ ListIterNext(listiterinfo_T **lii)
++ {
++ PyObject *ret;
++
++ if (!((*lii)->lw.lw_item))
++ return NULL;
++
++ if (!(ret = ConvertToPyObject(&((*lii)->lw.lw_item->li_tv))))
++ return NULL;
++
++ (*lii)->lw.lw_item = (*lii)->lw.lw_item->li_next;
++
++ return ret;
++ }
++
++ static PyObject *
++ ListIter(ListObject *self)
++ {
++ listiterinfo_T *lii;
++ list_T *l = self->list;
++
++ if (!(lii = PyMem_New(listiterinfo_T, 1)))
++ {
++ PyErr_NoMemory();
++ return NULL;
++ }
++
++ list_add_watch(l, &lii->lw);
++ lii->lw.lw_item = l->lv_first;
++ lii->list = l;
++
++ return IterNew(lii,
++ (destructorfun) ListIterDestruct, (nextfun) ListIterNext,
++ NULL, NULL);
++ }
++
+ static char *ListAttrs[] = {
+ "locked",
+ NULL
+***************
+*** 2567,2572 ****
+--- 2752,2776 ----
+ }
+ }
+
++ static PySequenceMethods ListAsSeq = {
++ (lenfunc) ListLength, /* sq_length, len(x) */
++ (binaryfunc) 0, /* RangeConcat, sq_concat, x+y */
++ 0, /* RangeRepeat, sq_repeat, x*n */
++ (PyIntArgFunc) ListIndex, /* sq_item, x[i] */
++ 0, /* was_sq_slice, x[i:j] */
++ (PyIntObjArgProc) ListAssIndex, /* sq_as_item, x[i]=v */
++ 0, /* was_sq_ass_slice, x[i:j]=v */
++ 0, /* sq_contains */
++ (binaryfunc) ListConcatInPlace,/* sq_inplace_concat */
++ 0, /* sq_inplace_repeat */
++ };
++
++ static PyMappingMethods ListAsMapping = {
++ /* mp_length */ (lenfunc) ListLength,
++ /* mp_subscript */ (binaryfunc) ListItem,
++ /* mp_ass_subscript */ (objobjargproc) ListAssItem,
++ };
++
+ static struct PyMethodDef ListMethods[] = {
+ {"extend", (PyCFunction)ListConcatInPlace, METH_O, ""},
+ {"__dir__", (PyCFunction)ListDir, METH_NOARGS, ""},
+*** ../vim-7.4.150/src/if_python3.c 2013-11-03 00:28:20.000000000 +0100
+--- src/if_python3.c 2014-01-14 16:32:40.000000000 +0100
+***************
+*** 97,102 ****
+--- 97,105 ----
+ #define Py_ssize_t_fmt "n"
+ #define Py_bytes_fmt "y"
+
++ #define PyIntArgFunc ssizeargfunc
++ #define PyIntObjArgProc ssizeobjargproc
++
+ #if defined(DYNAMIC_PYTHON3) || defined(PROTO)
+
+ # ifndef WIN3264
+***************
+*** 292,298 ****
+ static int (*py3_PyMapping_Check)(PyObject *);
+ static PyObject* (*py3_PyMapping_Keys)(PyObject *);
+ static int (*py3_PySlice_GetIndicesEx)(PyObject *r, Py_ssize_t length,
+! Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step, Py_ssize_t *slicelength);
+ static PyObject* (*py3_PyErr_NoMemory)(void);
+ static void (*py3_Py_Finalize)(void);
+ static void (*py3_PyErr_SetString)(PyObject *, const char *);
+--- 295,302 ----
+ static int (*py3_PyMapping_Check)(PyObject *);
+ static PyObject* (*py3_PyMapping_Keys)(PyObject *);
+ static int (*py3_PySlice_GetIndicesEx)(PyObject *r, Py_ssize_t length,
+! Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step,
+! Py_ssize_t *slicelen);
+ static PyObject* (*py3_PyErr_NoMemory)(void);
+ static void (*py3_Py_Finalize)(void);
+ static void (*py3_PyErr_SetString)(PyObject *, const char *);
+***************
+*** 1478,1553 ****
+ /* List object - Definitions
+ */
+
+- static PySequenceMethods ListAsSeq = {
+- (lenfunc) ListLength, /* sq_length, len(x) */
+- (binaryfunc) 0, /* RangeConcat, sq_concat, x+y */
+- (ssizeargfunc) 0, /* RangeRepeat, sq_repeat, x*n */
+- (ssizeargfunc) ListItem, /* sq_item, x[i] */
+- (void *) 0, /* was_sq_slice, x[i:j] */
+- (ssizeobjargproc) ListAssItem, /* sq_as_item, x[i]=v */
+- (void *) 0, /* was_sq_ass_slice, x[i:j]=v */
+- 0, /* sq_contains */
+- (binaryfunc) ListConcatInPlace,/* sq_inplace_concat */
+- 0, /* sq_inplace_repeat */
+- };
+-
+- static PyObject *ListSubscript(PyObject *, PyObject *);
+- static Py_ssize_t ListAsSubscript(PyObject *, PyObject *, PyObject *);
+-
+- static PyMappingMethods ListAsMapping = {
+- /* mp_length */ (lenfunc) ListLength,
+- /* mp_subscript */ (binaryfunc) ListSubscript,
+- /* mp_ass_subscript */ (objobjargproc) ListAsSubscript,
+- };
+-
+- static PyObject *
+- ListSubscript(PyObject *self, PyObject* idx)
+- {
+- if (PyLong_Check(idx))
+- {
+- long _idx = PyLong_AsLong(idx);
+- return ListItem((ListObject *)(self), _idx);
+- }
+- else if (PySlice_Check(idx))
+- {
+- Py_ssize_t start, stop, step, slicelen;
+-
+- if (PySlice_GetIndicesEx(idx, ListLength((ListObject *)(self)),
+- &start, &stop, &step, &slicelen) < 0)
+- return NULL;
+- return ListSlice((ListObject *)(self), start, stop);
+- }
+- else
+- {
+- RAISE_INVALID_INDEX_TYPE(idx);
+- return NULL;
+- }
+- }
+-
+- static Py_ssize_t
+- ListAsSubscript(PyObject *self, PyObject *idx, PyObject *obj)
+- {
+- if (PyLong_Check(idx))
+- {
+- long _idx = PyLong_AsLong(idx);
+- return ListAssItem((ListObject *)(self), _idx, obj);
+- }
+- else if (PySlice_Check(idx))
+- {
+- Py_ssize_t start, stop, step, slicelen;
+-
+- if (PySlice_GetIndicesEx(idx, ListLength((ListObject *)(self)),
+- &start, &stop, &step, &slicelen) < 0)
+- return -1;
+- return ListAssSlice((ListObject *)(self), start, stop, obj);
+- }
+- else
+- {
+- RAISE_INVALID_INDEX_TYPE(idx);
+- return -1;
+- }
+- }
+-
+ static PyObject *
+ ListGetattro(PyObject *self, PyObject *nameobj)
+ {
+--- 1482,1487 ----
+*** ../vim-7.4.150/src/if_python.c 2013-11-03 00:28:20.000000000 +0100
+--- src/if_python.c 2014-01-14 16:24:49.000000000 +0100
+***************
+*** 196,201 ****
+--- 196,202 ----
+ # define PyTuple_Size dll_PyTuple_Size
+ # define PyTuple_GetItem dll_PyTuple_GetItem
+ # define PyTuple_Type (*dll_PyTuple_Type)
++ # define PySlice_GetIndicesEx dll_PySlice_GetIndicesEx
+ # define PyImport_ImportModule dll_PyImport_ImportModule
+ # define PyDict_New dll_PyDict_New
+ # define PyDict_GetItemString dll_PyDict_GetItemString
+***************
+*** 241,246 ****
+--- 242,248 ----
+ # define PySys_GetObject dll_PySys_GetObject
+ # define PySys_SetArgv dll_PySys_SetArgv
+ # define PyType_Type (*dll_PyType_Type)
++ # define PySlice_Type (*dll_PySlice_Type)
+ # define PyType_Ready (*dll_PyType_Ready)
+ # define PyType_GenericAlloc dll_PyType_GenericAlloc
+ # define Py_BuildValue dll_Py_BuildValue
+***************
+*** 341,346 ****
+--- 343,351 ----
+ static PyInt(*dll_PyTuple_Size)(PyObject *);
+ static PyObject*(*dll_PyTuple_GetItem)(PyObject *, PyInt);
+ static PyTypeObject* dll_PyTuple_Type;
++ static int (*dll_PySlice_GetIndicesEx)(PyObject *r, PyInt length,
++ PyInt *start, PyInt *stop, PyInt *step,
++ PyInt *slicelen);
+ static PyObject*(*dll_PyImport_ImportModule)(const char *);
+ static PyObject*(*dll_PyDict_New)(void);
+ static PyObject*(*dll_PyDict_GetItemString)(PyObject *, const char *);
+***************
+*** 382,387 ****
+--- 387,393 ----
+ static PyObject *(*dll_PySys_GetObject)(char *);
+ static int(*dll_PySys_SetArgv)(int, char **);
+ static PyTypeObject* dll_PyType_Type;
++ static PyTypeObject* dll_PySlice_Type;
+ static int (*dll_PyType_Ready)(PyTypeObject *type);
+ static PyObject* (*dll_PyType_GenericAlloc)(PyTypeObject *type, PyInt nitems);
+ static PyObject*(*dll_Py_BuildValue)(char *, ...);
+***************
+*** 521,526 ****
+--- 527,533 ----
+ {"PyTuple_GetItem", (PYTHON_PROC*)&dll_PyTuple_GetItem},
+ {"PyTuple_Size", (PYTHON_PROC*)&dll_PyTuple_Size},
+ {"PyTuple_Type", (PYTHON_PROC*)&dll_PyTuple_Type},
++ {"PySlice_GetIndicesEx", (PYTHON_PROC*)&dll_PySlice_GetIndicesEx},
+ {"PyImport_ImportModule", (PYTHON_PROC*)&dll_PyImport_ImportModule},
+ {"PyDict_GetItemString", (PYTHON_PROC*)&dll_PyDict_GetItemString},
+ {"PyDict_Next", (PYTHON_PROC*)&dll_PyDict_Next},
+***************
+*** 562,567 ****
+--- 569,575 ----
+ {"PySys_GetObject", (PYTHON_PROC*)&dll_PySys_GetObject},
+ {"PySys_SetArgv", (PYTHON_PROC*)&dll_PySys_SetArgv},
+ {"PyType_Type", (PYTHON_PROC*)&dll_PyType_Type},
++ {"PySlice_Type", (PYTHON_PROC*)&dll_PySlice_Type},
+ {"PyType_Ready", (PYTHON_PROC*)&dll_PyType_Ready},
+ {"PyType_GenericAlloc", (PYTHON_PROC*)&dll_PyType_GenericAlloc},
+ {"Py_FindMethod", (PYTHON_PROC*)&dll_Py_FindMethod},
+***************
+*** 1472,1492 ****
+ return Py_FindMethod(DictionaryMethods, self, name);
+ }
+
+- static PySequenceMethods ListAsSeq = {
+- (PyInquiry) ListLength,
+- (binaryfunc) 0,
+- (PyIntArgFunc) 0,
+- (PyIntArgFunc) ListItem,
+- (PyIntIntArgFunc) ListSlice,
+- (PyIntObjArgProc) ListAssItem,
+- (PyIntIntObjArgProc) ListAssSlice,
+- (objobjproc) 0,
+- #if PY_MAJOR_VERSION >= 2
+- (binaryfunc) ListConcatInPlace,
+- 0,
+- #endif
+- };
+-
+ static PyObject *
+ ListGetattr(PyObject *self, char *name)
+ {
+--- 1480,1485 ----
+*** ../vim-7.4.150/src/proto/eval.pro 2013-08-10 13:37:09.000000000 +0200
+--- src/proto/eval.pro 2014-01-14 16:24:49.000000000 +0100
+***************
+*** 60,65 ****
+--- 60,66 ----
+ int list_append_string __ARGS((list_T *l, char_u *str, int len));
+ int list_insert_tv __ARGS((list_T *l, typval_T *tv, listitem_T *item));
+ void list_remove __ARGS((list_T *l, listitem_T *item, listitem_T *item2));
++ void list_insert __ARGS((list_T *l, listitem_T *ni, listitem_T *item));
+ int garbage_collect __ARGS((void));
+ void set_ref_in_ht __ARGS((hashtab_T *ht, int copyID));
+ void set_ref_in_list __ARGS((list_T *l, int copyID));
+*** ../vim-7.4.150/src/testdir/test86.in 2013-11-28 17:04:38.000000000 +0100
+--- src/testdir/test86.in 2014-01-14 16:24:49.000000000 +0100
+***************
+*** 135,140 ****
+--- 135,152 ----
+ :py l=vim.bindeval('l')
+ :py del l[-6:2]
+ :$put =string(l)
++ :let l = [0, 1, 2, 3]
++ :py l=vim.bindeval('l')
++ :py del l[::2]
++ :$put =string(l)
++ :let l = [0, 1, 2, 3]
++ :py l=vim.bindeval('l')
++ :py del l[3:0:-2]
++ :$put =string(l)
++ :let l = [0, 1, 2, 3]
++ :py l=vim.bindeval('l')
++ :py del l[2:4:-2]
++ :$put =string(l)
+ :"
+ :" Slice assignment to a list
+ :let l = [0, 1, 2, 3]
+***************
+*** 169,174 ****
+--- 181,206 ----
+ :py l=vim.bindeval('l')
+ :py l[0:0]=['h']
+ :$put =string(l)
++ :let l = range(8)
++ :py l=vim.bindeval('l')
++ :py l[2:6:2] = [10, 20]
++ :$put =string(l)
++ :let l = range(8)
++ :py l=vim.bindeval('l')
++ :py l[6:2:-2] = [10, 20]
++ :$put =string(l)
++ :let l = range(8)
++ :py l=vim.bindeval('l')
++ :py l[6:2] = ()
++ :$put =string(l)
++ :let l = range(8)
++ :py l=vim.bindeval('l')
++ :py l[6:2:1] = ()
++ :$put =string(l)
++ :let l = range(8)
++ :py l=vim.bindeval('l')
++ :py l[2:2:1] = ()
++ :$put =string(l)
+ :"
+ :" Locked variables
+ :let l = [0, 1, 2, 3]
+***************
+*** 390,395 ****
+--- 422,434 ----
+ :$put =string(pyeval('l'))
+ :py l = ll[-10:10]
+ :$put =string(pyeval('l'))
++ :py l = ll[4:2:-1]
++ :$put =string(pyeval('l'))
++ :py l = ll[::2]
++ :$put =string(pyeval('l'))
++ :py l = ll[4:2:1]
++ :$put =string(pyeval('l'))
++ :py del l
+ :"
+ :" Vars
+ :let g:foo = 'bac'
+***************
+*** 907,912 ****
+--- 946,952 ----
+ l = vim.List()
+ ll = vim.List('abcE')
+ ll.locked = True
++ nel = vim.List('abcO')
+ f = vim.Function('string')
+ fd = vim.Function('F')
+ fdel = vim.Function('D')
+***************
+*** 994,999 ****
+--- 1034,1053 ----
+ def next(self):
+ raise NotImplementedError('next')
+
++ class FailingIterNextN(object):
++ def __init__(self, n):
++ self.n = n
++
++ def __iter__(self):
++ return self
++
++ def next(self):
++ if self.n:
++ self.n -= 1
++ return 1
++ else:
++ raise NotImplementedError('next N')
++
+ class FailingMappingKey(object):
+ def __getitem__(self, item):
+ raise NotImplementedError('getitem:mappingkey')
+***************
+*** 1098,1103 ****
+--- 1152,1158 ----
+ cb.append(">>> iter")
+ ee('d.update(FailingMapping())')
+ ee('d.update([FailingIterNext()])')
++ ee('d.update([FailingIterNextN(1)])')
+ iter_test('d.update(%s)')
+ convertfrompyobject_test('d.update(%s)')
+ stringtochars_test('d.update(((%s, 0),))')
+***************
+*** 1120,1125 ****
+--- 1175,1188 ----
+ cb.append(">> ListAssSlice")
+ ee('ll[1:100] = "abcJ"')
+ iter_test('l[:] = %s')
++ ee('nel[1:10:2] = "abcK"')
++ cb.append(repr(tuple(nel)))
++ ee('nel[1:10:2] = "a"')
++ cb.append(repr(tuple(nel)))
++ ee('nel[1:1:-1] = "a"')
++ cb.append(repr(tuple(nel)))
++ ee('nel[:] = FailingIterNextN(2)')
++ cb.append(repr(tuple(nel)))
+ convertfrompyobject_test('l[:] = [%s]')
+ cb.append(">> ListConcatInPlace")
+ iter_test('l.extend(%s)')
+***************
+*** 1201,1206 ****
+--- 1264,1270 ----
+ del dl
+ del l
+ del ll
++ del nel
+ del f
+ del fd
+ del fdel
+***************
+*** 1214,1219 ****
+--- 1278,1284 ----
+ del FailingTrue
+ del FailingIter
+ del FailingIterNext
++ del FailingIterNextN
+ del FailingMapping
+ del FailingMappingKey
+ del FailingList
+*** ../vim-7.4.150/src/testdir/test86.ok 2013-11-28 17:04:38.000000000 +0100
+--- src/testdir/test86.ok 2014-01-14 16:24:49.000000000 +0100
+***************
+*** 41,46 ****
+--- 41,49 ----
+ [2, 3]
+ [2, 3]
+ [2, 3]
++ [1, 3]
++ [0, 2]
++ [0, 1, 2, 3]
+ ['a', 0, 1, 2, 3]
+ [0, 'b', 2, 3]
+ [0, 1, 'c']
+***************
+*** 49,54 ****
+--- 52,62 ----
+ ['f', 2, 3]
+ [0, 1, 'g', 2, 3]
+ ['h']
++ [0, 1, 10, 3, 20, 5, 6, 7]
++ [0, 1, 2, 3, 20, 5, 10, 7]
++ [0, 1, 2, 3, 4, 5, 6, 7]
++ [0, 1, 2, 3, 4, 5, 6, 7]
++ [0, 1, 2, 3, 4, 5, 6, 7]
+ [0, 1, 2, 3]
+ [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd']
+ [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}]
+***************
+*** 96,101 ****
+--- 104,112 ----
+ [0, 1, 2, 3, 4, 5]
+ [0, 1, 2, 3, 4, 5]
+ [0, 1, 2, 3, 4, 5]
++ [4, 3]
++ [0, 2, 4]
++ []
+ Abc
+ bac
+ def
+***************
+*** 599,604 ****
+--- 610,616 ----
+ >>> iter
+ d.update(FailingMapping()):NotImplementedError:('keys',)
+ d.update([FailingIterNext()]):NotImplementedError:('next',)
++ d.update([FailingIterNextN(1)]):NotImplementedError:('next N',)
+ >>> Testing *Iter* using d.update(%s)
+ d.update(FailingIter()):NotImplementedError:('iter',)
+ d.update(FailingIterNext()):NotImplementedError:('next',)
+***************
+*** 829,834 ****
+--- 841,854 ----
+ l[:] = FailingIter():NotImplementedError:('iter',)
+ l[:] = FailingIterNext():NotImplementedError:('next',)
+ <<< Finished
++ nel[1:10:2] = "abcK":ValueError:('attempt to assign sequence of size greater then 2 to extended slice',)
++ ('a', 'b', 'c', 'O')
++ nel[1:10:2] = "a":ValueError:('attempt to assign sequence of size 1 to extended slice of size 2',)
++ ('a', 'b', 'c', 'O')
++ nel[1:1:-1] = "a":ValueError:('attempt to assign sequence of size greater then 0 to extended slice',)
++ ('a', 'b', 'c', 'O')
++ nel[:] = FailingIterNextN(2):NotImplementedError:('next N',)
++ ('a', 'b', 'c', 'O')
+ >>> Testing StringToChars using l[:] = [{%s : 1}]
+ l[:] = [{1 : 1}]:TypeError:('expected str() or unicode() instance, but got int',)
+ l[:] = [{u"\0" : 1}]:TypeError:('expected string without null bytes',)
+*** ../vim-7.4.150/src/testdir/test87.in 2013-11-28 17:04:38.000000000 +0100
+--- src/testdir/test87.in 2014-01-14 16:24:49.000000000 +0100
+***************
+*** 128,133 ****
+--- 128,145 ----
+ :py3 l=vim.bindeval('l')
+ :py3 del l[-6:2]
+ :$put =string(l)
++ :let l = [0, 1, 2, 3]
++ :py3 l=vim.bindeval('l')
++ :py3 del l[::2]
++ :$put =string(l)
++ :let l = [0, 1, 2, 3]
++ :py3 l=vim.bindeval('l')
++ :py3 del l[3:0:-2]
++ :$put =string(l)
++ :let l = [0, 1, 2, 3]
++ :py3 l=vim.bindeval('l')
++ :py3 del l[2:4:-2]
++ :$put =string(l)
+ :"
+ :" Slice assignment to a list
+ :let l = [0, 1, 2, 3]
+***************
+*** 162,167 ****
+--- 174,199 ----
+ :py3 l=vim.bindeval('l')
+ :py3 l[0:0]=['h']
+ :$put =string(l)
++ :let l = range(8)
++ :py3 l=vim.bindeval('l')
++ :py3 l[2:6:2] = [10, 20]
++ :$put =string(l)
++ :let l = range(8)
++ :py3 l=vim.bindeval('l')
++ :py3 l[6:2:-2] = [10, 20]
++ :$put =string(l)
++ :let l = range(8)
++ :py3 l=vim.bindeval('l')
++ :py3 l[6:2] = ()
++ :$put =string(l)
++ :let l = range(8)
++ :py3 l=vim.bindeval('l')
++ :py3 l[6:2:1] = ()
++ :$put =string(l)
++ :let l = range(8)
++ :py3 l=vim.bindeval('l')
++ :py3 l[2:2:1] = ()
++ :$put =string(l)
+ :"
+ :" Locked variables
+ :let l = [0, 1, 2, 3]
+***************
+*** 363,368 ****
+--- 395,432 ----
+ :py3 del trace_main
+ :$put =string(l)
+ :"
++ :" Slice
++ :py3 ll = vim.bindeval('[0, 1, 2, 3, 4, 5]')
++ :py3 l = ll[:4]
++ :$put =string(py3eval('l'))
++ :py3 l = ll[2:]
++ :$put =string(py3eval('l'))
++ :py3 l = ll[:-4]
++ :$put =string(py3eval('l'))
++ :py3 l = ll[-2:]
++ :$put =string(py3eval('l'))
++ :py3 l = ll[2:4]
++ :$put =string(py3eval('l'))
++ :py3 l = ll[4:2]
++ :$put =string(py3eval('l'))
++ :py3 l = ll[-4:-2]
++ :$put =string(py3eval('l'))
++ :py3 l = ll[-2:-4]
++ :$put =string(py3eval('l'))
++ :py3 l = ll[:]
++ :$put =string(py3eval('l'))
++ :py3 l = ll[0:6]
++ :$put =string(py3eval('l'))
++ :py3 l = ll[-10:10]
++ :$put =string(py3eval('l'))
++ :py3 l = ll[4:2:-1]
++ :$put =string(py3eval('l'))
++ :py3 l = ll[::2]
++ :$put =string(py3eval('l'))
++ :py3 l = ll[4:2:1]
++ :$put =string(py3eval('l'))
++ :py3 del l
++ :"
+ :" Vars
+ :let g:foo = 'bac'
+ :let w:abc3 = 'def'
+***************
+*** 859,864 ****
+--- 923,929 ----
+ l = vim.List()
+ ll = vim.List('abcE')
+ ll.locked = True
++ nel = vim.List('abcO')
+ f = vim.Function('string')
+ fd = vim.Function('F')
+ fdel = vim.Function('D')
+***************
+*** 946,951 ****
+--- 1011,1030 ----
+ def __next__(self):
+ raise NotImplementedError('next')
+
++ class FailingIterNextN(object):
++ def __init__(self, n):
++ self.n = n
++
++ def __iter__(self):
++ return self
++
++ def __next__(self):
++ if self.n:
++ self.n -= 1
++ return 1
++ else:
++ raise NotImplementedError('next N')
++
+ class FailingMappingKey(object):
+ def __getitem__(self, item):
+ raise NotImplementedError('getitem:mappingkey')
+***************
+*** 1050,1055 ****
+--- 1129,1135 ----
+ cb.append(">>> iter")
+ ee('d.update(FailingMapping())')
+ ee('d.update([FailingIterNext()])')
++ ee('d.update([FailingIterNextN(1)])')
+ iter_test('d.update(%s)')
+ convertfrompyobject_test('d.update(%s)')
+ stringtochars_test('d.update(((%s, 0),))')
+***************
+*** 1072,1077 ****
+--- 1152,1165 ----
+ cb.append(">> ListAssSlice")
+ ee('ll[1:100] = "abcJ"')
+ iter_test('l[:] = %s')
++ ee('nel[1:10:2] = "abcK"')
++ cb.append(repr(tuple(nel)))
++ ee('nel[1:10:2] = "a"')
++ cb.append(repr(tuple(nel)))
++ ee('nel[1:1:-1] = "a"')
++ cb.append(repr(tuple(nel)))
++ ee('nel[:] = FailingIterNextN(2)')
++ cb.append(repr(tuple(nel)))
+ convertfrompyobject_test('l[:] = [%s]')
+ cb.append(">> ListConcatInPlace")
+ iter_test('l.extend(%s)')
+***************
+*** 1153,1158 ****
+--- 1241,1247 ----
+ del dl
+ del l
+ del ll
++ del nel
+ del f
+ del fd
+ del fdel
+***************
+*** 1166,1171 ****
+--- 1255,1261 ----
+ del FailingTrue
+ del FailingIter
+ del FailingIterNext
++ del FailingIterNextN
+ del FailingMapping
+ del FailingMappingKey
+ del FailingList
+*** ../vim-7.4.150/src/testdir/test87.ok 2013-11-28 17:04:38.000000000 +0100
+--- src/testdir/test87.ok 2014-01-14 16:24:49.000000000 +0100
+***************
+*** 41,46 ****
+--- 41,49 ----
+ [2, 3]
+ [2, 3]
+ [2, 3]
++ [1, 3]
++ [0, 2]
++ [0, 1, 2, 3]
+ ['a', 0, 1, 2, 3]
+ [0, 'b', 2, 3]
+ [0, 1, 'c']
+***************
+*** 49,54 ****
+--- 52,62 ----
+ ['f', 2, 3]
+ [0, 1, 'g', 2, 3]
+ ['h']
++ [0, 1, 10, 3, 20, 5, 6, 7]
++ [0, 1, 2, 3, 20, 5, 10, 7]
++ [0, 1, 2, 3, 4, 5, 6, 7]
++ [0, 1, 2, 3, 4, 5, 6, 7]
++ [0, 1, 2, 3, 4, 5, 6, 7]
+ [0, 1, 2, 3]
+ [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd']
+ [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}]
+***************
+*** 85,90 ****
+--- 93,112 ----
+ vim: Vim(let):E859:
+ [1]
+ [1, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 1]
++ [0, 1, 2, 3]
++ [2, 3, 4, 5]
++ [0, 1]
++ [4, 5]
++ [2, 3]
++ []
++ [2, 3]
++ []
++ [0, 1, 2, 3, 4, 5]
++ [0, 1, 2, 3, 4, 5]
++ [0, 1, 2, 3, 4, 5]
++ [4, 3]
++ [0, 2, 4]
++ []
+ Abc
+ bac
+ def
+***************
+*** 588,593 ****
+--- 610,616 ----
+ >>> iter
+ d.update(FailingMapping()):(<class 'NotImplementedError'>, NotImplementedError('keys',))
+ d.update([FailingIterNext()]):(<class 'NotImplementedError'>, NotImplementedError('next',))
++ d.update([FailingIterNextN(1)]):(<class 'NotImplementedError'>, NotImplementedError('next N',))
+ >>> Testing *Iter* using d.update(%s)
+ d.update(FailingIter()):(<class 'NotImplementedError'>, NotImplementedError('iter',))
+ d.update(FailingIterNext()):(<class 'NotImplementedError'>, NotImplementedError('next',))
+***************
+*** 818,823 ****
+--- 841,854 ----
+ l[:] = FailingIter():(<class 'NotImplementedError'>, NotImplementedError('iter',))
+ l[:] = FailingIterNext():(<class 'NotImplementedError'>, NotImplementedError('next',))
+ <<< Finished
++ nel[1:10:2] = "abcK":(<class 'ValueError'>, ValueError('attempt to assign sequence of size greater then 2 to extended slice',))
++ (b'a', b'b', b'c', b'O')
++ nel[1:10:2] = "a":(<class 'ValueError'>, ValueError('attempt to assign sequence of size 1 to extended slice of size 2',))
++ (b'a', b'b', b'c', b'O')
++ nel[1:1:-1] = "a":(<class 'ValueError'>, ValueError('attempt to assign sequence of size greater then 0 to extended slice',))
++ (b'a', b'b', b'c', b'O')
++ nel[:] = FailingIterNextN(2):(<class 'NotImplementedError'>, NotImplementedError('next N',))
++ (b'a', b'b', b'c', b'O')
+ >>> Testing StringToChars using l[:] = [{%s : 1}]
+ l[:] = [{1 : 1}]:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
+ l[:] = [{b"\0" : 1}]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
+*** ../vim-7.4.150/src/version.c 2014-01-14 15:53:47.000000000 +0100
+--- src/version.c 2014-01-14 16:27:01.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 151,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+159. You get excited whenever discussing your hard drive.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.152 b/patches/source/vim/patches/7.4.152
new file mode 100644
index 000000000..6e54ddb9c
--- /dev/null
+++ b/patches/source/vim/patches/7.4.152
@@ -0,0 +1,708 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.152
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.152
+Problem: Python: Cannot iterate over options.
+Solution: Add options iterator. (ZyX)
+Files: src/if_py_both.h, src/option.c, src/proto/option.pro,
+ src/testdir/test86.in, src/testdir/test86.ok,
+ src/testdir/test87.in, src/testdir/test87.ok, src/vim.h
+
+
+*** ../vim-7.4.151/src/if_py_both.h 2014-01-14 16:36:40.000000000 +0100
+--- src/if_py_both.h 2014-01-14 16:51:30.000000000 +0100
+***************
+*** 2949,2958 ****
+ typedef struct
+ {
+ PyObject_HEAD
+! int opt_type;
+! void *from;
+! checkfun Check;
+! PyObject *fromObj;
+ } OptionsObject;
+
+ static int
+--- 2949,2958 ----
+ typedef struct
+ {
+ PyObject_HEAD
+! int opt_type;
+! void *from;
+! checkfun Check;
+! PyObject *fromObj;
+ } OptionsObject;
+
+ static int
+***************
+*** 3072,3077 ****
+--- 3072,3140 ----
+ }
+
+ static int
++ OptionsContains(OptionsObject *self, PyObject *keyObject)
++ {
++ char_u *key;
++ PyObject *todecref;
++
++ if (!(key = StringToChars(keyObject, &todecref)))
++ return -1;
++
++ if (*key == NUL)
++ {
++ Py_XDECREF(todecref);
++ return 0;
++ }
++
++ if (get_option_value_strict(key, NULL, NULL, self->opt_type, NULL))
++ {
++ Py_XDECREF(todecref);
++ return 1;
++ }
++ else
++ {
++ Py_XDECREF(todecref);
++ return 0;
++ }
++ }
++
++ typedef struct
++ {
++ void *lastoption;
++ int opt_type;
++ } optiterinfo_T;
++
++ static PyObject *
++ OptionsIterNext(optiterinfo_T **oii)
++ {
++ char_u *name;
++
++ if ((name = option_iter_next(&((*oii)->lastoption), (*oii)->opt_type)))
++ return PyString_FromString((char *)name);
++
++ return NULL;
++ }
++
++ static PyObject *
++ OptionsIter(OptionsObject *self)
++ {
++ optiterinfo_T *oii;
++
++ if (!(oii = PyMem_New(optiterinfo_T, 1)))
++ {
++ PyErr_NoMemory();
++ return NULL;
++ }
++
++ oii->opt_type = self->opt_type;
++ oii->lastoption = NULL;
++
++ return IterNew(oii,
++ (destructorfun) PyMem_Free, (nextfun) OptionsIterNext,
++ NULL, NULL);
++ }
++
++ static int
+ set_option_value_err(char_u *key, int numval, char_u *stringval, int opt_flags)
+ {
+ char_u *errmsg;
+***************
+*** 3231,3236 ****
+--- 3294,3312 ----
+ return ret;
+ }
+
++ static PySequenceMethods OptionsAsSeq = {
++ 0, /* sq_length */
++ 0, /* sq_concat */
++ 0, /* sq_repeat */
++ 0, /* sq_item */
++ 0, /* sq_slice */
++ 0, /* sq_ass_item */
++ 0, /* sq_ass_slice */
++ (objobjproc) OptionsContains, /* sq_contains */
++ 0, /* sq_inplace_concat */
++ 0, /* sq_inplace_repeat */
++ };
++
+ static PyMappingMethods OptionsAsMapping = {
+ (lenfunc) NULL,
+ (binaryfunc) OptionsItem,
+***************
+*** 6121,6128 ****
+--- 6197,6206 ----
+ vim_memset(&OptionsType, 0, sizeof(OptionsType));
+ OptionsType.tp_name = "vim.options";
+ OptionsType.tp_basicsize = sizeof(OptionsObject);
++ OptionsType.tp_as_sequence = &OptionsAsSeq;
+ OptionsType.tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC;
+ OptionsType.tp_doc = "object for manipulating options";
++ OptionsType.tp_iter = (getiterfunc)OptionsIter;
+ OptionsType.tp_as_mapping = &OptionsAsMapping;
+ OptionsType.tp_dealloc = (destructor)OptionsDestructor;
+ OptionsType.tp_traverse = (traverseproc)OptionsTraverse;
+*** ../vim-7.4.151/src/option.c 2013-11-12 04:43:57.000000000 +0100
+--- src/option.c 2014-01-14 16:50:52.000000000 +0100
+***************
+*** 8861,8867 ****
+ }
+ #endif
+
+! #if defined(FEAT_PYTHON) || defined(FEAT_PYTHON3)
+ /*
+ * Returns the option attributes and its value. Unlike the above function it
+ * will return either global value or local value of the option depending on
+--- 8861,8867 ----
+ }
+ #endif
+
+! #if defined(FEAT_PYTHON) || defined(FEAT_PYTHON3) || defined(PROTO)
+ /*
+ * Returns the option attributes and its value. Unlike the above function it
+ * will return either global value or local value of the option depending on
+***************
+*** 8874,8880 ****
+ * opt_type). Uses
+ *
+ * Returned flags:
+! * 0 hidden or unknown option
+ * see SOPT_* in vim.h for other flags
+ *
+ * Possible opt_type values: see SREQ_* in vim.h
+--- 8874,8881 ----
+ * opt_type). Uses
+ *
+ * Returned flags:
+! * 0 hidden or unknown option, also option that does not have requested
+! * type (see SREQ_* in vim.h)
+ * see SOPT_* in vim.h for other flags
+ *
+ * Possible opt_type values: see SREQ_* in vim.h
+***************
+*** 8997,9002 ****
+--- 8998,9065 ----
+
+ return r;
+ }
++
++ /*
++ * Iterate over options. First argument is a pointer to a pointer to a structure
++ * inside options[] array, second is option type like in the above function.
++ *
++ * If first argument points to NULL it is assumed that iteration just started
++ * and caller needs the very first value.
++ * If first argument points to the end marker function returns NULL and sets
++ * first argument to NULL.
++ *
++ * Returns full option name for current option on each call.
++ */
++ char_u *
++ option_iter_next(option, opt_type)
++ void **option;
++ int opt_type;
++ {
++ struct vimoption *ret = NULL;
++ do
++ {
++ if (*option == NULL)
++ *option = (void *) options;
++ else if (((struct vimoption *) (*option))->fullname == NULL)
++ {
++ *option = NULL;
++ return NULL;
++ }
++ else
++ *option = (void *) (((struct vimoption *) (*option)) + 1);
++
++ ret = ((struct vimoption *) (*option));
++
++ /* Hidden option */
++ if (ret->var == NULL)
++ {
++ ret = NULL;
++ continue;
++ }
++
++ switch (opt_type)
++ {
++ case SREQ_GLOBAL:
++ if (!(ret->indir == PV_NONE || ret->indir & PV_BOTH))
++ ret = NULL;
++ break;
++ case SREQ_BUF:
++ if (!(ret->indir & PV_BUF))
++ ret = NULL;
++ break;
++ case SREQ_WIN:
++ if (!(ret->indir & PV_WIN))
++ ret = NULL;
++ break;
++ default:
++ EMSG2(_(e_intern2), "option_iter_next()");
++ return NULL;
++ }
++ }
++ while (ret == NULL);
++
++ return (char_u *)ret->fullname;
++ }
+ #endif
+
+ /*
+*** ../vim-7.4.151/src/proto/option.pro 2013-11-05 07:12:59.000000000 +0100
+--- src/proto/option.pro 2014-01-14 16:51:41.000000000 +0100
+***************
+*** 23,28 ****
+--- 23,29 ----
+ char_u *check_stl_option __ARGS((char_u *s));
+ int get_option_value __ARGS((char_u *name, long *numval, char_u **stringval, int opt_flags));
+ int get_option_value_strict __ARGS((char_u *name, long *numval, char_u **stringval, int opt_type, void *from));
++ char_u *option_iter_next __ARGS((void **option, int opt_type));
+ char_u *set_option_value __ARGS((char_u *name, long number, char_u *string, int opt_flags));
+ char_u *get_term_code __ARGS((char_u *tname));
+ char_u *get_highlight_default __ARGS((void));
+*** ../vim-7.4.151/src/testdir/test86.in 2014-01-14 16:36:40.000000000 +0100
+--- src/testdir/test86.in 2014-01-14 16:49:10.000000000 +0100
+***************
+*** 506,511 ****
+--- 506,516 ----
+ :py bopts1=vim.buffers[vim.bindeval("g:bufs")[2]].options
+ :py bopts2=vim.buffers[vim.bindeval("g:bufs")[1]].options
+ :py bopts3=vim.buffers[vim.bindeval("g:bufs")[0]].options
++ :$put ='wopts iters equal: '.pyeval('list(wopts1) == list(wopts2)')
++ :$put ='bopts iters equal: '.pyeval('list(bopts1) == list(bopts2)')
++ :py gset=set(iter(gopts1))
++ :py wset=set(iter(wopts1))
++ :py bset=set(iter(bopts1))
+ :set path=.,..,,
+ :let lst=[]
+ :let lst+=[['paste', 1, 0, 1, 2, 1, 1, 0 ]]
+***************
+*** 536,541 ****
+--- 541,548 ----
+ : py oval3=bool(oval3)
+ : endif
+ : put ='>>> '.oname
++ : $put =' g/w/b:'.pyeval('oname in gset').'/'.pyeval('oname in wset').'/'.pyeval('oname in bset')
++ : $put =' g/w/b (in):'.pyeval('oname in gopts1').'/'.pyeval('oname in wopts1').'/'.pyeval('oname in bopts1')
+ : for v in ['gopts1', 'wopts1', 'bopts1']
+ : try
+ : put =' p/'.v.': '.Ev('repr('.v.'['''.oname.'''])')
+***************
+*** 1122,1127 ****
+--- 1129,1141 ----
+ ee('import failing')
+ vim.options['rtp'] = old_rtp
+ del old_rtp
++ cb.append("> Options")
++ cb.append(">> OptionsItem")
++ ee('vim.options["abcQ"]')
++ ee('vim.options[""]')
++ stringtochars_test('vim.options[%s]')
++ cb.append(">> OptionsContains")
++ stringtochars_test('%s in vim.options')
+ cb.append("> Dictionary")
+ cb.append(">> DictionaryConstructor")
+ ee('vim.Dictionary("abcI")')
+*** ../vim-7.4.151/src/testdir/test86.ok 2014-01-14 16:36:40.000000000 +0100
+--- src/testdir/test86.ok 2014-01-14 16:49:10.000000000 +0100
+***************
+*** 112,118 ****
+--- 112,122 ----
+ def
+ bar
+ jkl
++ wopts iters equal: 1
++ bopts iters equal: 1
+ >>> paste
++ g/w/b:1/0/0
++ g/w/b (in):1/0/0
+ p/gopts1: False
+ p/wopts1! KeyError
+ inv: 2! KeyError
+***************
+*** 133,138 ****
+--- 137,144 ----
+ W: 1:1 2:1 3:1 4:1
+ B: 1:1 2:1 3:1 4:1
+ >>> previewheight
++ g/w/b:1/0/0
++ g/w/b (in):1/0/0
+ p/gopts1: 12
+ inv: 'a'! TypeError
+ p/wopts1! KeyError
+***************
+*** 154,159 ****
+--- 160,167 ----
+ W: 1:5 2:5 3:5 4:5
+ B: 1:5 2:5 3:5 4:5
+ >>> operatorfunc
++ g/w/b:1/0/0
++ g/w/b (in):1/0/0
+ p/gopts1: ''
+ inv: 2! TypeError
+ p/wopts1! KeyError
+***************
+*** 175,180 ****
+--- 183,190 ----
+ W: 1:'A' 2:'A' 3:'A' 4:'A'
+ B: 1:'A' 2:'A' 3:'A' 4:'A'
+ >>> number
++ g/w/b:0/1/0
++ g/w/b (in):0/1/0
+ p/gopts1! KeyError
+ inv: 0! KeyError
+ gopts1! KeyError
+***************
+*** 193,198 ****
+--- 203,210 ----
+ W: 1:1 2:1 3:0 4:0
+ B: 1:1 2:1 3:0 4:0
+ >>> numberwidth
++ g/w/b:0/1/0
++ g/w/b (in):0/1/0
+ p/gopts1! KeyError
+ inv: -100! KeyError
+ gopts1! KeyError
+***************
+*** 212,217 ****
+--- 224,231 ----
+ W: 1:3 2:5 3:2 4:8
+ B: 1:3 2:5 3:2 4:8
+ >>> colorcolumn
++ g/w/b:0/1/0
++ g/w/b (in):0/1/0
+ p/gopts1! KeyError
+ inv: 'abc4'! KeyError
+ gopts1! KeyError
+***************
+*** 231,236 ****
+--- 245,252 ----
+ W: 1:'+2' 2:'+3' 3:'+1' 4:''
+ B: 1:'+2' 2:'+3' 3:'+1' 4:''
+ >>> statusline
++ g/w/b:1/1/0
++ g/w/b (in):1/1/0
+ p/gopts1: ''
+ inv: 0! TypeError
+ p/wopts1: None
+***************
+*** 248,253 ****
+--- 264,271 ----
+ W: 1:'2' 2:'1' 3:'1' 4:'1'
+ B: 1:'2' 2:'1' 3:'1' 4:'1'
+ >>> autoindent
++ g/w/b:0/0/1
++ g/w/b (in):0/0/1
+ p/gopts1! KeyError
+ inv: 2! KeyError
+ gopts1! KeyError
+***************
+*** 266,271 ****
+--- 284,291 ----
+ W: 1:0 2:1 3:0 4:1
+ B: 1:0 2:1 3:0 4:1
+ >>> shiftwidth
++ g/w/b:0/0/1
++ g/w/b (in):0/0/1
+ p/gopts1! KeyError
+ inv: 3! KeyError
+ gopts1! KeyError
+***************
+*** 284,289 ****
+--- 304,311 ----
+ W: 1:0 2:2 3:8 4:1
+ B: 1:0 2:2 3:8 4:1
+ >>> omnifunc
++ g/w/b:0/0/1
++ g/w/b (in):0/0/1
+ p/gopts1! KeyError
+ inv: 1! KeyError
+ gopts1! KeyError
+***************
+*** 303,308 ****
+--- 325,332 ----
+ W: 1:'A' 2:'B' 3:'' 4:'C'
+ B: 1:'A' 2:'B' 3:'' 4:'C'
+ >>> preserveindent
++ g/w/b:0/0/1
++ g/w/b (in):0/0/1
+ p/gopts1! KeyError
+ inv: 2! KeyError
+ gopts1! KeyError
+***************
+*** 321,326 ****
+--- 345,352 ----
+ W: 1:0 2:1 3:0 4:1
+ B: 1:0 2:1 3:0 4:1
+ >>> path
++ g/w/b:1/0/1
++ g/w/b (in):1/0/1
+ p/gopts1: '.,..,,'
+ inv: 0! TypeError
+ p/wopts1! KeyError
+***************
+*** 509,514 ****
+--- 535,555 ----
+ import xxx_no_such_module_xxx:ImportError:('No module named xxx_no_such_module_xxx',)
+ import failing_import:ImportError:('No module named failing_import',)
+ import failing:NotImplementedError:()
++ > Options
++ >> OptionsItem
++ vim.options["abcQ"]:KeyError:('abcQ',)
++ vim.options[""]:ValueError:('empty keys are not allowed',)
++ >>> Testing StringToChars using vim.options[%s]
++ vim.options[1]:TypeError:('expected str() or unicode() instance, but got int',)
++ vim.options[u"\0"]:TypeError:('expected string without null bytes',)
++ vim.options["\0"]:TypeError:('expected string without null bytes',)
++ <<< Finished
++ >> OptionsContains
++ >>> Testing StringToChars using %s in vim.options
++ 1 in vim.options:TypeError:('expected str() or unicode() instance, but got int',)
++ u"\0" in vim.options:TypeError:('expected string without null bytes',)
++ "\0" in vim.options:TypeError:('expected string without null bytes',)
++ <<< Finished
+ > Dictionary
+ >> DictionaryConstructor
+ vim.Dictionary("abcI"):ValueError:('expected sequence element of size 2, but got sequence of size 1',)
+*** ../vim-7.4.151/src/testdir/test87.in 2014-01-14 16:36:40.000000000 +0100
+--- src/testdir/test87.in 2014-01-14 16:49:10.000000000 +0100
+***************
+*** 503,508 ****
+--- 503,513 ----
+ :py3 bopts1=vim.buffers[vim.bindeval("g:bufs")[2]].options
+ :py3 bopts2=vim.buffers[vim.bindeval("g:bufs")[1]].options
+ :py3 bopts3=vim.buffers[vim.bindeval("g:bufs")[0]].options
++ :$put ='wopts iters equal: '.py3eval('list(wopts1) == list(wopts2)')
++ :$put ='bopts iters equal: '.py3eval('list(bopts1) == list(bopts2)')
++ :py3 gset=set(iter(gopts1))
++ :py3 wset=set(iter(wopts1))
++ :py3 bset=set(iter(bopts1))
+ :set path=.,..,,
+ :let lst=[]
+ :let lst+=[['paste', 1, 0, 1, 2, 1, 1, 0 ]]
+***************
+*** 533,538 ****
+--- 538,545 ----
+ : py3 oval3=bool(oval3)
+ : endif
+ : put ='>>> '.oname
++ : $put =' g/w/b:'.py3eval('oname in gset').'/'.py3eval('oname in wset').'/'.py3eval('oname in bset')
++ : $put =' g/w/b (in):'.py3eval('oname in gopts1').'/'.py3eval('oname in wopts1').'/'.py3eval('oname in bopts1')
+ : for v in ['gopts1', 'wopts1', 'bopts1']
+ : try
+ : put =' p/'.v.': '.Ev('repr('.v.'['''.oname.'''])')
+***************
+*** 1099,1104 ****
+--- 1106,1118 ----
+ ee('import failing')
+ vim.options['rtp'] = old_rtp
+ del old_rtp
++ cb.append("> Options")
++ cb.append(">> OptionsItem")
++ ee('vim.options["abcQ"]')
++ ee('vim.options[""]')
++ stringtochars_test('vim.options[%s]')
++ cb.append(">> OptionsContains")
++ stringtochars_test('%s in vim.options')
+ cb.append("> Dictionary")
+ cb.append(">> DictionaryConstructor")
+ ee('vim.Dictionary("abcI")')
+*** ../vim-7.4.151/src/testdir/test87.ok 2014-01-14 16:36:40.000000000 +0100
+--- src/testdir/test87.ok 2014-01-14 16:49:10.000000000 +0100
+***************
+*** 112,118 ****
+--- 112,122 ----
+ def
+ bar
+ jkl
++ wopts iters equal: 1
++ bopts iters equal: 1
+ >>> paste
++ g/w/b:1/0/0
++ g/w/b (in):1/0/0
+ p/gopts1: False
+ p/wopts1! KeyError
+ inv: 2! KeyError
+***************
+*** 133,138 ****
+--- 137,144 ----
+ W: 1:1 2:1 3:1 4:1
+ B: 1:1 2:1 3:1 4:1
+ >>> previewheight
++ g/w/b:1/0/0
++ g/w/b (in):1/0/0
+ p/gopts1: 12
+ inv: 'a'! TypeError
+ p/wopts1! KeyError
+***************
+*** 154,159 ****
+--- 160,167 ----
+ W: 1:5 2:5 3:5 4:5
+ B: 1:5 2:5 3:5 4:5
+ >>> operatorfunc
++ g/w/b:1/0/0
++ g/w/b (in):1/0/0
+ p/gopts1: b''
+ inv: 2! TypeError
+ p/wopts1! KeyError
+***************
+*** 175,180 ****
+--- 183,190 ----
+ W: 1:'A' 2:'A' 3:'A' 4:'A'
+ B: 1:'A' 2:'A' 3:'A' 4:'A'
+ >>> number
++ g/w/b:0/1/0
++ g/w/b (in):0/1/0
+ p/gopts1! KeyError
+ inv: 0! KeyError
+ gopts1! KeyError
+***************
+*** 193,198 ****
+--- 203,210 ----
+ W: 1:1 2:1 3:0 4:0
+ B: 1:1 2:1 3:0 4:0
+ >>> numberwidth
++ g/w/b:0/1/0
++ g/w/b (in):0/1/0
+ p/gopts1! KeyError
+ inv: -100! KeyError
+ gopts1! KeyError
+***************
+*** 212,217 ****
+--- 224,231 ----
+ W: 1:3 2:5 3:2 4:8
+ B: 1:3 2:5 3:2 4:8
+ >>> colorcolumn
++ g/w/b:0/1/0
++ g/w/b (in):0/1/0
+ p/gopts1! KeyError
+ inv: 'abc4'! KeyError
+ gopts1! KeyError
+***************
+*** 231,236 ****
+--- 245,252 ----
+ W: 1:'+2' 2:'+3' 3:'+1' 4:''
+ B: 1:'+2' 2:'+3' 3:'+1' 4:''
+ >>> statusline
++ g/w/b:1/1/0
++ g/w/b (in):1/1/0
+ p/gopts1: b''
+ inv: 0! TypeError
+ p/wopts1: None
+***************
+*** 248,253 ****
+--- 264,271 ----
+ W: 1:'2' 2:'1' 3:'1' 4:'1'
+ B: 1:'2' 2:'1' 3:'1' 4:'1'
+ >>> autoindent
++ g/w/b:0/0/1
++ g/w/b (in):0/0/1
+ p/gopts1! KeyError
+ inv: 2! KeyError
+ gopts1! KeyError
+***************
+*** 266,271 ****
+--- 284,291 ----
+ W: 1:0 2:1 3:0 4:1
+ B: 1:0 2:1 3:0 4:1
+ >>> shiftwidth
++ g/w/b:0/0/1
++ g/w/b (in):0/0/1
+ p/gopts1! KeyError
+ inv: 3! KeyError
+ gopts1! KeyError
+***************
+*** 284,289 ****
+--- 304,311 ----
+ W: 1:0 2:2 3:8 4:1
+ B: 1:0 2:2 3:8 4:1
+ >>> omnifunc
++ g/w/b:0/0/1
++ g/w/b (in):0/0/1
+ p/gopts1! KeyError
+ inv: 1! KeyError
+ gopts1! KeyError
+***************
+*** 303,308 ****
+--- 325,332 ----
+ W: 1:'A' 2:'B' 3:'' 4:'C'
+ B: 1:'A' 2:'B' 3:'' 4:'C'
+ >>> preserveindent
++ g/w/b:0/0/1
++ g/w/b (in):0/0/1
+ p/gopts1! KeyError
+ inv: 2! KeyError
+ gopts1! KeyError
+***************
+*** 321,326 ****
+--- 345,352 ----
+ W: 1:0 2:1 3:0 4:1
+ B: 1:0 2:1 3:0 4:1
+ >>> path
++ g/w/b:1/0/1
++ g/w/b (in):1/0/1
+ p/gopts1: b'.,..,,'
+ inv: 0! TypeError
+ p/wopts1! KeyError
+***************
+*** 509,514 ****
+--- 535,555 ----
+ import xxx_no_such_module_xxx:(<class 'ImportError'>, ImportError('No module named xxx_no_such_module_xxx',))
+ import failing_import:(<class 'ImportError'>, ImportError('No module named failing_import',))
+ import failing:(<class 'NotImplementedError'>, NotImplementedError())
++ > Options
++ >> OptionsItem
++ vim.options["abcQ"]:(<class 'KeyError'>, KeyError('abcQ',))
++ vim.options[""]:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
++ >>> Testing StringToChars using vim.options[%s]
++ vim.options[1]:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
++ vim.options[b"\0"]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
++ vim.options["\0"]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
++ <<< Finished
++ >> OptionsContains
++ >>> Testing StringToChars using %s in vim.options
++ 1 in vim.options:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
++ b"\0" in vim.options:(<class 'TypeError'>, TypeError('expected bytes with no null',))
++ "\0" in vim.options:(<class 'TypeError'>, TypeError('expected bytes with no null',))
++ <<< Finished
+ > Dictionary
+ >> DictionaryConstructor
+ vim.Dictionary("abcI"):(<class 'ValueError'>, ValueError('expected sequence element of size 2, but got sequence of size 1',))
+*** ../vim-7.4.151/src/vim.h 2013-11-09 03:31:45.000000000 +0100
+--- src/vim.h 2014-01-14 16:49:10.000000000 +0100
+***************
+*** 2249,2254 ****
+--- 2249,2255 ----
+ #define SOPT_BUF 0x20 /* Option has buffer-local value */
+ #define SOPT_UNSET 0x40 /* Option does not have local value set */
+
++ /* Option types for various functions in option.c */
+ #define SREQ_GLOBAL 0 /* Request global option */
+ #define SREQ_WIN 1 /* Request window-local option */
+ #define SREQ_BUF 2 /* Request buffer-local option */
+*** ../vim-7.4.151/src/version.c 2014-01-14 16:36:40.000000000 +0100
+--- src/version.c 2014-01-14 16:43:58.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 152,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+160. You get in the elevator and double-click the button for the floor
+ you want.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.153 b/patches/source/vim/patches/7.4.153
new file mode 100644
index 000000000..73881b5d9
--- /dev/null
+++ b/patches/source/vim/patches/7.4.153
@@ -0,0 +1,176 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.153
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.153
+Problem: Compiler warning for pointer type.
+Solution: Add type cast.
+Files: src/if_py_both.h, src/if_python.c, src/if_python3.c
+
+
+*** ../vim-7.4.152/src/if_py_both.h 2014-01-14 16:54:53.000000000 +0100
+--- src/if_py_both.h 2014-01-14 18:54:47.000000000 +0100
+***************
+*** 2326,2332 ****
+ {
+ Py_ssize_t start, stop, step, slicelen;
+
+! if (PySlice_GetIndicesEx(idx, ListLength(self),
+ &start, &stop, &step, &slicelen) < 0)
+ return NULL;
+ return ListSlice(self, start, step, slicelen);
+--- 2326,2332 ----
+ {
+ Py_ssize_t start, stop, step, slicelen;
+
+! if (PySlice_GetIndicesEx((PySliceObject *)idx, ListLength(self),
+ &start, &stop, &step, &slicelen) < 0)
+ return NULL;
+ return ListSlice(self, start, step, slicelen);
+***************
+*** 2616,2622 ****
+ {
+ Py_ssize_t start, stop, step, slicelen;
+
+! if (PySlice_GetIndicesEx(idx, ListLength(self),
+ &start, &stop, &step, &slicelen) < 0)
+ return -1;
+ return ListAssSlice(self, start, step, slicelen,
+--- 2616,2622 ----
+ {
+ Py_ssize_t start, stop, step, slicelen;
+
+! if (PySlice_GetIndicesEx((PySliceObject *)idx, ListLength(self),
+ &start, &stop, &step, &slicelen) < 0)
+ return -1;
+ return ListAssSlice(self, start, step, slicelen,
+*** ../vim-7.4.152/src/if_python.c 2014-01-14 16:36:40.000000000 +0100
+--- src/if_python.c 2014-01-14 18:56:41.000000000 +0100
+***************
+*** 343,349 ****
+ static PyInt(*dll_PyTuple_Size)(PyObject *);
+ static PyObject*(*dll_PyTuple_GetItem)(PyObject *, PyInt);
+ static PyTypeObject* dll_PyTuple_Type;
+! static int (*dll_PySlice_GetIndicesEx)(PyObject *r, PyInt length,
+ PyInt *start, PyInt *stop, PyInt *step,
+ PyInt *slicelen);
+ static PyObject*(*dll_PyImport_ImportModule)(const char *);
+--- 343,349 ----
+ static PyInt(*dll_PyTuple_Size)(PyObject *);
+ static PyObject*(*dll_PyTuple_GetItem)(PyObject *, PyInt);
+ static PyTypeObject* dll_PyTuple_Type;
+! static int (*dll_PySlice_GetIndicesEx)(PySliceObject *r, PyInt length,
+ PyInt *start, PyInt *stop, PyInt *step,
+ PyInt *slicelen);
+ static PyObject*(*dll_PyImport_ImportModule)(const char *);
+*** ../vim-7.4.152/src/if_python3.c 2014-01-14 16:36:40.000000000 +0100
+--- src/if_python3.c 2014-01-14 18:58:19.000000000 +0100
+***************
+*** 294,300 ****
+ static PyObject* (*py3_PyTuple_GetItem)(PyObject *, Py_ssize_t);
+ static int (*py3_PyMapping_Check)(PyObject *);
+ static PyObject* (*py3_PyMapping_Keys)(PyObject *);
+! static int (*py3_PySlice_GetIndicesEx)(PyObject *r, Py_ssize_t length,
+ Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step,
+ Py_ssize_t *slicelen);
+ static PyObject* (*py3_PyErr_NoMemory)(void);
+--- 294,300 ----
+ static PyObject* (*py3_PyTuple_GetItem)(PyObject *, Py_ssize_t);
+ static int (*py3_PyMapping_Check)(PyObject *);
+ static PyObject* (*py3_PyMapping_Keys)(PyObject *);
+! static int (*py3_PySlice_GetIndicesEx)(PySliceObject *r, Py_ssize_t length,
+ Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step,
+ Py_ssize_t *slicelen);
+ static PyObject* (*py3_PyErr_NoMemory)(void);
+***************
+*** 1190,1196 ****
+ if (CheckBuffer((BufferObject *) self))
+ return NULL;
+
+! if (PySlice_GetIndicesEx((PyObject *)idx,
+ (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
+ &start, &stop,
+ &step, &slicelen) < 0)
+--- 1190,1196 ----
+ if (CheckBuffer((BufferObject *) self))
+ return NULL;
+
+! if (PySlice_GetIndicesEx((PySliceObject *)idx,
+ (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
+ &start, &stop,
+ &step, &slicelen) < 0)
+***************
+*** 1222,1228 ****
+ if (CheckBuffer((BufferObject *) self))
+ return -1;
+
+! if (PySlice_GetIndicesEx((PyObject *)idx,
+ (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
+ &start, &stop,
+ &step, &slicelen) < 0)
+--- 1222,1228 ----
+ if (CheckBuffer((BufferObject *) self))
+ return -1;
+
+! if (PySlice_GetIndicesEx((PySliceObject *)idx,
+ (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
+ &start, &stop,
+ &step, &slicelen) < 0)
+***************
+*** 1306,1312 ****
+ {
+ Py_ssize_t start, stop, step, slicelen;
+
+! if (PySlice_GetIndicesEx((PyObject *)idx,
+ ((RangeObject *)(self))->end-((RangeObject *)(self))->start+1,
+ &start, &stop,
+ &step, &slicelen) < 0)
+--- 1306,1312 ----
+ {
+ Py_ssize_t start, stop, step, slicelen;
+
+! if (PySlice_GetIndicesEx((PySliceObject *)idx,
+ ((RangeObject *)(self))->end-((RangeObject *)(self))->start+1,
+ &start, &stop,
+ &step, &slicelen) < 0)
+***************
+*** 1333,1339 ****
+ {
+ Py_ssize_t start, stop, step, slicelen;
+
+! if (PySlice_GetIndicesEx((PyObject *)idx,
+ ((RangeObject *)(self))->end-((RangeObject *)(self))->start+1,
+ &start, &stop,
+ &step, &slicelen) < 0)
+--- 1333,1339 ----
+ {
+ Py_ssize_t start, stop, step, slicelen;
+
+! if (PySlice_GetIndicesEx((PySliceObject *)idx,
+ ((RangeObject *)(self))->end-((RangeObject *)(self))->start+1,
+ &start, &stop,
+ &step, &slicelen) < 0)
+*** ../vim-7.4.152/src/version.c 2014-01-14 16:54:53.000000000 +0100
+--- src/version.c 2014-01-14 18:54:01.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 153,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+161. You get up before the sun rises to check your e-mail, and you
+ find yourself in the very same chair long after the sun has set.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.154 b/patches/source/vim/patches/7.4.154
new file mode 100644
index 000000000..db5ae62d6
--- /dev/null
+++ b/patches/source/vim/patches/7.4.154
@@ -0,0 +1,153 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.154
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.154 (after 7.4.149)
+Problem: Still a problem with auto-loading.
+Solution: Pass no_autoload to deref_func_name(). (Yukihiro Nakadaira)
+Files: src/eval.c
+
+
+*** ../vim-7.4.153/src/eval.c 2014-01-14 16:36:40.000000000 +0100
+--- src/eval.c 2014-01-14 19:40:36.000000000 +0100
+***************
+*** 447,453 ****
+ #endif
+ static int get_env_tv __ARGS((char_u **arg, typval_T *rettv, int evaluate));
+ static int find_internal_func __ARGS((char_u *name));
+! static char_u *deref_func_name __ARGS((char_u *name, int *lenp));
+ static int get_func_tv __ARGS((char_u *name, int len, typval_T *rettv, char_u **arg, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict));
+ static int call_func __ARGS((char_u *funcname, int len, typval_T *rettv, int argcount, typval_T *argvars, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict));
+ static void emsg_funcname __ARGS((char *ermsg, char_u *name));
+--- 447,453 ----
+ #endif
+ static int get_env_tv __ARGS((char_u **arg, typval_T *rettv, int evaluate));
+ static int find_internal_func __ARGS((char_u *name));
+! static char_u *deref_func_name __ARGS((char_u *name, int *lenp, int no_autoload));
+ static int get_func_tv __ARGS((char_u *name, int len, typval_T *rettv, char_u **arg, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict));
+ static int call_func __ARGS((char_u *funcname, int len, typval_T *rettv, int argcount, typval_T *argvars, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict));
+ static void emsg_funcname __ARGS((char *ermsg, char_u *name));
+***************
+*** 3432,3438 ****
+
+ /* If it is the name of a variable of type VAR_FUNC use its contents. */
+ len = (int)STRLEN(tofree);
+! name = deref_func_name(tofree, &len);
+
+ /* Skip white space to allow ":call func ()". Not good, but required for
+ * backward compatibility. */
+--- 3432,3438 ----
+
+ /* If it is the name of a variable of type VAR_FUNC use its contents. */
+ len = (int)STRLEN(tofree);
+! name = deref_func_name(tofree, &len, FALSE);
+
+ /* Skip white space to allow ":call func ()". Not good, but required for
+ * backward compatibility. */
+***************
+*** 5159,5165 ****
+ {
+ /* If "s" is the name of a variable of type VAR_FUNC
+ * use its contents. */
+! s = deref_func_name(s, &len);
+
+ /* Invoke the function. */
+ ret = get_func_tv(s, len, rettv, arg,
+--- 5159,5165 ----
+ {
+ /* If "s" is the name of a variable of type VAR_FUNC
+ * use its contents. */
+! s = deref_func_name(s, &len, FALSE);
+
+ /* Invoke the function. */
+ ret = get_func_tv(s, len, rettv, arg,
+***************
+*** 8291,8306 ****
+ * name it contains, otherwise return "name".
+ */
+ static char_u *
+! deref_func_name(name, lenp)
+ char_u *name;
+ int *lenp;
+ {
+ dictitem_T *v;
+ int cc;
+
+ cc = name[*lenp];
+ name[*lenp] = NUL;
+! v = find_var(name, NULL, FALSE);
+ name[*lenp] = cc;
+ if (v != NULL && v->di_tv.v_type == VAR_FUNC)
+ {
+--- 8291,8307 ----
+ * name it contains, otherwise return "name".
+ */
+ static char_u *
+! deref_func_name(name, lenp, no_autoload)
+ char_u *name;
+ int *lenp;
++ int no_autoload;
+ {
+ dictitem_T *v;
+ int cc;
+
+ cc = name[*lenp];
+ name[*lenp] = NUL;
+! v = find_var(name, NULL, no_autoload);
+ name[*lenp] = cc;
+ if (v != NULL && v->di_tv.v_type == VAR_FUNC)
+ {
+***************
+*** 21947,21960 ****
+ if (lv.ll_exp_name != NULL)
+ {
+ len = (int)STRLEN(lv.ll_exp_name);
+! name = deref_func_name(lv.ll_exp_name, &len);
+ if (name == lv.ll_exp_name)
+ name = NULL;
+ }
+ else
+ {
+ len = (int)(end - *pp);
+! name = deref_func_name(*pp, &len);
+ if (name == *pp)
+ name = NULL;
+ }
+--- 21948,21961 ----
+ if (lv.ll_exp_name != NULL)
+ {
+ len = (int)STRLEN(lv.ll_exp_name);
+! name = deref_func_name(lv.ll_exp_name, &len, flags & TFN_NO_AUTOLOAD);
+ if (name == lv.ll_exp_name)
+ name = NULL;
+ }
+ else
+ {
+ len = (int)(end - *pp);
+! name = deref_func_name(*pp, &len, flags & TFN_NO_AUTOLOAD);
+ if (name == *pp)
+ name = NULL;
+ }
+*** ../vim-7.4.153/src/version.c 2014-01-14 19:35:49.000000000 +0100
+--- src/version.c 2014-01-14 19:42:05.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 154,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+162. You go outside and look for a brightness knob to turn down the sun.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.155 b/patches/source/vim/patches/7.4.155
new file mode 100644
index 000000000..e2b26bde5
--- /dev/null
+++ b/patches/source/vim/patches/7.4.155
@@ -0,0 +1,83 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.155
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.155
+Problem: ":keeppatterns /pat" does not keep search pattern offset.
+Solution: Restore the offset after doing the search.
+Files: src/search.c, src/testdir/test14.in, src/testdir/test14.ok
+
+
+*** ../vim-7.4.154/src/search.c 2014-01-14 15:53:47.000000000 +0100
+--- src/search.c 2014-01-14 21:27:32.000000000 +0100
+***************
+*** 1437,1443 ****
+ curwin->w_set_curswant = TRUE;
+
+ end_do_search:
+! if (options & SEARCH_KEEP)
+ spats[0].off = old_off;
+ vim_free(strcopy);
+
+--- 1437,1443 ----
+ curwin->w_set_curswant = TRUE;
+
+ end_do_search:
+! if ((options & SEARCH_KEEP) || cmdmod.keeppatterns)
+ spats[0].off = old_off;
+ vim_free(strcopy);
+
+*** ../vim-7.4.154/src/testdir/test14.in 2014-01-14 15:53:47.000000000 +0100
+--- src/testdir/test14.in 2014-01-14 21:13:39.000000000 +0100
+***************
+*** 56,62 ****
+ :$put =@/
+ /^substitute
+ Y:$put =@0
+! :/^search()/,$w >>test.out
+ :qa!
+ ENDTEST
+
+--- 56,65 ----
+ :$put =@/
+ /^substitute
+ Y:$put =@0
+! /bar /e
+! :$put =@0
+! -:keeppatterns /xyz
+! 0dn:/^search()/,$w >>test.out
+ :qa!
+ ENDTEST
+
+*** ../vim-7.4.154/src/testdir/test14.ok 2014-01-14 15:53:47.000000000 +0100
+--- src/testdir/test14.ok 2014-01-14 21:16:23.000000000 +0100
+***************
+*** 23,25 ****
+--- 23,26 ----
+ foo
+ ^substitute
+ substitute bar xyz
++ xyz
+*** ../vim-7.4.154/src/version.c 2014-01-14 19:44:30.000000000 +0100
+--- src/version.c 2014-01-14 21:28:24.000000000 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 155,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+164. You got out to buy software, instead of going out for a beer.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.156 b/patches/source/vim/patches/7.4.156
new file mode 100644
index 000000000..a1a272c5d
--- /dev/null
+++ b/patches/source/vim/patches/7.4.156
@@ -0,0 +1,49 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.156
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.156
+Problem: Test file missing from distribution.
+Solution: Add new directory to file list.
+Files: Filelist
+
+
+*** ../vim-7.4.155/Filelist 2013-07-13 15:23:38.000000000 +0200
+--- Filelist 2014-01-23 14:23:38.639298979 +0100
+***************
+*** 80,85 ****
+--- 80,86 ----
+ src/main.aap \
+ src/testdir/main.aap \
+ src/testdir/*.in \
++ src/testdir/sautest/autoload/*.vim \
+ src/testdir/test[0-9]*.ok \
+ src/testdir/test49.vim \
+ src/testdir/test60.vim \
+*** ../vim-7.4.155/src/version.c 2014-01-14 21:31:30.000000000 +0100
+--- src/version.c 2014-01-23 14:24:18.475300074 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 156,
+ /**/
+
+--
+Some of the well known MS-Windows errors:
+ ETIME Wrong time, wait a little while
+ ECRASH Try again...
+ EDETECT Unable to detect errors
+ EOVER You lost! Play another game?
+ ENOCLUE Eh, what did you want?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.157 b/patches/source/vim/patches/7.4.157
new file mode 100644
index 000000000..9ec2bd067
--- /dev/null
+++ b/patches/source/vim/patches/7.4.157
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.157
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.157
+Problem: Error number used twice. (Yukihiro Nakadaira)
+Solution: Change the one not referred in the docs.
+Files: src/undo.c
+
+
+*** ../vim-7.4.156/src/undo.c 2013-11-07 03:04:06.000000000 +0100
+--- src/undo.c 2014-01-23 18:07:33.395668196 +0100
+***************
+*** 409,415 ****
+ {
+ /* This happens when the FileChangedRO autocommand changes the
+ * file in a way it becomes shorter. */
+! EMSG(_("E834: Line count changed unexpectedly"));
+ return FAIL;
+ }
+ #endif
+--- 409,415 ----
+ {
+ /* This happens when the FileChangedRO autocommand changes the
+ * file in a way it becomes shorter. */
+! EMSG(_("E881: Line count changed unexpectedly"));
+ return FAIL;
+ }
+ #endif
+*** ../vim-7.4.156/src/version.c 2014-01-23 14:26:18.815303381 +0100
+--- src/version.c 2014-01-23 18:10:47.551673532 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 157,
+ /**/
+
+
+--
+hundred-and-one symptoms of being an internet addict:
+201. When somebody asks you where you are, you tell them in which chat room.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.158 b/patches/source/vim/patches/7.4.158
new file mode 100644
index 000000000..d5291d3ee
--- /dev/null
+++ b/patches/source/vim/patches/7.4.158
@@ -0,0 +1,140 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.158
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.158 (after 7.4.045)
+Problem: Pattern containing \zs is not handled correctly by substitute().
+Solution: Change how an empty match is skipped. (Yukihiro Nakadaira)
+Files: src/eval.c, src/testdir/test80.in, src/testdir/test80.ok
+
+
+*** ../vim-7.4.157/src/eval.c 2014-01-14 19:44:30.000000000 +0100
+--- src/eval.c 2014-01-23 19:25:23.199796533 +0100
+***************
+*** 24365,24371 ****
+ garray_T ga;
+ char_u *ret;
+ char_u *save_cpo;
+! int zero_width;
+
+ /* Make 'cpoptions' empty, so that the 'l' flag doesn't work here */
+ save_cpo = p_cpo;
+--- 24365,24371 ----
+ garray_T ga;
+ char_u *ret;
+ char_u *save_cpo;
+! char_u *zero_width = NULL;
+
+ /* Make 'cpoptions' empty, so that the 'l' flag doesn't work here */
+ save_cpo = p_cpo;
+***************
+*** 24382,24387 ****
+--- 24382,24400 ----
+ tail = str;
+ while (vim_regexec_nl(&regmatch, str, (colnr_T)(tail - str)))
+ {
++ /* Skip empty match except for first match. */
++ if (regmatch.startp[0] == regmatch.endp[0])
++ {
++ if (zero_width == regmatch.startp[0])
++ {
++ /* avoid getting stuck on a match with an empty string */
++ *((char_u *)ga.ga_data + ga.ga_len) = *tail++;
++ ++ga.ga_len;
++ continue;
++ }
++ zero_width = regmatch.startp[0];
++ }
++
+ /*
+ * Get some space for a temporary buffer to do the substitution
+ * into. It will contain:
+***************
+*** 24404,24420 ****
+ (void)vim_regsub(&regmatch, sub, (char_u *)ga.ga_data
+ + ga.ga_len + i, TRUE, TRUE, FALSE);
+ ga.ga_len += i + sublen - 1;
+- zero_width = (tail == regmatch.endp[0]
+- || regmatch.startp[0] == regmatch.endp[0]);
+ tail = regmatch.endp[0];
+ if (*tail == NUL)
+ break;
+- if (zero_width)
+- {
+- /* avoid getting stuck on a match with an empty string */
+- *((char_u *)ga.ga_data + ga.ga_len) = *tail++;
+- ++ga.ga_len;
+- }
+ if (!do_all)
+ break;
+ }
+--- 24417,24425 ----
+*** ../vim-7.4.157/src/testdir/test80.in 2013-09-29 21:11:00.000000000 +0200
+--- src/testdir/test80.in 2014-01-23 19:24:30.487795084 +0100
+***************
+*** 176,181 ****
+--- 176,198 ----
+ TEST_10:
+
+ STARTTEST
++ :set magic&
++ :set cpo&
++ :$put =\"\n\nTEST_10:\"
++ :let y = substitute('123', '\zs', 'a', 'g') | $put =y
++ :let y = substitute('123', '\zs.', 'a', 'g') | $put =y
++ :let y = substitute('123', '.\zs', 'a', 'g') | $put =y
++ :let y = substitute('123', '\ze', 'a', 'g') | $put =y
++ :let y = substitute('123', '\ze.', 'a', 'g') | $put =y
++ :let y = substitute('123', '.\ze', 'a', 'g') | $put =y
++ :let y = substitute('123', '1\|\ze', 'a', 'g') | $put =y
++ :let y = substitute('123', '1\zs\|[23]', 'a', 'g') | $put =y
++ /^TEST_11
++ ENDTEST
++
++ TEST_11:
++
++ STARTTEST
+ :/^Results/,$wq! test.out
+ ENDTEST
+
+*** ../vim-7.4.157/src/testdir/test80.ok 2013-09-29 21:11:00.000000000 +0200
+--- src/testdir/test80.ok 2014-01-23 19:24:35.691795227 +0100
+***************
+*** 115,117 ****
+--- 115,128 ----
+
+ TEST_9:
+ XXx
++
++
++ TEST_10:
++ a1a2a3a
++ aaa
++ 1a2a3a
++ a1a2a3a
++ a1a2a3
++ aaa
++ aa2a3a
++ 1aaa
+*** ../vim-7.4.157/src/version.c 2014-01-23 18:12:44.695676751 +0100
+--- src/version.c 2014-01-23 19:27:21.611799787 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 158,
+ /**/
+
+--
+$ echo pizza > /dev/oven
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.159 b/patches/source/vim/patches/7.4.159
new file mode 100644
index 000000000..be89abeb8
--- /dev/null
+++ b/patches/source/vim/patches/7.4.159
@@ -0,0 +1,116 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.159
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.159
+Problem: Completion hangs when scanning the current buffer after doing
+ keywords. (Christian Brabandt)
+Solution: Set the first match position when starting to scan the current
+ buffer.
+Files: src/edit.c
+
+
+*** ../vim-7.4.158/src/edit.c 2014-01-14 12:16:57.000000000 +0100
+--- src/edit.c 2014-01-23 22:42:20.964121311 +0100
+***************
+*** 4180,4185 ****
+--- 4180,4186 ----
+ char_u *dict = NULL;
+ int dict_f = 0;
+ compl_T *old_match;
++ int set_match_pos;
+
+ if (!compl_started)
+ {
+***************
+*** 4198,4203 ****
+--- 4199,4205 ----
+ for (;;)
+ {
+ found_new_match = FAIL;
++ set_match_pos = FALSE;
+
+ /* For ^N/^P pick a new entry from e_cpt if compl_started is off,
+ * or if found_all says this entry is done. For ^X^L only use the
+***************
+*** 4217,4222 ****
+--- 4219,4228 ----
+ dec(&first_match_pos);
+ last_match_pos = first_match_pos;
+ type = 0;
++
++ /* Remember the first match so that the loop stops when we
++ * wrap and come back there a second time. */
++ set_match_pos = TRUE;
+ }
+ else if (vim_strchr((char_u *)"buwU", *e_cpt) != NULL
+ && (ins_buf = ins_compl_next_buf(ins_buf, *e_cpt)) != curbuf)
+***************
+*** 4381,4387 ****
+ if (ins_buf->b_p_inf)
+ p_scs = FALSE;
+
+! /* buffers other than curbuf are scanned from the beginning or the
+ * end but never from the middle, thus setting nowrapscan in this
+ * buffers is a good idea, on the other hand, we always set
+ * wrapscan for curbuf to avoid missing matches -- Acevedo,Webb */
+--- 4387,4393 ----
+ if (ins_buf->b_p_inf)
+ p_scs = FALSE;
+
+! /* Buffers other than curbuf are scanned from the beginning or the
+ * end but never from the middle, thus setting nowrapscan in this
+ * buffers is a good idea, on the other hand, we always set
+ * wrapscan for curbuf to avoid missing matches -- Acevedo,Webb */
+***************
+*** 4408,4419 ****
+ compl_pattern, 1L, SEARCH_KEEP + SEARCH_NFMSG,
+ RE_LAST, (linenr_T)0, NULL);
+ --msg_silent;
+! if (!compl_started)
+ {
+ /* set "compl_started" even on fail */
+ compl_started = TRUE;
+ first_match_pos = *pos;
+ last_match_pos = *pos;
+ }
+ else if (first_match_pos.lnum == last_match_pos.lnum
+ && first_match_pos.col == last_match_pos.col)
+--- 4414,4426 ----
+ compl_pattern, 1L, SEARCH_KEEP + SEARCH_NFMSG,
+ RE_LAST, (linenr_T)0, NULL);
+ --msg_silent;
+! if (!compl_started || set_match_pos)
+ {
+ /* set "compl_started" even on fail */
+ compl_started = TRUE;
+ first_match_pos = *pos;
+ last_match_pos = *pos;
++ set_match_pos = FALSE;
+ }
+ else if (first_match_pos.lnum == last_match_pos.lnum
+ && first_match_pos.col == last_match_pos.col)
+*** ../vim-7.4.158/src/version.c 2014-01-23 20:09:29.523869260 +0100
+--- src/version.c 2014-01-23 22:44:40.908125157 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 159,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+205. You're constantly yelling at your spouse, family, roommate, whatever,
+ for using the phone for stupid things...like talking.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.160 b/patches/source/vim/patches/7.4.160
new file mode 100644
index 000000000..41b0043e5
--- /dev/null
+++ b/patches/source/vim/patches/7.4.160
@@ -0,0 +1,66 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.160
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.160
+Problem: Win32: Crash when executing external command.
+Solution: Only close the handle when it was created. (Yasuhiro Matsumoto)
+Files: src/os_win32.c
+
+
+*** ../vim-7.4.159/src/os_win32.c 2014-01-12 13:24:46.000000000 +0100
+--- src/os_win32.c 2014-01-24 19:54:35.778219160 +0100
+***************
+*** 4627,4632 ****
+--- 4627,4633 ----
+ DWORD flags = CREATE_NEW_CONSOLE;
+ char_u *p;
+
++ ZeroMemory(&si, sizeof(si));
+ si.cb = sizeof(si);
+ si.lpReserved = NULL;
+ si.lpDesktop = NULL;
+***************
+*** 4723,4731 ****
+ if (newcmd != cmdbase)
+ vim_free(newcmd);
+
+! if (si.hStdInput != NULL)
+ {
+! /* Close the handle to \\.\NUL */
+ CloseHandle(si.hStdInput);
+ }
+ /* Close the handles to the subprocess, so that it goes away */
+--- 4724,4732 ----
+ if (newcmd != cmdbase)
+ vim_free(newcmd);
+
+! if (si.dwFlags == STARTF_USESTDHANDLES && si.hStdInput != NULL)
+ {
+! /* Close the handle to \\.\NUL created above. */
+ CloseHandle(si.hStdInput);
+ }
+ /* Close the handles to the subprocess, so that it goes away */
+*** ../vim-7.4.159/src/version.c 2014-01-23 22:45:54.608127182 +0100
+--- src/version.c 2014-01-24 19:52:46.946216170 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 160,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+209. Your house stinks because you haven't cleaned it in a week.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.161 b/patches/source/vim/patches/7.4.161
new file mode 100644
index 000000000..0487264c7
--- /dev/null
+++ b/patches/source/vim/patches/7.4.161
@@ -0,0 +1,75 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.161
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.161
+Problem: Crash in Python exception handling.
+Solution: Only use exception variables if did_throw is set. (ZyX)
+Files: if_py_both.h
+
+
+*** ../vim-7.4.160/src/if_py_both.h 2014-01-14 19:35:49.000000000 +0100
+--- src/if_py_both.h 2014-01-31 14:46:20.455526607 +0100
+***************
+*** 564,573 ****
+ /* Keyboard interrupt should be preferred over anything else */
+ if (got_int)
+ {
+! if (current_exception != NULL)
+ discard_current_exception();
+- else
+- need_rethrow = did_throw = FALSE;
+ got_int = FALSE;
+ PyErr_SetNone(PyExc_KeyboardInterrupt);
+ return -1;
+--- 564,571 ----
+ /* Keyboard interrupt should be preferred over anything else */
+ if (got_int)
+ {
+! if (did_throw)
+ discard_current_exception();
+ got_int = FALSE;
+ PyErr_SetNone(PyExc_KeyboardInterrupt);
+ return -1;
+***************
+*** 599,608 ****
+ /* Python exception is preferred over vim one; unlikely to occur though */
+ else if (PyErr_Occurred())
+ {
+! if (current_exception != NULL)
+! discard_current_exception();
+! else
+! need_rethrow = did_throw = FALSE;
+ return -1;
+ }
+ /* Finally transform VimL exception to python one */
+--- 597,603 ----
+ /* Python exception is preferred over vim one; unlikely to occur though */
+ else if (PyErr_Occurred())
+ {
+! discard_current_exception();
+ return -1;
+ }
+ /* Finally transform VimL exception to python one */
+*** ../vim-7.4.160/src/version.c 2014-01-24 19:55:33.078220735 +0100
+--- src/version.c 2014-01-31 14:46:39.127526894 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 161,
+ /**/
+
+--
+Eagles may soar, but weasels don't get sucked into jet engines.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.162 b/patches/source/vim/patches/7.4.162
new file mode 100644
index 000000000..0687e882b
--- /dev/null
+++ b/patches/source/vim/patches/7.4.162
@@ -0,0 +1,45 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.162
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.162
+Problem: Running tests in shadow dir doesn't work.
+Solution: Add testdir/sautest to the shadow target. (James McCoy)
+Files: src/Makefile
+
+
+*** ../vim-7.4.161/src/Makefile 2013-11-07 03:25:51.000000000 +0100
+--- src/Makefile 2014-02-05 12:34:00.214024436 +0100
+***************
+*** 2381,2386 ****
+--- 2381,2387 ----
+ ../../testdir/*.in \
+ ../../testdir/*.vim \
+ ../../testdir/python* \
++ ../../testdir/sautest \
+ ../../testdir/test83-tags? \
+ ../../testdir/*.ok .
+
+*** ../vim-7.4.161/src/version.c 2014-01-31 14:53:59.715533645 +0100
+--- src/version.c 2014-02-05 12:34:19.766024736 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 162,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+263. You have more e-mail addresses than shorts.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.163 b/patches/source/vim/patches/7.4.163
new file mode 100644
index 000000000..b04e91d71
--- /dev/null
+++ b/patches/source/vim/patches/7.4.163
@@ -0,0 +1,75 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.163
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.163 (after 7.4.142)
+Problem: MS-Windows input doesn't work properly on Windows 7 and earlier.
+Solution: Add a check for Windows 8. (Yasuhiro Matsumoto)
+Files: src/os_win32.c
+
+
+*** ../vim-7.4.162/src/os_win32.c 2014-01-24 19:55:33.078220735 +0100
+--- src/os_win32.c 2014-02-05 13:33:03.758078734 +0100
+***************
+*** 232,237 ****
+--- 232,239 ----
+
+ static char_u *exe_path = NULL;
+
++ static BOOL win8_or_later = FALSE;
++
+ /*
+ * Version of ReadConsoleInput() that works with IME.
+ * Works around problems on Windows 8.
+***************
+*** 252,257 ****
+--- 254,266 ----
+ static DWORD s_dwMax = 0;
+ DWORD dwEvents;
+
++ if (!win8_or_later)
++ {
++ if (nLength == -1)
++ return PeekConsoleInput(hInput, lpBuffer, 1, lpEvents);
++ return ReadConsoleInput(hInput, lpBuffer, 1, &dwEvents);
++ }
++
+ if (s_dwMax == 0)
+ {
+ if (nLength == -1)
+***************
+*** 617,622 ****
+--- 626,635 ----
+
+ g_PlatformId = ovi.dwPlatformId;
+
++ if ((ovi.dwMajorVersion == 6 && ovi.dwMinorVersion >= 2)
++ || ovi.dwMajorVersion > 6)
++ win8_or_later = TRUE;
++
+ #ifdef HAVE_ACL
+ /*
+ * Load the ADVAPI runtime if we are on anything
+*** ../vim-7.4.162/src/version.c 2014-02-05 12:36:36.622026833 +0100
+--- src/version.c 2014-02-05 13:31:31.618077322 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 163,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+266. You hear most of your jokes via e-mail instead of in person.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.164 b/patches/source/vim/patches/7.4.164
new file mode 100644
index 000000000..b35debadf
--- /dev/null
+++ b/patches/source/vim/patches/7.4.164
@@ -0,0 +1,78 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.164
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.164 (after 7.4.163)
+Problem: Problem with event handling on Windows 8.
+Solution: Ignore duplicate WINDOW_BUFFER_SIZE_EVENTs. (Nobuhiro Takasaki)
+Files: src/os_win32.c
+
+
+*** ../vim-7.4.163/src/os_win32.c 2014-02-05 13:36:50.846082213 +0100
+--- src/os_win32.c 2014-02-05 14:01:13.350104623 +0100
+***************
+*** 253,258 ****
+--- 253,261 ----
+ static DWORD s_dwIndex = 0;
+ static DWORD s_dwMax = 0;
+ DWORD dwEvents;
++ int head;
++ int tail;
++ int i;
+
+ if (!win8_or_later)
+ {
+***************
+*** 274,280 ****
+--- 277,305 ----
+ *lpEvents = 0;
+ return TRUE;
+ }
++
++ if (s_dwMax > 1)
++ {
++ head = 0;
++ tail = s_dwMax - 1;
++ while (head != tail)
++ {
++ if (s_irCache[head].EventType == WINDOW_BUFFER_SIZE_EVENT
++ && s_irCache[head + 1].EventType
++ == WINDOW_BUFFER_SIZE_EVENT)
++ {
++ /* Remove duplicate event to avoid flicker. */
++ for (i = head; i < tail; ++i)
++ s_irCache[i] = s_irCache[i + 1];
++ --tail;
++ continue;
++ }
++ head++;
++ }
++ s_dwMax = tail + 1;
++ }
+ }
++
+ *lpBuffer = s_irCache[s_dwIndex];
+ if (nLength != -1 && ++s_dwIndex >= s_dwMax)
+ s_dwMax = 0;
+*** ../vim-7.4.163/src/version.c 2014-02-05 13:36:50.850082213 +0100
+--- src/version.c 2014-02-05 13:54:15.570098222 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 164,
+ /**/
+
+--
+XML is a nice language for computers. Not for humans.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.165 b/patches/source/vim/patches/7.4.165
new file mode 100644
index 000000000..ab42f7300
--- /dev/null
+++ b/patches/source/vim/patches/7.4.165
@@ -0,0 +1,71 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.165
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.165
+Problem: By default, after closing a buffer changes can't be undone.
+Solution: In the example vimrc file set 'undofile'.
+Files: runtime/vimrc_example.vim
+
+
+*** ../vim-7.4.164/runtime/vimrc_example.vim 2011-04-15 20:58:36.000000000 +0200
+--- runtime/vimrc_example.vim 2014-02-05 21:59:40.534544501 +0100
+***************
+*** 1,7 ****
+ " An example for a vimrc file.
+ "
+ " Maintainer: Bram Moolenaar <Bram@vim.org>
+! " Last change: 2011 Apr 15
+ "
+ " To use it, copy it to
+ " for Unix and OS/2: ~/.vimrc
+--- 1,7 ----
+ " An example for a vimrc file.
+ "
+ " Maintainer: Bram Moolenaar <Bram@vim.org>
+! " Last change: 2014 Feb 05
+ "
+ " To use it, copy it to
+ " for Unix and OS/2: ~/.vimrc
+***************
+*** 24,30 ****
+ if has("vms")
+ set nobackup " do not keep a backup file, use versions instead
+ else
+! set backup " keep a backup file
+ endif
+ set history=50 " keep 50 lines of command line history
+ set ruler " show the cursor position all the time
+--- 24,31 ----
+ if has("vms")
+ set nobackup " do not keep a backup file, use versions instead
+ else
+! set backup " keep a backup file (restore to previous version)
+! set undofile " keep an undo file (undo changes after closing)
+ endif
+ set history=50 " keep 50 lines of command line history
+ set ruler " show the cursor position all the time
+*** ../vim-7.4.164/src/version.c 2014-02-05 14:02:23.590105699 +0100
+--- src/version.c 2014-02-05 21:59:47.774544612 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 165,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+269. You wonder how you can make your dustbin produce Sesame Street's
+ Oscar's the Garbage Monster song when you empty it.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.166 b/patches/source/vim/patches/7.4.166
new file mode 100644
index 000000000..16f51b42d
--- /dev/null
+++ b/patches/source/vim/patches/7.4.166
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.166
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.166
+Problem: Auto-loading a function for code that won't be executed.
+Solution: Do not auto-load when evaluation is off. (Yasuhiro Matsumoto)
+Files: src/eval.c
+
+
+*** ../vim-7.4.165/src/eval.c 2014-01-23 20:09:29.523869260 +0100
+--- src/eval.c 2014-02-05 22:04:21.110548800 +0100
+***************
+*** 5159,5165 ****
+ {
+ /* If "s" is the name of a variable of type VAR_FUNC
+ * use its contents. */
+! s = deref_func_name(s, &len, FALSE);
+
+ /* Invoke the function. */
+ ret = get_func_tv(s, len, rettv, arg,
+--- 5159,5165 ----
+ {
+ /* If "s" is the name of a variable of type VAR_FUNC
+ * use its contents. */
+! s = deref_func_name(s, &len, !evaluate);
+
+ /* Invoke the function. */
+ ret = get_func_tv(s, len, rettv, arg,
+*** ../vim-7.4.165/src/version.c 2014-02-05 22:01:56.690546587 +0100
+--- src/version.c 2014-02-05 22:06:18.610550600 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 166,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+270. You are subscribed to a mailing list for every piece of software
+ you use.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.167 b/patches/source/vim/patches/7.4.167
new file mode 100644
index 000000000..c3ad07400
--- /dev/null
+++ b/patches/source/vim/patches/7.4.167
@@ -0,0 +1,195 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.167
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.167 (after 7.4.149)
+Problem: Fixes are not tested.
+Solution: Add a test for not autoloading on assignment. (Yukihiro Nakadaira)
+Files: src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
+ src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
+ src/testdir/Make_vms.mms, src/testdir/Makefile,
+ src/testdir/sautest/autoload/Test104.vim, src/testdir/test104.in,
+ src/testdir/test104.ok
+
+
+*** ../vim-7.4.166/src/testdir/Make_amiga.mak 2013-11-21 14:21:25.000000000 +0100
+--- src/testdir/Make_amiga.mak 2014-02-05 22:16:46.654560224 +0100
+***************
+*** 34,40 ****
+ test81.out test82.out test83.out test84.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+! test99.out test100.out test101.out test102.out test103.out
+
+ .SUFFIXES: .in .out
+
+--- 34,41 ----
+ test81.out test82.out test83.out test84.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+! test99.out test100.out test101.out test102.out test103.out \
+! test104.out
+
+ .SUFFIXES: .in .out
+
+***************
+*** 154,156 ****
+--- 155,158 ----
+ test101.out: test101.in
+ test102.out: test102.in
+ test103.out: test103.in
++ test104.out: test104.in
+*** ../vim-7.4.166/src/testdir/Make_dos.mak 2013-11-21 14:21:25.000000000 +0100
+--- src/testdir/Make_dos.mak 2014-02-05 22:16:46.654560224 +0100
+***************
+*** 33,39 ****
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100.out test101.out test102.out test103.out
+
+ SCRIPTS32 = test50.out test70.out
+
+--- 33,39 ----
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100.out test101.out test102.out test103.out test104.out
+
+ SCRIPTS32 = test50.out test70.out
+
+*** ../vim-7.4.166/src/testdir/Make_ming.mak 2014-01-06 15:51:46.000000000 +0100
+--- src/testdir/Make_ming.mak 2014-02-05 22:16:46.654560224 +0100
+***************
+*** 53,59 ****
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100.out test101.out test102.out test103.out
+
+ SCRIPTS32 = test50.out test70.out
+
+--- 53,59 ----
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100.out test101.out test102.out test103.out test104.out
+
+ SCRIPTS32 = test50.out test70.out
+
+*** ../vim-7.4.166/src/testdir/Make_os2.mak 2013-11-21 14:21:25.000000000 +0100
+--- src/testdir/Make_os2.mak 2014-02-05 22:16:46.654560224 +0100
+***************
+*** 35,41 ****
+ test81.out test82.out test83.out test84.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100.out test101.out test102.out test103.out
+
+ .SUFFIXES: .in .out
+
+--- 35,41 ----
+ test81.out test82.out test83.out test84.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100.out test101.out test102.out test103.out test104.out
+
+ .SUFFIXES: .in .out
+
+*** ../vim-7.4.166/src/testdir/Make_vms.mms 2013-11-21 14:21:25.000000000 +0100
+--- src/testdir/Make_vms.mms 2014-02-05 22:16:46.658560224 +0100
+***************
+*** 79,85 ****
+ test82.out test83.out test84.out test88.out test89.out \
+ test90.out test91.out test92.out test93.out test94.out \
+ test95.out test96.out test97.out test98.out test99.out \
+! test100.out test101.out test102.out test103.out
+
+ # Known problems:
+ # Test 30: a problem around mac format - unknown reason
+--- 79,85 ----
+ test82.out test83.out test84.out test88.out test89.out \
+ test90.out test91.out test92.out test93.out test94.out \
+ test95.out test96.out test97.out test98.out test99.out \
+! test100.out test101.out test102.out test103.out test104.out
+
+ # Known problems:
+ # Test 30: a problem around mac format - unknown reason
+*** ../vim-7.4.166/src/testdir/Makefile 2013-11-21 14:21:25.000000000 +0100
+--- src/testdir/Makefile 2014-02-05 22:16:46.658560224 +0100
+***************
+*** 30,36 ****
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+! test99.out test100.out test101.out test102.out test103.out
+
+ SCRIPTS_GUI = test16.out
+
+--- 30,37 ----
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+! test99.out test100.out test101.out test102.out test103.out \
+! test104.out
+
+ SCRIPTS_GUI = test16.out
+
+*** ../vim-7.4.166/src/testdir/sautest/autoload/Test104.vim 2014-02-05 22:25:12.050567968 +0100
+--- src/testdir/sautest/autoload/Test104.vim 2014-02-05 22:16:46.658560224 +0100
+***************
+*** 0 ****
+--- 1 ----
++ let Test104#numvar = 123
+*** ../vim-7.4.166/src/testdir/test104.in 2014-02-05 22:25:12.062567968 +0100
+--- src/testdir/test104.in 2014-02-05 22:24:07.706566982 +0100
+***************
+*** 0 ****
+--- 1,16 ----
++ Tests for autoload. vim: set ft=vim ts=8 :
++
++ STARTTEST
++ :so small.vim
++ :set runtimepath+=./sautest
++ :" Test to not autoload when assigning. It causes internal error.
++ :try
++ : let Test104#numvar = function('tr')
++ : $put ='OK: ' . string(Test104#numvar)
++ :catch
++ : $put ='FAIL: ' . v:exception
++ :endtry
++ :/^Results/,$wq! test.out
++ ENDTEST
++
++ Results of test104:
+*** ../vim-7.4.166/src/testdir/test104.ok 2014-02-05 22:25:12.070567968 +0100
+--- src/testdir/test104.ok 2014-02-05 22:16:46.658560224 +0100
+***************
+*** 0 ****
+--- 1,2 ----
++ Results of test104:
++ OK: function('tr')
+*** ../vim-7.4.166/src/version.c 2014-02-05 22:13:02.366556787 +0100
+--- src/version.c 2014-02-05 22:18:05.506561432 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 167,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+271. You collect hilarious signatures from all 250 mailing lists you
+ are subscribed to.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.168 b/patches/source/vim/patches/7.4.168
new file mode 100644
index 000000000..ac57dc490
--- /dev/null
+++ b/patches/source/vim/patches/7.4.168
@@ -0,0 +1,91 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.168
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.168
+Problem: Can't compile with Ruby 2.1.0.
+Solution: Add support for new GC. (Kohei Suzuki)
+Files: src/if_ruby.c
+
+
+*** ../vim-7.4.167/src/if_ruby.c 2013-05-20 12:47:48.000000000 +0200
+--- src/if_ruby.c 2014-02-05 22:35:17.378577243 +0100
+***************
+*** 96,101 ****
+--- 96,107 ----
+ # define rb_num2int rb_num2int_stub
+ #endif
+
++ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 21
++ /* Ruby 2.1 adds new GC called RGenGC and RARRAY_PTR uses
++ * rb_gc_writebarrier_unprotect_promoted if USE_RGENGC */
++ # define rb_gc_writebarrier_unprotect_promoted rb_gc_writebarrier_unprotect_promoted_stub
++ # endif
++
+ #include <ruby.h>
+ #ifdef RUBY19_OR_LATER
+ # include <ruby/encoding.h>
+***************
+*** 373,378 ****
+--- 379,388 ----
+ static void* (*ruby_process_options)(int, char**);
+ # endif
+
++ # if defined(USE_RGENGC) && USE_RGENGC
++ static void (*dll_rb_gc_writebarrier_unprotect_promoted)(VALUE);
++ # endif
++
+ # if defined(RUBY19_OR_LATER) && !defined(PROTO)
+ SIGNED_VALUE rb_num2long_stub(VALUE x)
+ {
+***************
+*** 406,411 ****
+--- 416,428 ----
+ # endif
+ # endif
+
++ # if defined(USE_RGENGC) && USE_RGENGC
++ void rb_gc_writebarrier_unprotect_promoted_stub(VALUE obj)
++ {
++ return dll_rb_gc_writebarrier_unprotect_promoted(obj);
++ }
++ # endif
++
+ static HINSTANCE hinstRuby = NULL; /* Instance of ruby.dll */
+
+ /*
+***************
+*** 521,526 ****
+--- 538,546 ----
+ # endif
+ {"ruby_init_stack", (RUBY_PROC*)&dll_ruby_init_stack},
+ # endif
++ # if defined(USE_RGENGC) && USE_RGENGC
++ {"rb_gc_writebarrier_unprotect_promoted", (RUBY_PROC*)&dll_rb_gc_writebarrier_unprotect_promoted},
++ # endif
+ {"", NULL},
+ };
+
+*** ../vim-7.4.167/src/version.c 2014-02-05 22:25:29.982568243 +0100
+--- src/version.c 2014-02-05 22:36:14.010578111 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 168,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+10E. You start counting in hex.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.169 b/patches/source/vim/patches/7.4.169
new file mode 100644
index 000000000..bfb4c16f7
--- /dev/null
+++ b/patches/source/vim/patches/7.4.169
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.169
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.169
+Problem: ":sleep" puts cursor in the wrong column. (Liang Li)
+Solution: Add the window offset. (Christian Brabandt)
+Files: src/ex_docmd.c
+
+
+*** ../vim-7.4.168/src/ex_docmd.c 2014-01-10 15:53:09.000000000 +0100
+--- src/ex_docmd.c 2014-02-05 22:45:39.318586773 +0100
+***************
+*** 8371,8377 ****
+ {
+ n = W_WINROW(curwin) + curwin->w_wrow - msg_scrolled;
+ if (n >= 0)
+! windgoto((int)n, curwin->w_wcol);
+ }
+
+ len = eap->line2;
+--- 8371,8377 ----
+ {
+ n = W_WINROW(curwin) + curwin->w_wrow - msg_scrolled;
+ if (n >= 0)
+! windgoto((int)n, W_WINCOL(curwin) + curwin->w_wcol);
+ }
+
+ len = eap->line2;
+*** ../vim-7.4.168/src/version.c 2014-02-05 22:41:11.430582669 +0100
+--- src/version.c 2014-02-05 22:44:51.458586040 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 169,
+ /**/
+
+--
+ARTHUR: This new learning amazes me, Sir Bedevere. Explain again how sheep's
+ bladders may be employed to prevent earthquakes.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.170 b/patches/source/vim/patches/7.4.170
new file mode 100644
index 000000000..17de640b6
--- /dev/null
+++ b/patches/source/vim/patches/7.4.170
@@ -0,0 +1,90 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.170
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.170
+Problem: Some help tags don't work with ":help". (Tim Chase)
+Solution: Add exceptions.
+Files: src/ex_cmds.c
+
+
+*** ../vim-7.4.169/src/ex_cmds.c 2013-11-09 03:31:45.000000000 +0100
+--- src/ex_cmds.c 2014-02-11 12:10:43.905946437 +0100
+***************
+*** 5936,5949 ****
+ "?", ":?", "?<CR>", "g?", "g?g?", "g??", "z?",
+ "/\\?", "/\\z(\\)", "\\=", ":s\\=",
+ "[count]", "[quotex]", "[range]",
+! "[pattern]", "\\|", "\\%$"};
+ static char *(rtable[]) = {"star", "gstar", "[star", "]star", ":star",
+ "/star", "/\\\\star", "quotestar", "starstar",
+ "cpo-star", "/\\\\(\\\\)", "/\\\\%(\\\\)",
+ "?", ":?", "?<CR>", "g?", "g?g?", "g??", "z?",
+ "/\\\\?", "/\\\\z(\\\\)", "\\\\=", ":s\\\\=",
+ "\\[count]", "\\[quotex]", "\\[range]",
+! "\\[pattern]", "\\\\bar", "/\\\\%\\$"};
+ int flags;
+
+ d = IObuff; /* assume IObuff is long enough! */
+--- 5936,5953 ----
+ "?", ":?", "?<CR>", "g?", "g?g?", "g??", "z?",
+ "/\\?", "/\\z(\\)", "\\=", ":s\\=",
+ "[count]", "[quotex]", "[range]",
+! "[pattern]", "\\|", "\\%$",
+! "s/\\~", "s/\\U", "s/\\L",
+! "s/\\1", "s/\\2", "s/\\3", "s/\\9"};
+ static char *(rtable[]) = {"star", "gstar", "[star", "]star", ":star",
+ "/star", "/\\\\star", "quotestar", "starstar",
+ "cpo-star", "/\\\\(\\\\)", "/\\\\%(\\\\)",
+ "?", ":?", "?<CR>", "g?", "g?g?", "g??", "z?",
+ "/\\\\?", "/\\\\z(\\\\)", "\\\\=", ":s\\\\=",
+ "\\[count]", "\\[quotex]", "\\[range]",
+! "\\[pattern]", "\\\\bar", "/\\\\%\\$",
+! "s/\\\\\\~", "s/\\\\U", "s/\\\\L",
+! "s/\\\\1", "s/\\\\2", "s/\\\\3", "s/\\\\9"};
+ int flags;
+
+ d = IObuff; /* assume IObuff is long enough! */
+***************
+*** 5982,5988 ****
+ /* Replace:
+ * "[:...:]" with "\[:...:]"
+ * "[++...]" with "\[++...]"
+! * "\{" with "\\{"
+ */
+ if ((arg[0] == '[' && (arg[1] == ':'
+ || (arg[1] == '+' && arg[2] == '+')))
+--- 5986,5992 ----
+ /* Replace:
+ * "[:...:]" with "\[:...:]"
+ * "[++...]" with "\[++...]"
+! * "\{" with "\\{" -- matching "} \}"
+ */
+ if ((arg[0] == '[' && (arg[1] == ':'
+ || (arg[1] == '+' && arg[2] == '+')))
+*** ../vim-7.4.169/src/version.c 2014-02-05 22:46:49.062587842 +0100
+--- src/version.c 2014-02-11 11:41:50.433919875 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 170,
+ /**/
+
+--
+ GALAHAD turns back. We see from his POV the lovely ZOOT standing by him
+ smiling enchantingly and a number of equally delectable GIRLIES draped
+ around in the seductively poulticed room. They look at him smilingly and
+ wave.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.171 b/patches/source/vim/patches/7.4.171
new file mode 100644
index 000000000..cfd390690
--- /dev/null
+++ b/patches/source/vim/patches/7.4.171
@@ -0,0 +1,841 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.171
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.171
+Problem: Redo does not set v:count and v:count1.
+Solution: Use a separate buffer for redo, so that we can set the counts when
+ performing redo.
+Files: src/getchar.c, src/globals.h, src/normal.c, src/proto/getchar.pro,
+ src/structs.h
+
+
+*** ../vim-7.4.170/src/getchar.c 2013-06-29 13:43:27.000000000 +0200
+--- src/getchar.c 2014-02-11 14:54:46.830097259 +0100
+***************
+*** 40,52 ****
+
+ #define MINIMAL_SIZE 20 /* minimal size for b_str */
+
+! static struct buffheader redobuff = {{NULL, {NUL}}, NULL, 0, 0};
+! static struct buffheader old_redobuff = {{NULL, {NUL}}, NULL, 0, 0};
+ #if defined(FEAT_AUTOCMD) || defined(FEAT_EVAL) || defined(PROTO)
+! static struct buffheader save_redobuff = {{NULL, {NUL}}, NULL, 0, 0};
+! static struct buffheader save_old_redobuff = {{NULL, {NUL}}, NULL, 0, 0};
+ #endif
+! static struct buffheader recordbuff = {{NULL, {NUL}}, NULL, 0, 0};
+
+ static int typeahead_char = 0; /* typeahead char that's not flushed */
+
+--- 40,52 ----
+
+ #define MINIMAL_SIZE 20 /* minimal size for b_str */
+
+! static buffheader_T redobuff = {{NULL, {NUL}}, NULL, 0, 0};
+! static buffheader_T old_redobuff = {{NULL, {NUL}}, NULL, 0, 0};
+ #if defined(FEAT_AUTOCMD) || defined(FEAT_EVAL) || defined(PROTO)
+! static buffheader_T save_redobuff = {{NULL, {NUL}}, NULL, 0, 0};
+! static buffheader_T save_old_redobuff = {{NULL, {NUL}}, NULL, 0, 0};
+ #endif
+! static buffheader_T recordbuff = {{NULL, {NUL}}, NULL, 0, 0};
+
+ static int typeahead_char = 0; /* typeahead char that's not flushed */
+
+***************
+*** 112,122 ****
+
+ static int last_recorded_len = 0; /* number of last recorded chars */
+
+! static char_u *get_buffcont __ARGS((struct buffheader *, int));
+! static void add_buff __ARGS((struct buffheader *, char_u *, long n));
+! static void add_num_buff __ARGS((struct buffheader *, long));
+! static void add_char_buff __ARGS((struct buffheader *, int));
+! static int read_stuff __ARGS((int advance));
+ static void start_stuff __ARGS((void));
+ static int read_redo __ARGS((int, int));
+ static void copy_redo __ARGS((int));
+--- 112,123 ----
+
+ static int last_recorded_len = 0; /* number of last recorded chars */
+
+! static char_u *get_buffcont __ARGS((buffheader_T *, int));
+! static void add_buff __ARGS((buffheader_T *, char_u *, long n));
+! static void add_num_buff __ARGS((buffheader_T *, long));
+! static void add_char_buff __ARGS((buffheader_T *, int));
+! static int read_readbuffers __ARGS((int advance));
+! static int read_readbuf __ARGS((buffheader_T *buf, int advance));
+ static void start_stuff __ARGS((void));
+ static int read_redo __ARGS((int, int));
+ static void copy_redo __ARGS((int));
+***************
+*** 137,145 ****
+ */
+ void
+ free_buff(buf)
+! struct buffheader *buf;
+ {
+! struct buffblock *p, *np;
+
+ for (p = buf->bh_first.b_next; p != NULL; p = np)
+ {
+--- 138,146 ----
+ */
+ void
+ free_buff(buf)
+! buffheader_T *buf;
+ {
+! buffblock_T *p, *np;
+
+ for (p = buf->bh_first.b_next; p != NULL; p = np)
+ {
+***************
+*** 155,168 ****
+ */
+ static char_u *
+ get_buffcont(buffer, dozero)
+! struct buffheader *buffer;
+ int dozero; /* count == zero is not an error */
+ {
+ long_u count = 0;
+ char_u *p = NULL;
+ char_u *p2;
+ char_u *str;
+! struct buffblock *bp;
+
+ /* compute the total length of the string */
+ for (bp = buffer->bh_first.b_next; bp != NULL; bp = bp->b_next)
+--- 156,169 ----
+ */
+ static char_u *
+ get_buffcont(buffer, dozero)
+! buffheader_T *buffer;
+ int dozero; /* count == zero is not an error */
+ {
+ long_u count = 0;
+ char_u *p = NULL;
+ char_u *p2;
+ char_u *str;
+! buffblock_T *bp;
+
+ /* compute the total length of the string */
+ for (bp = buffer->bh_first.b_next; bp != NULL; bp = bp->b_next)
+***************
+*** 230,240 ****
+ */
+ static void
+ add_buff(buf, s, slen)
+! struct buffheader *buf;
+ char_u *s;
+ long slen; /* length of "s" or -1 */
+ {
+! struct buffblock *p;
+ long_u len;
+
+ if (slen < 0)
+--- 231,241 ----
+ */
+ static void
+ add_buff(buf, s, slen)
+! buffheader_T *buf;
+ char_u *s;
+ long slen; /* length of "s" or -1 */
+ {
+! buffblock_T *p;
+ long_u len;
+
+ if (slen < 0)
+***************
+*** 270,276 ****
+ len = MINIMAL_SIZE;
+ else
+ len = slen;
+! p = (struct buffblock *)lalloc((long_u)(sizeof(struct buffblock) + len),
+ TRUE);
+ if (p == NULL)
+ return; /* no space, just forget it */
+--- 271,277 ----
+ len = MINIMAL_SIZE;
+ else
+ len = slen;
+! p = (buffblock_T *)lalloc((long_u)(sizeof(buffblock_T) + len),
+ TRUE);
+ if (p == NULL)
+ return; /* no space, just forget it */
+***************
+*** 289,295 ****
+ */
+ static void
+ add_num_buff(buf, n)
+! struct buffheader *buf;
+ long n;
+ {
+ char_u number[32];
+--- 290,296 ----
+ */
+ static void
+ add_num_buff(buf, n)
+! buffheader_T *buf;
+ long n;
+ {
+ char_u number[32];
+***************
+*** 304,310 ****
+ */
+ static void
+ add_char_buff(buf, c)
+! struct buffheader *buf;
+ int c;
+ {
+ #ifdef FEAT_MBYTE
+--- 305,311 ----
+ */
+ static void
+ add_char_buff(buf, c)
+! buffheader_T *buf;
+ int c;
+ {
+ #ifdef FEAT_MBYTE
+***************
+*** 354,399 ****
+ #endif
+ }
+
+ /*
+! * Get one byte from the stuff buffer.
+ * If advance == TRUE go to the next char.
+ * No translation is done K_SPECIAL and CSI are escaped.
+ */
+ static int
+! read_stuff(advance)
+ int advance;
+ {
+! char_u c;
+! struct buffblock *curr;
+
+! if (stuffbuff.bh_first.b_next == NULL) /* buffer is empty */
+ return NUL;
+
+! curr = stuffbuff.bh_first.b_next;
+! c = curr->b_str[stuffbuff.bh_index];
+
+ if (advance)
+ {
+! if (curr->b_str[++stuffbuff.bh_index] == NUL)
+ {
+! stuffbuff.bh_first.b_next = curr->b_next;
+ vim_free(curr);
+! stuffbuff.bh_index = 0;
+ }
+ }
+ return c;
+ }
+
+ /*
+! * Prepare the stuff buffer for reading (if it contains something).
+ */
+ static void
+ start_stuff()
+ {
+! if (stuffbuff.bh_first.b_next != NULL)
+ {
+! stuffbuff.bh_curr = &(stuffbuff.bh_first);
+! stuffbuff.bh_space = 0;
+ }
+ }
+
+--- 355,425 ----
+ #endif
+ }
+
++ /* First read ahead buffer. Used for translated commands. */
++ static buffheader_T readbuf1 = {{NULL, {NUL}}, NULL, 0, 0};
++
++ /* Second read ahead buffer. Used for redo. */
++ static buffheader_T readbuf2 = {{NULL, {NUL}}, NULL, 0, 0};
++
+ /*
+! * Get one byte from the read buffers. Use readbuf1 one first, use readbuf2
+! * if that one is empty.
+ * If advance == TRUE go to the next char.
+ * No translation is done K_SPECIAL and CSI are escaped.
+ */
+ static int
+! read_readbuffers(advance)
+ int advance;
+ {
+! int c;
+!
+! c = read_readbuf(&readbuf1, advance);
+! if (c == NUL)
+! c = read_readbuf(&readbuf2, advance);
+! return c;
+! }
+!
+! static int
+! read_readbuf(buf, advance)
+! buffheader_T *buf;
+! int advance;
+! {
+! char_u c;
+! buffblock_T *curr;
+
+! if (buf->bh_first.b_next == NULL) /* buffer is empty */
+ return NUL;
+
+! curr = buf->bh_first.b_next;
+! c = curr->b_str[buf->bh_index];
+
+ if (advance)
+ {
+! if (curr->b_str[++buf->bh_index] == NUL)
+ {
+! buf->bh_first.b_next = curr->b_next;
+ vim_free(curr);
+! buf->bh_index = 0;
+ }
+ }
+ return c;
+ }
+
+ /*
+! * Prepare the read buffers for reading (if they contains something).
+ */
+ static void
+ start_stuff()
+ {
+! if (readbuf1.bh_first.b_next != NULL)
+ {
+! readbuf1.bh_curr = &(readbuf1.bh_first);
+! readbuf1.bh_space = 0;
+! }
+! if (readbuf2.bh_first.b_next != NULL)
+! {
+! readbuf2.bh_curr = &(readbuf2.bh_first);
+! readbuf2.bh_space = 0;
+ }
+ }
+
+***************
+*** 403,409 ****
+ int
+ stuff_empty()
+ {
+! return (stuffbuff.bh_first.b_next == NULL);
+ }
+
+ /*
+--- 429,446 ----
+ int
+ stuff_empty()
+ {
+! return (readbuf1.bh_first.b_next == NULL
+! && readbuf2.bh_first.b_next == NULL);
+! }
+!
+! /*
+! * Return TRUE if readbuf1 is empty. There may still be redo characters in
+! * redbuf2.
+! */
+! int
+! readbuf1_empty()
+! {
+! return (readbuf1.bh_first.b_next == NULL);
+ }
+
+ /*
+***************
+*** 428,434 ****
+ init_typebuf();
+
+ start_stuff();
+! while (read_stuff(TRUE) != NUL)
+ ;
+
+ if (flush_typeahead) /* remove all typeahead */
+--- 465,471 ----
+ init_typebuf();
+
+ start_stuff();
+! while (read_readbuffers(TRUE) != NUL)
+ ;
+
+ if (flush_typeahead) /* remove all typeahead */
+***************
+*** 483,489 ****
+ redobuff = old_redobuff;
+ old_redobuff.bh_first.b_next = NULL;
+ start_stuff();
+! while (read_stuff(TRUE) != NUL)
+ ;
+ }
+ }
+--- 520,526 ----
+ redobuff = old_redobuff;
+ old_redobuff.bh_first.b_next = NULL;
+ start_stuff();
+! while (read_readbuffers(TRUE) != NUL)
+ ;
+ }
+ }
+***************
+*** 638,644 ****
+ stuffReadbuff(s)
+ char_u *s;
+ {
+! add_buff(&stuffbuff, s, -1L);
+ }
+
+ void
+--- 675,681 ----
+ stuffReadbuff(s)
+ char_u *s;
+ {
+! add_buff(&readbuf1, s, -1L);
+ }
+
+ void
+***************
+*** 646,652 ****
+ char_u *s;
+ long len;
+ {
+! add_buff(&stuffbuff, s, len);
+ }
+
+ #if defined(FEAT_EVAL) || defined(PROTO)
+--- 683,689 ----
+ char_u *s;
+ long len;
+ {
+! add_buff(&readbuf1, s, len);
+ }
+
+ #if defined(FEAT_EVAL) || defined(PROTO)
+***************
+*** 692,698 ****
+ stuffcharReadbuff(c)
+ int c;
+ {
+! add_char_buff(&stuffbuff, c);
+ }
+
+ /*
+--- 729,735 ----
+ stuffcharReadbuff(c)
+ int c;
+ {
+! add_char_buff(&readbuf1, c);
+ }
+
+ /*
+***************
+*** 702,708 ****
+ stuffnumReadbuff(n)
+ long n;
+ {
+! add_num_buff(&stuffbuff, n);
+ }
+
+ /*
+--- 739,745 ----
+ stuffnumReadbuff(n)
+ long n;
+ {
+! add_num_buff(&readbuf1, n);
+ }
+
+ /*
+***************
+*** 718,730 ****
+ int init;
+ int old_redo;
+ {
+! static struct buffblock *bp;
+! static char_u *p;
+! int c;
+ #ifdef FEAT_MBYTE
+! int n;
+! char_u buf[MB_MAXBYTES + 1];
+! int i;
+ #endif
+
+ if (init)
+--- 755,767 ----
+ int init;
+ int old_redo;
+ {
+! static buffblock_T *bp;
+! static char_u *p;
+! int c;
+ #ifdef FEAT_MBYTE
+! int n;
+! char_u buf[MB_MAXBYTES + 1];
+! int i;
+ #endif
+
+ if (init)
+***************
+*** 795,805 ****
+ int c;
+
+ while ((c = read_redo(FALSE, old_redo)) != NUL)
+! stuffcharReadbuff(c);
+ }
+
+ /*
+! * Stuff the redo buffer into the stuffbuff.
+ * Insert the redo count into the command.
+ * If "old_redo" is TRUE, the last but one command is repeated
+ * instead of the last command (inserting text). This is used for
+--- 832,842 ----
+ int c;
+
+ while ((c = read_redo(FALSE, old_redo)) != NUL)
+! add_char_buff(&readbuf2, c);
+ }
+
+ /*
+! * Stuff the redo buffer into readbuf2.
+ * Insert the redo count into the command.
+ * If "old_redo" is TRUE, the last but one command is repeated
+ * instead of the last command (inserting text). This is used for
+***************
+*** 823,835 ****
+ /* copy the buffer name, if present */
+ if (c == '"')
+ {
+! add_buff(&stuffbuff, (char_u *)"\"", 1L);
+ c = read_redo(FALSE, old_redo);
+
+ /* if a numbered buffer is used, increment the number */
+ if (c >= '1' && c < '9')
+ ++c;
+! add_char_buff(&stuffbuff, c);
+ c = read_redo(FALSE, old_redo);
+ }
+
+--- 860,872 ----
+ /* copy the buffer name, if present */
+ if (c == '"')
+ {
+! add_buff(&readbuf2, (char_u *)"\"", 1L);
+ c = read_redo(FALSE, old_redo);
+
+ /* if a numbered buffer is used, increment the number */
+ if (c >= '1' && c < '9')
+ ++c;
+! add_char_buff(&readbuf2, c);
+ c = read_redo(FALSE, old_redo);
+ }
+
+***************
+*** 850,867 ****
+ {
+ while (VIM_ISDIGIT(c)) /* skip "old" count */
+ c = read_redo(FALSE, old_redo);
+! add_num_buff(&stuffbuff, count);
+ }
+
+ /* copy from the redo buffer into the stuff buffer */
+! add_char_buff(&stuffbuff, c);
+ copy_redo(old_redo);
+ return OK;
+ }
+
+ /*
+ * Repeat the last insert (R, o, O, a, A, i or I command) by stuffing
+! * the redo buffer into the stuffbuff.
+ * return FAIL for failure, OK otherwise
+ */
+ int
+--- 887,904 ----
+ {
+ while (VIM_ISDIGIT(c)) /* skip "old" count */
+ c = read_redo(FALSE, old_redo);
+! add_num_buff(&readbuf2, count);
+ }
+
+ /* copy from the redo buffer into the stuff buffer */
+! add_char_buff(&readbuf2, c);
+ copy_redo(old_redo);
+ return OK;
+ }
+
+ /*
+ * Repeat the last insert (R, o, O, a, A, i or I command) by stuffing
+! * the redo buffer into readbuf2.
+ * return FAIL for failure, OK otherwise
+ */
+ int
+***************
+*** 879,885 ****
+ if (vim_strchr((char_u *)"AaIiRrOo", c) != NULL)
+ {
+ if (c == 'O' || c == 'o')
+! stuffReadbuff(NL_STR);
+ break;
+ }
+ }
+--- 916,922 ----
+ if (vim_strchr((char_u *)"AaIiRrOo", c) != NULL)
+ {
+ if (c == 'O' || c == 'o')
+! add_buff(&readbuf2, NL_STR, -1L);
+ break;
+ }
+ }
+***************
+*** 1360,1367 ****
+ tp->old_mod_mask = old_mod_mask;
+ old_char = -1;
+
+! tp->save_stuffbuff = stuffbuff;
+! stuffbuff.bh_first.b_next = NULL;
+ # ifdef USE_INPUT_BUF
+ tp->save_inputbuf = get_input_buf();
+ # endif
+--- 1397,1406 ----
+ tp->old_mod_mask = old_mod_mask;
+ old_char = -1;
+
+! tp->save_readbuf1 = readbuf1;
+! readbuf1.bh_first.b_next = NULL;
+! tp->save_readbuf2 = readbuf2;
+! readbuf2.bh_first.b_next = NULL;
+ # ifdef USE_INPUT_BUF
+ tp->save_inputbuf = get_input_buf();
+ # endif
+***************
+*** 1384,1391 ****
+ old_char = tp->old_char;
+ old_mod_mask = tp->old_mod_mask;
+
+! free_buff(&stuffbuff);
+! stuffbuff = tp->save_stuffbuff;
+ # ifdef USE_INPUT_BUF
+ set_input_buf(tp->save_inputbuf);
+ # endif
+--- 1423,1432 ----
+ old_char = tp->old_char;
+ old_mod_mask = tp->old_mod_mask;
+
+! free_buff(&readbuf1);
+! readbuf1 = tp->save_readbuf1;
+! free_buff(&readbuf2);
+! readbuf2 = tp->save_readbuf2;
+ # ifdef USE_INPUT_BUF
+ set_input_buf(tp->save_inputbuf);
+ # endif
+***************
+*** 1992,1998 ****
+ typeahead_char = 0;
+ }
+ else
+! c = read_stuff(advance);
+ if (c != NUL && !got_int)
+ {
+ if (advance)
+--- 2033,2039 ----
+ typeahead_char = 0;
+ }
+ else
+! c = read_readbuffers(advance);
+ if (c != NUL && !got_int)
+ {
+ if (advance)
+*** ../vim-7.4.170/src/globals.h 2013-11-09 03:31:45.000000000 +0100
+--- src/globals.h 2014-02-11 14:17:44.070063200 +0100
+***************
+*** 979,989 ****
+ EXTERN int readonlymode INIT(= FALSE); /* Set to TRUE for "view" */
+ EXTERN int recoverymode INIT(= FALSE); /* Set to TRUE for "-r" option */
+
+- EXTERN struct buffheader stuffbuff /* stuff buffer */
+- #ifdef DO_INIT
+- = {{NULL, {NUL}}, NULL, 0, 0}
+- #endif
+- ;
+ EXTERN typebuf_T typebuf /* typeahead buffer */
+ #ifdef DO_INIT
+ = {NULL, NULL, 0, 0, 0, 0, 0, 0, 0}
+--- 979,984 ----
+*** ../vim-7.4.170/src/normal.c 2014-01-14 13:18:53.000000000 +0100
+--- src/normal.c 2014-02-11 14:53:54.246096453 +0100
+***************
+*** 655,662 ****
+ #ifdef FEAT_EVAL
+ /* Set v:count here, when called from main() and not a stuffed
+ * command, so that v:count can be used in an expression mapping
+! * when there is no count. */
+! if (toplevel && stuff_empty())
+ set_vcount_ca(&ca, &set_prevcount);
+ #endif
+
+--- 655,662 ----
+ #ifdef FEAT_EVAL
+ /* Set v:count here, when called from main() and not a stuffed
+ * command, so that v:count can be used in an expression mapping
+! * when there is no count. Do set it for redo. */
+! if (toplevel && readbuf1_empty())
+ set_vcount_ca(&ca, &set_prevcount);
+ #endif
+
+***************
+*** 736,743 ****
+ #ifdef FEAT_EVAL
+ /* Set v:count here, when called from main() and not a stuffed
+ * command, so that v:count can be used in an expression mapping
+! * right after the count. */
+! if (toplevel && stuff_empty())
+ set_vcount_ca(&ca, &set_prevcount);
+ #endif
+ if (ctrl_w)
+--- 736,743 ----
+ #ifdef FEAT_EVAL
+ /* Set v:count here, when called from main() and not a stuffed
+ * command, so that v:count can be used in an expression mapping
+! * right after the count. Do set it for redo. */
+! if (toplevel && readbuf1_empty())
+ set_vcount_ca(&ca, &set_prevcount);
+ #endif
+ if (ctrl_w)
+***************
+*** 819,826 ****
+ #ifdef FEAT_EVAL
+ /*
+ * Only set v:count when called from main() and not a stuffed command.
+ */
+! if (toplevel && stuff_empty())
+ set_vcount(ca.count0, ca.count1, set_prevcount);
+ #endif
+
+--- 819,827 ----
+ #ifdef FEAT_EVAL
+ /*
+ * Only set v:count when called from main() and not a stuffed command.
++ * Do set it for redo.
+ */
+! if (toplevel && readbuf1_empty())
+ set_vcount(ca.count0, ca.count1, set_prevcount);
+ #endif
+
+*** ../vim-7.4.170/src/proto/getchar.pro 2013-08-10 13:37:12.000000000 +0200
+--- src/proto/getchar.pro 2014-02-11 14:55:14.806097687 +0100
+***************
+*** 1,8 ****
+ /* getchar.c */
+! void free_buff __ARGS((struct buffheader *buf));
+ char_u *get_recorded __ARGS((void));
+ char_u *get_inserted __ARGS((void));
+ int stuff_empty __ARGS((void));
+ void typeahead_noflush __ARGS((int c));
+ void flush_buffers __ARGS((int flush_typeahead));
+ void ResetRedobuff __ARGS((void));
+--- 1,9 ----
+ /* getchar.c */
+! void free_buff __ARGS((buffheader_T *buf));
+ char_u *get_recorded __ARGS((void));
+ char_u *get_inserted __ARGS((void));
+ int stuff_empty __ARGS((void));
++ int readbuf1_empty __ARGS((void));
+ void typeahead_noflush __ARGS((int c));
+ void flush_buffers __ARGS((int flush_typeahead));
+ void ResetRedobuff __ARGS((void));
+*** ../vim-7.4.170/src/structs.h 2013-11-12 04:43:57.000000000 +0100
+--- src/structs.h 2014-02-11 14:35:43.606079741 +0100
+***************
+*** 471,483 ****
+ blocknr_T nt_new_bnum; /* new, positive, number */
+ };
+
+ /*
+ * structure used to store one block of the stuff/redo/recording buffers
+ */
+ struct buffblock
+ {
+! struct buffblock *b_next; /* pointer to next buffblock */
+! char_u b_str[1]; /* contents (actually longer) */
+ };
+
+ /*
+--- 471,487 ----
+ blocknr_T nt_new_bnum; /* new, positive, number */
+ };
+
++
++ typedef struct buffblock buffblock_T;
++ typedef struct buffheader buffheader_T;
++
+ /*
+ * structure used to store one block of the stuff/redo/recording buffers
+ */
+ struct buffblock
+ {
+! buffblock_T *b_next; /* pointer to next buffblock */
+! char_u b_str[1]; /* contents (actually longer) */
+ };
+
+ /*
+***************
+*** 485,494 ****
+ */
+ struct buffheader
+ {
+! struct buffblock bh_first; /* first (dummy) block of list */
+! struct buffblock *bh_curr; /* buffblock for appending */
+! int bh_index; /* index for reading */
+! int bh_space; /* space in bh_curr for appending */
+ };
+
+ /*
+--- 489,498 ----
+ */
+ struct buffheader
+ {
+! buffblock_T bh_first; /* first (dummy) block of list */
+! buffblock_T *bh_curr; /* buffblock for appending */
+! int bh_index; /* index for reading */
+! int bh_space; /* space in bh_curr for appending */
+ };
+
+ /*
+***************
+*** 964,970 ****
+ int typebuf_valid; /* TRUE when save_typebuf valid */
+ int old_char;
+ int old_mod_mask;
+! struct buffheader save_stuffbuff;
+ #ifdef USE_INPUT_BUF
+ char_u *save_inputbuf;
+ #endif
+--- 968,975 ----
+ int typebuf_valid; /* TRUE when save_typebuf valid */
+ int old_char;
+ int old_mod_mask;
+! buffheader_T save_readbuf1;
+! buffheader_T save_readbuf2;
+ #ifdef USE_INPUT_BUF
+ char_u *save_inputbuf;
+ #endif
+*** ../vim-7.4.170/src/version.c 2014-02-11 12:15:39.781950970 +0100
+--- src/version.c 2014-02-11 15:05:17.306106920 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 171,
+ /**/
+
+--
+Linux is just like a wigwam: no Windows, no Gates and an Apache inside.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.172 b/patches/source/vim/patches/7.4.172
new file mode 100644
index 000000000..8ad9fca23
--- /dev/null
+++ b/patches/source/vim/patches/7.4.172
@@ -0,0 +1,346 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.172
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.172
+Problem: The blowfish code mentions output feedback, but the code is
+ actually doing cipher feedback.
+Solution: Adjust names and comments.
+Files: src/blowfish.c, src/fileio.c, src/proto/blowfish.pro,
+ src/memline.c
+
+
+*** ../vim-7.4.171/src/blowfish.c 2010-12-17 19:58:18.000000000 +0100
+--- src/blowfish.c 2014-02-11 15:18:12.882118804 +0100
+***************
+*** 6,12 ****
+ * Do ":help credits" in Vim to see a list of people who contributed.
+ * See README.txt for an overview of the Vim source code.
+ *
+! * Blowfish encryption for Vim; in Blowfish output feedback mode.
+ * Contributed by Mohsin Ahmed, http://www.cs.albany.edu/~mosh
+ * Based on http://www.schneier.com/blowfish.html by Bruce Schneier.
+ */
+--- 6,12 ----
+ * Do ":help credits" in Vim to see a list of people who contributed.
+ * See README.txt for an overview of the Vim source code.
+ *
+! * Blowfish encryption for Vim; in Blowfish cipher feedback mode.
+ * Contributed by Mohsin Ahmed, http://www.cs.albany.edu/~mosh
+ * Based on http://www.schneier.com/blowfish.html by Bruce Schneier.
+ */
+***************
+*** 19,25 ****
+
+ #define BF_BLOCK 8
+ #define BF_BLOCK_MASK 7
+! #define BF_OFB_LEN (8*(BF_BLOCK))
+
+ typedef union {
+ UINT32_T ul[2];
+--- 19,25 ----
+
+ #define BF_BLOCK 8
+ #define BF_BLOCK_MASK 7
+! #define BF_CFB_LEN (8*(BF_BLOCK))
+
+ typedef union {
+ UINT32_T ul[2];
+***************
+*** 554,595 ****
+ return err > 0 ? FAIL : OK;
+ }
+
+! /* Output feedback mode. */
+ static int randbyte_offset = 0;
+ static int update_offset = 0;
+! static char_u ofb_buffer[BF_OFB_LEN]; /* 64 bytes */
+
+ /*
+ * Initialize with seed "iv[iv_len]".
+ */
+ void
+! bf_ofb_init(iv, iv_len)
+ char_u *iv;
+ int iv_len;
+ {
+ int i, mi;
+
+ randbyte_offset = update_offset = 0;
+! vim_memset(ofb_buffer, 0, BF_OFB_LEN);
+ if (iv_len > 0)
+ {
+! mi = iv_len > BF_OFB_LEN ? iv_len : BF_OFB_LEN;
+ for (i = 0; i < mi; i++)
+! ofb_buffer[i % BF_OFB_LEN] ^= iv[i % iv_len];
+ }
+ }
+
+! #define BF_OFB_UPDATE(c) { \
+! ofb_buffer[update_offset] ^= (char_u)c; \
+! if (++update_offset == BF_OFB_LEN) \
+ update_offset = 0; \
+ }
+
+ #define BF_RANBYTE(t) { \
+ if ((randbyte_offset & BF_BLOCK_MASK) == 0) \
+! bf_e_cblock(&ofb_buffer[randbyte_offset]); \
+! t = ofb_buffer[randbyte_offset]; \
+! if (++randbyte_offset == BF_OFB_LEN) \
+ randbyte_offset = 0; \
+ }
+
+--- 554,595 ----
+ return err > 0 ? FAIL : OK;
+ }
+
+! /* Cipher feedback mode. */
+ static int randbyte_offset = 0;
+ static int update_offset = 0;
+! static char_u cfb_buffer[BF_CFB_LEN]; /* 64 bytes */
+
+ /*
+ * Initialize with seed "iv[iv_len]".
+ */
+ void
+! bf_cfb_init(iv, iv_len)
+ char_u *iv;
+ int iv_len;
+ {
+ int i, mi;
+
+ randbyte_offset = update_offset = 0;
+! vim_memset(cfb_buffer, 0, BF_CFB_LEN);
+ if (iv_len > 0)
+ {
+! mi = iv_len > BF_CFB_LEN ? iv_len : BF_CFB_LEN;
+ for (i = 0; i < mi; i++)
+! cfb_buffer[i % BF_CFB_LEN] ^= iv[i % iv_len];
+ }
+ }
+
+! #define BF_CFB_UPDATE(c) { \
+! cfb_buffer[update_offset] ^= (char_u)c; \
+! if (++update_offset == BF_CFB_LEN) \
+ update_offset = 0; \
+ }
+
+ #define BF_RANBYTE(t) { \
+ if ((randbyte_offset & BF_BLOCK_MASK) == 0) \
+! bf_e_cblock(&cfb_buffer[randbyte_offset]); \
+! t = cfb_buffer[randbyte_offset]; \
+! if (++randbyte_offset == BF_CFB_LEN) \
+ randbyte_offset = 0; \
+ }
+
+***************
+*** 610,616 ****
+ {
+ ztemp = from[i];
+ BF_RANBYTE(t);
+! BF_OFB_UPDATE(ztemp);
+ to[i] = t ^ ztemp;
+ }
+ }
+--- 610,616 ----
+ {
+ ztemp = from[i];
+ BF_RANBYTE(t);
+! BF_CFB_UPDATE(ztemp);
+ to[i] = t ^ ztemp;
+ }
+ }
+***************
+*** 630,636 ****
+ {
+ BF_RANBYTE(t);
+ *p ^= t;
+! BF_OFB_UPDATE(*p);
+ }
+ }
+
+--- 630,636 ----
+ {
+ BF_RANBYTE(t);
+ *p ^= t;
+! BF_CFB_UPDATE(*p);
+ }
+ }
+
+***************
+*** 646,658 ****
+
+ for (p = passwd; *p != NUL; ++p)
+ {
+! BF_OFB_UPDATE(*p);
+ }
+ }
+
+ static int save_randbyte_offset;
+ static int save_update_offset;
+! static char_u save_ofb_buffer[BF_OFB_LEN];
+ static UINT32_T save_pax[18];
+ static UINT32_T save_sbx[4][256];
+
+--- 646,658 ----
+
+ for (p = passwd; *p != NUL; ++p)
+ {
+! BF_CFB_UPDATE(*p);
+ }
+ }
+
+ static int save_randbyte_offset;
+ static int save_update_offset;
+! static char_u save_cfb_buffer[BF_CFB_LEN];
+ static UINT32_T save_pax[18];
+ static UINT32_T save_sbx[4][256];
+
+***************
+*** 665,671 ****
+ {
+ save_randbyte_offset = randbyte_offset;
+ save_update_offset = update_offset;
+! mch_memmove(save_ofb_buffer, ofb_buffer, BF_OFB_LEN);
+ mch_memmove(save_pax, pax, 4 * 18);
+ mch_memmove(save_sbx, sbx, 4 * 4 * 256);
+ }
+--- 665,671 ----
+ {
+ save_randbyte_offset = randbyte_offset;
+ save_update_offset = update_offset;
+! mch_memmove(save_cfb_buffer, cfb_buffer, BF_CFB_LEN);
+ mch_memmove(save_pax, pax, 4 * 18);
+ mch_memmove(save_sbx, sbx, 4 * 4 * 256);
+ }
+***************
+*** 679,685 ****
+ {
+ randbyte_offset = save_randbyte_offset;
+ update_offset = save_update_offset;
+! mch_memmove(ofb_buffer, save_ofb_buffer, BF_OFB_LEN);
+ mch_memmove(pax, save_pax, 4 * 18);
+ mch_memmove(sbx, save_sbx, 4 * 4 * 256);
+ }
+--- 679,685 ----
+ {
+ randbyte_offset = save_randbyte_offset;
+ update_offset = save_update_offset;
+! mch_memmove(cfb_buffer, save_cfb_buffer, BF_CFB_LEN);
+ mch_memmove(pax, save_pax, 4 * 18);
+ mch_memmove(sbx, save_sbx, 4 * 4 * 256);
+ }
+*** ../vim-7.4.171/src/fileio.c 2013-11-28 18:53:47.000000000 +0100
+--- src/fileio.c 2014-02-11 15:16:57.546117649 +0100
+***************
+*** 2973,2979 ****
+ else
+ {
+ bf_key_init(cryptkey, ptr + CRYPT_MAGIC_LEN, salt_len);
+! bf_ofb_init(ptr + CRYPT_MAGIC_LEN + salt_len, seed_len);
+ }
+
+ /* Remove magic number from the text */
+--- 2973,2979 ----
+ else
+ {
+ bf_key_init(cryptkey, ptr + CRYPT_MAGIC_LEN, salt_len);
+! bf_cfb_init(ptr + CRYPT_MAGIC_LEN + salt_len, seed_len);
+ }
+
+ /* Remove magic number from the text */
+***************
+*** 3025,3031 ****
+ if (fread(buffer, salt_len + seed_len, 1, fp) != 1)
+ return FAIL;
+ bf_key_init(curbuf->b_p_key, buffer, salt_len);
+! bf_ofb_init(buffer + salt_len, seed_len);
+ }
+ return OK;
+ }
+--- 3025,3031 ----
+ if (fread(buffer, salt_len + seed_len, 1, fp) != 1)
+ return FAIL;
+ bf_key_init(curbuf->b_p_key, buffer, salt_len);
+! bf_cfb_init(buffer + salt_len, seed_len);
+ }
+ return OK;
+ }
+***************
+*** 3064,3070 ****
+ seed = salt + salt_len;
+ sha2_seed(salt, salt_len, seed, seed_len);
+ bf_key_init(buf->b_p_key, salt, salt_len);
+! bf_ofb_init(seed, seed_len);
+ }
+ }
+ *lenp = CRYPT_MAGIC_LEN + salt_len + seed_len;
+--- 3064,3070 ----
+ seed = salt + salt_len;
+ sha2_seed(salt, salt_len, seed, seed_len);
+ bf_key_init(buf->b_p_key, salt, salt_len);
+! bf_cfb_init(seed, seed_len);
+ }
+ }
+ *lenp = CRYPT_MAGIC_LEN + salt_len + seed_len;
+*** ../vim-7.4.171/src/proto/blowfish.pro 2013-08-10 13:37:06.000000000 +0200
+--- src/proto/blowfish.pro 2014-02-11 15:18:20.382118919 +0100
+***************
+*** 1,6 ****
+ /* blowfish.c */
+ void bf_key_init __ARGS((char_u *password, char_u *salt, int salt_len));
+! void bf_ofb_init __ARGS((char_u *iv, int iv_len));
+ void bf_crypt_encode __ARGS((char_u *from, size_t len, char_u *to));
+ void bf_crypt_decode __ARGS((char_u *ptr, long len));
+ void bf_crypt_init_keys __ARGS((char_u *passwd));
+--- 1,6 ----
+ /* blowfish.c */
+ void bf_key_init __ARGS((char_u *password, char_u *salt, int salt_len));
+! void bf_cfb_init __ARGS((char_u *iv, int iv_len));
+ void bf_crypt_encode __ARGS((char_u *from, size_t len, char_u *to));
+ void bf_crypt_decode __ARGS((char_u *ptr, long len));
+ void bf_crypt_init_keys __ARGS((char_u *passwd));
+*** ../vim-7.4.171/src/memline.c 2013-11-28 17:41:41.000000000 +0100
+--- src/memline.c 2014-02-11 15:17:02.190117720 +0100
+***************
+*** 4914,4920 ****
+ * block for the salt. */
+ vim_snprintf((char *)salt, sizeof(salt), "%ld", (long)offset);
+ bf_key_init(key, salt, (int)STRLEN(salt));
+! bf_ofb_init(seed, MF_SEED_LEN);
+ }
+ }
+
+--- 4914,4920 ----
+ * block for the salt. */
+ vim_snprintf((char *)salt, sizeof(salt), "%ld", (long)offset);
+ bf_key_init(key, salt, (int)STRLEN(salt));
+! bf_cfb_init(seed, MF_SEED_LEN);
+ }
+ }
+
+*** ../vim-7.4.171/src/version.c 2014-02-11 15:10:38.138111836 +0100
+--- src/version.c 2014-02-11 15:16:01.206116786 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 172,
+ /**/
+
+--
+GALAHAD: No look, really, this isn't nescess ...
+PIGLET: We must examine you.
+GALAHAD: There's nothing wrong with ... that.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.173 b/patches/source/vim/patches/7.4.173
new file mode 100644
index 000000000..1756bdcd0
--- /dev/null
+++ b/patches/source/vim/patches/7.4.173
@@ -0,0 +1,61 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.173
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.173
+Problem: When using scrollbind the cursor can end up below the last line.
+ (mvxxc)
+Solution: Reset w_botfill when scrolling up. (Christian Brabandt)
+Files: src/move.c
+
+
+*** ../vim-7.4.172/src/move.c 2012-11-28 18:15:42.000000000 +0100
+--- src/move.c 2014-02-11 15:39:24.758138292 +0100
+***************
+*** 2101,2106 ****
+--- 2101,2107 ----
+ int used;
+ lineoff_T loff;
+ lineoff_T boff;
++ linenr_T old_topline = curwin->w_topline;
+
+ loff.lnum = boff.lnum = curwin->w_cursor.lnum;
+ #ifdef FEAT_FOLDING
+***************
+*** 2156,2161 ****
+--- 2157,2164 ----
+ curwin->w_topline = topline;
+ #ifdef FEAT_DIFF
+ curwin->w_topfill = topfill;
++ if (old_topline > curwin->w_topline + curwin->w_height)
++ curwin->w_botfill = FALSE;
+ check_topfill(curwin, FALSE);
+ #endif
+ curwin->w_valid &= ~(VALID_WROW|VALID_CROW|VALID_BOTLINE|VALID_BOTLINE_AP);
+*** ../vim-7.4.172/src/version.c 2014-02-11 15:23:27.942123631 +0100
+--- src/version.c 2014-02-11 15:38:34.562137523 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 173,
+ /**/
+
+--
+ GALAHAD hurries to the door and pushes through it. As he leaves the room
+ we CUT TO the reverse to show that he is now in a room full of bathing
+ and romping GIRLIES, all innocent, wide-eyed and beautiful. They smile
+ enchantingly at him as he tries to keep walking without being diverted by
+ the lovely sights assaulting his eyeballs.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.174 b/patches/source/vim/patches/7.4.174
new file mode 100644
index 000000000..827e65cd8
--- /dev/null
+++ b/patches/source/vim/patches/7.4.174
@@ -0,0 +1,94 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.174
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.174
+Problem: Compiler warnings for Python interface. (Tony Mechelynck)
+Solution: Add type casts, initialize variable.
+Files: src/if_py_both.h
+
+
+*** ../vim-7.4.173/src/if_py_both.h 2014-01-31 14:53:59.715533645 +0100
+--- src/if_py_both.h 2014-02-11 15:57:30.678154932 +0100
+***************
+*** 2368,2374 ****
+ PyInt numreplaced = 0;
+ PyInt numadded = 0;
+ PyInt size;
+! listitem_T **lis;
+
+ size = ListLength(self);
+
+--- 2368,2374 ----
+ PyInt numreplaced = 0;
+ PyInt numadded = 0;
+ PyInt size;
+! listitem_T **lis = NULL;
+
+ size = ListLength(self);
+
+***************
+*** 2503,2510 ****
+ {
+ Py_DECREF(iterator);
+ PyErr_FORMAT(PyExc_ValueError,
+! N_("attempt to assign sequence of size greater then %d "
+! "to extended slice"), slicelen);
+ list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli);
+ PyMem_Free(lis);
+ return -1;
+--- 2503,2510 ----
+ {
+ Py_DECREF(iterator);
+ PyErr_FORMAT(PyExc_ValueError,
+! N_("attempt to assign sequence of size greater then %ld "
+! "to extended slice"), (long)slicelen);
+ list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli);
+ PyMem_Free(lis);
+ return -1;
+***************
+*** 2516,2523 ****
+ if (step != 1 && i != slicelen)
+ {
+ PyErr_FORMAT2(PyExc_ValueError,
+! N_("attempt to assign sequence of size %d to extended slice "
+! "of size %d"), i, slicelen);
+ list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli);
+ PyMem_Free(lis);
+ return -1;
+--- 2516,2523 ----
+ if (step != 1 && i != slicelen)
+ {
+ PyErr_FORMAT2(PyExc_ValueError,
+! N_("attempt to assign sequence of size %ld to extended slice "
+! "of size %ld"), (long)i, (long)slicelen);
+ list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli);
+ PyMem_Free(lis);
+ return -1;
+*** ../vim-7.4.173/src/version.c 2014-02-11 15:47:41.382145902 +0100
+--- src/version.c 2014-02-11 15:59:04.646156372 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 174,
+ /**/
+
+--
+DINGO: You must spank her well and after you have spanked her you
+ may deal with her as you like and then ... spank me.
+AMAZING: And spank me!
+STUNNER: And me.
+LOVELY: And me.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.175 b/patches/source/vim/patches/7.4.175
new file mode 100644
index 000000000..99ca39036
--- /dev/null
+++ b/patches/source/vim/patches/7.4.175
@@ -0,0 +1,180 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.175
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.175
+Problem: When a wide library function fails, falling back to the non-wide
+ function may do the wrong thing.
+Solution: Check the platform, when the wide function is supported don't fall
+ back to the non-wide function. (Ken Takata)
+Files: src/os_mswin.c, src/os_win32.c
+
+
+*** ../vim-7.4.174/src/os_mswin.c 2014-01-14 12:18:41.000000000 +0100
+--- src/os_mswin.c 2014-02-11 17:02:03.002214267 +0100
+***************
+*** 648,654 ****
+ {
+ n = wstat_symlink_aware(wp, (struct _stat *)stp);
+ vim_free(wp);
+! if (n >= 0)
+ return n;
+ /* Retry with non-wide function (for Windows 98). Can't use
+ * GetLastError() here and it's unclear what errno gets set to if
+--- 648,654 ----
+ {
+ n = wstat_symlink_aware(wp, (struct _stat *)stp);
+ vim_free(wp);
+! if (n >= 0 || g_PlatformId == VER_PLATFORM_WIN32_NT)
+ return n;
+ /* Retry with non-wide function (for Windows 98). Can't use
+ * GetLastError() here and it's unclear what errno gets set to if
+***************
+*** 815,822 ****
+ {
+ n = _wchdir(p);
+ vim_free(p);
+! if (n == 0)
+! return 0;
+ /* Retry with non-wide function (for Windows 98). */
+ }
+ }
+--- 815,822 ----
+ {
+ n = _wchdir(p);
+ vim_free(p);
+! if (n == 0 || g_PlatformId == VER_PLATFORM_WIN32_NT)
+! return n;
+ /* Retry with non-wide function (for Windows 98). */
+ }
+ }
+***************
+*** 1942,1949 ****
+
+ shortcut_errorw:
+ vim_free(p);
+! if (hr == S_OK)
+! goto shortcut_end;
+ }
+ }
+ /* Retry with non-wide function (for Windows 98). */
+--- 1942,1948 ----
+
+ shortcut_errorw:
+ vim_free(p);
+! goto shortcut_end;
+ }
+ }
+ /* Retry with non-wide function (for Windows 98). */
+*** ../vim-7.4.174/src/os_win32.c 2014-02-05 14:02:23.590105699 +0100
+--- src/os_win32.c 2014-02-11 16:59:26.810211874 +0100
+***************
+*** 2877,2882 ****
+--- 2877,2884 ----
+ return OK;
+ }
+ }
++ else if (GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
++ return FAIL;
+ /* Retry with non-wide function (for Windows 98). */
+ }
+ #endif
+***************
+*** 2917,2922 ****
+--- 2919,2926 ----
+ return;
+ }
+ }
++ else if (GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
++ return;
+ /* Retry with non-wide function (for Windows 98). */
+ }
+ #endif
+***************
+*** 2966,2971 ****
+--- 2970,2977 ----
+ return OK;
+ }
+ }
++ else if (GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
++ return FAIL;
+ /* Retry with non-wide function (for Windows 98). */
+ }
+ #endif
+***************
+*** 3006,3012 ****
+ {
+ n = _wchmod(p, perm);
+ vim_free(p);
+! if (n == -1 && GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
+ return FAIL;
+ /* Retry with non-wide function (for Windows 98). */
+ }
+--- 3012,3018 ----
+ {
+ n = _wchmod(p, perm);
+ vim_free(p);
+! if (n == -1 && g_PlatformId == VER_PLATFORM_WIN32_NT)
+ return FAIL;
+ /* Retry with non-wide function (for Windows 98). */
+ }
+***************
+*** 6048,6054 ****
+ {
+ f = _wopen(wn, flags, mode);
+ vim_free(wn);
+! if (f >= 0)
+ return f;
+ /* Retry with non-wide function (for Windows 98). Can't use
+ * GetLastError() here and it's unclear what errno gets set to if
+--- 6054,6060 ----
+ {
+ f = _wopen(wn, flags, mode);
+ vim_free(wn);
+! if (f >= 0 || g_PlatformId == VER_PLATFORM_WIN32_NT)
+ return f;
+ /* Retry with non-wide function (for Windows 98). Can't use
+ * GetLastError() here and it's unclear what errno gets set to if
+***************
+*** 6099,6105 ****
+ _set_fmode(oldMode);
+ # endif
+
+! if (f != NULL)
+ return f;
+ /* Retry with non-wide function (for Windows 98). Can't use
+ * GetLastError() here and it's unclear what errno gets set to if
+--- 6105,6111 ----
+ _set_fmode(oldMode);
+ # endif
+
+! if (f != NULL || g_PlatformId == VER_PLATFORM_WIN32_NT)
+ return f;
+ /* Retry with non-wide function (for Windows 98). Can't use
+ * GetLastError() here and it's unclear what errno gets set to if
+*** ../vim-7.4.174/src/version.c 2014-02-11 16:00:31.198157698 +0100
+--- src/version.c 2014-02-11 16:33:10.002187713 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 175,
+ /**/
+
+--
+DINGO: And after the spanking ... the oral sex.
+GALAHAD: Oh, dear! Well, I...
+GIRLS: The oral sex ... The oral sex.
+GALAHAD: Well, I suppose I could stay a BIT longer.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.176 b/patches/source/vim/patches/7.4.176
new file mode 100644
index 000000000..ccde6b682
--- /dev/null
+++ b/patches/source/vim/patches/7.4.176
@@ -0,0 +1,91 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.176
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.176
+Problem: Dictionary.update() thows an error when used without arguments.
+ Python programmers don't expect that.
+Solution: Make Dictionary.update() without arguments do nothing. (ZyX)
+Files: src/if_py_both.h, src/testdir/test86.in, src/testdir/test87.in
+
+
+*** ../vim-7.4.175/src/if_py_both.h 2014-02-11 16:00:31.198157698 +0100
+--- src/if_py_both.h 2014-02-11 18:41:12.774305435 +0100
+***************
+*** 1918,1928 ****
+ }
+ else
+ {
+! PyObject *obj;
+
+! if (!PyArg_ParseTuple(args, "O", &obj))
+ return NULL;
+
+ if (PyObject_HasAttrString(obj, "keys"))
+ return DictionaryUpdate(self, NULL, obj);
+ else
+--- 1919,1935 ----
+ }
+ else
+ {
+! PyObject *obj = NULL;
+
+! if (!PyArg_ParseTuple(args, "|O", &obj))
+ return NULL;
+
++ if (obj == NULL)
++ {
++ Py_INCREF(Py_None);
++ return Py_None;
++ }
++
+ if (PyObject_HasAttrString(obj, "keys"))
+ return DictionaryUpdate(self, NULL, obj);
+ else
+*** ../vim-7.4.175/src/testdir/test86.in 2014-01-14 16:54:53.000000000 +0100
+--- src/testdir/test86.in 2014-02-11 17:25:08.414235496 +0100
+***************
+*** 39,44 ****
+--- 39,45 ----
+ py << EOF
+ d=vim.bindeval('d')
+ d['1']='asd'
++ d.update() # Must not do anything, including throwing errors
+ d.update(b=[1, 2, f])
+ d.update((('-1', {'a': 1}),))
+ d.update({'0': -1})
+*** ../vim-7.4.175/src/testdir/test87.in 2014-01-14 16:54:53.000000000 +0100
+--- src/testdir/test87.in 2014-02-11 17:25:12.602235560 +0100
+***************
+*** 33,38 ****
+--- 33,39 ----
+ py3 << EOF
+ d=vim.bindeval('d')
+ d['1']='asd'
++ d.update() # Must not do anything, including throwing errors
+ d.update(b=[1, 2, f])
+ d.update((('-1', {'a': 1}),))
+ d.update({'0': -1})
+*** ../vim-7.4.175/src/version.c 2014-02-11 17:05:57.282217857 +0100
+--- src/version.c 2014-02-11 18:46:37.518310411 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 176,
+ /**/
+
+--
+"Intelligence has much less practical application than you'd think."
+ -- Scott Adams, Dilbert.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.177 b/patches/source/vim/patches/7.4.177
new file mode 100644
index 000000000..b943a1901
--- /dev/null
+++ b/patches/source/vim/patches/7.4.177
@@ -0,0 +1,48 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.177
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.177
+Problem: Compiler warning for unused variable. (Tony Mechelynck)
+Solution: Add #ifdef.
+Files: src/move.c
+
+
+*** ../vim-7.4.176/src/move.c 2014-02-11 15:47:41.382145902 +0100
+--- src/move.c 2014-02-11 18:13:57.378280376 +0100
+***************
+*** 2101,2107 ****
+--- 2101,2109 ----
+ int used;
+ lineoff_T loff;
+ lineoff_T boff;
++ #ifdef FEAT_DIFF
+ linenr_T old_topline = curwin->w_topline;
++ #endif
+
+ loff.lnum = boff.lnum = curwin->w_cursor.lnum;
+ #ifdef FEAT_FOLDING
+*** ../vim-7.4.176/src/version.c 2014-02-11 18:47:18.682311042 +0100
+--- src/version.c 2014-02-11 18:57:55.110320794 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 177,
+ /**/
+
+--
+The psychic said, "God bless you." I said, "I didn't sneeze." She
+looked deep into my eyes and said, "You will, eventually." And, damn
+if she wasn't right. Two days later, I sneezed. --Ellen Degeneres
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.178 b/patches/source/vim/patches/7.4.178
new file mode 100644
index 000000000..36e2eecea
--- /dev/null
+++ b/patches/source/vim/patches/7.4.178
@@ -0,0 +1,62 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.178
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.178
+Problem: The J command does not update '[ and '] marks. (William Gardner)
+Solution: Set the marks. (Christian Brabandt)
+Files: src/ops.c
+
+
+*** ../vim-7.4.177/src/ops.c 2014-01-14 12:33:32.000000000 +0100
+--- src/ops.c 2014-02-11 19:22:46.538343647 +0100
+***************
+*** 4452,4457 ****
+--- 4452,4463 ----
+ for (t = 0; t < count; ++t)
+ {
+ curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + t));
++ if (t == 0)
++ {
++ /* Set the '[ mark. */
++ curwin->w_buffer->b_op_start.lnum = curwin->w_cursor.lnum;
++ curwin->w_buffer->b_op_start.col = (colnr_T)STRLEN(curr);
++ }
+ #if defined(FEAT_COMMENTS) || defined(PROTO)
+ if (remove_comments)
+ {
+***************
+*** 4568,4573 ****
+--- 4574,4583 ----
+ }
+ ml_replace(curwin->w_cursor.lnum, newp, FALSE);
+
++ /* Set the '] mark. */
++ curwin->w_buffer->b_op_end.lnum = curwin->w_cursor.lnum;
++ curwin->w_buffer->b_op_end.col = (colnr_T)STRLEN(newp);
++
+ /* Only report the change in the first line here, del_lines() will report
+ * the deleted line. */
+ changed_lines(curwin->w_cursor.lnum, currsize,
+*** ../vim-7.4.177/src/version.c 2014-02-11 18:58:05.102320947 +0100
+--- src/version.c 2014-02-11 19:23:59.722344768 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 178,
+ /**/
+
+--
+Eight Megabytes And Continually Swapping.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.179 b/patches/source/vim/patches/7.4.179
new file mode 100644
index 000000000..29b366eec
--- /dev/null
+++ b/patches/source/vim/patches/7.4.179
@@ -0,0 +1,57 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.179
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.179
+Problem: Warning for type-punned pointer. (Tony Mechelynck)
+Solution: Use intermediate variable.
+Files: src/if_py_both.h
+
+
+*** ../vim-7.4.178/src/if_py_both.h 2014-02-11 18:47:18.678311042 +0100
+--- src/if_py_both.h 2014-02-11 18:41:12.774305435 +0100
+***************
+*** 1617,1624 ****
+ }
+ else if (flags & DICT_FLAG_RETURN_BOOL)
+ {
+! Py_INCREF(Py_True);
+! return Py_True;
+ }
+
+ di = dict_lookup(hi);
+--- 1617,1625 ----
+ }
+ else if (flags & DICT_FLAG_RETURN_BOOL)
+ {
+! ret = Py_True;
+! Py_INCREF(ret);
+! return ret;
+ }
+
+ di = dict_lookup(hi);
+*** ../vim-7.4.178/src/version.c 2014-02-11 19:33:03.358353098 +0100
+--- src/version.c 2014-02-12 22:08:16.795819706 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 179,
+ /**/
+
+--
+Luxury. We used to have to get out of the lake at three o'clock in the
+morning, clean the lake, eat a handful of hot gravel, go to work at the
+mill every day for tuppence a month, come home, and Dad would beat us
+around the head and neck with a broken bottle, if we were LUCKY!
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.180 b/patches/source/vim/patches/7.4.180
new file mode 100644
index 000000000..4fa07699d
--- /dev/null
+++ b/patches/source/vim/patches/7.4.180
@@ -0,0 +1,76 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.180
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.180 (after 7.4.174)
+Problem: Older Python versions don't support %ld.
+Solution: Use %d instead. (ZyX)
+Files: src/if_py_both.h
+
+
+*** ../vim-7.4.179/src/if_py_both.h 2014-02-12 22:08:46.055820155 +0100
+--- src/if_py_both.h 2014-02-15 15:56:44.133904982 +0100
+***************
+*** 2510,2517 ****
+ {
+ Py_DECREF(iterator);
+ PyErr_FORMAT(PyExc_ValueError,
+! N_("attempt to assign sequence of size greater then %ld "
+! "to extended slice"), (long)slicelen);
+ list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli);
+ PyMem_Free(lis);
+ return -1;
+--- 2510,2517 ----
+ {
+ Py_DECREF(iterator);
+ PyErr_FORMAT(PyExc_ValueError,
+! N_("attempt to assign sequence of size greater then %d "
+! "to extended slice"), (int) slicelen);
+ list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli);
+ PyMem_Free(lis);
+ return -1;
+***************
+*** 2523,2530 ****
+ if (step != 1 && i != slicelen)
+ {
+ PyErr_FORMAT2(PyExc_ValueError,
+! N_("attempt to assign sequence of size %ld to extended slice "
+! "of size %ld"), (long)i, (long)slicelen);
+ list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli);
+ PyMem_Free(lis);
+ return -1;
+--- 2523,2530 ----
+ if (step != 1 && i != slicelen)
+ {
+ PyErr_FORMAT2(PyExc_ValueError,
+! N_("attempt to assign sequence of size %d to extended slice "
+! "of size %d"), (int) i, (int) slicelen);
+ list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli);
+ PyMem_Free(lis);
+ return -1;
+*** ../vim-7.4.179/src/version.c 2014-02-12 22:08:46.059820155 +0100
+--- src/version.c 2014-02-15 15:58:13.877904839 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 180,
+ /**/
+
+--
+ LAUNCELOT leaps into SHOT with a mighty cry and runs the GUARD through and
+ hacks him to the floor. Blood. Swashbuckling music (perhaps).
+ LAUNCELOT races through into the castle screaming.
+SECOND SENTRY: Hey!
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.181 b/patches/source/vim/patches/7.4.181
new file mode 100644
index 000000000..3668d086b
--- /dev/null
+++ b/patches/source/vim/patches/7.4.181
@@ -0,0 +1,68 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.181
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.181
+Problem: When using 'pastetoggle' the status lines are not updated. (Samuel
+ Ferencik, Jan Christoph Ebersbach)
+Solution: Update the status lines. (Nobuhiro Takasaki)
+Files: src/getchar.c
+
+
+*** ../vim-7.4.180/src/getchar.c 2014-02-11 15:10:38.130111835 +0100
+--- src/getchar.c 2014-02-15 16:14:34.249903278 +0100
+***************
+*** 406,412 ****
+ }
+
+ /*
+! * Prepare the read buffers for reading (if they contains something).
+ */
+ static void
+ start_stuff()
+--- 406,412 ----
+ }
+
+ /*
+! * Prepare the read buffers for reading (if they contain something).
+ */
+ static void
+ start_stuff()
+***************
+*** 2302,2307 ****
+--- 2302,2311 ----
+ msg_row = Rows - 1;
+ msg_clr_eos(); /* clear ruler */
+ }
++ #ifdef FEAT_WINDOWS
++ status_redraw_all();
++ redraw_statuslines();
++ #endif
+ showmode();
+ setcursor();
+ continue;
+*** ../vim-7.4.180/src/version.c 2014-02-15 15:58:55.081904773 +0100
+--- src/version.c 2014-02-15 16:12:22.329903488 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 181,
+ /**/
+
+--
+FIRST GUARD: Ah! Now ... we're not allowed to ...
+ SIR LAUNCELOT runs him through, grabs his spear and stabs the other
+ guard who collapses in a heap. Hiccoughs quietly.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.182 b/patches/source/vim/patches/7.4.182
new file mode 100644
index 000000000..72b41483d
--- /dev/null
+++ b/patches/source/vim/patches/7.4.182
@@ -0,0 +1,56 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.182
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.182
+Problem: Building with mzscheme and racket does not work. (David Chimay)
+Solution: Adjust autoconf. (Sergey Khorev)
+Files: src/configure.in, src/auto/configure
+
+
+*** ../vim-7.4.181/src/configure.in 2013-11-21 12:17:46.000000000 +0100
+--- src/configure.in 2014-02-15 16:21:41.705902597 +0100
+***************
+*** 802,810 ****
+--- 802,820 ----
+ AC_MSG_CHECKING(for mzscheme_base.c)
+ if test -f "${SCHEME_COLLECTS}collects/scheme/base.ss" ; then
+ MZSCHEME_EXTRA="mzscheme_base.c"
++ MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
++ MZSCHEME_MOD="++lib scheme/base"
+ else
+ if test -f "${SCHEME_COLLECTS}collects/scheme/base.rkt" ; then
+ MZSCHEME_EXTRA="mzscheme_base.c"
++ MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
++ MZSCHEME_MOD="++lib scheme/base"
++ else
++ if test -f "${SCHEME_COLLECTS}collects/racket/base.rkt" ; then
++ MZSCHEME_EXTRA="mzscheme_base.c"
++ MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/raco ctool"
++ MZSCHEME_MOD=""
++ fi
+ fi
+ fi
+ if test "X$MZSCHEME_EXTRA" != "X" ; then
+*** ../vim-7.4.181/src/version.c 2014-02-15 16:17:02.213903042 +0100
+--- src/version.c 2014-02-15 16:23:42.505902405 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 182,
+ /**/
+
+--
+Overflow on /dev/null, please empty the bit bucket.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.183 b/patches/source/vim/patches/7.4.183
new file mode 100644
index 000000000..f23061cfc
--- /dev/null
+++ b/patches/source/vim/patches/7.4.183
@@ -0,0 +1,49 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.183
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.183
+Problem: MSVC Visual Studio update not supported.
+Solution: Add version number. (Mike William)
+Files: src/Make_mvc.mak
+
+
+*** ../vim-7.4.182/src/Make_mvc.mak 2013-12-14 11:50:28.000000000 +0100
+--- src/Make_mvc.mak 2014-02-15 19:25:27.333885042 +0100
+***************
+*** 424,429 ****
+--- 424,432 ----
+ !if "$(_NMAKE_VER)" == "11.00.60610.1"
+ MSVCVER = 11.0
+ !endif
++ !if "$(_NMAKE_VER)" == "11.00.61030.0"
++ MSVCVER = 11.0
++ !endif
+ !if "$(_NMAKE_VER)" == "12.00.21005.1"
+ MSVCVER = 12.0
+ !endif
+*** ../vim-7.4.182/src/version.c 2014-02-15 17:18:56.953897128 +0100
+--- src/version.c 2014-02-15 19:31:11.337884494 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 183,
+ /**/
+
+--
+FATHER: Did you kill all those guards?
+LAUNCELOT: Yes ... I'm very sorry ...
+FATHER: They cost fifty pounds each!
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.184 b/patches/source/vim/patches/7.4.184
new file mode 100644
index 000000000..d6ceb64af
--- /dev/null
+++ b/patches/source/vim/patches/7.4.184
@@ -0,0 +1,250 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.184
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.184
+Problem: match() does not work properly with a {count} argument.
+Solution: Compute the length once and update it. Quit the loop when at the
+ end. (Hirohito Higashi)
+Files: src/eval.c, src/testdir/test53.in, src/testdir/test53.ok
+
+
+*** ../vim-7.4.183/src/eval.c 2014-02-05 22:13:02.366556787 +0100
+--- src/eval.c 2014-02-22 22:13:26.644906020 +0100
+***************
+*** 8014,8020 ****
+ {"log10", 1, 1, f_log10},
+ #endif
+ #ifdef FEAT_LUA
+! {"luaeval", 1, 2, f_luaeval},
+ #endif
+ {"map", 2, 2, f_map},
+ {"maparg", 1, 4, f_maparg},
+--- 8014,8020 ----
+ {"log10", 1, 1, f_log10},
+ #endif
+ #ifdef FEAT_LUA
+! {"luaeval", 1, 2, f_luaeval},
+ #endif
+ {"map", 2, 2, f_map},
+ {"maparg", 1, 4, f_maparg},
+***************
+*** 13905,13910 ****
+--- 13905,13911 ----
+ int type;
+ {
+ char_u *str = NULL;
++ long len = 0;
+ char_u *expr = NULL;
+ char_u *pat;
+ regmatch_T regmatch;
+***************
+*** 13944,13950 ****
+--- 13945,13954 ----
+ li = l->lv_first;
+ }
+ else
++ {
+ expr = str = get_tv_string(&argvars[0]);
++ len = (long)STRLEN(str);
++ }
+
+ pat = get_tv_string_buf_chk(&argvars[1], patbuf);
+ if (pat == NULL)
+***************
+*** 13968,13974 ****
+ {
+ if (start < 0)
+ start = 0;
+! if (start > (long)STRLEN(str))
+ goto theend;
+ /* When "count" argument is there ignore matches before "start",
+ * otherwise skip part of the string. Differs when pattern is "^"
+--- 13972,13978 ----
+ {
+ if (start < 0)
+ start = 0;
+! if (start > len)
+ goto theend;
+ /* When "count" argument is there ignore matches before "start",
+ * otherwise skip part of the string. Differs when pattern is "^"
+***************
+*** 13976,13982 ****
+--- 13980,13989 ----
+ if (argvars[3].v_type != VAR_UNKNOWN)
+ startcol = start;
+ else
++ {
+ str += start;
++ len -= start;
++ }
+ }
+
+ if (argvars[3].v_type != VAR_UNKNOWN)
+***************
+*** 14026,14031 ****
+--- 14033,14044 ----
+ #else
+ startcol = (colnr_T)(regmatch.startp[0] + 1 - str);
+ #endif
++ if (startcol > (colnr_T)len
++ || str + startcol <= regmatch.startp[0])
++ {
++ match = FALSE;
++ break;
++ }
+ }
+ }
+
+*** ../vim-7.4.183/src/testdir/test53.in 2013-10-02 21:54:57.000000000 +0200
+--- src/testdir/test53.in 2014-02-22 22:08:24.260906501 +0100
+***************
+*** 4,9 ****
+--- 4,11 ----
+
+ Also test match() and matchstr()
+
++ Also test the gn command and repeating it.
++
+ STARTTEST
+ :so small.vim
+ /^start:/
+***************
+*** 28,33 ****
+--- 30,57 ----
+ :put =matchstr(\"abcd\", \".\", 0, -1) " a
+ :put =match(\"abcd\", \".\", 0, 5) " -1
+ :put =match(\"abcd\", \".\", 0, -1) " 0
++ :put =match('abc', '.', 0, 1) " 0
++ :put =match('abc', '.', 0, 2) " 1
++ :put =match('abc', '.', 0, 3) " 2
++ :put =match('abc', '.', 0, 4) " -1
++ :put =match('abc', '.', 1, 1) " 1
++ :put =match('abc', '.', 2, 1) " 2
++ :put =match('abc', '.', 3, 1) " -1
++ :put =match('abc', '$', 0, 1) " 3
++ :put =match('abc', '$', 0, 2) " -1
++ :put =match('abc', '$', 1, 1) " 3
++ :put =match('abc', '$', 2, 1) " 3
++ :put =match('abc', '$', 3, 1) " 3
++ :put =match('abc', '$', 4, 1) " -1
++ :put =match('abc', '\zs', 0, 1) " 0
++ :put =match('abc', '\zs', 0, 2) " 1
++ :put =match('abc', '\zs', 0, 3) " 2
++ :put =match('abc', '\zs', 0, 4) " 3
++ :put =match('abc', '\zs', 0, 5) " -1
++ :put =match('abc', '\zs', 1, 1) " 1
++ :put =match('abc', '\zs', 2, 1) " 2
++ :put =match('abc', '\zs', 3, 1) " 3
++ :put =match('abc', '\zs', 4, 1) " -1
+ /^foobar
+ gncsearchmatch/one\_s*two\_s
+ :1
+***************
+*** 49,54 ****
+--- 73,84 ----
+ :" Make sure there is no other match y uppercase.
+ /x59
+ gggnd
++ :" test repeating dgn
++ /^Johnny
++ ggdgn.
++ :" test repeating gUgn
++ /^Depp
++ gggUgn.
+ :/^start:/,/^end:/wq! test.out
+ ENDTEST
+
+***************
+*** 81,84 ****
+--- 111,123 ----
+ Y
+ text
+ Y
++ --1
++ Johnny
++ --2
++ Johnny
++ --3
++ Depp
++ --4
++ Depp
++ --5
+ end:
+*** ../vim-7.4.183/src/testdir/test53.ok 2013-10-02 21:54:57.000000000 +0200
+--- src/testdir/test53.ok 2014-02-22 22:08:24.264906501 +0100
+***************
+*** 18,23 ****
+--- 18,45 ----
+ a
+ -1
+ 0
++ 0
++ 1
++ 2
++ -1
++ 1
++ 2
++ -1
++ 3
++ -1
++ 3
++ 3
++ 3
++ -1
++ 0
++ 1
++ 2
++ 3
++ -1
++ 1
++ 2
++ 3
++ -1
+ SEARCH:
+ searchmatch
+ abcdx | | abcdx
+***************
+*** 30,33 ****
+--- 52,64 ----
+
+ text
+ Y
++ --1
++
++ --2
++
++ --3
++ DEPP
++ --4
++ DEPP
++ --5
+ end:
+*** ../vim-7.4.183/src/version.c 2014-02-15 19:47:46.685882910 +0100
+--- src/version.c 2014-02-22 22:10:49.604906270 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 184,
+ /**/
+
+--
+WOMAN: I didn't know we had a king. I thought we were an autonomous
+ collective.
+DENNIS: You're fooling yourself. We're living in a dictatorship. A
+ self-perpetuating autocracy in which the working classes--
+WOMAN: Oh there you go, bringing class into it again.
+DENNIS: That's what it's all about if only people would--
+ The Quest for the Holy Grail (Monty Python)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.185 b/patches/source/vim/patches/7.4.185
new file mode 100644
index 000000000..b326a16df
--- /dev/null
+++ b/patches/source/vim/patches/7.4.185
@@ -0,0 +1,64 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.185
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.185
+Problem: Clang gives warnings.
+Solution: Adjust how bigness is set. (Dominique Pelle)
+Files: src/ex_cmds.c
+
+
+*** ../vim-7.4.184/src/ex_cmds.c 2014-02-11 12:15:39.781950970 +0100
+--- src/ex_cmds.c 2014-02-22 22:25:45.800904843 +0100
+***************
+*** 4099,4110 ****
+ * 'scroll' */
+ if (eap->forceit)
+ bigness = curwin->w_height;
+- else if (firstwin == lastwin)
+- bigness = curwin->w_p_scr * 2;
+ #ifdef FEAT_WINDOWS
+! else
+ bigness = curwin->w_height - 3;
+ #endif
+ if (bigness < 1)
+ bigness = 1;
+
+--- 4099,4110 ----
+ * 'scroll' */
+ if (eap->forceit)
+ bigness = curwin->w_height;
+ #ifdef FEAT_WINDOWS
+! else if (firstwin != lastwin)
+ bigness = curwin->w_height - 3;
+ #endif
++ else
++ bigness = curwin->w_p_scr * 2;
+ if (bigness < 1)
+ bigness = 1;
+
+*** ../vim-7.4.184/src/version.c 2014-02-22 22:18:39.536905522 +0100
+--- src/version.c 2014-02-22 22:22:51.912905120 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 185,
+ /**/
+
+--
+There are 2 kinds of people in my world: those who know Unix, Perl, Vim, GNU,
+Linux, etc, and those who know COBOL. It gets very difficult for me at
+parties, not knowing which group to socialise with :-)
+ Sitaram Chamarty
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.186 b/patches/source/vim/patches/7.4.186
new file mode 100644
index 000000000..84f0a3133
--- /dev/null
+++ b/patches/source/vim/patches/7.4.186
@@ -0,0 +1,164 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.186
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.186 (after 7.4.085)
+Problem: Insert in Visual mode sometimes gives incorrect results.
+ (Dominique Pelle)
+Solution: Remember the original insert start position. (Christian Brabandt,
+ Dominique Pelle)
+Files: src/edit.c, src/globals.h, src/ops.c, src/structs.h
+
+
+*** ../vim-7.4.185/src/edit.c 2014-01-23 22:45:54.608127182 +0100
+--- src/edit.c 2014-02-22 22:43:52.820903112 +0100
+***************
+*** 264,269 ****
+--- 264,270 ----
+
+ static colnr_T Insstart_textlen; /* length of line when insert started */
+ static colnr_T Insstart_blank_vcol; /* vcol for first inserted blank */
++ static int update_Insstart_orig = TRUE; /* set Insstart_orig to Insstart */
+
+ static char_u *last_insert = NULL; /* the text of the previous insert,
+ K_SPECIAL and CSI are escaped */
+***************
+*** 340,345 ****
+--- 341,349 ----
+ * error message */
+ check_for_delay(TRUE);
+
++ /* set Insstart_orig to Insstart */
++ update_Insstart_orig = TRUE;
++
+ #ifdef HAVE_SANDBOX
+ /* Don't allow inserting in the sandbox. */
+ if (sandbox != 0)
+***************
+*** 631,636 ****
+--- 635,643 ----
+ if (arrow_used) /* don't repeat insert when arrow key used */
+ count = 0;
+
++ if (update_Insstart_orig)
++ Insstart_orig = Insstart;
++
+ if (stop_insert_mode)
+ {
+ /* ":stopinsert" used or 'insertmode' reset */
+***************
+*** 6923,6928 ****
+--- 6930,6936 ----
+ if (end_insert_pos != NULL)
+ {
+ curbuf->b_op_start = Insstart;
++ curbuf->b_op_start_orig = Insstart_orig;
+ curbuf->b_op_end = *end_insert_pos;
+ }
+ }
+***************
+*** 8257,8262 ****
+--- 8265,8271 ----
+
+ /* Need to reset Insstart, esp. because a BS that joins
+ * a line to the previous one must save for undo. */
++ update_Insstart_orig = FALSE;
+ Insstart = curwin->w_cursor;
+ break;
+
+*** ../vim-7.4.185/src/globals.h 2014-02-11 15:10:38.130111835 +0100
+--- src/globals.h 2014-02-22 23:02:01.644901378 +0100
+***************
+*** 752,757 ****
+--- 752,763 ----
+ */
+ EXTERN pos_T Insstart; /* This is where the latest
+ * insert/append mode started. */
++
++ /* This is where the latest insert/append mode started. In contrast to
++ * Insstart, this won't be reset by certain keys and is needed for
++ * op_insert(), to detect correctly where inserting by the user started. */
++ EXTERN pos_T Insstart_orig;
++
+ #ifdef FEAT_VREPLACE
+ /*
+ * Stuff for VREPLACE mode.
+*** ../vim-7.4.185/src/ops.c 2014-02-11 19:33:03.358353098 +0100
+--- src/ops.c 2014-02-22 22:39:47.588903502 +0100
+***************
+*** 2643,2662 ****
+
+ /* The user may have moved the cursor before inserting something, try
+ * to adjust the block for that. */
+! if (oap->start.lnum == curbuf->b_op_start.lnum && !bd.is_MAX)
+ {
+ if (oap->op_type == OP_INSERT
+! && oap->start.col != curbuf->b_op_start.col)
+ {
+! oap->start.col = curbuf->b_op_start.col;
+ pre_textlen -= getviscol2(oap->start.col, oap->start.coladd)
+ - oap->start_vcol;
+ oap->start_vcol = getviscol2(oap->start.col, oap->start.coladd);
+ }
+ else if (oap->op_type == OP_APPEND
+! && oap->end.col >= curbuf->b_op_start.col)
+ {
+! oap->start.col = curbuf->b_op_start.col;
+ /* reset pre_textlen to the value of OP_INSERT */
+ pre_textlen += bd.textlen;
+ pre_textlen -= getviscol2(oap->start.col, oap->start.coladd)
+--- 2643,2662 ----
+
+ /* The user may have moved the cursor before inserting something, try
+ * to adjust the block for that. */
+! if (oap->start.lnum == curbuf->b_op_start_orig.lnum && !bd.is_MAX)
+ {
+ if (oap->op_type == OP_INSERT
+! && oap->start.col != curbuf->b_op_start_orig.col)
+ {
+! oap->start.col = curbuf->b_op_start_orig.col;
+ pre_textlen -= getviscol2(oap->start.col, oap->start.coladd)
+ - oap->start_vcol;
+ oap->start_vcol = getviscol2(oap->start.col, oap->start.coladd);
+ }
+ else if (oap->op_type == OP_APPEND
+! && oap->end.col >= curbuf->b_op_start_orig.col)
+ {
+! oap->start.col = curbuf->b_op_start_orig.col;
+ /* reset pre_textlen to the value of OP_INSERT */
+ pre_textlen += bd.textlen;
+ pre_textlen -= getviscol2(oap->start.col, oap->start.coladd)
+*** ../vim-7.4.185/src/structs.h 2014-02-11 15:10:38.138111836 +0100
+--- src/structs.h 2014-02-22 22:39:47.588903502 +0100
+***************
+*** 1449,1454 ****
+--- 1449,1455 ----
+ * start and end of an operator, also used for '[ and ']
+ */
+ pos_T b_op_start;
++ pos_T b_op_start_orig; /* used for Insstart_orig */
+ pos_T b_op_end;
+
+ #ifdef FEAT_VIMINFO
+*** ../vim-7.4.185/src/version.c 2014-02-22 22:27:20.772904692 +0100
+--- src/version.c 2014-02-22 22:39:08.932903564 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 186,
+ /**/
+
+--
+Individualists unite!
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.187 b/patches/source/vim/patches/7.4.187
new file mode 100644
index 000000000..122056e47
--- /dev/null
+++ b/patches/source/vim/patches/7.4.187
@@ -0,0 +1,136 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.187
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.187
+Problem: Delete that crosses line break splits multi-byte character.
+Solution: Advance a character instead of a byte. (Cade Foster)
+Files: src/normal.c, src/testdir/test69.in, src/testdir/test69.ok
+
+
+*** ../vim-7.4.186/src/normal.c 2014-02-11 15:10:38.134111836 +0100
+--- src/normal.c 2014-02-22 23:41:12.472897635 +0100
+***************
+*** 21,27 ****
+ static int resel_VIsual_mode = NUL; /* 'v', 'V', or Ctrl-V */
+ static linenr_T resel_VIsual_line_count; /* number of lines */
+ static colnr_T resel_VIsual_vcol; /* nr of cols or end col */
+! static int VIsual_mode_orig = NUL; /* type of Visual mode, that user entered */
+
+ static int restart_VIsual_select = 0;
+ #endif
+--- 21,27 ----
+ static int resel_VIsual_mode = NUL; /* 'v', 'V', or Ctrl-V */
+ static linenr_T resel_VIsual_line_count; /* number of lines */
+ static colnr_T resel_VIsual_vcol; /* nr of cols or end col */
+! static int VIsual_mode_orig = NUL; /* saved Visual mode */
+
+ static int restart_VIsual_select = 0;
+ #endif
+***************
+*** 6202,6209 ****
+ || cap->oap->op_type == OP_CHANGE)
+ && !lineempty(curwin->w_cursor.lnum))
+ {
+! if (*ml_get_cursor() != NUL)
+! ++curwin->w_cursor.col;
+ cap->retval |= CA_NO_ADJ_OP_END;
+ }
+ continue;
+--- 6202,6218 ----
+ || cap->oap->op_type == OP_CHANGE)
+ && !lineempty(curwin->w_cursor.lnum))
+ {
+! char_u *cp = ml_get_cursor();
+!
+! if (*cp != NUL)
+! {
+! #ifdef FEAT_MBYTE
+! if (has_mbyte)
+! curwin->w_cursor.col += (*mb_ptr2len)(cp);
+! else
+! #endif
+! ++curwin->w_cursor.col;
+! }
+ cap->retval |= CA_NO_ADJ_OP_END;
+ }
+ continue;
+***************
+*** 9482,9488 ****
+ # ifdef FEAT_CLIPBOARD
+ adjust_clip_reg(&regname);
+ # endif
+! if (regname == 0 || regname == '"'
+ || VIM_ISDIGIT(regname) || regname == '-'
+ # ifdef FEAT_CLIPBOARD
+ || (clip_unnamed && (regname == '*' || regname == '+'))
+--- 9491,9497 ----
+ # ifdef FEAT_CLIPBOARD
+ adjust_clip_reg(&regname);
+ # endif
+! if (regname == 0 || regname == '"'
+ || VIM_ISDIGIT(regname) || regname == '-'
+ # ifdef FEAT_CLIPBOARD
+ || (clip_unnamed && (regname == '*' || regname == '+'))
+*** ../vim-7.4.186/src/testdir/test69.in 2013-11-02 23:29:17.000000000 +0100
+--- src/testdir/test69.in 2014-02-22 23:38:50.508897861 +0100
+***************
+*** 155,160 ****
+--- 155,170 ----
+ ï½ï½b
+
+ STARTTEST
++ :set whichwrap+=h
++ /^x
++ dh
++ :set whichwrap-=h
++ ENDTEST
++
++ á
++ x
++
++ STARTTEST
+ :let a = '.é.' " one char of two bytes
+ :let b = '.eÌ.' " normal e with composing char
+ /^byteidx
+*** ../vim-7.4.186/src/testdir/test69.ok 2013-11-02 23:29:17.000000000 +0100
+--- src/testdir/test69.ok 2014-02-22 23:38:53.752897856 +0100
+***************
+*** 150,155 ****
+--- 150,158 ----
+ aaa
+
+
++ áx
++
++
+ byteidx
+ [0, 1, 3, 4, -1]
+ [0, 1, 4, 5, -1]
+*** ../vim-7.4.186/src/version.c 2014-02-22 23:03:48.716901208 +0100
+--- src/version.c 2014-02-22 23:30:24.412898667 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 187,
+ /**/
+
+--
+ARTHUR: Then who is your lord?
+WOMAN: We don't have a lord.
+ARTHUR: What?
+DENNIS: I told you. We're an anarcho-syndicalist commune. We take it in
+ turns to act as a sort of executive officer for the week.
+ The Quest for the Holy Grail (Monty Python)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.188 b/patches/source/vim/patches/7.4.188
new file mode 100644
index 000000000..b2b4fa12f
--- /dev/null
+++ b/patches/source/vim/patches/7.4.188
@@ -0,0 +1,617 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.188
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.188
+Problem: SIZEOF_LONG clashes with similar defines in header files.
+Solution: Rename to a name starting with VIM_. Also for SIZEOF_INT.
+Files: src/if_ruby.c, src/vim.h, src/configure.in, src/auto/configure,
+ src/config.h.in, src/fileio.c, src/if_python.c, src/message.c,
+ src/spell.c, src/feature.h, src/os_os2_cfg.h, src/os_vms_conf.h,
+ src/os_win16.h, src/structs.h
+
+
+*** ../vim-7.4.187/src/if_ruby.c 2014-02-05 22:41:11.430582669 +0100
+--- src/if_ruby.c 2014-02-23 21:55:03.516770208 +0100
+***************
+*** 89,97 ****
+ #endif
+
+ #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20 \
+! && SIZEOF_INT < SIZEOF_LONG
+ /* Ruby 2.0 defines a number of static functions which use rb_fix2int and
+! * rb_num2int if SIZEOF_INT < SIZEOF_LONG (64bit) */
+ # define rb_fix2int rb_fix2int_stub
+ # define rb_num2int rb_num2int_stub
+ #endif
+--- 89,97 ----
+ #endif
+
+ #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20 \
+! && VIM_SIZEOF_INT < VIM_SIZEOF_LONG
+ /* Ruby 2.0 defines a number of static functions which use rb_fix2int and
+! * rb_num2int if VIM_SIZEOF_INT < VIM_SIZEOF_LONG (64bit) */
+ # define rb_fix2int rb_fix2int_stub
+ # define rb_num2int rb_num2int_stub
+ #endif
+***************
+*** 202,208 ****
+ # define rb_hash_new dll_rb_hash_new
+ # define rb_inspect dll_rb_inspect
+ # define rb_int2inum dll_rb_int2inum
+! # if SIZEOF_INT < SIZEOF_LONG /* 64 bits only */
+ # define rb_fix2int dll_rb_fix2int
+ # define rb_num2int dll_rb_num2int
+ # define rb_num2uint dll_rb_num2uint
+--- 202,208 ----
+ # define rb_hash_new dll_rb_hash_new
+ # define rb_inspect dll_rb_inspect
+ # define rb_int2inum dll_rb_int2inum
+! # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
+ # define rb_fix2int dll_rb_fix2int
+ # define rb_num2int dll_rb_num2int
+ # define rb_num2uint dll_rb_num2uint
+***************
+*** 310,316 ****
+ static VALUE (*dll_rb_hash_new) (void);
+ static VALUE (*dll_rb_inspect) (VALUE);
+ static VALUE (*dll_rb_int2inum) (long);
+! # if SIZEOF_INT < SIZEOF_LONG /* 64 bits only */
+ static long (*dll_rb_fix2int) (VALUE);
+ static long (*dll_rb_num2int) (VALUE);
+ static unsigned long (*dll_rb_num2uint) (VALUE);
+--- 310,316 ----
+ static VALUE (*dll_rb_hash_new) (void);
+ static VALUE (*dll_rb_inspect) (VALUE);
+ static VALUE (*dll_rb_int2inum) (long);
+! # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
+ static long (*dll_rb_fix2int) (VALUE);
+ static long (*dll_rb_num2int) (VALUE);
+ static unsigned long (*dll_rb_num2uint) (VALUE);
+***************
+*** 393,399 ****
+ return dll_rb_int2big(x);
+ }
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20 \
+! && SIZEOF_INT < SIZEOF_LONG
+ long rb_fix2int_stub(VALUE x)
+ {
+ return dll_rb_fix2int(x);
+--- 393,399 ----
+ return dll_rb_int2big(x);
+ }
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20 \
+! && VIM_SIZEOF_INT < VIM_SIZEOF_LONG
+ long rb_fix2int_stub(VALUE x)
+ {
+ return dll_rb_fix2int(x);
+***************
+*** 466,472 ****
+ {"rb_hash_new", (RUBY_PROC*)&dll_rb_hash_new},
+ {"rb_inspect", (RUBY_PROC*)&dll_rb_inspect},
+ {"rb_int2inum", (RUBY_PROC*)&dll_rb_int2inum},
+! # if SIZEOF_INT < SIZEOF_LONG /* 64 bits only */
+ {"rb_fix2int", (RUBY_PROC*)&dll_rb_fix2int},
+ {"rb_num2int", (RUBY_PROC*)&dll_rb_num2int},
+ {"rb_num2uint", (RUBY_PROC*)&dll_rb_num2uint},
+--- 466,472 ----
+ {"rb_hash_new", (RUBY_PROC*)&dll_rb_hash_new},
+ {"rb_inspect", (RUBY_PROC*)&dll_rb_inspect},
+ {"rb_int2inum", (RUBY_PROC*)&dll_rb_int2inum},
+! # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
+ {"rb_fix2int", (RUBY_PROC*)&dll_rb_fix2int},
+ {"rb_num2int", (RUBY_PROC*)&dll_rb_num2int},
+ {"rb_num2uint", (RUBY_PROC*)&dll_rb_num2uint},
+*** ../vim-7.4.187/src/vim.h 2014-01-14 16:54:53.000000000 +0100
+--- src/vim.h 2014-02-23 21:58:23.764769890 +0100
+***************
+*** 43,49 ****
+ * it becomes zero. This is likely a problem of not being able to run the
+ * test program. Other items from configure may also be wrong then!
+ */
+! # if (SIZEOF_INT == 0)
+ Error: configure did not run properly. Check auto/config.log.
+ # endif
+
+--- 43,49 ----
+ * it becomes zero. This is likely a problem of not being able to run the
+ * test program. Other items from configure may also be wrong then!
+ */
+! # if (VIM_SIZEOF_INT == 0)
+ Error: configure did not run properly. Check auto/config.log.
+ # endif
+
+***************
+*** 148,169 ****
+ #endif
+
+ /*
+! * SIZEOF_INT is used in feature.h, and the system-specific included files
+! * need items from feature.h. Therefore define SIZEOF_INT here.
+ */
+ #ifdef WIN3264
+! # define SIZEOF_INT 4
+ #endif
+ #ifdef MSDOS
+ # ifdef DJGPP
+ # ifndef FEAT_GUI_GTK /* avoid problems when generating prototypes */
+! # define SIZEOF_INT 4 /* 32 bit ints */
+ # endif
+ # define DOS32
+ # define FEAT_CLIPBOARD
+ # else
+ # ifndef FEAT_GUI_GTK /* avoid problems when generating prototypes */
+! # define SIZEOF_INT 2 /* 16 bit ints */
+ # endif
+ # define SMALL_MALLOC /* 16 bit storage allocation */
+ # define DOS16
+--- 148,169 ----
+ #endif
+
+ /*
+! * VIM_SIZEOF_INT is used in feature.h, and the system-specific included files
+! * need items from feature.h. Therefore define VIM_SIZEOF_INT here.
+ */
+ #ifdef WIN3264
+! # define VIM_SIZEOF_INT 4
+ #endif
+ #ifdef MSDOS
+ # ifdef DJGPP
+ # ifndef FEAT_GUI_GTK /* avoid problems when generating prototypes */
+! # define VIM_SIZEOF_INT 4 /* 32 bit ints */
+ # endif
+ # define DOS32
+ # define FEAT_CLIPBOARD
+ # else
+ # ifndef FEAT_GUI_GTK /* avoid problems when generating prototypes */
+! # define VIM_SIZEOF_INT 2 /* 16 bit ints */
+ # endif
+ # define SMALL_MALLOC /* 16 bit storage allocation */
+ # define DOS16
+***************
+*** 174,191 ****
+ /* Be conservative about sizeof(int). It could be 4 too. */
+ # ifndef FEAT_GUI_GTK /* avoid problems when generating prototypes */
+ # ifdef __GNUC__
+! # define SIZEOF_INT 4
+ # else
+! # define SIZEOF_INT 2
+ # endif
+ # endif
+ #endif
+ #ifdef MACOS
+ # if defined(__POWERPC__) || defined(MACOS_X) || defined(__fourbyteints__) \
+ || defined(__MRC__) || defined(__SC__) || defined(__APPLE_CC__)/* MPW Compilers */
+! # define SIZEOF_INT 4
+ # else
+! # define SIZEOF_INT 2
+ # endif
+ #endif
+
+--- 174,191 ----
+ /* Be conservative about sizeof(int). It could be 4 too. */
+ # ifndef FEAT_GUI_GTK /* avoid problems when generating prototypes */
+ # ifdef __GNUC__
+! # define VIM_SIZEOF_INT 4
+ # else
+! # define VIM_SIZEOF_INT 2
+ # endif
+ # endif
+ #endif
+ #ifdef MACOS
+ # if defined(__POWERPC__) || defined(MACOS_X) || defined(__fourbyteints__) \
+ || defined(__MRC__) || defined(__SC__) || defined(__APPLE_CC__)/* MPW Compilers */
+! # define VIM_SIZEOF_INT 4
+ # else
+! # define VIM_SIZEOF_INT 2
+ # endif
+ #endif
+
+***************
+*** 417,428 ****
+ #define PRINTF_DECIMAL_LONG_U SCANF_DECIMAL_LONG_U
+
+ /*
+! * Only systems which use configure will have SIZEOF_OFF_T and SIZEOF_LONG
+ * defined, which is ok since those are the same systems which can have
+ * varying sizes for off_t. The other systems will continue to use "%ld" to
+ * print off_t since off_t is simply a typedef to long for them.
+ */
+! #if defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T > SIZEOF_LONG)
+ # define LONG_LONG_OFF_T
+ #endif
+
+--- 417,428 ----
+ #define PRINTF_DECIMAL_LONG_U SCANF_DECIMAL_LONG_U
+
+ /*
+! * Only systems which use configure will have SIZEOF_OFF_T and VIM_SIZEOF_LONG
+ * defined, which is ok since those are the same systems which can have
+ * varying sizes for off_t. The other systems will continue to use "%ld" to
+ * print off_t since off_t is simply a typedef to long for them.
+ */
+! #if defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T > VIM_SIZEOF_LONG)
+ # define LONG_LONG_OFF_T
+ #endif
+
+***************
+*** 448,454 ****
+ # ifdef UNICODE16
+ typedef unsigned short u8char_T; /* short should be 16 bits */
+ # else
+! # if SIZEOF_INT >= 4
+ typedef unsigned int u8char_T; /* int is 32 bits */
+ # else
+ typedef unsigned long u8char_T; /* long should be 32 bits or more */
+--- 448,454 ----
+ # ifdef UNICODE16
+ typedef unsigned short u8char_T; /* short should be 16 bits */
+ # else
+! # if VIM_SIZEOF_INT >= 4
+ typedef unsigned int u8char_T; /* int is 32 bits */
+ # else
+ typedef unsigned long u8char_T; /* long should be 32 bits or more */
+***************
+*** 1608,1614 ****
+ * With this we restrict the maximum line length to 1073741823. I guess this is
+ * not a real problem. BTW: Longer lines are split.
+ */
+! #if SIZEOF_INT >= 4
+ # ifdef __MVS__
+ # define MAXCOL (0x3fffffffL) /* maximum column number, 30 bits */
+ # else
+--- 1608,1614 ----
+ * With this we restrict the maximum line length to 1073741823. I guess this is
+ * not a real problem. BTW: Longer lines are split.
+ */
+! #if VIM_SIZEOF_INT >= 4
+ # ifdef __MVS__
+ # define MAXCOL (0x3fffffffL) /* maximum column number, 30 bits */
+ # else
+*** ../vim-7.4.187/src/configure.in 2014-02-15 17:18:56.953897128 +0100
+--- src/configure.in 2014-02-23 22:37:40.080766138 +0100
+***************
+*** 3581,3586 ****
+--- 3581,3590 ----
+ AC_CHECK_SIZEOF([time_t])
+ AC_CHECK_SIZEOF([off_t])
+
++ dnl Use different names to avoid clashing with other header files.
++ AC_DEFINE_UNQUOTED(VIM_SIZEOF_INT, [$ac_cv_sizeof_int])
++ AC_DEFINE_UNQUOTED(VIM_SIZEOF_LONG, [$ac_cv_sizeof_long])
++
+ dnl Make sure that uint32_t is really 32 bits unsigned.
+ AC_MSG_CHECKING([uint32_t is 32 bits])
+ AC_TRY_RUN([
+*** ../vim-7.4.187/src/auto/configure 2013-11-21 12:17:46.000000000 +0100
+--- src/auto/configure 2014-02-23 22:37:43.692766132 +0100
+***************
+*** 5199,5207 ****
+--- 5199,5217 ----
+ $as_echo_n "checking for mzscheme_base.c... " >&6; }
+ if test -f "${SCHEME_COLLECTS}collects/scheme/base.ss" ; then
+ MZSCHEME_EXTRA="mzscheme_base.c"
++ MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
++ MZSCHEME_MOD="++lib scheme/base"
+ else
+ if test -f "${SCHEME_COLLECTS}collects/scheme/base.rkt" ; then
+ MZSCHEME_EXTRA="mzscheme_base.c"
++ MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
++ MZSCHEME_MOD="++lib scheme/base"
++ else
++ if test -f "${SCHEME_COLLECTS}collects/racket/base.rkt" ; then
++ MZSCHEME_EXTRA="mzscheme_base.c"
++ MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/raco ctool"
++ MZSCHEME_MOD=""
++ fi
+ fi
+ fi
+ if test "X$MZSCHEME_EXTRA" != "X" ; then
+***************
+*** 12323,12328 ****
+--- 12333,12347 ----
+
+
+
++ cat >>confdefs.h <<_ACEOF
++ #define VIM_SIZEOF_INT $ac_cv_sizeof_int
++ _ACEOF
++
++ cat >>confdefs.h <<_ACEOF
++ #define VIM_SIZEOF_LONG $ac_cv_sizeof_long
++ _ACEOF
++
++
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking uint32_t is 32 bits" >&5
+ $as_echo_n "checking uint32_t is 32 bits... " >&6; }
+ if test "$cross_compiling" = yes; then :
+*** ../vim-7.4.187/src/config.h.in 2013-11-02 21:04:32.000000000 +0100
+--- src/config.h.in 2014-02-23 21:45:36.784771111 +0100
+***************
+*** 37,46 ****
+ #undef UNIX
+
+ /* Defined to the size of an int */
+! #undef SIZEOF_INT
+
+ /* Defined to the size of a long */
+! #undef SIZEOF_LONG
+
+ /* Defined to the size of off_t */
+ #undef SIZEOF_OFF_T
+--- 37,46 ----
+ #undef UNIX
+
+ /* Defined to the size of an int */
+! #undef VIM_SIZEOF_INT
+
+ /* Defined to the size of a long */
+! #undef VIM_SIZEOF_LONG
+
+ /* Defined to the size of off_t */
+ #undef SIZEOF_OFF_T
+*** ../vim-7.4.187/src/fileio.c 2014-02-11 15:23:27.938123631 +0100
+--- src/fileio.c 2014-02-23 22:31:00.824766773 +0100
+***************
+*** 1185,1191 ****
+ * The amount is limited by the fact that read() only can read
+ * upto max_unsigned characters (and other things).
+ */
+! #if SIZEOF_INT <= 2
+ if (linerest >= 0x7ff0)
+ {
+ ++split;
+--- 1185,1191 ----
+ * The amount is limited by the fact that read() only can read
+ * upto max_unsigned characters (and other things).
+ */
+! #if VIM_SIZEOF_INT <= 2
+ if (linerest >= 0x7ff0)
+ {
+ ++split;
+***************
+*** 1197,1203 ****
+ {
+ if (!skip_read)
+ {
+! #if SIZEOF_INT > 2
+ # if defined(SSIZE_MAX) && (SSIZE_MAX < 0x10000L)
+ size = SSIZE_MAX; /* use max I/O size, 52K */
+ # else
+--- 1197,1203 ----
+ {
+ if (!skip_read)
+ {
+! #if VIM_SIZEOF_INT > 2
+ # if defined(SSIZE_MAX) && (SSIZE_MAX < 0x10000L)
+ size = SSIZE_MAX; /* use max I/O size, 52K */
+ # else
+*** ../vim-7.4.187/src/if_python.c 2014-01-14 19:35:49.000000000 +0100
+--- src/if_python.c 2014-02-23 21:54:39.212770247 +0100
+***************
+*** 613,619 ****
+ # endif
+ # endif
+ # if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02050000 \
+! && SIZEOF_SIZE_T != SIZEOF_INT
+ # ifdef Py_DEBUG
+ {"Py_InitModule4TraceRefs_64", (PYTHON_PROC*)&dll_Py_InitModule4},
+ # else
+--- 613,619 ----
+ # endif
+ # endif
+ # if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02050000 \
+! && SIZEOF_SIZE_T != VIM_SIZEOF_INT
+ # ifdef Py_DEBUG
+ {"Py_InitModule4TraceRefs_64", (PYTHON_PROC*)&dll_Py_InitModule4},
+ # else
+*** ../vim-7.4.187/src/message.c 2013-11-04 02:00:55.000000000 +0100
+--- src/message.c 2014-02-23 21:55:16.984770187 +0100
+***************
+*** 4376,4382 ****
+ {
+ /* Don't put the #if inside memchr(), it can be a
+ * macro. */
+! #if SIZEOF_INT <= 2
+ char *q = memchr(str_arg, '\0', precision);
+ #else
+ /* memchr on HP does not like n > 2^31 !!! */
+--- 4376,4382 ----
+ {
+ /* Don't put the #if inside memchr(), it can be a
+ * macro. */
+! #if VIM_SIZEOF_INT <= 2
+ char *q = memchr(str_arg, '\0', precision);
+ #else
+ /* memchr on HP does not like n > 2^31 !!! */
+*** ../vim-7.4.187/src/spell.c 2013-11-28 17:41:41.000000000 +0100
+--- src/spell.c 2014-02-23 21:55:24.600770175 +0100
+***************
+*** 317,323 ****
+
+ /* Type used for indexes in the word tree need to be at least 4 bytes. If int
+ * is 8 bytes we could use something smaller, but what? */
+! #if SIZEOF_INT > 3
+ typedef int idx_T;
+ #else
+ typedef long idx_T;
+--- 317,323 ----
+
+ /* Type used for indexes in the word tree need to be at least 4 bytes. If int
+ * is 8 bytes we could use something smaller, but what? */
+! #if VIM_SIZEOF_INT > 3
+ typedef int idx_T;
+ #else
+ typedef long idx_T;
+*** ../vim-7.4.187/src/feature.h 2013-05-18 20:18:20.000000000 +0200
+--- src/feature.h 2014-02-23 21:55:54.868770127 +0100
+***************
+*** 328,334 ****
+ *
+ * Disabled for EBCDIC as it requires multibyte.
+ */
+! #if defined(FEAT_BIG) && !defined(WIN16) && SIZEOF_INT >= 4 && !defined(EBCDIC)
+ # define FEAT_ARABIC
+ #endif
+ #ifdef FEAT_ARABIC
+--- 328,334 ----
+ *
+ * Disabled for EBCDIC as it requires multibyte.
+ */
+! #if defined(FEAT_BIG) && !defined(WIN16) && VIM_SIZEOF_INT >= 4 && !defined(EBCDIC)
+ # define FEAT_ARABIC
+ #endif
+ #ifdef FEAT_ARABIC
+***************
+*** 640,646 ****
+ */
+ #if (defined(FEAT_NORMAL) || defined(FEAT_GUI_GTK) || defined(FEAT_ARABIC)) \
+ && !defined(FEAT_MBYTE) && !defined(WIN16) \
+! && SIZEOF_INT >= 4 && !defined(EBCDIC)
+ # define FEAT_MBYTE
+ #endif
+
+--- 640,646 ----
+ */
+ #if (defined(FEAT_NORMAL) || defined(FEAT_GUI_GTK) || defined(FEAT_ARABIC)) \
+ && !defined(FEAT_MBYTE) && !defined(WIN16) \
+! && VIM_SIZEOF_INT >= 4 && !defined(EBCDIC)
+ # define FEAT_MBYTE
+ #endif
+
+***************
+*** 661,667 ****
+ # define FEAT_MBYTE
+ #endif
+
+! #if defined(FEAT_MBYTE) && SIZEOF_INT < 4 && !defined(PROTO)
+ Error: Can only handle multi-byte feature with 32 bit int or larger
+ #endif
+
+--- 661,667 ----
+ # define FEAT_MBYTE
+ #endif
+
+! #if defined(FEAT_MBYTE) && VIM_SIZEOF_INT < 4 && !defined(PROTO)
+ Error: Can only handle multi-byte feature with 32 bit int or larger
+ #endif
+
+*** ../vim-7.4.187/src/os_os2_cfg.h 2010-05-15 13:04:11.000000000 +0200
+--- src/os_os2_cfg.h 2014-02-23 21:56:03.540770113 +0100
+***************
+*** 47,53 ****
+ #undef UNIX /* define always by current configure script */
+
+ /* Defined to the size of an int */
+! #define SIZEOF_INT 4
+
+ /*
+ * If we cannot trust one of the following from the libraries, we use our
+--- 47,53 ----
+ #undef UNIX /* define always by current configure script */
+
+ /* Defined to the size of an int */
+! #define VIM_SIZEOF_INT 4
+
+ /*
+ * If we cannot trust one of the following from the libraries, we use our
+*** ../vim-7.4.187/src/os_vms_conf.h 2010-07-28 19:07:48.000000000 +0200
+--- src/os_vms_conf.h 2014-02-23 21:56:20.700770086 +0100
+***************
+*** 23,29 ****
+ #define HAVE_DATE_TIME
+
+ /* Defined to the size of an int */
+! #define SIZEOF_INT 4
+
+ /* #undef USEBCOPY */
+ #define USEMEMMOVE
+--- 23,29 ----
+ #define HAVE_DATE_TIME
+
+ /* Defined to the size of an int */
+! #define VIM_SIZEOF_INT 4
+
+ /* #undef USEBCOPY */
+ #define USEMEMMOVE
+*** ../vim-7.4.187/src/os_win16.h 2013-05-06 04:06:04.000000000 +0200
+--- src/os_win16.h 2014-02-23 21:56:39.292770056 +0100
+***************
+*** 55,62 ****
+
+ #define FNAME_ILLEGAL "\"*?><|" /* illegal characters in a file name */
+
+! #ifndef SIZEOF_INT
+! # define SIZEOF_INT 2
+ #endif
+
+ typedef long off_t;
+--- 55,62 ----
+
+ #define FNAME_ILLEGAL "\"*?><|" /* illegal characters in a file name */
+
+! #ifndef VIM_SIZEOF_INT
+! # define VIM_SIZEOF_INT 2
+ #endif
+
+ typedef long off_t;
+*** ../vim-7.4.187/src/structs.h 2014-02-22 23:03:48.716901208 +0100
+--- src/structs.h 2014-02-23 21:57:17.680769995 +0100
+***************
+*** 364,370 ****
+ /*
+ * structures used in undo.c
+ */
+! #if SIZEOF_INT > 2
+ # define ALIGN_LONG /* longword alignment and use filler byte */
+ # define ALIGN_SIZE (sizeof(long))
+ #else
+--- 364,370 ----
+ /*
+ * structures used in undo.c
+ */
+! #if VIM_SIZEOF_INT > 2
+ # define ALIGN_LONG /* longword alignment and use filler byte */
+ # define ALIGN_SIZE (sizeof(long))
+ #else
+***************
+*** 1094,1100 ****
+ typedef long_u hash_T; /* Type for hi_hash */
+
+
+! #if SIZEOF_INT <= 3 /* use long if int is smaller than 32 bits */
+ typedef long varnumber_T;
+ #else
+ typedef int varnumber_T;
+--- 1094,1100 ----
+ typedef long_u hash_T; /* Type for hi_hash */
+
+
+! #if VIM_SIZEOF_INT <= 3 /* use long if int is smaller than 32 bits */
+ typedef long varnumber_T;
+ #else
+ typedef int varnumber_T;
+*** ../vim-7.4.187/src/version.c 2014-02-22 23:49:30.268896843 +0100
+--- src/version.c 2014-02-23 22:40:55.708765826 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 188,
+ /**/
+
+--
+I'm sure that I asked CBuilder to do a "full" install. Looks like I got
+a "fool" install, instead. Charles E Campbell, Jr, PhD
+
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.189 b/patches/source/vim/patches/7.4.189
new file mode 100644
index 000000000..cf6a2b702
--- /dev/null
+++ b/patches/source/vim/patches/7.4.189
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.189
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.189
+Problem: Compiler warning for unused argument.
+Solution: Add UNUSED.
+Files: src/eval.c
+
+
+*** ../vim-7.4.188/src/eval.c 2014-02-22 22:18:39.532905522 +0100
+--- src/eval.c 2014-02-23 22:29:14.976766942 +0100
+***************
+*** 9203,9209 ****
+ byteidx(argvars, rettv, comp)
+ typval_T *argvars;
+ typval_T *rettv;
+! int comp;
+ {
+ #ifdef FEAT_MBYTE
+ char_u *t;
+--- 9203,9209 ----
+ byteidx(argvars, rettv, comp)
+ typval_T *argvars;
+ typval_T *rettv;
+! int comp UNUSED;
+ {
+ #ifdef FEAT_MBYTE
+ char_u *t;
+*** ../vim-7.4.188/src/version.c 2014-02-23 22:52:33.372764715 +0100
+--- src/version.c 2014-02-23 22:54:17.836764549 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 189,
+ /**/
+
+--
+Q: How does a UNIX Guru pick up a girl?
+A: look; grep; which; eval; nice; uname; talk; date;
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.190 b/patches/source/vim/patches/7.4.190
new file mode 100644
index 000000000..6cafb4b26
--- /dev/null
+++ b/patches/source/vim/patches/7.4.190
@@ -0,0 +1,70 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.190
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.190
+Problem: Compiler warning for using %lld for off_t.
+Solution: Add type cast.
+Files: src/fileio.c
+
+
+*** ../vim-7.4.189/src/fileio.c 2014-02-23 22:52:33.368764715 +0100
+--- src/fileio.c 2014-02-23 22:31:00.824766773 +0100
+***************
+*** 5294,5300 ****
+ if (shortmess(SHM_LINES))
+ sprintf((char *)p,
+ #ifdef LONG_LONG_OFF_T
+! "%ldL, %lldC", lnum, nchars
+ #else
+ /* Explicit typecast avoids warning on Mac OS X 10.6 */
+ "%ldL, %ldC", lnum, (long)nchars
+--- 5294,5300 ----
+ if (shortmess(SHM_LINES))
+ sprintf((char *)p,
+ #ifdef LONG_LONG_OFF_T
+! "%ldL, %lldC", lnum, (long long)nchars
+ #else
+ /* Explicit typecast avoids warning on Mac OS X 10.6 */
+ "%ldL, %ldC", lnum, (long)nchars
+***************
+*** 5312,5318 ****
+ else
+ sprintf((char *)p,
+ #ifdef LONG_LONG_OFF_T
+! _("%lld characters"), nchars
+ #else
+ /* Explicit typecast avoids warning on Mac OS X 10.6 */
+ _("%ld characters"), (long)nchars
+--- 5312,5318 ----
+ else
+ sprintf((char *)p,
+ #ifdef LONG_LONG_OFF_T
+! _("%lld characters"), (long long)nchars
+ #else
+ /* Explicit typecast avoids warning on Mac OS X 10.6 */
+ _("%ld characters"), (long)nchars
+*** ../vim-7.4.189/src/version.c 2014-02-23 22:54:54.728764490 +0100
+--- src/version.c 2014-02-23 22:57:43.648764221 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 190,
+ /**/
+
+--
+Courtroom Quote #19:
+Q: Doctor, how many autopsies have you performed on dead people?
+A: All my autopsies have been performed on dead people.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.191 b/patches/source/vim/patches/7.4.191
new file mode 100644
index 000000000..f0bb71bfc
--- /dev/null
+++ b/patches/source/vim/patches/7.4.191
@@ -0,0 +1,689 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.191
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.191
+Problem: Escaping a file name for shell commands can't be done without a
+ function.
+Solution: Add the :S file name modifier.
+Files: src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
+ src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
+ src/testdir/Make_vms.mms, src/testdir/Makefile,
+ src/testdir/test105.in, src/testdir/test105.ok,
+ runtime/doc/cmdline.txt, runtime/doc/eval.txt,
+ runtime/doc/map.txt, runtime/doc/options.txt,
+ runtime/doc/quickfix.txt, runtime/doc/usr_30.txt,
+ runtime/doc/usr_40.txt, runtime/doc/usr_42.txt,
+ runtime/doc/vi_diff.txt, src/eval.c, src/misc2.c, src/normal.c,
+ src/proto/misc2.pro
+
+
+*** ../vim-7.4.190/src/testdir/Make_amiga.mak 2014-02-05 22:25:29.974568243 +0100
+--- src/testdir/Make_amiga.mak 2014-02-23 23:16:51.056762395 +0100
+***************
+*** 35,41 ****
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+ test99.out test100.out test101.out test102.out test103.out \
+! test104.out
+
+ .SUFFIXES: .in .out
+
+--- 35,41 ----
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+ test99.out test100.out test101.out test102.out test103.out \
+! test104.out test105.out
+
+ .SUFFIXES: .in .out
+
+***************
+*** 156,158 ****
+--- 156,159 ----
+ test102.out: test102.in
+ test103.out: test103.in
+ test104.out: test104.in
++ test105.out: test105.in
+*** ../vim-7.4.190/src/testdir/Make_dos.mak 2014-02-05 22:25:29.978568243 +0100
+--- src/testdir/Make_dos.mak 2014-02-23 23:17:41.840762314 +0100
+***************
+*** 33,39 ****
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100.out test101.out test102.out test103.out test104.out
+
+ SCRIPTS32 = test50.out test70.out
+
+--- 33,40 ----
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100.out test101.out test102.out test103.out test104.out \
+! test105.out
+
+ SCRIPTS32 = test50.out test70.out
+
+*** ../vim-7.4.190/src/testdir/Make_ming.mak 2014-02-05 22:25:29.978568243 +0100
+--- src/testdir/Make_ming.mak 2014-02-23 23:17:29.400762333 +0100
+***************
+*** 53,59 ****
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100.out test101.out test102.out test103.out test104.out
+
+ SCRIPTS32 = test50.out test70.out
+
+--- 53,60 ----
+ test84.out test85.out test86.out test87.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100.out test101.out test102.out test103.out test104.out \
+! test105.out
+
+ SCRIPTS32 = test50.out test70.out
+
+*** ../vim-7.4.190/src/testdir/Make_os2.mak 2014-02-05 22:25:29.978568243 +0100
+--- src/testdir/Make_os2.mak 2014-02-23 23:17:49.476762302 +0100
+***************
+*** 35,41 ****
+ test81.out test82.out test83.out test84.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100.out test101.out test102.out test103.out test104.out
+
+ .SUFFIXES: .in .out
+
+--- 35,42 ----
+ test81.out test82.out test83.out test84.out test88.out \
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+! test100.out test101.out test102.out test103.out test104.out \
+! test105.out
+
+ .SUFFIXES: .in .out
+
+*** ../vim-7.4.190/src/testdir/Make_vms.mms 2014-02-05 22:25:29.978568243 +0100
+--- src/testdir/Make_vms.mms 2014-02-23 23:17:56.596762290 +0100
+***************
+*** 4,10 ****
+ # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
+ # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
+ #
+! # Last change: 2013 Nov 21
+ #
+ # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
+ # Edit the lines in the Configuration section below to select.
+--- 4,10 ----
+ # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
+ # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
+ #
+! # Last change: 2014 Feb 23
+ #
+ # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
+ # Edit the lines in the Configuration section below to select.
+***************
+*** 79,85 ****
+ test82.out test83.out test84.out test88.out test89.out \
+ test90.out test91.out test92.out test93.out test94.out \
+ test95.out test96.out test97.out test98.out test99.out \
+! test100.out test101.out test102.out test103.out test104.out
+
+ # Known problems:
+ # Test 30: a problem around mac format - unknown reason
+--- 79,86 ----
+ test82.out test83.out test84.out test88.out test89.out \
+ test90.out test91.out test92.out test93.out test94.out \
+ test95.out test96.out test97.out test98.out test99.out \
+! test100.out test101.out test102.out test103.out test104.out \
+! test105.out
+
+ # Known problems:
+ # Test 30: a problem around mac format - unknown reason
+*** ../vim-7.4.190/src/testdir/Makefile 2014-02-05 22:25:29.982568243 +0100
+--- src/testdir/Makefile 2014-02-23 23:18:14.040762262 +0100
+***************
+*** 31,37 ****
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+ test99.out test100.out test101.out test102.out test103.out \
+! test104.out
+
+ SCRIPTS_GUI = test16.out
+
+--- 31,37 ----
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+ test99.out test100.out test101.out test102.out test103.out \
+! test104.out test105.out
+
+ SCRIPTS_GUI = test16.out
+
+*** ../vim-7.4.190/src/testdir/test105.in 2014-02-23 23:35:40.680760596 +0100
+--- src/testdir/test105.in 2014-02-23 23:30:24.748761099 +0100
+***************
+*** 0 ****
+--- 1,45 ----
++ Test filename modifiers vim: set ft=vim :
++
++ STARTTEST
++ :source small.vim
++ :%delete _
++ :set shell=sh
++ :set shellslash
++ :let tab="\t"
++ :command -nargs=1 Put :let expr=<q-args> | $put =expr.tab.strtrans(string(eval(expr)))
++ :let $HOME=fnamemodify('.', ':p:h:h:h')
++ :Put fnamemodify('.', ':p' )[-1:]
++ :Put fnamemodify('.', ':p:h' )[-1:]
++ :Put fnamemodify('test.out', ':p' )[-1:]
++ :Put fnamemodify('test.out', ':.' )
++ :Put fnamemodify('../testdir/a', ':.' )
++ :Put fnamemodify('test.out', ':~' )
++ :Put fnamemodify('../testdir/a', ':~' )
++ :Put fnamemodify('../testdir/a', ':t' )
++ :Put fnamemodify('.', ':p:t' )
++ :Put fnamemodify('test.out', ':p:t' )
++ :Put fnamemodify('test.out', ':p:e' )
++ :Put fnamemodify('test.out', ':p:t:e' )
++ :Put fnamemodify('abc.fb2.tar.gz', ':r' )
++ :Put fnamemodify('abc.fb2.tar.gz', ':r:r' )
++ :Put fnamemodify('abc.fb2.tar.gz', ':r:r:r' )
++ :Put substitute(fnamemodify('abc.fb2.tar.gz', ':p:r:r'), '.*\(src/testdir/.*\)', '\1', '')
++ :Put fnamemodify('abc.fb2.tar.gz', ':e' )
++ :Put fnamemodify('abc.fb2.tar.gz', ':e:e' )
++ :Put fnamemodify('abc.fb2.tar.gz', ':e:e:e' )
++ :Put fnamemodify('abc.fb2.tar.gz', ':e:e:e:e')
++ :Put fnamemodify('abc.fb2.tar.gz', ':e:e:r' )
++ :Put fnamemodify('abc def', ':S' )
++ :Put fnamemodify('abc" "def', ':S' )
++ :Put fnamemodify('abc"%"def', ':S' )
++ :Put fnamemodify('abc'' ''def', ':S' )
++ :Put fnamemodify('abc''%''def', ':S' )
++ :Put fnamemodify("abc\ndef", ':S' )
++ :set shell=tcsh
++ :Put fnamemodify("abc\ndef", ':S' )
++ :$put ='vim: ts=8'
++ :1 delete _
++ :w! test.out
++ :qa!
++ ENDTEST
++
+*** ../vim-7.4.190/src/testdir/test105.ok 2014-02-23 23:35:40.688760596 +0100
+--- src/testdir/test105.ok 2014-02-23 23:32:11.204760929 +0100
+***************
+*** 0 ****
+--- 1,29 ----
++ fnamemodify('.', ':p' )[-1:] '/'
++ fnamemodify('.', ':p:h' )[-1:] 'r'
++ fnamemodify('test.out', ':p' )[-1:] 't'
++ fnamemodify('test.out', ':.' ) 'test.out'
++ fnamemodify('../testdir/a', ':.' ) 'a'
++ fnamemodify('test.out', ':~' ) '~/src/testdir/test.out'
++ fnamemodify('../testdir/a', ':~' ) '~/src/testdir/a'
++ fnamemodify('../testdir/a', ':t' ) 'a'
++ fnamemodify('.', ':p:t' ) ''
++ fnamemodify('test.out', ':p:t' ) 'test.out'
++ fnamemodify('test.out', ':p:e' ) 'out'
++ fnamemodify('test.out', ':p:t:e' ) 'out'
++ fnamemodify('abc.fb2.tar.gz', ':r' ) 'abc.fb2.tar'
++ fnamemodify('abc.fb2.tar.gz', ':r:r' ) 'abc.fb2'
++ fnamemodify('abc.fb2.tar.gz', ':r:r:r' ) 'abc'
++ substitute(fnamemodify('abc.fb2.tar.gz', ':p:r:r'), '.*\(src/testdir/.*\)', '\1', '') 'src/testdir/abc.fb2'
++ fnamemodify('abc.fb2.tar.gz', ':e' ) 'gz'
++ fnamemodify('abc.fb2.tar.gz', ':e:e' ) 'tar.gz'
++ fnamemodify('abc.fb2.tar.gz', ':e:e:e' ) 'fb2.tar.gz'
++ fnamemodify('abc.fb2.tar.gz', ':e:e:e:e') 'fb2.tar.gz'
++ fnamemodify('abc.fb2.tar.gz', ':e:e:r' ) 'tar'
++ fnamemodify('abc def', ':S' ) '''abc def'''
++ fnamemodify('abc" "def', ':S' ) '''abc" "def'''
++ fnamemodify('abc"%"def', ':S' ) '''abc"%"def'''
++ fnamemodify('abc'' ''def', ':S' ) '''abc''\'''' ''\''''def'''
++ fnamemodify('abc''%''def', ':S' ) '''abc''\''''%''\''''def'''
++ fnamemodify("abc\ndef", ':S' ) '''abc^@def'''
++ fnamemodify("abc\ndef", ':S' ) '''abc\^@def'''
++ vim: ts=8
+*** ../vim-7.4.190/runtime/doc/cmdline.txt 2013-11-09 05:30:18.000000000 +0100
+--- runtime/doc/cmdline.txt 2014-02-23 23:20:57.020762003 +0100
+***************
+*** 758,763 ****
+--- 758,764 ----
+ function expand() |expand()|.
+ % Is replaced with the current file name. *:_%* *c_%*
+ # Is replaced with the alternate file name. *:_#* *c_#*
++ This is remembered for every window.
+ #n (where n is a number) is replaced with *:_#0* *:_#n*
+ the file name of buffer n. "#0" is the same as "#". *c_#n*
+ ## Is replaced with all names in the argument list *:_##* *c_##*
+***************
+*** 823,830 ****
+ the start of the function.
+
+ *filename-modifiers*
+! *:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs*
+! *%:8* *%:p* *%:.* *%:~* *%:h* *%:t* *%:r* *%:e* *%:s* *%:gs*
+ The file name modifiers can be used after "%", "#", "#n", "<cfile>", "<sfile>",
+ "<afile>" or "<abuf>". They are also used with the |fnamemodify()| function.
+ These are not available when Vim has been compiled without the |+modify_fname|
+--- 824,831 ----
+ the start of the function.
+
+ *filename-modifiers*
+! *:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs* *::S*
+! *%:8* *%:p* *%:.* *%:~* *%:h* *%:t* *%:r* *%:e* *%:s* *%:gs* *%:S*
+ The file name modifiers can be used after "%", "#", "#n", "<cfile>", "<sfile>",
+ "<afile>" or "<abuf>". They are also used with the |fnamemodify()| function.
+ These are not available when Vim has been compiled without the |+modify_fname|
+***************
+*** 879,884 ****
+--- 880,889 ----
+ :gs?pat?sub?
+ Substitute all occurrences of "pat" with "sub". Otherwise
+ this works like ":s".
++ :S Escape special characters for use with a shell command (see
++ |shellescape()|). Must be the last one. Examples: >
++ :!dir <cfile>:S
++ :call system('chmod +w -- ' . expand('%:S'))
+
+ Examples, when the file name is "src/version.c", current dir
+ "/home/mool/vim": >
+*** ../vim-7.4.190/runtime/doc/eval.txt 2014-01-14 12:33:32.000000000 +0100
+--- runtime/doc/eval.txt 2014-02-23 23:19:32.420762138 +0100
+***************
+*** 5414,5419 ****
+--- 5428,5434 ----
+ < This results in a directory listing for the file under the
+ cursor. Example of use with |system()|: >
+ :call system("chmod +w -- " . shellescape(expand("%")))
++ < See also |::S|.
+
+
+ shiftwidth() *shiftwidth()*
+***************
+*** 5896,5909 ****
+ passed as stdin to the command. The string is written as-is,
+ you need to take care of using the correct line separators
+ yourself. Pipes are not used.
+! Note: Use |shellescape()| to escape special characters in a
+! command argument. Newlines in {expr} may cause the command to
+! fail. The characters in 'shellquote' and 'shellxquote' may
+! also cause trouble.
+ This is not to be used for interactive commands.
+
+ The result is a String. Example: >
+ :let files = system("ls " . shellescape(expand('%:h')))
+
+ < To make the result more system-independent, the shell output
+ is filtered to replace <CR> with <NL> for Macintosh, and
+--- 5911,5926 ----
+ passed as stdin to the command. The string is written as-is,
+ you need to take care of using the correct line separators
+ yourself. Pipes are not used.
+! Note: Use |shellescape()| or |::S| with |expand()| or
+! |fnamemodify()| to escape special characters in a command
+! argument. Newlines in {expr} may cause the command to fail.
+! The characters in 'shellquote' and 'shellxquote' may also
+! cause trouble.
+ This is not to be used for interactive commands.
+
+ The result is a String. Example: >
+ :let files = system("ls " . shellescape(expand('%:h')))
++ :let files = system('ls ' . expand('%:h:S'))
+
+ < To make the result more system-independent, the shell output
+ is filtered to replace <CR> with <NL> for Macintosh, and
+*** ../vim-7.4.190/runtime/doc/map.txt 2013-08-10 13:24:56.000000000 +0200
+--- runtime/doc/map.txt 2014-02-23 23:19:32.424762138 +0100
+***************
+*** 380,386 ****
+ The simplest way to load a set of related language mappings is by using the
+ 'keymap' option. See |45.5|.
+ In Insert mode and in Command-line mode the mappings can be disabled with
+! the CTRL-^ command |i_CTRL-^| |c_CTRL-^| These commands change the value of
+ the 'iminsert' option. When starting to enter a normal command line (not a
+ search pattern) the mappings are disabled until a CTRL-^ is typed. The state
+ last used is remembered for Insert mode and Search patterns separately. The
+--- 380,386 ----
+ The simplest way to load a set of related language mappings is by using the
+ 'keymap' option. See |45.5|.
+ In Insert mode and in Command-line mode the mappings can be disabled with
+! the CTRL-^ command |i_CTRL-^| |c_CTRL-^|. These commands change the value of
+ the 'iminsert' option. When starting to enter a normal command line (not a
+ search pattern) the mappings are disabled until a CTRL-^ is typed. The state
+ last used is remembered for Insert mode and Search patterns separately. The
+***************
+*** 593,599 ****
+ When you have a mapping that contains an Ex command, you need to put a line
+ terminator after it to have it executed. The use of <CR> is recommended for
+ this (see |<>|). Example: >
+! :map _ls :!ls -l %<CR>:echo "the end"<CR>
+
+ To avoid mapping of the characters you type in insert or Command-line mode,
+ type a CTRL-V first. The mapping in Insert mode is disabled if the 'paste'
+--- 593,599 ----
+ When you have a mapping that contains an Ex command, you need to put a line
+ terminator after it to have it executed. The use of <CR> is recommended for
+ this (see |<>|). Example: >
+! :map _ls :!ls -l %:S<CR>:echo "the end"<CR>
+
+ To avoid mapping of the characters you type in insert or Command-line mode,
+ type a CTRL-V first. The mapping in Insert mode is disabled if the 'paste'
+*** ../vim-7.4.190/runtime/doc/options.txt 2013-11-12 04:43:57.000000000 +0100
+--- runtime/doc/options.txt 2014-02-23 23:19:32.428762138 +0100
+***************
+*** 4757,4764 ****
+ global or local to buffer |global-local|
+ {not in Vi}
+ Program to use for the ":make" command. See |:make_makeprg|.
+! This option may contain '%' and '#' characters, which are expanded to
+! the current and alternate file name. |:_%| |:_#|
+ Environment variables are expanded |:set_env|. See |option-backslash|
+ about including spaces and backslashes.
+ Note that a '|' must be escaped twice: once for ":set" and once for
+--- 4757,4765 ----
+ global or local to buffer |global-local|
+ {not in Vi}
+ Program to use for the ":make" command. See |:make_makeprg|.
+! This option may contain '%' and '#' characters (see |:_%| and |:_#|),
+! which are expanded to the current and alternate file name. Use |::S|
+! to escape file names in case they contain special characters.
+ Environment variables are expanded |:set_env|. See |option-backslash|
+ about including spaces and backslashes.
+ Note that a '|' must be escaped twice: once for ":set" and once for
+*** ../vim-7.4.190/runtime/doc/quickfix.txt 2013-08-10 13:25:00.000000000 +0200
+--- runtime/doc/quickfix.txt 2014-02-23 23:19:32.432762138 +0100
+***************
+*** 838,844 ****
+ The alltests.py script seems to be used quite often, that's all.
+ Useful values for the 'makeprg' options therefore are:
+ setlocal makeprg=./alltests.py " Run a testsuite
+! setlocal makeprg=python % " Run a single testcase
+
+ Also see http://vim.sourceforge.net/tip_view.php?tip_id=280.
+
+--- 838,844 ----
+ The alltests.py script seems to be used quite often, that's all.
+ Useful values for the 'makeprg' options therefore are:
+ setlocal makeprg=./alltests.py " Run a testsuite
+! setlocal makeprg=python\ %:S " Run a single testcase
+
+ Also see http://vim.sourceforge.net/tip_view.php?tip_id=280.
+
+***************
+*** 1332,1338 ****
+ Here is an alternative from Michael F. Lamb for Unix that filters the errors
+ first: >
+ :setl errorformat=%Z%f:%l:\ %m,%A%p^,%-G%*[^sl]%.%#
+! :setl makeprg=javac\ %\ 2>&1\ \\\|\ vim-javac-filter
+
+ You need to put the following in "vim-javac-filter" somewhere in your path
+ (e.g., in ~/bin) and make it executable: >
+--- 1332,1338 ----
+ Here is an alternative from Michael F. Lamb for Unix that filters the errors
+ first: >
+ :setl errorformat=%Z%f:%l:\ %m,%A%p^,%-G%*[^sl]%.%#
+! :setl makeprg=javac\ %:S\ 2>&1\ \\\|\ vim-javac-filter
+
+ You need to put the following in "vim-javac-filter" somewhere in your path
+ (e.g., in ~/bin) and make it executable: >
+*** ../vim-7.4.190/runtime/doc/usr_30.txt 2013-08-10 13:25:05.000000000 +0200
+--- runtime/doc/usr_30.txt 2014-02-23 23:19:32.432762138 +0100
+***************
+*** 128,134 ****
+ You can include special Vim keywords in the command specification. The %
+ character expands to the name of the current file. So if you execute the
+ command: >
+! :set makeprg=make\ %
+
+ When you are editing main.c, then ":make" executes the following command: >
+
+--- 128,134 ----
+ You can include special Vim keywords in the command specification. The %
+ character expands to the name of the current file. So if you execute the
+ command: >
+! :set makeprg=make\ %:S
+
+ When you are editing main.c, then ":make" executes the following command: >
+
+***************
+*** 137,143 ****
+ This is not too useful, so you will refine the command a little and use the :r
+ (root) modifier: >
+
+! :set makeprg=make\ %:r.o
+
+ Now the command executed is as follows: >
+
+--- 137,143 ----
+ This is not too useful, so you will refine the command a little and use the :r
+ (root) modifier: >
+
+! :set makeprg=make\ %:r:S.o
+
+ Now the command executed is as follows: >
+
+*** ../vim-7.4.190/runtime/doc/usr_40.txt 2013-08-10 13:25:05.000000000 +0200
+--- runtime/doc/usr_40.txt 2014-02-23 23:19:32.432762138 +0100
+***************
+*** 209,215 ****
+ separates the two commands. This also means that a | character can't be used
+ inside a map command. To include one, use <Bar> (five characters). Example:
+ >
+! :map <F8> :write <Bar> !checkin %<CR>
+
+ The same problem applies to the ":unmap" command, with the addition that you
+ have to watch out for trailing white space. These two commands are different:
+--- 209,215 ----
+ separates the two commands. This also means that a | character can't be used
+ inside a map command. To include one, use <Bar> (five characters). Example:
+ >
+! :map <F8> :write <Bar> !checkin %:S<CR>
+
+ The same problem applies to the ":unmap" command, with the addition that you
+ have to watch out for trailing white space. These two commands are different:
+*** ../vim-7.4.190/runtime/doc/usr_42.txt 2013-08-10 13:25:05.000000000 +0200
+--- runtime/doc/usr_42.txt 2014-02-23 23:19:32.432762138 +0100
+***************
+*** 311,317 ****
+ item with a bitmap. For example, define a new toolbar item with: >
+
+ :tmenu ToolBar.Compile Compile the current file
+! :amenu ToolBar.Compile :!cc % -o %:r<CR>
+
+ Now you need to create the icon. For MS-Windows it must be in bitmap format,
+ with the name "Compile.bmp". For Unix XPM format is used, the file name is
+--- 311,317 ----
+ item with a bitmap. For example, define a new toolbar item with: >
+
+ :tmenu ToolBar.Compile Compile the current file
+! :amenu ToolBar.Compile :!cc %:S -o %:r:S<CR>
+
+ Now you need to create the icon. For MS-Windows it must be in bitmap format,
+ with the name "Compile.bmp". For Unix XPM format is used, the file name is
+*** ../vim-7.4.190/runtime/doc/vi_diff.txt 2013-08-10 13:25:07.000000000 +0200
+--- runtime/doc/vi_diff.txt 2014-02-23 23:19:32.432762138 +0100
+***************
+*** 540,546 ****
+ Added :wnext command. Same as ":write" followed by ":next".
+
+ The ":w!" command always writes, also when the file is write protected. In Vi
+! you would have to do ":!chmod +w %" and ":set noro".
+
+ When 'tildeop' has been set, "~" is an operator (must be followed by a
+ movement command).
+--- 540,546 ----
+ Added :wnext command. Same as ":write" followed by ":next".
+
+ The ":w!" command always writes, also when the file is write protected. In Vi
+! you would have to do ":!chmod +w %:S" and ":set noro".
+
+ When 'tildeop' has been set, "~" is an operator (must be followed by a
+ movement command).
+*** ../vim-7.4.190/src/eval.c 2014-02-23 22:54:54.724764490 +0100
+--- src/eval.c 2014-02-23 23:19:32.432762138 +0100
+***************
+*** 16950,16956 ****
+ typval_T *rettv;
+ {
+ rettv->vval.v_string = vim_strsave_shellescape(
+! get_tv_string(&argvars[0]), non_zero_arg(&argvars[1]));
+ rettv->v_type = VAR_STRING;
+ }
+
+--- 16950,16956 ----
+ typval_T *rettv;
+ {
+ rettv->vval.v_string = vim_strsave_shellescape(
+! get_tv_string(&argvars[0]), non_zero_arg(&argvars[1]), TRUE);
+ rettv->v_type = VAR_STRING;
+ }
+
+***************
+*** 24355,24360 ****
+--- 24355,24371 ----
+ }
+ }
+
++ if (src[*usedlen] == ':' && src[*usedlen + 1] == 'S')
++ {
++ p = vim_strsave_shellescape(*fnamep, FALSE, FALSE);
++ if (p == NULL)
++ return -1;
++ vim_free(*bufp);
++ *bufp = *fnamep = p;
++ *fnamelen = (int)STRLEN(p);
++ *usedlen += 2;
++ }
++
+ return valid;
+ }
+
+*** ../vim-7.4.190/src/misc2.c 2014-01-06 06:18:44.000000000 +0100
+--- src/misc2.c 2014-02-23 23:25:44.168761546 +0100
+***************
+*** 1369,1380 ****
+ * Escape a newline, depending on the 'shell' option.
+ * When "do_special" is TRUE also replace "!", "%", "#" and things starting
+ * with "<" like "<cfile>".
+ * Returns the result in allocated memory, NULL if we have run out.
+ */
+ char_u *
+! vim_strsave_shellescape(string, do_special)
+ char_u *string;
+ int do_special;
+ {
+ unsigned length;
+ char_u *p;
+--- 1369,1382 ----
+ * Escape a newline, depending on the 'shell' option.
+ * When "do_special" is TRUE also replace "!", "%", "#" and things starting
+ * with "<" like "<cfile>".
++ * When "do_newline" is FALSE do not escape newline unless it is csh shell.
+ * Returns the result in allocated memory, NULL if we have run out.
+ */
+ char_u *
+! vim_strsave_shellescape(string, do_special, do_newline)
+ char_u *string;
+ int do_special;
++ int do_newline;
+ {
+ unsigned length;
+ char_u *p;
+***************
+*** 1403,1409 ****
+ # endif
+ if (*p == '\'')
+ length += 3; /* ' => '\'' */
+! if (*p == '\n' || (*p == '!' && (csh_like || do_special)))
+ {
+ ++length; /* insert backslash */
+ if (csh_like && do_special)
+--- 1405,1412 ----
+ # endif
+ if (*p == '\'')
+ length += 3; /* ' => '\'' */
+! if ((*p == '\n' && (csh_like || do_newline))
+! || (*p == '!' && (csh_like || do_special)))
+ {
+ ++length; /* insert backslash */
+ if (csh_like && do_special)
+***************
+*** 1454,1460 ****
+ ++p;
+ continue;
+ }
+! if (*p == '\n' || (*p == '!' && (csh_like || do_special)))
+ {
+ *d++ = '\\';
+ if (csh_like && do_special)
+--- 1457,1464 ----
+ ++p;
+ continue;
+ }
+! if ((*p == '\n' && (csh_like || do_newline))
+! || (*p == '!' && (csh_like || do_special)))
+ {
+ *d++ = '\\';
+ if (csh_like && do_special)
+*** ../vim-7.4.190/src/normal.c 2014-02-22 23:49:30.268896843 +0100
+--- src/normal.c 2014-02-23 23:19:32.436762138 +0100
+***************
+*** 5790,5796 ****
+ {
+ /* Escape the argument properly for a shell command */
+ ptr = vim_strnsave(ptr, n);
+! p = vim_strsave_shellescape(ptr, TRUE);
+ vim_free(ptr);
+ if (p == NULL)
+ {
+--- 5790,5796 ----
+ {
+ /* Escape the argument properly for a shell command */
+ ptr = vim_strnsave(ptr, n);
+! p = vim_strsave_shellescape(ptr, TRUE, TRUE);
+ vim_free(ptr);
+ if (p == NULL)
+ {
+*** ../vim-7.4.190/src/proto/misc2.pro 2013-08-10 13:37:20.000000000 +0200
+--- src/proto/misc2.pro 2014-02-23 23:19:32.436762138 +0100
+***************
+*** 32,38 ****
+ char_u *vim_strsave_escaped __ARGS((char_u *string, char_u *esc_chars));
+ char_u *vim_strsave_escaped_ext __ARGS((char_u *string, char_u *esc_chars, int cc, int bsl));
+ int csh_like_shell __ARGS((void));
+! char_u *vim_strsave_shellescape __ARGS((char_u *string, int do_special));
+ char_u *vim_strsave_up __ARGS((char_u *string));
+ char_u *vim_strnsave_up __ARGS((char_u *string, int len));
+ void vim_strup __ARGS((char_u *p));
+--- 32,38 ----
+ char_u *vim_strsave_escaped __ARGS((char_u *string, char_u *esc_chars));
+ char_u *vim_strsave_escaped_ext __ARGS((char_u *string, char_u *esc_chars, int cc, int bsl));
+ int csh_like_shell __ARGS((void));
+! char_u *vim_strsave_shellescape __ARGS((char_u *string, int do_special, int do_newline));
+ char_u *vim_strsave_up __ARGS((char_u *string));
+ char_u *vim_strnsave_up __ARGS((char_u *string, int len));
+ void vim_strup __ARGS((char_u *p));
+*** ../vim-7.4.190/src/version.c 2014-02-23 22:58:12.072764176 +0100
+--- src/version.c 2014-02-23 23:35:51.044760579 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 191,
+ /**/
+
+--
+Windows
+M!uqoms
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.192 b/patches/source/vim/patches/7.4.192
new file mode 100644
index 000000000..256d0fafb
--- /dev/null
+++ b/patches/source/vim/patches/7.4.192
@@ -0,0 +1,44 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.192
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.192
+Problem: Memory leak when giving E853.
+Solution: Free the argument. (Dominique Pelle)
+Files: src/eval.c
+
+
+*** ../vim-7.4.191/src/eval.c 2014-02-23 23:38:58.824760280 +0100
+--- src/eval.c 2014-02-24 03:27:39.244738435 +0100
+***************
+*** 21457,21462 ****
+--- 21457,21463 ----
+ if (STRCMP(((char_u **)(newargs.ga_data))[i], arg) == 0)
+ {
+ EMSG2(_("E853: Duplicate argument name: %s"), arg);
++ vim_free(arg);
+ goto erret;
+ }
+
+*** ../vim-7.4.191/src/version.c 2014-02-23 23:38:58.828760280 +0100
+--- src/version.c 2014-02-24 03:28:23.068738365 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 192,
+ /**/
+
+--
+Seen on the back of a biker's vest: If you can read this, my wife fell off.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.193 b/patches/source/vim/patches/7.4.193
new file mode 100644
index 000000000..f84a9d1c7
--- /dev/null
+++ b/patches/source/vim/patches/7.4.193
@@ -0,0 +1,106 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.193
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.193
+Problem: Typos in messages.
+Solution: "then" -> "than". (Dominique Pelle)
+Files: src/if_py_both.h, src/spell.c
+
+
+*** ../vim-7.4.192/src/if_py_both.h 2014-02-15 15:58:55.081904773 +0100
+--- src/if_py_both.h 2014-03-08 16:10:46.015459417 +0100
+***************
+*** 236,242 ****
+ if (*result <= 0)
+ {
+ PyErr_SET_STRING(PyExc_ValueError,
+! N_("number must be greater then zero"));
+ return -1;
+ }
+ }
+--- 236,242 ----
+ if (*result <= 0)
+ {
+ PyErr_SET_STRING(PyExc_ValueError,
+! N_("number must be greater than zero"));
+ return -1;
+ }
+ }
+***************
+*** 2405,2411 ****
+ if ((item = PyIter_Next(iterator)))
+ {
+ PyErr_FORMAT(PyExc_ValueError,
+! N_("attempt to assign sequence of size greater then %d "
+ "to extended slice"), 0);
+ Py_DECREF(item);
+ ret = -1;
+--- 2405,2411 ----
+ if ((item = PyIter_Next(iterator)))
+ {
+ PyErr_FORMAT(PyExc_ValueError,
+! N_("attempt to assign sequence of size greater than %d "
+ "to extended slice"), 0);
+ Py_DECREF(item);
+ ret = -1;
+***************
+*** 2510,2516 ****
+ {
+ Py_DECREF(iterator);
+ PyErr_FORMAT(PyExc_ValueError,
+! N_("attempt to assign sequence of size greater then %d "
+ "to extended slice"), (int) slicelen);
+ list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli);
+ PyMem_Free(lis);
+--- 2510,2516 ----
+ {
+ Py_DECREF(iterator);
+ PyErr_FORMAT(PyExc_ValueError,
+! N_("attempt to assign sequence of size greater than %d "
+ "to extended slice"), (int) slicelen);
+ list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli);
+ PyMem_Free(lis);
+*** ../vim-7.4.192/src/spell.c 2014-02-23 22:52:33.372764715 +0100
+--- src/spell.c 2014-03-08 16:10:46.019459417 +0100
+***************
+*** 12037,12043 ****
+ /* Normal byte, go one level deeper. If it's not equal to the
+ * byte in the bad word adjust the score. But don't even try
+ * when the byte was already changed. And don't try when we
+! * just deleted this byte, accepting it is always cheaper then
+ * delete + substitute. */
+ if (c == fword[sp->ts_fidx]
+ #ifdef FEAT_MBYTE
+--- 12037,12043 ----
+ /* Normal byte, go one level deeper. If it's not equal to the
+ * byte in the bad word adjust the score. But don't even try
+ * when the byte was already changed. And don't try when we
+! * just deleted this byte, accepting it is always cheaper than
+ * delete + substitute. */
+ if (c == fword[sp->ts_fidx]
+ #ifdef FEAT_MBYTE
+*** ../vim-7.4.192/src/version.c 2014-02-24 03:31:55.816738026 +0100
+--- src/version.c 2014-03-08 16:11:51.591460422 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 193,
+ /**/
+
+--
+BEDEVERE: How do you know so much about swallows?
+ARTHUR: Well you have to know these things when you're a king, you know.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.194 b/patches/source/vim/patches/7.4.194
new file mode 100644
index 000000000..e73bd1398
--- /dev/null
+++ b/patches/source/vim/patches/7.4.194
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.194
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.194
+Problem: Can't build for Android.
+Solution: Add #if condition. (Fredrik Fornwall)
+Files: src/mbyte.c
+
+
+*** ../vim-7.4.193/src/mbyte.c 2014-01-14 13:26:17.000000000 +0100
+--- src/mbyte.c 2014-03-03 22:41:30.527101306 +0100
+***************
+*** 708,714 ****
+ * API */
+ n = IsDBCSLeadByteEx(enc_dbcs, (WINBYTE)i) ? 2 : 1;
+ #else
+! # if defined(MACOS) || defined(__amigaos4__)
+ /*
+ * if mblen() is not available, character which MSB is turned on
+ * are treated as leading byte character. (note : This assumption
+--- 708,714 ----
+ * API */
+ n = IsDBCSLeadByteEx(enc_dbcs, (WINBYTE)i) ? 2 : 1;
+ #else
+! # if defined(MACOS) || defined(__amigaos4__) || defined(__ANDROID__)
+ /*
+ * if mblen() is not available, character which MSB is turned on
+ * are treated as leading byte character. (note : This assumption
+*** ../vim-7.4.193/src/version.c 2014-03-08 16:13:39.123462070 +0100
+--- src/version.c 2014-03-12 14:53:45.148684209 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 194,
+ /**/
+
+--
+A programmer's wife asks him: "Please run to the store and pick up a loaf of
+bread. If they have eggs, get a dozen". The programmer comes home with 12
+loafs of bread.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.195 b/patches/source/vim/patches/7.4.195
new file mode 100644
index 000000000..0cd888d46
--- /dev/null
+++ b/patches/source/vim/patches/7.4.195
@@ -0,0 +1,164 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.195
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.195 (after 7.4.193)
+Problem: Python tests fail.
+Solution: Change "then" to "than" in more places. (Dominique Pelle, Taro
+ Muraoka)
+Files: src/testdir/test86.in, src/testdir/test86.ok,
+ src/testdir/test87.in, src/testdir/test87.ok
+
+
+*** ../vim-7.4.194/src/testdir/test86.in 2014-02-11 18:47:18.678311042 +0100
+--- src/testdir/test86.in 2014-03-12 15:20:41.512708977 +0100
+***************
+*** 675,681 ****
+ # Check GCing iterator that was not fully exhausted
+ i = iter(vim.buffers)
+ cb.append('i:' + str(next(i)))
+! # and also check creating more then one iterator at a time
+ i2 = iter(vim.buffers)
+ cb.append('i2:' + str(next(i2)))
+ cb.append('i:' + str(next(i)))
+--- 675,681 ----
+ # Check GCing iterator that was not fully exhausted
+ i = iter(vim.buffers)
+ cb.append('i:' + str(next(i)))
+! # and also check creating more than one iterator at a time
+ i2 = iter(vim.buffers)
+ cb.append('i2:' + str(next(i2)))
+ cb.append('i:' + str(next(i)))
+*** ../vim-7.4.194/src/testdir/test86.ok 2014-01-14 16:54:53.000000000 +0100
+--- src/testdir/test86.ok 2014-03-12 15:19:28.080707851 +0100
+***************
+*** 882,892 ****
+ l[:] = FailingIter():NotImplementedError:('iter',)
+ l[:] = FailingIterNext():NotImplementedError:('next',)
+ <<< Finished
+! nel[1:10:2] = "abcK":ValueError:('attempt to assign sequence of size greater then 2 to extended slice',)
+ ('a', 'b', 'c', 'O')
+ nel[1:10:2] = "a":ValueError:('attempt to assign sequence of size 1 to extended slice of size 2',)
+ ('a', 'b', 'c', 'O')
+! nel[1:1:-1] = "a":ValueError:('attempt to assign sequence of size greater then 0 to extended slice',)
+ ('a', 'b', 'c', 'O')
+ nel[:] = FailingIterNextN(2):NotImplementedError:('next N',)
+ ('a', 'b', 'c', 'O')
+--- 882,892 ----
+ l[:] = FailingIter():NotImplementedError:('iter',)
+ l[:] = FailingIterNext():NotImplementedError:('next',)
+ <<< Finished
+! nel[1:10:2] = "abcK":ValueError:('attempt to assign sequence of size greater than 2 to extended slice',)
+ ('a', 'b', 'c', 'O')
+ nel[1:10:2] = "a":ValueError:('attempt to assign sequence of size 1 to extended slice of size 2',)
+ ('a', 'b', 'c', 'O')
+! nel[1:1:-1] = "a":ValueError:('attempt to assign sequence of size greater than 0 to extended slice',)
+ ('a', 'b', 'c', 'O')
+ nel[:] = FailingIterNextN(2):NotImplementedError:('next N',)
+ ('a', 'b', 'c', 'O')
+***************
+*** 1233,1240 ****
+ >>> Testing NumberToLong using vim.buffers[%s]
+ vim.buffers[[]]:TypeError:('expected int(), long() or something supporting coercing to long(), but got list',)
+ vim.buffers[None]:TypeError:('expected int(), long() or something supporting coercing to long(), but got NoneType',)
+! vim.buffers[-1]:ValueError:('number must be greater then zero',)
+! vim.buffers[0]:ValueError:('number must be greater then zero',)
+ <<< Finished
+ > Current
+ >> CurrentGetattr
+--- 1233,1240 ----
+ >>> Testing NumberToLong using vim.buffers[%s]
+ vim.buffers[[]]:TypeError:('expected int(), long() or something supporting coercing to long(), but got list',)
+ vim.buffers[None]:TypeError:('expected int(), long() or something supporting coercing to long(), but got NoneType',)
+! vim.buffers[-1]:ValueError:('number must be greater than zero',)
+! vim.buffers[0]:ValueError:('number must be greater than zero',)
+ <<< Finished
+ > Current
+ >> CurrentGetattr
+*** ../vim-7.4.194/src/testdir/test87.in 2014-02-11 18:47:18.678311042 +0100
+--- src/testdir/test87.in 2014-03-12 15:21:20.036709567 +0100
+***************
+*** 664,670 ****
+ # Check GCing iterator that was not fully exhausted
+ i = iter(vim.buffers)
+ cb.append('i:' + str(next(i)))
+! # and also check creating more then one iterator at a time
+ i2 = iter(vim.buffers)
+ cb.append('i2:' + str(next(i2)))
+ cb.append('i:' + str(next(i)))
+--- 664,670 ----
+ # Check GCing iterator that was not fully exhausted
+ i = iter(vim.buffers)
+ cb.append('i:' + str(next(i)))
+! # and also check creating more than one iterator at a time
+ i2 = iter(vim.buffers)
+ cb.append('i2:' + str(next(i2)))
+ cb.append('i:' + str(next(i)))
+*** ../vim-7.4.194/src/testdir/test87.ok 2014-01-14 16:54:53.000000000 +0100
+--- src/testdir/test87.ok 2014-03-12 15:19:28.080707851 +0100
+***************
+*** 882,892 ****
+ l[:] = FailingIter():(<class 'NotImplementedError'>, NotImplementedError('iter',))
+ l[:] = FailingIterNext():(<class 'NotImplementedError'>, NotImplementedError('next',))
+ <<< Finished
+! nel[1:10:2] = "abcK":(<class 'ValueError'>, ValueError('attempt to assign sequence of size greater then 2 to extended slice',))
+ (b'a', b'b', b'c', b'O')
+ nel[1:10:2] = "a":(<class 'ValueError'>, ValueError('attempt to assign sequence of size 1 to extended slice of size 2',))
+ (b'a', b'b', b'c', b'O')
+! nel[1:1:-1] = "a":(<class 'ValueError'>, ValueError('attempt to assign sequence of size greater then 0 to extended slice',))
+ (b'a', b'b', b'c', b'O')
+ nel[:] = FailingIterNextN(2):(<class 'NotImplementedError'>, NotImplementedError('next N',))
+ (b'a', b'b', b'c', b'O')
+--- 882,892 ----
+ l[:] = FailingIter():(<class 'NotImplementedError'>, NotImplementedError('iter',))
+ l[:] = FailingIterNext():(<class 'NotImplementedError'>, NotImplementedError('next',))
+ <<< Finished
+! nel[1:10:2] = "abcK":(<class 'ValueError'>, ValueError('attempt to assign sequence of size greater than 2 to extended slice',))
+ (b'a', b'b', b'c', b'O')
+ nel[1:10:2] = "a":(<class 'ValueError'>, ValueError('attempt to assign sequence of size 1 to extended slice of size 2',))
+ (b'a', b'b', b'c', b'O')
+! nel[1:1:-1] = "a":(<class 'ValueError'>, ValueError('attempt to assign sequence of size greater than 0 to extended slice',))
+ (b'a', b'b', b'c', b'O')
+ nel[:] = FailingIterNextN(2):(<class 'NotImplementedError'>, NotImplementedError('next N',))
+ (b'a', b'b', b'c', b'O')
+***************
+*** 1233,1240 ****
+ >>> Testing NumberToLong using vim.buffers[%s]
+ vim.buffers[[]]:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got list',))
+ vim.buffers[None]:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got NoneType',))
+! vim.buffers[-1]:(<class 'ValueError'>, ValueError('number must be greater then zero',))
+! vim.buffers[0]:(<class 'ValueError'>, ValueError('number must be greater then zero',))
+ <<< Finished
+ > Current
+ >> CurrentGetattr
+--- 1233,1240 ----
+ >>> Testing NumberToLong using vim.buffers[%s]
+ vim.buffers[[]]:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got list',))
+ vim.buffers[None]:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got NoneType',))
+! vim.buffers[-1]:(<class 'ValueError'>, ValueError('number must be greater than zero',))
+! vim.buffers[0]:(<class 'ValueError'>, ValueError('number must be greater than zero',))
+ <<< Finished
+ > Current
+ >> CurrentGetattr
+*** ../vim-7.4.194/src/version.c 2014-03-12 14:54:29.920684895 +0100
+--- src/version.c 2014-03-12 15:19:20.016707728 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 195,
+ /**/
+
+--
+Zen Microsystems: we're the om in .commmmmmmmm
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.196 b/patches/source/vim/patches/7.4.196
new file mode 100644
index 000000000..d483b241d
--- /dev/null
+++ b/patches/source/vim/patches/7.4.196
@@ -0,0 +1,51 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.196
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.196
+Problem: Tests fail on Solaris 9 and 10.
+Solution: Use "test -f" instead of "test -e". (Laurent Blume)
+Files: src/testdir/Makefile
+
+
+*** ../vim-7.4.195/src/testdir/Makefile 2014-02-23 23:38:58.812760280 +0100
+--- src/testdir/Makefile 2014-03-12 15:46:41.352732878 +0100
+***************
+*** 61,67 ****
+ test1.out: test1.in
+ -rm -rf $*.failed $(RM_ON_RUN) $(RM_ON_START) wrongtermsize
+ $(RUN_VIM) $*.in
+! @/bin/sh -c "if test -e wrongtermsize; \
+ then echo; \
+ echo test1 FAILED - terminal size must be 80x24 or larger; \
+ echo; exit 1; \
+--- 61,67 ----
+ test1.out: test1.in
+ -rm -rf $*.failed $(RM_ON_RUN) $(RM_ON_START) wrongtermsize
+ $(RUN_VIM) $*.in
+! @/bin/sh -c "if test -f wrongtermsize; \
+ then echo; \
+ echo test1 FAILED - terminal size must be 80x24 or larger; \
+ echo; exit 1; \
+*** ../vim-7.4.195/src/version.c 2014-03-12 15:26:36.432714415 +0100
+--- src/version.c 2014-03-12 15:48:09.700734232 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 196,
+ /**/
+
+--
+My Go, this amn keyboar oesn't have a .
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.197 b/patches/source/vim/patches/7.4.197
new file mode 100644
index 000000000..80783eb46
--- /dev/null
+++ b/patches/source/vim/patches/7.4.197
@@ -0,0 +1,1052 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.197
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.197
+Problem: Various problems on VMS.
+Solution: Fix several VMS problems. (Zoltan Arpadffy)
+Files: runtime/doc/os_vms.txt, src/Make_vms.mms, src/fileio.c,
+ src/os_unix.c, src/os_unix.h, src/os_vms.c, src/os_vms_conf.h,
+ src/proto/os_vms.pro, src/testdir/Make_vms.mms,
+ src/testdir/test72.in, src/testdir/test77a.com,
+ src/testdir/test77a.in, src/testdir/test77a.ok src/undo.c
+
+
+*** ../vim-7.4.196/runtime/doc/os_vms.txt 2013-08-10 13:24:59.000000000 +0200
+--- runtime/doc/os_vms.txt 2014-03-12 15:55:50.196741288 +0100
+***************
+*** 1,4 ****
+! *os_vms.txt* For Vim version 7.4. Last change: 2011 Aug 14
+
+
+ VIM REFERENCE MANUAL
+--- 1,4 ----
+! *os_vms.txt* For Vim version 7.4. Last change: 2014 Feb 24
+
+
+ VIM REFERENCE MANUAL
+***************
+*** 24,30 ****
+
+ 1. Getting started *vms-started*
+
+! Vim (Vi IMproved) is a vi-compatible text editor that runs on nearly every
+ operating system known to humanity. Now use Vim on OpenVMS too, in character
+ or X/Motif environment. It is fully featured and absolutely compatible with
+ Vim on other operating systems.
+--- 24,30 ----
+
+ 1. Getting started *vms-started*
+
+! Vim (Vi IMproved) is a Vi-compatible text editor that runs on nearly every
+ operating system known to humanity. Now use Vim on OpenVMS too, in character
+ or X/Motif environment. It is fully featured and absolutely compatible with
+ Vim on other operating systems.
+***************
+*** 764,769 ****
+--- 764,785 ----
+
+ 9. VMS related changes *vms-changes*
+
++ Version 7.4
++ - Undo: VMS can not handle more than one dot in the filenames use "dir/name" -> "dir/_un_name"
++ add _un_ at the beginning to keep the extension
++ - correct swap file name wildcard handling
++ - handle iconv usage correctly
++ - do not optimize on vax - otherwise it hangs compiling crypto files
++ - fileio.c fix the comment
++ - correct RealWaitForChar
++ - after 7.4-119 use different functions lib$cvtf_to_internal_time because Alpha and VAX have
++ G_FLOAT but IA64 uses IEEE float otherwise Vim crashes
++ - guard agains crashes that are caused by mixed filenames
++ - [TESTDIR]make_vms.mms changed to see the output files
++ - Improve tests, update known issues
++ - minor compiler warnings fixed
++ - CTAGS 5.8 +regex included
++
+ Version 7.3
+ - CTAGS 5.8 included
+ - VMS compile warnings fixed - floating-point overflow warning corrected on VAX
+*** ../vim-7.4.196/src/Make_vms.mms 2013-05-06 04:06:04.000000000 +0200
+--- src/Make_vms.mms 2014-03-12 15:55:50.196741288 +0100
+***************
+*** 2,8 ****
+ # Makefile for Vim on OpenVMS
+ #
+ # Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
+! # Last change: 2008 Aug 16
+ #
+ # This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
+ # with MMS and MMK
+--- 2,8 ----
+ # Makefile for Vim on OpenVMS
+ #
+ # Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
+! # Last change: 2014 Feb 24
+ #
+ # This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
+ # with MMS and MMK
+***************
+*** 21,29 ****
+ ######################################################################
+ # Configuration section.
+ ######################################################################
+- # VMS version
+- # Uncomment if you use VMS version 6.2 or older
+- # OLD_VMS = YES
+
+ # Compiler selection.
+ # Comment out if you use the VAXC compiler
+--- 21,26 ----
+***************
+*** 60,66 ****
+
+ # Uncomment if want a debug version. Resulting executable is DVIM.EXE
+ # Development purpose only! Normally, it should not be defined. !!!
+! # DEBUG = YES
+
+ # Languages support for Perl, Python, TCL etc.
+ # If you don't need it really, leave them behind the comment.
+--- 57,63 ----
+
+ # Uncomment if want a debug version. Resulting executable is DVIM.EXE
+ # Development purpose only! Normally, it should not be defined. !!!
+! # DEBUG = YES
+
+ # Languages support for Perl, Python, TCL etc.
+ # If you don't need it really, leave them behind the comment.
+***************
+*** 87,92 ****
+--- 84,92 ----
+ # Allow FEATURE_MZSCHEME
+ # VIM_MZSCHEME = YES
+
++ # Use ICONV
++ # VIM_ICONV = YES
++
+ ######################################################################
+ # Directory, library and include files configuration section.
+ # Normally you need not to change anything below. !
+***************
+*** 99,123 ****
+
+ .IFDEF MMSVAX
+ .IFDEF DECC # VAX with DECC
+! CC_DEF = cc # /decc # some system requires this switch but when it is not required /ver might fail
+ PREFIX = /prefix=all
+ .ELSE # VAX with VAXC
+ CC_DEF = cc
+ PREFIX =
+ CCVER =
+ .ENDIF
+! .ELSE # AXP wixh DECC
+ CC_DEF = cc
+ PREFIX = /prefix=all
+ .ENDIF
+
+ LD_DEF = link
+ C_INC = [.proto]
+
+- .IFDEF OLD_VMS
+- VMS_DEF = ,"OLD_VMS"
+- .ENDIF
+-
+ .IFDEF DEBUG
+ DEBUG_DEF = ,"DEBUG"
+ TARGET = dvim.exe
+--- 99,123 ----
+
+ .IFDEF MMSVAX
+ .IFDEF DECC # VAX with DECC
+! CC_DEF = cc # /decc # some versions require /decc switch but when it is not required /ver might fail
+ PREFIX = /prefix=all
++ OPTIMIZE= /noopt # do not optimize on VAX. The compiler has hard time with crypto functions
+ .ELSE # VAX with VAXC
+ CC_DEF = cc
+ PREFIX =
++ OPTIMIZE= /noopt
+ CCVER =
+ .ENDIF
+! .ELSE # AXP and IA64 with DECC
+ CC_DEF = cc
+ PREFIX = /prefix=all
++ OPTIMIZE= /opt
+ .ENDIF
+
++
+ LD_DEF = link
+ C_INC = [.proto]
+
+ .IFDEF DEBUG
+ DEBUG_DEF = ,"DEBUG"
+ TARGET = dvim.exe
+***************
+*** 125,131 ****
+ LDFLAGS = /debug
+ .ELSE
+ TARGET = vim.exe
+! CFLAGS = /opt$(PREFIX)
+ LDFLAGS =
+ .ENDIF
+
+--- 125,131 ----
+ LDFLAGS = /debug
+ .ELSE
+ TARGET = vim.exe
+! CFLAGS = $(OPTIMIZE)$(PREFIX)
+ LDFLAGS =
+ .ENDIF
+
+***************
+*** 274,279 ****
+--- 274,284 ----
+ MZSCH_OBJ = if_mzsch.obj
+ .ENDIF
+
++ .IFDEF VIM_ICONV
++ # ICONV related setup
++ ICONV_DEF = ,"USE_ICONV"
++ .ENDIF
++
+ ######################################################################
+ # End of configuration section.
+ # Please, do not change anything below without programming experience.
+***************
+*** 287,294 ****
+
+ .SUFFIXES : .obj .c
+
+! ALL_CFLAGS = /def=($(MODEL_DEF)$(DEFS)$(VMS_DEF)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
+! $(TCL_DEF)$(SNIFF_DEF)$(RUBY_DEF)$(XIM_DEF)$(HANGULIN_DEF)$(TAG_DEF)$(MZSCH_DEF)) -
+ $(CFLAGS)$(GUI_FLAG) -
+ /include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC)$(PERL_INC)$(PYTHON_INC)$(TCL_INC))
+
+--- 292,299 ----
+
+ .SUFFIXES : .obj .c
+
+! ALL_CFLAGS = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
+! $(TCL_DEF)$(SNIFF_DEF)$(RUBY_DEF)$(XIM_DEF)$(HANGULIN_DEF)$(TAG_DEF)$(MZSCH_DEF)$(ICONV_DEF)) -
+ $(CFLAGS)$(GUI_FLAG) -
+ /include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC)$(PERL_INC)$(PYTHON_INC)$(TCL_INC))
+
+***************
+*** 296,303 ****
+ # It is specially formated for correct display of unix like includes
+ # as $(GUI_INC) - replaced with $(GUI_INC_VER)
+ # Otherwise should not be any other difference.
+! ALL_CFLAGS_VER = /def=($(MODEL_DEF)$(DEFS)$(VMS_DEF)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
+! $(TCL_DEF)$(SNIFF_DEF)$(RUBY_DEF)$(XIM_DEF)$(HANGULIN_DEF)$(TAG_DEF)$(MZSCH_DEF)) -
+ $(CFLAGS)$(GUI_FLAG) -
+ /include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC_VER)$(PERL_INC)$(PYTHON_INC)$(TCL_INC))
+
+--- 301,308 ----
+ # It is specially formated for correct display of unix like includes
+ # as $(GUI_INC) - replaced with $(GUI_INC_VER)
+ # Otherwise should not be any other difference.
+! ALL_CFLAGS_VER = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
+! $(TCL_DEF)$(SNIFF_DEF)$(RUBY_DEF)$(XIM_DEF)$(HANGULIN_DEF)$(TAG_DEF)$(MZSCH_DEF)$(ICONV_DEF)) -
+ $(CFLAGS)$(GUI_FLAG) -
+ /include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC_VER)$(PERL_INC)$(PYTHON_INC)$(TCL_INC))
+
+*** ../vim-7.4.196/src/fileio.c 2014-02-23 22:58:12.072764176 +0100
+--- src/fileio.c 2014-03-12 15:55:50.200741288 +0100
+***************
+*** 7559,7565 ****
+ p = (char_u *)tempnam("tmp:", (char *)itmp);
+ if (p != NULL)
+ {
+! /* VMS will use '.LOG' if we don't explicitly specify an extension,
+ * and VIM will then be unable to find the file later */
+ STRCPY(itmp, p);
+ STRCAT(itmp, ".txt");
+--- 7559,7565 ----
+ p = (char_u *)tempnam("tmp:", (char *)itmp);
+ if (p != NULL)
+ {
+! /* VMS will use '.LIS' if we don't explicitly specify an extension,
+ * and VIM will then be unable to find the file later */
+ STRCPY(itmp, p);
+ STRCAT(itmp, ".txt");
+*** ../vim-7.4.196/src/os_unix.c 2013-12-11 17:12:32.000000000 +0100
+--- src/os_unix.c 2014-03-12 16:25:11.144768271 +0100
+***************
+*** 2965,2971 ****
+--- 2965,2990 ----
+
+ if (stat((char *)name, &st))
+ return 0;
++ #ifdef VMS
++ /* Like on Unix system file can have executable rights but not necessarily
++ * be an executable, but on Unix is not a default for an ordianry file to
++ * have an executable flag - on VMS it is in most cases.
++ * Therefore, this check does not have any sense - let keep us to the
++ * conventions instead:
++ * *.COM and *.EXE files are the executables - the rest are not. This is
++ * not ideal but better then it was.
++ */
++ int vms_executable = 0;
++ if (S_ISREG(st.st_mode) && mch_access((char *)name, X_OK) == 0)
++ {
++ if (strstr(vms_tolower((char*)name),".exe") != NULL
++ || strstr(vms_tolower((char*)name),".com")!= NULL)
++ vms_executable = 1;
++ }
++ return vms_executable;
++ #else
+ return S_ISREG(st.st_mode) && mch_access((char *)name, X_OK) == 0;
++ #endif
+ }
+
+ /*
+***************
+*** 2983,2989 ****
+--- 3002,3010 ----
+ /* If it's an absolute or relative path don't need to use $PATH. */
+ if (mch_isFullName(name) || (name[0] == '.' && (name[1] == '/'
+ || (name[1] == '.' && name[2] == '/'))))
++ {
+ return executable_file(name);
++ }
+
+ p = (char_u *)getenv("PATH");
+ if (p == NULL || *p == NUL)
+*** ../vim-7.4.196/src/os_unix.h 2013-12-11 17:12:32.000000000 +0100
+--- src/os_unix.h 2014-03-12 15:55:50.204741288 +0100
+***************
+*** 302,308 ****
+ # define USR_VIMRC_FILE2 "$HOME/vimfiles/vimrc"
+ # else
+ # ifdef VMS
+! # define USR_VIMRC_FILE2 "sys$login:vimfiles:vimrc"
+ # else
+ # define USR_VIMRC_FILE2 "~/.vim/vimrc"
+ # endif
+--- 302,308 ----
+ # define USR_VIMRC_FILE2 "$HOME/vimfiles/vimrc"
+ # else
+ # ifdef VMS
+! # define USR_VIMRC_FILE2 "sys$login:vimfiles/vimrc"
+ # else
+ # define USR_VIMRC_FILE2 "~/.vim/vimrc"
+ # endif
+***************
+*** 329,335 ****
+ # define USR_GVIMRC_FILE2 "$HOME/vimfiles/gvimrc"
+ # else
+ # ifdef VMS
+! # define USR_GVIMRC_FILE2 "sys$login:vimfiles:gvimrc"
+ # else
+ # define USR_GVIMRC_FILE2 "~/.vim/gvimrc"
+ # endif
+--- 329,335 ----
+ # define USR_GVIMRC_FILE2 "$HOME/vimfiles/gvimrc"
+ # else
+ # ifdef VMS
+! # define USR_GVIMRC_FILE2 "sys$login:vimfiles/gvimrc"
+ # else
+ # define USR_GVIMRC_FILE2 "~/.vim/gvimrc"
+ # endif
+*** ../vim-7.4.196/src/os_vms.c 2013-12-11 17:12:32.000000000 +0100
+--- src/os_vms.c 2014-03-12 16:26:17.544769288 +0100
+***************
+*** 296,301 ****
+--- 296,313 ----
+ }
+
+ /*
++ * Convert string to lowercase - most often filename
++ */
++ char *
++ vms_tolower( char *name )
++ {
++ int i,nlen = strlen(name);
++ for (i = 0; i < nlen; i++)
++ name[i] = TOLOWER_ASC(name[i]);
++ return name;
++ }
++
++ /*
+ * Convert VMS system() or lib$spawn() return code to Unix-like exit value.
+ */
+ int
+***************
+*** 361,373 ****
+ vms_wproc(char *name, int val)
+ {
+ int i;
+- int nlen;
+ static int vms_match_alloced = 0;
+
+! if (val != DECC$K_FILE) /* Directories and foreign non VMS files are not
+! counting */
+ return 1;
+
+ if (vms_match_num == 0) {
+ /* first time through, setup some things */
+ if (NULL == vms_fmatch) {
+--- 373,384 ----
+ vms_wproc(char *name, int val)
+ {
+ int i;
+ static int vms_match_alloced = 0;
+
+! if (val == DECC$K_FOREIGN ) /* foreign non VMS files are not counting */
+ return 1;
+
++ /* accept all DECC$K_FILE and DECC$K_DIRECTORY */
+ if (vms_match_num == 0) {
+ /* first time through, setup some things */
+ if (NULL == vms_fmatch) {
+***************
+*** 383,394 ****
+ }
+ }
+
+ vms_remove_version(name);
+!
+! /* convert filename to lowercase */
+! nlen = strlen(name);
+! for (i = 0; i < nlen; i++)
+! name[i] = TOLOWER_ASC(name[i]);
+
+ /* if name already exists, don't add it */
+ for (i = 0; i<vms_match_num; i++) {
+--- 394,402 ----
+ }
+ }
+
++ /* make matches look uniform */
+ vms_remove_version(name);
+! name=vms_tolower(name);
+
+ /* if name already exists, don't add it */
+ for (i = 0; i<vms_match_num; i++) {
+***************
+*** 428,433 ****
+--- 436,442 ----
+ {
+ int i, cnt = 0;
+ char_u buf[MAXPATHL];
++ char *result;
+ int dir;
+ int files_alloced, files_free;
+
+***************
+*** 449,456 ****
+ STRCPY(buf,pat[i]);
+
+ vms_match_num = 0; /* reset collection counter */
+! cnt = decc$to_vms(decc$translate_vms(vms_fixfilename(buf)), vms_wproc, 1, 0);
+! /* allow wild, no dir */
+ if (cnt > 0)
+ cnt = vms_match_num;
+
+--- 458,470 ----
+ STRCPY(buf,pat[i]);
+
+ vms_match_num = 0; /* reset collection counter */
+! result = decc$translate_vms(vms_fixfilename(buf));
+! if ( (int) result == 0 || (int) result == -1 ) {
+! cnt = 0;
+! }
+! else {
+! cnt = decc$to_vms(result, vms_wproc, 1 /*allow wild*/ , (flags & EW_DIR ? 0:1 ) /*allow directory*/) ;
+! }
+ if (cnt > 0)
+ cnt = vms_match_num;
+
+***************
+*** 497,506 ****
+ mch_expandpath(garray_T *gap, char_u *path, int flags)
+ {
+ int i,cnt = 0;
+! vms_match_num = 0;
+
+! cnt = decc$to_vms(decc$translate_vms(vms_fixfilename(path)), vms_wproc, 1, 0);
+! /* allow wild, no dir */
+ if (cnt > 0)
+ cnt = vms_match_num;
+ for (i = 0; i < cnt; i++)
+--- 511,528 ----
+ mch_expandpath(garray_T *gap, char_u *path, int flags)
+ {
+ int i,cnt = 0;
+! char *result;
+
+! vms_match_num = 0;
+! /* the result from the decc$translate_vms needs to be handled */
+! /* otherwise it might create ACCVIO error in decc$to_vms */
+! result = decc$translate_vms(vms_fixfilename(path));
+! if ( (int) result == 0 || (int) result == -1 ) {
+! cnt = 0;
+! }
+! else {
+! cnt = decc$to_vms(result, vms_wproc, 1 /*allow_wild*/, (flags & EW_DIR ? 0:1 ) /*allow directory*/);
+! }
+ if (cnt > 0)
+ cnt = vms_match_num;
+ for (i = 0; i < cnt; i++)
+***************
+*** 521,526 ****
+--- 543,549 ----
+ char *end_of_dir;
+ char ch;
+ int len;
++ char *out_str=out;
+
+ /* copy vms filename portion up to last colon
+ * (node and/or disk)
+***************
+*** 602,608 ****
+ *end_of_dir = ']';
+ }
+
+-
+ /*
+ * for decc$to_vms in vms_fixfilename
+ */
+--- 625,630 ----
+***************
+*** 710,735 ****
+ struct _generic_64 time_diff;
+ struct _generic_64 time_out;
+ unsigned int convert_operation = LIB$K_DELTA_SECONDS_F;
+! float sec = (float) msec / 1000;
+
+ /* make sure the iochan is set */
+ if (!iochan)
+ get_tty();
+
+! if (msec > 0) {
+ /* time-out specified; convert it to absolute time */
+
+ /* get current time (number of 100ns ticks since the VMS Epoch) */
+ status = sys$gettim(&time_curr);
+ if (status != SS$_NORMAL)
+ return 0; /* error */
+-
+ /* construct the delta time */
+! status = lib$cvtf_to_internal_time(
+ &convert_operation, &sec, &time_diff);
+ if (status != LIB$_NORMAL)
+ return 0; /* error */
+-
+ /* add them up */
+ status = lib$add_times(
+ &time_curr,
+--- 732,764 ----
+ struct _generic_64 time_diff;
+ struct _generic_64 time_out;
+ unsigned int convert_operation = LIB$K_DELTA_SECONDS_F;
+! float sec =(float) msec/1000;
+
+ /* make sure the iochan is set */
+ if (!iochan)
+ get_tty();
+
+! if (sec > 0) {
+ /* time-out specified; convert it to absolute time */
++ /* sec>0 requirement of lib$cvtf_to_internal_time()*/
+
+ /* get current time (number of 100ns ticks since the VMS Epoch) */
+ status = sys$gettim(&time_curr);
+ if (status != SS$_NORMAL)
+ return 0; /* error */
+ /* construct the delta time */
+! #if __G_FLOAT==0
+! # ifndef VAX
+! /* IEEE is default on IA64, but can be used on Alpha too - but not on VAX */
+! status = lib$cvts_to_internal_time(
+ &convert_operation, &sec, &time_diff);
++ # endif
++ #else /* default on Alpha and VAX */
++ status = lib$cvtf_to_internal_time(
++ &convert_operation, &sec, &time_diff);
++ #endif
+ if (status != LIB$_NORMAL)
+ return 0; /* error */
+ /* add them up */
+ status = lib$add_times(
+ &time_curr,
+*** ../vim-7.4.196/src/os_vms_conf.h 2014-02-23 22:52:33.372764715 +0100
+--- src/os_vms_conf.h 2014-03-12 15:55:50.204741288 +0100
+***************
+*** 166,173 ****
+ #undef HAVE_SYS_TIME_H
+ #undef HAVE_LOCALE_H
+ #define BROKEN_LOCALE
+- #undef HAVE_ICONV_H
+- #undef HAVE_ICONV
+ #undef DYNAMIC_ICONV
+ #undef HAVE_STRFTIME
+ #else
+--- 166,171 ----
+***************
+*** 177,188 ****
+ #define HAVE_SYS_TIME_H
+ #define HAVE_LOCALE_H
+ #define BROKEN_LOCALE
+- #undef HAVE_ICONV_H
+- #undef HAVE_ICONV
+ #undef DYNAMIC_ICONV
+ #define HAVE_STRFTIME
+ #endif
+
+ /* GUI support defines */
+ #if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK)
+ #define HAVE_X11
+--- 175,192 ----
+ #define HAVE_SYS_TIME_H
+ #define HAVE_LOCALE_H
+ #define BROKEN_LOCALE
+ #undef DYNAMIC_ICONV
+ #define HAVE_STRFTIME
+ #endif
+
++ #if defined(USE_ICONV)
++ #define HAVE_ICONV_H
++ #define HAVE_ICONV
++ #else
++ #undef HAVE_ICONV_H
++ #undef HAVE_ICONV
++ #endif
++
+ /* GUI support defines */
+ #if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK)
+ #define HAVE_X11
+*** ../vim-7.4.196/src/proto/os_vms.pro 2013-08-10 13:37:40.000000000 +0200
+--- src/proto/os_vms.pro 2014-03-12 15:55:50.204741288 +0100
+***************
+*** 7,12 ****
+--- 7,13 ----
+ int vms_sys __ARGS((char *cmd, char *out, char *inp));
+ int vms_sys_status __ARGS((int status));
+ int vms_read __ARGS((char *inbuf, size_t nbytes));
++ char *vms_tolower __ARGS((char *name));
+ int mch_expand_wildcards __ARGS((int num_pat, char_u **pat, int *num_file, char_u ***file, int flags));
+ int mch_expandpath __ARGS((garray_T *gap, char_u *path, int flags));
+ void *vms_fixfilename __ARGS((void *instring));
+*** ../vim-7.4.196/src/testdir/Make_vms.mms 2014-02-23 23:38:58.812760280 +0100
+--- src/testdir/Make_vms.mms 2014-03-12 16:06:22.888750982 +0100
+***************
+*** 4,10 ****
+ # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
+ # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
+ #
+! # Last change: 2014 Feb 23
+ #
+ # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
+ # Edit the lines in the Configuration section below to select.
+--- 4,10 ----
+ # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
+ # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
+ #
+! # Last change: 2014 Mar 12
+ #
+ # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
+ # Edit the lines in the Configuration section below to select.
+***************
+*** 41,56 ****
+ # They fail because VMS does not support file names.
+ # WANT_SPELL = YES
+
+! # Comment out if you want to run mzschema tests.
+ # It fails because VMS does not support this feature yet.
+ # WANT_MZSCH = YES
+
+ # Comment out if you have gzip on your system
+ # HAVE_GZIP = YES
+
+ # Comment out if you have GNU compatible diff on your system
+ # HAVE_GDIFF = YES
+
+ #######################################################################
+ # End of configuration section.
+ #
+--- 41,71 ----
+ # They fail because VMS does not support file names.
+ # WANT_SPELL = YES
+
+! # Comment out if you want to run mzschema tests.
+ # It fails because VMS does not support this feature yet.
+ # WANT_MZSCH = YES
+
++ # Comment out if you have ODS-5 file system
++ # HAVE_ODS5 = YES
++
+ # Comment out if you have gzip on your system
+ # HAVE_GZIP = YES
+
+ # Comment out if you have GNU compatible diff on your system
+ # HAVE_GDIFF = YES
+
++ # Comment out if you have GNU compatible cksum on your system
++ # HAVE_CKSUM = YES
++
++ # Comment out if you have ICONV support
++ # HAVE_ICONV = YES
++
++ # Comment out if you have LUA support
++ # HAVE_LUA = YES
++
++ # Comment out if you have PYTHON support
++ # HAVE_PYTHON = YES
++
+ #######################################################################
+ # End of configuration section.
+ #
+***************
+*** 63,99 ****
+
+ SCRIPT = test1.out test2.out test3.out test4.out test5.out \
+ test6.out test7.out test8.out test9.out test10a.out\
+! test13.out test14.out test15.out test17.out \
+ test18.out test19.out test20.out test21.out test22.out \
+ test23.out test24.out test26.out \
+ test28.out test29.out test30.out test31.out test32.out \
+ test33.out test34.out test35.out test36.out test37.out \
+ test38.out test39.out test40.out test41.out test42.out \
+ test43.out test44.out test45.out test46.out \
+! test48.out test51.out test53.out test54.out test55.out \
+! test56.out test57.out test60.out \
+ test61.out test62.out test63.out test64.out test65.out \
+ test66.out test67.out test68.out test69.out \
+ test71.out test72.out test74.out test75.out test76.out \
+! test77.out test78.out test79.out test80.out test81.out \
+! test82.out test83.out test84.out test88.out test89.out \
+ test90.out test91.out test92.out test93.out test94.out \
+! test95.out test96.out test97.out test98.out test99.out \
+! test100.out test101.out test102.out test103.out test104.out \
+ test105.out
+
+ # Known problems:
+! # Test 30: a problem around mac format - unknown reason
+ #
+! # Test 32: VMS is not case sensitive and all filenames are lowercase within Vim
+ # (this should be changed in order to preserve the original filename) - should
+ # be fixed. VMS allows just one dot in the filename
+ #
+! # Test 58 and 59: Failed/Hangs - VMS does not support spell files (file names
+ # with too many dots).
+ #
+! # Test 72: unknown reason
+! # Test 85: no Lua interface
+
+ .IFDEF WANT_GUI
+ SCRIPT_GUI = test16.out
+--- 78,121 ----
+
+ SCRIPT = test1.out test2.out test3.out test4.out test5.out \
+ test6.out test7.out test8.out test9.out test10a.out\
+! test13.out test14.out test15.out \
+ test18.out test19.out test20.out test21.out test22.out \
+ test23.out test24.out test26.out \
+ test28.out test29.out test30.out test31.out test32.out \
+ test33.out test34.out test35.out test36.out test37.out \
+ test38.out test39.out test40.out test41.out test42.out \
+ test43.out test44.out test45.out test46.out \
+! test48.out test49.out test51.out test53.out test54.out \
+! test55.out test56.out test57.out test60.out \
+ test61.out test62.out test63.out test64.out test65.out \
+ test66.out test67.out test68.out test69.out \
+ test71.out test72.out test74.out test75.out test76.out \
+! test77a.out test78.out test79.out test80.out test81.out \
+! test82.out test84.out test88.out test89.out \
+ test90.out test91.out test92.out test93.out test94.out \
+! test95.out test96.out test98.out test99.out \
+! test100.out test101.out test103.out test104.out \
+ test105.out
+
+ # Known problems:
+! # test17: ?
+! #
+! # test30: bug, most probably - a problem around mac format
+ #
+! # test32: VMS is not case sensitive and all filenames are lowercase within Vim
+ # (this should be changed in order to preserve the original filename) - should
+ # be fixed. VMS allows just one dot in the filename
+ #
+! # test58, test59: Failed/Hangs - VMS does not support spell files (file names
+ # with too many dots).
+ #
+! # test72: bug - Vim hangs at :rename (while rename works well otherwise)
+! # test78: bug - Vim dies at :recover Xtest
+! # test83: ?
+! # test85: no Lua interface
+! # test89: bug - findfile() does not work on VMS (just in the current directory)
+! # test97, test102: Just ODS-5 supports space and special chars in the filename.
+! # On ODS-2 tests fail.
+
+ .IFDEF WANT_GUI
+ SCRIPT_GUI = test16.out
+***************
+*** 101,107 ****
+ .ENDIF
+
+ .IFDEF WANT_UNIX
+! SCRIPT_UNIX = test10.out test12.out test25.out test27.out test49.out test73.out
+ .ENDIF
+
+ .IFDEF WANT_WIN
+--- 123,129 ----
+ .ENDIF
+
+ .IFDEF WANT_UNIX
+! SCRIPT_UNIX = test10.out test12.out test17.out test25.out test27.out test49.out test73.out
+ .ENDIF
+
+ .IFDEF WANT_WIN
+***************
+*** 116,121 ****
+--- 138,147 ----
+ SCRIPT_MZSCH = test70.out
+ .ENDIF
+
++ .IFDEF HAVE_ODS5
++ SCRIPT_ODS5 = test97.out test102.out
++ .ENDIF
++
+ .IFDEF HAVE_GZIP
+ SCRIPT_GZIP = test11.out
+ .ENDIF
+***************
+*** 124,133 ****
+--- 150,177 ----
+ SCRIPT_GDIFF = test47.out
+ .ENDIF
+
++ .IFDEF HAVE_CKSUM
++ SCRIPT_CKSUM = test77.out
++ .ENDIF
++
++ .IFDEF HAVE_ICONV
++ SCRIPT_ICONV = test83.out
++ .ENDIF
++
++ .IFDEF HAVE_LUA
++ SCRIPT_LUA = test85.out
++ .ENDIF
++
++ .IFDEF HAVE_PYTHON
++ SCRIPT_PYTHON = test86.out test87.out
++ .ENDIF
++
+ .in.out :
+ -@ !clean up before doing the test
+ -@ if "''F$SEARCH("test.out.*")'" .NES. "" then delete/noconfirm/nolog test.out.*
+ -@ if "''F$SEARCH("$*.out.*")'" .NES. "" then delete/noconfirm/nolog $*.out.*
++ -@ ! define TMP if not set - some tests use it
++ -@ if "''F$TRNLNM("TMP")'" .EQS. "" then define/nolog TMP []
+ -@ write sys$output " "
+ -@ write sys$output "-----------------------------------------------"
+ -@ write sys$output " "$*" "
+***************
+*** 140,148 ****
+ -@ if "''F$SEARCH("$*.out.*")'" .NES. "" then differences /par $*.out $*.ok;
+ -@ !clean up after the test
+ -@ if "''F$SEARCH("Xdotest.*")'" .NES. "" then delete/noconfirm/nolog Xdotest.*.*
+
+! all : clean nolog $(START_WITH) $(SCRIPT) $(SCRIPT_GUI) $(SCRIPT_UNIX) $(SCRIPT_WIN) $(SCRIPT_SPELL) $(SCRIPT_GZIP) \
+! $(SCRIPT_GDIFF) $(SCRIPT_MZSCH) nolog
+ -@ write sys$output " "
+ -@ write sys$output "-----------------------------------------------"
+ -@ write sys$output " All done"
+--- 184,193 ----
+ -@ if "''F$SEARCH("$*.out.*")'" .NES. "" then differences /par $*.out $*.ok;
+ -@ !clean up after the test
+ -@ if "''F$SEARCH("Xdotest.*")'" .NES. "" then delete/noconfirm/nolog Xdotest.*.*
++ -@ if "''F$SEARCH("Xtest.*")'" .NES. "" then delete/noconfirm/nolog Xtest.*.*
+
+! all : clean nolog $(START_WITH) $(SCRIPT) $(SCRIPT_GUI) $(SCRIPT_UNIX) $(SCRIPT_WIN) $(SCRIPT_SPELL) $(SCRIPT_ODS5) $(SCRIPT_GZIP) \
+! $(SCRIPT_GDIFF) $(SCRIPT_MZSCH) $(SCRIPT_CKSUM) $(SCRIPT_ICONV) $(SCRIPT_LUA) $(SCRIPT_PYTHON) nolog
+ -@ write sys$output " "
+ -@ write sys$output "-----------------------------------------------"
+ -@ write sys$output " All done"
+***************
+*** 165,177 ****
+ -@ write sys$output " Test results:"
+ -@ write sys$output "-----------------------------------------------"
+ -@ write sys$output "MAKE_VMS.MMS options:"
+! -@ write sys$output " WANT_GUI = ""$(WANT_GUI)"" "
+! -@ write sys$output " WANT_UNIX = ""$(WANT_UNIX)"" "
+! -@ write sys$output " WANT_WIN = ""$(WANT_WIN)"" "
+! -@ write sys$output " WANT_SPELL= ""$(WANT_SPELL)"" "
+! -@ write sys$output " WANT_MZSCH= ""$(WANT_MZSCH)"" "
+! -@ write sys$output " HAVE_GZIP = ""$(HAVE_GZIP)"" "
+! -@ write sys$output " HAVE_GDIFF= ""$(HAVE_GDIFF)"" "
+ -@ write sys$output "Default vimrc file is VMS.VIM:"
+ -@ write sys$output "-----------------------------------------------"
+ -@ type VMS.VIM
+--- 210,227 ----
+ -@ write sys$output " Test results:"
+ -@ write sys$output "-----------------------------------------------"
+ -@ write sys$output "MAKE_VMS.MMS options:"
+! -@ write sys$output " WANT_GUI = ""$(WANT_GUI)"" "
+! -@ write sys$output " WANT_UNIX = ""$(WANT_UNIX)"" "
+! -@ write sys$output " WANT_WIN = ""$(WANT_WIN)"" "
+! -@ write sys$output " WANT_SPELL = ""$(WANT_SPELL)"" "
+! -@ write sys$output " WANT_MZSCH = ""$(WANT_MZSCH)"" "
+! -@ write sys$output " HAVE_ODS5 = ""$(HAVE_ODS5)"" "
+! -@ write sys$output " HAVE_GZIP = ""$(HAVE_GZIP)"" "
+! -@ write sys$output " HAVE_GDIFF = ""$(HAVE_GDIFF)"" "
+! -@ write sys$output " HAVE_CKSUM = ""$(HAVE_CKSUM)"" "
+! -@ write sys$output " HAVE_ICONV = ""$(HAVE_ICONV)"" "
+! -@ write sys$output " HAVE_LUA = ""$(HAVE_LUA)"" "
+! -@ write sys$output " HAVE_PYTHON= ""$(HAVE_PYTHON)"" "
+ -@ write sys$output "Default vimrc file is VMS.VIM:"
+ -@ write sys$output "-----------------------------------------------"
+ -@ type VMS.VIM
+***************
+*** 181,186 ****
+--- 231,239 ----
+ -@ if "''F$SEARCH("test.log")'" .NES. "" then delete/noconfirm/nolog test.log.*
+ -@ if "''F$SEARCH("test.ok")'" .NES. "" then delete/noconfirm/nolog test.ok.*
+ -@ if "''F$SEARCH("Xdotest.*")'" .NES. "" then delete/noconfirm/nolog Xdotest.*.*
++ -@ if "''F$SEARCH("Xtest*.*")'" .NES. "" then delete/noconfirm/nolog Xtest*.*.*
++ -@ if "''F$SEARCH("XX*.*")'" .NES. "" then delete/noconfirm/nolog XX*.*.*
++ -@ if "''F$SEARCH("_un_*.*")'" .NES. "" then delete/noconfirm/nolog _un_*.*.*
+ -@ if "''F$SEARCH("*.*_sw*")'" .NES. "" then delete/noconfirm/nolog *.*_sw*.*
+ -@ if "''F$SEARCH("*.failed")'" .NES. "" then delete/noconfirm/nolog *.failed.*
+ -@ if "''F$SEARCH("*.rej")'" .NES. "" then delete/noconfirm/nolog *.rej.*
+***************
+*** 188,193 ****
+ -@ if "''F$SEARCH("small.vim")'" .NES. "" then delete/noconfirm/nolog small.vim.*
+ -@ if "''F$SEARCH("mbyte.vim")'" .NES. "" then delete/noconfirm/nolog mbyte.vim.*
+ -@ if "''F$SEARCH("mzscheme.vim")'" .NES. "" then delete/noconfirm/nolog mzscheme.vim.*
+! -@ if "''F$SEARCH("lua.vim")'" .NES. "" then delete/noconfirm/nolog lua.vim.*
+ -@ if "''F$SEARCH("viminfo.*")'" .NES. "" then delete/noconfirm/nolog viminfo.*.*
+
+--- 241,246 ----
+ -@ if "''F$SEARCH("small.vim")'" .NES. "" then delete/noconfirm/nolog small.vim.*
+ -@ if "''F$SEARCH("mbyte.vim")'" .NES. "" then delete/noconfirm/nolog mbyte.vim.*
+ -@ if "''F$SEARCH("mzscheme.vim")'" .NES. "" then delete/noconfirm/nolog mzscheme.vim.*
+! -@ if "''F$SEARCH("lua.vim")'" .NES. "" then delete/noconfirm/nolog lua.vim.*
+ -@ if "''F$SEARCH("viminfo.*")'" .NES. "" then delete/noconfirm/nolog viminfo.*.*
+
+*** ../vim-7.4.196/src/testdir/test72.in 2012-01-04 19:04:17.000000000 +0100
+--- src/testdir/test72.in 2014-03-12 15:55:50.204741288 +0100
+***************
+*** 105,111 ****
+ u:.w >>test.out
+ :"
+ :" Rename the undo file so that it gets cleaned up.
+! :call rename(".Xtestfile.un~", "Xtestundo")
+ :qa!
+ ENDTEST
+
+--- 105,115 ----
+ u:.w >>test.out
+ :"
+ :" Rename the undo file so that it gets cleaned up.
+! :if has("vms")
+! : call rename("_un_Xtestfile", "Xtestundo")
+! :else
+! : call rename(".Xtestfile.un~", "Xtestundo")
+! :endif
+ :qa!
+ ENDTEST
+
+*** ../vim-7.4.196/src/testdir/test77a.com 2014-03-12 16:49:10.740790329 +0100
+--- src/testdir/test77a.com 2014-03-12 16:40:04.316781957 +0100
+***************
+*** 0 ****
+--- 1,8 ----
++ $! test77a - help file creating checksum on VMS
++ $! Created by Zoltan Arpadffy
++ $
++ $ IF P1 .NES. ""
++ $ THEN
++ $ checksum 'P1'
++ $ show symb CHECKSUM$CHECKSUM
++ $ ENDIF
+*** ../vim-7.4.196/src/testdir/test77a.in 2014-03-12 16:49:10.748790329 +0100
+--- src/testdir/test77a.in 2014-03-12 15:55:50.204741288 +0100
+***************
+*** 0 ****
+--- 1,31 ----
++ Inserts 2 million lines with consecutive integers starting from 1
++ (essentially, the output of GNU's seq 1 2000000), writes them to Xtest
++ and writes its cksum to test.out.
++
++ We need 2 million lines to trigger a call to mf_hash_grow(). If it would mess
++ up the lines the checksum would differ.
++
++ cksum is part of POSIX and so should be available on most Unixes.
++ If it isn't available then the test will be skipped.
++
++ VMS does not have CKSUM but has a built in CHECKSUM - it should be used
++ STARTTEST
++ :so small.vim
++ :if !has("vms")
++ : e! test.ok
++ : w! test.out
++ : qa!
++ :endif
++ :set fileformat=unix undolevels=-1
++ ggdG
++ :let i = 1
++ :while i <= 2000000 | call append(i, range(i, i + 99)) | let i += 100 | endwhile
++ ggdd
++ :w! Xtest.
++ :r !@test77a.com Xtest.
++ :s/\s/ /g
++ :set fileformat&
++ :.w! test.out
++ :qa!
++ ENDTEST
++
+*** ../vim-7.4.196/src/testdir/test77a.ok 2014-03-12 16:49:10.756790330 +0100
+--- src/testdir/test77a.ok 2014-03-12 15:55:50.204741288 +0100
+***************
+*** 0 ****
+--- 1 ----
++ CHECKSUM$CHECKSUM = "844110470"
+*** ../vim-7.4.196/src/undo.c 2014-01-23 18:12:44.695676751 +0100
+--- src/undo.c 2014-03-12 16:31:52.432774419 +0100
+***************
+*** 790,798 ****
+--- 790,809 ----
+ if (undo_file_name == NULL)
+ break;
+ p = gettail(undo_file_name);
++ #ifdef VMS
++ /* VMS can not handle more than one dot in the filenames
++ * use "dir/name" -> "dir/_un_name" - add _un_
++ * at the beginning to keep the extension */
++ mch_memmove(p + 4, p, STRLEN(p) + 1);
++ mch_memmove(p, "_un_", 4);
++
++ #else
++ /* Use same directory as the ffname,
++ * "dir/name" -> "dir/.name.un~" */
+ mch_memmove(p + 1, p, STRLEN(p) + 1);
+ *p = '.';
+ STRCAT(p, ".un~");
++ #endif
+ }
+ else
+ {
+*** ../vim-7.4.196/src/version.c 2014-03-12 15:50:18.472736205 +0100
+--- src/version.c 2014-03-12 15:54:26.712740008 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 197,
+ /**/
+
+--
+Violators can be fined, arrested or jailed for making ugly faces at a dog.
+ [real standing law in Oklahoma, United States of America]
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.198 b/patches/source/vim/patches/7.4.198
new file mode 100644
index 000000000..f204c2e04
--- /dev/null
+++ b/patches/source/vim/patches/7.4.198
@@ -0,0 +1,103 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.198
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.198
+Problem: Can't build Vim with Perl when -Dusethreads is not specified for
+ building Perl, and building Vim with --enable-perlinterp=dynamic.
+Solution: Adjust #ifdefs. (Yasuhiro Matsumoto)
+Files: src/if_perl.xs
+
+
+*** ../vim-7.4.197/src/if_perl.xs 2013-12-14 11:50:28.000000000 +0100
+--- src/if_perl.xs 2014-03-12 17:05:07.832804995 +0100
+***************
+*** 138,143 ****
+--- 138,145 ----
+ #endif
+ typedef int XSINIT_t;
+ typedef int XSUBADDR_t;
++ #endif
++ #ifndef USE_ITHREADS
+ typedef int perl_key;
+ #endif
+
+***************
+*** 264,270 ****
+ # define Perl_Iscopestack_ix_ptr dll_Perl_Iscopestack_ix_ptr
+ # define Perl_Iunitcheckav_ptr dll_Perl_Iunitcheckav_ptr
+ # if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
+! # define PL_thr_key *dll_PL_thr_key
+ # endif
+
+ /*
+--- 266,274 ----
+ # define Perl_Iscopestack_ix_ptr dll_Perl_Iscopestack_ix_ptr
+ # define Perl_Iunitcheckav_ptr dll_Perl_Iunitcheckav_ptr
+ # if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
+! # ifdef USE_ITHREADS
+! # define PL_thr_key *dll_PL_thr_key
+! # endif
+ # endif
+
+ /*
+***************
+*** 386,392 ****
+--- 390,398 ----
+ #endif
+
+ #if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
++ # ifdef USE_ITHREADS
+ static perl_key* dll_PL_thr_key;
++ # endif
+ #else
+ static GV** (*Perl_Idefgv_ptr)(register PerlInterpreter*);
+ static GV** (*Perl_Ierrgv_ptr)(register PerlInterpreter*);
+***************
+*** 413,419 ****
+--- 419,427 ----
+ #ifdef PERL5101_OR_LATER
+ {"Perl_croak_xs_usage", (PERL_PROC*)&Perl_croak_xs_usage},
+ #endif
++ #ifdef PERL_IMPLICIT_CONTEXT
+ {"Perl_croak_nocontext", (PERL_PROC*)&Perl_croak_nocontext},
++ #endif
+ {"Perl_dowantarray", (PERL_PROC*)&Perl_dowantarray},
+ {"Perl_free_tmps", (PERL_PROC*)&Perl_free_tmps},
+ {"Perl_gv_stashpv", (PERL_PROC*)&Perl_gv_stashpv},
+***************
+*** 505,511 ****
+--- 513,521 ----
+ # endif
+ #endif
+ #if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
++ # ifdef USE_ITHREADS
+ {"PL_thr_key", (PERL_PROC*)&dll_PL_thr_key},
++ # endif
+ #else
+ {"Perl_Idefgv_ptr", (PERL_PROC*)&Perl_Idefgv_ptr},
+ {"Perl_Ierrgv_ptr", (PERL_PROC*)&Perl_Ierrgv_ptr},
+*** ../vim-7.4.197/src/version.c 2014-03-12 16:51:35.060792541 +0100
+--- src/version.c 2014-03-12 17:06:27.660806218 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 198,
+ /**/
+
+--
+Dogs must have a permit signed by the mayor in order to congregate in groups
+of three or more on private property.
+ [real standing law in Oklahoma, United States of America]
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.199 b/patches/source/vim/patches/7.4.199
new file mode 100644
index 000000000..d421df0af
--- /dev/null
+++ b/patches/source/vim/patches/7.4.199
@@ -0,0 +1,106 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.199
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.199
+Problem: (issue 197) ]P doesn't paste over Visual selection.
+Solution: Handle Visual mode specifically. (Christian Brabandt)
+Files: src/normal.c
+
+
+*** ../vim-7.4.198/src/normal.c 2014-02-23 23:38:58.824760280 +0100
+--- src/normal.c 2014-03-12 17:33:28.184831049 +0100
+***************
+*** 6751,6760 ****
+ {
+ if (!checkclearop(cap->oap))
+ {
+ prep_redo_cmd(cap);
+! do_put(cap->oap->regname,
+! (cap->cmdchar == ']' && cap->nchar == 'p') ? FORWARD : BACKWARD,
+! cap->count1, PUT_FIXINDENT);
+ }
+ }
+
+--- 6751,6808 ----
+ {
+ if (!checkclearop(cap->oap))
+ {
++ int dir = (cap->cmdchar == ']' && cap->nchar == 'p')
++ ? FORWARD : BACKWARD;
++ int regname = cap->oap->regname;
++ #ifdef FEAT_VISUAL
++ int was_visual = VIsual_active;
++ int line_count = curbuf->b_ml.ml_line_count;
++ pos_T start, end;
++
++ if (VIsual_active)
++ {
++ start = ltoreq(VIsual, curwin->w_cursor)
++ ? VIsual : curwin->w_cursor;
++ end = equalpos(start,VIsual) ? curwin->w_cursor : VIsual;
++ curwin->w_cursor = (dir == BACKWARD ? start : end);
++ }
++ #endif
++ # ifdef FEAT_CLIPBOARD
++ adjust_clip_reg(&regname);
++ # endif
+ prep_redo_cmd(cap);
+!
+! do_put(regname, dir, cap->count1, PUT_FIXINDENT);
+! #ifdef FEAT_VISUAL
+! if (was_visual)
+! {
+! VIsual = start;
+! curwin->w_cursor = end;
+! if (dir == BACKWARD)
+! {
+! /* adjust lines */
+! VIsual.lnum += curbuf->b_ml.ml_line_count - line_count;
+! curwin->w_cursor.lnum +=
+! curbuf->b_ml.ml_line_count - line_count;
+! }
+!
+! VIsual_active = TRUE;
+! if (VIsual_mode == 'V')
+! {
+! /* delete visually selected lines */
+! cap->cmdchar = 'd';
+! cap->nchar = NUL;
+! cap->oap->regname = regname;
+! nv_operator(cap);
+! do_pending_operator(cap, 0, FALSE);
+! }
+! if (VIsual_active)
+! {
+! end_visual_mode();
+! redraw_later(SOME_VALID);
+! }
+! }
+! #endif
+ }
+ }
+
+*** ../vim-7.4.198/src/version.c 2014-03-12 17:08:01.508807656 +0100
+--- src/version.c 2014-03-12 17:30:36.908828425 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 199,
+ /**/
+
+--
+No man may purchase alcohol without written consent from his wife.
+ [real standing law in Pennsylvania, United States of America]
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.200 b/patches/source/vim/patches/7.4.200
new file mode 100644
index 000000000..be3dfb38e
--- /dev/null
+++ b/patches/source/vim/patches/7.4.200
@@ -0,0 +1,68 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.200
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.200
+Problem: Too many #ifdefs in the code.
+Solution: Enable FEAT_VISUAL always, await any complaints
+Files: src/feature.h
+
+
+*** ../vim-7.4.199/src/feature.h 2014-02-23 22:52:33.372764715 +0100
+--- src/feature.h 2014-03-12 17:48:24.396844782 +0100
+***************
+*** 211,228 ****
+ #endif
+
+ /*
+! * +visual Visual mode.
+ * +visualextra Extra features for Visual mode (mostly block operators).
+ */
+! #ifdef FEAT_SMALL
+! # define FEAT_VISUAL
+! # ifdef FEAT_NORMAL
+! # define FEAT_VISUALEXTRA
+! # endif
+! #else
+! # ifdef FEAT_CLIPBOARD
+! # undef FEAT_CLIPBOARD /* can't use clipboard without Visual mode */
+! # endif
+ #endif
+
+ /*
+--- 211,222 ----
+ #endif
+
+ /*
+! * +visual Visual mode - now always included.
+ * +visualextra Extra features for Visual mode (mostly block operators).
+ */
+! #define FEAT_VISUAL
+! #ifdef FEAT_NORMAL
+! # define FEAT_VISUALEXTRA
+ #endif
+
+ /*
+*** ../vim-7.4.199/src/version.c 2014-03-12 17:41:59.128838878 +0100
+--- src/version.c 2014-03-12 17:52:28.080848516 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 200,
+ /**/
+
+--
+It is illegal to take more than three sips of beer at a time while standing.
+ [real standing law in Texas, United States of America]
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.201 b/patches/source/vim/patches/7.4.201
new file mode 100644
index 000000000..9bed2b5cf
--- /dev/null
+++ b/patches/source/vim/patches/7.4.201
@@ -0,0 +1,273 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.201
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.201
+Problem: 'lispwords' is a global option.
+Solution: Make 'lispwords' global-local. (Sung Pae)
+Files: runtime/doc/options.txt, runtime/optwin.vim, src/buffer.c,
+ src/misc1.c, src/option.c, src/option.h, src/structs.h,
+ src/testdir/test100.in, src/testdir/test100.ok
+
+
+*** ../vim-7.4.200/runtime/doc/options.txt 2014-02-23 23:38:58.820760280 +0100
+--- runtime/doc/options.txt 2014-03-12 18:20:30.748874299 +0100
+***************
+*** 4629,4635 ****
+
+ *'lispwords'* *'lw'*
+ 'lispwords' 'lw' string (default is very long)
+! global
+ {not in Vi}
+ {not available when compiled without the |+lispindent|
+ feature}
+--- 4629,4635 ----
+
+ *'lispwords'* *'lw'*
+ 'lispwords' 'lw' string (default is very long)
+! global or local to buffer |global-local|
+ {not in Vi}
+ {not available when compiled without the |+lispindent|
+ feature}
+*** ../vim-7.4.200/runtime/optwin.vim 2013-06-29 14:32:06.000000000 +0200
+--- runtime/optwin.vim 2014-03-12 18:20:30.748874299 +0100
+***************
+*** 855,861 ****
+ call append("$", "\t(local to buffer)")
+ call <SID>BinOptionL("lisp")
+ call append("$", "lispwords\twords that change how lisp indenting works")
+! call <SID>OptionG("lw", &lw)
+ endif
+
+
+--- 855,861 ----
+ call append("$", "\t(local to buffer)")
+ call <SID>BinOptionL("lisp")
+ call append("$", "lispwords\twords that change how lisp indenting works")
+! call <SID>OptionL("lw", &lw)
+ endif
+
+
+*** ../vim-7.4.200/src/buffer.c 2014-01-10 16:43:09.000000000 +0100
+--- src/buffer.c 2014-03-12 18:20:30.752874299 +0100
+***************
+*** 1978,1983 ****
+--- 1978,1986 ----
+ #endif
+ buf->b_p_ar = -1;
+ buf->b_p_ul = NO_LOCAL_UNDOLEVEL;
++ #ifdef FEAT_LISP
++ clear_string_option(&buf->b_p_lw);
++ #endif
+ }
+
+ /*
+*** ../vim-7.4.200/src/misc1.c 2013-11-06 04:01:31.000000000 +0100
+--- src/misc1.c 2014-03-12 18:20:30.752874299 +0100
+***************
+*** 8879,8885 ****
+ {
+ char_u buf[LSIZE];
+ int len;
+! char_u *word = p_lispwords;
+
+ while (*word != NUL)
+ {
+--- 8879,8885 ----
+ {
+ char_u buf[LSIZE];
+ int len;
+! char_u *word = *curbuf->b_p_lw != NUL ? curbuf->b_p_lw : p_lispwords;
+
+ while (*word != NUL)
+ {
+*** ../vim-7.4.200/src/option.c 2014-01-14 16:54:53.000000000 +0100
+--- src/option.c 2014-03-12 18:20:30.752874299 +0100
+***************
+*** 134,139 ****
+--- 134,140 ----
+ #define PV_KP OPT_BOTH(OPT_BUF(BV_KP))
+ #ifdef FEAT_LISP
+ # define PV_LISP OPT_BUF(BV_LISP)
++ # define PV_LW OPT_BOTH(OPT_BUF(BV_LW))
+ #endif
+ #define PV_MA OPT_BUF(BV_MA)
+ #define PV_ML OPT_BUF(BV_ML)
+***************
+*** 1718,1724 ****
+ {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"lispwords", "lw", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
+ #ifdef FEAT_LISP
+! (char_u *)&p_lispwords, PV_NONE,
+ {(char_u *)LISPWORD_VALUE, (char_u *)0L}
+ #else
+ (char_u *)NULL, PV_NONE,
+--- 1719,1725 ----
+ {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"lispwords", "lw", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
+ #ifdef FEAT_LISP
+! (char_u *)&p_lispwords, PV_LW,
+ {(char_u *)LISPWORD_VALUE, (char_u *)0L}
+ #else
+ (char_u *)NULL, PV_NONE,
+***************
+*** 5412,5417 ****
+--- 5413,5421 ----
+ check_string_option(&buf->b_p_dict);
+ check_string_option(&buf->b_p_tsr);
+ #endif
++ #ifdef FEAT_LISP
++ check_string_option(&buf->b_p_lw);
++ #endif
+ }
+
+ /*
+***************
+*** 9879,9884 ****
+--- 9883,9893 ----
+ case PV_UL:
+ buf->b_p_ul = NO_LOCAL_UNDOLEVEL;
+ break;
++ #ifdef FEAT_LISP
++ case PV_LW:
++ clear_string_option(&buf->b_p_lw);
++ break;
++ #endif
+ }
+ }
+
+***************
+*** 9928,9933 ****
+--- 9937,9945 ----
+ case PV_STL: return (char_u *)&(curwin->w_p_stl);
+ #endif
+ case PV_UL: return (char_u *)&(curbuf->b_p_ul);
++ #ifdef FEAT_LISP
++ case PV_LW: return (char_u *)&(curbuf->b_p_lw);
++ #endif
+ }
+ return NULL; /* "cannot happen" */
+ }
+***************
+*** 9994,9999 ****
+--- 10006,10015 ----
+ #endif
+ case PV_UL: return curbuf->b_p_ul != NO_LOCAL_UNDOLEVEL
+ ? (char_u *)&(curbuf->b_p_ul) : p->var;
++ #ifdef FEAT_LISP
++ case PV_LW: return *curbuf->b_p_lw != NUL
++ ? (char_u *)&(curbuf->b_p_lw) : p->var;
++ #endif
+
+ #ifdef FEAT_ARABIC
+ case PV_ARAB: return (char_u *)&(curwin->w_p_arab);
+***************
+*** 10567,10572 ****
+--- 10583,10591 ----
+ #ifdef FEAT_PERSISTENT_UNDO
+ buf->b_p_udf = p_udf;
+ #endif
++ #ifdef FEAT_LISP
++ buf->b_p_lw = empty_option;
++ #endif
+
+ /*
+ * Don't copy the options set by ex_help(), use the saved values,
+*** ../vim-7.4.200/src/option.h 2014-01-10 15:32:17.000000000 +0100
+--- src/option.h 2014-03-12 18:20:30.752874299 +0100
+***************
+*** 990,995 ****
+--- 990,996 ----
+ , BV_KP
+ #ifdef FEAT_LISP
+ , BV_LISP
++ , BV_LW
+ #endif
+ , BV_MA
+ , BV_ML
+*** ../vim-7.4.200/src/structs.h 2014-02-23 22:52:33.372764715 +0100
+--- src/structs.h 2014-03-12 18:20:30.752874299 +0100
+***************
+*** 1641,1646 ****
+--- 1641,1649 ----
+ #ifdef FEAT_PERSISTENT_UNDO
+ int b_p_udf; /* 'undofile' */
+ #endif
++ #ifdef FEAT_LISP
++ char_u *b_p_lw; /* 'lispwords' local value */
++ #endif
+
+ /* end of buffer options */
+
+*** ../vim-7.4.200/src/testdir/test100.in 2013-11-07 03:25:51.000000000 +0100
+--- src/testdir/test100.in 2014-03-12 18:25:27.792878851 +0100
+***************
+*** 1,4 ****
+! Tests for 'undolevel' setting being global-local
+
+ STARTTEST
+ :so small.vim
+--- 1,4 ----
+! Tests for 'undolevel' and 'lispwords' settings being global-local
+
+ STARTTEST
+ :so small.vim
+***************
+*** 37,42 ****
+--- 37,50 ----
+ :call UndoLevel()
+ :%w >> test.out
+ :"sleep 10
++ :"
++ :" Testing 'lispwords'
++ :"
++ :setglobal lispwords=foo,bar,baz
++ :setlocal lispwords-=foo | setlocal lispwords+=quux
++ :redir >> test.out | echon "\nTesting 'lispwords' local value" | setglobal lispwords? | setlocal lispwords? | echo &lispwords . "\n" | redir end
++ :setlocal lispwords<
++ :redir >> test.out | echon "\nTesting 'lispwords' value reset" | setglobal lispwords? | setlocal lispwords? | echo &lispwords . "\n" | redir end
+ :qa!
+ ENDTEST
+
+*** ../vim-7.4.200/src/testdir/test100.ok 2013-11-07 03:25:51.000000000 +0100
+--- src/testdir/test100.ok 2014-03-12 18:25:27.792878851 +0100
+***************
+*** 39,41 ****
+--- 39,51 ----
+
+ undolevels=50 global
+ undolevels=-123456 local
++
++ Testing 'lispwords' local value
++ lispwords=foo,bar,baz
++ lispwords=bar,baz,quux
++ bar,baz,quux
++
++ Testing 'lispwords' value reset
++ lispwords=foo,bar,baz
++ lispwords=foo,bar,baz
++ foo,bar,baz
+*** ../vim-7.4.200/src/version.c 2014-03-12 17:56:42.960852421 +0100
+--- src/version.c 2014-03-12 18:19:13.720873119 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 201,
+ /**/
+
+--
+Lawmakers made it obligatory for everybody to take at least one bath
+each week -- on Saturday night.
+ [real standing law in Vermont, United States of America]
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.202 b/patches/source/vim/patches/7.4.202
new file mode 100644
index 000000000..5c50d8780
--- /dev/null
+++ b/patches/source/vim/patches/7.4.202
@@ -0,0 +1,281 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.202
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.202
+Problem: MS-Windows: non-ASCII font names don't work.
+Solution: Convert between the current code page and 'encoding'. (Ken Takata)
+Files: src/gui_w48.c, src/os_mswin.c, src/proto/winclip.pro,
+ src/winclip.c
+
+
+*** ../vim-7.4.201/src/gui_w48.c 2013-09-22 15:43:34.000000000 +0200
+--- src/gui_w48.c 2014-03-12 19:18:14.264927370 +0100
+***************
+*** 3069,3083 ****
+ char *p;
+ char *res;
+ char *charset_name;
+
+ charset_name = charset_id2name((int)lf.lfCharSet);
+! res = alloc((unsigned)(strlen(lf.lfFaceName) + 20
+ + (charset_name == NULL ? 0 : strlen(charset_name) + 2)));
+ if (res != NULL)
+ {
+ p = res;
+ /* make a normal font string out of the lf thing:*/
+! sprintf((char *)p, "%s:h%d", lf.lfFaceName, pixels_to_points(
+ lf.lfHeight < 0 ? -lf.lfHeight : lf.lfHeight, TRUE));
+ while (*p)
+ {
+--- 3069,3094 ----
+ char *p;
+ char *res;
+ char *charset_name;
++ char *font_name = lf.lfFaceName;
+
+ charset_name = charset_id2name((int)lf.lfCharSet);
+! #ifdef FEAT_MBYTE
+! /* Convert a font name from the current codepage to 'encoding'.
+! * TODO: Use Wide APIs (including LOGFONTW) instead of ANSI APIs. */
+! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+! {
+! int len;
+! acp_to_enc(lf.lfFaceName, strlen(lf.lfFaceName),
+! (char_u **)&font_name, &len);
+! }
+! #endif
+! res = alloc((unsigned)(strlen(font_name) + 20
+ + (charset_name == NULL ? 0 : strlen(charset_name) + 2)));
+ if (res != NULL)
+ {
+ p = res;
+ /* make a normal font string out of the lf thing:*/
+! sprintf((char *)p, "%s:h%d", font_name, pixels_to_points(
+ lf.lfHeight < 0 ? -lf.lfHeight : lf.lfHeight, TRUE));
+ while (*p)
+ {
+***************
+*** 3102,3107 ****
+--- 3113,3122 ----
+ }
+ }
+
++ #ifdef FEAT_MBYTE
++ if (font_name != lf.lfFaceName)
++ vim_free(font_name);
++ #endif
+ return res;
+ }
+
+*** ../vim-7.4.201/src/os_mswin.c 2014-02-11 17:05:57.278217857 +0100
+--- src/os_mswin.c 2014-03-12 19:18:14.264927370 +0100
+***************
+*** 2867,2878 ****
+--- 2867,2893 ----
+ {
+ char_u *p;
+ int i;
++ int ret = FAIL;
+ static LOGFONT *lastlf = NULL;
++ #ifdef FEAT_MBYTE
++ char_u *acpname = NULL;
++ #endif
+
+ *lf = s_lfDefault;
+ if (name == NULL)
+ return OK;
+
++ #ifdef FEAT_MBYTE
++ /* Convert 'name' from 'encoding' to the current codepage, because
++ * lf->lfFaceName uses the current codepage.
++ * TODO: Use Wide APIs instead of ANSI APIs. */
++ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
++ {
++ int len;
++ enc_to_acp(name, strlen(name), &acpname, &len);
++ name = acpname;
++ }
++ #endif
+ if (STRCMP(name, "*") == 0)
+ {
+ #if defined(FEAT_GUI_W32)
+***************
+*** 2887,2896 ****
+ cf.lpLogFont = lf;
+ cf.nFontType = 0 ; //REGULAR_FONTTYPE;
+ if (ChooseFont(&cf))
+! goto theend;
+! #else
+! return FAIL;
+ #endif
+ }
+
+ /*
+--- 2902,2910 ----
+ cf.lpLogFont = lf;
+ cf.nFontType = 0 ; //REGULAR_FONTTYPE;
+ if (ChooseFont(&cf))
+! ret = OK;
+ #endif
++ goto theend;
+ }
+
+ /*
+***************
+*** 2899,2905 ****
+ for (p = name; *p && *p != ':'; p++)
+ {
+ if (p - name + 1 > LF_FACESIZE)
+! return FAIL; /* Name too long */
+ lf->lfFaceName[p - name] = *p;
+ }
+ if (p != name)
+--- 2913,2919 ----
+ for (p = name; *p && *p != ':'; p++)
+ {
+ if (p - name + 1 > LF_FACESIZE)
+! goto theend; /* Name too long */
+ lf->lfFaceName[p - name] = *p;
+ }
+ if (p != name)
+***************
+*** 2927,2933 ****
+ did_replace = TRUE;
+ }
+ if (!did_replace || init_logfont(lf) == FAIL)
+! return FAIL;
+ }
+
+ while (*p == ':')
+--- 2941,2947 ----
+ did_replace = TRUE;
+ }
+ if (!did_replace || init_logfont(lf) == FAIL)
+! goto theend;
+ }
+
+ while (*p == ':')
+***************
+*** 2988,3012 ****
+ p[-1], name);
+ EMSG(IObuff);
+ }
+! return FAIL;
+ }
+ while (*p == ':')
+ p++;
+ }
+
+- #if defined(FEAT_GUI_W32)
+ theend:
+- #endif
+ /* ron: init lastlf */
+! if (printer_dc == NULL)
+ {
+ vim_free(lastlf);
+ lastlf = (LOGFONT *)alloc(sizeof(LOGFONT));
+ if (lastlf != NULL)
+ mch_memmove(lastlf, lf, sizeof(LOGFONT));
+ }
+
+! return OK;
+ }
+
+ #endif /* defined(FEAT_GUI) || defined(FEAT_PRINTER) */
+--- 3002,3028 ----
+ p[-1], name);
+ EMSG(IObuff);
+ }
+! goto theend;
+ }
+ while (*p == ':')
+ p++;
+ }
++ ret = OK;
+
+ theend:
+ /* ron: init lastlf */
+! if (ret == OK && printer_dc == NULL)
+ {
+ vim_free(lastlf);
+ lastlf = (LOGFONT *)alloc(sizeof(LOGFONT));
+ if (lastlf != NULL)
+ mch_memmove(lastlf, lf, sizeof(LOGFONT));
+ }
++ #ifdef FEAT_MBYTE
++ vim_free(acpname);
++ #endif
+
+! return ret;
+ }
+
+ #endif /* defined(FEAT_GUI) || defined(FEAT_PRINTER) */
+*** ../vim-7.4.201/src/proto/winclip.pro 2013-08-10 13:37:39.000000000 +0200
+--- src/proto/winclip.pro 2014-03-12 19:18:14.264927370 +0100
+***************
+*** 11,14 ****
+--- 11,15 ----
+ short_u *enc_to_utf16 __ARGS((char_u *str, int *lenp));
+ char_u *utf16_to_enc __ARGS((short_u *str, int *lenp));
+ void acp_to_enc __ARGS((char_u *str, int str_size, char_u **out, int *outlen));
++ void enc_to_acp __ARGS((char_u *str, int str_size, char_u **out, int *outlen));
+ /* vim: set ft=c : */
+*** ../vim-7.4.201/src/winclip.c 2013-07-01 21:05:53.000000000 +0200
+--- src/winclip.c 2014-03-12 19:18:14.264927370 +0100
+***************
+*** 797,800 ****
+--- 797,825 ----
+ vim_free(widestr);
+ }
+ }
++
++ /*
++ * Convert from 'encoding' to the active codepage.
++ * Input is "str[str_size]".
++ * The result is in allocated memory: "out[outlen]". With terminating NUL.
++ */
++ void
++ enc_to_acp(str, str_size, out, outlen)
++ char_u *str;
++ int str_size;
++ char_u **out;
++ int *outlen;
++
++ {
++ LPWSTR widestr;
++ int len = str_size;
++
++ widestr = (WCHAR *)enc_to_utf16(str, &len);
++ if (widestr != NULL)
++ {
++ WideCharToMultiByte_alloc(GetACP(), 0, widestr, len,
++ (LPSTR *)out, outlen, 0, 0);
++ vim_free(widestr);
++ }
++ }
+ #endif
+*** ../vim-7.4.201/src/version.c 2014-03-12 18:55:52.104906804 +0100
+--- src/version.c 2014-03-12 19:19:01.388928092 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 202,
+ /**/
+
+--
+<Beeth> Girls are like internet domain names,
+ the ones I like are already taken.
+<honx> Well, you can stil get one from a strange country :-P
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.203 b/patches/source/vim/patches/7.4.203
new file mode 100644
index 000000000..d5cb84ae2
--- /dev/null
+++ b/patches/source/vim/patches/7.4.203
@@ -0,0 +1,203 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.203
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.203
+Problem: Parsing 'errorformat' is not correct.
+Solution: Reset "multiignore" at the start of a multi-line message. (Lcd)
+Files: src/quickfix.c, src/testdir/Make_amiga.mak,
+ src/testdir/Make_dos.mak, src/testdir/Make_ming.mak,
+ src/testdir/Make_os2.mak, src/testdir/Make_vms.mms,
+ src/testdir/Makefile, src/testdir/test106.in,
+ src/testdir/test106.ok
+
+
+*** ../vim-7.4.202/src/quickfix.c 2013-07-01 21:16:44.000000000 +0200
+--- src/quickfix.c 2014-03-12 19:35:22.016943118 +0100
+***************
+*** 751,757 ****
+--- 751,760 ----
+ fmt_start = fmt_ptr;
+
+ if (vim_strchr((char_u *)"AEWI", idx) != NULL)
++ {
+ multiline = TRUE; /* start of a multi-line message */
++ multiignore = FALSE; /* reset continuation */
++ }
+ else if (vim_strchr((char_u *)"CZ", idx) != NULL)
+ { /* continuation of multi-line msg */
+ if (qfprev == NULL)
+*** ../vim-7.4.202/src/testdir/Make_amiga.mak 2014-02-23 23:38:58.808760280 +0100
+--- src/testdir/Make_amiga.mak 2014-03-12 19:32:32.192940516 +0100
+***************
+*** 35,41 ****
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+ test99.out test100.out test101.out test102.out test103.out \
+! test104.out test105.out
+
+ .SUFFIXES: .in .out
+
+--- 35,41 ----
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+ test99.out test100.out test101.out test102.out test103.out \
+! test104.out test105.out test106.out
+
+ .SUFFIXES: .in .out
+
+***************
+*** 157,159 ****
+--- 157,160 ----
+ test103.out: test103.in
+ test104.out: test104.in
+ test105.out: test105.in
++ test106.out: test106.in
+*** ../vim-7.4.202/src/testdir/Make_dos.mak 2014-02-23 23:38:58.808760280 +0100
+--- src/testdir/Make_dos.mak 2014-03-12 19:32:40.100940637 +0100
+***************
+*** 34,40 ****
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+ test100.out test101.out test102.out test103.out test104.out \
+! test105.out
+
+ SCRIPTS32 = test50.out test70.out
+
+--- 34,40 ----
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+ test100.out test101.out test102.out test103.out test104.out \
+! test105.out test106.out
+
+ SCRIPTS32 = test50.out test70.out
+
+*** ../vim-7.4.202/src/testdir/Make_ming.mak 2014-02-23 23:38:58.812760280 +0100
+--- src/testdir/Make_ming.mak 2014-03-12 19:32:44.948940712 +0100
+***************
+*** 54,60 ****
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+ test100.out test101.out test102.out test103.out test104.out \
+! test105.out
+
+ SCRIPTS32 = test50.out test70.out
+
+--- 54,60 ----
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+ test100.out test101.out test102.out test103.out test104.out \
+! test105.out test106.out
+
+ SCRIPTS32 = test50.out test70.out
+
+*** ../vim-7.4.202/src/testdir/Make_os2.mak 2014-02-23 23:38:58.812760280 +0100
+--- src/testdir/Make_os2.mak 2014-03-12 19:32:48.112940760 +0100
+***************
+*** 36,42 ****
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+ test100.out test101.out test102.out test103.out test104.out \
+! test105.out
+
+ .SUFFIXES: .in .out
+
+--- 36,42 ----
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+ test100.out test101.out test102.out test103.out test104.out \
+! test105.out test106.out
+
+ .SUFFIXES: .in .out
+
+*** ../vim-7.4.202/src/testdir/Make_vms.mms 2014-03-12 16:51:35.060792541 +0100
+--- src/testdir/Make_vms.mms 2014-03-12 19:32:51.836940817 +0100
+***************
+*** 95,101 ****
+ test90.out test91.out test92.out test93.out test94.out \
+ test95.out test96.out test98.out test99.out \
+ test100.out test101.out test103.out test104.out \
+! test105.out
+
+ # Known problems:
+ # test17: ?
+--- 95,101 ----
+ test90.out test91.out test92.out test93.out test94.out \
+ test95.out test96.out test98.out test99.out \
+ test100.out test101.out test103.out test104.out \
+! test105.out test106.out
+
+ # Known problems:
+ # test17: ?
+*** ../vim-7.4.202/src/testdir/Makefile 2014-03-12 15:50:18.472736205 +0100
+--- src/testdir/Makefile 2014-03-12 19:32:13.884940236 +0100
+***************
+*** 31,37 ****
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+ test99.out test100.out test101.out test102.out test103.out \
+! test104.out test105.out
+
+ SCRIPTS_GUI = test16.out
+
+--- 31,37 ----
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+ test99.out test100.out test101.out test102.out test103.out \
+! test104.out test105.out test106.out
+
+ SCRIPTS_GUI = test16.out
+
+*** ../vim-7.4.202/src/testdir/test106.in 2014-03-12 19:40:59.584948291 +0100
+--- src/testdir/test106.in 2014-03-12 19:33:30.332941407 +0100
+***************
+*** 0 ****
+--- 1,16 ----
++ Tests for errorformat. vim: set ft=vim ts=8 :
++
++ STARTTEST
++ :so small.vim
++ :if !has('quickfix') | e! test.ok | wq! test.out | endif
++ :set efm=%EEEE%m,%WWWW%m,%+CCCC%.%#,%-GGGG%.%#
++ :cgetexpr ['WWWW', 'EEEE', 'CCCC']
++ :$put =strtrans(string(map(getqflist(), '[v:val.text, v:val.valid]')))
++ :cgetexpr ['WWWW', 'GGGG', 'EEEE', 'CCCC']
++ :$put =strtrans(string(map(getqflist(), '[v:val.text, v:val.valid]')))
++ :cgetexpr ['WWWW', 'GGGG', 'ZZZZ', 'EEEE', 'CCCC', 'YYYY']
++ :$put =strtrans(string(map(getqflist(), '[v:val.text, v:val.valid]')))
++ :/^Results/,$wq! test.out
++ ENDTEST
++
++ Results of test106:
+*** ../vim-7.4.202/src/testdir/test106.ok 2014-03-12 19:40:59.592948291 +0100
+--- src/testdir/test106.ok 2014-03-12 19:33:50.496941716 +0100
+***************
+*** 0 ****
+--- 1,4 ----
++ Results of test106:
++ [['W', 1], ['E^@CCCC', 1]]
++ [['W', 1], ['E^@CCCC', 1]]
++ [['W', 1], ['ZZZZ', 0], ['E^@CCCC', 1], ['YYYY', 0]]
+*** ../vim-7.4.202/src/version.c 2014-03-12 19:24:32.508933166 +0100
+--- src/version.c 2014-03-12 19:39:34.344946985 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 203,
+ /**/
+
+--
+"I know that there are people who don't love their fellow man,
+and I hate those people!" - Tom Lehrer
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.204 b/patches/source/vim/patches/7.4.204
new file mode 100644
index 000000000..c6b491e0b
--- /dev/null
+++ b/patches/source/vim/patches/7.4.204
@@ -0,0 +1,113 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.204
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.204
+Problem: A mapping where the second byte is 0x80 doesn't work.
+Solution: Unescape before checking for incomplete multi-byte char. (Nobuhiro
+ Takasaki)
+Files: src/getchar.c, src/testdir/test75.in, src/testdir/test75.ok
+
+
+*** ../vim-7.4.203/src/getchar.c 2014-02-15 16:17:02.213903042 +0100
+--- src/getchar.c 2014-03-12 20:06:17.944971557 +0100
+***************
+*** 2206,2215 ****
+ #ifdef FEAT_MBYTE
+ /* Don't allow mapping the first byte(s) of a
+ * multi-byte char. Happens when mapping
+! * <M-a> and then changing 'encoding'. */
+! if (has_mbyte && MB_BYTE2LEN(c1)
+! > (*mb_ptr2len)(mp->m_keys))
+! mlen = 0;
+ #endif
+ /*
+ * Check an entry whether it matches.
+--- 2206,2221 ----
+ #ifdef FEAT_MBYTE
+ /* Don't allow mapping the first byte(s) of a
+ * multi-byte char. Happens when mapping
+! * <M-a> and then changing 'encoding'. Beware
+! * that 0x80 is escaped. */
+! {
+! char_u *p1 = mp->m_keys;
+! char_u *p2 = mb_unescape(&p1);
+!
+! if (has_mbyte && p2 != NULL
+! && MB_BYTE2LEN(c1) > MB_PTR2LEN(p2))
+! mlen = 0;
+! }
+ #endif
+ /*
+ * Check an entry whether it matches.
+*** ../vim-7.4.203/src/testdir/test75.in 2013-11-02 04:19:10.000000000 +0100
+--- src/testdir/test75.in 2014-03-12 20:02:45.932968308 +0100
+***************
+*** 1,8 ****
+--- 1,11 ----
+ Tests for maparg().
++ Also test utf8 map with a 0x80 byte.
+
+ STARTTEST
+ :so small.vim
++ :so mbyte.vim
+ :set cpo-=<
++ :set encoding=utf8
+ :" Test maparg() with a string result
+ :map foo<C-V> is<F4>foo
+ :vnoremap <script> <buffer> <expr> <silent> bar isbar
+***************
+*** 17,22 ****
+--- 20,39 ----
+ :map abc y<S-char-114>y
+ :call append('$', maparg('abc'))
+ :"
++ Go:"
++ :" Outside of the range, minimum
++ :inoremap <Char-0x1040> a
++ :call feedkeys("a\u1040\<Esc>")
++ :" Inside of the range, minimum
++ :inoremap <Char-0x103f> b
++ :call feedkeys("a\u103f\<Esc>")
++ :" Inside of the range, maximum
++ :inoremap <Char-0xf03f> c
++ :call feedkeys("a\uf03f\<Esc>")
++ :" Outside of the range, maximum
++ :inoremap <Char-0xf040> d
++ :call feedkeys("a\uf040\<Esc>")
++ :"
+ :/^eof/+1,$w! test.out
+ :qa!
+ ENDTEST
+*** ../vim-7.4.203/src/testdir/test75.ok 2013-06-29 13:50:08.000000000 +0200
+--- src/testdir/test75.ok 2014-03-12 20:02:49.780968367 +0100
+***************
+*** 4,6 ****
+--- 4,7 ----
+ {'silent': 0, 'noremap': 0, 'lhs': 'foo', 'mode': ' ', 'nowait': 1, 'expr': 0, 'sid': 0, 'rhs': 'bar', 'buffer': 1}
+ xrx
+ yRy
++ abcd
+*** ../vim-7.4.203/src/version.c 2014-03-12 19:41:37.100948866 +0100
+--- src/version.c 2014-03-12 20:06:43.684971951 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 204,
+ /**/
+
+--
+If you only have a hammer, you tend to see every problem as a nail.
+If you only have MS-Windows, you tend to solve every problem by rebooting.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.205 b/patches/source/vim/patches/7.4.205
new file mode 100644
index 000000000..1f4fcf4b9
--- /dev/null
+++ b/patches/source/vim/patches/7.4.205
@@ -0,0 +1,113 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.205
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.205
+Problem: ":mksession" writes command to move to second argument while it
+ does not exist. When it does exist the order might be wrong.
+Solution: Use ":argadd" for each argument instead of using ":args" with a
+ list of names. (Nobuhiro Takasaki)
+Files: src/ex_docmd.c
+
+
+*** ../vim-7.4.204/src/ex_docmd.c 2014-02-05 22:46:49.058587842 +0100
+--- src/ex_docmd.c 2014-03-12 21:08:35.361028825 +0100
+***************
+*** 10381,10387 ****
+ }
+
+ /* the global argument list */
+! if (ses_arglist(fd, "args", &global_alist.al_ga,
+ !(ssop_flags & SSOP_CURDIR), &ssop_flags) == FAIL)
+ return FAIL;
+
+--- 10381,10387 ----
+ }
+
+ /* the global argument list */
+! if (ses_arglist(fd, "argglobal", &global_alist.al_ga,
+ !(ssop_flags & SSOP_CURDIR), &ssop_flags) == FAIL)
+ return FAIL;
+
+***************
+*** 10955,10963 ****
+ char_u *buf = NULL;
+ char_u *s;
+
+! if (gap->ga_len == 0)
+! return put_line(fd, "silent! argdel *");
+! if (fputs(cmd, fd) < 0)
+ return FAIL;
+ for (i = 0; i < gap->ga_len; ++i)
+ {
+--- 10955,10963 ----
+ char_u *buf = NULL;
+ char_u *s;
+
+! if (fputs(cmd, fd) < 0 || put_eol(fd) == FAIL)
+! return FAIL;
+! if (put_line(fd, "silent! argdel *") == FAIL)
+ return FAIL;
+ for (i = 0; i < gap->ga_len; ++i)
+ {
+***************
+*** 10974,10980 ****
+ s = buf;
+ }
+ }
+! if (fputs(" ", fd) < 0 || ses_put_fname(fd, s, flagp) == FAIL)
+ {
+ vim_free(buf);
+ return FAIL;
+--- 10974,10982 ----
+ s = buf;
+ }
+ }
+! if (fputs("argadd ", fd) < 0
+! || ses_put_fname(fd, s, flagp) == FAIL
+! || put_eol(fd) == FAIL)
+ {
+ vim_free(buf);
+ return FAIL;
+***************
+*** 10982,10988 ****
+ vim_free(buf);
+ }
+ }
+! return put_eol(fd);
+ }
+
+ /*
+--- 10984,10990 ----
+ vim_free(buf);
+ }
+ }
+! return OK;
+ }
+
+ /*
+*** ../vim-7.4.204/src/version.c 2014-03-12 20:17:47.752982126 +0100
+--- src/version.c 2014-03-12 21:09:16.273029451 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 205,
+ /**/
+
+--
+A law to reduce crime states: "It is mandatory for a motorist with criminal
+intentions to stop at the city limits and telephone the chief of police as he
+is entering the town.
+ [real standing law in Washington, United States of America]
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.206 b/patches/source/vim/patches/7.4.206
new file mode 100644
index 000000000..d251135aa
--- /dev/null
+++ b/patches/source/vim/patches/7.4.206
@@ -0,0 +1,72 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.206
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.206
+Problem: Compiler warnings on 64 bit Windows.
+Solution: Add type casts. (Mike Williams)
+Files: src/gui_w48.c, src/os_mswin.c
+
+
+*** ../vim-7.4.205/src/gui_w48.c 2014-03-12 19:24:32.504933166 +0100
+--- src/gui_w48.c 2014-03-19 12:32:15.129821412 +0100
+***************
+*** 3078,3084 ****
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ int len;
+! acp_to_enc(lf.lfFaceName, strlen(lf.lfFaceName),
+ (char_u **)&font_name, &len);
+ }
+ #endif
+--- 3078,3084 ----
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ int len;
+! acp_to_enc(lf.lfFaceName, (int)strlen(lf.lfFaceName),
+ (char_u **)&font_name, &len);
+ }
+ #endif
+*** ../vim-7.4.205/src/os_mswin.c 2014-03-12 19:24:32.504933166 +0100
+--- src/os_mswin.c 2014-03-19 12:32:15.129821412 +0100
+***************
+*** 2884,2890 ****
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ int len;
+! enc_to_acp(name, strlen(name), &acpname, &len);
+ name = acpname;
+ }
+ #endif
+--- 2884,2890 ----
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ int len;
+! enc_to_acp(name, (int)strlen(name), &acpname, &len);
+ name = acpname;
+ }
+ #endif
+*** ../vim-7.4.205/src/version.c 2014-03-12 21:28:09.485046816 +0100
+--- src/version.c 2014-03-19 12:33:16.253822349 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 206,
+ /**/
+
+--
+We apologise again for the fault in the subtitles. Those responsible for
+sacking the people who have just been sacked have been sacked.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.207 b/patches/source/vim/patches/7.4.207
new file mode 100644
index 000000000..895aa7284
--- /dev/null
+++ b/patches/source/vim/patches/7.4.207
@@ -0,0 +1,176 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.207
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.207
+Problem: The cursor report sequence is sometimes not recognized and results
+ in entering replace mode.
+Solution: Also check for the cursor report when not asked for.
+Files: src/term.c
+
+
+*** ../vim-7.4.206/src/term.c 2013-09-29 16:27:42.000000000 +0200
+--- src/term.c 2014-03-19 13:30:23.589874866 +0100
+***************
+*** 3379,3385 ****
+ out_str(buf);
+ out_str(T_U7);
+ u7_status = U7_SENT;
+! term_windgoto(0, 0);
+ out_str((char_u *)" ");
+ term_windgoto(0, 0);
+ /* check for the characters now, otherwise they might be eaten by
+--- 3379,3386 ----
+ out_str(buf);
+ out_str(T_U7);
+ u7_status = U7_SENT;
+! out_flush();
+! term_windgoto(1, 0);
+ out_str((char_u *)" ");
+ term_windgoto(0, 0);
+ /* check for the characters now, otherwise they might be eaten by
+***************
+*** 4185,4208 ****
+ || (tp[0] == CSI && len >= 2))
+ && (VIM_ISDIGIT(*p) || *p == '>' || *p == '?'))
+ {
+ j = 0;
+ extra = 0;
+ for (i = 2 + (tp[0] != CSI); i < len
+ && !(tp[i] >= '{' && tp[i] <= '~')
+ && !ASCII_ISALPHA(tp[i]); ++i)
+ if (tp[i] == ';' && ++j == 1)
+ extra = i + 1;
+ if (i == len)
+ {
+ LOG_TR("Not enough characters for CRV");
+ return -1;
+ }
+-
+ #ifdef FEAT_MBYTE
+! /* Eat it when it has 2 arguments and ends in 'R'. Ignore it
+! * when u7_status is not "sent", <S-F3> sends something
+! * similar. */
+! if (j == 1 && tp[i] == 'R' && u7_status == U7_SENT)
+ {
+ char *aw = NULL;
+
+--- 4186,4223 ----
+ || (tp[0] == CSI && len >= 2))
+ && (VIM_ISDIGIT(*p) || *p == '>' || *p == '?'))
+ {
++ #ifdef FEAT_MBYTE
++ int col;
++ int row_char;
++ #endif
+ j = 0;
+ extra = 0;
+ for (i = 2 + (tp[0] != CSI); i < len
+ && !(tp[i] >= '{' && tp[i] <= '~')
+ && !ASCII_ISALPHA(tp[i]); ++i)
+ if (tp[i] == ';' && ++j == 1)
++ {
+ extra = i + 1;
++ #ifdef FEAT_MBYTE
++ row_char = tp[i - 1];
++ #endif
++ }
+ if (i == len)
+ {
+ LOG_TR("Not enough characters for CRV");
+ return -1;
+ }
+ #ifdef FEAT_MBYTE
+! if (extra > 0)
+! col = atoi((char *)tp + extra);
+! else
+! col = 0;
+!
+! /* Eat it when it has 2 arguments and ends in 'R'. Also when
+! * u7_status is not "sent", it may be from a previous Vim that
+! * just exited. But not for <S-F3>, it sends something
+! * similar, check for row and column to make sense. */
+! if (j == 1 && tp[i] == 'R' && row_char == '2' && col >= 2)
+ {
+ char *aw = NULL;
+
+***************
+*** 4211,4228 ****
+ # ifdef FEAT_AUTOCMD
+ did_cursorhold = TRUE;
+ # endif
+! if (extra > 0)
+! extra = atoi((char *)tp + extra);
+! if (extra == 2)
+ aw = "single";
+! else if (extra == 3)
+ aw = "double";
+ if (aw != NULL && STRCMP(aw, p_ambw) != 0)
+ {
+ /* Setting the option causes a screen redraw. Do that
+ * right away if possible, keeping any messages. */
+ set_option_value((char_u *)"ambw", 0L, (char_u *)aw, 0);
+! #ifdef DEBUG_TERMRESPONSE
+ {
+ char buf[100];
+ int r = redraw_asap(CLEAR);
+--- 4226,4241 ----
+ # ifdef FEAT_AUTOCMD
+ did_cursorhold = TRUE;
+ # endif
+! if (col == 2)
+ aw = "single";
+! else if (col == 3)
+ aw = "double";
+ if (aw != NULL && STRCMP(aw, p_ambw) != 0)
+ {
+ /* Setting the option causes a screen redraw. Do that
+ * right away if possible, keeping any messages. */
+ set_option_value((char_u *)"ambw", 0L, (char_u *)aw, 0);
+! # ifdef DEBUG_TERMRESPONSE
+ {
+ char buf[100];
+ int r = redraw_asap(CLEAR);
+***************
+*** 4231,4239 ****
+ r);
+ log_tr(buf);
+ }
+! #else
+ redraw_asap(CLEAR);
+! #endif
+ }
+ key_name[0] = (int)KS_EXTRA;
+ key_name[1] = (int)KE_IGNORE;
+--- 4244,4252 ----
+ r);
+ log_tr(buf);
+ }
+! # else
+ redraw_asap(CLEAR);
+! # endif
+ }
+ key_name[0] = (int)KS_EXTRA;
+ key_name[1] = (int)KE_IGNORE;
+*** ../vim-7.4.206/src/version.c 2014-03-19 12:37:18.537826062 +0100
+--- src/version.c 2014-03-19 12:55:42.249842974 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 207,
+ /**/
+
+--
+How come wrong numbers are never busy?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.208 b/patches/source/vim/patches/7.4.208
new file mode 100644
index 000000000..7ca0a4d02
--- /dev/null
+++ b/patches/source/vim/patches/7.4.208
@@ -0,0 +1,36 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.208
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.208
+Problem: Mercurial picks up some files that are not distributed.
+Solution: Add patterns to the ignore list. (Cade Forester)
+Files: .hgignore
+
+Note: This patch was made empty, because .hgignore is not part of the
+distributed files.
+
+
+*** ../vim-7.4.207/src/version.c 2014-03-19 14:01:53.153903819 +0100
+--- src/version.c 2014-03-19 17:28:04.890093390 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 208,
+ /**/
+
+--
+It might look like I'm doing nothing, but at the cellular level
+I'm really quite busy.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.209 b/patches/source/vim/patches/7.4.209
new file mode 100644
index 000000000..9791716ec
--- /dev/null
+++ b/patches/source/vim/patches/7.4.209
@@ -0,0 +1,63 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.209
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.209
+Problem: When repeating a filter command "%" and "#" are expanded.
+Solution: Escape the command when storing for redo. (Christian Brabandt)
+Files: src/ex_cmds.c
+
+
+*** ../vim-7.4.208/src/ex_cmds.c 2014-02-22 22:27:20.768904692 +0100
+--- src/ex_cmds.c 2014-03-19 17:40:01.138104365 +0100
+***************
+*** 1012,1018 ****
+
+ if (bangredo) /* put cmd in redo buffer for ! command */
+ {
+! AppendToRedobuffLit(prevcmd, -1);
+ AppendToRedobuff((char_u *)"\n");
+ bangredo = FALSE;
+ }
+--- 1012,1029 ----
+
+ if (bangredo) /* put cmd in redo buffer for ! command */
+ {
+! /* If % or # appears in the command, it must have been escaped.
+! * Reescape them, so that redoing them does not substitute them by the
+! * buffername. */
+! char_u *cmd = vim_strsave_escaped(prevcmd, (char_u *)"%#");
+!
+! if (cmd != NULL)
+! {
+! AppendToRedobuffLit(cmd, -1);
+! vim_free(cmd);
+! }
+! else
+! AppendToRedobuffLit(prevcmd, -1);
+ AppendToRedobuff((char_u *)"\n");
+ bangredo = FALSE;
+ }
+*** ../vim-7.4.208/src/version.c 2014-03-19 17:32:32.454097490 +0100
+--- src/version.c 2014-03-19 17:40:24.810104728 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 209,
+ /**/
+
+--
+System administrators are just like women: You can't live with them and you
+can't live without them.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.210 b/patches/source/vim/patches/7.4.210
new file mode 100644
index 000000000..a96431c7a
--- /dev/null
+++ b/patches/source/vim/patches/7.4.210
@@ -0,0 +1,133 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.210
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.210
+Problem: Visual block mode plus virtual edit doesn't work well with tabs.
+ (Liang Li)
+Solution: Take coladd into account. (Christian Brabandt)
+Files: src/ops.c, src/testdir/test39.in, src/testdir/test39.ok
+
+
+*** ../vim-7.4.209/src/ops.c 2014-02-22 23:03:48.716901208 +0100
+--- src/ops.c 2014-03-19 18:33:54.118153904 +0100
+***************
+*** 2646,2652 ****
+ if (oap->start.lnum == curbuf->b_op_start_orig.lnum && !bd.is_MAX)
+ {
+ if (oap->op_type == OP_INSERT
+! && oap->start.col != curbuf->b_op_start_orig.col)
+ {
+ oap->start.col = curbuf->b_op_start_orig.col;
+ pre_textlen -= getviscol2(oap->start.col, oap->start.coladd)
+--- 2646,2660 ----
+ if (oap->start.lnum == curbuf->b_op_start_orig.lnum && !bd.is_MAX)
+ {
+ if (oap->op_type == OP_INSERT
+! && oap->start.col
+! #ifdef FEAT_VIRTUALEDIT
+! + oap->start.coladd
+! #endif
+! != curbuf->b_op_start_orig.col
+! #ifdef FEAT_VIRTUALEDIT
+! + curbuf->b_op_start_orig.coladd
+! #endif
+! )
+ {
+ oap->start.col = curbuf->b_op_start_orig.col;
+ pre_textlen -= getviscol2(oap->start.col, oap->start.coladd)
+***************
+*** 2654,2660 ****
+ oap->start_vcol = getviscol2(oap->start.col, oap->start.coladd);
+ }
+ else if (oap->op_type == OP_APPEND
+! && oap->end.col >= curbuf->b_op_start_orig.col)
+ {
+ oap->start.col = curbuf->b_op_start_orig.col;
+ /* reset pre_textlen to the value of OP_INSERT */
+--- 2662,2676 ----
+ oap->start_vcol = getviscol2(oap->start.col, oap->start.coladd);
+ }
+ else if (oap->op_type == OP_APPEND
+! && oap->end.col
+! #ifdef FEAT_VIRTUALEDIT
+! + oap->end.coladd
+! #endif
+! >= curbuf->b_op_start_orig.col
+! #ifdef FEAT_VIRTUALEDIT
+! + curbuf->b_op_start_orig.coladd
+! #endif
+! )
+ {
+ oap->start.col = curbuf->b_op_start_orig.col;
+ /* reset pre_textlen to the value of OP_INSERT */
+*** ../vim-7.4.209/src/testdir/test39.in 2014-01-14 13:18:53.000000000 +0100
+--- src/testdir/test39.in 2014-03-19 18:35:31.382155394 +0100
+***************
+*** 35,40 ****
+--- 35,46 ----
+ /^C23$/
+ :exe ":norm! l\<C-V>j$hhAab\<Esc>"
+ :.,/^$/w >> test.out
++ :" Test for Visual block insert when virtualedit=all
++ :set ve=all
++ :/\t\tline
++ :exe ":norm! 07l\<C-V>jjIx\<Esc>"
++ :set ve=
++ :.,/^$/w >> test.out
+ :" gUe must uppercase a whole word, also when ß changes to SS
+ Gothe youtußeuu endYpk0wgUe
+ :" gUfx must uppercase until x, inclusive.
+***************
+*** 62,67 ****
+--- 68,77 ----
+ :qa!
+ ENDTEST
+
++ line1
++ line2
++ line3
++
+ aaaaaa
+ bbbbbb
+ cccccc
+*** ../vim-7.4.209/src/testdir/test39.ok 2014-01-14 13:18:53.000000000 +0100
+--- src/testdir/test39.ok 2014-03-19 18:34:18.206154273 +0100
+***************
+*** 17,22 ****
+--- 17,26 ----
+ C23ab
+ 456ab7
+
++ x line1
++ x line2
++ x line3
++
+ the YOUTUSSEUU end
+ - yOUSSTUSSEXu -
+ THE YOUTUSSEUU END
+*** ../vim-7.4.209/src/version.c 2014-03-19 17:41:20.390105580 +0100
+--- src/version.c 2014-03-19 18:27:19.746147861 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 210,
+ /**/
+
+--
+SUPERIMPOSE "England AD 787". After a few more seconds we hear hoofbeats in
+the distance. They come slowly closer. Then out of the mist comes KING
+ARTHUR followed by a SERVANT who is banging two half coconuts together.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.211 b/patches/source/vim/patches/7.4.211
new file mode 100644
index 000000000..783855c74
--- /dev/null
+++ b/patches/source/vim/patches/7.4.211
@@ -0,0 +1,68 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.211
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.211
+Problem: ":lu" is an abbreviation for ":lua", but it should be ":lunmap".
+ (ZyX)
+Solution: Move "lunmap" to above "lua".
+Files: src/ex_cmds.h
+
+
+*** ../vim-7.4.210/src/ex_cmds.h 2013-11-09 05:30:18.000000000 +0100
+--- src/ex_cmds.h 2014-03-22 13:28:01.277844383 +0100
+***************
+*** 573,586 ****
+ RANGE|NOTADR|COUNT|TRLBAR|BANG),
+ EX(CMD_ltag, "ltag", ex_tag,
+ NOTADR|TRLBAR|BANG|WORD1),
+ EX(CMD_lua, "lua", ex_lua,
+ RANGE|EXTRA|NEEDARG|CMDWIN),
+ EX(CMD_luado, "luado", ex_luado,
+ RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN),
+ EX(CMD_luafile, "luafile", ex_luafile,
+ RANGE|FILE1|NEEDARG|CMDWIN),
+- EX(CMD_lunmap, "lunmap", ex_unmap,
+- EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
+ EX(CMD_lvimgrep, "lvimgrep", ex_vimgrep,
+ RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE),
+ EX(CMD_lvimgrepadd, "lvimgrepadd", ex_vimgrep,
+--- 573,586 ----
+ RANGE|NOTADR|COUNT|TRLBAR|BANG),
+ EX(CMD_ltag, "ltag", ex_tag,
+ NOTADR|TRLBAR|BANG|WORD1),
++ EX(CMD_lunmap, "lunmap", ex_unmap,
++ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
+ EX(CMD_lua, "lua", ex_lua,
+ RANGE|EXTRA|NEEDARG|CMDWIN),
+ EX(CMD_luado, "luado", ex_luado,
+ RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN),
+ EX(CMD_luafile, "luafile", ex_luafile,
+ RANGE|FILE1|NEEDARG|CMDWIN),
+ EX(CMD_lvimgrep, "lvimgrep", ex_vimgrep,
+ RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE),
+ EX(CMD_lvimgrepadd, "lvimgrepadd", ex_vimgrep,
+*** ../vim-7.4.210/src/version.c 2014-03-19 18:57:27.730175565 +0100
+--- src/version.c 2014-03-22 13:28:47.421845090 +0100
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 211,
+ /**/
+
+--
+"I've been teaching myself to play the piano for about 5 years and now write
+most of my songs on it, mainly because I can never find any paper."
+ Jeff Lynne, ELO's greatest hits
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.212 b/patches/source/vim/patches/7.4.212
new file mode 100644
index 000000000..6bc98eb38
--- /dev/null
+++ b/patches/source/vim/patches/7.4.212
@@ -0,0 +1,5720 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.212
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.212 (after 7.4.200)
+Problem: Now that the +visual feature is always enabled the #ifdefs for it
+ are not useful.
+Solution: Remove the checks for FEAT_VISUAL.
+Files: src/buffer.c, src/charset.c, src/edit.c, src/eval.c,
+ src/ex_cmds.c, src/ex_docmd.c, src/fold.c, src/getchar.c,
+ src/gui.c, src/gui_mac.c, src/gui_w48.c, src/main.c, src/mark.c,
+ src/menu.c, src/misc2.c, src/move.c, src/netbeans.c, src/normal.c,
+ src/ops.c, src/option.c, src/os_msdos.c, src/os_qnx.c,
+ src/quickfix.c, src/regexp.c, src/regexp_nfa.c, src/screen.c,
+ src/search.c, src/spell.c, src/syntax.c, src/term.c, src/ui.c,
+ src/undo.c, src/version.c, src/window.c, src/feature.h,
+ src/globals.h, src/option.h, src/os_win32.h, src/structs.h
+
+
+*** ../vim-7.4.211/src/buffer.c 2014-03-12 18:55:52.100906804 +0100
+--- src/buffer.c 2014-03-23 13:01:39.843144050 +0100
+***************
+*** 1432,1441 ****
+ curwin->w_alt_fnum = curbuf->b_fnum; /* remember alternate file */
+ buflist_altfpos(curwin); /* remember curpos */
+
+- #ifdef FEAT_VISUAL
+ /* Don't restart Select mode after switching to another buffer. */
+ VIsual_reselect = FALSE;
+- #endif
+
+ /* close_windows() or apply_autocmds() may change curbuf */
+ prevbuf = curbuf;
+--- 1432,1439 ----
+*** ../vim-7.4.211/src/charset.c 2013-02-06 16:20:01.000000000 +0100
+--- src/charset.c 2014-03-23 13:02:19.467144657 +0100
+***************
+*** 1380,1389 ****
+ && (State & NORMAL)
+ && !wp->w_p_list
+ && !virtual_active()
+! #ifdef FEAT_VISUAL
+! && !(VIsual_active
+! && (*p_sel == 'e' || ltoreq(*pos, VIsual)))
+! #endif
+ )
+ *cursor = vcol + incr - 1; /* cursor at end */
+ else
+--- 1380,1386 ----
+ && (State & NORMAL)
+ && !wp->w_p_list
+ && !virtual_active()
+! && !(VIsual_active && (*p_sel == 'e' || ltoreq(*pos, VIsual)))
+ )
+ *cursor = vcol + incr - 1; /* cursor at end */
+ else
+***************
+*** 1463,1469 ****
+ }
+ #endif
+
+- #if defined(FEAT_VISUAL) || defined(PROTO)
+ /*
+ * Get the leftmost and rightmost virtual column of pos1 and pos2.
+ * Used for Visual block mode.
+--- 1460,1465 ----
+***************
+*** 1500,1506 ****
+ else
+ *right = to1;
+ }
+- #endif
+
+ /*
+ * skipwhite: skip over ' ' and '\t'.
+--- 1496,1501 ----
+*** ../vim-7.4.211/src/edit.c 2014-02-22 23:03:48.712901208 +0100
+--- src/edit.c 2014-03-23 13:03:11.951145462 +0100
+***************
+*** 220,228 ****
+ #ifdef FEAT_RIGHTLEFT
+ static void ins_ctrl_ __ARGS((void));
+ #endif
+- #ifdef FEAT_VISUAL
+ static int ins_start_select __ARGS((int c));
+- #endif
+ static void ins_insert __ARGS((int replaceState));
+ static void ins_ctrl_o __ARGS((void));
+ static void ins_shift __ARGS((int c, int lastc));
+--- 220,226 ----
+***************
+*** 932,938 ****
+ }
+ #endif
+
+- #ifdef FEAT_VISUAL
+ /*
+ * If 'keymodel' contains "startsel", may start selection. If it
+ * does, a CTRL-O and c will be stuffed, we need to get these
+--- 930,935 ----
+***************
+*** 940,946 ****
+ */
+ if (ins_start_select(c))
+ continue;
+- #endif
+
+ /*
+ * The big switch to handle a character in insert mode.
+--- 937,942 ----
+***************
+*** 6900,6906 ****
+ else if (cc != NUL)
+ ++curwin->w_cursor.col; /* put cursor back on the NUL */
+
+- #ifdef FEAT_VISUAL
+ /* <C-S-Right> may have started Visual mode, adjust the position for
+ * deleted characters. */
+ if (VIsual_active && VIsual.lnum == curwin->w_cursor.lnum)
+--- 6896,6901 ----
+***************
+*** 6910,6921 ****
+ if (VIsual.col > len)
+ {
+ VIsual.col = len;
+! # ifdef FEAT_VIRTUALEDIT
+ VIsual.coladd = 0;
+! # endif
+ }
+ }
+- #endif
+ }
+ }
+ did_ai = FALSE;
+--- 6905,6915 ----
+ if (VIsual.col > len)
+ {
+ VIsual.col = len;
+! #ifdef FEAT_VIRTUALEDIT
+ VIsual.coladd = 0;
+! #endif
+ }
+ }
+ }
+ }
+ did_ai = FALSE;
+***************
+*** 8112,8120 ****
+ int need_redraw = FALSE;
+ int regname;
+ int literally = 0;
+- #ifdef FEAT_VISUAL
+ int vis_active = VIsual_active;
+- #endif
+
+ /*
+ * If we are going to wait for a character, show a '"'.
+--- 8106,8112 ----
+***************
+*** 8218,8228 ****
+ if (need_redraw || stuff_empty())
+ edit_unputchar();
+
+- #ifdef FEAT_VISUAL
+ /* Disallow starting Visual mode here, would get a weird mode. */
+ if (!vis_active && VIsual_active)
+ end_visual_mode();
+- #endif
+ }
+
+ /*
+--- 8210,8218 ----
+***************
+*** 8419,8429 ****
+ #endif
+ )
+ && (restart_edit == NUL
+! || (gchar_cursor() == NUL
+! #ifdef FEAT_VISUAL
+! && !VIsual_active
+! #endif
+! ))
+ #ifdef FEAT_RIGHTLEFT
+ && !revins_on
+ #endif
+--- 8409,8415 ----
+ #endif
+ )
+ && (restart_edit == NUL
+! || (gchar_cursor() == NUL && !VIsual_active))
+ #ifdef FEAT_RIGHTLEFT
+ && !revins_on
+ #endif
+***************
+*** 8525,8531 ****
+ }
+ #endif
+
+- #ifdef FEAT_VISUAL
+ /*
+ * If 'keymodel' contains "startsel", may start selection.
+ * Returns TRUE when a CTRL-O and other keys stuffed.
+--- 8511,8516 ----
+***************
+*** 8581,8587 ****
+ }
+ return FALSE;
+ }
+- #endif
+
+ /*
+ * <Insert> key in Insert mode: toggle insert/replace mode.
+--- 8566,8571 ----
+*** ../vim-7.4.211/src/eval.c 2014-02-24 03:31:55.816738026 +0100
+--- src/eval.c 2014-03-23 13:03:56.419146143 +0100
+***************
+*** 11833,11844 ****
+ {
+ case MLINE: buf[0] = 'V'; break;
+ case MCHAR: buf[0] = 'v'; break;
+- #ifdef FEAT_VISUAL
+ case MBLOCK:
+ buf[0] = Ctrl_V;
+ sprintf((char *)buf + 1, "%ld", reglen + 1);
+ break;
+- #endif
+ }
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = vim_strsave(buf);
+--- 11833,11842 ----
+***************
+*** 12552,12560 ****
+ #ifdef FEAT_VIRTUALEDIT
+ "virtualedit",
+ #endif
+- #ifdef FEAT_VISUAL
+ "visual",
+- #endif
+ #ifdef FEAT_VISUALEXTRA
+ "visualextra",
+ #endif
+--- 12550,12556 ----
+***************
+*** 14397,14403 ****
+ buf[1] = NUL;
+ buf[2] = NUL;
+
+- #ifdef FEAT_VISUAL
+ if (VIsual_active)
+ {
+ if (VIsual_select)
+--- 14393,14398 ----
+***************
+*** 14405,14413 ****
+ else
+ buf[0] = VIsual_mode;
+ }
+! else
+! #endif
+! if (State == HITRETURN || State == ASKMORE || State == SETWSIZE
+ || State == CONFIRM)
+ {
+ buf[0] = 'r';
+--- 14400,14406 ----
+ else
+ buf[0] = VIsual_mode;
+ }
+! else if (State == HITRETURN || State == ASKMORE || State == SETWSIZE
+ || State == CONFIRM)
+ {
+ buf[0] = 'r';
+***************
+*** 16756,16762 ****
+ case 'V': case 'l': /* line-wise selection */
+ yank_type = MLINE;
+ break;
+- #ifdef FEAT_VISUAL
+ case 'b': case Ctrl_V: /* block-wise selection */
+ yank_type = MBLOCK;
+ if (VIM_ISDIGIT(stropt[1]))
+--- 16749,16754 ----
+***************
+*** 16766,16772 ****
+ --stropt;
+ }
+ break;
+- #endif
+ }
+ }
+
+--- 16758,16763 ----
+***************
+*** 18769,18775 ****
+ typval_T *argvars UNUSED;
+ typval_T *rettv UNUSED;
+ {
+- #ifdef FEAT_VISUAL
+ char_u str[2];
+
+ rettv->v_type = VAR_STRING;
+--- 18760,18765 ----
+***************
+*** 18780,18786 ****
+ /* A non-zero number or non-empty string argument: reset mode. */
+ if (non_zero_arg(&argvars[0]))
+ curbuf->b_visual_mode_eval = NUL;
+- #endif
+ }
+
+ /*
+--- 18770,18775 ----
+***************
+*** 19154,19167 ****
+ return NULL;
+ if (name[0] == '.') /* cursor */
+ return &curwin->w_cursor;
+- #ifdef FEAT_VISUAL
+ if (name[0] == 'v' && name[1] == NUL) /* Visual start */
+ {
+ if (VIsual_active)
+ return &VIsual;
+ return &curwin->w_cursor;
+ }
+- #endif
+ if (name[0] == '\'') /* mark */
+ {
+ pp = getmark_buf_fnum(curbuf, name[1], FALSE, fnum);
+--- 19143,19154 ----
+*** ../vim-7.4.211/src/ex_cmds.c 2014-03-19 17:41:20.390105580 +0100
+--- src/ex_cmds.c 2014-03-23 13:04:09.359146341 +0100
+***************
+*** 3274,3286 ****
+ goto theend;
+ }
+
+- #ifdef FEAT_VISUAL
+ /*
+ * End Visual mode before switching to another buffer, so the text can be
+ * copied into the GUI selection buffer.
+ */
+ reset_VIsual();
+- #endif
+
+ #ifdef FEAT_AUTOCMD
+ if ((command != NULL || newlnum > (linenr_T)0)
+--- 3274,3284 ----
+*** ../vim-7.4.211/src/ex_docmd.c 2014-03-12 21:28:09.481046816 +0100
+--- src/ex_docmd.c 2014-03-23 13:04:47.975146933 +0100
+***************
+*** 8577,8586 ****
+ beginline(BL_SOL | BL_FIX);
+ }
+
+- #if defined(FEAT_VISUAL)
+ if (VIsual_active)
+ end_visual_mode();
+- #endif
+
+ switch (eap->cmdidx)
+ {
+--- 8577,8584 ----
+***************
+*** 8991,9001 ****
+ RedrawingDisabled = 0;
+ p_lz = FALSE;
+ update_topline();
+! update_screen(eap->forceit ? CLEAR :
+! #ifdef FEAT_VISUAL
+! VIsual_active ? INVERTED :
+! #endif
+! 0);
+ #ifdef FEAT_TITLE
+ if (need_maketitle)
+ maketitle();
+--- 8989,8995 ----
+ RedrawingDisabled = 0;
+ p_lz = FALSE;
+ update_topline();
+! update_screen(eap->forceit ? CLEAR : VIsual_active ? INVERTED : 0);
+ #ifdef FEAT_TITLE
+ if (need_maketitle)
+ maketitle();
+***************
+*** 9030,9040 ****
+ status_redraw_all();
+ else
+ status_redraw_curbuf();
+! update_screen(
+! # ifdef FEAT_VISUAL
+! VIsual_active ? INVERTED :
+! # endif
+! 0);
+ RedrawingDisabled = r;
+ p_lz = p;
+ out_flush();
+--- 9024,9030 ----
+ status_redraw_all();
+ else
+ status_redraw_curbuf();
+! update_screen(VIsual_active ? INVERTED : 0);
+ RedrawingDisabled = r;
+ p_lz = p;
+ out_flush();
+*** ../vim-7.4.211/src/fold.c 2013-11-05 07:12:59.000000000 +0100
+--- src/fold.c 2014-03-23 13:05:14.775147344 +0100
+***************
+*** 430,440 ****
+ }
+ if (done == DONE_NOTHING)
+ EMSG(_(e_nofold));
+- #ifdef FEAT_VISUAL
+ /* Force a redraw to remove the Visual highlighting. */
+ if (had_visual)
+ redraw_curbuf_later(INVERTED);
+- #endif
+ }
+
+ /* openFold() {{{2 */
+--- 430,438 ----
+***************
+*** 807,817 ****
+ if (!did_one)
+ {
+ EMSG(_(e_nofold));
+- #ifdef FEAT_VISUAL
+ /* Force a redraw to remove the Visual highlighting. */
+ if (had_visual)
+ redraw_curbuf_later(INVERTED);
+- #endif
+ }
+ else
+ /* Deleting markers may make cursor column invalid. */
+--- 805,813 ----
+***************
+*** 1065,1071 ****
+ }
+
+ /* foldAdjustVisual() {{{2 */
+- #ifdef FEAT_VISUAL
+ /*
+ * Adjust the Visual area to include any fold at the start or end completely.
+ */
+--- 1061,1066 ----
+***************
+*** 1103,1109 ****
+ #endif
+ }
+ }
+- #endif
+
+ /* cursor_foldstart() {{{2 */
+ /*
+--- 1098,1103 ----
+*** ../vim-7.4.211/src/getchar.c 2014-03-12 20:17:47.748982126 +0100
+--- src/getchar.c 2014-03-23 13:05:45.383147813 +0100
+***************
+*** 870,876 ****
+ c = read_redo(FALSE, old_redo);
+ }
+
+- #ifdef FEAT_VISUAL
+ if (c == 'v') /* redo Visual */
+ {
+ VIsual = curwin->w_cursor;
+--- 870,875 ----
+***************
+*** 880,886 ****
+ redo_VIsual_busy = TRUE;
+ c = read_redo(FALSE, old_redo);
+ }
+- #endif
+
+ /* try to enter the count (in place of a previous count) */
+ if (count)
+--- 879,884 ----
+***************
+*** 1162,1168 ****
+ return typebuf.tb_maplen == 0;
+ }
+
+- #if defined(FEAT_VISUAL) || defined(PROTO)
+ /*
+ * Return the number of characters that are mapped (or not typed).
+ */
+--- 1160,1165 ----
+***************
+*** 1171,1177 ****
+ {
+ return typebuf.tb_maplen;
+ }
+- #endif
+
+ /*
+ * remove "len" characters from typebuf.tb_buf[typebuf.tb_off + offset]
+--- 1168,1173 ----
+***************
+*** 2443,2449 ****
+ idx = get_menu_index(current_menu, local_State);
+ if (idx != MENU_INDEX_INVALID)
+ {
+- # ifdef FEAT_VISUAL
+ /*
+ * In Select mode and a Visual mode menu
+ * is used: Switch to Visual mode
+--- 2439,2444 ----
+***************
+*** 2457,2463 ****
+ (void)ins_typebuf(K_SELECT_STRING,
+ REMAP_NONE, 0, TRUE, FALSE);
+ }
+- # endif
+ ins_typebuf(current_menu->strings[idx],
+ current_menu->noremap[idx],
+ 0, TRUE,
+--- 2452,2457 ----
+***************
+*** 2516,2522 ****
+ break;
+ }
+
+- #ifdef FEAT_VISUAL
+ /*
+ * In Select mode and a Visual mode mapping is used:
+ * Switch to Visual mode temporarily. Append K_SELECT
+--- 2510,2515 ----
+***************
+*** 2529,2535 ****
+ (void)ins_typebuf(K_SELECT_STRING, REMAP_NONE,
+ 0, TRUE, FALSE);
+ }
+- #endif
+
+ #ifdef FEAT_EVAL
+ /* Copy the values from *mp that are used, because
+--- 2522,2527 ----
+*** ../vim-7.4.211/src/gui.c 2013-06-30 17:41:48.000000000 +0200
+--- src/gui.c 2014-03-23 13:05:57.623148000 +0100
+***************
+*** 3132,3142 ****
+ */
+ if (!mouse_has(checkfor) || checkfor == MOUSE_COMMAND)
+ {
+- #ifdef FEAT_VISUAL
+ /* Don't do modeless selection in Visual mode. */
+ if (checkfor != MOUSE_NONEF && VIsual_active && (State & NORMAL))
+ return;
+- #endif
+
+ /*
+ * When 'mousemodel' is "popup", shift-left is translated to right.
+--- 3132,3140 ----
+*** ../vim-7.4.211/src/gui_mac.c 2013-05-06 04:06:04.000000000 +0200
+--- src/gui_mac.c 2014-03-23 13:06:30.143148498 +0100
+***************
+*** 1068,1078 ****
+ }
+ */
+
+-
+- #ifdef FEAT_VISUAL
+ reset_VIsual();
+- #endif
+-
+ fnames = new_fnames_from_AEDesc(&theList, &numFiles, &error);
+
+ if (error)
+--- 1068,1074 ----
+***************
+*** 1142,1148 ****
+
+ /* Update the screen display */
+ update_screen(NOT_VALID);
+! #ifdef FEAT_VISUAL
+ /* Select the text if possible */
+ if (gotPosition)
+ {
+--- 1138,1144 ----
+
+ /* Update the screen display */
+ update_screen(NOT_VALID);
+!
+ /* Select the text if possible */
+ if (gotPosition)
+ {
+***************
+*** 1160,1166 ****
+ VIsual.col = 0;
+ }
+ }
+! #endif
+ setcursor();
+ out_flush();
+
+--- 1156,1162 ----
+ VIsual.col = 0;
+ }
+ }
+!
+ setcursor();
+ out_flush();
+
+*** ../vim-7.4.211/src/gui_w48.c 2014-03-19 12:37:18.537826062 +0100
+--- src/gui_w48.c 2014-03-23 13:06:44.959148725 +0100
+***************
+*** 3708,3716 ****
+ DragQueryPoint(hDrop, &pt);
+ MapWindowPoints(s_hwnd, s_textArea, &pt, 1);
+
+- # ifdef FEAT_VISUAL
+ reset_VIsual();
+- # endif
+
+ fnames = (char_u **)alloc(cFiles * sizeof(char_u *));
+
+--- 3708,3714 ----
+*** ../vim-7.4.211/src/main.c 2014-01-14 12:57:00.000000000 +0100
+--- src/main.c 2014-03-23 13:07:21.771149289 +0100
+***************
+*** 1057,1065 ****
+ if (!cmdwin && !noexmode && SETJMP(x_jump_env))
+ {
+ State = NORMAL;
+- # ifdef FEAT_VISUAL
+ VIsual_active = FALSE;
+- # endif
+ got_int = TRUE;
+ need_wait_return = FALSE;
+ global_busy = FALSE;
+--- 1057,1063 ----
+***************
+*** 1096,1106 ****
+ check_timestamps(FALSE);
+ if (need_wait_return) /* if wait_return still needed ... */
+ wait_return(FALSE); /* ... call it now */
+! if (need_start_insertmode && goto_im()
+! #ifdef FEAT_VISUAL
+! && !VIsual_active
+! #endif
+! )
+ {
+ need_start_insertmode = FALSE;
+ stuffReadbuff((char_u *)"i"); /* start insert mode next */
+--- 1094,1100 ----
+ check_timestamps(FALSE);
+ if (need_wait_return) /* if wait_return still needed ... */
+ wait_return(FALSE); /* ... call it now */
+! if (need_start_insertmode && goto_im() && !VIsual_active)
+ {
+ need_start_insertmode = FALSE;
+ stuffReadbuff((char_u *)"i"); /* start insert mode next */
+***************
+*** 1202,1208 ****
+ diff_need_scrollbind = FALSE;
+ }
+ #endif
+! #if defined(FEAT_FOLDING) && defined(FEAT_VISUAL)
+ /* Include a closed fold completely in the Visual area. */
+ foldAdjustVisual();
+ #endif
+--- 1196,1202 ----
+ diff_need_scrollbind = FALSE;
+ }
+ #endif
+! #if defined(FEAT_FOLDING)
+ /* Include a closed fold completely in the Visual area. */
+ foldAdjustVisual();
+ #endif
+***************
+*** 1228,1239 ****
+ update_topline();
+ validate_cursor();
+
+- #ifdef FEAT_VISUAL
+ if (VIsual_active)
+ update_curbuf(INVERTED);/* update inverted part */
+! else
+! #endif
+! if (must_redraw)
+ update_screen(0);
+ else if (redraw_cmdline || clear_cmdline)
+ showmode();
+--- 1222,1230 ----
+ update_topline();
+ validate_cursor();
+
+ if (VIsual_active)
+ update_curbuf(INVERTED);/* update inverted part */
+! else if (must_redraw)
+ update_screen(0);
+ else if (redraw_cmdline || clear_cmdline)
+ showmode();
+*** ../vim-7.4.211/src/mark.c 2013-11-03 00:20:46.000000000 +0100
+--- src/mark.c 2014-03-23 13:08:03.011149921 +0100
+***************
+*** 98,104 ****
+ return OK;
+ }
+
+- #ifdef FEAT_VISUAL
+ if (c == '<' || c == '>')
+ {
+ if (c == '<')
+--- 98,103 ----
+***************
+*** 110,116 ****
+ curbuf->b_visual.vi_mode = 'v';
+ return OK;
+ }
+- #endif
+
+ #ifndef EBCDIC
+ if (c > 'z') /* some islower() and isupper() cannot handle
+--- 109,114 ----
+***************
+*** 340,348 ****
+ int *fnum;
+ {
+ pos_T *posp;
+- #ifdef FEAT_VISUAL
+ pos_T *startp, *endp;
+- #endif
+ static pos_T pos_copy;
+
+ posp = NULL;
+--- 338,344 ----
+***************
+*** 403,409 ****
+ curwin->w_cursor = pos;
+ listcmd_busy = slcb;
+ }
+- #ifdef FEAT_VISUAL
+ else if (c == '<' || c == '>') /* start/end of visual area */
+ {
+ startp = &buf->b_visual.vi_start;
+--- 399,404 ----
+***************
+*** 428,434 ****
+ #endif
+ }
+ }
+- #endif
+ else if (ASCII_ISLOWER(c)) /* normal named mark */
+ {
+ posp = &(buf->b_namedm[c - 'a']);
+--- 423,428 ----
+***************
+*** 757,766 ****
+ show_one_mark(']', arg, &curbuf->b_op_end, NULL, TRUE);
+ show_one_mark('^', arg, &curbuf->b_last_insert, NULL, TRUE);
+ show_one_mark('.', arg, &curbuf->b_last_change, NULL, TRUE);
+- #ifdef FEAT_VISUAL
+ show_one_mark('<', arg, &curbuf->b_visual.vi_start, NULL, TRUE);
+ show_one_mark('>', arg, &curbuf->b_visual.vi_end, NULL, TRUE);
+- #endif
+ show_one_mark(-1, arg, NULL, NULL, FALSE);
+ }
+
+--- 751,758 ----
+***************
+*** 892,901 ****
+ case '.': curbuf->b_last_change.lnum = 0; break;
+ case '[': curbuf->b_op_start.lnum = 0; break;
+ case ']': curbuf->b_op_end.lnum = 0; break;
+- #ifdef FEAT_VISUAL
+ case '<': curbuf->b_visual.vi_start.lnum = 0; break;
+ case '>': curbuf->b_visual.vi_end.lnum = 0; break;
+- #endif
+ case ' ': break;
+ default: EMSG2(_(e_invarg2), p);
+ return;
+--- 884,891 ----
+***************
+*** 1085,1095 ****
+ one_adjust_nodel(&(curbuf->b_changelist[i].lnum));
+ #endif
+
+- #ifdef FEAT_VISUAL
+ /* Visual area */
+ one_adjust_nodel(&(curbuf->b_visual.vi_start.lnum));
+ one_adjust_nodel(&(curbuf->b_visual.vi_end.lnum));
+- #endif
+
+ #ifdef FEAT_QUICKFIX
+ /* quickfix marks */
+--- 1075,1083 ----
+***************
+*** 1136,1149 ****
+ if (win->w_tagstack[i].fmark.fnum == fnum)
+ one_adjust_nodel(&(win->w_tagstack[i].fmark.mark.lnum));
+
+- #ifdef FEAT_VISUAL
+ /* the displayed Visual area */
+ if (win->w_old_cursor_lnum != 0)
+ {
+ one_adjust_nodel(&(win->w_old_cursor_lnum));
+ one_adjust_nodel(&(win->w_old_visual_lnum));
+ }
+- #endif
+
+ /* topline and cursor position for windows with the same buffer
+ * other than the current window */
+--- 1124,1135 ----
+***************
+*** 1260,1270 ****
+ col_adjust(&(curbuf->b_changelist[i]));
+ #endif
+
+- #ifdef FEAT_VISUAL
+ /* Visual area */
+ col_adjust(&(curbuf->b_visual.vi_start));
+ col_adjust(&(curbuf->b_visual.vi_end));
+- #endif
+
+ /* previous context mark */
+ col_adjust(&(curwin->w_pcmark));
+--- 1246,1254 ----
+*** ../vim-7.4.211/src/menu.c 2011-04-11 15:17:21.000000000 +0200
+--- src/menu.c 2014-03-23 13:08:19.091150168 +0100
+***************
+*** 1640,1646 ****
+ idx = MENU_INDEX_INSERT;
+ else if (state & CMDLINE)
+ idx = MENU_INDEX_CMDLINE;
+- #ifdef FEAT_VISUAL
+ else if (VIsual_active)
+ {
+ if (VIsual_select)
+--- 1640,1645 ----
+***************
+*** 1648,1654 ****
+ else
+ idx = MENU_INDEX_VISUAL;
+ }
+- #endif
+ else if (state == HITRETURN || state == ASKMORE)
+ idx = MENU_INDEX_CMDLINE;
+ else if (finish_op)
+--- 1647,1652 ----
+***************
+*** 1811,1824 ****
+ static int
+ get_menu_mode()
+ {
+- #ifdef FEAT_VISUAL
+ if (VIsual_active)
+ {
+ if (VIsual_select)
+ return MENU_INDEX_SELECT;
+ return MENU_INDEX_VISUAL;
+ }
+- #endif
+ if (State & INSERT)
+ return MENU_INDEX_INSERT;
+ if ((State & CMDLINE) || State == ASKMORE || State == HITRETURN)
+--- 1809,1820 ----
+*** ../vim-7.4.211/src/misc2.c 2014-02-23 23:38:58.824760280 +0100
+--- src/misc2.c 2014-03-23 13:08:56.927150748 +0100
+***************
+*** 31,39 ****
+ if (virtual_op != MAYBE)
+ return virtual_op;
+ return (ve_flags == VE_ALL
+- # ifdef FEAT_VISUAL
+ || ((ve_flags & VE_BLOCK) && VIsual_active && VIsual_mode == Ctrl_V)
+- # endif
+ || ((ve_flags & VE_INSERT) && (State & INSERT)));
+ }
+
+--- 31,37 ----
+***************
+*** 149,157 ****
+
+ one_more = (State & INSERT)
+ || restart_edit != NUL
+- #ifdef FEAT_VISUAL
+ || (VIsual_active && *p_sel != 'o')
+- #endif
+ #ifdef FEAT_VIRTUALEDIT
+ || ((ve_flags & VE_ONEMORE) && wcol < MAXCOL)
+ #endif
+--- 147,153 ----
+***************
+*** 570,578 ****
+ * - in Visual mode and 'selection' isn't "old"
+ * - 'virtualedit' is set */
+ if ((State & INSERT) || restart_edit
+- #ifdef FEAT_VISUAL
+ || (VIsual_active && *p_sel != 'o')
+- #endif
+ #ifdef FEAT_VIRTUALEDIT
+ || (ve_flags & VE_ONEMORE)
+ #endif
+--- 566,572 ----
+***************
+*** 627,635 ****
+ adjust_cursor_col()
+ {
+ if (curwin->w_cursor.col > 0
+- # ifdef FEAT_VISUAL
+ && (!VIsual_active || *p_sel == 'o')
+- # endif
+ && gchar_cursor() == NUL)
+ --curwin->w_cursor.col;
+ }
+--- 621,627 ----
+***************
+*** 3290,3306 ****
+ {
+ if (State & NORMAL)
+ {
+- #ifdef FEAT_VISUAL
+ if (VIsual_active)
+ {
+ if (VIsual_select)
+ return SELECTMODE;
+ return VISUAL;
+ }
+! else
+! #endif
+! if (finish_op)
+! return OP_PENDING;
+ }
+ return State;
+ }
+--- 3282,3295 ----
+ {
+ if (State & NORMAL)
+ {
+ if (VIsual_active)
+ {
+ if (VIsual_select)
+ return SELECTMODE;
+ return VISUAL;
+ }
+! else if (finish_op)
+! return OP_PENDING;
+ }
+ return State;
+ }
+***************
+*** 3738,3744 ****
+ }
+ if (finish_op)
+ return SHAPE_IDX_O;
+- #ifdef FEAT_VISUAL
+ if (VIsual_active)
+ {
+ if (*p_sel == 'e')
+--- 3727,3732 ----
+***************
+*** 3746,3752 ****
+ else
+ return SHAPE_IDX_V;
+ }
+- #endif
+ return SHAPE_IDX_N;
+ }
+ #endif
+--- 3734,3739 ----
+*** ../vim-7.4.211/src/move.c 2014-02-11 18:58:05.102320947 +0100
+--- src/move.c 2014-03-23 13:09:16.535151048 +0100
+***************
+*** 2857,2873 ****
+ win_T *old_curwin = curwin;
+ buf_T *old_curbuf = curbuf;
+ int restart_edit_save;
+- # ifdef FEAT_VISUAL
+ int old_VIsual_select = VIsual_select;
+ int old_VIsual_active = VIsual_active;
+- # endif
+
+ /*
+ * loop through the cursorbound windows
+ */
+- # ifdef FEAT_VISUAL
+ VIsual_select = VIsual_active = 0;
+- # endif
+ for (curwin = firstwin; curwin; curwin = curwin->w_next)
+ {
+ curbuf = curwin->w_buffer;
+--- 2857,2869 ----
+***************
+*** 2916,2925 ****
+ /*
+ * reset current-window
+ */
+- # ifdef FEAT_VISUAL
+ VIsual_select = old_VIsual_select;
+ VIsual_active = old_VIsual_active;
+- # endif
+ curwin = old_curwin;
+ curbuf = old_curbuf;
+ }
+--- 2912,2919 ----
+*** ../vim-7.4.211/src/netbeans.c 2012-06-20 19:56:18.000000000 +0200
+--- src/netbeans.c 2014-03-23 13:09:29.163151241 +0100
+***************
+*** 2232,2242 ****
+
+ nb_set_curbuf(buf->bufp);
+
+- #ifdef FEAT_VISUAL
+ /* Don't want Visual mode now. */
+ if (VIsual_active)
+ end_visual_mode();
+- #endif
+ #ifdef NBDEBUG
+ s = args;
+ #endif
+--- 2232,2240 ----
+*** ../vim-7.4.211/src/normal.c 2014-03-12 17:41:59.128838878 +0100
+--- src/normal.c 2014-03-23 15:07:40.435259900 +0100
+***************
+*** 14,20 ****
+
+ #include "vim.h"
+
+- #ifdef FEAT_VISUAL
+ /*
+ * The Visual area is remembered for reselection.
+ */
+--- 14,19 ----
+***************
+*** 24,30 ****
+ static int VIsual_mode_orig = NUL; /* saved Visual mode */
+
+ static int restart_VIsual_select = 0;
+- #endif
+
+ #ifdef FEAT_EVAL
+ static void set_vcount_ca __ARGS((cmdarg_T *cap, int *set_prevcount));
+--- 23,28 ----
+***************
+*** 37,43 ****
+ static int find_command __ARGS((int cmdchar));
+ static void op_colon __ARGS((oparg_T *oap));
+ static void op_function __ARGS((oparg_T *oap));
+! #if defined(FEAT_MOUSE) && defined(FEAT_VISUAL)
+ static void find_start_of_word __ARGS((pos_T *));
+ static void find_end_of_word __ARGS((pos_T *));
+ static int get_mouse_class __ARGS((char_u *p));
+--- 35,41 ----
+ static int find_command __ARGS((int cmdchar));
+ static void op_colon __ARGS((oparg_T *oap));
+ static void op_function __ARGS((oparg_T *oap));
+! #if defined(FEAT_MOUSE)
+ static void find_start_of_word __ARGS((pos_T *));
+ static void find_end_of_word __ARGS((pos_T *));
+ static int get_mouse_class __ARGS((char_u *p));
+***************
+*** 48,56 ****
+ static int checkclearopq __ARGS((oparg_T *oap));
+ static void clearop __ARGS((oparg_T *oap));
+ static void clearopbeep __ARGS((oparg_T *oap));
+- #ifdef FEAT_VISUAL
+ static void unshift_special __ARGS((cmdarg_T *cap));
+- #endif
+ #ifdef FEAT_CMDL_INFO
+ static void del_from_showcmd __ARGS((int));
+ #endif
+--- 46,52 ----
+***************
+*** 117,141 ****
+ #ifdef FEAT_VREPLACE
+ static void nv_vreplace __ARGS((cmdarg_T *cap));
+ #endif
+- #ifdef FEAT_VISUAL
+ static void v_swap_corners __ARGS((int cmdchar));
+- #endif
+ static void nv_replace __ARGS((cmdarg_T *cap));
+ static void n_swapchar __ARGS((cmdarg_T *cap));
+ static void nv_cursormark __ARGS((cmdarg_T *cap, int flag, pos_T *pos));
+- #ifdef FEAT_VISUAL
+ static void v_visop __ARGS((cmdarg_T *cap));
+- #endif
+ static void nv_subst __ARGS((cmdarg_T *cap));
+ static void nv_abbrev __ARGS((cmdarg_T *cap));
+ static void nv_optrans __ARGS((cmdarg_T *cap));
+ static void nv_gomark __ARGS((cmdarg_T *cap));
+ static void nv_pcmark __ARGS((cmdarg_T *cap));
+ static void nv_regname __ARGS((cmdarg_T *cap));
+- #ifdef FEAT_VISUAL
+ static void nv_visual __ARGS((cmdarg_T *cap));
+ static void n_start_visual_mode __ARGS((int c));
+- #endif
+ static void nv_window __ARGS((cmdarg_T *cap));
+ static void nv_suspend __ARGS((cmdarg_T *cap));
+ static void nv_g_cmd __ARGS((cmdarg_T *cap));
+--- 113,131 ----
+***************
+*** 155,165 ****
+ static void nv_wordcmd __ARGS((cmdarg_T *cap));
+ static void nv_beginline __ARGS((cmdarg_T *cap));
+ static void adjust_cursor __ARGS((oparg_T *oap));
+- #ifdef FEAT_VISUAL
+ static void adjust_for_sel __ARGS((cmdarg_T *cap));
+ static int unadjust_for_sel __ARGS((void));
+ static void nv_select __ARGS((cmdarg_T *cap));
+- #endif
+ static void nv_goto __ARGS((cmdarg_T *cap));
+ static void nv_normal __ARGS((cmdarg_T *cap));
+ static void nv_esc __ARGS((cmdarg_T *oap));
+--- 145,153 ----
+***************
+*** 248,271 ****
+ {Ctrl_N, nv_down, NV_STS, FALSE},
+ {Ctrl_O, nv_ctrlo, 0, 0},
+ {Ctrl_P, nv_up, NV_STS, FALSE},
+- #ifdef FEAT_VISUAL
+ {Ctrl_Q, nv_visual, 0, FALSE},
+- #else
+- {Ctrl_Q, nv_ignore, 0, 0},
+- #endif
+ {Ctrl_R, nv_redo, 0, 0},
+ {Ctrl_S, nv_ignore, 0, 0},
+ {Ctrl_T, nv_tagpop, NV_NCW, 0},
+ {Ctrl_U, nv_halfpage, 0, 0},
+- #ifdef FEAT_VISUAL
+ {Ctrl_V, nv_visual, 0, FALSE},
+ {'V', nv_visual, 0, FALSE},
+ {'v', nv_visual, 0, FALSE},
+- #else
+- {Ctrl_V, nv_error, 0, 0},
+- {'V', nv_error, 0, 0},
+- {'v', nv_error, 0, 0},
+- #endif
+ {Ctrl_W, nv_window, 0, 0},
+ {Ctrl_X, nv_addsub, 0, 0},
+ {Ctrl_Y, nv_scroll_line, 0, FALSE},
+--- 236,249 ----
+***************
+*** 427,435 ****
+ {K_HELP, nv_help, NV_NCW, 0},
+ {K_F1, nv_help, NV_NCW, 0},
+ {K_XF1, nv_help, NV_NCW, 0},
+- #ifdef FEAT_VISUAL
+ {K_SELECT, nv_select, 0, 0},
+- #endif
+ #ifdef FEAT_GUI
+ {K_VER_SCROLLBAR, nv_ver_scrollbar, 0, 0},
+ {K_HOR_SCROLLBAR, nv_hor_scrollbar, 0, 0},
+--- 405,411 ----
+***************
+*** 579,589 ****
+ #ifdef FEAT_CMDL_INFO
+ int need_flushbuf; /* need to call out_flush() */
+ #endif
+- #ifdef FEAT_VISUAL
+ pos_T old_pos; /* cursor position before command */
+ int mapped_len;
+ static int old_mapped_len = 0;
+- #endif
+ int idx;
+ #ifdef FEAT_EVAL
+ int set_prevcount = FALSE;
+--- 555,563 ----
+***************
+*** 643,651 ****
+ }
+ #endif
+
+- #ifdef FEAT_VISUAL
+ mapped_len = typebuf_maplen();
+- #endif
+
+ State = NORMAL_BUSY;
+ #ifdef USE_ON_FLY_SCROLL
+--- 617,623 ----
+***************
+*** 666,672 ****
+ c = safe_vgetc();
+ LANGMAP_ADJUST(c, TRUE);
+
+- #ifdef FEAT_VISUAL
+ /*
+ * If a mapping was started in Visual or Select mode, remember the length
+ * of the mapping. This is used below to not return to Insert mode for as
+--- 638,643 ----
+***************
+*** 677,688 ****
+ else if (old_mapped_len
+ || (VIsual_active && mapped_len == 0 && typebuf_maplen() > 0))
+ old_mapped_len = typebuf_maplen();
+- #endif
+
+ if (c == NUL)
+ c = K_ZERO;
+
+- #ifdef FEAT_VISUAL
+ /*
+ * In Select mode, typed text replaces the selection.
+ */
+--- 648,657 ----
+***************
+*** 703,718 ****
+ msg_nowait = TRUE; /* don't delay going to insert mode */
+ old_mapped_len = 0; /* do go to Insert mode */
+ }
+- #endif
+
+ #ifdef FEAT_CMDL_INFO
+ need_flushbuf = add_to_showcmd(c);
+ #endif
+
+ getcount:
+- #ifdef FEAT_VISUAL
+ if (!(VIsual_active && VIsual_select))
+- #endif
+ {
+ /*
+ * Handle a count before a command and compute ca.count0.
+--- 672,684 ----
+***************
+*** 856,862 ****
+ goto normal_end;
+ #endif
+
+- #ifdef FEAT_VISUAL
+ /*
+ * In Visual/Select mode, a few keys are handled in a special way.
+ */
+--- 822,827 ----
+***************
+*** 892,898 ****
+ }
+ }
+ }
+- #endif
+
+ #ifdef FEAT_RIGHTLEFT
+ if (curwin->w_p_rl && KeyTyped && !KeyStuffed
+--- 857,862 ----
+***************
+*** 930,940 ****
+ && !Recording
+ && !Exec_reg)
+ || ((ca.cmdchar == 'a' || ca.cmdchar == 'i')
+! && (oap->op_type != OP_NOP
+! #ifdef FEAT_VISUAL
+! || VIsual_active
+! #endif
+! ))))
+ {
+ int *cp;
+ int repl = FALSE; /* get character for replace mode */
+--- 894,900 ----
+ && !Recording
+ && !Exec_reg)
+ || ((ca.cmdchar == 'a' || ca.cmdchar == 'i')
+! && (oap->op_type != OP_NOP || VIsual_active))))
+ {
+ int *cp;
+ int repl = FALSE; /* get character for replace mode */
+***************
+*** 1168,1174 ****
+ msg_col = 0;
+ }
+
+- #ifdef FEAT_VISUAL
+ old_pos = curwin->w_cursor; /* remember where cursor was */
+
+ /* When 'keymodel' contains "startsel" some keys start Select/Visual
+--- 1128,1133 ----
+***************
+*** 1188,1194 ****
+ mod_mask &= ~MOD_MASK_SHIFT;
+ }
+ }
+- #endif
+
+ /*
+ * Execute the command!
+--- 1147,1152 ----
+***************
+*** 1220,1231 ****
+ #endif
+ }
+
+- #ifdef FEAT_VISUAL
+ /* Get the length of mapped chars again after typing a count, second
+ * character or "z333<cr>". */
+ if (old_mapped_len > 0)
+ old_mapped_len = typebuf_maplen();
+- #endif
+
+ /*
+ * If an operation is pending, handle it...
+--- 1178,1187 ----
+***************
+*** 1247,1257 ****
+ if ( ((p_smd
+ && msg_silent == 0
+ && (restart_edit != 0
+- #ifdef FEAT_VISUAL
+ || (VIsual_active
+ && old_pos.lnum == curwin->w_cursor.lnum
+ && old_pos.col == curwin->w_cursor.col)
+- #endif
+ )
+ && (clear_cmdline
+ || redraw_cmdline)
+--- 1203,1211 ----
+***************
+*** 1259,1267 ****
+ && !msg_nowait
+ && KeyTyped)
+ || (restart_edit != 0
+- #ifdef FEAT_VISUAL
+ && !VIsual_active
+- #endif
+ && (msg_scroll
+ || emsg_on_display)))
+ && oap->regname == 0
+--- 1213,1219 ----
+***************
+*** 1368,1403 ****
+ * May switch from Visual to Select mode after CTRL-O command.
+ */
+ if ( oap->op_type == OP_NOP
+- #ifdef FEAT_VISUAL
+ && ((restart_edit != 0 && !VIsual_active && old_mapped_len == 0)
+ || restart_VIsual_select == 1)
+- #else
+- && restart_edit != 0
+- #endif
+ && !(ca.retval & CA_COMMAND_BUSY)
+ && stuff_empty()
+ && oap->regname == 0)
+ {
+- #ifdef FEAT_VISUAL
+ if (restart_VIsual_select == 1)
+ {
+ VIsual_select = TRUE;
+ showmode();
+ restart_VIsual_select = 0;
+ }
+! #endif
+! if (restart_edit != 0
+! #ifdef FEAT_VISUAL
+! && !VIsual_active && old_mapped_len == 0
+! #endif
+! )
+ (void)edit(restart_edit, FALSE, 1L);
+ }
+
+- #ifdef FEAT_VISUAL
+ if (restart_VIsual_select == 2)
+ restart_VIsual_select = 1;
+- #endif
+
+ /* Save count before an operator for next time. */
+ opcount = ca.opcount;
+--- 1320,1343 ----
+ * May switch from Visual to Select mode after CTRL-O command.
+ */
+ if ( oap->op_type == OP_NOP
+ && ((restart_edit != 0 && !VIsual_active && old_mapped_len == 0)
+ || restart_VIsual_select == 1)
+ && !(ca.retval & CA_COMMAND_BUSY)
+ && stuff_empty()
+ && oap->regname == 0)
+ {
+ if (restart_VIsual_select == 1)
+ {
+ VIsual_select = TRUE;
+ showmode();
+ restart_VIsual_select = 0;
+ }
+! if (restart_edit != 0 && !VIsual_active && old_mapped_len == 0)
+ (void)edit(restart_edit, FALSE, 1L);
+ }
+
+ if (restart_VIsual_select == 2)
+ restart_VIsual_select = 1;
+
+ /* Save count before an operator for next time. */
+ opcount = ca.opcount;
+***************
+*** 1437,1451 ****
+ int empty_region_error;
+ int restart_edit_save;
+
+- #ifdef FEAT_VISUAL
+ /* The visual area is remembered for redo */
+ static int redo_VIsual_mode = NUL; /* 'v', 'V', or Ctrl-V */
+ static linenr_T redo_VIsual_line_count; /* number of lines */
+ static colnr_T redo_VIsual_vcol; /* number of cols or end column */
+ static long redo_VIsual_count; /* count for Visual operator */
+! # ifdef FEAT_VIRTUALEDIT
+ int include_line_break = FALSE;
+- # endif
+ #endif
+
+ #if defined(FEAT_CLIPBOARD)
+--- 1377,1389 ----
+ int empty_region_error;
+ int restart_edit_save;
+
+ /* The visual area is remembered for redo */
+ static int redo_VIsual_mode = NUL; /* 'v', 'V', or Ctrl-V */
+ static linenr_T redo_VIsual_line_count; /* number of lines */
+ static colnr_T redo_VIsual_vcol; /* number of cols or end column */
+ static long redo_VIsual_count; /* count for Visual operator */
+! #ifdef FEAT_VIRTUALEDIT
+ int include_line_break = FALSE;
+ #endif
+
+ #if defined(FEAT_CLIPBOARD)
+***************
+*** 1459,1468 ****
+ if ((clip_star.available || clip_plus.available)
+ && oap->op_type != OP_NOP
+ && !gui_yank
+- # ifdef FEAT_VISUAL
+ && VIsual_active
+ && !redo_VIsual_busy
+- # endif
+ && oap->regname == 0)
+ clip_auto_select();
+ #endif
+--- 1397,1404 ----
+***************
+*** 1471,1483 ****
+ /*
+ * If an operation is pending, handle it...
+ */
+! if ((finish_op
+! #ifdef FEAT_VISUAL
+! || VIsual_active
+! #endif
+! ) && oap->op_type != OP_NOP)
+ {
+- #ifdef FEAT_VISUAL
+ oap->is_VIsual = VIsual_active;
+ if (oap->motion_force == 'V')
+ oap->motion_type = MLINE;
+--- 1407,1414 ----
+ /*
+ * If an operation is pending, handle it...
+ */
+! if ((finish_op || VIsual_active) && oap->op_type != OP_NOP)
+ {
+ oap->is_VIsual = VIsual_active;
+ if (oap->motion_force == 'V')
+ oap->motion_type = MLINE;
+***************
+*** 1501,1517 ****
+ VIsual_select = FALSE;
+ VIsual_reselect = FALSE;
+ }
+- #endif
+
+ /* Only redo yank when 'y' flag is in 'cpoptions'. */
+ /* Never redo "zf" (define fold). */
+ if ((vim_strchr(p_cpo, CPO_YANK) != NULL || oap->op_type != OP_YANK)
+- #ifdef FEAT_VISUAL
+ && ((!VIsual_active || oap->motion_force)
+ /* Also redo Operator-pending Visual mode mappings */
+ || (VIsual_active && cap->cmdchar == ':'
+ && oap->op_type != OP_COLON))
+- #endif
+ && cap->cmdchar != 'D'
+ #ifdef FEAT_FOLDING
+ && oap->op_type != OP_FOLD
+--- 1432,1445 ----
+***************
+*** 1554,1560 ****
+ }
+ }
+
+- #ifdef FEAT_VISUAL
+ if (redo_VIsual_busy)
+ {
+ /* Redo of an operation on a Visual area. Use the same size from
+--- 1482,1487 ----
+***************
+*** 1639,1645 ****
+ if (VIsual_mode == 'V')
+ oap->start.col = 0;
+ }
+- #endif /* FEAT_VISUAL */
+
+ /*
+ * Set oap->start to the first position of the operated text, oap->end
+--- 1566,1571 ----
+***************
+*** 1690,1696 ****
+ virtual_op = virtual_active();
+ #endif
+
+- #ifdef FEAT_VISUAL
+ if (VIsual_active || redo_VIsual_busy)
+ {
+ if (VIsual_mode == Ctrl_V) /* block mode */
+--- 1616,1621 ----
+***************
+*** 1826,1834 ****
+ {
+ oap->motion_type = MCHAR;
+ if (VIsual_mode != Ctrl_V && *ml_get_pos(&(oap->end)) == NUL
+! # ifdef FEAT_VIRTUALEDIT
+ && (include_line_break || !virtual_op)
+! # endif
+ )
+ {
+ oap->inclusive = FALSE;
+--- 1751,1759 ----
+ {
+ oap->motion_type = MCHAR;
+ if (VIsual_mode != Ctrl_V && *ml_get_pos(&(oap->end)) == NUL
+! #ifdef FEAT_VIRTUALEDIT
+ && (include_line_break || !virtual_op)
+! #endif
+ )
+ {
+ oap->inclusive = FALSE;
+***************
+*** 1840,1848 ****
+ {
+ ++oap->end.lnum;
+ oap->end.col = 0;
+! # ifdef FEAT_VIRTUALEDIT
+ oap->end.coladd = 0;
+! # endif
+ ++oap->line_count;
+ }
+ else
+--- 1765,1773 ----
+ {
+ ++oap->end.lnum;
+ oap->end.col = 0;
+! #ifdef FEAT_VIRTUALEDIT
+ oap->end.coladd = 0;
+! #endif
+ ++oap->line_count;
+ }
+ else
+***************
+*** 1868,1877 ****
+ if (!gui_yank)
+ {
+ VIsual_active = FALSE;
+! # ifdef FEAT_MOUSE
+ setmouse();
+ mouse_dragging = 0;
+! # endif
+ if (mode_displayed)
+ clear_cmdline = TRUE; /* unshow visual mode later */
+ #ifdef FEAT_CMDL_INFO
+--- 1793,1802 ----
+ if (!gui_yank)
+ {
+ VIsual_active = FALSE;
+! #ifdef FEAT_MOUSE
+ setmouse();
+ mouse_dragging = 0;
+! #endif
+ if (mode_displayed)
+ clear_cmdline = TRUE; /* unshow visual mode later */
+ #ifdef FEAT_CMDL_INFO
+***************
+*** 1886,1892 ****
+ redraw_curbuf_later(INVERTED);
+ }
+ }
+- #endif
+
+ #ifdef FEAT_MBYTE
+ /* Include the trailing byte of a multi-byte char. */
+--- 1811,1816 ----
+***************
+*** 1921,1936 ****
+ empty_region_error = (oap->empty
+ && vim_strchr(p_cpo, CPO_EMPTYREGION) != NULL);
+
+- #ifdef FEAT_VISUAL
+ /* Force a redraw when operating on an empty Visual region, when
+ * 'modifiable is off or creating a fold. */
+ if (oap->is_VIsual && (oap->empty || !curbuf->b_p_ma
+! # ifdef FEAT_FOLDING
+ || oap->op_type == OP_FOLD
+! # endif
+ ))
+ redraw_curbuf_later(INVERTED);
+- #endif
+
+ /*
+ * If the end of an operator is in column one while oap->motion_type
+--- 1845,1858 ----
+ empty_region_error = (oap->empty
+ && vim_strchr(p_cpo, CPO_EMPTYREGION) != NULL);
+
+ /* Force a redraw when operating on an empty Visual region, when
+ * 'modifiable is off or creating a fold. */
+ if (oap->is_VIsual && (oap->empty || !curbuf->b_p_ma
+! #ifdef FEAT_FOLDING
+ || oap->op_type == OP_FOLD
+! #endif
+ ))
+ redraw_curbuf_later(INVERTED);
+
+ /*
+ * If the end of an operator is in column one while oap->motion_type
+***************
+*** 1943,1952 ****
+ && oap->inclusive == FALSE
+ && !(cap->retval & CA_NO_ADJ_OP_END)
+ && oap->end.col == 0
+- #ifdef FEAT_VISUAL
+ && (!oap->is_VIsual || *p_sel == 'o')
+ && !oap->block_mode
+- #endif
+ && oap->line_count > 1)
+ {
+ oap->end_adjusted = TRUE; /* remember that we did this */
+--- 1865,1872 ----
+***************
+*** 1971,1981 ****
+ {
+ case OP_LSHIFT:
+ case OP_RSHIFT:
+! op_shift(oap, TRUE,
+! #ifdef FEAT_VISUAL
+! oap->is_VIsual ? (int)cap->count1 :
+! #endif
+! 1);
+ auto_format(FALSE, TRUE);
+ break;
+
+--- 1891,1897 ----
+ {
+ case OP_LSHIFT:
+ case OP_RSHIFT:
+! op_shift(oap, TRUE, oap->is_VIsual ? (int)cap->count1 : 1);
+ auto_format(FALSE, TRUE);
+ break;
+
+***************
+*** 1988,2002 ****
+ beep_flush();
+ else
+ {
+! (void)do_join(oap->line_count, oap->op_type == OP_JOIN, TRUE, TRUE);
+ auto_format(FALSE, TRUE);
+ }
+ break;
+
+ case OP_DELETE:
+- #ifdef FEAT_VISUAL
+ VIsual_reselect = FALSE; /* don't reselect now */
+- #endif
+ if (empty_region_error)
+ {
+ vim_beep();
+--- 1904,1917 ----
+ beep_flush();
+ else
+ {
+! (void)do_join(oap->line_count, oap->op_type == OP_JOIN,
+! TRUE, TRUE);
+ auto_format(FALSE, TRUE);
+ }
+ break;
+
+ case OP_DELETE:
+ VIsual_reselect = FALSE; /* don't reselect now */
+ if (empty_region_error)
+ {
+ vim_beep();
+***************
+*** 2026,2034 ****
+ break;
+
+ case OP_CHANGE:
+- #ifdef FEAT_VISUAL
+ VIsual_reselect = FALSE; /* don't reselect now */
+- #endif
+ if (empty_region_error)
+ {
+ vim_beep();
+--- 1941,1947 ----
+***************
+*** 2126,2134 ****
+
+ case OP_INSERT:
+ case OP_APPEND:
+- #ifdef FEAT_VISUAL
+ VIsual_reselect = FALSE; /* don't reselect now */
+- #endif
+ #ifdef FEAT_VISUALEXTRA
+ if (empty_region_error)
+ {
+--- 2039,2045 ----
+***************
+*** 2158,2166 ****
+ break;
+
+ case OP_REPLACE:
+- #ifdef FEAT_VISUAL
+ VIsual_reselect = FALSE; /* don't reselect now */
+- #endif
+ #ifdef FEAT_VISUALEXTRA
+ if (empty_region_error)
+ #endif
+--- 2069,2075 ----
+***************
+*** 2220,2228 ****
+ {
+ curwin->w_cursor = old_cursor;
+ }
+- #ifdef FEAT_VISUAL
+ oap->block_mode = FALSE;
+- #endif
+ clearop(oap);
+ }
+ }
+--- 2129,2135 ----
+***************
+*** 2235,2245 ****
+ oparg_T *oap;
+ {
+ stuffcharReadbuff(':');
+- #ifdef FEAT_VISUAL
+ if (oap->is_VIsual)
+ stuffReadbuff((char_u *)"'<,'>");
+ else
+- #endif
+ {
+ /*
+ * Make the range look nice, so it can be repeated.
+--- 2142,2150 ----
+***************
+*** 2404,2417 ****
+ pos_T save_cursor;
+ #endif
+ win_T *old_curwin = curwin;
+- #ifdef FEAT_VISUAL
+ static pos_T orig_cursor;
+ colnr_T leftcol, rightcol;
+ pos_T end_visual;
+ int diff;
+ int old_active = VIsual_active;
+ int old_mode = VIsual_mode;
+- #endif
+ int regname;
+
+ #if defined(FEAT_FOLDING)
+--- 2309,2320 ----
+***************
+*** 2432,2446 ****
+ if (!gui.in_use)
+ #endif
+ {
+- #ifdef FEAT_VISUAL
+ if (VIsual_active)
+ {
+ if (!mouse_has(MOUSE_VISUAL))
+ return FALSE;
+ }
+! else
+! #endif
+! if (State == NORMAL && !mouse_has(MOUSE_NORMAL))
+ return FALSE;
+ }
+
+--- 2335,2346 ----
+ if (!gui.in_use)
+ #endif
+ {
+ if (VIsual_active)
+ {
+ if (!mouse_has(MOUSE_VISUAL))
+ return FALSE;
+ }
+! else if (State == NORMAL && !mouse_has(MOUSE_NORMAL))
+ return FALSE;
+ }
+
+***************
+*** 2509,2522 ****
+ }
+ }
+
+- #ifndef FEAT_VISUAL
+- /*
+- * ALT is only used for starting/extending Visual mode.
+- */
+- if ((mod_mask & MOD_MASK_ALT))
+- return FALSE;
+- #endif
+-
+ /*
+ * CTRL right mouse button does CTRL-T
+ */
+--- 2409,2414 ----
+***************
+*** 2586,2592 ****
+ return FALSE;
+ }
+
+- #ifdef FEAT_VISUAL
+ /*
+ * If visual was active, yank the highlighted text and put it
+ * before the mouse pointer position.
+--- 2478,2483 ----
+***************
+*** 2607,2613 ****
+ do_always = TRUE; /* ignore 'mouse' setting next time */
+ return FALSE;
+ }
+- #endif
+ /*
+ * The rest is below jump_to_mouse()
+ */
+--- 2498,2503 ----
+***************
+*** 2761,2767 ****
+ {
+ /* First set the cursor position before showing the popup
+ * menu. */
+- #ifdef FEAT_VISUAL
+ if (VIsual_active)
+ {
+ pos_T m_pos;
+--- 2651,2656 ----
+***************
+*** 2800,2815 ****
+ }
+ else
+ jump_flags = MOUSE_MAY_STOP_VIS;
+- #endif
+ }
+ if (jump_flags)
+ {
+ jump_flags = jump_to_mouse(jump_flags, NULL, which_button);
+! update_curbuf(
+! #ifdef FEAT_VISUAL
+! VIsual_active ? INVERTED :
+! #endif
+! VALID);
+ setcursor();
+ out_flush(); /* Update before showing popup menu */
+ }
+--- 2689,2699 ----
+ }
+ else
+ jump_flags = MOUSE_MAY_STOP_VIS;
+ }
+ if (jump_flags)
+ {
+ jump_flags = jump_to_mouse(jump_flags, NULL, which_button);
+! update_curbuf(VIsual_active ? INVERTED : VALID);
+ setcursor();
+ out_flush(); /* Update before showing popup menu */
+ }
+***************
+*** 2832,2838 ****
+ }
+ }
+
+- #ifdef FEAT_VISUAL
+ if ((State & (NORMAL | INSERT))
+ && !(mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL)))
+ {
+--- 2716,2721 ----
+***************
+*** 2872,2878 ****
+ jump_flags |= MOUSE_MAY_VIS;
+ }
+ }
+- #endif
+
+ /*
+ * If an operator is pending, ignore all drags and releases until the
+--- 2755,2760 ----
+***************
+*** 2941,2947 ****
+ }
+ #endif
+
+- #ifdef FEAT_VISUAL
+ /* Set global flag that we are extending the Visual area with mouse
+ * dragging; temporarily minimize 'scrolloff'. */
+ if (VIsual_active && is_drag && p_so)
+--- 2823,2828 ----
+***************
+*** 3040,3046 ****
+ */
+ else if ((State & INSERT) && VIsual_active)
+ stuffcharReadbuff(Ctrl_O);
+- #endif
+
+ /*
+ * Middle mouse click: Put text before cursor.
+--- 2921,2926 ----
+***************
+*** 3118,3128 ****
+ */
+ else if ((mod_mask & MOD_MASK_SHIFT))
+ {
+! if (State & INSERT
+! #ifdef FEAT_VISUAL
+! || (VIsual_active && VIsual_select)
+! #endif
+! )
+ stuffcharReadbuff(Ctrl_O);
+ if (which_button == MOUSE_LEFT)
+ stuffcharReadbuff('*');
+--- 2998,3004 ----
+ */
+ else if ((mod_mask & MOD_MASK_SHIFT))
+ {
+! if ((State & INSERT) || (VIsual_active && VIsual_select))
+ stuffcharReadbuff(Ctrl_O);
+ if (which_button == MOUSE_LEFT)
+ stuffcharReadbuff('*');
+***************
+*** 3153,3159 ****
+ # endif
+ }
+ #endif
+- #ifdef FEAT_VISUAL
+ else if ((mod_mask & MOD_MASK_MULTI_CLICK) && (State & (NORMAL | INSERT))
+ && mouse_has(MOUSE_VISUAL))
+ {
+--- 3029,3034 ----
+***************
+*** 3267,3278 ****
+ || (VIsual_active && p_smd && msg_silent == 0
+ && (!old_active || VIsual_mode != old_mode)))
+ redraw_cmdline = TRUE;
+- #endif
+
+ return moved;
+ }
+
+- #ifdef FEAT_VISUAL
+ /*
+ * Move "pos" back to the start of the word it's in.
+ */
+--- 3142,3151 ----
+***************
+*** 3372,3381 ****
+ return 1;
+ return c;
+ }
+- #endif /* FEAT_VISUAL */
+ #endif /* FEAT_MOUSE */
+
+- #if defined(FEAT_VISUAL) || defined(PROTO)
+ /*
+ * Check if highlighting for visual mode is possible, give a warning message
+ * if not.
+--- 3245,3252 ----
+***************
+*** 3468,3474 ****
+ VIsual_reselect = FALSE;
+ }
+ }
+- #endif /* FEAT_VISUAL */
+
+ #if defined(FEAT_BEVAL)
+ static int find_is_eval_item __ARGS((char_u *ptr, int *colp, int *nbp, int dir));
+--- 3339,3344 ----
+***************
+*** 3802,3812 ****
+ checkclearopq(oap)
+ oparg_T *oap;
+ {
+! if (oap->op_type == OP_NOP
+! #ifdef FEAT_VISUAL
+! && !VIsual_active
+! #endif
+! )
+ return FALSE;
+ clearopbeep(oap);
+ return TRUE;
+--- 3672,3678 ----
+ checkclearopq(oap)
+ oparg_T *oap;
+ {
+! if (oap->op_type == OP_NOP && !VIsual_active)
+ return FALSE;
+ clearopbeep(oap);
+ return TRUE;
+***************
+*** 3830,3836 ****
+ beep_flush();
+ }
+
+- #ifdef FEAT_VISUAL
+ /*
+ * Remove the shift modifier from a special key.
+ */
+--- 3696,3701 ----
+***************
+*** 3849,3866 ****
+ }
+ cap->cmdchar = simplify_key(cap->cmdchar, &mod_mask);
+ }
+- #endif
+
+ #if defined(FEAT_CMDL_INFO) || defined(PROTO)
+ /*
+ * Routines for displaying a partly typed command
+ */
+
+! #ifdef FEAT_VISUAL /* need room for size of Visual area */
+! # define SHOWCMD_BUFLEN SHOWCMD_COLS + 1 + 30
+! #else
+! # define SHOWCMD_BUFLEN SHOWCMD_COLS + 1
+! #endif
+ static char_u showcmd_buf[SHOWCMD_BUFLEN];
+ static char_u old_showcmd_buf[SHOWCMD_BUFLEN]; /* For push_showcmd() */
+ static int showcmd_is_clear = TRUE;
+--- 3714,3726 ----
+ }
+ cap->cmdchar = simplify_key(cap->cmdchar, &mod_mask);
+ }
+
+ #if defined(FEAT_CMDL_INFO) || defined(PROTO)
+ /*
+ * Routines for displaying a partly typed command
+ */
+
+! #define SHOWCMD_BUFLEN SHOWCMD_COLS + 1 + 30
+ static char_u showcmd_buf[SHOWCMD_BUFLEN];
+ static char_u old_showcmd_buf[SHOWCMD_BUFLEN]; /* For push_showcmd() */
+ static int showcmd_is_clear = TRUE;
+***************
+*** 3874,3880 ****
+ if (!p_sc)
+ return;
+
+- #ifdef FEAT_VISUAL
+ if (VIsual_active && !char_avail())
+ {
+ int cursor_bot = lt(VIsual, curwin->w_cursor);
+--- 3734,3739 ----
+***************
+*** 3960,3966 ****
+ showcmd_visual = TRUE;
+ }
+ else
+- #endif
+ {
+ showcmd_buf[0] = NUL;
+ showcmd_visual = FALSE;
+--- 3819,3824 ----
+***************
+*** 4203,4212 ****
+ int want_hor;
+ win_T *old_curwin = curwin;
+ buf_T *old_curbuf = curbuf;
+- #ifdef FEAT_VISUAL
+ int old_VIsual_select = VIsual_select;
+ int old_VIsual_active = VIsual_active;
+- #endif
+ colnr_T tgt_leftcol = curwin->w_leftcol;
+ long topline;
+ long y;
+--- 4061,4068 ----
+***************
+*** 4223,4231 ****
+ /*
+ * loop through the scrollbound windows and scroll accordingly
+ */
+- #ifdef FEAT_VISUAL
+ VIsual_select = VIsual_active = 0;
+- #endif
+ for (curwin = firstwin; curwin; curwin = curwin->w_next)
+ {
+ curbuf = curwin->w_buffer;
+--- 4079,4085 ----
+***************
+*** 4280,4289 ****
+ /*
+ * reset current-window
+ */
+- #ifdef FEAT_VISUAL
+ VIsual_select = old_VIsual_select;
+ VIsual_active = old_VIsual_active;
+- #endif
+ curwin = old_curwin;
+ curbuf = old_curbuf;
+ }
+--- 4134,4141 ----
+***************
+*** 5239,5249 ****
+
+ if (checkclearop(cap->oap))
+ break;
+- # ifdef FEAT_VISUAL
+ if (VIsual_active && get_visual_text(cap, &ptr, &len)
+ == FAIL)
+ return;
+- # endif
+ if (ptr == NULL)
+ {
+ pos_T pos = curwin->w_cursor;
+--- 5091,5099 ----
+***************
+*** 5411,5422 ****
+ /*
+ * Ignore 'Q' in Visual mode, just give a beep.
+ */
+- #ifdef FEAT_VISUAL
+ if (VIsual_active)
+ vim_beep();
+! else
+! #endif
+! if (!checkclearop(cap->oap))
+ do_exmode(FALSE);
+ }
+
+--- 5261,5269 ----
+ /*
+ * Ignore 'Q' in Visual mode, just give a beep.
+ */
+ if (VIsual_active)
+ vim_beep();
+! else if (!checkclearop(cap->oap))
+ do_exmode(FALSE);
+ }
+
+***************
+*** 5430,5440 ****
+ int old_p_im;
+ int cmd_result;
+
+- #ifdef FEAT_VISUAL
+ if (VIsual_active)
+ nv_operator(cap);
+ else
+- #endif
+ {
+ if (cap->oap->op_type != OP_NOP)
+ {
+--- 5277,5285 ----
+***************
+*** 5494,5508 ****
+ nv_ctrlg(cap)
+ cmdarg_T *cap;
+ {
+- #ifdef FEAT_VISUAL
+ if (VIsual_active) /* toggle Selection/Visual mode */
+ {
+ VIsual_select = !VIsual_select;
+ showmode();
+ }
+! else
+! #endif
+! if (!checkclearop(cap->oap))
+ /* print full name if count given or :cd used */
+ fileinfo((int)cap->count0, FALSE, TRUE);
+ }
+--- 5339,5350 ----
+ nv_ctrlg(cap)
+ cmdarg_T *cap;
+ {
+ if (VIsual_active) /* toggle Selection/Visual mode */
+ {
+ VIsual_select = !VIsual_select;
+ showmode();
+ }
+! else if (!checkclearop(cap->oap))
+ /* print full name if count given or :cd used */
+ fileinfo((int)cap->count0, FALSE, TRUE);
+ }
+***************
+*** 5514,5527 ****
+ nv_ctrlh(cap)
+ cmdarg_T *cap;
+ {
+- #ifdef FEAT_VISUAL
+ if (VIsual_active && VIsual_select)
+ {
+ cap->cmdchar = 'x'; /* BS key behaves like 'x' in Select mode */
+ v_visop(cap);
+ }
+ else
+- #endif
+ nv_left(cap);
+ }
+
+--- 5356,5367 ----
+***************
+*** 5558,5564 ****
+ nv_ctrlo(cap)
+ cmdarg_T *cap;
+ {
+- #ifdef FEAT_VISUAL
+ if (VIsual_active && VIsual_select)
+ {
+ VIsual_select = FALSE;
+--- 5398,5403 ----
+***************
+*** 5566,5572 ****
+ restart_VIsual_select = 2; /* restart Select mode later */
+ }
+ else
+- #endif
+ {
+ cap->count1 = -cap->count1;
+ nv_pcmark(cap);
+--- 5405,5410 ----
+***************
+*** 5675,5684 ****
+ */
+ if (cmdchar == ']' || cmdchar == Ctrl_RSB || cmdchar == 'K')
+ {
+- #ifdef FEAT_VISUAL
+ if (VIsual_active && get_visual_text(cap, &ptr, &n) == FAIL)
+ return;
+- #endif
+ if (checkclearopq(cap->oap))
+ return;
+ }
+--- 5513,5520 ----
+***************
+*** 5872,5878 ****
+ vim_free(buf);
+ }
+
+- #if defined(FEAT_VISUAL) || defined(PROTO)
+ /*
+ * Get visually selected text, within one line only.
+ * Returns FAIL if more than one line selected.
+--- 5708,5713 ----
+***************
+*** 5917,5923 ****
+ reset_VIsual_and_resel();
+ return OK;
+ }
+- #endif
+
+ /*
+ * CTRL-T: backwards in tag stack
+--- 5752,5757 ----
+***************
+*** 6040,6050 ****
+ cmdarg_T *cap;
+ {
+ long n;
+! #ifdef FEAT_VISUAL
+! int PAST_LINE;
+! #else
+! # define PAST_LINE 0
+! #endif
+
+ if (mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL))
+ {
+--- 5874,5880 ----
+ cmdarg_T *cap;
+ {
+ long n;
+! int past_line;
+
+ if (mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL))
+ {
+***************
+*** 6057,6081 ****
+
+ cap->oap->motion_type = MCHAR;
+ cap->oap->inclusive = FALSE;
+! #ifdef FEAT_VISUAL
+! PAST_LINE = (VIsual_active && *p_sel != 'o');
+
+! # ifdef FEAT_VIRTUALEDIT
+ /*
+! * In virtual mode, there's no such thing as "PAST_LINE", as lines are
+! * (theoretically) infinitely long.
+ */
+ if (virtual_active())
+! PAST_LINE = 0;
+! # endif
+ #endif
+
+ for (n = cap->count1; n > 0; --n)
+ {
+! if ((!PAST_LINE && oneright() == FAIL)
+! #ifdef FEAT_VISUAL
+! || (PAST_LINE && *ml_get_cursor() == NUL)
+! #endif
+ )
+ {
+ /*
+--- 5887,5907 ----
+
+ cap->oap->motion_type = MCHAR;
+ cap->oap->inclusive = FALSE;
+! past_line = (VIsual_active && *p_sel != 'o');
+
+! #ifdef FEAT_VIRTUALEDIT
+ /*
+! * In virtual edit mode, there's no such thing as "past_line", as lines
+! * are (theoretically) infinitely long.
+ */
+ if (virtual_active())
+! past_line = 0;
+ #endif
+
+ for (n = cap->count1; n > 0; --n)
+ {
+! if ((!past_line && oneright() == FAIL)
+! || (past_line && *ml_get_cursor() == NUL)
+ )
+ {
+ /*
+***************
+*** 6123,6148 ****
+ }
+ break;
+ }
+! #ifdef FEAT_VISUAL
+! else if (PAST_LINE)
+ {
+ curwin->w_set_curswant = TRUE;
+! # ifdef FEAT_VIRTUALEDIT
+ if (virtual_active())
+ oneright();
+ else
+! # endif
+ {
+! # ifdef FEAT_MBYTE
+ if (has_mbyte)
+ curwin->w_cursor.col +=
+ (*mb_ptr2len)(ml_get_cursor());
+ else
+! # endif
+ ++curwin->w_cursor.col;
+ }
+ }
+- #endif
+ }
+ #ifdef FEAT_FOLDING
+ if (n != cap->count1 && (fdo_flags & FDO_HOR) && KeyTyped
+--- 5949,5972 ----
+ }
+ break;
+ }
+! else if (past_line)
+ {
+ curwin->w_set_curswant = TRUE;
+! #ifdef FEAT_VIRTUALEDIT
+ if (virtual_active())
+ oneright();
+ else
+! #endif
+ {
+! #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ curwin->w_cursor.col +=
+ (*mb_ptr2len)(ml_get_cursor());
+ else
+! #endif
+ ++curwin->w_cursor.col;
+ }
+ }
+ }
+ #ifdef FEAT_FOLDING
+ if (n != cap->count1 && (fdo_flags & FDO_HOR) && KeyTyped
+***************
+*** 6503,6511 ****
+ else
+ curwin->w_cursor.coladd = 0;
+ #endif
+- #ifdef FEAT_VISUAL
+ adjust_for_sel(cap);
+- #endif
+ #ifdef FEAT_FOLDING
+ if ((fdo_flags & FDO_HOR) && KeyTyped && cap->oap->op_type == OP_NOP)
+ foldOpenCursor();
+--- 6327,6333 ----
+***************
+*** 6754,6760 ****
+ int dir = (cap->cmdchar == ']' && cap->nchar == 'p')
+ ? FORWARD : BACKWARD;
+ int regname = cap->oap->regname;
+- #ifdef FEAT_VISUAL
+ int was_visual = VIsual_active;
+ int line_count = curbuf->b_ml.ml_line_count;
+ pos_T start, end;
+--- 6576,6581 ----
+***************
+*** 6766,6779 ****
+ end = equalpos(start,VIsual) ? curwin->w_cursor : VIsual;
+ curwin->w_cursor = (dir == BACKWARD ? start : end);
+ }
+- #endif
+ # ifdef FEAT_CLIPBOARD
+ adjust_clip_reg(&regname);
+ # endif
+ prep_redo_cmd(cap);
+
+ do_put(regname, dir, cap->count1, PUT_FIXINDENT);
+- #ifdef FEAT_VISUAL
+ if (was_visual)
+ {
+ VIsual = start;
+--- 6587,6598 ----
+***************
+*** 6802,6808 ****
+ redraw_later(SOME_VALID);
+ }
+ }
+- #endif
+ }
+ }
+
+--- 6621,6626 ----
+***************
+*** 6936,6944 ****
+ #ifdef FEAT_VIRTUALEDIT
+ curwin->w_cursor.coladd = 0;
+ #endif
+- #ifdef FEAT_VISUAL
+ adjust_for_sel(cap);
+- #endif
+ }
+ }
+ #ifdef FEAT_FOLDING
+--- 6754,6760 ----
+***************
+*** 7027,7037 ****
+ nv_undo(cap)
+ cmdarg_T *cap;
+ {
+! if (cap->oap->op_type == OP_LOWER
+! #ifdef FEAT_VISUAL
+! || VIsual_active
+! #endif
+! )
+ {
+ /* translate "<Visual>u" to "<Visual>gu" and "guu" to "gugu" */
+ cap->cmdchar = 'g';
+--- 6843,6849 ----
+ nv_undo(cap)
+ cmdarg_T *cap;
+ {
+! if (cap->oap->op_type == OP_LOWER || VIsual_active)
+ {
+ /* translate "<Visual>u" to "<Visual>gu" and "guu" to "gugu" */
+ cap->cmdchar = 'g';
+***************
+*** 7089,7095 ****
+ return;
+ }
+
+- #ifdef FEAT_VISUAL
+ /* Visual mode "r" */
+ if (VIsual_active)
+ {
+--- 6901,6906 ----
+***************
+*** 7105,7111 ****
+ nv_operator(cap);
+ return;
+ }
+- #endif
+
+ #ifdef FEAT_VIRTUALEDIT
+ /* Break tabs, etc. */
+--- 6916,6921 ----
+***************
+*** 7273,7279 ****
+ }
+ }
+
+- #ifdef FEAT_VISUAL
+ /*
+ * 'o': Exchange start and end of Visual area.
+ * 'O': same, but in block mode exchange left and right corners.
+--- 7083,7088 ----
+***************
+*** 7326,7332 ****
+ curwin->w_set_curswant = TRUE;
+ }
+ }
+- #endif /* FEAT_VISUAL */
+
+ /*
+ * "R" (cap->arg is FALSE) and "gR" (cap->arg is TRUE).
+--- 7135,7140 ----
+***************
+*** 7335,7341 ****
+ nv_Replace(cap)
+ cmdarg_T *cap;
+ {
+- #ifdef FEAT_VISUAL
+ if (VIsual_active) /* "R" is replace lines */
+ {
+ cap->cmdchar = 'c';
+--- 7143,7148 ----
+***************
+*** 7344,7352 ****
+ VIsual_mode = 'V';
+ nv_operator(cap);
+ }
+! else
+! #endif
+! if (!checkclearopq(cap->oap))
+ {
+ if (!curbuf->b_p_ma)
+ EMSG(_(e_modifiable));
+--- 7151,7157 ----
+ VIsual_mode = 'V';
+ nv_operator(cap);
+ }
+! else if (!checkclearopq(cap->oap))
+ {
+ if (!curbuf->b_p_ma)
+ EMSG(_(e_modifiable));
+***************
+*** 7369,7384 ****
+ nv_vreplace(cap)
+ cmdarg_T *cap;
+ {
+- # ifdef FEAT_VISUAL
+ if (VIsual_active)
+ {
+ cap->cmdchar = 'r';
+ cap->nchar = cap->extra_char;
+ nv_replace(cap); /* Do same as "r" in Visual mode for now */
+ }
+! else
+! # endif
+! if (!checkclearopq(cap->oap))
+ {
+ if (!curbuf->b_p_ma)
+ EMSG(_(e_modifiable));
+--- 7174,7186 ----
+ nv_vreplace(cap)
+ cmdarg_T *cap;
+ {
+ if (VIsual_active)
+ {
+ cap->cmdchar = 'r';
+ cap->nchar = cap->extra_char;
+ nv_replace(cap); /* Do same as "r" in Visual mode for now */
+ }
+! else if (!checkclearopq(cap->oap))
+ {
+ if (!curbuf->b_p_ma)
+ EMSG(_(e_modifiable));
+***************
+*** 7525,7531 ****
+ curwin->w_set_curswant = TRUE;
+ }
+
+- #ifdef FEAT_VISUAL
+ /*
+ * Handle commands that are operators in Visual mode.
+ */
+--- 7327,7332 ----
+***************
+*** 7550,7556 ****
+ cap->cmdchar = *(vim_strchr(trans, cap->cmdchar) + 1);
+ nv_operator(cap);
+ }
+- #endif
+
+ /*
+ * "s" and "S" commands.
+--- 7351,7356 ----
+***************
+*** 7559,7565 ****
+ nv_subst(cap)
+ cmdarg_T *cap;
+ {
+- #ifdef FEAT_VISUAL
+ if (VIsual_active) /* "vs" and "vS" are the same as "vc" */
+ {
+ if (cap->cmdchar == 'S')
+--- 7359,7364 ----
+***************
+*** 7571,7577 ****
+ nv_operator(cap);
+ }
+ else
+- #endif
+ nv_optrans(cap);
+ }
+
+--- 7370,7375 ----
+***************
+*** 7585,7596 ****
+ if (cap->cmdchar == K_DEL || cap->cmdchar == K_KDEL)
+ cap->cmdchar = 'x'; /* DEL key behaves like 'x' */
+
+- #ifdef FEAT_VISUAL
+ /* in Visual mode these commands are operators */
+ if (VIsual_active)
+ v_visop(cap);
+ else
+- #endif
+ nv_optrans(cap);
+ }
+
+--- 7383,7392 ----
+***************
+*** 7758,7764 ****
+ clearopbeep(cap->oap);
+ }
+
+- #ifdef FEAT_VISUAL
+ /*
+ * Handle "v", "V" and "CTRL-V" commands.
+ * Also for "gh", "gH" and "g^H" commands: Always start Select mode, cap->arg
+--- 7554,7559 ----
+***************
+*** 7950,7956 ****
+ }
+ }
+
+- #endif /* FEAT_VISUAL */
+
+ /*
+ * CTRL-W: Window commands
+--- 7745,7750 ----
+***************
+*** 7975,7984 ****
+ cmdarg_T *cap;
+ {
+ clearop(cap->oap);
+- #ifdef FEAT_VISUAL
+ if (VIsual_active)
+ end_visual_mode(); /* stop Visual mode */
+- #endif
+ do_cmdline_cmd((char_u *)"st");
+ }
+
+--- 7769,7776 ----
+***************
+*** 7990,7998 ****
+ cmdarg_T *cap;
+ {
+ oparg_T *oap = cap->oap;
+- #ifdef FEAT_VISUAL
+ pos_T tpos;
+- #endif
+ int i;
+ int flag = FALSE;
+
+--- 7782,7788 ----
+***************
+*** 8025,8031 ****
+ do_cmdline_cmd((char_u *)"%s//~/&");
+ break;
+
+- #ifdef FEAT_VISUAL
+ /*
+ * "gv": Reselect the previous Visual area. If Visual already active,
+ * exchange previous and current Visual area.
+--- 7815,7820 ----
+***************
+*** 8126,8132 ****
+ cap->arg = TRUE;
+ nv_visual(cap);
+ break;
+- #endif /* FEAT_VISUAL */
+
+ /* "gn", "gN" visually select next/previous search match
+ * "gn" selects next match
+--- 7915,7920 ----
+***************
+*** 8134,8142 ****
+ */
+ case 'N':
+ case 'n':
+- #ifdef FEAT_VISUAL
+ if (!current_search(cap->count1, cap->nchar == 'n'))
+- #endif
+ clearopbeep(oap);
+ break;
+
+--- 7922,7928 ----
+***************
+*** 8258,8266 ****
+ && vim_iswhite(ptr[curwin->w_cursor.col]))
+ --curwin->w_cursor.col;
+ curwin->w_set_curswant = TRUE;
+- #ifdef FEAT_VISUAL
+ adjust_for_sel(cap);
+- #endif
+ }
+ break;
+
+--- 8044,8050 ----
+***************
+*** 8657,8667 ****
+ cmdarg_T *cap;
+ {
+ /* In Visual mode and typing "gUU" triggers an operator */
+! if (cap->oap->op_type == OP_UPPER
+! #ifdef FEAT_VISUAL
+! || VIsual_active
+! #endif
+! )
+ {
+ /* translate "gUU" to "gUgU" */
+ cap->cmdchar = 'g';
+--- 8441,8447 ----
+ cmdarg_T *cap;
+ {
+ /* In Visual mode and typing "gUU" triggers an operator */
+! if (cap->oap->op_type == OP_UPPER || VIsual_active)
+ {
+ /* translate "gUU" to "gUgU" */
+ cap->cmdchar = 'g';
+***************
+*** 8683,8693 ****
+ nv_tilde(cap)
+ cmdarg_T *cap;
+ {
+! if (!p_to
+! #ifdef FEAT_VISUAL
+! && !VIsual_active
+! #endif
+! && cap->oap->op_type != OP_TILDE)
+ n_swapchar(cap);
+ else
+ nv_operator(cap);
+--- 8463,8469 ----
+ nv_tilde(cap)
+ cmdarg_T *cap;
+ {
+! if (!p_to && !VIsual_active && cap->oap->op_type != OP_TILDE)
+ n_swapchar(cap);
+ else
+ nv_operator(cap);
+***************
+*** 8906,8914 ****
+ clearopbeep(cap->oap);
+ else
+ {
+- #ifdef FEAT_VISUAL
+ adjust_for_sel(cap);
+- #endif
+ #ifdef FEAT_FOLDING
+ if ((fdo_flags & FDO_HOR) && KeyTyped && cap->oap->op_type == OP_NOP)
+ foldOpenCursor();
+--- 8682,8688 ----
+***************
+*** 8931,8939 ****
+ * - 'virtualedit' is not "all" and not "onemore".
+ */
+ if (curwin->w_cursor.col > 0 && gchar_cursor() == NUL
+- #ifdef FEAT_VISUAL
+ && (!VIsual_active || *p_sel == 'o')
+- #endif
+ #ifdef FEAT_VIRTUALEDIT
+ && !virtual_active() && (ve_flags & VE_ONEMORE) == 0
+ #endif
+--- 8705,8711 ----
+***************
+*** 8968,8974 ****
+ one-character line). */
+ }
+
+- #ifdef FEAT_VISUAL
+ /*
+ * In exclusive Visual mode, may include the last character.
+ */
+--- 8740,8745 ----
+***************
+*** 8979,8989 ****
+ if (VIsual_active && cap->oap->inclusive && *p_sel == 'e'
+ && gchar_cursor() != NUL && lt(VIsual, curwin->w_cursor))
+ {
+! # ifdef FEAT_MBYTE
+ if (has_mbyte)
+ inc_cursor();
+ else
+! # endif
+ ++curwin->w_cursor.col;
+ cap->oap->inclusive = FALSE;
+ }
+--- 8750,8760 ----
+ if (VIsual_active && cap->oap->inclusive && *p_sel == 'e'
+ && gchar_cursor() != NUL && lt(VIsual, curwin->w_cursor))
+ {
+! #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ inc_cursor();
+ else
+! #endif
+ ++curwin->w_cursor.col;
+ cap->oap->inclusive = FALSE;
+ }
+***************
+*** 9044,9050 ****
+ }
+ }
+
+- #endif
+
+ /*
+ * "G", "gg", CTRL-END, CTRL-HOME.
+--- 8815,8820 ----
+***************
+*** 9095,9107 ****
+ if (cmdwin_type != 0)
+ cmdwin_result = Ctrl_C;
+ #endif
+- #ifdef FEAT_VISUAL
+ if (VIsual_active)
+ {
+ end_visual_mode(); /* stop Visual */
+ redraw_curbuf_later(INVERTED);
+ }
+- #endif
+ /* CTRL-\ CTRL-G restarts Insert mode when 'insertmode' is set. */
+ if (cap->nchar == Ctrl_G && p_im)
+ restart_edit = 'a';
+--- 8865,8875 ----
+***************
+*** 9132,9140 ****
+ #ifdef FEAT_CMDWIN
+ && cmdwin_type == 0
+ #endif
+- #ifdef FEAT_VISUAL
+ && !VIsual_active
+- #endif
+ && no_reason)
+ MSG(_("Type :quit<Enter> to exit Vim"));
+
+--- 8900,8906 ----
+***************
+*** 9152,9158 ****
+ #endif
+ }
+
+- #ifdef FEAT_VISUAL
+ if (VIsual_active)
+ {
+ end_visual_mode(); /* stop Visual */
+--- 8918,8923 ----
+***************
+*** 9160,9169 ****
+ curwin->w_set_curswant = TRUE;
+ redraw_curbuf_later(INVERTED);
+ }
+! else
+! #endif
+! if (no_reason)
+! vim_beep();
+ clearop(cap->oap);
+
+ /* A CTRL-C is often used at the start of a menu. When 'insertmode' is
+--- 8925,8932 ----
+ curwin->w_set_curswant = TRUE;
+ redraw_curbuf_later(INVERTED);
+ }
+! else if (no_reason)
+! vim_beep();
+ clearop(cap->oap);
+
+ /* A CTRL-C is often used at the start of a menu. When 'insertmode' is
+***************
+*** 9187,9206 ****
+ if (cap->cmdchar == K_INS || cap->cmdchar == K_KINS)
+ cap->cmdchar = 'i';
+
+- #ifdef FEAT_VISUAL
+ /* in Visual mode "A" and "I" are an operator */
+ if (VIsual_active && (cap->cmdchar == 'A' || cap->cmdchar == 'I'))
+ v_visop(cap);
+
+ /* in Visual mode and after an operator "a" and "i" are for text objects */
+! else
+! #endif
+! if ((cap->cmdchar == 'a' || cap->cmdchar == 'i')
+! && (cap->oap->op_type != OP_NOP
+! #ifdef FEAT_VISUAL
+! || VIsual_active
+! #endif
+! ))
+ {
+ #ifdef FEAT_TEXTOBJ
+ nv_object(cap);
+--- 8950,8962 ----
+ if (cap->cmdchar == K_INS || cap->cmdchar == K_KINS)
+ cap->cmdchar = 'i';
+
+ /* in Visual mode "A" and "I" are an operator */
+ if (VIsual_active && (cap->cmdchar == 'A' || cap->cmdchar == 'I'))
+ v_visop(cap);
+
+ /* in Visual mode and after an operator "a" and "i" are for text objects */
+! else if ((cap->cmdchar == 'a' || cap->cmdchar == 'i')
+! && (cap->oap->op_type != OP_NOP || VIsual_active))
+ {
+ #ifdef FEAT_TEXTOBJ
+ nv_object(cap);
+***************
+*** 9467,9478 ****
+ nv_join(cap)
+ cmdarg_T *cap;
+ {
+- #ifdef FEAT_VISUAL
+ if (VIsual_active) /* join the visual lines */
+ nv_operator(cap);
+! else
+! #endif
+! if (!checkclearop(cap->oap))
+ {
+ if (cap->count0 <= 1)
+ cap->count0 = 2; /* default for join is two lines! */
+--- 9223,9231 ----
+ nv_join(cap)
+ cmdarg_T *cap;
+ {
+ if (VIsual_active) /* join the visual lines */
+ nv_operator(cap);
+! else if (!checkclearop(cap->oap))
+ {
+ if (cap->count0 <= 1)
+ cap->count0 = 2; /* default for join is two lines! */
+***************
+*** 9495,9506 ****
+ nv_put(cap)
+ cmdarg_T *cap;
+ {
+- #ifdef FEAT_VISUAL
+ int regname = 0;
+ void *reg1 = NULL, *reg2 = NULL;
+ int empty = FALSE;
+ int was_visual = FALSE;
+- #endif
+ int dir;
+ int flags = 0;
+
+--- 9248,9257 ----
+***************
+*** 9526,9532 ****
+ if (cap->cmdchar == 'g')
+ flags |= PUT_CURSEND;
+
+- #ifdef FEAT_VISUAL
+ if (VIsual_active)
+ {
+ /* Putting in Visual mode: The put text replaces the selected
+--- 9277,9282 ----
+***************
+*** 9536,9549 ****
+ */
+ was_visual = TRUE;
+ regname = cap->oap->regname;
+! # ifdef FEAT_CLIPBOARD
+ adjust_clip_reg(&regname);
+! # endif
+ if (regname == 0 || regname == '"'
+ || VIM_ISDIGIT(regname) || regname == '-'
+! # ifdef FEAT_CLIPBOARD
+ || (clip_unnamed && (regname == '*' || regname == '+'))
+! # endif
+
+ )
+ {
+--- 9286,9299 ----
+ */
+ was_visual = TRUE;
+ regname = cap->oap->regname;
+! #ifdef FEAT_CLIPBOARD
+ adjust_clip_reg(&regname);
+! #endif
+ if (regname == 0 || regname == '"'
+ || VIM_ISDIGIT(regname) || regname == '-'
+! #ifdef FEAT_CLIPBOARD
+ || (clip_unnamed && (regname == '*' || regname == '+'))
+! #endif
+
+ )
+ {
+***************
+*** 9591,9600 ****
+ /* May have been reset in do_put(). */
+ VIsual_active = TRUE;
+ }
+- #endif
+ do_put(cap->oap->regname, dir, cap->count1, flags);
+
+- #ifdef FEAT_VISUAL
+ /* If a register was saved, put it back now. */
+ if (reg2 != NULL)
+ put_register(regname, reg2);
+--- 9341,9348 ----
+***************
+*** 9621,9627 ****
+ coladvance((colnr_T)MAXCOL);
+ }
+ }
+- #endif
+ auto_format(FALSE, TRUE);
+ }
+ }
+--- 9369,9374 ----
+***************
+*** 9642,9652 ****
+ }
+ else
+ #endif
+- #ifdef FEAT_VISUAL
+ if (VIsual_active) /* switch start and end of visual */
+ v_swap_corners(cap->cmdchar);
+ else
+- #endif
+ n_opencmd(cap);
+ }
+
+--- 9389,9397 ----
+*** ../vim-7.4.211/src/ops.c 2014-03-19 18:57:27.730175565 +0100
+--- src/ops.c 2014-03-23 15:08:16.095260447 +0100
+***************
+*** 57,65 ****
+ char_u **y_array; /* pointer to array of line pointers */
+ linenr_T y_size; /* number of lines in y_array */
+ char_u y_type; /* MLINE, MCHAR or MBLOCK */
+- #ifdef FEAT_VISUAL
+ colnr_T y_width; /* only set if y_type == MBLOCK */
+- #endif
+ } y_regs[NUM_REGISTERS];
+
+ static struct yankreg *y_current; /* ptr to current yankreg */
+--- 57,63 ----
+***************
+*** 107,123 ****
+ static int yank_copy_line __ARGS((struct block_def *bd, long y_idx));
+ #ifdef FEAT_CLIPBOARD
+ static void copy_yank_reg __ARGS((struct yankreg *reg));
+- # if defined(FEAT_VISUAL) || defined(FEAT_EVAL)
+ static void may_set_selection __ARGS((void));
+- # endif
+ #endif
+ static void dis_msg __ARGS((char_u *p, int skip_esc));
+ #if defined(FEAT_COMMENTS) || defined(PROTO)
+ static char_u *skip_comment __ARGS((char_u *line, int process, int include_space, int *is_comment));
+ #endif
+- #ifdef FEAT_VISUAL
+ static void block_prep __ARGS((oparg_T *oap, struct block_def *, linenr_T, int));
+- #endif
+ #if defined(FEAT_CLIPBOARD) || defined(FEAT_EVAL)
+ static void str_to_reg __ARGS((struct yankreg *y_ptr, int type, char_u *str, long len, long blocklen));
+ #endif
+--- 105,117 ----
+***************
+*** 187,193 ****
+ return i;
+ }
+
+- #if defined(FEAT_VISUAL) || defined(PROTO)
+ /*
+ * Return TRUE if operator "op" always works on whole lines.
+ */
+--- 181,186 ----
+***************
+*** 197,203 ****
+ {
+ return opchars[op][2];
+ }
+- #endif
+
+ /*
+ * Get first operator command character.
+--- 190,195 ----
+***************
+*** 232,249 ****
+ long i;
+ int first_char;
+ char_u *s;
+- #ifdef FEAT_VISUAL
+ int block_col = 0;
+- #endif
+
+ if (u_save((linenr_T)(oap->start.lnum - 1),
+ (linenr_T)(oap->end.lnum + 1)) == FAIL)
+ return;
+
+- #ifdef FEAT_VISUAL
+ if (oap->block_mode)
+ block_col = curwin->w_cursor.col;
+- #endif
+
+ for (i = oap->line_count; --i >= 0; )
+ {
+--- 224,237 ----
+***************
+*** 272,286 ****
+ foldOpenCursor();
+ #endif
+
+- #ifdef FEAT_VISUAL
+ if (oap->block_mode)
+ {
+ curwin->w_cursor.lnum = oap->start.lnum;
+ curwin->w_cursor.col = block_col;
+ }
+! else
+! #endif
+! if (curs_top) /* put cursor on first line, for ">>" */
+ {
+ curwin->w_cursor.lnum = oap->start.lnum;
+ beginline(BL_SOL | BL_FIX); /* shift_line() may have set cursor.col */
+--- 260,271 ----
+ foldOpenCursor();
+ #endif
+
+ if (oap->block_mode)
+ {
+ curwin->w_cursor.lnum = oap->start.lnum;
+ curwin->w_cursor.col = block_col;
+ }
+! else if (curs_top) /* put cursor on first line, for ">>" */
+ {
+ curwin->w_cursor.lnum = oap->start.lnum;
+ beginline(BL_SOL | BL_FIX); /* shift_line() may have set cursor.col */
+***************
+*** 733,746 ****
+ * there is no change still need to remove the Visual highlighting. */
+ if (last_changed != 0)
+ changed_lines(first_changed, 0,
+- #ifdef FEAT_VISUAL
+ oap->is_VIsual ? start_lnum + oap->line_count :
+- #endif
+ last_changed + 1, 0L);
+- #ifdef FEAT_VISUAL
+ else if (oap->is_VIsual)
+ redraw_curbuf_later(INVERTED);
+- #endif
+
+ if (oap->line_count > p_report)
+ {
+--- 718,727 ----
+***************
+*** 948,954 ****
+ }
+ #endif
+
+- #if defined(FEAT_VISUAL) || defined(PROTO)
+ /*
+ * Obtain the contents of a "normal" register. The register is made empty.
+ * The returned pointer has allocated memory, use put_register() later.
+--- 929,934 ----
+***************
+*** 1016,1025 ****
+ *y_current = *(struct yankreg *)reg;
+ vim_free(reg);
+
+! # ifdef FEAT_CLIPBOARD
+ /* Send text written to clipboard register to the clipboard. */
+ may_set_selection();
+! # endif
+ }
+
+ void
+--- 996,1005 ----
+ *y_current = *(struct yankreg *)reg;
+ vim_free(reg);
+
+! #ifdef FEAT_CLIPBOARD
+ /* Send text written to clipboard register to the clipboard. */
+ may_set_selection();
+! #endif
+ }
+
+ void
+***************
+*** 1034,1040 ****
+ vim_free(reg);
+ *y_current = tmp;
+ }
+- #endif
+
+ #if defined(FEAT_MOUSE) || defined(PROTO)
+ /*
+--- 1014,1019 ----
+***************
+*** 1634,1643 ****
+ int n;
+ linenr_T lnum;
+ char_u *ptr;
+- #ifdef FEAT_VISUAL
+ char_u *newp, *oldp;
+ struct block_def bd;
+- #endif
+ linenr_T old_lcount = curbuf->b_ml.ml_line_count;
+ int did_yank = FALSE;
+ int orig_regname = oap->regname;
+--- 1613,1620 ----
+***************
+*** 1670,1679 ****
+ * delete linewise. Don't do this for the change command or Visual mode.
+ */
+ if ( oap->motion_type == MCHAR
+- #ifdef FEAT_VISUAL
+ && !oap->is_VIsual
+ && !oap->block_mode
+- #endif
+ && oap->line_count > 1
+ && oap->motion_force == NUL
+ && oap->op_type == OP_DELETE)
+--- 1647,1654 ----
+***************
+*** 1787,1793 ****
+ }
+ }
+
+- #ifdef FEAT_VISUAL
+ /*
+ * block mode delete
+ */
+--- 1762,1767 ----
+***************
+*** 1838,1846 ****
+ oap->end.lnum + 1, 0L);
+ oap->line_count = 0; /* no lines deleted */
+ }
+! else
+! #endif
+! if (oap->motion_type == MLINE)
+ {
+ if (oap->op_type == OP_CHANGE)
+ {
+--- 1812,1818 ----
+ oap->end.lnum + 1, 0L);
+ oap->line_count = 0; /* no lines deleted */
+ }
+! else if (oap->motion_type == MLINE)
+ {
+ if (oap->op_type == OP_CHANGE)
+ {
+***************
+*** 1924,1936 ****
+ return FAIL;
+
+ /* if 'cpoptions' contains '$', display '$' at end of change */
+! if ( vim_strchr(p_cpo, CPO_DOLLAR) != NULL
+ && oap->op_type == OP_CHANGE
+ && oap->end.lnum == curwin->w_cursor.lnum
+! #ifdef FEAT_VISUAL
+! && !oap->is_VIsual
+! #endif
+! )
+ display_dollar(oap->end.col - !oap->inclusive);
+
+ n = oap->end.col - oap->start.col + 1 - !oap->inclusive;
+--- 1896,1905 ----
+ return FAIL;
+
+ /* if 'cpoptions' contains '$', display '$' at end of change */
+! if ( vim_strchr(p_cpo, CPO_DOLLAR) != NULL
+ && oap->op_type == OP_CHANGE
+ && oap->end.lnum == curwin->w_cursor.lnum
+! && !oap->is_VIsual)
+ display_dollar(oap->end.col - !oap->inclusive);
+
+ n = oap->end.col - oap->start.col + 1 - !oap->inclusive;
+***************
+*** 1967,1977 ****
+ }
+ else
+ {
+! (void)del_bytes((long)n, !virtual_op, oap->op_type == OP_DELETE
+! #ifdef FEAT_VISUAL
+! && !oap->is_VIsual
+! #endif
+! );
+ }
+ }
+ else /* delete characters between lines */
+--- 1936,1943 ----
+ }
+ else
+ {
+! (void)del_bytes((long)n, !virtual_op,
+! oap->op_type == OP_DELETE && !oap->is_VIsual);
+ }
+ }
+ else /* delete characters between lines */
+***************
+*** 2008,2018 ****
+ {
+ /* delete from start of line until op_end */
+ curwin->w_cursor.col = 0;
+! (void)del_bytes((long)n, !virtual_op, oap->op_type == OP_DELETE
+! #ifdef FEAT_VISUAL
+! && !oap->is_VIsual
+! #endif
+! );
+ curwin->w_cursor = curpos; /* restore curwin->w_cursor */
+ }
+ if (curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count)
+--- 1974,1981 ----
+ {
+ /* delete from start of line until op_end */
+ curwin->w_cursor.col = 0;
+! (void)del_bytes((long)n, !virtual_op,
+! oap->op_type == OP_DELETE && !oap->is_VIsual);
+ curwin->w_cursor = curpos; /* restore curwin->w_cursor */
+ }
+ if (curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count)
+***************
+*** 2025,2038 ****
+ #ifdef FEAT_VIRTUALEDIT
+ setmarks:
+ #endif
+- #ifdef FEAT_VISUAL
+ if (oap->block_mode)
+ {
+ curbuf->b_op_end.lnum = oap->end.lnum;
+ curbuf->b_op_end.col = oap->start.col;
+ }
+ else
+- #endif
+ curbuf->b_op_end = oap->start;
+ curbuf->b_op_start = oap->start;
+
+--- 1988,1999 ----
+***************
+*** 2318,2326 ****
+ oparg_T *oap;
+ {
+ pos_T pos;
+- #ifdef FEAT_VISUAL
+ struct block_def bd;
+- #endif
+ int did_change = FALSE;
+
+ if (u_save((linenr_T)(oap->start.lnum - 1),
+--- 2279,2285 ----
+***************
+*** 2328,2334 ****
+ return;
+
+ pos = oap->start;
+- #ifdef FEAT_VISUAL
+ if (oap->block_mode) /* Visual block mode */
+ {
+ for (; pos.lnum <= oap->end.lnum; ++pos.lnum)
+--- 2287,2292 ----
+***************
+*** 2340,2346 ****
+ one_change = swapchars(oap->op_type, &pos, bd.textlen);
+ did_change |= one_change;
+
+! # ifdef FEAT_NETBEANS_INTG
+ if (netbeans_active() && one_change)
+ {
+ char_u *ptr = ml_get_buf(curbuf, pos.lnum, FALSE);
+--- 2298,2304 ----
+ one_change = swapchars(oap->op_type, &pos, bd.textlen);
+ did_change |= one_change;
+
+! #ifdef FEAT_NETBEANS_INTG
+ if (netbeans_active() && one_change)
+ {
+ char_u *ptr = ml_get_buf(curbuf, pos.lnum, FALSE);
+***************
+*** 2350,2362 ****
+ netbeans_inserted(curbuf, pos.lnum, bd.textcol,
+ &ptr[bd.textcol], bd.textlen);
+ }
+! # endif
+ }
+ if (did_change)
+ changed_lines(oap->start.lnum, 0, oap->end.lnum + 1, 0L);
+ }
+ else /* not block mode */
+- #endif
+ {
+ if (oap->motion_type == MLINE)
+ {
+--- 2308,2319 ----
+ netbeans_inserted(curbuf, pos.lnum, bd.textcol,
+ &ptr[bd.textcol], bd.textlen);
+ }
+! #endif
+ }
+ if (did_change)
+ changed_lines(oap->start.lnum, 0, oap->end.lnum + 1, 0L);
+ }
+ else /* not block mode */
+ {
+ if (oap->motion_type == MLINE)
+ {
+***************
+*** 2412,2422 ****
+ }
+ }
+
+- #ifdef FEAT_VISUAL
+ if (!did_change && oap->is_VIsual)
+ /* No change: need to remove the Visual selection */
+ redraw_curbuf_later(INVERTED);
+- #endif
+
+ /*
+ * Set '[ and '] marks.
+--- 2369,2377 ----
+***************
+*** 3018,3027 ****
+ if ( oap->motion_type == MCHAR
+ && oap->start.col == 0
+ && !oap->inclusive
+- #ifdef FEAT_VISUAL
+ && (!oap->is_VIsual || *p_sel == 'o')
+ && !oap->block_mode
+- #endif
+ && oap->end.col == 0
+ && yanklines > 1)
+ {
+--- 2973,2980 ----
+***************
+*** 3032,3040 ****
+
+ y_current->y_size = yanklines;
+ y_current->y_type = yanktype; /* set the yank register type */
+- #ifdef FEAT_VISUAL
+ y_current->y_width = 0;
+- #endif
+ y_current->y_array = (char_u **)lalloc_clear((long_u)(sizeof(char_u *) *
+ yanklines), TRUE);
+
+--- 2985,2991 ----
+***************
+*** 3047,3053 ****
+ y_idx = 0;
+ lnum = oap->start.lnum;
+
+- #ifdef FEAT_VISUAL
+ if (oap->block_mode)
+ {
+ /* Visual block mode */
+--- 2998,3003 ----
+***************
+*** 3057,3075 ****
+ if (curwin->w_curswant == MAXCOL && y_current->y_width > 0)
+ y_current->y_width--;
+ }
+- #endif
+
+ for ( ; lnum <= yankendlnum; lnum++, y_idx++)
+ {
+ switch (y_current->y_type)
+ {
+- #ifdef FEAT_VISUAL
+ case MBLOCK:
+ block_prep(oap, &bd, lnum, FALSE);
+ if (yank_copy_line(&bd, y_idx) == FAIL)
+ goto fail;
+ break;
+- #endif
+
+ case MLINE:
+ if ((y_current->y_array[y_idx] =
+--- 3007,3022 ----
+***************
+*** 3206,3214 ****
+ if (mess) /* Display message about yank? */
+ {
+ if (yanktype == MCHAR
+- #ifdef FEAT_VISUAL
+ && !oap->block_mode
+- #endif
+ && yanklines == 1)
+ yanklines = 0;
+ /* Some versions of Vi use ">=" here, some don't... */
+--- 3153,3159 ----
+***************
+*** 3218,3234 ****
+ update_topline_redraw();
+ if (yanklines == 1)
+ {
+- #ifdef FEAT_VISUAL
+ if (oap->block_mode)
+ MSG(_("block of 1 line yanked"));
+ else
+- #endif
+ MSG(_("1 line yanked"));
+ }
+- #ifdef FEAT_VISUAL
+ else if (oap->block_mode)
+ smsg((char_u *)_("block of %ld lines yanked"), yanklines);
+- #endif
+ else
+ smsg((char_u *)_("%ld lines yanked"), yanklines);
+ }
+--- 3163,3175 ----
+***************
+*** 3239,3249 ****
+ */
+ curbuf->b_op_start = oap->start;
+ curbuf->b_op_end = oap->end;
+! if (yanktype == MLINE
+! #ifdef FEAT_VISUAL
+! && !oap->block_mode
+! #endif
+! )
+ {
+ curbuf->b_op_start.col = 0;
+ curbuf->b_op_end.col = MAXCOL;
+--- 3180,3186 ----
+ */
+ curbuf->b_op_start = oap->start;
+ curbuf->b_op_end = oap->end;
+! if (yanktype == MLINE && !oap->block_mode)
+ {
+ curbuf->b_op_start.col = 0;
+ curbuf->b_op_end.col = MAXCOL;
+***************
+*** 3380,3386 ****
+ long i; /* index in y_array[] */
+ int y_type;
+ long y_size;
+- #ifdef FEAT_VISUAL
+ int oldlen;
+ long y_width = 0;
+ colnr_T vcol;
+--- 3317,3322 ----
+***************
+*** 3388,3394 ****
+ int incr = 0;
+ long j;
+ struct block_def bd;
+- #endif
+ char_u **y_array = NULL;
+ long nr_lines = 0;
+ pos_T new_cursor;
+--- 3324,3329 ----
+***************
+*** 3497,3510 ****
+ get_yank_register(regname, FALSE);
+
+ y_type = y_current->y_type;
+- #ifdef FEAT_VISUAL
+ y_width = y_current->y_width;
+- #endif
+ y_size = y_current->y_size;
+ y_array = y_current->y_array;
+ }
+
+- #ifdef FEAT_VISUAL
+ if (y_type == MLINE)
+ {
+ if (flags & PUT_LINE_SPLIT)
+--- 3432,3442 ----
+***************
+*** 3535,3541 ****
+ curbuf->b_op_start = curwin->w_cursor; /* default for '[ mark */
+ curbuf->b_op_end = curwin->w_cursor; /* default for '] mark */
+ }
+- #endif
+
+ if (flags & PUT_LINE) /* :put command or "p" in Visual line mode. */
+ y_type = MLINE;
+--- 3467,3472 ----
+***************
+*** 3547,3553 ****
+ goto end;
+ }
+
+- #ifdef FEAT_VISUAL
+ if (y_type == MBLOCK)
+ {
+ lnum = curwin->w_cursor.lnum + y_size + 1;
+--- 3478,3483 ----
+***************
+*** 3556,3564 ****
+ if (u_save(curwin->w_cursor.lnum - 1, lnum) == FAIL)
+ goto end;
+ }
+! else
+! #endif
+! if (y_type == MLINE)
+ {
+ lnum = curwin->w_cursor.lnum;
+ #ifdef FEAT_FOLDING
+--- 3486,3492 ----
+ if (u_save(curwin->w_cursor.lnum - 1, lnum) == FAIL)
+ goto end;
+ }
+! else if (y_type == MLINE)
+ {
+ lnum = curwin->w_cursor.lnum;
+ #ifdef FEAT_FOLDING
+***************
+*** 3610,3616 ****
+ lnum = curwin->w_cursor.lnum;
+ col = curwin->w_cursor.col;
+
+- #ifdef FEAT_VISUAL
+ /*
+ * Block mode
+ */
+--- 3538,3543 ----
+***************
+*** 3792,3798 ****
+ curwin->w_cursor.lnum = lnum;
+ }
+ else
+- #endif
+ {
+ /*
+ * Character or Line mode
+--- 3719,3724 ----
+***************
+*** 3866,3882 ****
+ curwin->w_cursor.col += (colnr_T)(totlen - 1);
+ }
+ }
+- #ifdef FEAT_VISUAL
+ if (VIsual_active)
+ lnum++;
+! #endif
+! } while (
+! #ifdef FEAT_VISUAL
+! VIsual_active && lnum <= curbuf->b_visual.vi_end.lnum
+! #else
+! FALSE /* stop after 1 paste */
+! #endif
+! );
+
+ curbuf->b_op_end = curwin->w_cursor;
+ /* For "CTRL-O p" in Insert mode, put cursor after last char */
+--- 3792,3800 ----
+ curwin->w_cursor.col += (colnr_T)(totlen - 1);
+ }
+ }
+ if (VIsual_active)
+ lnum++;
+! } while (VIsual_active && lnum <= curbuf->b_visual.vi_end.lnum);
+
+ curbuf->b_op_end = curwin->w_cursor;
+ /* For "CTRL-O p" in Insert mode, put cursor after last char */
+***************
+*** 4038,4046 ****
+ if (regname == '=')
+ vim_free(y_array);
+
+- #ifdef FEAT_VISUAL
+ VIsual_active = FALSE;
+- #endif
+
+ /* If the cursor is past the end of the line put it at the end. */
+ adjust_cursor_eol();
+--- 3956,3962 ----
+***************
+*** 4729,4739 ****
+ return;
+ curwin->w_cursor = oap->start;
+
+- #ifdef FEAT_VISUAL
+ if (oap->is_VIsual)
+ /* When there is no change: need to remove the Visual selection */
+ redraw_curbuf_later(INVERTED);
+- #endif
+
+ /* Set '[ mark at the start of the formatted area */
+ curbuf->b_op_start = oap->start;
+--- 4645,4653 ----
+***************
+*** 4765,4771 ****
+ saved_cursor.lnum = 0;
+ }
+
+- #ifdef FEAT_VISUAL
+ if (oap->is_VIsual)
+ {
+ win_T *wp;
+--- 4679,4684 ----
+***************
+*** 4783,4789 ****
+ }
+ }
+ }
+- #endif
+ }
+
+ #if defined(FEAT_EVAL) || defined(PROTO)
+--- 4696,4701 ----
+***************
+*** 4794,4804 ****
+ op_formatexpr(oap)
+ oparg_T *oap;
+ {
+- # ifdef FEAT_VISUAL
+ if (oap->is_VIsual)
+ /* When there is no change: need to remove the Visual selection */
+ redraw_curbuf_later(INVERTED);
+- # endif
+
+ if (fex_format(oap->start.lnum, oap->line_count, NUL) != 0)
+ /* As documented: when 'formatexpr' returns non-zero fall back to
+--- 4706,4714 ----
+***************
+*** 5238,5244 ****
+ return FALSE;
+ }
+
+- #ifdef FEAT_VISUAL
+ /*
+ * prepare a few things for block mode yank/delete/tilde
+ *
+--- 5148,5153 ----
+***************
+*** 5397,5403 ****
+ bdp->textcol = (colnr_T) (pstart - line);
+ bdp->textstart = pstart;
+ }
+- #endif /* FEAT_VISUAL */
+
+ #ifdef FEAT_RIGHTLEFT
+ static void reverse_line __ARGS((char_u *s));
+--- 5306,5311 ----
+***************
+*** 5748,5766 ****
+ str = skipwhite(skiptowhite(str));
+ if (STRNCMP(str, "CHAR", 4) == 0)
+ y_current->y_type = MCHAR;
+- #ifdef FEAT_VISUAL
+ else if (STRNCMP(str, "BLOCK", 5) == 0)
+ y_current->y_type = MBLOCK;
+- #endif
+ else
+ y_current->y_type = MLINE;
+ /* get the block width; if it's missing we get a zero, which is OK */
+ str = skipwhite(skiptowhite(str));
+- #ifdef FEAT_VISUAL
+ y_current->y_width = getdigits(&str);
+- #else
+- (void)getdigits(&str);
+- #endif
+ }
+
+ while (!(eof = viminfo_readline(virp))
+--- 5656,5668 ----
+***************
+*** 5868,5878 ****
+ case MCHAR:
+ type = (char_u *)"CHAR";
+ break;
+- #ifdef FEAT_VISUAL
+ case MBLOCK:
+ type = (char_u *)"BLOCK";
+ break;
+- #endif
+ default:
+ sprintf((char *)IObuff, _("E574: Unknown register type %d"),
+ y_regs[i].y_type);
+--- 5770,5778 ----
+***************
+*** 5886,5898 ****
+ fprintf(fp, "\"%c", c);
+ if (c == execreg_lastc)
+ fprintf(fp, "@");
+! fprintf(fp, "\t%s\t%d\n", type,
+! #ifdef FEAT_VISUAL
+! (int)y_regs[i].y_width
+! #else
+! 0
+! #endif
+! );
+
+ /* If max_num_lines < 0, then we save ALL the lines in the register */
+ if (max_num_lines > 0 && num_lines > max_num_lines)
+--- 5786,5792 ----
+ fprintf(fp, "\"%c", c);
+ if (c == execreg_lastc)
+ fprintf(fp, "@");
+! fprintf(fp, "\t%s\t%d\n", type, (int)y_regs[i].y_width);
+
+ /* If max_num_lines < 0, then we save ALL the lines in the register */
+ if (max_num_lines > 0 && num_lines > max_num_lines)
+***************
+*** 6039,6048 ****
+ {
+ struct yankreg *old_y_previous, *old_y_current;
+ pos_T old_cursor;
+- #ifdef FEAT_VISUAL
+ pos_T old_visual;
+ int old_visual_mode;
+- #endif
+ colnr_T old_curswant;
+ int old_set_curswant;
+ pos_T old_op_start, old_op_end;
+--- 5933,5940 ----
+***************
+*** 6063,6072 ****
+ old_set_curswant = curwin->w_set_curswant;
+ old_op_start = curbuf->b_op_start;
+ old_op_end = curbuf->b_op_end;
+- #ifdef FEAT_VISUAL
+ old_visual = VIsual;
+ old_visual_mode = VIsual_mode;
+- #endif
+ clear_oparg(&oa);
+ oa.regname = (cbd == &clip_plus ? '+' : '*');
+ oa.op_type = OP_YANK;
+--- 5955,5962 ----
+***************
+*** 6084,6093 ****
+ curwin->w_set_curswant = old_set_curswant;
+ curbuf->b_op_start = old_op_start;
+ curbuf->b_op_end = old_op_end;
+- #ifdef FEAT_VISUAL
+ VIsual = old_visual;
+ VIsual_mode = old_visual_mode;
+- #endif
+ }
+ else
+ {
+--- 5974,5981 ----
+***************
+*** 6190,6196 ****
+ }
+
+
+- # if defined(FEAT_VISUAL) || defined(FEAT_EVAL)
+ /*
+ * If we have written to a clipboard register, send the text to the clipboard.
+ */
+--- 6078,6083 ----
+***************
+*** 6208,6214 ****
+ clip_gen_set_selection(&clip_plus);
+ }
+ }
+- # endif
+
+ #endif /* FEAT_CLIPBOARD || PROTO */
+
+--- 6095,6100 ----
+***************
+*** 6273,6282 ****
+
+ if (y_current->y_array != NULL)
+ {
+- #ifdef FEAT_VISUAL
+ if (reglen != NULL && y_current->y_type == MBLOCK)
+ *reglen = y_current->y_width;
+- #endif
+ return y_current->y_type;
+ }
+ return MAUTO;
+--- 6159,6166 ----
+***************
+*** 6454,6464 ****
+ get_yank_register(name, TRUE);
+ if (!y_append && !must_append)
+ free_yank_all();
+- #ifndef FEAT_VISUAL
+- /* Just in case - make sure we don't use MBLOCK */
+- if (yank_type == MBLOCK)
+- yank_type = MAUTO;
+- #endif
+ str_to_reg(y_current, yank_type, str, len, block_len);
+
+ # ifdef FEAT_CLIPBOARD
+--- 6338,6343 ----
+***************
+*** 6496,6504 ****
+ int append = FALSE; /* append to last line in register */
+ char_u *s;
+ char_u **pp;
+- #ifdef FEAT_VISUAL
+ long maxlen;
+- #endif
+
+ if (y_ptr->y_array == NULL) /* NULL means empty register */
+ y_ptr->y_size = 0;
+--- 6375,6381 ----
+***************
+*** 6539,6547 ****
+ pp[lnum] = y_ptr->y_array[lnum];
+ vim_free(y_ptr->y_array);
+ y_ptr->y_array = pp;
+- #ifdef FEAT_VISUAL
+ maxlen = 0;
+- #endif
+
+ /*
+ * Find the end of each line and save it into the array.
+--- 6416,6422 ----
+***************
+*** 6552,6561 ****
+ if (str[i] == '\n')
+ break;
+ i -= start; /* i is now length of line */
+- #ifdef FEAT_VISUAL
+ if (i > maxlen)
+ maxlen = i;
+- #endif
+ if (append)
+ {
+ --lnum;
+--- 6427,6434 ----
+***************
+*** 6585,6596 ****
+ }
+ y_ptr->y_type = type;
+ y_ptr->y_size = lnum;
+- # ifdef FEAT_VISUAL
+ if (type == MBLOCK)
+ y_ptr->y_width = (blocklen < 0 ? maxlen - 1 : blocklen);
+ else
+ y_ptr->y_width = 0;
+- # endif
+ }
+ #endif /* FEAT_CLIPBOARD || FEAT_EVAL || PROTO */
+
+--- 6458,6467 ----
+***************
+*** 6684,6695 ****
+ long word_count_cursor = 0;
+ int eol_size;
+ long last_check = 100000L;
+- #ifdef FEAT_VISUAL
+ long line_count_selected = 0;
+ pos_T min_pos, max_pos;
+ oparg_T oparg;
+ struct block_def bd;
+- #endif
+
+ /*
+ * Compute the length of the file in characters.
+--- 6555,6564 ----
+***************
+*** 6705,6711 ****
+ else
+ eol_size = 1;
+
+- #ifdef FEAT_VISUAL
+ if (VIsual_active)
+ {
+ if (lt(VIsual, curwin->w_cursor))
+--- 6574,6579 ----
+***************
+*** 6749,6755 ****
+ }
+ line_count_selected = max_pos.lnum - min_pos.lnum + 1;
+ }
+- #endif
+
+ for (lnum = 1; lnum <= curbuf->b_ml.ml_line_count; ++lnum)
+ {
+--- 6617,6622 ----
+***************
+*** 6762,6768 ****
+ last_check = byte_count + 100000L;
+ }
+
+- #ifdef FEAT_VISUAL
+ /* Do extra processing for VIsual mode. */
+ if (VIsual_active
+ && lnum >= min_pos.lnum && lnum <= max_pos.lnum)
+--- 6629,6634 ----
+***************
+*** 6773,6785 ****
+ switch (VIsual_mode)
+ {
+ case Ctrl_V:
+! # ifdef FEAT_VIRTUALEDIT
+ virtual_op = virtual_active();
+! # endif
+ block_prep(&oparg, &bd, lnum, 0);
+! # ifdef FEAT_VIRTUALEDIT
+ virtual_op = MAYBE;
+! # endif
+ s = bd.textstart;
+ len = (long)bd.textlen;
+ break;
+--- 6639,6651 ----
+ switch (VIsual_mode)
+ {
+ case Ctrl_V:
+! #ifdef FEAT_VIRTUALEDIT
+ virtual_op = virtual_active();
+! #endif
+ block_prep(&oparg, &bd, lnum, 0);
+! #ifdef FEAT_VIRTUALEDIT
+ virtual_op = MAYBE;
+! #endif
+ s = bd.textstart;
+ len = (long)bd.textlen;
+ break;
+***************
+*** 6811,6817 ****
+ }
+ }
+ else
+- #endif
+ {
+ /* In non-visual mode, check for the line the cursor is on */
+ if (lnum == curwin->w_cursor.lnum)
+--- 6677,6682 ----
+***************
+*** 6833,6839 ****
+ if (!curbuf->b_p_eol && curbuf->b_p_bin)
+ byte_count -= eol_size;
+
+- #ifdef FEAT_VISUAL
+ if (VIsual_active)
+ {
+ if (VIsual_mode == Ctrl_V && curwin->w_curswant < MAXCOL)
+--- 6698,6703 ----
+***************
+*** 6864,6870 ****
+ byte_count_cursor, byte_count);
+ }
+ else
+- #endif
+ {
+ p = ml_get_curline();
+ validate_virtcol();
+--- 6728,6733 ----
+*** ../vim-7.4.211/src/option.c 2014-03-12 18:55:52.100906804 +0100
+--- src/option.c 2014-03-23 13:28:12.359168452 +0100
+***************
+*** 1629,1639 ****
+ #endif
+ SCRIPTID_INIT},
+ {"keymodel", "km", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
+- #ifdef FEAT_VISUAL
+ (char_u *)&p_km, PV_NONE,
+- #else
+- (char_u *)NULL, PV_NONE,
+- #endif
+ {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"keywordprg", "kp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ (char_u *)&p_kp, PV_KP,
+--- 1629,1635 ----
+***************
+*** 2190,2208 ****
+ (char_u *)&p_secure, PV_NONE,
+ {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"selection", "sel", P_STRING|P_VI_DEF,
+- #ifdef FEAT_VISUAL
+ (char_u *)&p_sel, PV_NONE,
+- #else
+- (char_u *)NULL, PV_NONE,
+- #endif
+ {(char_u *)"inclusive", (char_u *)0L}
+ SCRIPTID_INIT},
+ {"selectmode", "slm", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
+- #ifdef FEAT_VISUAL
+ (char_u *)&p_slm, PV_NONE,
+- #else
+- (char_u *)NULL, PV_NONE,
+- #endif
+ {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"sessionoptions", "ssop", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
+ #ifdef FEAT_SESSION
+--- 2186,2196 ----
+***************
+*** 2979,2991 ****
+ static char *(p_wak_values[]) = {"yes", "menu", "no", NULL};
+ #endif
+ static char *(p_mousem_values[]) = {"extend", "popup", "popup_setpos", "mac", NULL};
+- #ifdef FEAT_VISUAL
+ static char *(p_sel_values[]) = {"inclusive", "exclusive", "old", NULL};
+ static char *(p_slm_values[]) = {"mouse", "key", "cmd", NULL};
+- #endif
+- #ifdef FEAT_VISUAL
+ static char *(p_km_values[]) = {"startsel", "stopsel", NULL};
+- #endif
+ #ifdef FEAT_BROWSE
+ static char *(p_bsdir_values[]) = {"current", "last", "buffer", NULL};
+ #endif
+--- 2967,2975 ----
+***************
+*** 6578,6584 ****
+ }
+ #endif
+
+- #ifdef FEAT_VISUAL
+ /* 'selection' */
+ else if (varp == &p_sel)
+ {
+--- 6562,6567 ----
+***************
+*** 6593,6599 ****
+ if (check_opt_strings(p_slm, p_slm_values, TRUE) != OK)
+ errmsg = e_invarg;
+ }
+- #endif
+
+ #ifdef FEAT_BROWSE
+ /* 'browsedir' */
+--- 6576,6581 ----
+***************
+*** 6605,6611 ****
+ }
+ #endif
+
+- #ifdef FEAT_VISUAL
+ /* 'keymodel' */
+ else if (varp == &p_km)
+ {
+--- 6587,6592 ----
+***************
+*** 6617,6623 ****
+ km_startsel = (vim_strchr(p_km, 'a') != NULL);
+ }
+ }
+- #endif
+
+ /* 'mousemodel' */
+ else if (varp == &p_mousem)
+--- 6598,6603 ----
+*** ../vim-7.4.211/src/os_msdos.c 2013-05-06 04:06:04.000000000 +0200
+--- src/os_msdos.c 2014-03-23 13:28:24.855168644 +0100
+***************
+*** 2270,2278 ****
+ default:
+ case 'L': type = MLINE; break;
+ case 'C': type = MCHAR; break;
+- #ifdef FEAT_VISUAL
+ case 'B': type = MBLOCK; break;
+- #endif
+ }
+ }
+
+--- 2270,2276 ----
+***************
+*** 2799,2807 ****
+ default:
+ case MLINE: clip_sel_type = "L"; break;
+ case MCHAR: clip_sel_type = "C"; break;
+- #ifdef FEAT_VISUAL
+ case MBLOCK: clip_sel_type = "B"; break;
+- #endif
+ }
+
+ movedata(
+--- 2797,2803 ----
+*** ../vim-7.4.211/src/os_qnx.c 2011-09-21 19:48:08.000000000 +0200
+--- src/os_qnx.c 2014-03-23 13:28:38.815168858 +0100
+***************
+*** 78,86 ****
+ default: /* fallthrough to line type */
+ case 'L': type = MLINE; break;
+ case 'C': type = MCHAR; break;
+- #ifdef FEAT_VISUAL
+ case 'B': type = MBLOCK; break;
+- #endif
+ }
+ is_type_set = TRUE;
+ }
+--- 78,84 ----
+***************
+*** 143,151 ****
+ default: /* fallthrough to MLINE */
+ case MLINE: *vim_clip = 'L'; break;
+ case MCHAR: *vim_clip = 'C'; break;
+- #ifdef FEAT_VISUAL
+ case MBLOCK: *vim_clip = 'B'; break;
+- #endif
+ }
+
+ vim_strncpy(text_clip, str, len);
+--- 141,147 ----
+*** ../vim-7.4.211/src/quickfix.c 2014-03-12 19:41:37.096948866 +0100
+--- src/quickfix.c 2014-03-23 13:28:50.907169043 +0100
+***************
+*** 2347,2355 ****
+ else
+ height = QF_WINHEIGHT;
+
+- #ifdef FEAT_VISUAL
+ reset_VIsual_and_resel(); /* stop Visual mode */
+- #endif
+ #ifdef FEAT_GUI
+ need_mouse_correct = TRUE;
+ #endif
+--- 2347,2353 ----
+*** ../vim-7.4.211/src/regexp.c 2013-11-21 17:12:55.000000000 +0100
+--- src/regexp.c 2014-03-23 13:29:14.495169404 +0100
+***************
+*** 4179,4187 ****
+ - (*mb_head_off)(regline, reginput - 1), reg_buf);
+ return -1;
+ }
+-
+ #endif
+! #ifdef FEAT_VISUAL
+ static int reg_match_visual __ARGS((void));
+
+ /*
+--- 4179,4186 ----
+ - (*mb_head_off)(regline, reginput - 1), reg_buf);
+ return -1;
+ }
+ #endif
+!
+ static int reg_match_visual __ARGS((void));
+
+ /*
+***************
+*** 4258,4264 ****
+ }
+ return TRUE;
+ }
+- #endif
+
+ #define ADVANCE_REGINPUT() mb_ptr_adv(reginput)
+
+--- 4257,4262 ----
+***************
+*** 4440,4448 ****
+ break;
+
+ case RE_VISUAL:
+- #ifdef FEAT_VISUAL
+ if (!reg_match_visual())
+- #endif
+ status = RA_NOMATCH;
+ break;
+
+--- 4438,4444 ----
+*** ../vim-7.4.211/src/regexp_nfa.c 2013-11-28 14:20:11.000000000 +0100
+--- src/regexp_nfa.c 2014-03-23 13:29:31.367169663 +0100
+***************
+*** 6403,6416 ****
+ break;
+
+ case NFA_VISUAL:
+- #ifdef FEAT_VISUAL
+ result = reg_match_visual();
+ if (result)
+ {
+ add_here = TRUE;
+ add_state = t->state->out;
+ }
+- #endif
+ break;
+
+ case NFA_MOPEN1:
+--- 6403,6414 ----
+*** ../vim-7.4.211/src/screen.c 2013-12-11 15:51:54.000000000 +0100
+--- src/screen.c 2014-03-23 13:32:10.787172106 +0100
+***************
+*** 446,453 ****
+ #endif
+ }
+
+- #if defined(FEAT_RUBY) || defined(FEAT_PERL) || defined(FEAT_VISUAL) || \
+- (defined(FEAT_CLIPBOARD) && defined(FEAT_X11)) || defined(PROTO)
+ /*
+ * update all windows that are editing the current buffer
+ */
+--- 446,451 ----
+***************
+*** 458,464 ****
+ redraw_curbuf_later(type);
+ update_screen(type);
+ }
+- #endif
+
+ /*
+ * update_screen()
+--- 456,461 ----
+***************
+*** 596,609 ****
+ && curwin->w_botfill == curwin->w_old_botfill
+ #endif
+ && curwin->w_topline == curwin->w_lines[0].wl_lnum)
+- #ifdef FEAT_VISUAL
+ || (type == INVERTED
+ && VIsual_active
+ && curwin->w_old_cursor_lnum == curwin->w_cursor.lnum
+ && curwin->w_old_visual_mode == VIsual_mode
+ && (curwin->w_valid & VALID_VIRTCOL)
+ && curwin->w_old_curswant == curwin->w_curswant)
+- #endif
+ ))
+ curwin->w_redr_type = type;
+
+--- 593,604 ----
+***************
+*** 1030,1039 ****
+ updating. 0 when no mid area updating. */
+ int bot_start = 999;/* first row of the bot area that needs
+ updating. 999 when no bot area updating */
+- #ifdef FEAT_VISUAL
+ int scrolled_down = FALSE; /* TRUE when scrolled down when
+ w_topline got smaller a bit */
+- #endif
+ #ifdef FEAT_SEARCH_EXTRA
+ matchitem_T *cur; /* points to the match list */
+ int top_to_mod = FALSE; /* redraw above mod_top */
+--- 1025,1032 ----
+***************
+*** 1354,1362 ****
+ /* Need to update rows that are new, stop at the
+ * first one that scrolled down. */
+ top_end = i;
+- #ifdef FEAT_VISUAL
+ scrolled_down = TRUE;
+- #endif
+
+ /* Move the entries that were scrolled, disable
+ * the entries for the lines to be redrawn. */
+--- 1347,1353 ----
+***************
+*** 1513,1519 ****
+ type = NOT_VALID;
+ }
+
+- #ifdef FEAT_VISUAL
+ /* check if we are updating or removing the inverted part */
+ if ((VIsual_active && buf == curwin->w_buffer)
+ || (wp->w_old_cursor_lnum != 0 && type != NOT_VALID))
+--- 1504,1509 ----
+***************
+*** 1708,1714 ****
+ wp->w_old_visual_lnum = 0;
+ wp->w_old_visual_col = 0;
+ }
+- #endif /* FEAT_VISUAL */
+
+ #if defined(FEAT_SYN_HL) || defined(FEAT_SEARCH_EXTRA)
+ /* reset got_int, otherwise regexp won't work */
+--- 1698,1703 ----
+***************
+*** 2670,2676 ****
+ * 6. set highlighting for the Visual area an other text.
+ * If all folded lines are in the Visual area, highlight the line.
+ */
+- #ifdef FEAT_VISUAL
+ if (VIsual_active && wp->w_buffer == curwin->w_buffer)
+ {
+ if (ltoreq(curwin->w_cursor, VIsual))
+--- 2659,2664 ----
+***************
+*** 2718,2724 ****
+ }
+ }
+ }
+- #endif
+
+ #ifdef FEAT_SYN_HL
+ /* Show 'cursorcolumn' in the fold line. */
+--- 2706,2711 ----
+***************
+*** 2876,2885 ****
+ int fromcol, tocol; /* start/end of inverting */
+ int fromcol_prev = -2; /* start of inverting after cursor */
+ int noinvcur = FALSE; /* don't invert the cursor */
+- #ifdef FEAT_VISUAL
+ pos_T *top, *bot;
+ int lnum_in_visual_area = FALSE;
+- #endif
+ pos_T pos;
+ long v;
+
+--- 2863,2870 ----
+***************
+*** 3090,3096 ****
+ */
+ fromcol = -10;
+ tocol = MAXCOL;
+- #ifdef FEAT_VISUAL
+ if (VIsual_active && wp->w_buffer == curwin->w_buffer)
+ {
+ /* Visual is after curwin->w_cursor */
+--- 3075,3080 ----
+***************
+*** 3183,3191 ****
+ /*
+ * handle 'incsearch' and ":s///c" highlighting
+ */
+! else
+! #endif /* FEAT_VISUAL */
+! if (highlight_match
+ && wp == curwin
+ && lnum >= curwin->w_cursor.lnum
+ && lnum <= curwin->w_cursor.lnum + search_match_lines)
+--- 3167,3173 ----
+ /*
+ * handle 'incsearch' and ":s///c" highlighting
+ */
+! else if (highlight_match
+ && wp == curwin
+ && lnum >= curwin->w_cursor.lnum
+ && lnum <= curwin->w_cursor.lnum + search_match_lines)
+***************
+*** 3324,3330 ****
+ mb_ptr_adv(ptr);
+ }
+
+- #if defined(FEAT_SYN_HL) || defined(FEAT_VIRTUALEDIT) || defined(FEAT_VISUAL)
+ /* When:
+ * - 'cuc' is set, or
+ * - 'colorcolumn' is set, or
+--- 3306,3311 ----
+***************
+*** 3333,3359 ****
+ * the end of the line may be before the start of the displayed part.
+ */
+ if (vcol < v && (
+! # ifdef FEAT_SYN_HL
+! wp->w_p_cuc
+! || draw_color_col
+! # if defined(FEAT_VIRTUALEDIT) || defined(FEAT_VISUAL)
+! ||
+! # endif
+! # endif
+! # ifdef FEAT_VIRTUALEDIT
+! virtual_active()
+! # ifdef FEAT_VISUAL
+! ||
+! # endif
+! # endif
+! # ifdef FEAT_VISUAL
+! (VIsual_active && wp->w_buffer == curwin->w_buffer)
+! # endif
+! ))
+ {
+ vcol = v;
+ }
+- #endif
+
+ /* Handle a character that's not completely on the screen: Put ptr at
+ * that character but skip the first few screen characters. */
+--- 3314,3329 ----
+ * the end of the line may be before the start of the displayed part.
+ */
+ if (vcol < v && (
+! #ifdef FEAT_SYN_HL
+! wp->w_p_cuc || draw_color_col ||
+! #endif
+! #ifdef FEAT_VIRTUALEDIT
+! virtual_active() ||
+! #endif
+! (VIsual_active && wp->w_buffer == curwin->w_buffer)))
+ {
+ vcol = v;
+ }
+
+ /* Handle a character that's not completely on the screen: Put ptr at
+ * that character but skip the first few screen characters. */
+***************
+*** 4500,4508 ****
+ && ((wp->w_p_list && lcs_eol > 0)
+ || ((fromcol >= 0 || fromcol_prev >= 0)
+ && tocol > vcol
+- #ifdef FEAT_VISUAL
+ && VIsual_mode != Ctrl_V
+- #endif
+ && (
+ # ifdef FEAT_RIGHTLEFT
+ wp->w_p_rl ? (col >= 0) :
+--- 4470,4476 ----
+***************
+*** 4854,4864 ****
+ #endif
+ if (lcs_eol == lcs_eol_one
+ && ((area_attr != 0 && vcol == fromcol
+- #ifdef FEAT_VISUAL
+ && (VIsual_mode != Ctrl_V
+ || lnum == VIsual.lnum
+ || lnum == curwin->w_cursor.lnum)
+- #endif
+ && c == NUL)
+ #ifdef FEAT_SEARCH_EXTRA
+ /* highlight 'hlsearch' match at end of line */
+--- 4822,4830 ----
+***************
+*** 9659,9668 ****
+ do_mode = ((p_smd && msg_silent == 0)
+ && ((State & INSERT)
+ || restart_edit
+! #ifdef FEAT_VISUAL
+! || VIsual_active
+! #endif
+! ));
+ if (do_mode || Recording)
+ {
+ /*
+--- 9625,9631 ----
+ do_mode = ((p_smd && msg_silent == 0)
+ && ((State & INSERT)
+ || restart_edit
+! || VIsual_active));
+ if (do_mode || Recording)
+ {
+ /*
+***************
+*** 9790,9796 ****
+ if ((State & INSERT) && p_paste)
+ MSG_PUTS_ATTR(_(" (paste)"), attr);
+
+- #ifdef FEAT_VISUAL
+ if (VIsual_active)
+ {
+ char *p;
+--- 9753,9758 ----
+***************
+*** 9810,9816 ****
+ }
+ MSG_PUTS_ATTR(_(p), attr);
+ }
+- #endif
+ MSG_PUTS_ATTR(" --", attr);
+ }
+
+--- 9772,9777 ----
+***************
+*** 9839,9849 ****
+ msg_clr_cmdline();
+
+ #ifdef FEAT_CMDL_INFO
+- # ifdef FEAT_VISUAL
+ /* In Visual mode the size of the selected area must be redrawn. */
+ if (VIsual_active)
+ clear_showcmd();
+- # endif
+
+ /* If the last window has no status line, the ruler is after the mode
+ * message and must be redrawn */
+--- 9800,9808 ----
+*** ../vim-7.4.211/src/search.c 2014-01-14 21:31:30.000000000 +0100
+--- src/search.c 2014-03-23 13:34:46.351174489 +0100
+***************
+*** 506,512 ****
+ #endif
+
+ /*
+! * lowest level search function.
+ * Search for 'count'th occurrence of pattern 'pat' in direction 'dir'.
+ * Start at position 'pos' and return the found position in 'pos'.
+ *
+--- 506,512 ----
+ #endif
+
+ /*
+! * Lowest level search function.
+ * Search for 'count'th occurrence of pattern 'pat' in direction 'dir'.
+ * Start at position 'pos' and return the found position in 'pos'.
+ *
+***************
+*** 3198,3204 ****
+ cls_bigword = bigword;
+ clearpos(&start_pos);
+
+- #ifdef FEAT_VISUAL
+ /* Correct cursor when 'selection' is exclusive */
+ if (VIsual_active && *p_sel == 'e' && lt(VIsual, curwin->w_cursor))
+ dec_cursor();
+--- 3198,3203 ----
+***************
+*** 3208,3214 ****
+ * character, select the word and/or white space under the cursor.
+ */
+ if (!VIsual_active || equalpos(curwin->w_cursor, VIsual))
+- #endif
+ {
+ /*
+ * Go to start of current word or white space.
+--- 3207,3212 ----
+***************
+*** 3245,3251 ****
+ include_white = TRUE;
+ }
+
+- #ifdef FEAT_VISUAL
+ if (VIsual_active)
+ {
+ /* should do something when inclusive == FALSE ! */
+--- 3243,3248 ----
+***************
+*** 3253,3259 ****
+ redraw_curbuf_later(INVERTED); /* update the inversion */
+ }
+ else
+- #endif
+ {
+ oap->start = start_pos;
+ oap->motion_type = MCHAR;
+--- 3250,3255 ----
+***************
+*** 3267,3273 ****
+ while (count > 0)
+ {
+ inclusive = TRUE;
+- #ifdef FEAT_VISUAL
+ if (VIsual_active && lt(curwin->w_cursor, VIsual))
+ {
+ /*
+--- 3263,3268 ----
+***************
+*** 3288,3294 ****
+ }
+ }
+ else
+- #endif
+ {
+ /*
+ * Move cursor forward one word and/or white area.
+--- 3283,3288 ----
+***************
+*** 3334,3351 ****
+ back_in_line();
+ if (cls() == 0 && curwin->w_cursor.col > 0)
+ {
+- #ifdef FEAT_VISUAL
+ if (VIsual_active)
+ VIsual = curwin->w_cursor;
+ else
+- #endif
+ oap->start = curwin->w_cursor;
+ }
+ }
+ curwin->w_cursor = pos; /* put cursor back at end */
+ }
+
+- #ifdef FEAT_VISUAL
+ if (VIsual_active)
+ {
+ if (*p_sel == 'e' && inclusive && ltoreq(VIsual, curwin->w_cursor))
+--- 3328,3342 ----
+***************
+*** 3357,3363 ****
+ }
+ }
+ else
+- #endif
+ oap->inclusive = inclusive;
+
+ return OK;
+--- 3348,3353 ----
+***************
+*** 3384,3390 ****
+ pos = start_pos;
+ findsent(FORWARD, 1L); /* Find start of next sentence. */
+
+- #ifdef FEAT_VISUAL
+ /*
+ * When the Visual area is bigger than one character: Extend it.
+ */
+--- 3374,3379 ----
+***************
+*** 3471,3477 ****
+ }
+ return OK;
+ }
+- #endif
+
+ /*
+ * If the cursor started on a blank, check if it is just before the start
+--- 3460,3465 ----
+***************
+*** 3521,3527 ****
+ find_first_blank(&start_pos);
+ }
+
+- #ifdef FEAT_VISUAL
+ if (VIsual_active)
+ {
+ /* Avoid getting stuck with "is" on a single space before a sentence. */
+--- 3509,3514 ----
+***************
+*** 3534,3540 ****
+ redraw_curbuf_later(INVERTED); /* update the inversion */
+ }
+ else
+- #endif
+ {
+ /* include a newline after the sentence, if there is one */
+ if (incl(&curwin->w_cursor) == -1)
+--- 3521,3526 ----
+***************
+*** 3574,3582 ****
+ /*
+ * If we start on '(', '{', ')', '}', etc., use the whole block inclusive.
+ */
+- #ifdef FEAT_VISUAL
+ if (!VIsual_active || equalpos(VIsual, curwin->w_cursor))
+- #endif
+ {
+ setpcmark();
+ if (what == '{') /* ignore indent */
+--- 3560,3566 ----
+***************
+*** 3587,3593 ****
+ /* cursor on '(' or '{', move cursor just after it */
+ ++curwin->w_cursor.col;
+ }
+- #ifdef FEAT_VISUAL
+ else if (lt(VIsual, curwin->w_cursor))
+ {
+ old_start = VIsual;
+--- 3571,3576 ----
+***************
+*** 3595,3601 ****
+ }
+ else
+ old_end = VIsual;
+- #endif
+
+ /*
+ * Search backwards for unclosed '(', '{', etc..
+--- 3578,3583 ----
+***************
+*** 3641,3647 ****
+ if (decl(&curwin->w_cursor) != 0)
+ break;
+ }
+- #ifdef FEAT_VISUAL
+ /*
+ * In Visual mode, when the resulting area is not bigger than what we
+ * started with, extend it to the next block, and then exclude again.
+--- 3623,3628 ----
+***************
+*** 3666,3676 ****
+ curwin->w_cursor = *end_pos;
+ }
+ else
+- #endif
+ break;
+ }
+
+- #ifdef FEAT_VISUAL
+ if (VIsual_active)
+ {
+ if (*p_sel == 'e')
+--- 3647,3655 ----
+***************
+*** 3683,3689 ****
+ showmode();
+ }
+ else
+- #endif
+ {
+ oap->start = start_pos;
+ oap->motion_type = MCHAR;
+--- 3662,3667 ----
+***************
+*** 3807,3823 ****
+ old_pos = curwin->w_cursor;
+ old_end = curwin->w_cursor; /* remember where we started */
+ old_start = old_end;
+- #ifdef FEAT_VISUAL
+ if (!VIsual_active || *p_sel == 'e')
+- #endif
+ decl(&old_end); /* old_end is inclusive */
+
+ /*
+ * If we start on "<aaa>" select that block.
+ */
+- #ifdef FEAT_VISUAL
+ if (!VIsual_active || equalpos(VIsual, curwin->w_cursor))
+- #endif
+ {
+ setpcmark();
+
+--- 3785,3797 ----
+***************
+*** 3843,3849 ****
+ old_end = curwin->w_cursor;
+ }
+ }
+- #ifdef FEAT_VISUAL
+ else if (lt(VIsual, curwin->w_cursor))
+ {
+ old_start = VIsual;
+--- 3817,3822 ----
+***************
+*** 3851,3857 ****
+ }
+ else
+ old_end = VIsual;
+- #endif
+
+ again:
+ /*
+--- 3824,3829 ----
+***************
+*** 3951,3957 ****
+ }
+ }
+
+- #ifdef FEAT_VISUAL
+ if (VIsual_active)
+ {
+ /* If the end is before the start there is no text between tags, select
+--- 3923,3928 ----
+***************
+*** 3966,3972 ****
+ showmode();
+ }
+ else
+- #endif
+ {
+ oap->start = start_pos;
+ oap->motion_type = MCHAR;
+--- 3937,3942 ----
+***************
+*** 4010,4016 ****
+
+ start_lnum = curwin->w_cursor.lnum;
+
+- #ifdef FEAT_VISUAL
+ /*
+ * When visual area is more than one line: extend it.
+ */
+--- 3980,3985 ----
+***************
+*** 4064,4070 ****
+ curwin->w_cursor.col = 0;
+ return retval;
+ }
+- #endif
+
+ /*
+ * First move back to the start_lnum of the paragraph or white lines
+--- 4033,4038 ----
+***************
+*** 4136,4142 ****
+ while (start_lnum > 1 && linewhite(start_lnum - 1))
+ --start_lnum;
+
+- #ifdef FEAT_VISUAL
+ if (VIsual_active)
+ {
+ /* Problem: when doing "Vipipip" nothing happens in a single white
+--- 4104,4109 ----
+***************
+*** 4149,4155 ****
+ showmode();
+ }
+ else
+- #endif
+ {
+ oap->start.lnum = start_lnum;
+ oap->start.col = 0;
+--- 4116,4121 ----
+***************
+*** 4247,4253 ****
+ int col_end;
+ int col_start = curwin->w_cursor.col;
+ int inclusive = FALSE;
+- #ifdef FEAT_VISUAL
+ int vis_empty = TRUE; /* Visual selection <= 1 char */
+ int vis_bef_curs = FALSE; /* Visual starts before cursor */
+ int inside_quotes = FALSE; /* Looks like "i'" done before */
+--- 4213,4218 ----
+***************
+*** 4331,4347 ****
+ }
+ }
+ else
+- #endif
+
+! if (line[col_start] == quotechar
+! #ifdef FEAT_VISUAL
+! || !vis_empty
+! #endif
+! )
+ {
+ int first_col = col_start;
+
+- #ifdef FEAT_VISUAL
+ if (!vis_empty)
+ {
+ if (vis_bef_curs)
+--- 4296,4306 ----
+ }
+ }
+ else
+
+! if (line[col_start] == quotechar || !vis_empty)
+ {
+ int first_col = col_start;
+
+ if (!vis_empty)
+ {
+ if (vis_bef_curs)
+***************
+*** 4349,4355 ****
+ else
+ first_col = find_prev_quote(line, col_start, quotechar, NULL);
+ }
+! #endif
+ /* The cursor is on a quote, we don't know if it's the opening or
+ * closing quote. Search from the start of the line to find out.
+ * Also do this when there is a Visual area, a' may leave the cursor
+--- 4308,4314 ----
+ else
+ first_col = find_prev_quote(line, col_start, quotechar, NULL);
+ }
+!
+ /* The cursor is on a quote, we don't know if it's the opening or
+ * closing quote. Search from the start of the line to find out.
+ * Also do this when there is a Visual area, a' may leave the cursor
+***************
+*** 4406,4419 ****
+
+ /* Set start position. After vi" another i" must include the ".
+ * For v2i" include the quotes. */
+! if (!include && count < 2
+! #ifdef FEAT_VISUAL
+! && (vis_empty || !inside_quotes)
+! #endif
+! )
+ ++col_start;
+ curwin->w_cursor.col = col_start;
+- #ifdef FEAT_VISUAL
+ if (VIsual_active)
+ {
+ /* Set the start of the Visual area when the Visual area was empty, we
+--- 4365,4373 ----
+
+ /* Set start position. After vi" another i" must include the ".
+ * For v2i" include the quotes. */
+! if (!include && count < 2 && (vis_empty || !inside_quotes))
+ ++col_start;
+ curwin->w_cursor.col = col_start;
+ if (VIsual_active)
+ {
+ /* Set the start of the Visual area when the Visual area was empty, we
+***************
+*** 4433,4439 ****
+ }
+ }
+ else
+- #endif
+ {
+ oap->start = curwin->w_cursor;
+ oap->motion_type = MCHAR;
+--- 4387,4392 ----
+***************
+*** 4441,4454 ****
+
+ /* Set end position. */
+ curwin->w_cursor.col = col_end;
+! if ((include || count > 1
+! #ifdef FEAT_VISUAL
+! /* After vi" another i" must include the ". */
+ || (!vis_empty && inside_quotes)
+- #endif
+ ) && inc_cursor() == 2)
+ inclusive = TRUE;
+- #ifdef FEAT_VISUAL
+ if (VIsual_active)
+ {
+ if (vis_empty || vis_bef_curs)
+--- 4394,4403 ----
+
+ /* Set end position. */
+ curwin->w_cursor.col = col_end;
+! if ((include || count > 1 /* After vi" another i" must include the ". */
+ || (!vis_empty && inside_quotes)
+ ) && inc_cursor() == 2)
+ inclusive = TRUE;
+ if (VIsual_active)
+ {
+ if (vis_empty || vis_bef_curs)
+***************
+*** 4480,4486 ****
+ }
+ }
+ else
+- #endif
+ {
+ /* Set inclusive and other oap's flags. */
+ oap->inclusive = inclusive;
+--- 4429,4434 ----
+***************
+*** 4491,4497 ****
+
+ #endif /* FEAT_TEXTOBJ */
+
+- #if defined(FEAT_VISUAL) || defined(PROTO)
+ static int is_one_char __ARGS((char_u *pattern));
+
+ /*
+--- 4439,4444 ----
+***************
+*** 4690,4696 ****
+ vim_regfree(regmatch.regprog);
+ return result;
+ }
+- #endif /* FEAT_VISUAL */
+
+ #if defined(FEAT_LISP) || defined(FEAT_CINDENT) || defined(FEAT_TEXTOBJ) \
+ || defined(PROTO)
+--- 4637,4642 ----
+*** ../vim-7.4.211/src/spell.c 2014-03-08 16:13:39.123462070 +0100
+--- src/spell.c 2014-03-23 13:35:15.195174931 +0100
+***************
+*** 10191,10197 ****
+ if (no_spell_checking(curwin))
+ return;
+
+- #ifdef FEAT_VISUAL
+ if (VIsual_active)
+ {
+ /* Use the Visually selected text as the bad word. But reject
+--- 10191,10196 ----
+***************
+*** 10209,10218 ****
+ ++badlen;
+ end_visual_mode();
+ }
+! else
+! #endif
+! /* Find the start of the badly spelled word. */
+! if (spell_move_to(curwin, FORWARD, TRUE, TRUE, NULL) == 0
+ || curwin->w_cursor.col > prev_cursor.col)
+ {
+ /* No bad word or it starts after the cursor: use the word under the
+--- 10208,10215 ----
+ ++badlen;
+ end_visual_mode();
+ }
+! /* Find the start of the badly spelled word. */
+! else if (spell_move_to(curwin, FORWARD, TRUE, TRUE, NULL) == 0
+ || curwin->w_cursor.col > prev_cursor.col)
+ {
+ /* No bad word or it starts after the cursor: use the word under the
+*** ../vim-7.4.211/src/syntax.c 2013-11-28 18:53:47.000000000 +0100
+--- src/syntax.c 2014-03-23 13:35:30.379175164 +0100
+***************
+*** 6837,6846 ****
+ CENT("SignColumn term=standout ctermbg=Grey ctermfg=DarkBlue",
+ "SignColumn term=standout ctermbg=Grey ctermfg=DarkBlue guibg=Grey guifg=DarkBlue"),
+ #endif
+- #ifdef FEAT_VISUAL
+ CENT("Visual term=reverse",
+ "Visual term=reverse guibg=LightGrey"),
+- #endif
+ #ifdef FEAT_DIFF
+ CENT("DiffAdd term=bold ctermbg=LightBlue",
+ "DiffAdd term=bold ctermbg=LightBlue guibg=LightBlue"),
+--- 6837,6844 ----
+***************
+*** 6927,6936 ****
+ CENT("SignColumn term=standout ctermbg=DarkGrey ctermfg=Cyan",
+ "SignColumn term=standout ctermbg=DarkGrey ctermfg=Cyan guibg=Grey guifg=Cyan"),
+ #endif
+- #ifdef FEAT_VISUAL
+ CENT("Visual term=reverse",
+ "Visual term=reverse guibg=DarkGrey"),
+- #endif
+ #ifdef FEAT_DIFF
+ CENT("DiffAdd term=bold ctermbg=DarkBlue",
+ "DiffAdd term=bold ctermbg=DarkBlue guibg=DarkBlue"),
+--- 6925,6932 ----
+*** ../vim-7.4.211/src/term.c 2014-03-19 14:01:53.153903819 +0100
+--- src/term.c 2014-03-23 13:35:43.519175365 +0100
+***************
+*** 3456,3467 ****
+ return;
+ }
+
+- # ifdef FEAT_VISUAL
+ if (VIsual_active)
+ checkfor = MOUSE_VISUAL;
+! else
+! # endif
+! if (State == HITRETURN || State == ASKMORE || State == SETWSIZE)
+ checkfor = MOUSE_RETURN;
+ else if (State & INSERT)
+ checkfor = MOUSE_INSERT;
+--- 3456,3464 ----
+ return;
+ }
+
+ if (VIsual_active)
+ checkfor = MOUSE_VISUAL;
+! else if (State == HITRETURN || State == ASKMORE || State == SETWSIZE)
+ checkfor = MOUSE_RETURN;
+ else if (State & INSERT)
+ checkfor = MOUSE_INSERT;
+*** ../vim-7.4.211/src/ui.c 2013-07-13 20:57:08.000000000 +0200
+--- src/ui.c 2014-03-23 13:36:15.459175855 +0100
+***************
+*** 2610,2622 ****
+ if (on_sep_line)
+ return IN_SEP_LINE;
+ #endif
+- #ifdef FEAT_VISUAL
+ if (flags & MOUSE_MAY_STOP_VIS)
+ {
+ end_visual_mode();
+ redraw_curbuf_later(INVERTED); /* delete the inversion */
+ }
+- #endif
+ #if defined(FEAT_CMDWIN) && defined(FEAT_CLIPBOARD)
+ /* Continue a modeless selection in another window. */
+ if (cmdwin_type != 0 && row < W_WINROW(curwin))
+--- 2610,2620 ----
+***************
+*** 2686,2717 ****
+ }
+ #endif
+
+- #ifdef FEAT_VISUAL
+ /* Before jumping to another buffer, or moving the cursor for a left
+ * click, stop Visual mode. */
+ if (VIsual_active
+ && (wp->w_buffer != curwin->w_buffer
+ || (!on_status_line
+! # ifdef FEAT_VERTSPLIT
+ && !on_sep_line
+! # endif
+! # ifdef FEAT_FOLDING
+ && (
+! # ifdef FEAT_RIGHTLEFT
+ wp->w_p_rl ? col < W_WIDTH(wp) - wp->w_p_fdc :
+! # endif
+ col >= wp->w_p_fdc
+! # ifdef FEAT_CMDWIN
+ + (cmdwin_type == 0 && wp == curwin ? 0 : 1)
+- # endif
+- )
+ # endif
+ && (flags & MOUSE_MAY_STOP_VIS))))
+ {
+ end_visual_mode();
+ redraw_curbuf_later(INVERTED); /* delete the inversion */
+ }
+- #endif
+ #ifdef FEAT_CMDWIN
+ if (cmdwin_type != 0 && wp != curwin)
+ {
+--- 2684,2713 ----
+ }
+ #endif
+
+ /* Before jumping to another buffer, or moving the cursor for a left
+ * click, stop Visual mode. */
+ if (VIsual_active
+ && (wp->w_buffer != curwin->w_buffer
+ || (!on_status_line
+! #ifdef FEAT_VERTSPLIT
+ && !on_sep_line
+! #endif
+! #ifdef FEAT_FOLDING
+ && (
+! # ifdef FEAT_RIGHTLEFT
+ wp->w_p_rl ? col < W_WIDTH(wp) - wp->w_p_fdc :
+! # endif
+ col >= wp->w_p_fdc
+! # ifdef FEAT_CMDWIN
+ + (cmdwin_type == 0 && wp == curwin ? 0 : 1)
+ # endif
++ )
++ #endif
+ && (flags & MOUSE_MAY_STOP_VIS))))
+ {
+ end_visual_mode();
+ redraw_curbuf_later(INVERTED); /* delete the inversion */
+ }
+ #ifdef FEAT_CMDWIN
+ if (cmdwin_type != 0 && wp != curwin)
+ {
+***************
+*** 2801,2814 ****
+ #endif
+ else /* keep_window_focus must be TRUE */
+ {
+- #ifdef FEAT_VISUAL
+ /* before moving the cursor for a left click, stop Visual mode */
+ if (flags & MOUSE_MAY_STOP_VIS)
+ {
+ end_visual_mode();
+ redraw_curbuf_later(INVERTED); /* delete the inversion */
+ }
+- #endif
+
+ #if defined(FEAT_CMDWIN) && defined(FEAT_CLIPBOARD)
+ /* Continue a modeless selection in another window. */
+--- 2797,2808 ----
+***************
+*** 2933,2939 ****
+ if (mouse_comp_pos(curwin, &row, &col, &curwin->w_cursor.lnum))
+ mouse_past_bottom = TRUE;
+
+- #ifdef FEAT_VISUAL
+ /* Start Visual mode before coladvance(), for when 'sel' != "old" */
+ if ((flags & MOUSE_MAY_VIS) && !VIsual_active)
+ {
+--- 2927,2932 ----
+***************
+*** 2947,2953 ****
+ if (p_smd && msg_silent == 0)
+ redraw_cmdline = TRUE; /* show visual mode later */
+ }
+- #endif
+
+ curwin->w_curswant = col;
+ curwin->w_set_curswant = FALSE; /* May still have been TRUE */
+--- 2940,2945 ----
+*** ../vim-7.4.211/src/undo.c 2014-03-12 16:51:35.060792541 +0100
+--- src/undo.c 2014-03-23 13:37:05.435176620 +0100
+***************
+*** 532,540 ****
+
+ /* save named marks and Visual marks for undo */
+ mch_memmove(uhp->uh_namedm, curbuf->b_namedm, sizeof(pos_T) * NMARKS);
+- #ifdef FEAT_VISUAL
+ uhp->uh_visual = curbuf->b_visual;
+- #endif
+
+ curbuf->b_u_newhead = uhp;
+ if (curbuf->b_u_oldhead == NULL)
+--- 532,538 ----
+***************
+*** 1014,1029 ****
+ /* Assume NMARKS will stay the same. */
+ for (i = 0; i < NMARKS; ++i)
+ serialize_pos(uhp->uh_namedm[i], fp);
+- #ifdef FEAT_VISUAL
+ serialize_visualinfo(&uhp->uh_visual, fp);
+- #else
+- {
+- visualinfo_T info;
+-
+- memset(&info, 0, sizeof(visualinfo_T));
+- serialize_visualinfo(&info, fp);
+- }
+- #endif
+ put_time(fp, uhp->uh_time);
+
+ /* Optional fields. */
+--- 1012,1018 ----
+***************
+*** 1082,1095 ****
+ uhp->uh_flags = get2c(fp);
+ for (i = 0; i < NMARKS; ++i)
+ unserialize_pos(&uhp->uh_namedm[i], fp);
+- #ifdef FEAT_VISUAL
+ unserialize_visualinfo(&uhp->uh_visual, fp);
+- #else
+- {
+- visualinfo_T info;
+- unserialize_visualinfo(&info, fp);
+- }
+- #endif
+ uhp->uh_time = get8ctime(fp);
+
+ /* Optional fields. */
+--- 1071,1077 ----
+***************
+*** 2406,2414 ****
+ int old_flags;
+ int new_flags;
+ pos_T namedm[NMARKS];
+- #ifdef FEAT_VISUAL
+ visualinfo_T visualinfo;
+- #endif
+ int empty_buffer; /* buffer became empty */
+ u_header_T *curhead = curbuf->b_u_curhead;
+
+--- 2388,2394 ----
+***************
+*** 2430,2438 ****
+ * save marks before undo/redo
+ */
+ mch_memmove(namedm, curbuf->b_namedm, sizeof(pos_T) * NMARKS);
+- #ifdef FEAT_VISUAL
+ visualinfo = curbuf->b_visual;
+- #endif
+ curbuf->b_op_start.lnum = curbuf->b_ml.ml_line_count;
+ curbuf->b_op_start.col = 0;
+ curbuf->b_op_end.lnum = 0;
+--- 2410,2416 ----
+***************
+*** 2602,2614 ****
+ curbuf->b_namedm[i] = curhead->uh_namedm[i];
+ curhead->uh_namedm[i] = namedm[i];
+ }
+- #ifdef FEAT_VISUAL
+ if (curhead->uh_visual.vi_start.lnum != 0)
+ {
+ curbuf->b_visual = curhead->uh_visual;
+ curhead->uh_visual = visualinfo;
+ }
+- #endif
+
+ /*
+ * If the cursor is only off by one line, put it at the same position as
+--- 2580,2590 ----
+*** ../vim-7.4.211/src/version.c 2014-03-22 13:29:57.693846167 +0100
+--- src/version.c 2014-03-23 15:01:49.719254526 +0100
+***************
+*** 642,656 ****
+ #else
+ "-virtualedit",
+ #endif
+- #ifdef FEAT_VISUAL
+ "+visual",
+! # ifdef FEAT_VISUALEXTRA
+ "+visualextra",
+- # else
+- "-visualextra",
+- # endif
+ #else
+! "-visual",
+ #endif
+ #ifdef FEAT_VIMINFO
+ "+viminfo",
+--- 642,652 ----
+ #else
+ "-virtualedit",
+ #endif
+ "+visual",
+! #ifdef FEAT_VISUALEXTRA
+ "+visualextra",
+ #else
+! "-visualextra",
+ #endif
+ #ifdef FEAT_VIMINFO
+ "+viminfo",
+*** ../vim-7.4.211/src/window.c 2014-01-10 15:53:09.000000000 +0100
+--- src/window.c 2014-03-23 13:38:17.767177729 +0100
+***************
+*** 130,138 ****
+ case Ctrl_S:
+ case 's':
+ CHECK_CMDWIN
+- #ifdef FEAT_VISUAL
+ reset_VIsual_and_resel(); /* stop Visual mode */
+- #endif
+ #ifdef FEAT_QUICKFIX
+ /* When splitting the quickfix window open a new buffer in it,
+ * don't replicate the quickfix buffer. */
+--- 130,136 ----
+***************
+*** 150,158 ****
+ case Ctrl_V:
+ case 'v':
+ CHECK_CMDWIN
+- # ifdef FEAT_VISUAL
+ reset_VIsual_and_resel(); /* stop Visual mode */
+- # endif
+ # ifdef FEAT_QUICKFIX
+ /* When splitting the quickfix window open a new buffer in it,
+ * don't replicate the quickfix buffer. */
+--- 148,154 ----
+***************
+*** 170,178 ****
+ case Ctrl_HAT:
+ case '^':
+ CHECK_CMDWIN
+- #ifdef FEAT_VISUAL
+ reset_VIsual_and_resel(); /* stop Visual mode */
+- #endif
+ STRCPY(cbuf, "split #");
+ if (Prenum)
+ vim_snprintf((char *)cbuf + 7, sizeof(cbuf) - 7,
+--- 166,172 ----
+***************
+*** 184,192 ****
+ case Ctrl_N:
+ case 'n':
+ CHECK_CMDWIN
+- #ifdef FEAT_VISUAL
+ reset_VIsual_and_resel(); /* stop Visual mode */
+- #endif
+ #ifdef FEAT_QUICKFIX
+ newwindow:
+ #endif
+--- 178,184 ----
+***************
+*** 206,223 ****
+ /* quit current window */
+ case Ctrl_Q:
+ case 'q':
+- #ifdef FEAT_VISUAL
+ reset_VIsual_and_resel(); /* stop Visual mode */
+- #endif
+ do_cmdline_cmd((char_u *)"quit");
+ break;
+
+ /* close current window */
+ case Ctrl_C:
+ case 'c':
+- #ifdef FEAT_VISUAL
+ reset_VIsual_and_resel(); /* stop Visual mode */
+- #endif
+ do_cmdline_cmd((char_u *)"close");
+ break;
+
+--- 198,211 ----
+***************
+*** 226,234 ****
+ case Ctrl_Z:
+ case 'z':
+ CHECK_CMDWIN
+- #ifdef FEAT_VISUAL
+ reset_VIsual_and_resel(); /* stop Visual mode */
+- #endif
+ do_cmdline_cmd((char_u *)"pclose");
+ break;
+
+--- 214,220 ----
+***************
+*** 248,256 ****
+ case Ctrl_O:
+ case 'o':
+ CHECK_CMDWIN
+- #ifdef FEAT_VISUAL
+ reset_VIsual_and_resel(); /* stop Visual mode */
+- #endif
+ do_cmdline_cmd((char_u *)"only");
+ break;
+
+--- 234,240 ----
+***************
+*** 399,416 ****
+ case Ctrl_R:
+ case 'r':
+ CHECK_CMDWIN
+- #ifdef FEAT_VISUAL
+ reset_VIsual_and_resel(); /* stop Visual mode */
+- #endif
+ win_rotate(FALSE, (int)Prenum1); /* downwards */
+ break;
+
+ /* rotate windows upwards */
+ case 'R':
+ CHECK_CMDWIN
+- #ifdef FEAT_VISUAL
+ reset_VIsual_and_resel(); /* stop Visual mode */
+- #endif
+ win_rotate(TRUE, (int)Prenum1); /* upwards */
+ break;
+
+--- 383,396 ----
+***************
+*** 499,507 ****
+ case ']':
+ case Ctrl_RSB:
+ CHECK_CMDWIN
+- #ifdef FEAT_VISUAL
+ reset_VIsual_and_resel(); /* stop Visual mode */
+- #endif
+ if (Prenum)
+ postponed_split = Prenum;
+ else
+--- 479,485 ----
+***************
+*** 612,620 ****
+ #endif
+ case ']':
+ case Ctrl_RSB:
+- #ifdef FEAT_VISUAL
+ reset_VIsual_and_resel(); /* stop Visual mode */
+- #endif
+ if (Prenum)
+ postponed_split = Prenum;
+ else
+--- 590,596 ----
+***************
+*** 3726,3734 ****
+ {
+ tabpage_T *tp = curtab;
+
+- #ifdef FEAT_VISUAL
+ reset_VIsual_and_resel(); /* stop Visual mode */
+- #endif
+ #ifdef FEAT_AUTOCMD
+ if (trigger_leave_autocmds)
+ {
+--- 3702,3708 ----
+***************
+*** 4029,4040 ****
+ return;
+ #endif
+
+- #ifdef FEAT_VISUAL
+ if (wp->w_buffer != curbuf)
+ reset_VIsual_and_resel();
+ else if (VIsual_active)
+ wp->w_cursor = curwin->w_cursor;
+- #endif
+
+ #ifdef FEAT_GUI
+ need_mouse_correct = TRUE;
+--- 4003,4012 ----
+***************
+*** 6037,6043 ****
+ long count;
+ linenr_T *file_lnum;
+ {
+- # ifdef FEAT_VISUAL
+ if (VIsual_active)
+ {
+ int len;
+--- 6009,6014 ----
+***************
+*** 6048,6054 ****
+ return find_file_name_in_path(ptr, len,
+ FNAME_MESS|FNAME_EXP|FNAME_REL, count, curbuf->b_ffname);
+ }
+- # endif
+ return file_name_at_cursor(FNAME_MESS|FNAME_HYP|FNAME_EXP|FNAME_REL, count,
+ file_lnum);
+
+--- 6019,6024 ----
+*** ../vim-7.4.211/src/feature.h 2014-03-12 17:56:42.960852421 +0100
+--- src/feature.h 2014-03-23 13:39:02.003178407 +0100
+***************
+*** 214,220 ****
+ * +visual Visual mode - now always included.
+ * +visualextra Extra features for Visual mode (mostly block operators).
+ */
+- #define FEAT_VISUAL
+ #ifdef FEAT_NORMAL
+ # define FEAT_VISUALEXTRA
+ #endif
+--- 214,219 ----
+***************
+*** 1138,1150 ****
+ #ifdef FEAT_GUI
+ # ifndef FEAT_CLIPBOARD
+ # define FEAT_CLIPBOARD
+- # ifndef FEAT_VISUAL
+- # define FEAT_VISUAL
+- # endif
+ # endif
+ #endif
+
+! #if defined(FEAT_NORMAL) && defined(FEAT_VISUAL) \
+ && (defined(UNIX) || defined(VMS)) \
+ && defined(WANT_X11) && defined(HAVE_X11)
+ # define FEAT_XCLIPBOARD
+--- 1137,1146 ----
+ #ifdef FEAT_GUI
+ # ifndef FEAT_CLIPBOARD
+ # define FEAT_CLIPBOARD
+ # endif
+ #endif
+
+! #if defined(FEAT_NORMAL) \
+ && (defined(UNIX) || defined(VMS)) \
+ && defined(WANT_X11) && defined(HAVE_X11)
+ # define FEAT_XCLIPBOARD
+*** ../vim-7.4.211/src/globals.h 2014-02-22 23:03:48.712901208 +0100
+--- src/globals.h 2014-03-23 13:39:17.407178643 +0100
+***************
+*** 662,668 ****
+ /* set to TRUE when "-s" commandline argument
+ * used for ex */
+
+- #ifdef FEAT_VISUAL
+ EXTERN pos_T VIsual; /* start position of active Visual selection */
+ EXTERN int VIsual_active INIT(= FALSE);
+ /* whether Visual mode is active */
+--- 662,667 ----
+***************
+*** 677,683 ****
+
+ EXTERN int redo_VIsual_busy INIT(= FALSE);
+ /* TRUE when redoing Visual */
+- #endif
+
+ #ifdef FEAT_MOUSE
+ /*
+--- 676,681 ----
+***************
+*** 1178,1188 ****
+ EXTERN int fill_diff INIT(= '-');
+ #endif
+
+- #ifdef FEAT_VISUAL
+ /* Whether 'keymodel' contains "stopsel" and "startsel". */
+ EXTERN int km_stopsel INIT(= FALSE);
+ EXTERN int km_startsel INIT(= FALSE);
+- #endif
+
+ #ifdef FEAT_CMDWIN
+ EXTERN int cedit_key INIT(= -1); /* key value of 'cedit' option */
+--- 1176,1184 ----
+*** ../vim-7.4.211/src/option.h 2014-03-12 18:55:52.104906804 +0100
+--- src/option.h 2014-03-23 13:39:30.991178851 +0100
+***************
+*** 572,580 ****
+ EXTERN char_u *p_isp; /* 'isprint' */
+ EXTERN int p_js; /* 'joinspaces' */
+ EXTERN char_u *p_kp; /* 'keywordprg' */
+- #ifdef FEAT_VISUAL
+ EXTERN char_u *p_km; /* 'keymodel' */
+- #endif
+ #ifdef FEAT_LANGMAP
+ EXTERN char_u *p_langmap; /* 'langmap'*/
+ #endif
+--- 572,578 ----
+***************
+*** 681,690 ****
+ #endif
+ EXTERN char_u *p_sections; /* 'sections' */
+ EXTERN int p_secure; /* 'secure' */
+- #ifdef FEAT_VISUAL
+ EXTERN char_u *p_sel; /* 'selection' */
+ EXTERN char_u *p_slm; /* 'selectmode' */
+- #endif
+ #ifdef FEAT_SESSION
+ EXTERN char_u *p_ssop; /* 'sessionoptions' */
+ EXTERN unsigned ssop_flags;
+--- 679,686 ----
+*** ../vim-7.4.211/src/os_win32.h 2013-09-25 19:13:32.000000000 +0200
+--- src/os_win32.h 2014-03-23 13:39:49.819179139 +0100
+***************
+*** 68,74 ****
+ #endif
+
+ #define USE_FNAME_CASE /* adjust case of file names */
+! #if !defined(FEAT_CLIPBOARD) && defined(FEAT_VISUAL) && defined(FEAT_MOUSE)
+ # define FEAT_CLIPBOARD /* include clipboard support */
+ #endif
+ #if defined(__DATE__) && defined(__TIME__)
+--- 68,74 ----
+ #endif
+
+ #define USE_FNAME_CASE /* adjust case of file names */
+! #if !defined(FEAT_CLIPBOARD) && defined(FEAT_MOUSE)
+ # define FEAT_CLIPBOARD /* include clipboard support */
+ #endif
+ #if defined(__DATE__) && defined(__TIME__)
+*** ../vim-7.4.211/src/structs.h 2014-03-12 18:55:52.104906804 +0100
+--- src/structs.h 2014-03-23 13:40:19.175179589 +0100
+***************
+*** 346,354 ****
+ #endif
+ int uh_flags; /* see below */
+ pos_T uh_namedm[NMARKS]; /* marks before undo/after redo */
+- #ifdef FEAT_VISUAL
+ visualinfo_T uh_visual; /* Visual areas before undo/after redo */
+- #endif
+ time_t uh_time; /* timestamp when the change was made */
+ long uh_save_nr; /* set when the file was saved after the
+ changes in this block */
+--- 346,352 ----
+***************
+*** 1406,1417 ****
+
+ pos_T b_namedm[NMARKS]; /* current named marks (mark.c) */
+
+- #ifdef FEAT_VISUAL
+ /* These variables are set when VIsual_active becomes FALSE */
+ visualinfo_T b_visual;
+! # ifdef FEAT_EVAL
+ int b_visual_mode_eval; /* b_visual.vi_mode for visualmode() */
+- # endif
+ #endif
+
+ pos_T b_last_cursor; /* cursor position when last unloading this
+--- 1404,1413 ----
+
+ pos_T b_namedm[NMARKS]; /* current named marks (mark.c) */
+
+ /* These variables are set when VIsual_active becomes FALSE */
+ visualinfo_T b_visual;
+! #ifdef FEAT_EVAL
+ int b_visual_mode_eval; /* b_visual.vi_mode for visualmode() */
+ #endif
+
+ pos_T b_last_cursor; /* cursor position when last unloading this
+***************
+*** 1980,1986 ****
+ time through cursupdate() to the
+ current virtual column */
+
+- #ifdef FEAT_VISUAL
+ /*
+ * the next six are used to update the visual part
+ */
+--- 1976,1981 ----
+***************
+*** 1991,1997 ****
+ linenr_T w_old_visual_lnum; /* last known start of visual part */
+ colnr_T w_old_visual_col; /* last known start of visual part */
+ colnr_T w_old_curswant; /* last known value of Curswant */
+- #endif
+
+ /*
+ * "w_topline", "w_leftcol" and "w_skipcol" specify the offsets for
+--- 1986,1991 ----
+***************
+*** 2293,2302 ****
+ (inclusive) */
+ int empty; /* op_start and op_end the same (only used by
+ do_change()) */
+- #ifdef FEAT_VISUAL
+ int is_VIsual; /* operator on Visual area */
+ int block_mode; /* current operator is Visual block mode */
+- #endif
+ colnr_T start_vcol; /* start col for block mode operator */
+ colnr_T end_vcol; /* end col for block mode operator */
+ #ifdef FEAT_AUTOCMD
+--- 2287,2294 ----
+*** ../vim-7.4.211/src/version.c 2014-03-22 13:29:57.693846167 +0100
+--- src/version.c 2014-03-23 15:01:49.719254526 +0100
+***************
+*** 740,741 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 212,
+ /**/
+
+--
+If all you have is a hammer, everything looks like a nail.
+When your hammer is C++, everything begins to look like a thumb.
+ -- Steve Hoflich, comp.lang.c++
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.213 b/patches/source/vim/patches/7.4.213
new file mode 100644
index 000000000..1d0f55ce0
--- /dev/null
+++ b/patches/source/vim/patches/7.4.213
@@ -0,0 +1,211 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.213
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.213
+Problem: It's not possible to open a new buffer without creating a swap
+ file.
+Solution: Add the ":noswapfile" modifier. (Christian Brabandt)
+Files: runtime/doc/recover.txt, src/ex_cmds.h, src/ex_docmd.c,
+ src/memline.c, src/structs.h
+
+
+*** ../vim-7.4.212/runtime/doc/recover.txt 2013-08-10 13:25:00.000000000 +0200
+--- runtime/doc/recover.txt 2014-03-23 16:01:59.655309841 +0100
+***************
+*** 81,87 ****
+ 'maxmemtot'. And when making a change to a read-only file, the swap file is
+ created anyway.
+
+! The 'swapfile' option can be reset to avoid creating a swapfile.
+
+
+ Detecting an existing swap file ~
+--- 81,94 ----
+ 'maxmemtot'. And when making a change to a read-only file, the swap file is
+ created anyway.
+
+! The 'swapfile' option can be reset to avoid creating a swapfile. And the
+! |:noswapfile| modifier can be used to not create a swapfile for a new buffer.
+!
+! :noswap[file] {command} *:noswap* *:noswapfile*
+! Execute {command}. If it contains a command that loads a new
+! buffer, it will be loaded without creating a swapfile and the
+! 'swapfile' option will be reset. If a buffer already had a
+! swapfile it is not removed and 'swapfile' is not reset.
+
+
+ Detecting an existing swap file ~
+*** ../vim-7.4.212/src/ex_cmds.h 2014-03-22 13:29:57.693846167 +0100
+--- src/ex_cmds.h 2014-03-23 15:36:42.399286592 +0100
+***************
+*** 655,660 ****
+--- 655,662 ----
+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
+ EX(CMD_noremenu, "noremenu", ex_menu,
+ RANGE|NOTADR|ZEROR|BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
++ EX(CMD_noswapfile, "noswapfile", ex_wrongmodifier,
++ NEEDARG|EXTRA|NOTRLCOM),
+ EX(CMD_normal, "normal", ex_normal,
+ RANGE|BANG|EXTRA|NEEDARG|NOTRLCOM|USECTRLV|SBOXOK|CMDWIN),
+ EX(CMD_number, "number", ex_print,
+*** ../vim-7.4.212/src/ex_docmd.c 2014-03-23 15:12:29.919264336 +0100
+--- src/ex_docmd.c 2014-03-23 15:44:42.335293946 +0100
+***************
+*** 1874,1891 ****
+ #endif
+ continue;
+
+! case 'n': if (!checkforcmd(&ea.cmd, "noautocmd", 3))
+! break;
+! #ifdef FEAT_AUTOCMD
+! if (cmdmod.save_ei == NULL)
+ {
+! /* Set 'eventignore' to "all". Restore the
+! * existing option value later. */
+! cmdmod.save_ei = vim_strsave(p_ei);
+! set_string_option_direct((char_u *)"ei", -1,
+ (char_u *)"all", OPT_FREE, SID_NONE);
+! }
+ #endif
+ continue;
+
+ case 'r': if (!checkforcmd(&ea.cmd, "rightbelow", 6))
+--- 1874,1896 ----
+ #endif
+ continue;
+
+! case 'n': if (checkforcmd(&ea.cmd, "noautocmd", 3))
+ {
+! #ifdef FEAT_AUTOCMD
+! if (cmdmod.save_ei == NULL)
+! {
+! /* Set 'eventignore' to "all". Restore the
+! * existing option value later. */
+! cmdmod.save_ei = vim_strsave(p_ei);
+! set_string_option_direct((char_u *)"ei", -1,
+ (char_u *)"all", OPT_FREE, SID_NONE);
+! }
+ #endif
++ continue;
++ }
++ if (!checkforcmd(&ea.cmd, "noswapfile", 6))
++ break;
++ cmdmod.noswapfile = TRUE;
+ continue;
+
+ case 'r': if (!checkforcmd(&ea.cmd, "rightbelow", 6))
+***************
+*** 2596,2601 ****
+--- 2601,2608 ----
+ case CMD_lua:
+ case CMD_match:
+ case CMD_mzscheme:
++ case CMD_noautocmd:
++ case CMD_noswapfile:
+ case CMD_perl:
+ case CMD_psearch:
+ case CMD_python:
+***************
+*** 3099,3104 ****
+--- 3106,3112 ----
+ {"leftabove", 5, FALSE},
+ {"lockmarks", 3, FALSE},
+ {"noautocmd", 3, FALSE},
++ {"noswapfile", 3, FALSE},
+ {"rightbelow", 6, FALSE},
+ {"sandbox", 3, FALSE},
+ {"silent", 3, FALSE},
+***************
+*** 3611,3616 ****
+--- 3619,3626 ----
+ case CMD_keeppatterns:
+ case CMD_leftabove:
+ case CMD_lockmarks:
++ case CMD_noautocmd:
++ case CMD_noswapfile:
+ case CMD_rightbelow:
+ case CMD_sandbox:
+ case CMD_silent:
+*** ../vim-7.4.212/src/memline.c 2014-02-11 15:23:27.942123631 +0100
+--- src/memline.c 2014-03-23 15:48:05.679297062 +0100
+***************
+*** 289,294 ****
+--- 289,297 ----
+ buf->b_ml.ml_chunksize = NULL;
+ #endif
+
++ if (cmdmod.noswapfile)
++ buf->b_p_swf = FALSE;
++
+ /*
+ * When 'updatecount' is non-zero swap file may be opened later.
+ */
+***************
+*** 606,612 ****
+ * When 'updatecount' is 0 and 'noswapfile' there is no swap file.
+ * For help files we will make a swap file now.
+ */
+! if (p_uc != 0)
+ ml_open_file(buf); /* create a swap file */
+ return;
+ }
+--- 609,615 ----
+ * When 'updatecount' is 0 and 'noswapfile' there is no swap file.
+ * For help files we will make a swap file now.
+ */
+! if (p_uc != 0 && !cmdmod.noswapfile)
+ ml_open_file(buf); /* create a swap file */
+ return;
+ }
+***************
+*** 719,725 ****
+ char_u *dirp;
+
+ mfp = buf->b_ml.ml_mfp;
+! if (mfp == NULL || mfp->mf_fd >= 0 || !buf->b_p_swf)
+ return; /* nothing to do */
+
+ #ifdef FEAT_SPELL
+--- 722,728 ----
+ char_u *dirp;
+
+ mfp = buf->b_ml.ml_mfp;
+! if (mfp == NULL || mfp->mf_fd >= 0 || !buf->b_p_swf || cmdmod.noswapfile)
+ return; /* nothing to do */
+
+ #ifdef FEAT_SPELL
+*** ../vim-7.4.212/src/structs.h 2014-03-23 15:12:29.943264337 +0100
+--- src/structs.h 2014-03-23 15:36:42.407286592 +0100
+***************
+*** 545,550 ****
+--- 545,551 ----
+ int keepjumps; /* TRUE when ":keepjumps" was used */
+ int lockmarks; /* TRUE when ":lockmarks" was used */
+ int keeppatterns; /* TRUE when ":keeppatterns" was used */
++ int noswapfile; /* TRUE when ":noswapfile" was used */
+ # ifdef FEAT_AUTOCMD
+ char_u *save_ei; /* saved value of 'eventignore' */
+ # endif
+*** ../vim-7.4.212/src/version.c 2014-03-23 15:12:29.943264337 +0100
+--- src/version.c 2014-03-23 16:02:16.519310100 +0100
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 213,
+ /**/
+
+--
+Looking at Perl through Lisp glasses, Perl looks atrocious.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.214 b/patches/source/vim/patches/7.4.214
new file mode 100644
index 000000000..bdce8be6e
--- /dev/null
+++ b/patches/source/vim/patches/7.4.214
@@ -0,0 +1,50 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.214
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.214
+Problem: Compilation problems on HP_nonStop (Tandem).
+Solution: Add #defines. (Joachim Schmitz)
+Files: src/vim.h
+
+
+*** ../vim-7.4.213/src/vim.h 2014-02-23 22:52:33.352764716 +0100
+--- src/vim.h 2014-03-24 17:25:40.328710672 +0100
+***************
+*** 77,82 ****
+--- 77,86 ----
+ # endif
+ # include <floss.h>
+ # define ROOT_UID 65535
++ # define OLDXAW
++ # if (_TANDEM_ARCH_ == 2 && __H_Series_RVU >= 621)
++ # define SA_ONSTACK_COMPATIBILITY
++ # endif
+ #else
+ # define ROOT_UID 0
+ #endif
+*** ../vim-7.4.213/src/version.c 2014-03-23 16:03:56.171311627 +0100
+--- src/version.c 2014-03-24 17:26:50.976711754 +0100
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 214,
+ /**/
+
+--
+ARTHUR: You are indeed brave Sir knight, but the fight is mine.
+BLACK KNIGHT: Had enough?
+ARTHUR: You stupid bastard. You havn't got any arms left.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.215 b/patches/source/vim/patches/7.4.215
new file mode 100644
index 000000000..ff65a627e
--- /dev/null
+++ b/patches/source/vim/patches/7.4.215
@@ -0,0 +1,87 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.215
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.215
+Problem: Inconsistency: ":sp foo" does not reload "foo", unless "foo" is
+ the current buffer. (Liang Li)
+Solution: Do not reload the current buffer on a split command.
+Files: runtime/doc/windows.txt, src/ex_docmd.c
+
+
+*** ../vim-7.4.214/runtime/doc/windows.txt 2013-08-10 13:25:08.000000000 +0200
+--- runtime/doc/windows.txt 2014-03-25 12:34:51.989767212 +0100
+***************
+*** 132,144 ****
+ CTRL-W s *CTRL-W_s*
+ CTRL-W S *CTRL-W_S*
+ CTRL-W CTRL-S *CTRL-W_CTRL-S*
+! :[N]sp[lit] [++opt] [+cmd] *:sp* *:split*
+ Split current window in two. The result is two viewports on
+! the same file. Make new window N high (default is to use half
+! the height of the current window). Reduces the current window
+! height to create room (and others, if the 'equalalways' option
+! is set, 'eadirection' isn't "hor", and one of them is higher
+! than the current or the new window).
+ Note: CTRL-S does not work on all terminals and might block
+ further input, use CTRL-Q to get going again.
+ Also see |++opt| and |+cmd|.
+--- 132,151 ----
+ CTRL-W s *CTRL-W_s*
+ CTRL-W S *CTRL-W_S*
+ CTRL-W CTRL-S *CTRL-W_CTRL-S*
+! :[N]sp[lit] [++opt] [+cmd] [file] *:sp* *:split*
+ Split current window in two. The result is two viewports on
+! the same file.
+!
+! Make the new window N high (default is to use half the height
+! of the current window). Reduces the current window height to
+! create room (and others, if the 'equalalways' option is set,
+! 'eadirection' isn't "hor", and one of them is higher than the
+! current or the new window).
+!
+! If [file] is given it will be edited in the new window. If it
+! is not loaded in any buffer, it will be read. Else the new
+! window will use the already loaded buffer.
+!
+ Note: CTRL-S does not work on all terminals and might block
+ further input, use CTRL-Q to get going again.
+ Also see |++opt| and |+cmd|.
+*** ../vim-7.4.214/src/ex_docmd.c 2014-03-23 16:03:56.167311626 +0100
+--- src/ex_docmd.c 2014-03-25 12:57:13.737787771 +0100
+***************
+*** 7938,7943 ****
+--- 7938,7945 ----
+ ? ECMD_ONE : eap->do_ecmd_lnum,
+ (P_HID(curbuf) ? ECMD_HIDE : 0)
+ + (eap->forceit ? ECMD_FORCEIT : 0)
++ /* after a split we can use an existing buffer */
++ + (old_curwin != NULL ? ECMD_OLDBUF : 0)
+ #ifdef FEAT_LISTCMDS
+ + (eap->cmdidx == CMD_badd ? ECMD_ADDBUF : 0 )
+ #endif
+*** ../vim-7.4.214/src/version.c 2014-03-24 19:43:56.604837795 +0100
+--- src/version.c 2014-03-25 12:30:13.137762939 +0100
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 215,
+ /**/
+
+--
+BLACK KNIGHT: The Black Knight always triumphs. Have at you!
+ ARTHUR takes his last leg off. The BLACK KNIGHT's body lands upright.
+BLACK KNIGHT: All right, we'll call it a draw.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.216 b/patches/source/vim/patches/7.4.216
new file mode 100644
index 000000000..ebf78d1d6
--- /dev/null
+++ b/patches/source/vim/patches/7.4.216
@@ -0,0 +1,73 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.216
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.216
+Problem: Compiler warnings. (Tony Mechelynck)
+Solution: Initialize variables, add #ifdef.
+Files: src/term.c, src/os_unix.h
+
+
+*** ../vim-7.4.215/src/term.c 2014-03-23 15:12:29.939264336 +0100
+--- src/term.c 2014-03-25 13:39:10.821826340 +0100
+***************
+*** 4185,4191 ****
+ {
+ #ifdef FEAT_MBYTE
+ int col;
+! int row_char;
+ #endif
+ j = 0;
+ extra = 0;
+--- 4185,4191 ----
+ {
+ #ifdef FEAT_MBYTE
+ int col;
+! int row_char = NUL;
+ #endif
+ j = 0;
+ extra = 0;
+*** ../vim-7.4.215/src/os_unix.h 2014-03-12 16:51:35.060792541 +0100
+--- src/os_unix.h 2014-03-25 13:42:35.141829471 +0100
+***************
+*** 565,571 ****
+ # endif
+ #endif
+
+! #define HAVE_DUP /* have dup() */
+ #define HAVE_ST_MODE /* have stat.st_mode */
+
+ /* We have three kinds of ACL support. */
+--- 565,573 ----
+ # endif
+ #endif
+
+! #ifndef HAVE_DUP
+! # define HAVE_DUP /* have dup() */
+! #endif
+ #define HAVE_ST_MODE /* have stat.st_mode */
+
+ /* We have three kinds of ACL support. */
+*** ../vim-7.4.215/src/version.c 2014-03-25 13:03:44.937793766 +0100
+--- src/version.c 2014-03-25 13:40:36.969827660 +0100
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 216,
+ /**/
+
+--
+Hacker: Someone skilled in computer programming (good guy).
+Cracker: A hacker that uses his skills to crack software (bad guy).
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.217 b/patches/source/vim/patches/7.4.217
new file mode 100644
index 000000000..9af78571f
--- /dev/null
+++ b/patches/source/vim/patches/7.4.217
@@ -0,0 +1,85 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.217
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.217
+Problem: When src/auto/configure was updated, "make clean" would run
+ configure pointlessly.
+Solution: Do not run configure for "make clean" and "make distclean" when
+ the make program supports $MAKECMDGOALS. (Ken Takata)
+Files: src/Makefile
+
+
+*** ../vim-7.4.216/src/Makefile 2014-02-05 12:36:36.622026833 +0100
+--- src/Makefile 2014-03-25 15:31:10.629929307 +0100
+***************
+*** 546,551 ****
+--- 546,552 ----
+ # again.
+ #CC = cc
+ #CC = gcc
++ #CC = clang
+
+ # COMPILER FLAGS - change as you please. Either before running {{{1
+ # configure or afterwards. For examples see below.
+***************
+*** 1666,1672 ****
+ ! grep -x -F 'ac_cv_env_CFLAGS_value=$(CFLAGS)' auto/config.cache > /dev/null; then \
+ rm auto/config.cache; \
+ fi
+! GUI_INC_LOC="$(GUI_INC_LOC)" GUI_LIB_LOC="$(GUI_LIB_LOC)" \
+ CC="$(CC)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" \
+ LDFLAGS="$(LDFLAGS)" $(CONF_SHELL) srcdir="$(srcdir)" \
+ ./configure $(CONF_OPT_GUI) $(CONF_OPT_X) $(CONF_OPT_XSMP) \
+--- 1667,1674 ----
+ ! grep -x -F 'ac_cv_env_CFLAGS_value=$(CFLAGS)' auto/config.cache > /dev/null; then \
+ rm auto/config.cache; \
+ fi
+! if test "X$(MAKECMDGOALS)" != "Xclean" -a "X$(MAKECMDGOALS)" != "Xdistclean"; then \
+! GUI_INC_LOC="$(GUI_INC_LOC)" GUI_LIB_LOC="$(GUI_LIB_LOC)" \
+ CC="$(CC)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" \
+ LDFLAGS="$(LDFLAGS)" $(CONF_SHELL) srcdir="$(srcdir)" \
+ ./configure $(CONF_OPT_GUI) $(CONF_OPT_X) $(CONF_OPT_XSMP) \
+***************
+*** 1679,1685 ****
+ $(CONF_OPT_COMPBY) $(CONF_OPT_ACL) $(CONF_OPT_NETBEANS) \
+ $(CONF_ARGS) $(CONF_OPT_MZSCHEME) $(CONF_OPT_PLTHOME) \
+ $(CONF_OPT_LUA) $(CONF_OPT_LUA_PREFIX) \
+! $(CONF_OPT_SYSMOUSE)
+
+ # Use "make reconfig" to rerun configure without cached values.
+ # When config.h changes, most things will be recompiled automatically.
+--- 1681,1688 ----
+ $(CONF_OPT_COMPBY) $(CONF_OPT_ACL) $(CONF_OPT_NETBEANS) \
+ $(CONF_ARGS) $(CONF_OPT_MZSCHEME) $(CONF_OPT_PLTHOME) \
+ $(CONF_OPT_LUA) $(CONF_OPT_LUA_PREFIX) \
+! $(CONF_OPT_SYSMOUSE); \
+! fi
+
+ # Use "make reconfig" to rerun configure without cached values.
+ # When config.h changes, most things will be recompiled automatically.
+*** ../vim-7.4.216/src/version.c 2014-03-25 13:46:22.841832960 +0100
+--- src/version.c 2014-03-25 15:32:30.813930536 +0100
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 217,
+ /**/
+
+--
+CRONE: Who sent you?
+ARTHUR: The Knights Who Say GNU!
+CRONE: Aaaagh! (she looks around in rear) No! We have no licenses here.
+ "Monty Python and the Holy editor wars" PYTHON (MONTY) SOFTWARE LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.218 b/patches/source/vim/patches/7.4.218
new file mode 100644
index 000000000..b878cb7b4
--- /dev/null
+++ b/patches/source/vim/patches/7.4.218
@@ -0,0 +1,578 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.218
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.218
+Problem: It's not easy to remove duplicates from a list.
+Solution: Add the uniq() function. (LCD)
+Files: runtime/doc/change.txt, runtime/doc/eval.txt,
+ runtime/doc/usr_41.txt, runtime/doc/version7.txt, src/eval.c,
+ src/testdir/test55.in, src/testdir/test55.ok
+
+
+*** ../vim-7.4.217/runtime/doc/change.txt 2013-09-22 15:23:38.000000000 +0200
+--- runtime/doc/change.txt 2014-03-25 17:32:29.510040841 +0100
+***************
+*** 1645,1651 ****
+ 7. Sorting text *sorting*
+
+ Vim has a sorting function and a sorting command. The sorting function can be
+! found here: |sort()|.
+
+ *:sor* *:sort*
+ :[range]sor[t][!] [i][u][r][n][x][o] [/{pattern}/]
+--- 1650,1656 ----
+ 7. Sorting text *sorting*
+
+ Vim has a sorting function and a sorting command. The sorting function can be
+! found here: |sort()|, |uniq()|.
+
+ *:sor* *:sort*
+ :[range]sor[t][!] [i][u][r][n][x][o] [/{pattern}/]
+*** ../vim-7.4.217/runtime/doc/eval.txt 2014-02-23 23:38:58.820760280 +0100
+--- runtime/doc/eval.txt 2014-03-25 17:47:18.750054467 +0100
+***************
+*** 326,331 ****
+--- 327,333 ----
+ Changing the order of items in a list: >
+ :call sort(list) " sort a list alphabetically
+ :call reverse(list) " reverse the order of items
++ :call uniq(sort(list)) " sort and remove duplicates
+
+
+ For loop ~
+***************
+*** 1518,1523 ****
+--- 1520,1526 ----
+ startup. These are the files that Vim remembers marks for.
+ The length of the List is limited by the ' argument of the
+ 'viminfo' option (default is 100).
++ When the |viminfo| file is not used the List is empty.
+ Also see |:oldfiles| and |c_#<|.
+ The List can be modified, but this has no effect on what is
+ stored in the |viminfo| file later. If you use values other
+***************
+*** 2003,2008 ****
+--- 2006,2013 ----
+ type( {name}) Number type of variable {name}
+ undofile( {name}) String undo file name for {name}
+ undotree() List undo file tree
++ uniq( {list} [, {func} [, {dict}]])
++ List remove adjacent duplicates from a list
+ values( {dict}) List values in {dict}
+ virtcol( {expr}) Number screen column of cursor or mark
+ visualmode( [expr]) String last visual mode used
+***************
+*** 5474,5493 ****
+
+
+ sort({list} [, {func} [, {dict}]]) *sort()* *E702*
+! Sort the items in {list} in-place. Returns {list}. If you
+! want a list to remain unmodified make a copy first: >
+ :let sortedlist = sort(copy(mylist))
+ < Uses the string representation of each item to sort on.
+ Numbers sort after Strings, |Lists| after Numbers.
+ For sorting text in the current buffer use |:sort|.
+ When {func} is given and it is one then case is ignored.
+- {dict} is for functions with the "dict" attribute. It will be
+- used to set the local variable "self". |Dictionary-function|
+ When {func} is a |Funcref| or a function name, this function
+ is called to compare items. The function is invoked with two
+ items as argument and must return zero if they are equal, 1 or
+ bigger if the first one sorts after the second one, -1 or
+ smaller if the first one sorts before the second one.
+ Example: >
+ func MyCompare(i1, i2)
+ return a:i1 == a:i2 ? 0 : a:i1 > a:i2 ? 1 : -1
+--- 5491,5516 ----
+
+
+ sort({list} [, {func} [, {dict}]]) *sort()* *E702*
+! Sort the items in {list} in-place. Returns {list}.
+!
+! If you want a list to remain unmodified make a copy first: >
+ :let sortedlist = sort(copy(mylist))
+ < Uses the string representation of each item to sort on.
+ Numbers sort after Strings, |Lists| after Numbers.
+ For sorting text in the current buffer use |:sort|.
++
+ When {func} is given and it is one then case is ignored.
+ When {func} is a |Funcref| or a function name, this function
+ is called to compare items. The function is invoked with two
+ items as argument and must return zero if they are equal, 1 or
+ bigger if the first one sorts after the second one, -1 or
+ smaller if the first one sorts before the second one.
++
++ {dict} is for functions with the "dict" attribute. It will be
++ used to set the local variable "self". |Dictionary-function|
++
++ Also see |uniq()|.
++
+ Example: >
+ func MyCompare(i1, i2)
+ return a:i1 == a:i2 ? 0 : a:i1 > a:i2 ? 1 : -1
+***************
+*** 6155,6160 ****
+--- 6178,6191 ----
+ blocks. Each item may again have an "alt"
+ item.
+
++ uniq({list} [, {func} [, {dict}]]) *uniq()* *E882*
++ Remove second and succeeding copies of repeated adjacent
++ {list} items in-place. Returns {list}. If you want a list
++ to remain unmodified make a copy first: >
++ :let newlist = uniq(copy(mylist))
++ < The default compare function uses the string representation of
++ each item. For the use of {func} and {dict} see |sort()|.
++
+ values({dict}) *values()*
+ Return a |List| with all the values of {dict}. The |List| is
+ in arbitrary order.
+*** ../vim-7.4.217/runtime/doc/usr_41.txt 2013-08-10 13:25:05.000000000 +0200
+--- runtime/doc/usr_41.txt 2014-03-25 17:32:29.518040841 +0100
+***************
+*** 1,4 ****
+! *usr_41.txt* For Vim version 7.4. Last change: 2013 Feb 20
+
+ VIM USER MANUAL - by Bram Moolenaar
+
+--- 1,4 ----
+! *usr_41.txt* For Vim version 7.4. Last change: 2014 Jan 10
+
+ VIM USER MANUAL - by Bram Moolenaar
+
+***************
+*** 595,607 ****
+ matchlist() like matchstr() and also return submatches
+ stridx() first index of a short string in a long string
+ strridx() last index of a short string in a long string
+! strlen() length of a string
+ substitute() substitute a pattern match with a string
+ submatch() get a specific match in ":s" and substitute()
+ strpart() get part of a string
+ expand() expand special keywords
+ iconv() convert text from one encoding to another
+ byteidx() byte index of a character in a string
+ repeat() repeat a string multiple times
+ eval() evaluate a string expression
+
+--- 595,611 ----
+ matchlist() like matchstr() and also return submatches
+ stridx() first index of a short string in a long string
+ strridx() last index of a short string in a long string
+! strlen() length of a string in bytes
+! strchars() length of a string in characters
+! strwidth() size of string when displayed
+! strdisplaywidth() size of string when displayed, deals with tabs
+ substitute() substitute a pattern match with a string
+ submatch() get a specific match in ":s" and substitute()
+ strpart() get part of a string
+ expand() expand special keywords
+ iconv() convert text from one encoding to another
+ byteidx() byte index of a character in a string
++ byteidxcomp() like byteidx() but count composing characters
+ repeat() repeat a string multiple times
+ eval() evaluate a string expression
+
+***************
+*** 619,624 ****
+--- 623,629 ----
+ map() change each List item
+ sort() sort a List
+ reverse() reverse the order of a List
++ uniq() remove copies of repeated adjacent items
+ split() split a String into a List
+ join() join List items into a String
+ range() return a List with a sequence of numbers
+***************
+*** 656,661 ****
+--- 661,669 ----
+ ceil() round up
+ floor() round down
+ trunc() remove value after decimal point
++ fmod() remainder of division
++ exp() exponential
++ log() natural logarithm (logarithm to base e)
+ log10() logarithm to base 10
+ pow() value of x to the exponent y
+ sqrt() square root
+***************
+*** 675,680 ****
+--- 683,689 ----
+ invert() bitwise invert
+ or() bitwise OR
+ xor() bitwise XOR
++ sha256() SHA-256 hash
+
+ Variables: *var-functions*
+ type() type of a variable
+***************
+*** 697,707 ****
+--- 706,720 ----
+ wincol() window column number of the cursor
+ winline() window line number of the cursor
+ cursor() position the cursor at a line/column
++ screencol() get screen column of the cursor
++ screenrow() get screen row of the cursor
+ getpos() get position of cursor, mark, etc.
+ setpos() set position of cursor, mark, etc.
+ byte2line() get line number at a specific byte count
+ line2byte() byte count at a specific line
+ diff_filler() get the number of filler lines above a line
++ screenattr() get attribute at a screen line/row
++ screenchar() get character code at a screen line/row
+
+ Working with text in the current buffer: *text-functions*
+ getline() get a line or list of lines from the buffer
+***************
+*** 883,896 ****
+--- 896,917 ----
+ libcall() call a function in an external library
+ libcallnr() idem, returning a number
+
++ undofile() get the name of the undo file
++ undotree() return the state of the undo tree
++
+ getreg() get contents of a register
+ getregtype() get type of a register
+ setreg() set contents and type of a register
+
++ shiftwidth() effective value of 'shiftwidth'
++
+ taglist() get list of matching tags
+ tagfiles() get a list of tags files
+
++ luaeval() evaluate Lua expression
+ mzeval() evaluate |MzScheme| expression
++ py3eval() evaluate Python expression (|+python3|)
++ pyeval() evaluate Python expression (|+python|)
+
+ ==============================================================================
+ *41.7* Defining a function
+*** ../vim-7.4.217/runtime/doc/version7.txt 2013-08-10 14:23:06.000000000 +0200
+--- runtime/doc/version7.txt 2014-03-25 17:32:29.518040841 +0100
+***************
+*** 942,947 ****
+--- 942,948 ----
+ |tagfiles()| List with tags file names
+ |taglist()| get list of matching tags (Yegappan Lakshmanan)
+ |tr()| translate characters (Ron Aaron)
++ |uniq()| remove copies of repeated adjacent list items
+ |values()| get List of Dictionary values
+ |winnr()| takes an argument: what window to use
+ |winrestview()| restore the view of the current window
+*** ../vim-7.4.217/src/eval.c 2014-03-23 15:12:29.915264336 +0100
+--- src/eval.c 2014-03-25 17:52:09.554058923 +0100
+***************
+*** 744,749 ****
+--- 744,750 ----
+ static void f_type __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_undofile __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_undotree __ARGS((typval_T *argvars, typval_T *rettv));
++ static void f_uniq __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_values __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_virtcol __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_visualmode __ARGS((typval_T *argvars, typval_T *rettv));
+***************
+*** 8150,8155 ****
+--- 8151,8157 ----
+ {"type", 1, 1, f_type},
+ {"undofile", 1, 1, f_undofile},
+ {"undotree", 0, 0, f_undotree},
++ {"uniq", 1, 3, f_uniq},
+ {"values", 1, 1, f_values},
+ {"virtcol", 1, 1, f_virtcol},
+ {"visualmode", 0, 1, f_visualmode},
+***************
+*** 17023,17032 ****
+ static char_u *item_compare_func;
+ static dict_T *item_compare_selfdict;
+ static int item_compare_func_err;
+ #define ITEM_COMPARE_FAIL 999
+
+ /*
+! * Compare functions for f_sort() below.
+ */
+ static int
+ #ifdef __BORLANDC__
+--- 17025,17035 ----
+ static char_u *item_compare_func;
+ static dict_T *item_compare_selfdict;
+ static int item_compare_func_err;
++ static void do_sort_uniq __ARGS((typval_T *argvars, typval_T *rettv, int sort));
+ #define ITEM_COMPARE_FAIL 999
+
+ /*
+! * Compare functions for f_sort() and f_uniq() below.
+ */
+ static int
+ #ifdef __BORLANDC__
+***************
+*** 17100,17108 ****
+ * "sort({list})" function
+ */
+ static void
+! f_sort(argvars, rettv)
+ typval_T *argvars;
+ typval_T *rettv;
+ {
+ list_T *l;
+ listitem_T *li;
+--- 17103,17112 ----
+ * "sort({list})" function
+ */
+ static void
+! do_sort_uniq(argvars, rettv, sort)
+ typval_T *argvars;
+ typval_T *rettv;
++ int sort;
+ {
+ list_T *l;
+ listitem_T *li;
+***************
+*** 17111,17122 ****
+ long i;
+
+ if (argvars[0].v_type != VAR_LIST)
+! EMSG2(_(e_listarg), "sort()");
+ else
+ {
+ l = argvars[0].vval.v_list;
+ if (l == NULL || tv_check_lock(l->lv_lock,
+! (char_u *)_("sort() argument")))
+ return;
+ rettv->vval.v_list = l;
+ rettv->v_type = VAR_LIST;
+--- 17115,17126 ----
+ long i;
+
+ if (argvars[0].v_type != VAR_LIST)
+! EMSG2(_(e_listarg), sort ? "sort()" : "uniq()");
+ else
+ {
+ l = argvars[0].vval.v_list;
+ if (l == NULL || tv_check_lock(l->lv_lock,
+! (char_u *)(sort ? _("sort() argument") : _("uniq() argument"))))
+ return;
+ rettv->vval.v_list = l;
+ rettv->v_type = VAR_LIST;
+***************
+*** 17163,17191 ****
+ ptrs = (listitem_T **)alloc((int)(len * sizeof(listitem_T *)));
+ if (ptrs == NULL)
+ return;
+- i = 0;
+- for (li = l->lv_first; li != NULL; li = li->li_next)
+- ptrs[i++] = li;
+
+! item_compare_func_err = FALSE;
+! /* test the compare function */
+! if (item_compare_func != NULL
+! && item_compare2((void *)&ptrs[0], (void *)&ptrs[1])
+ == ITEM_COMPARE_FAIL)
+! EMSG(_("E702: Sort compare function failed"));
+ else
+ {
+! /* Sort the array with item pointers. */
+! qsort((void *)ptrs, (size_t)len, sizeof(listitem_T *),
+! item_compare_func == NULL ? item_compare : item_compare2);
+
+ if (!item_compare_func_err)
+ {
+! /* Clear the List and append the items in the sorted order. */
+! l->lv_first = l->lv_last = l->lv_idx_item = NULL;
+! l->lv_len = 0;
+! for (i = 0; i < len; ++i)
+! list_append(l, ptrs[i]);
+ }
+ }
+
+--- 17167,17238 ----
+ ptrs = (listitem_T **)alloc((int)(len * sizeof(listitem_T *)));
+ if (ptrs == NULL)
+ return;
+
+! i = 0;
+! if (sort)
+! {
+! /* sort(): ptrs will be the list to sort */
+! for (li = l->lv_first; li != NULL; li = li->li_next)
+! ptrs[i++] = li;
+!
+! item_compare_func_err = FALSE;
+! /* test the compare function */
+! if (item_compare_func != NULL
+! && item_compare2((void *)&ptrs[0], (void *)&ptrs[1])
+ == ITEM_COMPARE_FAIL)
+! EMSG(_("E702: Sort compare function failed"));
+! else
+! {
+! /* Sort the array with item pointers. */
+! qsort((void *)ptrs, (size_t)len, sizeof(listitem_T *),
+! item_compare_func == NULL ? item_compare : item_compare2);
+!
+! if (!item_compare_func_err)
+! {
+! /* Clear the List and append the items in sorted order. */
+! l->lv_first = l->lv_last = l->lv_idx_item = NULL;
+! l->lv_len = 0;
+! for (i = 0; i < len; ++i)
+! list_append(l, ptrs[i]);
+! }
+! }
+! }
+ else
+ {
+! int (*item_compare_func_ptr)__ARGS((const void *, const void *));
+!
+! /* f_uniq(): ptrs will be a stack of items to remove */
+! item_compare_func_err = FALSE;
+! item_compare_func_ptr = item_compare_func
+! ? item_compare2 : item_compare;
+!
+! for (li = l->lv_first; li != NULL && li->li_next != NULL;
+! li = li->li_next)
+! {
+! if (item_compare_func_ptr((void *)&li, (void *)&li->li_next)
+! == 0)
+! ptrs[i++] = li;
+! if (item_compare_func_err)
+! {
+! EMSG(_("E882: Uniq compare function failed"));
+! break;
+! }
+! }
+
+ if (!item_compare_func_err)
+ {
+! while (--i >= 0)
+! {
+! li = ptrs[i]->li_next;
+! ptrs[i]->li_next = li->li_next;
+! if (li->li_next != NULL)
+! li->li_next->li_prev = ptrs[i];
+! else
+! l->lv_last = ptrs[i];
+! list_fix_watch(l, li);
+! listitem_free(li);
+! l->lv_len--;
+! }
+ }
+ }
+
+***************
+*** 17194,17199 ****
+--- 17241,17268 ----
+ }
+
+ /*
++ * "sort({list})" function
++ */
++ static void
++ f_sort(argvars, rettv)
++ typval_T *argvars;
++ typval_T *rettv;
++ {
++ do_sort_uniq(argvars, rettv, TRUE);
++ }
++
++ /*
++ * "uniq({list})" function
++ */
++ static void
++ f_uniq(argvars, rettv)
++ typval_T *argvars;
++ typval_T *rettv;
++ {
++ do_sort_uniq(argvars, rettv, FALSE);
++ }
++
++ /*
+ * "soundfold({word})" function
+ */
+ static void
+*** ../vim-7.4.217/src/testdir/test55.in 2014-01-14 15:24:24.000000000 +0100
+--- src/testdir/test55.in 2014-03-25 17:32:29.522040841 +0100
+***************
+*** 323,335 ****
+ : $put ='caught ' . v:exception
+ :endtry
+ :"
+! :" reverse() and sort()
+! :let l = ['-0', 'A11', 2, 'xaaa', 4, 'foo', 'foo6', [0, 1, 2], 'x8']
+ :$put =string(reverse(l))
+ :$put =string(reverse(reverse(l)))
+ :$put =string(sort(l))
+ :$put =string(reverse(sort(l)))
+ :$put =string(sort(reverse(sort(l))))
+ :"
+ :" splitting a string to a List
+ :$put =string(split(' aa bb '))
+--- 323,337 ----
+ : $put ='caught ' . v:exception
+ :endtry
+ :"
+! :" reverse(), sort(), uniq()
+! :let l = ['-0', 'A11', 2, 2, 'xaaa', 4, 'foo', 'foo6', 'foo', [0, 1, 2], 'x8', [0, 1, 2], 1.5]
+! :$put =string(uniq(copy(l)))
+ :$put =string(reverse(l))
+ :$put =string(reverse(reverse(l)))
+ :$put =string(sort(l))
+ :$put =string(reverse(sort(l)))
+ :$put =string(sort(reverse(sort(l))))
++ :$put =string(uniq(sort(l)))
+ :"
+ :" splitting a string to a List
+ :$put =string(split(' aa bb '))
+*** ../vim-7.4.217/src/testdir/test55.ok 2014-01-14 15:24:24.000000000 +0100
+--- src/testdir/test55.ok 2014-03-25 17:32:29.522040841 +0100
+***************
+*** 94,104 ****
+ caught a:000[2]
+ caught a:000[3]
+ [1, 2, [3, 9, 5, 6], {'a': 12, '5': 8}]
+! ['x8', [0, 1, 2], 'foo6', 'foo', 4, 'xaaa', 2, 'A11', '-0']
+! ['x8', [0, 1, 2], 'foo6', 'foo', 4, 'xaaa', 2, 'A11', '-0']
+! ['-0', 'A11', 'foo', 'foo6', 'x8', 'xaaa', 2, 4, [0, 1, 2]]
+! [[0, 1, 2], 4, 2, 'xaaa', 'x8', 'foo6', 'foo', 'A11', '-0']
+! ['-0', 'A11', 'foo', 'foo6', 'x8', 'xaaa', 2, 4, [0, 1, 2]]
+ ['aa', 'bb']
+ ['aa', 'bb']
+ ['', 'aa', 'bb', '']
+--- 94,106 ----
+ caught a:000[2]
+ caught a:000[3]
+ [1, 2, [3, 9, 5, 6], {'a': 12, '5': 8}]
+! ['-0', 'A11', 2, 'xaaa', 4, 'foo', 'foo6', 'foo', [0, 1, 2], 'x8', [0, 1, 2], 1.5]
+! [1.5, [0, 1, 2], 'x8', [0, 1, 2], 'foo', 'foo6', 'foo', 4, 'xaaa', 2, 2, 'A11', '-0']
+! [1.5, [0, 1, 2], 'x8', [0, 1, 2], 'foo', 'foo6', 'foo', 4, 'xaaa', 2, 2, 'A11', '-0']
+! ['-0', 'A11', 'foo', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 2, 4, [0, 1, 2], [0, 1, 2]]
+! [[0, 1, 2], [0, 1, 2], 4, 2, 2, 1.5, 'xaaa', 'x8', 'foo6', 'foo', 'foo', 'A11', '-0']
+! ['-0', 'A11', 'foo', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 2, 4, [0, 1, 2], [0, 1, 2]]
+! ['-0', 'A11', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 4, [0, 1, 2]]
+ ['aa', 'bb']
+ ['aa', 'bb']
+ ['', 'aa', 'bb', '']
+*** ../vim-7.4.217/src/version.c 2014-03-25 18:05:45.242071421 +0100
+--- src/version.c 2014-03-25 17:34:51.918043023 +0100
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 218,
+ /**/
+
+--
+Never under any circumstances take a sleeping pill
+and a laxative on the same night.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.219 b/patches/source/vim/patches/7.4.219
new file mode 100644
index 000000000..69a517782
--- /dev/null
+++ b/patches/source/vim/patches/7.4.219
@@ -0,0 +1,100 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.219
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.219
+Problem: When 'relativenumber' or 'cursorline' are set the window is
+ redrawn much to often. (Patrick Hemmer, Dominique Pelle)
+Solution: Check the VALID_CROW flag instead of VALID_WROW.
+Files: src/move.c
+
+
+*** ../vim-7.4.218/src/move.c 2014-03-23 15:12:29.927264336 +0100
+--- src/move.c 2014-03-27 11:59:28.524382473 +0100
+***************
+*** 772,777 ****
+--- 772,791 ----
+ }
+ }
+
++ /* Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is
++ * set. */
++ if ((curwin->w_p_rnu
++ #ifdef FEAT_SYN_HL
++ || curwin->w_p_cul
++ #endif
++ )
++ && (curwin->w_valid & VALID_CROW) == 0
++ # ifdef FEAT_INS_EXPAND
++ && !pum_visible()
++ # endif
++ )
++ redraw_later(SOME_VALID);
++
+ wp->w_valid |= VALID_CROW|VALID_CHEIGHT;
+
+ /* validate botline too, if update_screen doesn't do it */
+***************
+*** 1172,1193 ****
+ if (prev_skipcol != curwin->w_skipcol)
+ redraw_later(NOT_VALID);
+
+- /* Redraw when w_row changes and 'relativenumber' is set */
+- if (((curwin->w_valid & VALID_WROW) == 0 && (curwin->w_p_rnu
+ #ifdef FEAT_SYN_HL
+! /* or when w_row changes and 'cursorline' is set. */
+! || curwin->w_p_cul
+! #endif
+! ))
+! #ifdef FEAT_SYN_HL
+! /* or when w_virtcol changes and 'cursorcolumn' is set */
+! || (curwin->w_p_cuc && (curwin->w_valid & VALID_VIRTCOL) == 0)
+! #endif
+! )
+ # ifdef FEAT_INS_EXPAND
+! if (!pum_visible())
+ # endif
+! redraw_later(SOME_VALID);
+
+ curwin->w_valid |= VALID_WCOL|VALID_WROW|VALID_VIRTCOL;
+ }
+--- 1186,1200 ----
+ if (prev_skipcol != curwin->w_skipcol)
+ redraw_later(NOT_VALID);
+
+ #ifdef FEAT_SYN_HL
+! /* Redraw when w_virtcol changes and 'cursorcolumn' is set */
+! if (curwin->w_p_cuc && (curwin->w_valid & VALID_VIRTCOL) == 0
+ # ifdef FEAT_INS_EXPAND
+! && !pum_visible()
+ # endif
+! )
+! redraw_later(SOME_VALID);
+! #endif
+
+ curwin->w_valid |= VALID_WCOL|VALID_WROW|VALID_VIRTCOL;
+ }
+*** ../vim-7.4.218/src/version.c 2014-03-25 18:23:27.062087691 +0100
+--- src/version.c 2014-03-27 12:11:15.276393302 +0100
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 219,
+ /**/
+
+--
+The only way the average employee can speak to an executive is by taking a
+second job as a golf caddie.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.220 b/patches/source/vim/patches/7.4.220
new file mode 100644
index 000000000..6df81d80f
--- /dev/null
+++ b/patches/source/vim/patches/7.4.220
@@ -0,0 +1,106 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.220
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.220
+Problem: Test 105 does not work in a shadow dir. (James McCoy)
+Solution: Omit "src/" from the checked path.
+Files: src/testdir/test105.in, src/testdir/test105.ok
+
+
+*** ../vim-7.4.219/src/testdir/test105.in 2014-02-23 23:38:58.812760280 +0100
+--- src/testdir/test105.in 2014-03-27 12:31:45.052412146 +0100
+***************
+*** 7,13 ****
+ :set shellslash
+ :let tab="\t"
+ :command -nargs=1 Put :let expr=<q-args> | $put =expr.tab.strtrans(string(eval(expr)))
+! :let $HOME=fnamemodify('.', ':p:h:h:h')
+ :Put fnamemodify('.', ':p' )[-1:]
+ :Put fnamemodify('.', ':p:h' )[-1:]
+ :Put fnamemodify('test.out', ':p' )[-1:]
+--- 7,13 ----
+ :set shellslash
+ :let tab="\t"
+ :command -nargs=1 Put :let expr=<q-args> | $put =expr.tab.strtrans(string(eval(expr)))
+! :let $HOME=fnamemodify('.', ':p:h:h')
+ :Put fnamemodify('.', ':p' )[-1:]
+ :Put fnamemodify('.', ':p:h' )[-1:]
+ :Put fnamemodify('test.out', ':p' )[-1:]
+***************
+*** 23,29 ****
+ :Put fnamemodify('abc.fb2.tar.gz', ':r' )
+ :Put fnamemodify('abc.fb2.tar.gz', ':r:r' )
+ :Put fnamemodify('abc.fb2.tar.gz', ':r:r:r' )
+! :Put substitute(fnamemodify('abc.fb2.tar.gz', ':p:r:r'), '.*\(src/testdir/.*\)', '\1', '')
+ :Put fnamemodify('abc.fb2.tar.gz', ':e' )
+ :Put fnamemodify('abc.fb2.tar.gz', ':e:e' )
+ :Put fnamemodify('abc.fb2.tar.gz', ':e:e:e' )
+--- 23,29 ----
+ :Put fnamemodify('abc.fb2.tar.gz', ':r' )
+ :Put fnamemodify('abc.fb2.tar.gz', ':r:r' )
+ :Put fnamemodify('abc.fb2.tar.gz', ':r:r:r' )
+! :Put substitute(fnamemodify('abc.fb2.tar.gz', ':p:r:r'), '.*\(testdir/.*\)', '\1', '')
+ :Put fnamemodify('abc.fb2.tar.gz', ':e' )
+ :Put fnamemodify('abc.fb2.tar.gz', ':e:e' )
+ :Put fnamemodify('abc.fb2.tar.gz', ':e:e:e' )
+*** ../vim-7.4.219/src/testdir/test105.ok 2014-02-23 23:38:58.812760280 +0100
+--- src/testdir/test105.ok 2014-03-27 12:31:40.732412080 +0100
+***************
+*** 3,10 ****
+ fnamemodify('test.out', ':p' )[-1:] 't'
+ fnamemodify('test.out', ':.' ) 'test.out'
+ fnamemodify('../testdir/a', ':.' ) 'a'
+! fnamemodify('test.out', ':~' ) '~/src/testdir/test.out'
+! fnamemodify('../testdir/a', ':~' ) '~/src/testdir/a'
+ fnamemodify('../testdir/a', ':t' ) 'a'
+ fnamemodify('.', ':p:t' ) ''
+ fnamemodify('test.out', ':p:t' ) 'test.out'
+--- 3,10 ----
+ fnamemodify('test.out', ':p' )[-1:] 't'
+ fnamemodify('test.out', ':.' ) 'test.out'
+ fnamemodify('../testdir/a', ':.' ) 'a'
+! fnamemodify('test.out', ':~' ) '~/testdir/test.out'
+! fnamemodify('../testdir/a', ':~' ) '~/testdir/a'
+ fnamemodify('../testdir/a', ':t' ) 'a'
+ fnamemodify('.', ':p:t' ) ''
+ fnamemodify('test.out', ':p:t' ) 'test.out'
+***************
+*** 13,19 ****
+ fnamemodify('abc.fb2.tar.gz', ':r' ) 'abc.fb2.tar'
+ fnamemodify('abc.fb2.tar.gz', ':r:r' ) 'abc.fb2'
+ fnamemodify('abc.fb2.tar.gz', ':r:r:r' ) 'abc'
+! substitute(fnamemodify('abc.fb2.tar.gz', ':p:r:r'), '.*\(src/testdir/.*\)', '\1', '') 'src/testdir/abc.fb2'
+ fnamemodify('abc.fb2.tar.gz', ':e' ) 'gz'
+ fnamemodify('abc.fb2.tar.gz', ':e:e' ) 'tar.gz'
+ fnamemodify('abc.fb2.tar.gz', ':e:e:e' ) 'fb2.tar.gz'
+--- 13,19 ----
+ fnamemodify('abc.fb2.tar.gz', ':r' ) 'abc.fb2.tar'
+ fnamemodify('abc.fb2.tar.gz', ':r:r' ) 'abc.fb2'
+ fnamemodify('abc.fb2.tar.gz', ':r:r:r' ) 'abc'
+! substitute(fnamemodify('abc.fb2.tar.gz', ':p:r:r'), '.*\(testdir/.*\)', '\1', '') 'testdir/abc.fb2'
+ fnamemodify('abc.fb2.tar.gz', ':e' ) 'gz'
+ fnamemodify('abc.fb2.tar.gz', ':e:e' ) 'tar.gz'
+ fnamemodify('abc.fb2.tar.gz', ':e:e:e' ) 'fb2.tar.gz'
+*** ../vim-7.4.219/src/version.c 2014-03-27 12:11:43.888393741 +0100
+--- src/version.c 2014-03-27 12:32:56.320413238 +0100
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 220,
+ /**/
+
+--
+If the Universe is constantly expanding, why can't I ever find a parking space?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.221 b/patches/source/vim/patches/7.4.221
new file mode 100644
index 000000000..4162a24e5
--- /dev/null
+++ b/patches/source/vim/patches/7.4.221
@@ -0,0 +1,62 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.221
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.221
+Problem: Quickfix doesn't resize on ":copen 20". (issue 199)
+Solution: Resize the window when requested. (Christian Brabandt)
+Files: src/quickfix.c
+
+
+*** ../vim-7.4.220/src/quickfix.c 2014-03-23 15:12:29.931264336 +0100
+--- src/quickfix.c 2014-03-27 16:56:25.316655478 +0100
+***************
+*** 2358,2364 ****
+--- 2358,2379 ----
+ win = qf_find_win(qi);
+
+ if (win != NULL && cmdmod.tab == 0)
++ {
+ win_goto(win);
++ if (eap->addr_count != 0)
++ {
++ #ifdef FEAT_VERTSPLIT
++ if (cmdmod.split & WSP_VERT)
++ {
++ if (height != W_WIDTH(win))
++ win_setwidth(height);
++ }
++ else
++ #endif
++ if (height != win->w_height)
++ win_setheight(height);
++ }
++ }
+ else
+ {
+ qf_buf = qf_find_buf(qi);
+*** ../vim-7.4.220/src/version.c 2014-03-27 12:40:26.188420131 +0100
+--- src/version.c 2014-03-27 16:54:38.864653847 +0100
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 221,
+ /**/
+
+--
+The fastest way to get an engineer to solve a problem is to declare that the
+problem is unsolvable. No engineer can walk away from an unsolvable problem
+until it's solved.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.222 b/patches/source/vim/patches/7.4.222
new file mode 100644
index 000000000..79f04f666
--- /dev/null
+++ b/patches/source/vim/patches/7.4.222
@@ -0,0 +1,83 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.222
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.222
+Problem: The Ruby directory is constructed from parts.
+Solution: Use 'rubyarchhdrdir' if it exists. (James McCoy)
+Files: src/configure.in, src/auto/configure
+
+
+*** ../vim-7.4.221/src/configure.in 2014-02-23 22:52:33.356764716 +0100
+--- src/configure.in 2014-03-27 17:13:09.624670867 +0100
+***************
+*** 1692,1700 ****
+ if test "X$rubyhdrdir" != "X"; then
+ AC_MSG_RESULT($rubyhdrdir)
+ RUBY_CFLAGS="-I$rubyhdrdir"
+! rubyarch=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['arch']]"`
+! if test -d "$rubyhdrdir/$rubyarch"; then
+! RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyhdrdir/$rubyarch"
+ fi
+ rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['ruby_version']].gsub(/\./, '')[[0,2]]"`
+ if test "X$rubyversion" = "X"; then
+--- 1692,1700 ----
+ if test "X$rubyhdrdir" != "X"; then
+ AC_MSG_RESULT($rubyhdrdir)
+ RUBY_CFLAGS="-I$rubyhdrdir"
+! rubyarchdir=`$vi_cv_path_ruby -r rbconfig -e "print ($ruby_rbconfig::CONFIG.has_key? 'rubyarchhdrdir') ? $ruby_rbconfig::CONFIG[['rubyarchhdrdir']] : '$rubyhdrdir/'+$ruby_rbconfig::CONFIG[['arch']]"`
+! if test -d "$rubyarchdir"; then
+! RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyarchdir"
+ fi
+ rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['ruby_version']].gsub(/\./, '')[[0,2]]"`
+ if test "X$rubyversion" = "X"; then
+*** ../vim-7.4.221/src/auto/configure 2014-02-23 22:52:33.364764715 +0100
+--- src/auto/configure 2014-03-27 17:14:25.256672026 +0100
+***************
+*** 6777,6785 ****
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rubyhdrdir" >&5
+ $as_echo "$rubyhdrdir" >&6; }
+ RUBY_CFLAGS="-I$rubyhdrdir"
+! rubyarch=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['arch']"`
+! if test -d "$rubyhdrdir/$rubyarch"; then
+! RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyhdrdir/$rubyarch"
+ fi
+ rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'].gsub(/\./, '')[0,2]"`
+ if test "X$rubyversion" = "X"; then
+--- 6777,6785 ----
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rubyhdrdir" >&5
+ $as_echo "$rubyhdrdir" >&6; }
+ RUBY_CFLAGS="-I$rubyhdrdir"
+! rubyarchdir=`$vi_cv_path_ruby -r rbconfig -e "print ($ruby_rbconfig::CONFIG.has_key? 'rubyarchhdrdir') ? $ruby_rbconfig::CONFIG['rubyarchhdrdir'] : '$rubyhdrdir/'+$ruby_rbconfig::CONFIG['arch']"`
+! if test -d "$rubyarchdir"; then
+! RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyarchdir"
+ fi
+ rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'].gsub(/\./, '')[0,2]"`
+ if test "X$rubyversion" = "X"; then
+*** ../vim-7.4.221/src/version.c 2014-03-27 17:02:22.084660944 +0100
+--- src/version.c 2014-03-27 17:13:29.220671167 +0100
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 222,
+ /**/
+
+--
+Engineers are always delighted to share wisdom, even in areas in which they
+have no experience whatsoever. Their logic provides them with inherent
+insight into any field of expertise. This can be a problem when dealing with
+the illogical people who believe that knowledge can only be derived through
+experience.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.223 b/patches/source/vim/patches/7.4.223
new file mode 100644
index 000000000..c7e447a2a
--- /dev/null
+++ b/patches/source/vim/patches/7.4.223
@@ -0,0 +1,6557 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.223
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.223
+Problem: Still using an older autoconf version.
+Solution: Switch to autoconf 2.69.
+Files: src/Makefile, src/configure.in, src/auto/configure
+
+
+*** ../vim-7.4.222/src/Makefile 2014-03-25 15:34:44.993932592 +0100
+--- src/Makefile 2014-03-27 17:37:32.864693288 +0100
+***************
+*** 586,591 ****
+--- 586,594 ----
+ # as root: sysctl -w vm.max_proc_mmap=30000
+ #EXTRA_LIBS = /usr/local/lib/libefence.a
+
++ # Autoconf binary.
++ AUTOCONF = autoconf
++
+ # PURIFY - remove the # to use the "purify" program (hoi Nia++!)
+ #PURIFY = purify
+
+***************
+*** 1713,1719 ****
+ # - Uses ">config.log" instead of "./config.log".
+ autoconf:
+ if test ! -f configure.save; then mv configure configure.save; fi
+! autoconf
+ sed -e 's+>config.log+>auto/config.log+' -e 's+\./config.log+auto/config.log+' configure > auto/configure
+ chmod 755 auto/configure
+ mv -f configure.save configure
+--- 1716,1722 ----
+ # - Uses ">config.log" instead of "./config.log".
+ autoconf:
+ if test ! -f configure.save; then mv configure configure.save; fi
+! $(AUTOCONF)
+ sed -e 's+>config.log+>auto/config.log+' -e 's+\./config.log+auto/config.log+' configure > auto/configure
+ chmod 755 auto/configure
+ mv -f configure.save configure
+*** ../vim-7.4.222/src/configure.in 2014-03-27 17:19:05.860676325 +0100
+--- src/configure.in 2014-03-27 17:31:39.412687872 +0100
+***************
+*** 1397,1403 ****
+ ldflags_save=$LDFLAGS
+ dnl -ldl must go first to make this work on Archlinux (Roland Puntaier)
+ LDFLAGS="-ldl $LDFLAGS"
+! AC_RUN_IFELSE([
+ #include <dlfcn.h>
+ /* If this program fails, then RTLD_GLOBAL is needed.
+ * RTLD_GLOBAL will be used and then it is not possible to
+--- 1397,1403 ----
+ ldflags_save=$LDFLAGS
+ dnl -ldl must go first to make this work on Archlinux (Roland Puntaier)
+ LDFLAGS="-ldl $LDFLAGS"
+! AC_RUN_IFELSE([AC_LANG_SOURCE([
+ #include <dlfcn.h>
+ /* If this program fails, then RTLD_GLOBAL is needed.
+ * RTLD_GLOBAL will be used and then it is not possible to
+***************
+*** 1430,1436 ****
+ if (no_rtl_global_needed_for("${python_INSTSONAME}", "${vi_cv_path_python_pfx}"))
+ not_needed = 1;
+ return !not_needed;
+! }],
+ [AC_MSG_RESULT(yes);AC_DEFINE(PY_NO_RTLD_GLOBAL)], [AC_MSG_RESULT(no)])
+
+ CFLAGS=$cflags_save
+--- 1430,1436 ----
+ if (no_rtl_global_needed_for("${python_INSTSONAME}", "${vi_cv_path_python_pfx}"))
+ not_needed = 1;
+ return !not_needed;
+! }])],
+ [AC_MSG_RESULT(yes);AC_DEFINE(PY_NO_RTLD_GLOBAL)], [AC_MSG_RESULT(no)])
+
+ CFLAGS=$cflags_save
+***************
+*** 1442,1448 ****
+ ldflags_save=$LDFLAGS
+ dnl -ldl must go first to make this work on Archlinux (Roland Puntaier)
+ LDFLAGS="-ldl $LDFLAGS"
+! AC_RUN_IFELSE([
+ #include <dlfcn.h>
+ #include <wchar.h>
+ /* If this program fails, then RTLD_GLOBAL is needed.
+--- 1442,1448 ----
+ ldflags_save=$LDFLAGS
+ dnl -ldl must go first to make this work on Archlinux (Roland Puntaier)
+ LDFLAGS="-ldl $LDFLAGS"
+! AC_RUN_IFELSE([AC_LANG_SOURCE([
+ #include <dlfcn.h>
+ #include <wchar.h>
+ /* If this program fails, then RTLD_GLOBAL is needed.
+***************
+*** 1476,1482 ****
+ if (no_rtl_global_needed_for("${python3_INSTSONAME}", L"${vi_cv_path_python3_pfx}"))
+ not_needed = 1;
+ return !not_needed;
+! }],
+ [AC_MSG_RESULT(yes);AC_DEFINE(PY3_NO_RTLD_GLOBAL)], [AC_MSG_RESULT(no)])
+
+ CFLAGS=$cflags_save
+--- 1476,1482 ----
+ if (no_rtl_global_needed_for("${python3_INSTSONAME}", L"${vi_cv_path_python3_pfx}"))
+ not_needed = 1;
+ return !not_needed;
+! }])],
+ [AC_MSG_RESULT(yes);AC_DEFINE(PY3_NO_RTLD_GLOBAL)], [AC_MSG_RESULT(no)])
+
+ CFLAGS=$cflags_save
+***************
+*** 2737,2743 ****
+
+ AC_CACHE_CHECK([whether toupper is broken], [vim_cv_toupper_broken],
+ [
+! AC_RUN_IFELSE([[
+ #include "confdefs.h"
+ #include <ctype.h>
+ #if STDC_HEADERS
+--- 2737,2743 ----
+
+ AC_CACHE_CHECK([whether toupper is broken], [vim_cv_toupper_broken],
+ [
+! AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include "confdefs.h"
+ #include <ctype.h>
+ #if STDC_HEADERS
+***************
+*** 2745,2751 ****
+ # include <stddef.h>
+ #endif
+ main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
+! ]],[
+ vim_cv_toupper_broken=yes
+ ],[
+ vim_cv_toupper_broken=no
+--- 2745,2751 ----
+ # include <stddef.h>
+ #endif
+ main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
+! ]])],[
+ vim_cv_toupper_broken=yes
+ ],[
+ vim_cv_toupper_broken=no
+***************
+*** 2993,2999 ****
+
+ AC_CACHE_CHECK([whether we talk terminfo], [vim_cv_terminfo],
+ [
+! AC_RUN_IFELSE([[
+ #include "confdefs.h"
+ #ifdef HAVE_TERMCAP_H
+ # include <termcap.h>
+--- 2993,2999 ----
+
+ AC_CACHE_CHECK([whether we talk terminfo], [vim_cv_terminfo],
+ [
+! AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include "confdefs.h"
+ #ifdef HAVE_TERMCAP_H
+ # include <termcap.h>
+***************
+*** 3007,3013 ****
+ #endif
+ main()
+ {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }
+! ]],[
+ vim_cv_terminfo=no
+ ],[
+ vim_cv_terminfo=yes
+--- 3007,3013 ----
+ #endif
+ main()
+ {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }
+! ]])],[
+ vim_cv_terminfo=no
+ ],[
+ vim_cv_terminfo=yes
+***************
+*** 3023,3029 ****
+ if test "x$olibs" != "x$LIBS"; then
+ AC_CACHE_CHECK([what tgetent() returns for an unknown terminal], [vim_cv_tgent],
+ [
+! AC_RUN_IFELSE([[
+ #include "confdefs.h"
+ #ifdef HAVE_TERMCAP_H
+ # include <termcap.h>
+--- 3023,3029 ----
+ if test "x$olibs" != "x$LIBS"; then
+ AC_CACHE_CHECK([what tgetent() returns for an unknown terminal], [vim_cv_tgent],
+ [
+! AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include "confdefs.h"
+ #ifdef HAVE_TERMCAP_H
+ # include <termcap.h>
+***************
+*** 3034,3040 ****
+ #endif
+ main()
+ {char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
+! ]],[
+ vim_cv_tgent=zero
+ ],[
+ vim_cv_tgent=non-zero
+--- 3034,3040 ----
+ #endif
+ main()
+ {char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
+! ]])],[
+ vim_cv_tgent=zero
+ ],[
+ vim_cv_tgent=non-zero
+***************
+*** 3158,3164 ****
+ rm -f conftest_grp
+ AC_CACHE_CHECK([default tty permissions/group], [vim_cv_tty_group],
+ [
+! AC_RUN_IFELSE([[
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #if STDC_HEADERS
+--- 3158,3164 ----
+ rm -f conftest_grp
+ AC_CACHE_CHECK([default tty permissions/group], [vim_cv_tty_group],
+ [
+! AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #if STDC_HEADERS
+***************
+*** 3194,3200 ****
+ fclose(fp);
+ exit(0);
+ }
+! ]],[
+ if test -f conftest_grp; then
+ vim_cv_tty_group=`cat conftest_grp`
+ if test "x$vim_cv_tty_mode" = "x" ; then
+--- 3194,3200 ----
+ fclose(fp);
+ exit(0);
+ }
+! ]])],[
+ if test -f conftest_grp; then
+ vim_cv_tty_group=`cat conftest_grp`
+ if test "x$vim_cv_tty_mode" = "x" ; then
+***************
+*** 3252,3258 ****
+ dnl system("sh -c pwd")
+ AC_CACHE_CHECK([getcwd implementation is broken], [vim_cv_getcwd_broken],
+ [
+! AC_RUN_IFELSE([[
+ #include "confdefs.h"
+ #ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+--- 3252,3258 ----
+ dnl system("sh -c pwd")
+ AC_CACHE_CHECK([getcwd implementation is broken], [vim_cv_getcwd_broken],
+ [
+! AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include "confdefs.h"
+ #ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+***************
+*** 3265,3271 ****
+ environ = dagger;
+ return getcwd(buffer, 500) ? 0 : 1;
+ }
+! ]],[
+ vim_cv_getcwd_broken=no
+ ],[
+ vim_cv_getcwd_broken=yes
+--- 3265,3271 ----
+ environ = dagger;
+ return getcwd(buffer, 500) ? 0 : 1;
+ }
+! ]])],[
+ vim_cv_getcwd_broken=no
+ ],[
+ vim_cv_getcwd_broken=yes
+***************
+*** 3308,3314 ****
+
+ AC_CACHE_CHECK([whether stat() ignores a trailing slash], [vim_cv_stat_ignores_slash],
+ [
+! AC_RUN_IFELSE([[
+ #include "confdefs.h"
+ #if STDC_HEADERS
+ # include <stdlib.h>
+--- 3308,3314 ----
+
+ AC_CACHE_CHECK([whether stat() ignores a trailing slash], [vim_cv_stat_ignores_slash],
+ [
+! AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include "confdefs.h"
+ #if STDC_HEADERS
+ # include <stdlib.h>
+***************
+*** 3317,3323 ****
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ main() {struct stat st; exit(stat("configure/", &st) != 0); }
+! ]],[
+ vim_cv_stat_ignores_slash=yes
+ ],[
+ vim_cv_stat_ignores_slash=no
+--- 3317,3323 ----
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ main() {struct stat st; exit(stat("configure/", &st) != 0); }
+! ]])],[
+ vim_cv_stat_ignores_slash=yes
+ ],[
+ vim_cv_stat_ignores_slash=no
+***************
+*** 3631,3637 ****
+
+ AC_CACHE_CHECK([whether memmove handles overlaps],[vim_cv_memmove_handles_overlap],
+ [
+! AC_RUN_IFELSE([[#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog]],
+ [
+ vim_cv_memmove_handles_overlap=yes
+ ],[
+--- 3631,3637 ----
+
+ AC_CACHE_CHECK([whether memmove handles overlaps],[vim_cv_memmove_handles_overlap],
+ [
+! AC_RUN_IFELSE([AC_LANG_SOURCE([[#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog]])],
+ [
+ vim_cv_memmove_handles_overlap=yes
+ ],[
+***************
+*** 3646,3652 ****
+ else
+ AC_CACHE_CHECK([whether bcopy handles overlaps],[vim_cv_bcopy_handles_overlap],
+ [
+! AC_RUN_IFELSE([[#define mch_bcopy(s,d,l) bcopy(d,s,l) $bcopy_test_prog]],
+ [
+ vim_cv_bcopy_handles_overlap=yes
+ ],[
+--- 3646,3652 ----
+ else
+ AC_CACHE_CHECK([whether bcopy handles overlaps],[vim_cv_bcopy_handles_overlap],
+ [
+! AC_RUN_IFELSE([AC_LANG_SOURCE([[#define mch_bcopy(s,d,l) bcopy(d,s,l) $bcopy_test_prog]])],
+ [
+ vim_cv_bcopy_handles_overlap=yes
+ ],[
+***************
+*** 3661,3667 ****
+ else
+ AC_CACHE_CHECK([whether memcpy handles overlaps],[vim_cv_memcpy_handles_overlap],
+ [
+! AC_RUN_IFELSE([[#define mch_memcpy(s,d,l) memcpy(d,s,l) $bcopy_test_prog]],
+ [
+ vim_cv_memcpy_handles_overlap=yes
+ ],[
+--- 3661,3667 ----
+ else
+ AC_CACHE_CHECK([whether memcpy handles overlaps],[vim_cv_memcpy_handles_overlap],
+ [
+! AC_RUN_IFELSE([AC_LANG_SOURCE([[#define mch_memcpy(s,d,l) memcpy(d,s,l) $bcopy_test_prog]])],
+ [
+ vim_cv_memcpy_handles_overlap=yes
+ ],[
+*** ../vim-7.4.222/src/auto/configure 2014-03-27 17:19:05.868676325 +0100
+--- src/auto/configure 2014-03-27 17:35:39.660691553 +0100
+***************
+*** 1,11 ****
+ #! /bin/sh
+ # Guess values for system-dependent variables and create Makefiles.
+! # Generated by GNU Autoconf 2.65.
+ #
+ #
+! # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+! # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+! # Inc.
+ #
+ #
+ # This configure script is free software; the Free Software Foundation
+--- 1,9 ----
+ #! /bin/sh
+ # Guess values for system-dependent variables and create Makefiles.
+! # Generated by GNU Autoconf 2.69.
+ #
+ #
+! # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+ #
+ #
+ # This configure script is free software; the Free Software Foundation
+***************
+*** 89,94 ****
+--- 87,93 ----
+ IFS=" "" $as_nl"
+
+ # Find who we are. Look in the path if we contain no directory separator.
++ as_myself=
+ case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+***************
+*** 133,138 ****
+--- 132,162 ----
+ # CDPATH.
+ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
++ # Use a proper internal environment variable to ensure we don't fall
++ # into an infinite loop, continuously re-executing ourselves.
++ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
++ _as_can_reexec=no; export _as_can_reexec;
++ # We cannot yet assume a decent shell, so we have to provide a
++ # neutralization value for shells without unset; and this also
++ # works around shells that cannot unset nonexistent variables.
++ # Preserve -v and -x to the replacement shell.
++ BASH_ENV=/dev/null
++ ENV=/dev/null
++ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
++ case $- in # ((((
++ *v*x* | *x*v* ) as_opts=-vx ;;
++ *v* ) as_opts=-v ;;
++ *x* ) as_opts=-x ;;
++ * ) as_opts= ;;
++ esac
++ exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
++ # Admittedly, this is quite paranoid, since all the known shells bail
++ # out after a failed `exec'.
++ $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
++ as_fn_exit 255
++ fi
++ # We don't want this to propagate to other subprocesses.
++ { _as_can_reexec=; unset _as_can_reexec;}
+ if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+***************
+*** 166,172 ****
+ else
+ exitcode=1; echo positional parameters were not saved.
+ fi
+! test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+--- 190,197 ----
+ else
+ exitcode=1; echo positional parameters were not saved.
+ fi
+! test x\$exitcode = x0 || exit 1
+! test -x / || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+***************
+*** 211,224 ****
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+! # We cannot yet assume a decent shell, so we have to provide a
+! # neutralization value for shells without unset; and this also
+! # works around shells that cannot unset nonexistent variables.
+! BASH_ENV=/dev/null
+! ENV=/dev/null
+! (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+! export CONFIG_SHELL
+! exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+ fi
+
+ if test x$as_have_required = xno; then :
+--- 236,260 ----
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+! export CONFIG_SHELL
+! # We cannot yet assume a decent shell, so we have to provide a
+! # neutralization value for shells without unset; and this also
+! # works around shells that cannot unset nonexistent variables.
+! # Preserve -v and -x to the replacement shell.
+! BASH_ENV=/dev/null
+! ENV=/dev/null
+! (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+! case $- in # ((((
+! *v*x* | *x*v* ) as_opts=-vx ;;
+! *v* ) as_opts=-v ;;
+! *x* ) as_opts=-x ;;
+! * ) as_opts= ;;
+! esac
+! exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+! # Admittedly, this is quite paranoid, since all the known shells bail
+! # out after a failed `exec'.
+! $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+! exit 255
+ fi
+
+ if test x$as_have_required = xno; then :
+***************
+*** 316,325 ****
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+! } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+
+
+ } # as_fn_mkdir_p
+ # as_fn_append VAR VALUE
+ # ----------------------
+ # Append the text in VALUE to the end of the definition contained in VAR. Take
+--- 352,369 ----
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+! } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+ } # as_fn_mkdir_p
++
++ # as_fn_executable_p FILE
++ # -----------------------
++ # Test if FILE is an executable regular file.
++ as_fn_executable_p ()
++ {
++ test -f "$1" && test -x "$1"
++ } # as_fn_executable_p
+ # as_fn_append VAR VALUE
+ # ----------------------
+ # Append the text in VALUE to the end of the definition contained in VAR. Take
+***************
+*** 356,374 ****
+ fi # as_fn_arith
+
+
+! # as_fn_error ERROR [LINENO LOG_FD]
+! # ---------------------------------
+ # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+ # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+! # script with status $?, using 1 if that was 0.
+ as_fn_error ()
+ {
+! as_status=$?; test $as_status -eq 0 && as_status=1
+! if test "$3"; then
+! as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+! $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ fi
+! $as_echo "$as_me: error: $1" >&2
+ as_fn_exit $as_status
+ } # as_fn_error
+
+--- 400,418 ----
+ fi # as_fn_arith
+
+
+! # as_fn_error STATUS ERROR [LINENO LOG_FD]
+! # ----------------------------------------
+ # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+ # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+! # script with STATUS, using 1 if that was 0.
+ as_fn_error ()
+ {
+! as_status=$1; test $as_status -eq 0 && as_status=1
+! if test "$4"; then
+! as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+! $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+! $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+ } # as_fn_error
+
+***************
+*** 441,446 ****
+--- 485,494 ----
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
++ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
++ # already done that, so ensure we don't try to do so again and fall
++ # in an infinite loop. This has already happened in practice.
++ _as_can_reexec=no; export _as_can_reexec
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+***************
+*** 475,490 ****
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+! # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+! as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+! as_ln_s='cp -p'
+ fi
+ else
+! as_ln_s='cp -p'
+ fi
+ rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+ rmdir conf$$.dir 2>/dev/null
+--- 523,538 ----
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+! # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+! as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+! as_ln_s='cp -pR'
+ fi
+ else
+! as_ln_s='cp -pR'
+ fi
+ rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+ rmdir conf$$.dir 2>/dev/null
+***************
+*** 496,523 ****
+ as_mkdir_p=false
+ fi
+
+! if test -x / >/dev/null 2>&1; then
+! as_test_x='test -x'
+! else
+! if ls -dL / >/dev/null 2>&1; then
+! as_ls_L_option=L
+! else
+! as_ls_L_option=
+! fi
+! as_test_x='
+! eval sh -c '\''
+! if test -d "$1"; then
+! test -d "$1/.";
+! else
+! case $1 in #(
+! -*)set "./$1";;
+! esac;
+! case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+! ???[sx]*):;;*)false;;esac;fi
+! '\'' sh
+! '
+! fi
+! as_executable_p=$as_test_x
+
+ # Sed expression to map a string onto a valid CPP name.
+ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+--- 544,551 ----
+ as_mkdir_p=false
+ fi
+
+! as_test_x='test -x'
+! as_executable_p=as_fn_executable_p
+
+ # Sed expression to map a string onto a valid CPP name.
+ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+***************
+*** 530,536 ****
+ exec 6>&1
+
+ # Name of the host.
+! # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+ # so uname gets run too.
+ ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+--- 558,564 ----
+ exec 6>&1
+
+ # Name of the host.
+! # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+ # so uname gets run too.
+ ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+***************
+*** 872,879 ****
+ fi
+
+ case $ac_option in
+! *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+! *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+--- 900,908 ----
+ fi
+
+ case $ac_option in
+! *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+! *=) ac_optarg= ;;
+! *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+***************
+*** 918,924 ****
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+! as_fn_error "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+--- 947,953 ----
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+! as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+***************
+*** 944,950 ****
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+! as_fn_error "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+--- 973,979 ----
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+! as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+***************
+*** 1148,1154 ****
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+! as_fn_error "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+--- 1177,1183 ----
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+! as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+***************
+*** 1164,1170 ****
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+! as_fn_error "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+--- 1193,1199 ----
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+! as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+***************
+*** 1194,1201 ****
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+! -*) as_fn_error "unrecognized option: \`$ac_option'
+! Try \`$0 --help' for more information."
+ ;;
+
+ *=*)
+--- 1223,1230 ----
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+! -*) as_fn_error $? "unrecognized option: \`$ac_option'
+! Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+***************
+*** 1203,1209 ****
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+! as_fn_error "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+--- 1232,1238 ----
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+! as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+***************
+*** 1213,1219 ****
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+! : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+--- 1242,1248 ----
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+! : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+***************
+*** 1221,1233 ****
+
+ if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+! as_fn_error "missing argument to $ac_option"
+ fi
+
+ if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+! fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+ fi
+--- 1250,1262 ----
+
+ if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+! as_fn_error $? "missing argument to $ac_option"
+ fi
+
+ if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+! fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+ fi
+***************
+*** 1250,1256 ****
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+! as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+ done
+
+ # There might be people who depend on the old broken behavior: `$host'
+--- 1279,1285 ----
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+! as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+ done
+
+ # There might be people who depend on the old broken behavior: `$host'
+***************
+*** 1264,1271 ****
+ if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+- $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+- If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+--- 1293,1298 ----
+***************
+*** 1280,1288 ****
+ ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ ac_ls_di=`ls -di .` &&
+ ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+! as_fn_error "working directory cannot be determined"
+ test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+! as_fn_error "pwd does not report name of working directory"
+
+
+ # Find the source files, if location was not specified.
+--- 1307,1315 ----
+ ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ ac_ls_di=`ls -di .` &&
+ ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+! as_fn_error $? "working directory cannot be determined"
+ test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+! as_fn_error $? "pwd does not report name of working directory"
+
+
+ # Find the source files, if location was not specified.
+***************
+*** 1321,1331 ****
+ fi
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+! as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
+ fi
+ ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ ac_abs_confdir=`(
+! cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
+ pwd)`
+ # When building in place, set srcdir=.
+ if test "$ac_abs_confdir" = "$ac_pwd"; then
+--- 1348,1358 ----
+ fi
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+! as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+ fi
+ ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ ac_abs_confdir=`(
+! cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+ # When building in place, set srcdir=.
+ if test "$ac_abs_confdir" = "$ac_pwd"; then
+***************
+*** 1365,1371 ****
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+! -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+--- 1392,1398 ----
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+! -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+***************
+*** 1563,1571 ****
+ if $ac_init_version; then
+ cat <<\_ACEOF
+ configure
+! generated by GNU Autoconf 2.65
+
+! Copyright (C) 2009 Free Software Foundation, Inc.
+ This configure script is free software; the Free Software Foundation
+ gives unlimited permission to copy, distribute and modify it.
+ _ACEOF
+--- 1590,1598 ----
+ if $ac_init_version; then
+ cat <<\_ACEOF
+ configure
+! generated by GNU Autoconf 2.69
+
+! Copyright (C) 2012 Free Software Foundation, Inc.
+ This configure script is free software; the Free Software Foundation
+ gives unlimited permission to copy, distribute and modify it.
+ _ACEOF
+***************
+*** 1609,1615 ****
+
+ ac_retval=1
+ fi
+! eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+ } # ac_fn_c_try_compile
+--- 1636,1642 ----
+
+ ac_retval=1
+ fi
+! eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+ } # ac_fn_c_try_compile
+***************
+*** 1635,1641 ****
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+! test $ac_status = 0; } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+--- 1662,1668 ----
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+! test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+***************
+*** 1646,1652 ****
+
+ ac_retval=1
+ fi
+! eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+ } # ac_fn_c_try_cpp
+--- 1673,1679 ----
+
+ ac_retval=1
+ fi
+! eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+ } # ac_fn_c_try_cpp
+***************
+*** 1678,1684 ****
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+! $as_test_x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+ else
+--- 1705,1711 ----
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+! test -x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+ else
+***************
+*** 1692,1698 ****
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+! eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+ } # ac_fn_c_try_link
+--- 1719,1725 ----
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+! eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+ } # ac_fn_c_try_link
+***************
+*** 1734,1740 ****
+ ac_retval=$ac_status
+ fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+! eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+ } # ac_fn_c_try_run
+--- 1761,1767 ----
+ ac_retval=$ac_status
+ fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+! eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+ } # ac_fn_c_try_run
+***************
+*** 1747,1756 ****
+ ac_fn_c_check_header_mongrel ()
+ {
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+! if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+ $as_echo_n "checking for $2... " >&6; }
+! if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+ fi
+ eval ac_res=\$$3
+--- 1774,1783 ----
+ ac_fn_c_check_header_mongrel ()
+ {
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+! if eval \${$3+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+ $as_echo_n "checking for $2... " >&6; }
+! if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+ fi
+ eval ac_res=\$$3
+***************
+*** 1786,1792 ****
+ else
+ ac_header_preproc=no
+ fi
+! rm -f conftest.err conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+ $as_echo "$ac_header_preproc" >&6; }
+
+--- 1813,1819 ----
+ else
+ ac_header_preproc=no
+ fi
+! rm -f conftest.err conftest.i conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+ $as_echo "$ac_header_preproc" >&6; }
+
+***************
+*** 1813,1819 ****
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+ $as_echo_n "checking for $2... " >&6; }
+! if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+ else
+ eval "$3=\$ac_header_compiler"
+--- 1840,1846 ----
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+ $as_echo_n "checking for $2... " >&6; }
+! if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ eval "$3=\$ac_header_compiler"
+***************
+*** 1822,1828 ****
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+ $as_echo "$ac_res" >&6; }
+ fi
+! eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+ } # ac_fn_c_check_header_mongrel
+
+--- 1849,1855 ----
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+ $as_echo "$ac_res" >&6; }
+ fi
+! eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+ } # ac_fn_c_check_header_mongrel
+
+***************
+*** 1835,1841 ****
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+ $as_echo_n "checking for $2... " >&6; }
+! if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+--- 1862,1868 ----
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+ $as_echo_n "checking for $2... " >&6; }
+! if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+***************
+*** 1853,1859 ****
+ eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+ $as_echo "$ac_res" >&6; }
+! eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+ } # ac_fn_c_check_header_compile
+
+--- 1880,1886 ----
+ eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+ $as_echo "$ac_res" >&6; }
+! eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+ } # ac_fn_c_check_header_compile
+
+***************
+*** 1865,1871 ****
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+ $as_echo_n "checking for $2... " >&6; }
+! if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+--- 1892,1898 ----
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+ $as_echo_n "checking for $2... " >&6; }
+! if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+***************
+*** 1920,1926 ****
+ eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+ $as_echo "$ac_res" >&6; }
+! eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+ } # ac_fn_c_check_func
+
+--- 1947,1953 ----
+ eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+ $as_echo "$ac_res" >&6; }
+! eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+ } # ac_fn_c_check_func
+
+***************
+*** 1933,1939 ****
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+ $as_echo_n "checking for $2... " >&6; }
+! if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+ else
+ eval "$3=no"
+--- 1960,1966 ----
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+ $as_echo_n "checking for $2... " >&6; }
+! if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ eval "$3=no"
+***************
+*** 1974,1980 ****
+ eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+ $as_echo "$ac_res" >&6; }
+! eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+ } # ac_fn_c_check_type
+
+--- 2001,2007 ----
+ eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+ $as_echo "$ac_res" >&6; }
+! eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+ } # ac_fn_c_check_type
+
+***************
+*** 1987,1993 ****
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
+ $as_echo_n "checking for uint$2_t... " >&6; }
+! if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+ else
+ eval "$3=no"
+--- 2014,2020 ----
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
+ $as_echo_n "checking for uint$2_t... " >&6; }
+! if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ eval "$3=no"
+***************
+*** 2002,2008 ****
+ main ()
+ {
+ static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
+! test_array [0] = 0
+
+ ;
+ return 0;
+--- 2029,2036 ----
+ main ()
+ {
+ static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
+! test_array [0] = 0;
+! return test_array [0];
+
+ ;
+ return 0;
+***************
+*** 2017,2024 ****
+ esac
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+! eval as_val=\$$3
+! if test "x$as_val" = x""no; then :
+
+ else
+ break
+--- 2045,2051 ----
+ esac
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+! if eval test \"x\$"$3"\" = x"no"; then :
+
+ else
+ break
+***************
+*** 2028,2034 ****
+ eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+ $as_echo "$ac_res" >&6; }
+! eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+ } # ac_fn_c_find_uintX_t
+
+--- 2055,2061 ----
+ eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+ $as_echo "$ac_res" >&6; }
+! eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+ } # ac_fn_c_find_uintX_t
+
+***************
+*** 2049,2055 ****
+ main ()
+ {
+ static int test_array [1 - 2 * !(($2) >= 0)];
+! test_array [0] = 0
+
+ ;
+ return 0;
+--- 2076,2083 ----
+ main ()
+ {
+ static int test_array [1 - 2 * !(($2) >= 0)];
+! test_array [0] = 0;
+! return test_array [0];
+
+ ;
+ return 0;
+***************
+*** 2065,2071 ****
+ main ()
+ {
+ static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+! test_array [0] = 0
+
+ ;
+ return 0;
+--- 2093,2100 ----
+ main ()
+ {
+ static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+! test_array [0] = 0;
+! return test_array [0];
+
+ ;
+ return 0;
+***************
+*** 2091,2097 ****
+ main ()
+ {
+ static int test_array [1 - 2 * !(($2) < 0)];
+! test_array [0] = 0
+
+ ;
+ return 0;
+--- 2120,2127 ----
+ main ()
+ {
+ static int test_array [1 - 2 * !(($2) < 0)];
+! test_array [0] = 0;
+! return test_array [0];
+
+ ;
+ return 0;
+***************
+*** 2107,2113 ****
+ main ()
+ {
+ static int test_array [1 - 2 * !(($2) >= $ac_mid)];
+! test_array [0] = 0
+
+ ;
+ return 0;
+--- 2137,2144 ----
+ main ()
+ {
+ static int test_array [1 - 2 * !(($2) >= $ac_mid)];
+! test_array [0] = 0;
+! return test_array [0];
+
+ ;
+ return 0;
+***************
+*** 2141,2147 ****
+ main ()
+ {
+ static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+! test_array [0] = 0
+
+ ;
+ return 0;
+--- 2172,2179 ----
+ main ()
+ {
+ static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+! test_array [0] = 0;
+! return test_array [0];
+
+ ;
+ return 0;
+***************
+*** 2205,2211 ****
+ rm -f conftest.val
+
+ fi
+! eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+ } # ac_fn_c_compute_int
+--- 2237,2243 ----
+ rm -f conftest.val
+
+ fi
+! eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+ } # ac_fn_c_compute_int
+***************
+*** 2214,2220 ****
+ running configure, to aid debugging if configure makes a mistake.
+
+ It was created by $as_me, which was
+! generated by GNU Autoconf 2.65. Invocation command line was
+
+ $ $0 $@
+
+--- 2246,2252 ----
+ running configure, to aid debugging if configure makes a mistake.
+
+ It was created by $as_me, which was
+! generated by GNU Autoconf 2.69. Invocation command line was
+
+ $ $0 $@
+
+***************
+*** 2324,2334 ****
+ {
+ echo
+
+! cat <<\_ASBOX
+! ## ---------------- ##
+ ## Cache variables. ##
+! ## ---------------- ##
+! _ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+ (
+--- 2356,2364 ----
+ {
+ echo
+
+! $as_echo "## ---------------- ##
+ ## Cache variables. ##
+! ## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+ (
+***************
+*** 2362,2372 ****
+ )
+ echo
+
+! cat <<\_ASBOX
+! ## ----------------- ##
+ ## Output variables. ##
+! ## ----------------- ##
+! _ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+--- 2392,2400 ----
+ )
+ echo
+
+! $as_echo "## ----------------- ##
+ ## Output variables. ##
+! ## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+***************
+*** 2379,2389 ****
+ echo
+
+ if test -n "$ac_subst_files"; then
+! cat <<\_ASBOX
+! ## ------------------- ##
+ ## File substitutions. ##
+! ## ------------------- ##
+! _ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+--- 2407,2415 ----
+ echo
+
+ if test -n "$ac_subst_files"; then
+! $as_echo "## ------------------- ##
+ ## File substitutions. ##
+! ## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+***************
+*** 2397,2407 ****
+ fi
+
+ if test -s confdefs.h; then
+! cat <<\_ASBOX
+! ## ----------- ##
+ ## confdefs.h. ##
+! ## ----------- ##
+! _ASBOX
+ echo
+ cat confdefs.h
+ echo
+--- 2423,2431 ----
+ fi
+
+ if test -s confdefs.h; then
+! $as_echo "## ----------- ##
+ ## confdefs.h. ##
+! ## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+***************
+*** 2456,2462 ****
+ ac_site_file1=NONE
+ ac_site_file2=NONE
+ if test -n "$CONFIG_SITE"; then
+! ac_site_file1=$CONFIG_SITE
+ elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+--- 2480,2491 ----
+ ac_site_file1=NONE
+ ac_site_file2=NONE
+ if test -n "$CONFIG_SITE"; then
+! # We do not want a PATH search for config.site.
+! case $CONFIG_SITE in #((
+! -*) ac_site_file1=./$CONFIG_SITE;;
+! */*) ac_site_file1=$CONFIG_SITE;;
+! *) ac_site_file1=./$CONFIG_SITE;;
+! esac
+ elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+***************
+*** 2471,2477 ****
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+ $as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+! . "$ac_site_file"
+ fi
+ done
+
+--- 2500,2510 ----
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+ $as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+! . "$ac_site_file" \
+! || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+! $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+! as_fn_error $? "failed to load site script $ac_site_file
+! See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ done
+
+***************
+*** 2547,2553 ****
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+ $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+! as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+ fi
+ ## -------------------- ##
+ ## Main body of script. ##
+--- 2580,2586 ----
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+ $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+! as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+ fi
+ ## -------------------- ##
+ ## Main body of script. ##
+***************
+*** 2569,2575 ****
+ $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+ set x ${MAKE-make}
+ ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+! if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat >conftest.make <<\_ACEOF
+--- 2602,2608 ----
+ $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+ set x ${MAKE-make}
+ ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+! if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat >conftest.make <<\_ACEOF
+***************
+*** 2577,2583 ****
+ all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+ _ACEOF
+! # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+ case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+--- 2610,2616 ----
+ all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+ _ACEOF
+! # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+ case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+***************
+*** 2607,2613 ****
+ set dummy ${ac_tool_prefix}gcc; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if test -n "$CC"; then
+--- 2640,2646 ----
+ set dummy ${ac_tool_prefix}gcc; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if test -n "$CC"; then
+***************
+*** 2619,2625 ****
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+--- 2652,2658 ----
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+***************
+*** 2647,2653 ****
+ set dummy gcc; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if test -n "$ac_ct_CC"; then
+--- 2680,2686 ----
+ set dummy gcc; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if test -n "$ac_ct_CC"; then
+***************
+*** 2659,2665 ****
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+--- 2692,2698 ----
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+***************
+*** 2700,2706 ****
+ set dummy ${ac_tool_prefix}cc; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if test -n "$CC"; then
+--- 2733,2739 ----
+ set dummy ${ac_tool_prefix}cc; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if test -n "$CC"; then
+***************
+*** 2712,2718 ****
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+--- 2745,2751 ----
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+***************
+*** 2740,2746 ****
+ set dummy cc; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if test -n "$CC"; then
+--- 2773,2779 ----
+ set dummy cc; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if test -n "$CC"; then
+***************
+*** 2753,2759 ****
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+--- 2786,2792 ----
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+***************
+*** 2799,2805 ****
+ set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if test -n "$CC"; then
+--- 2832,2838 ----
+ set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if test -n "$CC"; then
+***************
+*** 2811,2817 ****
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+--- 2844,2850 ----
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+***************
+*** 2843,2849 ****
+ set dummy $ac_prog; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if test -n "$ac_ct_CC"; then
+--- 2876,2882 ----
+ set dummy $ac_prog; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if test -n "$ac_ct_CC"; then
+***************
+*** 2855,2861 ****
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+--- 2888,2894 ----
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+***************
+*** 2897,2904 ****
+
+ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+! as_fn_error "no acceptable C compiler found in \$PATH
+! See \`config.log' for more details." "$LINENO" 5; }
+
+ # Provide some information about the compiler.
+ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+--- 2930,2937 ----
+
+ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+! as_fn_error $? "no acceptable C compiler found in \$PATH
+! See \`config.log' for more details" "$LINENO" 5; }
+
+ # Provide some information about the compiler.
+ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+***************
+*** 3012,3020 ****
+
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+! { as_fn_set_status 77
+! as_fn_error "C compiler cannot create executables
+! See \`config.log' for more details." "$LINENO" 5; }; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+--- 3045,3052 ----
+
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+! as_fn_error 77 "C compiler cannot create executables
+! See \`config.log' for more details" "$LINENO" 5; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+***************
+*** 3056,3063 ****
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+! as_fn_error "cannot compute suffix of executables: cannot compile and link
+! See \`config.log' for more details." "$LINENO" 5; }
+ fi
+ rm -f conftest conftest$ac_cv_exeext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+--- 3088,3095 ----
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+! as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+! See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ rm -f conftest conftest$ac_cv_exeext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+***************
+*** 3114,3122 ****
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+! as_fn_error "cannot run C compiled programs.
+ If you meant to cross compile, use \`--host'.
+! See \`config.log' for more details." "$LINENO" 5; }
+ fi
+ fi
+ fi
+--- 3146,3154 ----
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+! as_fn_error $? "cannot run C compiled programs.
+ If you meant to cross compile, use \`--host'.
+! See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ fi
+ fi
+***************
+*** 3127,3133 ****
+ ac_clean_files=$ac_clean_files_save
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+ $as_echo_n "checking for suffix of object files... " >&6; }
+! if test "${ac_cv_objext+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+--- 3159,3165 ----
+ ac_clean_files=$ac_clean_files_save
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+ $as_echo_n "checking for suffix of object files... " >&6; }
+! if ${ac_cv_objext+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+***************
+*** 3167,3174 ****
+
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+! as_fn_error "cannot compute suffix of object files: cannot compile
+! See \`config.log' for more details." "$LINENO" 5; }
+ fi
+ rm -f conftest.$ac_cv_objext conftest.$ac_ext
+ fi
+--- 3199,3206 ----
+
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+! as_fn_error $? "cannot compute suffix of object files: cannot compile
+! See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ rm -f conftest.$ac_cv_objext conftest.$ac_ext
+ fi
+***************
+*** 3178,3184 ****
+ ac_objext=$OBJEXT
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+ $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+! if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+--- 3210,3216 ----
+ ac_objext=$OBJEXT
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+ $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+! if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+***************
+*** 3215,3221 ****
+ ac_save_CFLAGS=$CFLAGS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+ $as_echo_n "checking whether $CC accepts -g... " >&6; }
+! if test "${ac_cv_prog_cc_g+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+--- 3247,3253 ----
+ ac_save_CFLAGS=$CFLAGS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+ $as_echo_n "checking whether $CC accepts -g... " >&6; }
+! if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+***************
+*** 3293,3299 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+ $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+! if test "${ac_cv_prog_cc_c89+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_cv_prog_cc_c89=no
+--- 3325,3331 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+ $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+! if ${ac_cv_prog_cc_c89+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_cv_prog_cc_c89=no
+***************
+*** 3302,3309 ****
+ /* end confdefs.h. */
+ #include <stdarg.h>
+ #include <stdio.h>
+! #include <sys/types.h>
+! #include <sys/stat.h>
+ /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+ struct buf { int x; };
+ FILE * (*rcsopen) (struct buf *, struct stat *, int);
+--- 3334,3340 ----
+ /* end confdefs.h. */
+ #include <stdarg.h>
+ #include <stdio.h>
+! struct stat;
+ /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+ struct buf { int x; };
+ FILE * (*rcsopen) (struct buf *, struct stat *, int);
+***************
+*** 3399,3405 ****
+ CPP=
+ fi
+ if test -z "$CPP"; then
+! if test "${ac_cv_prog_CPP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ # Double quotes because CPP needs to be expanded
+--- 3430,3436 ----
+ CPP=
+ fi
+ if test -z "$CPP"; then
+! if ${ac_cv_prog_CPP+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ # Double quotes because CPP needs to be expanded
+***************
+*** 3429,3435 ****
+ # Broken: fails on valid input.
+ continue
+ fi
+! rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+--- 3460,3466 ----
+ # Broken: fails on valid input.
+ continue
+ fi
+! rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+***************
+*** 3445,3455 ****
+ ac_preproc_ok=:
+ break
+ fi
+! rm -f conftest.err conftest.$ac_ext
+
+ done
+ # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+! rm -f conftest.err conftest.$ac_ext
+ if $ac_preproc_ok; then :
+ break
+ fi
+--- 3476,3486 ----
+ ac_preproc_ok=:
+ break
+ fi
+! rm -f conftest.err conftest.i conftest.$ac_ext
+
+ done
+ # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+! rm -f conftest.i conftest.err conftest.$ac_ext
+ if $ac_preproc_ok; then :
+ break
+ fi
+***************
+*** 3488,3494 ****
+ # Broken: fails on valid input.
+ continue
+ fi
+! rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+--- 3519,3525 ----
+ # Broken: fails on valid input.
+ continue
+ fi
+! rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+***************
+*** 3504,3521 ****
+ ac_preproc_ok=:
+ break
+ fi
+! rm -f conftest.err conftest.$ac_ext
+
+ done
+ # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+! rm -f conftest.err conftest.$ac_ext
+ if $ac_preproc_ok; then :
+
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+! as_fn_error "C preprocessor \"$CPP\" fails sanity check
+! See \`config.log' for more details." "$LINENO" 5; }
+ fi
+
+ ac_ext=c
+--- 3535,3552 ----
+ ac_preproc_ok=:
+ break
+ fi
+! rm -f conftest.err conftest.i conftest.$ac_ext
+
+ done
+ # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+! rm -f conftest.i conftest.err conftest.$ac_ext
+ if $ac_preproc_ok; then :
+
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+! as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+! See \`config.log' for more details" "$LINENO" 5; }
+ fi
+
+ ac_ext=c
+***************
+*** 3527,3533 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+ $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+! if test "${ac_cv_path_GREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if test -z "$GREP"; then
+--- 3558,3564 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+ $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+! if ${ac_cv_path_GREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if test -z "$GREP"; then
+***************
+*** 3541,3547 ****
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+! { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ # Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+ case `"$ac_path_GREP" --version 2>&1` in
+--- 3572,3578 ----
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+! as_fn_executable_p "$ac_path_GREP" || continue
+ # Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+ case `"$ac_path_GREP" --version 2>&1` in
+***************
+*** 3576,3582 ****
+ done
+ IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+! as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+ else
+ ac_cv_path_GREP=$GREP
+--- 3607,3613 ----
+ done
+ IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+! as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+ else
+ ac_cv_path_GREP=$GREP
+***************
+*** 3590,3596 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+ $as_echo_n "checking for egrep... " >&6; }
+! if test "${ac_cv_path_EGREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+--- 3621,3627 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+ $as_echo_n "checking for egrep... " >&6; }
+! if ${ac_cv_path_EGREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+***************
+*** 3607,3613 ****
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+! { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ # Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+ case `"$ac_path_EGREP" --version 2>&1` in
+--- 3638,3644 ----
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+! as_fn_executable_p "$ac_path_EGREP" || continue
+ # Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+ case `"$ac_path_EGREP" --version 2>&1` in
+***************
+*** 3642,3648 ****
+ done
+ IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+! as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+ else
+ ac_cv_path_EGREP=$EGREP
+--- 3673,3679 ----
+ done
+ IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+! as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+ else
+ ac_cv_path_EGREP=$EGREP
+***************
+*** 3666,3672 ****
+ rm -f conftest*
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
+ $as_echo_n "checking for library containing strerror... " >&6; }
+! if test "${ac_cv_search_strerror+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_func_search_save_LIBS=$LIBS
+--- 3697,3703 ----
+ rm -f conftest*
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
+ $as_echo_n "checking for library containing strerror... " >&6; }
+! if ${ac_cv_search_strerror+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_func_search_save_LIBS=$LIBS
+***************
+*** 3700,3710 ****
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+! if test "${ac_cv_search_strerror+set}" = set; then :
+ break
+ fi
+ done
+! if test "${ac_cv_search_strerror+set}" = set; then :
+
+ else
+ ac_cv_search_strerror=no
+--- 3731,3741 ----
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+! if ${ac_cv_search_strerror+:} false; then :
+ break
+ fi
+ done
+! if ${ac_cv_search_strerror+:} false; then :
+
+ else
+ ac_cv_search_strerror=no
+***************
+*** 3725,3731 ****
+ set dummy $ac_prog; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if test "${ac_cv_prog_AWK+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if test -n "$AWK"; then
+--- 3756,3762 ----
+ set dummy $ac_prog; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if ${ac_cv_prog_AWK+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if test -n "$AWK"; then
+***************
+*** 3737,3743 ****
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+--- 3768,3774 ----
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+***************
+*** 3765,3771 ****
+ set dummy strip; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if test "${ac_cv_prog_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if test -n "$STRIP"; then
+--- 3796,3802 ----
+ set dummy strip; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if test -n "$STRIP"; then
+***************
+*** 3777,3783 ****
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+--- 3808,3814 ----
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+***************
+*** 3804,3810 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+ $as_echo_n "checking for ANSI C header files... " >&6; }
+! if test "${ac_cv_header_stdc+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+--- 3835,3841 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+ $as_echo_n "checking for ANSI C header files... " >&6; }
+! if ${ac_cv_header_stdc+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+***************
+*** 3916,3922 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
+ $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
+! if test "${ac_cv_header_sys_wait_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+--- 3947,3953 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
+ $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
+! if ${ac_cv_header_sys_wait_h+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+***************
+*** 4107,4113 ****
+ set dummy xcode-select; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if test "${ac_cv_path_XCODE_SELECT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $XCODE_SELECT in
+--- 4138,4144 ----
+ set dummy xcode-select; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if ${ac_cv_path_XCODE_SELECT+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $XCODE_SELECT in
+***************
+*** 4121,4127 ****
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_XCODE_SELECT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+--- 4152,4158 ----
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_XCODE_SELECT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+***************
+*** 4230,4237 ****
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+ "
+! eval as_val=\$$as_ac_Header
+! if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+--- 4261,4267 ----
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+ "
+! if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+***************
+*** 4242,4248 ****
+
+
+ ac_fn_c_check_header_mongrel "$LINENO" "Carbon/Carbon.h" "ac_cv_header_Carbon_Carbon_h" "$ac_includes_default"
+! if test "x$ac_cv_header_Carbon_Carbon_h" = x""yes; then :
+ CARBON=yes
+ fi
+
+--- 4272,4278 ----
+
+
+ ac_fn_c_check_header_mongrel "$LINENO" "Carbon/Carbon.h" "ac_cv_header_Carbon_Carbon_h" "$ac_includes_default"
+! if test "x$ac_cv_header_Carbon_Carbon_h" = xyes; then :
+ CARBON=yes
+ fi
+
+***************
+*** 4266,4272 ****
+ for ac_header in AvailabilityMacros.h
+ do :
+ ac_fn_c_check_header_mongrel "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default"
+! if test "x$ac_cv_header_AvailabilityMacros_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_AVAILABILITYMACROS_H 1
+ _ACEOF
+--- 4296,4302 ----
+ for ac_header in AvailabilityMacros.h
+ do :
+ ac_fn_c_check_header_mongrel "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default"
+! if test "x$ac_cv_header_AvailabilityMacros_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_AVAILABILITYMACROS_H 1
+ _ACEOF
+***************
+*** 4296,4302 ****
+ have_local_include=yes
+ have_local_lib=yes
+ ;;
+! *) as_fn_error "must pass path argument to --with-local-dir" "$LINENO" 5 ;;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $local_dir" >&5
+ $as_echo "$local_dir" >&6; }
+--- 4326,4332 ----
+ have_local_include=yes
+ have_local_lib=yes
+ ;;
+! *) as_fn_error $? "must pass path argument to --with-local-dir" "$LINENO" 5 ;;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $local_dir" >&5
+ $as_echo "$local_dir" >&6; }
+***************
+*** 4505,4511 ****
+ $as_echo "no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5
+ $as_echo_n "checking for is_selinux_enabled in -lselinux... " >&6; }
+! if test "${ac_cv_lib_selinux_is_selinux_enabled+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 4535,4541 ----
+ $as_echo "no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5
+ $as_echo_n "checking for is_selinux_enabled in -lselinux... " >&6; }
+! if ${ac_cv_lib_selinux_is_selinux_enabled+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 4539,4545 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5
+ $as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; }
+! if test "x$ac_cv_lib_selinux_is_selinux_enabled" = x""yes; then :
+ LIBS="$LIBS -lselinux"
+ $as_echo "#define HAVE_SELINUX 1" >>confdefs.h
+
+--- 4569,4575 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5
+ $as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; }
+! if test "x$ac_cv_lib_selinux_is_selinux_enabled" = xyes; then :
+ LIBS="$LIBS -lselinux"
+ $as_echo "#define HAVE_SELINUX 1" >>confdefs.h
+
+***************
+*** 4701,4707 ****
+ set dummy luajit; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if test "${ac_cv_path_vi_cv_path_luajit+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $vi_cv_path_luajit in
+--- 4731,4737 ----
+ set dummy luajit; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if ${ac_cv_path_vi_cv_path_luajit+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $vi_cv_path_luajit in
+***************
+*** 4715,4721 ****
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_vi_cv_path_luajit="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+--- 4745,4751 ----
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_vi_cv_path_luajit="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+***************
+*** 4740,4746 ****
+ if test "X$vi_cv_path_luajit" != "X"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking LuaJIT version" >&5
+ $as_echo_n "checking LuaJIT version... " >&6; }
+! if test "${vi_cv_version_luajit+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ vi_cv_version_luajit=`${vi_cv_path_luajit} -v 2>&1 | sed 's/LuaJIT \([0-9.]*\)\.[0-9]\(-[a-z0-9]*\)* .*/\1/'`
+--- 4770,4776 ----
+ if test "X$vi_cv_path_luajit" != "X"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking LuaJIT version" >&5
+ $as_echo_n "checking LuaJIT version... " >&6; }
+! if ${vi_cv_version_luajit+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ vi_cv_version_luajit=`${vi_cv_path_luajit} -v 2>&1 | sed 's/LuaJIT \([0-9.]*\)\.[0-9]\(-[a-z0-9]*\)* .*/\1/'`
+***************
+*** 4749,4755 ****
+ $as_echo "$vi_cv_version_luajit" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Lua version of LuaJIT" >&5
+ $as_echo_n "checking Lua version of LuaJIT... " >&6; }
+! if test "${vi_cv_version_lua_luajit+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ vi_cv_version_lua_luajit=`${vi_cv_path_luajit} -e "print(_VERSION)" | sed 's/.* //'`
+--- 4779,4785 ----
+ $as_echo "$vi_cv_version_luajit" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Lua version of LuaJIT" >&5
+ $as_echo_n "checking Lua version of LuaJIT... " >&6; }
+! if ${vi_cv_version_lua_luajit+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ vi_cv_version_lua_luajit=`${vi_cv_path_luajit} -e "print(_VERSION)" | sed 's/.* //'`
+***************
+*** 4764,4770 ****
+ set dummy lua; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if test "${ac_cv_path_vi_cv_path_plain_lua+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $vi_cv_path_plain_lua in
+--- 4794,4800 ----
+ set dummy lua; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if ${ac_cv_path_vi_cv_path_plain_lua+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $vi_cv_path_plain_lua in
+***************
+*** 4778,4784 ****
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_vi_cv_path_plain_lua="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+--- 4808,4814 ----
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_vi_cv_path_plain_lua="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+***************
+*** 4803,4809 ****
+ if test "X$vi_cv_path_plain_lua" != "X"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Lua version" >&5
+ $as_echo_n "checking Lua version... " >&6; }
+! if test "${vi_cv_version_plain_lua+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ vi_cv_version_plain_lua=`${vi_cv_path_plain_lua} -e "print(_VERSION)" | sed 's/.* //'`
+--- 4833,4839 ----
+ if test "X$vi_cv_path_plain_lua" != "X"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Lua version" >&5
+ $as_echo_n "checking Lua version... " >&6; }
+! if ${vi_cv_version_plain_lua+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ vi_cv_version_plain_lua=`${vi_cv_path_plain_lua} -e "print(_VERSION)" | sed 's/.* //'`
+***************
+*** 4963,4969 ****
+ fi
+ fi
+ if test "$fail_if_missing" = "yes" -a "$lua_ok" != "yes"; then
+! as_fn_error "could not configure lua" "$LINENO" 5
+ fi
+
+
+--- 4993,4999 ----
+ fi
+ fi
+ if test "$fail_if_missing" = "yes" -a "$lua_ok" != "yes"; then
+! as_fn_error $? "could not configure lua" "$LINENO" 5
+ fi
+
+
+***************
+*** 5017,5023 ****
+ set dummy mzscheme; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if test "${ac_cv_path_vi_cv_path_mzscheme+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $vi_cv_path_mzscheme in
+--- 5047,5053 ----
+ set dummy mzscheme; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if ${ac_cv_path_vi_cv_path_mzscheme+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $vi_cv_path_mzscheme in
+***************
+*** 5031,5037 ****
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_vi_cv_path_mzscheme="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+--- 5061,5067 ----
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_vi_cv_path_mzscheme="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+***************
+*** 5064,5070 ****
+ if test "X$vi_cv_path_mzscheme" != "X"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking MzScheme install prefix" >&5
+ $as_echo_n "checking MzScheme install prefix... " >&6; }
+! if test "${vi_cv_path_mzscheme_pfx+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ echo "(display (simplify-path \
+--- 5094,5100 ----
+ if test "X$vi_cv_path_mzscheme" != "X"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking MzScheme install prefix" >&5
+ $as_echo_n "checking MzScheme install prefix... " >&6; }
+! if ${vi_cv_path_mzscheme_pfx+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ echo "(display (simplify-path \
+***************
+*** 5226,5232 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ffi_type_void in -lffi" >&5
+ $as_echo_n "checking for ffi_type_void in -lffi... " >&6; }
+! if test "${ac_cv_lib_ffi_ffi_type_void+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 5256,5262 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ffi_type_void in -lffi" >&5
+ $as_echo_n "checking for ffi_type_void in -lffi... " >&6; }
+! if ${ac_cv_lib_ffi_ffi_type_void+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 5260,5266 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_type_void" >&5
+ $as_echo "$ac_cv_lib_ffi_ffi_type_void" >&6; }
+! if test "x$ac_cv_lib_ffi_ffi_type_void" = x""yes; then :
+ MZSCHEME_LIBS="$MZSCHEME_LIBS -lffi"
+ fi
+
+--- 5290,5296 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_type_void" >&5
+ $as_echo "$ac_cv_lib_ffi_ffi_type_void" >&6; }
+! if test "x$ac_cv_lib_ffi_ffi_type_void" = xyes; then :
+ MZSCHEME_LIBS="$MZSCHEME_LIBS -lffi"
+ fi
+
+***************
+*** 5336,5342 ****
+ set dummy perl; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if test "${ac_cv_path_vi_cv_path_perl+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $vi_cv_path_perl in
+--- 5366,5372 ----
+ set dummy perl; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if ${ac_cv_path_vi_cv_path_perl+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $vi_cv_path_perl in
+***************
+*** 5350,5356 ****
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_vi_cv_path_perl="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+--- 5380,5386 ----
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_vi_cv_path_perl="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+***************
+*** 5498,5504 ****
+ fi
+
+ if test "$fail_if_missing" = "yes" -a "$perl_ok" != "yes"; then
+! as_fn_error "could not configure perl" "$LINENO" 5
+ fi
+ fi
+
+--- 5528,5534 ----
+ fi
+
+ if test "$fail_if_missing" = "yes" -a "$perl_ok" != "yes"; then
+! as_fn_error $? "could not configure perl" "$LINENO" 5
+ fi
+ fi
+
+***************
+*** 5526,5532 ****
+ set dummy $ac_prog; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if test "${ac_cv_path_vi_cv_path_python+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $vi_cv_path_python in
+--- 5556,5562 ----
+ set dummy $ac_prog; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if ${ac_cv_path_vi_cv_path_python+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $vi_cv_path_python in
+***************
+*** 5540,5546 ****
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_vi_cv_path_python="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+--- 5570,5576 ----
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_vi_cv_path_python="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+***************
+*** 5569,5575 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
+ $as_echo_n "checking Python version... " >&6; }
+! if test "${vi_cv_var_python_version+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ vi_cv_var_python_version=`
+--- 5599,5605 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
+ $as_echo_n "checking Python version... " >&6; }
+! if ${vi_cv_var_python_version+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ vi_cv_var_python_version=`
+***************
+*** 5589,5595 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
+ $as_echo_n "checking Python's install prefix... " >&6; }
+! if test "${vi_cv_path_python_pfx+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ vi_cv_path_python_pfx=`
+--- 5619,5625 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
+ $as_echo_n "checking Python's install prefix... " >&6; }
+! if ${vi_cv_path_python_pfx+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ vi_cv_path_python_pfx=`
+***************
+*** 5601,5607 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
+ $as_echo_n "checking Python's execution prefix... " >&6; }
+! if test "${vi_cv_path_python_epfx+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ vi_cv_path_python_epfx=`
+--- 5631,5637 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
+ $as_echo_n "checking Python's execution prefix... " >&6; }
+! if ${vi_cv_path_python_epfx+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ vi_cv_path_python_epfx=`
+***************
+*** 5612,5618 ****
+ $as_echo "$vi_cv_path_python_epfx" >&6; }
+
+
+! if test "${vi_cv_path_pythonpath+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ vi_cv_path_pythonpath=`
+--- 5642,5648 ----
+ $as_echo "$vi_cv_path_python_epfx" >&6; }
+
+
+! if ${vi_cv_path_pythonpath+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ vi_cv_path_pythonpath=`
+***************
+*** 5632,5638 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
+ $as_echo_n "checking Python's configuration directory... " >&6; }
+! if test "${vi_cv_path_python_conf+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+--- 5662,5668 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
+ $as_echo_n "checking Python's configuration directory... " >&6; }
+! if ${vi_cv_path_python_conf+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+***************
+*** 5662,5668 ****
+ $as_echo "can't find it!" >&6; }
+ else
+
+! if test "${vi_cv_path_python_plibs+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+--- 5692,5698 ----
+ $as_echo "can't find it!" >&6; }
+ else
+
+! if ${vi_cv_path_python_plibs+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+***************
+*** 5803,5809 ****
+ fi
+
+ if test "$fail_if_missing" = "yes" -a "$python_ok" != "yes"; then
+! as_fn_error "could not configure python" "$LINENO" 5
+ fi
+ fi
+
+--- 5833,5839 ----
+ fi
+
+ if test "$fail_if_missing" = "yes" -a "$python_ok" != "yes"; then
+! as_fn_error $? "could not configure python" "$LINENO" 5
+ fi
+ fi
+
+***************
+*** 5833,5839 ****
+ set dummy $ac_prog; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if test "${ac_cv_path_vi_cv_path_python3+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $vi_cv_path_python3 in
+--- 5863,5869 ----
+ set dummy $ac_prog; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if ${ac_cv_path_vi_cv_path_python3+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $vi_cv_path_python3 in
+***************
+*** 5847,5853 ****
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_vi_cv_path_python3="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+--- 5877,5883 ----
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_vi_cv_path_python3="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+***************
+*** 5876,5882 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
+ $as_echo_n "checking Python version... " >&6; }
+! if test "${vi_cv_var_python3_version+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ vi_cv_var_python3_version=`
+--- 5906,5912 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
+ $as_echo_n "checking Python version... " >&6; }
+! if ${vi_cv_var_python3_version+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ vi_cv_var_python3_version=`
+***************
+*** 5896,5902 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's abiflags" >&5
+ $as_echo_n "checking Python's abiflags... " >&6; }
+! if test "${vi_cv_var_python3_abiflags+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+--- 5926,5932 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's abiflags" >&5
+ $as_echo_n "checking Python's abiflags... " >&6; }
+! if ${vi_cv_var_python3_abiflags+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+***************
+*** 5913,5919 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
+ $as_echo_n "checking Python's install prefix... " >&6; }
+! if test "${vi_cv_path_python3_pfx+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ vi_cv_path_python3_pfx=`
+--- 5943,5949 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
+ $as_echo_n "checking Python's install prefix... " >&6; }
+! if ${vi_cv_path_python3_pfx+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ vi_cv_path_python3_pfx=`
+***************
+*** 5925,5931 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
+ $as_echo_n "checking Python's execution prefix... " >&6; }
+! if test "${vi_cv_path_python3_epfx+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ vi_cv_path_python3_epfx=`
+--- 5955,5961 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
+ $as_echo_n "checking Python's execution prefix... " >&6; }
+! if ${vi_cv_path_python3_epfx+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ vi_cv_path_python3_epfx=`
+***************
+*** 5936,5942 ****
+ $as_echo "$vi_cv_path_python3_epfx" >&6; }
+
+
+! if test "${vi_cv_path_python3path+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ vi_cv_path_python3path=`
+--- 5966,5972 ----
+ $as_echo "$vi_cv_path_python3_epfx" >&6; }
+
+
+! if ${vi_cv_path_python3path+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ vi_cv_path_python3path=`
+***************
+*** 5956,5962 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
+ $as_echo_n "checking Python's configuration directory... " >&6; }
+! if test "${vi_cv_path_python3_conf+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+--- 5986,5992 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
+ $as_echo_n "checking Python's configuration directory... " >&6; }
+! if ${vi_cv_path_python3_conf+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+***************
+*** 5987,5993 ****
+ $as_echo "can't find it!" >&6; }
+ else
+
+! if test "${vi_cv_path_python3_plibs+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+--- 6017,6023 ----
+ $as_echo "can't find it!" >&6; }
+ else
+
+! if ${vi_cv_path_python3_plibs+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+***************
+*** 6114,6120 ****
+ fi
+ fi
+ if test "$fail_if_missing" = "yes" -a "$python3_ok" != "yes"; then
+! as_fn_error "could not configure python3" "$LINENO" 5
+ fi
+ fi
+
+--- 6144,6150 ----
+ fi
+ fi
+ if test "$fail_if_missing" = "yes" -a "$python3_ok" != "yes"; then
+! as_fn_error $? "could not configure python3" "$LINENO" 5
+ fi
+ fi
+
+***************
+*** 6138,6145 ****
+ if test "$cross_compiling" = yes; then :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+! as_fn_error "cannot run test program while cross compiling
+! See \`config.log' for more details." "$LINENO" 5; }
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+--- 6168,6175 ----
+ if test "$cross_compiling" = yes; then :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+! as_fn_error $? "cannot run test program while cross compiling
+! See \`config.log' for more details" "$LINENO" 5; }
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+***************
+*** 6203,6210 ****
+ if test "$cross_compiling" = yes; then :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+! as_fn_error "cannot run test program while cross compiling
+! See \`config.log' for more details." "$LINENO" 5; }
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+--- 6233,6240 ----
+ if test "$cross_compiling" = yes; then :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+! as_fn_error $? "cannot run test program while cross compiling
+! See \`config.log' for more details" "$LINENO" 5; }
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+***************
+*** 6378,6384 ****
+ set dummy $tclsh_name; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if test "${ac_cv_path_vi_cv_path_tcl+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $vi_cv_path_tcl in
+--- 6408,6414 ----
+ set dummy $tclsh_name; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if ${ac_cv_path_vi_cv_path_tcl+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $vi_cv_path_tcl in
+***************
+*** 6392,6398 ****
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+--- 6422,6428 ----
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+***************
+*** 6422,6428 ****
+ set dummy $tclsh_name; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if test "${ac_cv_path_vi_cv_path_tcl+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $vi_cv_path_tcl in
+--- 6452,6458 ----
+ set dummy $tclsh_name; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if ${ac_cv_path_vi_cv_path_tcl+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $vi_cv_path_tcl in
+***************
+*** 6436,6442 ****
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+--- 6466,6472 ----
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+***************
+*** 6465,6471 ****
+ set dummy $tclsh_name; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if test "${ac_cv_path_vi_cv_path_tcl+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $vi_cv_path_tcl in
+--- 6495,6501 ----
+ set dummy $tclsh_name; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if ${ac_cv_path_vi_cv_path_tcl+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $vi_cv_path_tcl in
+***************
+*** 6479,6485 ****
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+--- 6509,6515 ----
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+***************
+*** 6508,6514 ****
+ set dummy $tclsh_name; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if test "${ac_cv_path_vi_cv_path_tcl+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $vi_cv_path_tcl in
+--- 6538,6544 ----
+ set dummy $tclsh_name; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if ${ac_cv_path_vi_cv_path_tcl+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $vi_cv_path_tcl in
+***************
+*** 6522,6528 ****
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+--- 6552,6558 ----
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+***************
+*** 6551,6557 ****
+ set dummy $tclsh_name; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if test "${ac_cv_path_vi_cv_path_tcl+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $vi_cv_path_tcl in
+--- 6581,6587 ----
+ set dummy $tclsh_name; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if ${ac_cv_path_vi_cv_path_tcl+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $vi_cv_path_tcl in
+***************
+*** 6565,6571 ****
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+--- 6595,6601 ----
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+***************
+*** 6682,6688 ****
+ fi
+ fi
+ if test "$fail_if_missing" = "yes" -a -z "$TCL_SRC"; then
+! as_fn_error "could not configure Tcl" "$LINENO" 5
+ fi
+ fi
+
+--- 6712,6718 ----
+ fi
+ fi
+ if test "$fail_if_missing" = "yes" -a -z "$TCL_SRC"; then
+! as_fn_error $? "could not configure Tcl" "$LINENO" 5
+ fi
+ fi
+
+***************
+*** 6720,6726 ****
+ set dummy $RUBY_CMD; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if test "${ac_cv_path_vi_cv_path_ruby+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $vi_cv_path_ruby in
+--- 6750,6756 ----
+ set dummy $RUBY_CMD; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if ${ac_cv_path_vi_cv_path_ruby+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $vi_cv_path_ruby in
+***************
+*** 6734,6740 ****
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_vi_cv_path_ruby="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+--- 6764,6770 ----
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_vi_cv_path_ruby="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+***************
+*** 6836,6842 ****
+ fi
+
+ if test "$fail_if_missing" = "yes" -a -z "$RUBY_OBJ"; then
+! as_fn_error "could not configure Ruby" "$LINENO" 5
+ fi
+ fi
+
+--- 6866,6872 ----
+ fi
+
+ if test "$fail_if_missing" = "yes" -a -z "$RUBY_OBJ"; then
+! as_fn_error $? "could not configure Ruby" "$LINENO" 5
+ fi
+ fi
+
+***************
+*** 6898,6904 ****
+ $as_echo "no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
+ $as_echo_n "checking for socket in -lsocket... " >&6; }
+! if test "${ac_cv_lib_socket_socket+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 6928,6934 ----
+ $as_echo "no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
+ $as_echo_n "checking for socket in -lsocket... " >&6; }
+! if ${ac_cv_lib_socket_socket+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 6932,6938 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
+ $as_echo "$ac_cv_lib_socket_socket" >&6; }
+! if test "x$ac_cv_lib_socket_socket" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBSOCKET 1
+ _ACEOF
+--- 6962,6968 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
+ $as_echo "$ac_cv_lib_socket_socket" >&6; }
+! if test "x$ac_cv_lib_socket_socket" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBSOCKET 1
+ _ACEOF
+***************
+*** 6943,6949 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
+ $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
+! if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 6973,6979 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
+ $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
+! if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 6977,6983 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
+ $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
+! if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBNSL 1
+ _ACEOF
+--- 7007,7013 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
+ $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
+! if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBNSL 1
+ _ACEOF
+***************
+*** 7127,7133 ****
+ set dummy xmkmf; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if test "${ac_cv_path_xmkmfpath+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $xmkmfpath in
+--- 7157,7163 ----
+ set dummy xmkmf; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if ${ac_cv_path_xmkmfpath+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $xmkmfpath in
+***************
+*** 7141,7147 ****
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_xmkmfpath="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+--- 7171,7177 ----
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_xmkmfpath="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+***************
+*** 7179,7186 ****
+ have_x=disabled
+ else
+ case $x_includes,$x_libraries in #(
+! *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
+! *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ # One or both of the vars are not set, and there is no cached value.
+--- 7209,7216 ----
+ have_x=disabled
+ else
+ case $x_includes,$x_libraries in #(
+! *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
+! *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ # One or both of the vars are not set, and there is no cached value.
+***************
+*** 7197,7203 ****
+ @echo libdir='${LIBDIR}'
+ _ACEOF
+ if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
+! # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+ for ac_var in incroot usrlibdir libdir; do
+ eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
+ done
+--- 7227,7233 ----
+ @echo libdir='${LIBDIR}'
+ _ACEOF
+ if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
+! # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+ for ac_var in incroot usrlibdir libdir; do
+ eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
+ done
+***************
+*** 7283,7289 ****
+ fi
+ done
+ fi
+! rm -f conftest.err conftest.$ac_ext
+ fi # $ac_x_includes = no
+
+ if test "$ac_x_libraries" = no; then
+--- 7313,7319 ----
+ fi
+ done
+ fi
+! rm -f conftest.err conftest.i conftest.$ac_ext
+ fi # $ac_x_includes = no
+
+ if test "$ac_x_libraries" = no; then
+***************
+*** 7457,7463 ****
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
+ $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
+! if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 7487,7493 ----
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
+ $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
+! if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 7491,7504 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
+ $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
+! if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
+ fi
+
+ if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
+ $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
+! if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 7521,7534 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
+ $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
+! if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
+ fi
+
+ if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
+ $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
+! if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 7532,7538 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
+ $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
+! if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
+ fi
+
+--- 7562,7568 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
+ $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
+! if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
+ fi
+
+***************
+*** 7551,7564 ****
+ # The functions gethostbyname, getservbyname, and inet_addr are
+ # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
+ ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
+! if test "x$ac_cv_func_gethostbyname" = x""yes; then :
+
+ fi
+
+ if test $ac_cv_func_gethostbyname = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
+ $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
+! if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 7581,7594 ----
+ # The functions gethostbyname, getservbyname, and inet_addr are
+ # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
+ ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
+! if test "x$ac_cv_func_gethostbyname" = xyes; then :
+
+ fi
+
+ if test $ac_cv_func_gethostbyname = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
+ $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
+! if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 7592,7605 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
+ $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
+! if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
+ fi
+
+ if test $ac_cv_lib_nsl_gethostbyname = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
+ $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
+! if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 7622,7635 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
+ $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
+! if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
+ fi
+
+ if test $ac_cv_lib_nsl_gethostbyname = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
+ $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
+! if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 7633,7639 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
+ $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
+! if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
+ fi
+
+--- 7663,7669 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
+ $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
+! if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
+ fi
+
+***************
+*** 7648,7661 ****
+ # must be given before -lnsl if both are needed. We assume that
+ # if connect needs -lnsl, so does gethostbyname.
+ ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
+! if test "x$ac_cv_func_connect" = x""yes; then :
+
+ fi
+
+ if test $ac_cv_func_connect = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
+ $as_echo_n "checking for connect in -lsocket... " >&6; }
+! if test "${ac_cv_lib_socket_connect+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 7678,7691 ----
+ # must be given before -lnsl if both are needed. We assume that
+ # if connect needs -lnsl, so does gethostbyname.
+ ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
+! if test "x$ac_cv_func_connect" = xyes; then :
+
+ fi
+
+ if test $ac_cv_func_connect = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
+ $as_echo_n "checking for connect in -lsocket... " >&6; }
+! if ${ac_cv_lib_socket_connect+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 7689,7695 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
+ $as_echo "$ac_cv_lib_socket_connect" >&6; }
+! if test "x$ac_cv_lib_socket_connect" = x""yes; then :
+ X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
+ fi
+
+--- 7719,7725 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
+ $as_echo "$ac_cv_lib_socket_connect" >&6; }
+! if test "x$ac_cv_lib_socket_connect" = xyes; then :
+ X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
+ fi
+
+***************
+*** 7697,7710 ****
+
+ # Guillermo Gomez says -lposix is necessary on A/UX.
+ ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
+! if test "x$ac_cv_func_remove" = x""yes; then :
+
+ fi
+
+ if test $ac_cv_func_remove = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
+ $as_echo_n "checking for remove in -lposix... " >&6; }
+! if test "${ac_cv_lib_posix_remove+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 7727,7740 ----
+
+ # Guillermo Gomez says -lposix is necessary on A/UX.
+ ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
+! if test "x$ac_cv_func_remove" = xyes; then :
+
+ fi
+
+ if test $ac_cv_func_remove = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
+ $as_echo_n "checking for remove in -lposix... " >&6; }
+! if ${ac_cv_lib_posix_remove+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 7738,7744 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
+ $as_echo "$ac_cv_lib_posix_remove" >&6; }
+! if test "x$ac_cv_lib_posix_remove" = x""yes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
+ fi
+
+--- 7768,7774 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
+ $as_echo "$ac_cv_lib_posix_remove" >&6; }
+! if test "x$ac_cv_lib_posix_remove" = xyes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
+ fi
+
+***************
+*** 7746,7759 ****
+
+ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+ ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
+! if test "x$ac_cv_func_shmat" = x""yes; then :
+
+ fi
+
+ if test $ac_cv_func_shmat = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
+ $as_echo_n "checking for shmat in -lipc... " >&6; }
+! if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 7776,7789 ----
+
+ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+ ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
+! if test "x$ac_cv_func_shmat" = xyes; then :
+
+ fi
+
+ if test $ac_cv_func_shmat = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
+ $as_echo_n "checking for shmat in -lipc... " >&6; }
+! if ${ac_cv_lib_ipc_shmat+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 7787,7793 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
+ $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
+! if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
+ fi
+
+--- 7817,7823 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
+ $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
+! if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
+ fi
+
+***************
+*** 7805,7811 ****
+ # John Interrante, Karl Berry
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
+ $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
+! if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 7835,7841 ----
+ # John Interrante, Karl Berry
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
+ $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
+! if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 7839,7845 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
+ $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
+! if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
+ X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
+ fi
+
+--- 7869,7875 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
+ $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
+! if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
+ X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
+ fi
+
+***************
+*** 7917,7923 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _XdmcpAuthDoIt in -lXdmcp" >&5
+ $as_echo_n "checking for _XdmcpAuthDoIt in -lXdmcp... " >&6; }
+! if test "${ac_cv_lib_Xdmcp__XdmcpAuthDoIt+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 7947,7953 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _XdmcpAuthDoIt in -lXdmcp" >&5
+ $as_echo_n "checking for _XdmcpAuthDoIt in -lXdmcp... " >&6; }
+! if ${ac_cv_lib_Xdmcp__XdmcpAuthDoIt+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 7951,7964 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&5
+ $as_echo "$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&6; }
+! if test "x$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" = x""yes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lXdmcp"
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceOpenConnection in -lICE" >&5
+ $as_echo_n "checking for IceOpenConnection in -lICE... " >&6; }
+! if test "${ac_cv_lib_ICE_IceOpenConnection+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 7981,7994 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&5
+ $as_echo "$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&6; }
+! if test "x$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" = xyes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lXdmcp"
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceOpenConnection in -lICE" >&5
+ $as_echo_n "checking for IceOpenConnection in -lICE... " >&6; }
+! if ${ac_cv_lib_ICE_IceOpenConnection+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 7992,7998 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceOpenConnection" >&5
+ $as_echo "$ac_cv_lib_ICE_IceOpenConnection" >&6; }
+! if test "x$ac_cv_lib_ICE_IceOpenConnection" = x""yes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE"
+ fi
+
+--- 8022,8028 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceOpenConnection" >&5
+ $as_echo "$ac_cv_lib_ICE_IceOpenConnection" >&6; }
+! if test "x$ac_cv_lib_ICE_IceOpenConnection" = xyes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE"
+ fi
+
+***************
+*** 8000,8006 ****
+ LDFLAGS="$X_LIBS $ac_save_LDFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmCreatePixmapFromData in -lXpm" >&5
+ $as_echo_n "checking for XpmCreatePixmapFromData in -lXpm... " >&6; }
+! if test "${ac_cv_lib_Xpm_XpmCreatePixmapFromData+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 8030,8036 ----
+ LDFLAGS="$X_LIBS $ac_save_LDFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmCreatePixmapFromData in -lXpm" >&5
+ $as_echo_n "checking for XpmCreatePixmapFromData in -lXpm... " >&6; }
+! if ${ac_cv_lib_Xpm_XpmCreatePixmapFromData+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 8034,8040 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
+ $as_echo "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6; }
+! if test "x$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = x""yes; then :
+ X_PRE_LIBS="$X_PRE_LIBS -lXpm"
+ fi
+
+--- 8064,8070 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
+ $as_echo "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6; }
+! if test "x$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = xyes; then :
+ X_PRE_LIBS="$X_PRE_LIBS -lXpm"
+ fi
+
+***************
+*** 8092,8102 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t is 2 bytes" >&5
+ $as_echo_n "checking size of wchar_t is 2 bytes... " >&6; }
+! if test "${ac_cv_small_wchar_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if test "$cross_compiling" = yes; then :
+! as_fn_error "failed to compile test program" "$LINENO" 5
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+--- 8122,8132 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t is 2 bytes" >&5
+ $as_echo_n "checking size of wchar_t is 2 bytes... " >&6; }
+! if ${ac_cv_small_wchar_t+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if test "$cross_compiling" = yes; then :
+! as_fn_error $? "failed to compile test program" "$LINENO" 5
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+***************
+*** 8395,8401 ****
+ set dummy pkg-config; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $PKG_CONFIG in
+--- 8425,8431 ----
+ set dummy pkg-config; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if ${ac_cv_path_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ case $PKG_CONFIG in
+***************
+*** 8409,8415 ****
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+--- 8439,8445 ----
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+***************
+*** 8634,8640 ****
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+ $as_echo "not found" >&6; }
+ if test "x" = xfail; then
+! as_fn_error "Could not find libgnomeui-2.0 via pkg-config" "$LINENO" 5
+ fi
+ fi
+ }
+--- 8664,8670 ----
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+ $as_echo "not found" >&6; }
+ if test "x" = xfail; then
+! as_fn_error $? "Could not find libgnomeui-2.0 via pkg-config" "$LINENO" 5
+ fi
+ fi
+ }
+***************
+*** 8827,8833 ****
+ LDFLAGS="$X_LIBS $LDFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
+ $as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
+! if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 8857,8863 ----
+ LDFLAGS="$X_LIBS $LDFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
+ $as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
+! if ${ac_cv_lib_Xext_XShapeQueryExtension+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 8861,8873 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
+ $as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
+! if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
+ GUI_X_LIBS="-lXext"
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wslen in -lw" >&5
+ $as_echo_n "checking for wslen in -lw... " >&6; }
+! if test "${ac_cv_lib_w_wslen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 8891,8903 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
+ $as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
+! if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = xyes; then :
+ GUI_X_LIBS="-lXext"
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wslen in -lw" >&5
+ $as_echo_n "checking for wslen in -lw... " >&6; }
+! if ${ac_cv_lib_w_wslen+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 8901,8913 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wslen" >&5
+ $as_echo "$ac_cv_lib_w_wslen" >&6; }
+! if test "x$ac_cv_lib_w_wslen" = x""yes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lw"
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
+ $as_echo_n "checking for dlsym in -ldl... " >&6; }
+! if test "${ac_cv_lib_dl_dlsym+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 8931,8943 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wslen" >&5
+ $as_echo "$ac_cv_lib_w_wslen" >&6; }
+! if test "x$ac_cv_lib_w_wslen" = xyes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lw"
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
+ $as_echo_n "checking for dlsym in -ldl... " >&6; }
+! if ${ac_cv_lib_dl_dlsym+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 8941,8953 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
+ $as_echo "$ac_cv_lib_dl_dlsym" >&6; }
+! if test "x$ac_cv_lib_dl_dlsym" = x""yes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldl"
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuCreateStippledPixmap in -lXmu" >&5
+ $as_echo_n "checking for XmuCreateStippledPixmap in -lXmu... " >&6; }
+! if test "${ac_cv_lib_Xmu_XmuCreateStippledPixmap+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 8971,8983 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
+ $as_echo "$ac_cv_lib_dl_dlsym" >&6; }
+! if test "x$ac_cv_lib_dl_dlsym" = xyes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldl"
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuCreateStippledPixmap in -lXmu" >&5
+ $as_echo_n "checking for XmuCreateStippledPixmap in -lXmu... " >&6; }
+! if ${ac_cv_lib_Xmu_XmuCreateStippledPixmap+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 8981,8994 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&5
+ $as_echo "$ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&6; }
+! if test "x$ac_cv_lib_Xmu_XmuCreateStippledPixmap" = x""yes; then :
+ GUI_X_LIBS="-lXmu $GUI_X_LIBS"
+ fi
+
+ if test -z "$SKIP_MOTIF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpEndJob in -lXp" >&5
+ $as_echo_n "checking for XpEndJob in -lXp... " >&6; }
+! if test "${ac_cv_lib_Xp_XpEndJob+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 9011,9024 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&5
+ $as_echo "$ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&6; }
+! if test "x$ac_cv_lib_Xmu_XmuCreateStippledPixmap" = xyes; then :
+ GUI_X_LIBS="-lXmu $GUI_X_LIBS"
+ fi
+
+ if test -z "$SKIP_MOTIF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpEndJob in -lXp" >&5
+ $as_echo_n "checking for XpEndJob in -lXp... " >&6; }
+! if ${ac_cv_lib_Xp_XpEndJob+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 9022,9028 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpEndJob" >&5
+ $as_echo "$ac_cv_lib_Xp_XpEndJob" >&6; }
+! if test "x$ac_cv_lib_Xp_XpEndJob" = x""yes; then :
+ GUI_X_LIBS="-lXp $GUI_X_LIBS"
+ fi
+
+--- 9052,9058 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpEndJob" >&5
+ $as_echo "$ac_cv_lib_Xp_XpEndJob" >&6; }
+! if test "x$ac_cv_lib_Xp_XpEndJob" = xyes; then :
+ GUI_X_LIBS="-lXp $GUI_X_LIBS"
+ fi
+
+***************
+*** 9061,9067 ****
+ for ac_header in X11/SM/SMlib.h
+ do :
+ ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
+! if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_X11_SM_SMLIB_H 1
+ _ACEOF
+--- 9091,9097 ----
+ for ac_header in X11/SM/SMlib.h
+ do :
+ ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
+! if test "x$ac_cv_header_X11_SM_SMlib_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_X11_SM_SMLIB_H 1
+ _ACEOF
+***************
+*** 9081,9088 ****
+ do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+! eval as_val=\$$as_ac_Header
+! if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+--- 9111,9117 ----
+ do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+! if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+***************
+*** 9164,9171 ****
+ do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+! eval as_val=\$$as_ac_Header
+! if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+--- 9193,9199 ----
+ do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+! if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+***************
+*** 9233,9239 ****
+
+
+ if test "$enable_workshop" = "yes" -a -n "$SKIP_MOTIF"; then
+! as_fn_error "cannot use workshop without Motif" "$LINENO" 5
+ fi
+
+ if test "$enable_xim" = "yes"; then
+--- 9261,9267 ----
+
+
+ if test "$enable_workshop" = "yes" -a -n "$SKIP_MOTIF"; then
+! as_fn_error $? "cannot use workshop without Motif" "$LINENO" 5
+ fi
+
+ if test "$enable_xim" = "yes"; then
+***************
+*** 9287,9299 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether toupper is broken" >&5
+ $as_echo_n "checking whether toupper is broken... " >&6; }
+! if test "${vim_cv_toupper_broken+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+ if test "$cross_compiling" = yes; then :
+
+! as_fn_error "cross-compiling: please set 'vim_cv_toupper_broken'" "$LINENO" 5
+
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+--- 9315,9327 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether toupper is broken" >&5
+ $as_echo_n "checking whether toupper is broken... " >&6; }
+! if ${vim_cv_toupper_broken+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+ if test "$cross_compiling" = yes; then :
+
+! as_fn_error $? "cross-compiling: please set 'vim_cv_toupper_broken'" "$LINENO" 5
+
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+***************
+*** 9377,9383 ****
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ ac_fn_c_check_header_mongrel "$LINENO" "elf.h" "ac_cv_header_elf_h" "$ac_includes_default"
+! if test "x$ac_cv_header_elf_h" = x""yes; then :
+ HAS_ELF=1
+ fi
+
+--- 9405,9411 ----
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ ac_fn_c_check_header_mongrel "$LINENO" "elf.h" "ac_cv_header_elf_h" "$ac_includes_default"
+! if test "x$ac_cv_header_elf_h" = xyes; then :
+ HAS_ELF=1
+ fi
+
+***************
+*** 9385,9391 ****
+ if test "$HAS_ELF" = 1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lelf" >&5
+ $as_echo_n "checking for main in -lelf... " >&6; }
+! if test "${ac_cv_lib_elf_main+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 9413,9419 ----
+ if test "$HAS_ELF" = 1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lelf" >&5
+ $as_echo_n "checking for main in -lelf... " >&6; }
+! if ${ac_cv_lib_elf_main+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 9413,9419 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_main" >&5
+ $as_echo "$ac_cv_lib_elf_main" >&6; }
+! if test "x$ac_cv_lib_elf_main" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBELF 1
+ _ACEOF
+--- 9441,9447 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_main" >&5
+ $as_echo "$ac_cv_lib_elf_main" >&6; }
+! if test "x$ac_cv_lib_elf_main" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBELF 1
+ _ACEOF
+***************
+*** 9429,9435 ****
+ as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
+ $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
+! if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+--- 9457,9463 ----
+ as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
+ $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
+! if eval \${$as_ac_Header+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+***************
+*** 9456,9463 ****
+ eval ac_res=\$$as_ac_Header
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+ $as_echo "$ac_res" >&6; }
+! eval as_val=\$$as_ac_Header
+! if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+ _ACEOF
+--- 9484,9490 ----
+ eval ac_res=\$$as_ac_Header
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+ $as_echo "$ac_res" >&6; }
+! if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+ _ACEOF
+***************
+*** 9470,9476 ****
+ if test $ac_header_dirent = dirent.h; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+ $as_echo_n "checking for library containing opendir... " >&6; }
+! if test "${ac_cv_search_opendir+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_func_search_save_LIBS=$LIBS
+--- 9497,9503 ----
+ if test $ac_header_dirent = dirent.h; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+ $as_echo_n "checking for library containing opendir... " >&6; }
+! if ${ac_cv_search_opendir+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_func_search_save_LIBS=$LIBS
+***************
+*** 9504,9514 ****
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+! if test "${ac_cv_search_opendir+set}" = set; then :
+ break
+ fi
+ done
+! if test "${ac_cv_search_opendir+set}" = set; then :
+
+ else
+ ac_cv_search_opendir=no
+--- 9531,9541 ----
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+! if ${ac_cv_search_opendir+:} false; then :
+ break
+ fi
+ done
+! if ${ac_cv_search_opendir+:} false; then :
+
+ else
+ ac_cv_search_opendir=no
+***************
+*** 9527,9533 ****
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+ $as_echo_n "checking for library containing opendir... " >&6; }
+! if test "${ac_cv_search_opendir+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_func_search_save_LIBS=$LIBS
+--- 9554,9560 ----
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+ $as_echo_n "checking for library containing opendir... " >&6; }
+! if ${ac_cv_search_opendir+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_func_search_save_LIBS=$LIBS
+***************
+*** 9561,9571 ****
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+! if test "${ac_cv_search_opendir+set}" = set; then :
+ break
+ fi
+ done
+! if test "${ac_cv_search_opendir+set}" = set; then :
+
+ else
+ ac_cv_search_opendir=no
+--- 9588,9598 ----
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+! if ${ac_cv_search_opendir+:} false; then :
+ break
+ fi
+ done
+! if ${ac_cv_search_opendir+:} false; then :
+
+ else
+ ac_cv_search_opendir=no
+***************
+*** 9625,9632 ****
+ do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+! eval as_val=\$$as_ac_Header
+! if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+--- 9652,9658 ----
+ do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+! if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+***************
+*** 9642,9648 ****
+ # include <sys/stream.h>
+ #endif
+ "
+! if test "x$ac_cv_header_sys_ptem_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_SYS_PTEM_H 1
+ _ACEOF
+--- 9668,9674 ----
+ # include <sys/stream.h>
+ #endif
+ "
+! if test "x$ac_cv_header_sys_ptem_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_SYS_PTEM_H 1
+ _ACEOF
+***************
+*** 9658,9664 ****
+ # include <sys/param.h>
+ #endif
+ "
+! if test "x$ac_cv_header_sys_sysctl_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_SYS_SYSCTL_H 1
+ _ACEOF
+--- 9684,9690 ----
+ # include <sys/param.h>
+ #endif
+ "
+! if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_SYS_SYSCTL_H 1
+ _ACEOF
+***************
+*** 9698,9704 ****
+ for ac_header in strings.h
+ do :
+ ac_fn_c_check_header_mongrel "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
+! if test "x$ac_cv_header_strings_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_STRINGS_H 1
+ _ACEOF
+--- 9724,9730 ----
+ for ac_header in strings.h
+ do :
+ ac_fn_c_check_header_mongrel "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
+! if test "x$ac_cv_header_strings_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_STRINGS_H 1
+ _ACEOF
+***************
+*** 9757,9763 ****
+ if test $ac_cv_c_compiler_gnu = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
+ $as_echo_n "checking whether $CC needs -traditional... " >&6; }
+! if test "${ac_cv_prog_gcc_traditional+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_pattern="Autoconf.*'x'"
+--- 9783,9789 ----
+ if test $ac_cv_c_compiler_gnu = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
+ $as_echo_n "checking whether $CC needs -traditional... " >&6; }
+! if ${ac_cv_prog_gcc_traditional+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_pattern="Autoconf.*'x'"
+***************
+*** 9798,9804 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+ $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+! if test "${ac_cv_c_const+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+--- 9824,9830 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+ $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+! if ${ac_cv_c_const+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+***************
+*** 9807,9817 ****
+ int
+ main ()
+ {
+! /* FIXME: Include the comments suggested by Paul. */
+ #ifndef __cplusplus
+! /* Ultrix mips cc rejects this. */
+ typedef int charset[2];
+! const charset cs;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *pcpcc;
+ char **ppc;
+--- 9833,9843 ----
+ int
+ main ()
+ {
+!
+ #ifndef __cplusplus
+! /* Ultrix mips cc rejects this sort of thing. */
+ typedef int charset[2];
+! const charset cs = { 0, 0 };
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *pcpcc;
+ char **ppc;
+***************
+*** 9828,9835 ****
+ ++pcpcc;
+ ppc = (char**) pcpcc;
+ pcpcc = (char const *const *) ppc;
+! { /* SCO 3.2v4 cc rejects this. */
+! char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+--- 9854,9862 ----
+ ++pcpcc;
+ ppc = (char**) pcpcc;
+ pcpcc = (char const *const *) ppc;
+! { /* SCO 3.2v4 cc rejects this sort of thing. */
+! char tx;
+! char *t = &tx;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+***************
+*** 9845,9854 ****
+ iptr p = 0;
+ ++p;
+ }
+! { /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+! struct s { int j; const int *ap[3]; };
+! struct s *b; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+--- 9872,9881 ----
+ iptr p = 0;
+ ++p;
+ }
+! { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+! struct s { int j; const int *ap[3]; } bx;
+! struct s *b = &bx; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+***************
+*** 9878,9884 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
+ $as_echo_n "checking for working volatile... " >&6; }
+! if test "${ac_cv_c_volatile+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+--- 9905,9911 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
+ $as_echo_n "checking for working volatile... " >&6; }
+! if ${ac_cv_c_volatile+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+***************
+*** 9911,9917 ****
+ fi
+
+ ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
+! if test "x$ac_cv_type_mode_t" = x""yes; then :
+
+ else
+
+--- 9938,9944 ----
+ fi
+
+ ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
+! if test "x$ac_cv_type_mode_t" = xyes; then :
+
+ else
+
+***************
+*** 9922,9928 ****
+ fi
+
+ ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
+! if test "x$ac_cv_type_off_t" = x""yes; then :
+
+ else
+
+--- 9949,9955 ----
+ fi
+
+ ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
+! if test "x$ac_cv_type_off_t" = xyes; then :
+
+ else
+
+***************
+*** 9933,9939 ****
+ fi
+
+ ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
+! if test "x$ac_cv_type_pid_t" = x""yes; then :
+
+ else
+
+--- 9960,9966 ----
+ fi
+
+ ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
+! if test "x$ac_cv_type_pid_t" = xyes; then :
+
+ else
+
+***************
+*** 9944,9950 ****
+ fi
+
+ ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+! if test "x$ac_cv_type_size_t" = x""yes; then :
+
+ else
+
+--- 9971,9977 ----
+ fi
+
+ ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+! if test "x$ac_cv_type_size_t" = xyes; then :
+
+ else
+
+***************
+*** 9956,9962 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
+ $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
+! if test "${ac_cv_type_uid_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+--- 9983,9989 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
+ $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
+! if ${ac_cv_type_uid_t+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+***************
+*** 10001,10007 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
+ $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
+! if test "${ac_cv_header_time+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+--- 10028,10034 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
+ $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
+! if ${ac_cv_header_time+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+***************
+*** 10035,10041 ****
+ fi
+
+ ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
+! if test "x$ac_cv_type_ino_t" = x""yes; then :
+
+ else
+
+--- 10062,10068 ----
+ fi
+
+ ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
+! if test "x$ac_cv_type_ino_t" = xyes; then :
+
+ else
+
+***************
+*** 10046,10052 ****
+ fi
+
+ ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
+! if test "x$ac_cv_type_dev_t" = x""yes; then :
+
+ else
+
+--- 10073,10079 ----
+ fi
+
+ ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
+! if test "x$ac_cv_type_dev_t" = xyes; then :
+
+ else
+
+***************
+*** 10058,10064 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+ $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
+! if test "${ac_cv_c_bigendian+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_cv_c_bigendian=unknown
+--- 10085,10091 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+ $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
+! if ${ac_cv_c_bigendian+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_cv_c_bigendian=unknown
+***************
+*** 10276,10282 ****
+
+ ;; #(
+ *)
+! as_fn_error "unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
+ esac
+
+--- 10303,10309 ----
+
+ ;; #(
+ *)
+! as_fn_error $? "unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
+ esac
+
+***************
+*** 10412,10418 ****
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5
+ $as_echo "OK" >&6; }
+ else
+! as_fn_error "FAILED" "$LINENO" 5
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+--- 10439,10445 ----
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5
+ $as_echo "OK" >&6; }
+ else
+! as_fn_error $? "FAILED" "$LINENO" 5
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+***************
+*** 10428,10434 ****
+ as_ac_Lib=`$as_echo "ac_cv_lib_${libname}''_tgetent" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${libname}" >&5
+ $as_echo_n "checking for tgetent in -l${libname}... " >&6; }
+! if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 10455,10461 ----
+ as_ac_Lib=`$as_echo "ac_cv_lib_${libname}''_tgetent" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${libname}" >&5
+ $as_echo_n "checking for tgetent in -l${libname}... " >&6; }
+! if eval \${$as_ac_Lib+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 10463,10470 ****
+ eval ac_res=\$$as_ac_Lib
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+ $as_echo "$ac_res" >&6; }
+! eval as_val=\$$as_ac_Lib
+! if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_LIB${libname}" | $as_tr_cpp` 1
+ _ACEOF
+--- 10490,10496 ----
+ eval ac_res=\$$as_ac_Lib
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+ $as_echo "$ac_res" >&6; }
+! if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_LIB${libname}" | $as_tr_cpp` 1
+ _ACEOF
+***************
+*** 10530,10536 ****
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ else
+! as_fn_error "NOT FOUND!
+ You need to install a terminal library; for example ncurses.
+ Or specify the name of the library with --with-tlib." "$LINENO" 5
+ fi
+--- 10556,10562 ----
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ else
+! as_fn_error $? "NOT FOUND!
+ You need to install a terminal library; for example ncurses.
+ Or specify the name of the library with --with-tlib." "$LINENO" 5
+ fi
+***************
+*** 10540,10552 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we talk terminfo" >&5
+ $as_echo_n "checking whether we talk terminfo... " >&6; }
+! if test "${vim_cv_terminfo+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+ if test "$cross_compiling" = yes; then :
+
+! as_fn_error "cross-compiling: please set 'vim_cv_terminfo'" "$LINENO" 5
+
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+--- 10566,10578 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we talk terminfo" >&5
+ $as_echo_n "checking whether we talk terminfo... " >&6; }
+! if ${vim_cv_terminfo+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+ if test "$cross_compiling" = yes; then :
+
+! as_fn_error $? "cross-compiling: please set 'vim_cv_terminfo'" "$LINENO" 5
+
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+***************
+*** 10593,10605 ****
+ if test "x$olibs" != "x$LIBS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking what tgetent() returns for an unknown terminal" >&5
+ $as_echo_n "checking what tgetent() returns for an unknown terminal... " >&6; }
+! if test "${vim_cv_tgent+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+ if test "$cross_compiling" = yes; then :
+
+! as_fn_error "failed to compile test program." "$LINENO" 5
+
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+--- 10619,10631 ----
+ if test "x$olibs" != "x$LIBS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking what tgetent() returns for an unknown terminal" >&5
+ $as_echo_n "checking what tgetent() returns for an unknown terminal... " >&6; }
+! if ${vim_cv_tgent+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+ if test "$cross_compiling" = yes; then :
+
+! as_fn_error $? "failed to compile test program." "$LINENO" 5
+
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+***************
+*** 10894,10906 ****
+ rm -f conftest_grp
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking default tty permissions/group" >&5
+ $as_echo_n "checking default tty permissions/group... " >&6; }
+! if test "${vim_cv_tty_group+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+ if test "$cross_compiling" = yes; then :
+
+! as_fn_error "cross-compiling: please set 'vim_cv_tty_group' and 'vim_cv_tty_mode'" "$LINENO" 5
+
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+--- 10920,10932 ----
+ rm -f conftest_grp
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking default tty permissions/group" >&5
+ $as_echo_n "checking default tty permissions/group... " >&6; }
+! if ${vim_cv_tty_group+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+ if test "$cross_compiling" = yes; then :
+
+! as_fn_error $? "cross-compiling: please set 'vim_cv_tty_group' and 'vim_cv_tty_mode'" "$LINENO" 5
+
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+***************
+*** 10981,10987 ****
+ _ACEOF
+
+ if test "x$vim_cv_tty_mode" = "x" ; then
+! as_fn_error "It seems you're cross compiling and have 'vim_cv_tty_group' set, please also set the environment variable 'vim_cv_tty_mode' to the correct mode (probably 0620)" "$LINENO" 5
+ else
+ $as_echo "#define PTYMODE 0620" >>confdefs.h
+
+--- 11007,11013 ----
+ _ACEOF
+
+ if test "x$vim_cv_tty_mode" = "x" ; then
+! as_fn_error $? "It seems you're cross compiling and have 'vim_cv_tty_group' set, please also set the environment variable 'vim_cv_tty_mode' to the correct mode (probably 0620)" "$LINENO" 5
+ else
+ $as_echo "#define PTYMODE 0620" >>confdefs.h
+
+***************
+*** 10991,10997 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
+ $as_echo_n "checking return type of signal handlers... " >&6; }
+! if test "${ac_cv_type_signal+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+--- 11017,11023 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
+ $as_echo_n "checking return type of signal handlers... " >&6; }
+! if ${ac_cv_type_signal+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+***************
+*** 11064,11076 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking getcwd implementation is broken" >&5
+ $as_echo_n "checking getcwd implementation is broken... " >&6; }
+! if test "${vim_cv_getcwd_broken+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+ if test "$cross_compiling" = yes; then :
+
+! as_fn_error "cross-compiling: please set 'vim_cv_getcwd_broken'" "$LINENO" 5
+
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+--- 11090,11102 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking getcwd implementation is broken" >&5
+ $as_echo_n "checking getcwd implementation is broken... " >&6; }
+! if ${vim_cv_getcwd_broken+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+ if test "$cross_compiling" = yes; then :
+
+! as_fn_error $? "cross-compiling: please set 'vim_cv_getcwd_broken'" "$LINENO" 5
+
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+***************
+*** 11123,11130 ****
+ do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+! eval as_val=\$$as_ac_var
+! if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ _ACEOF
+--- 11149,11155 ----
+ do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+! if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ _ACEOF
+***************
+*** 11134,11140 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
+ $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
+! if test "${ac_cv_sys_largefile_source+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ while :; do
+--- 11159,11165 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
+ $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
+! if ${ac_cv_sys_largefile_source+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ while :; do
+***************
+*** 11210,11216 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
+ $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
+! if test "${ac_cv_sys_largefile_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_cv_sys_largefile_CC=no
+--- 11235,11241 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
+ $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
+! if ${ac_cv_sys_largefile_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_cv_sys_largefile_CC=no
+***************
+*** 11261,11267 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+ $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
+! if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ while :; do
+--- 11286,11292 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+ $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
+! if ${ac_cv_sys_file_offset_bits+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ while :; do
+***************
+*** 11330,11336 ****
+ if test $ac_cv_sys_file_offset_bits = unknown; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
+ $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
+! if test "${ac_cv_sys_large_files+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ while :; do
+--- 11355,11361 ----
+ if test $ac_cv_sys_file_offset_bits = unknown; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
+ $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
+! if ${ac_cv_sys_large_files+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ while :; do
+***************
+*** 11397,11402 ****
+--- 11422,11429 ----
+ esac
+ rm -rf conftest*
+ fi
++
++
+ fi
+
+
+***************
+*** 11430,11442 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat() ignores a trailing slash" >&5
+ $as_echo_n "checking whether stat() ignores a trailing slash... " >&6; }
+! if test "${vim_cv_stat_ignores_slash+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+ if test "$cross_compiling" = yes; then :
+
+! as_fn_error "cross-compiling: please set 'vim_cv_stat_ignores_slash'" "$LINENO" 5
+
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+--- 11457,11469 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat() ignores a trailing slash" >&5
+ $as_echo_n "checking whether stat() ignores a trailing slash... " >&6; }
+! if ${vim_cv_stat_ignores_slash+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+ if test "$cross_compiling" = yes; then :
+
+! as_fn_error $? "cross-compiling: please set 'vim_cv_stat_ignores_slash'" "$LINENO" 5
+
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+***************
+*** 11560,11566 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strtod in -lm" >&5
+ $as_echo_n "checking for strtod in -lm... " >&6; }
+! if test "${ac_cv_lib_m_strtod+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 11587,11593 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strtod in -lm" >&5
+ $as_echo_n "checking for strtod in -lm... " >&6; }
+! if ${ac_cv_lib_m_strtod+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 11594,11600 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_strtod" >&5
+ $as_echo "$ac_cv_lib_m_strtod" >&6; }
+! if test "x$ac_cv_lib_m_strtod" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBM 1
+ _ACEOF
+--- 11621,11627 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_strtod" >&5
+ $as_echo "$ac_cv_lib_m_strtod" >&6; }
+! if test "x$ac_cv_lib_m_strtod" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBM 1
+ _ACEOF
+***************
+*** 11660,11666 ****
+ $as_echo "no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lposix1e" >&5
+ $as_echo_n "checking for acl_get_file in -lposix1e... " >&6; }
+! if test "${ac_cv_lib_posix1e_acl_get_file+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 11687,11693 ----
+ $as_echo "no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lposix1e" >&5
+ $as_echo_n "checking for acl_get_file in -lposix1e... " >&6; }
+! if ${ac_cv_lib_posix1e_acl_get_file+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 11694,11705 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix1e_acl_get_file" >&5
+ $as_echo "$ac_cv_lib_posix1e_acl_get_file" >&6; }
+! if test "x$ac_cv_lib_posix1e_acl_get_file" = x""yes; then :
+ LIBS="$LIBS -lposix1e"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lacl" >&5
+ $as_echo_n "checking for acl_get_file in -lacl... " >&6; }
+! if test "${ac_cv_lib_acl_acl_get_file+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 11721,11732 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix1e_acl_get_file" >&5
+ $as_echo "$ac_cv_lib_posix1e_acl_get_file" >&6; }
+! if test "x$ac_cv_lib_posix1e_acl_get_file" = xyes; then :
+ LIBS="$LIBS -lposix1e"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lacl" >&5
+ $as_echo_n "checking for acl_get_file in -lacl... " >&6; }
+! if ${ac_cv_lib_acl_acl_get_file+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 11733,11743 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_get_file" >&5
+ $as_echo "$ac_cv_lib_acl_acl_get_file" >&6; }
+! if test "x$ac_cv_lib_acl_acl_get_file" = x""yes; then :
+ LIBS="$LIBS -lacl"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgetxattr in -lattr" >&5
+ $as_echo_n "checking for fgetxattr in -lattr... " >&6; }
+! if test "${ac_cv_lib_attr_fgetxattr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 11760,11770 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_get_file" >&5
+ $as_echo "$ac_cv_lib_acl_acl_get_file" >&6; }
+! if test "x$ac_cv_lib_acl_acl_get_file" = xyes; then :
+ LIBS="$LIBS -lacl"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgetxattr in -lattr" >&5
+ $as_echo_n "checking for fgetxattr in -lattr... " >&6; }
+! if ${ac_cv_lib_attr_fgetxattr+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 11771,11777 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5
+ $as_echo "$ac_cv_lib_attr_fgetxattr" >&6; }
+! if test "x$ac_cv_lib_attr_fgetxattr" = x""yes; then :
+ LIBS="$LIBS -lattr"
+ fi
+
+--- 11798,11804 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5
+ $as_echo "$ac_cv_lib_attr_fgetxattr" >&6; }
+! if test "x$ac_cv_lib_attr_fgetxattr" = xyes; then :
+ LIBS="$LIBS -lattr"
+ fi
+
+***************
+*** 11813,11819 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get in -lsec" >&5
+ $as_echo_n "checking for acl_get in -lsec... " >&6; }
+! if test "${ac_cv_lib_sec_acl_get+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 11840,11846 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get in -lsec" >&5
+ $as_echo_n "checking for acl_get in -lsec... " >&6; }
+! if ${ac_cv_lib_sec_acl_get+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 11847,11853 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acl_get" >&5
+ $as_echo "$ac_cv_lib_sec_acl_get" >&6; }
+! if test "x$ac_cv_lib_sec_acl_get" = x""yes; then :
+ LIBS="$LIBS -lsec"; $as_echo "#define HAVE_SOLARIS_ZFS_ACL 1" >>confdefs.h
+
+ else
+--- 11874,11880 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acl_get" >&5
+ $as_echo "$ac_cv_lib_sec_acl_get" >&6; }
+! if test "x$ac_cv_lib_sec_acl_get" = xyes; then :
+ LIBS="$LIBS -lsec"; $as_echo "#define HAVE_SOLARIS_ZFS_ACL 1" >>confdefs.h
+
+ else
+***************
+*** 11943,11949 ****
+ $as_echo "no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gpm" >&5
+ $as_echo_n "checking for gpm... " >&6; }
+! if test "${vi_cv_have_gpm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ olibs="$LIBS" ; LIBS="-lgpm"
+--- 11970,11976 ----
+ $as_echo "no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gpm" >&5
+ $as_echo_n "checking for gpm... " >&6; }
+! if ${vi_cv_have_gpm+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ olibs="$LIBS" ; LIBS="-lgpm"
+***************
+*** 11996,12002 ****
+ $as_echo "no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysmouse" >&5
+ $as_echo_n "checking for sysmouse... " >&6; }
+! if test "${vi_cv_have_sysmouse+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+--- 12023,12029 ----
+ $as_echo "no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysmouse" >&5
+ $as_echo_n "checking for sysmouse... " >&6; }
+! if ${vi_cv_have_sysmouse+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+***************
+*** 12202,12208 ****
+ # This bug is HP SR number 8606223364.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
+ $as_echo_n "checking size of int... " >&6; }
+! if test "${ac_cv_sizeof_int+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
+--- 12229,12235 ----
+ # This bug is HP SR number 8606223364.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
+ $as_echo_n "checking size of int... " >&6; }
+! if ${ac_cv_sizeof_int+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
+***************
+*** 12211,12219 ****
+ if test "$ac_cv_type_int" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+! { as_fn_set_status 77
+! as_fn_error "cannot compute sizeof (int)
+! See \`config.log' for more details." "$LINENO" 5; }; }
+ else
+ ac_cv_sizeof_int=0
+ fi
+--- 12238,12245 ----
+ if test "$ac_cv_type_int" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+! as_fn_error 77 "cannot compute sizeof (int)
+! See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_int=0
+ fi
+***************
+*** 12236,12242 ****
+ # This bug is HP SR number 8606223364.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
+ $as_echo_n "checking size of long... " >&6; }
+! if test "${ac_cv_sizeof_long+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
+--- 12262,12268 ----
+ # This bug is HP SR number 8606223364.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
+ $as_echo_n "checking size of long... " >&6; }
+! if ${ac_cv_sizeof_long+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
+***************
+*** 12245,12253 ****
+ if test "$ac_cv_type_long" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+! { as_fn_set_status 77
+! as_fn_error "cannot compute sizeof (long)
+! See \`config.log' for more details." "$LINENO" 5; }; }
+ else
+ ac_cv_sizeof_long=0
+ fi
+--- 12271,12278 ----
+ if test "$ac_cv_type_long" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+! as_fn_error 77 "cannot compute sizeof (long)
+! See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_long=0
+ fi
+***************
+*** 12270,12276 ****
+ # This bug is HP SR number 8606223364.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
+ $as_echo_n "checking size of time_t... " >&6; }
+! if test "${ac_cv_sizeof_time_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"; then :
+--- 12295,12301 ----
+ # This bug is HP SR number 8606223364.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
+ $as_echo_n "checking size of time_t... " >&6; }
+! if ${ac_cv_sizeof_time_t+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"; then :
+***************
+*** 12279,12287 ****
+ if test "$ac_cv_type_time_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+! { as_fn_set_status 77
+! as_fn_error "cannot compute sizeof (time_t)
+! See \`config.log' for more details." "$LINENO" 5; }; }
+ else
+ ac_cv_sizeof_time_t=0
+ fi
+--- 12304,12311 ----
+ if test "$ac_cv_type_time_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+! as_fn_error 77 "cannot compute sizeof (time_t)
+! See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_time_t=0
+ fi
+***************
+*** 12304,12310 ****
+ # This bug is HP SR number 8606223364.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
+ $as_echo_n "checking size of off_t... " >&6; }
+! if test "${ac_cv_sizeof_off_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
+--- 12328,12334 ----
+ # This bug is HP SR number 8606223364.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
+ $as_echo_n "checking size of off_t... " >&6; }
+! if ${ac_cv_sizeof_off_t+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
+***************
+*** 12313,12321 ****
+ if test "$ac_cv_type_off_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+! { as_fn_set_status 77
+! as_fn_error "cannot compute sizeof (off_t)
+! See \`config.log' for more details." "$LINENO" 5; }; }
+ else
+ ac_cv_sizeof_off_t=0
+ fi
+--- 12337,12344 ----
+ if test "$ac_cv_type_off_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+! as_fn_error 77 "cannot compute sizeof (off_t)
+! See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_off_t=0
+ fi
+***************
+*** 12368,12374 ****
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+ $as_echo "ok" >&6; }
+ else
+! as_fn_error "WRONG! uint32_t not defined correctly." "$LINENO" 5
+ fi
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+--- 12391,12397 ----
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+ $as_echo "ok" >&6; }
+ else
+! as_fn_error $? "WRONG! uint32_t not defined correctly." "$LINENO" 5
+ fi
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+***************
+*** 12400,12412 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmove handles overlaps" >&5
+ $as_echo_n "checking whether memmove handles overlaps... " >&6; }
+! if test "${vim_cv_memmove_handles_overlap+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+ if test "$cross_compiling" = yes; then :
+
+! as_fn_error "cross-compiling: please set 'vim_cv_memmove_handles_overlap'" "$LINENO" 5
+
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+--- 12423,12435 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmove handles overlaps" >&5
+ $as_echo_n "checking whether memmove handles overlaps... " >&6; }
+! if ${vim_cv_memmove_handles_overlap+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+ if test "$cross_compiling" = yes; then :
+
+! as_fn_error $? "cross-compiling: please set 'vim_cv_memmove_handles_overlap'" "$LINENO" 5
+
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+***************
+*** 12437,12449 ****
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bcopy handles overlaps" >&5
+ $as_echo_n "checking whether bcopy handles overlaps... " >&6; }
+! if test "${vim_cv_bcopy_handles_overlap+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+ if test "$cross_compiling" = yes; then :
+
+! as_fn_error "cross-compiling: please set 'vim_cv_bcopy_handles_overlap'" "$LINENO" 5
+
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+--- 12460,12472 ----
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bcopy handles overlaps" >&5
+ $as_echo_n "checking whether bcopy handles overlaps... " >&6; }
+! if ${vim_cv_bcopy_handles_overlap+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+ if test "$cross_compiling" = yes; then :
+
+! as_fn_error $? "cross-compiling: please set 'vim_cv_bcopy_handles_overlap'" "$LINENO" 5
+
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+***************
+*** 12474,12486 ****
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memcpy handles overlaps" >&5
+ $as_echo_n "checking whether memcpy handles overlaps... " >&6; }
+! if test "${vim_cv_memcpy_handles_overlap+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+ if test "$cross_compiling" = yes; then :
+
+! as_fn_error "cross-compiling: please set 'vim_cv_memcpy_handles_overlap'" "$LINENO" 5
+
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+--- 12497,12509 ----
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memcpy handles overlaps" >&5
+ $as_echo_n "checking whether memcpy handles overlaps... " >&6; }
+! if ${vim_cv_memcpy_handles_overlap+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+ if test "$cross_compiling" = yes; then :
+
+! as_fn_error $? "cross-compiling: please set 'vim_cv_memcpy_handles_overlap'" "$LINENO" 5
+
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+***************
+*** 12575,12581 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _xpg4_setrunelocale in -lxpg4" >&5
+ $as_echo_n "checking for _xpg4_setrunelocale in -lxpg4... " >&6; }
+! if test "${ac_cv_lib_xpg4__xpg4_setrunelocale+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 12598,12604 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _xpg4_setrunelocale in -lxpg4" >&5
+ $as_echo_n "checking for _xpg4_setrunelocale in -lxpg4... " >&6; }
+! if ${ac_cv_lib_xpg4__xpg4_setrunelocale+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 12609,12615 ****
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xpg4__xpg4_setrunelocale" >&5
+ $as_echo "$ac_cv_lib_xpg4__xpg4_setrunelocale" >&6; }
+! if test "x$ac_cv_lib_xpg4__xpg4_setrunelocale" = x""yes; then :
+ LIBS="$LIBS -lxpg4"
+ fi
+
+--- 12632,12638 ----
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xpg4__xpg4_setrunelocale" >&5
+ $as_echo "$ac_cv_lib_xpg4__xpg4_setrunelocale" >&6; }
+! if test "x$ac_cv_lib_xpg4__xpg4_setrunelocale" = xyes; then :
+ LIBS="$LIBS -lxpg4"
+ fi
+
+***************
+*** 12671,12677 ****
+ set dummy msgfmt; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if test "${ac_cv_prog_MSGFMT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if test -n "$MSGFMT"; then
+--- 12694,12700 ----
+ set dummy msgfmt; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+! if ${ac_cv_prog_MSGFMT+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ if test -n "$MSGFMT"; then
+***************
+*** 12683,12689 ****
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_MSGFMT="msgfmt"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+--- 12706,12712 ----
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_MSGFMT="msgfmt"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+***************
+*** 12764,12770 ****
+ for ac_func in bind_textdomain_codeset
+ do :
+ ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
+! if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_BIND_TEXTDOMAIN_CODESET 1
+ _ACEOF
+--- 12787,12793 ----
+ for ac_func in bind_textdomain_codeset
+ do :
+ ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
+! if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_BIND_TEXTDOMAIN_CODESET 1
+ _ACEOF
+***************
+*** 12807,12817 ****
+ fi
+
+ ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
+! if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
+ DLL=dlfcn.h
+ else
+ ac_fn_c_check_header_mongrel "$LINENO" "dl.h" "ac_cv_header_dl_h" "$ac_includes_default"
+! if test "x$ac_cv_header_dl_h" = x""yes; then :
+ DLL=dl.h
+ fi
+
+--- 12830,12840 ----
+ fi
+
+ ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
+! if test "x$ac_cv_header_dlfcn_h" = xyes; then :
+ DLL=dlfcn.h
+ else
+ ac_fn_c_check_header_mongrel "$LINENO" "dl.h" "ac_cv_header_dl_h" "$ac_includes_default"
+! if test "x$ac_cv_header_dl_h" = xyes; then :
+ DLL=dl.h
+ fi
+
+***************
+*** 13008,13014 ****
+ for ac_header in setjmp.h
+ do :
+ ac_fn_c_check_header_mongrel "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default"
+! if test "x$ac_cv_header_setjmp_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_SETJMP_H 1
+ _ACEOF
+--- 13031,13037 ----
+ for ac_header in setjmp.h
+ do :
+ ac_fn_c_check_header_mongrel "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default"
+! if test "x$ac_cv_header_setjmp_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_SETJMP_H 1
+ _ACEOF
+***************
+*** 13159,13168 ****
+ :end' >>confcache
+ if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+! test "x$cache_file" != "x/dev/null" &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+ $as_echo "$as_me: updating cache $cache_file" >&6;}
+! cat confcache >$cache_file
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+ $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+--- 13182,13202 ----
+ :end' >>confcache
+ if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+! if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+ $as_echo "$as_me: updating cache $cache_file" >&6;}
+! if test ! -f "$cache_file" || test -h "$cache_file"; then
+! cat confcache >"$cache_file"
+! else
+! case $cache_file in #(
+! */* | ?:*)
+! mv -f confcache "$cache_file"$$ &&
+! mv -f "$cache_file"$$ "$cache_file" ;; #(
+! *)
+! mv -f confcache "$cache_file" ;;
+! esac
+! fi
+! fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+ $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+***************
+*** 13178,13183 ****
+--- 13212,13218 ----
+
+ ac_libobjs=
+ ac_ltlibobjs=
++ U=
+ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+***************
+*** 13194,13200 ****
+
+
+
+! : ${CONFIG_STATUS=./config.status}
+ ac_write_fail=0
+ ac_clean_files_save=$ac_clean_files
+ ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+--- 13229,13235 ----
+
+
+
+! : "${CONFIG_STATUS=./config.status}"
+ ac_write_fail=0
+ ac_clean_files_save=$ac_clean_files
+ ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+***************
+*** 13295,13300 ****
+--- 13330,13336 ----
+ IFS=" "" $as_nl"
+
+ # Find who we are. Look in the path if we contain no directory separator.
++ as_myself=
+ case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+***************
+*** 13340,13358 ****
+ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+! # as_fn_error ERROR [LINENO LOG_FD]
+! # ---------------------------------
+ # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+ # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+! # script with status $?, using 1 if that was 0.
+ as_fn_error ()
+ {
+! as_status=$?; test $as_status -eq 0 && as_status=1
+! if test "$3"; then
+! as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+! $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ fi
+! $as_echo "$as_me: error: $1" >&2
+ as_fn_exit $as_status
+ } # as_fn_error
+
+--- 13376,13394 ----
+ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+! # as_fn_error STATUS ERROR [LINENO LOG_FD]
+! # ----------------------------------------
+ # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+ # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+! # script with STATUS, using 1 if that was 0.
+ as_fn_error ()
+ {
+! as_status=$1; test $as_status -eq 0 && as_status=1
+! if test "$4"; then
+! as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+! $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+! $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+ } # as_fn_error
+
+***************
+*** 13490,13505 ****
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+! # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+! as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+! as_ln_s='cp -p'
+ fi
+ else
+! as_ln_s='cp -p'
+ fi
+ rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+ rmdir conf$$.dir 2>/dev/null
+--- 13526,13541 ----
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+! # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+! as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+! as_ln_s='cp -pR'
+ fi
+ else
+! as_ln_s='cp -pR'
+ fi
+ rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+ rmdir conf$$.dir 2>/dev/null
+***************
+*** 13548,13554 ****
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+! } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+
+
+ } # as_fn_mkdir_p
+--- 13584,13590 ----
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+! } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+ } # as_fn_mkdir_p
+***************
+*** 13559,13586 ****
+ as_mkdir_p=false
+ fi
+
+! if test -x / >/dev/null 2>&1; then
+! as_test_x='test -x'
+! else
+! if ls -dL / >/dev/null 2>&1; then
+! as_ls_L_option=L
+! else
+! as_ls_L_option=
+! fi
+! as_test_x='
+! eval sh -c '\''
+! if test -d "$1"; then
+! test -d "$1/.";
+! else
+! case $1 in #(
+! -*)set "./$1";;
+! esac;
+! case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+! ???[sx]*):;;*)false;;esac;fi
+! '\'' sh
+! '
+! fi
+! as_executable_p=$as_test_x
+
+ # Sed expression to map a string onto a valid CPP name.
+ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+--- 13595,13610 ----
+ as_mkdir_p=false
+ fi
+
+!
+! # as_fn_executable_p FILE
+! # -----------------------
+! # Test if FILE is an executable regular file.
+! as_fn_executable_p ()
+! {
+! test -f "$1" && test -x "$1"
+! } # as_fn_executable_p
+! as_test_x='test -x'
+! as_executable_p=as_fn_executable_p
+
+ # Sed expression to map a string onto a valid CPP name.
+ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+***************
+*** 13602,13608 ****
+ # values after options handling.
+ ac_log="
+ This file was extended by $as_me, which was
+! generated by GNU Autoconf 2.65. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+--- 13626,13632 ----
+ # values after options handling.
+ ac_log="
+ This file was extended by $as_me, which was
+! generated by GNU Autoconf 2.69. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+***************
+*** 13664,13673 ****
+ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ ac_cs_version="\\
+ config.status
+! configured by $0, generated by GNU Autoconf 2.65,
+ with options \\"\$ac_cs_config\\"
+
+! Copyright (C) 2009 Free Software Foundation, Inc.
+ This config.status script is free software; the Free Software Foundation
+ gives unlimited permission to copy, distribute and modify it."
+
+--- 13688,13697 ----
+ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ ac_cs_version="\\
+ config.status
+! configured by $0, generated by GNU Autoconf 2.69,
+ with options \\"\$ac_cs_config\\"
+
+! Copyright (C) 2012 Free Software Foundation, Inc.
+ This config.status script is free software; the Free Software Foundation
+ gives unlimited permission to copy, distribute and modify it."
+
+***************
+*** 13683,13693 ****
+ while test $# != 0
+ do
+ case $1 in
+! --*=*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+--- 13707,13722 ----
+ while test $# != 0
+ do
+ case $1 in
+! --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
++ --*=)
++ ac_option=`expr "X$1" : 'X\([^=]*\)='`
++ ac_optarg=
++ ac_shift=:
++ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+***************
+*** 13709,13714 ****
+--- 13738,13744 ----
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
++ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+***************
+*** 13721,13727 ****
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+! as_fn_error "ambiguous option: \`$1'
+ Try \`$0 --help' for more information.";;
+ --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+--- 13751,13757 ----
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+! as_fn_error $? "ambiguous option: \`$1'
+ Try \`$0 --help' for more information.";;
+ --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+***************
+*** 13730,13736 ****
+ ac_cs_silent=: ;;
+
+ # This is an error.
+! -*) as_fn_error "unrecognized option: \`$1'
+ Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+--- 13760,13766 ----
+ ac_cs_silent=: ;;
+
+ # This is an error.
+! -*) as_fn_error $? "unrecognized option: \`$1'
+ Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+***************
+*** 13750,13756 ****
+ _ACEOF
+ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ if \$ac_cs_recheck; then
+! set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+--- 13780,13786 ----
+ _ACEOF
+ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ if \$ac_cs_recheck; then
+! set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+***************
+*** 13782,13788 ****
+ "auto/config.h") CONFIG_HEADERS="$CONFIG_HEADERS auto/config.h:config.h.in" ;;
+ "auto/config.mk") CONFIG_FILES="$CONFIG_FILES auto/config.mk:config.mk.in" ;;
+
+! *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+ done
+
+--- 13812,13818 ----
+ "auto/config.h") CONFIG_HEADERS="$CONFIG_HEADERS auto/config.h:config.h.in" ;;
+ "auto/config.mk") CONFIG_FILES="$CONFIG_FILES auto/config.mk:config.mk.in" ;;
+
+! *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+ done
+
+***************
+*** 13804,13812 ****
+ # after its creation but before its name has been assigned to `$tmp'.
+ $debug ||
+ {
+! tmp=
+ trap 'exit_status=$?
+! { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+ ' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+ }
+--- 13834,13843 ----
+ # after its creation but before its name has been assigned to `$tmp'.
+ $debug ||
+ {
+! tmp= ac_tmp=
+ trap 'exit_status=$?
+! : "${ac_tmp:=$tmp}"
+! { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+ ' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+ }
+***************
+*** 13814,13825 ****
+
+ {
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+! test -n "$tmp" && test -d "$tmp"
+ } ||
+ {
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+! } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+
+ # Set up the scripts for CONFIG_FILES section.
+ # No need to generate them if there are no CONFIG_FILES.
+--- 13845,13857 ----
+
+ {
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+! test -d "$tmp"
+ } ||
+ {
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+! } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+! ac_tmp=$tmp
+
+ # Set up the scripts for CONFIG_FILES section.
+ # No need to generate them if there are no CONFIG_FILES.
+***************
+*** 13836,13847 ****
+ fi
+ ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+ if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+! ac_cs_awk_cr='\r'
+ else
+ ac_cs_awk_cr=$ac_cr
+ fi
+
+! echo 'BEGIN {' >"$tmp/subs1.awk" &&
+ _ACEOF
+
+
+--- 13868,13879 ----
+ fi
+ ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+ if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+! ac_cs_awk_cr='\\r'
+ else
+ ac_cs_awk_cr=$ac_cr
+ fi
+
+! echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+ _ACEOF
+
+
+***************
+*** 13850,13867 ****
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+ } >conf$$subs.sh ||
+! as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+! ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+ ac_delim='%!_!# '
+ for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+! as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+! as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+--- 13882,13899 ----
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+ } >conf$$subs.sh ||
+! as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+! ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ ac_delim='%!_!# '
+ for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+! as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+! as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+***************
+*** 13869,13875 ****
+ rm -f conf$$subs.sh
+
+ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+! cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+ _ACEOF
+ sed -n '
+ h
+--- 13901,13907 ----
+ rm -f conf$$subs.sh
+
+ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+! cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+ _ACEOF
+ sed -n '
+ h
+***************
+*** 13917,13923 ****
+ rm -f conf$$subs.awk
+ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ _ACAWK
+! cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+--- 13949,13955 ----
+ rm -f conf$$subs.awk
+ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ _ACAWK
+! cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+***************
+*** 13949,13969 ****
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+ else
+ cat
+! fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+! || as_fn_error "could not setup config files machinery" "$LINENO" 5
+ _ACEOF
+
+! # VPATH may cause trouble with some makes, so we remove $(srcdir),
+! # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+ # trailing colons and then remove the whole line if VPATH becomes empty
+ # (actually we leave an empty line to preserve line numbers).
+ if test "x$srcdir" = x.; then
+! ac_vpsub='/^[ ]*VPATH[ ]*=/{
+! s/:*\$(srcdir):*/:/
+! s/:*\${srcdir}:*/:/
+! s/:*@srcdir@:*/:/
+! s/^\([^=]*=[ ]*\):*/\1/
+ s/:*$//
+ s/^[^=]*=[ ]*$//
+ }'
+ fi
+--- 13981,14009 ----
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+ else
+ cat
+! fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+! || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+ _ACEOF
+
+! # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+! # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+ # trailing colons and then remove the whole line if VPATH becomes empty
+ # (actually we leave an empty line to preserve line numbers).
+ if test "x$srcdir" = x.; then
+! ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+! h
+! s///
+! s/^/:/
+! s/[ ]*$/:/
+! s/:\$(srcdir):/:/g
+! s/:\${srcdir}:/:/g
+! s/:@srcdir@:/:/g
+! s/^:*//
+ s/:*$//
++ x
++ s/\(=[ ]*\).*/\1/
++ G
++ s/\n//
+ s/^[^=]*=[ ]*$//
+ }'
+ fi
+***************
+*** 13975,13981 ****
+ # No need to generate them if there are no CONFIG_HEADERS.
+ # This happens for instance with `./config.status Makefile'.
+ if test -n "$CONFIG_HEADERS"; then
+! cat >"$tmp/defines.awk" <<\_ACAWK ||
+ BEGIN {
+ _ACEOF
+
+--- 14015,14021 ----
+ # No need to generate them if there are no CONFIG_HEADERS.
+ # This happens for instance with `./config.status Makefile'.
+ if test -n "$CONFIG_HEADERS"; then
+! cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+ BEGIN {
+ _ACEOF
+
+***************
+*** 13987,13997 ****
+ # handling of long lines.
+ ac_delim='%!_!# '
+ for ac_last_try in false false :; do
+! ac_t=`sed -n "/$ac_delim/p" confdefs.h`
+! if test -z "$ac_t"; then
+ break
+ elif $ac_last_try; then
+! as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+--- 14027,14037 ----
+ # handling of long lines.
+ ac_delim='%!_!# '
+ for ac_last_try in false false :; do
+! ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+! if test -z "$ac_tt"; then
+ break
+ elif $ac_last_try; then
+! as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+***************
+*** 14076,14082 ****
+ _ACAWK
+ _ACEOF
+ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+! as_fn_error "could not setup config headers machinery" "$LINENO" 5
+ fi # test -n "$CONFIG_HEADERS"
+
+
+--- 14116,14122 ----
+ _ACAWK
+ _ACEOF
+ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+! as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+ fi # test -n "$CONFIG_HEADERS"
+
+
+***************
+*** 14089,14095 ****
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+! :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+--- 14129,14135 ----
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+! :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+***************
+*** 14108,14114 ****
+ for ac_f
+ do
+ case $ac_f in
+! -) ac_f="$tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+--- 14148,14154 ----
+ for ac_f
+ do
+ case $ac_f in
+! -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+***************
+*** 14117,14123 ****
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+! as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+--- 14157,14163 ----
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+! as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+***************
+*** 14143,14150 ****
+ esac
+
+ case $ac_tag in
+! *:-:* | *:-) cat >"$tmp/stdin" \
+! || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+--- 14183,14190 ----
+ esac
+
+ case $ac_tag in
+! *:-:* | *:-) cat >"$ac_tmp/stdin" \
+! || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+***************
+*** 14269,14291 ****
+ s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+ $ac_datarootdir_hack
+ "
+! eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+! || as_fn_error "could not create $ac_file" "$LINENO" 5
+
+ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+! { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+! { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+! which seems to be undefined. Please make sure it is defined." >&5
+ $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+! which seems to be undefined. Please make sure it is defined." >&2;}
+
+! rm -f "$tmp/stdin"
+ case $ac_file in
+! -) cat "$tmp/out" && rm -f "$tmp/out";;
+! *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ esac \
+! || as_fn_error "could not create $ac_file" "$LINENO" 5
+ ;;
+ :H)
+ #
+--- 14309,14332 ----
+ s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+ $ac_datarootdir_hack
+ "
+! eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+! >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+! { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+! { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+! "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+! which seems to be undefined. Please make sure it is defined" >&5
+ $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+! which seems to be undefined. Please make sure it is defined" >&2;}
+
+! rm -f "$ac_tmp/stdin"
+ case $ac_file in
+! -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+! *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+! || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+ :H)
+ #
+***************
+*** 14294,14314 ****
+ if test x"$ac_file" != x-; then
+ {
+ $as_echo "/* $configure_input */" \
+! && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+! } >"$tmp/config.h" \
+! || as_fn_error "could not create $ac_file" "$LINENO" 5
+! if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+ $as_echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+! mv "$tmp/config.h" "$ac_file" \
+! || as_fn_error "could not create $ac_file" "$LINENO" 5
+ fi
+ else
+ $as_echo "/* $configure_input */" \
+! && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+! || as_fn_error "could not create -" "$LINENO" 5
+ fi
+ ;;
+
+--- 14335,14355 ----
+ if test x"$ac_file" != x-; then
+ {
+ $as_echo "/* $configure_input */" \
+! && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+! } >"$ac_tmp/config.h" \
+! || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+! if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+ $as_echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+! mv "$ac_tmp/config.h" "$ac_file" \
+! || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ fi
+ else
+ $as_echo "/* $configure_input */" \
+! && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+! || as_fn_error $? "could not create -" "$LINENO" 5
+ fi
+ ;;
+
+***************
+*** 14323,14329 ****
+ ac_clean_files=$ac_clean_files_save
+
+ test $ac_write_fail = 0 ||
+! as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+ # configure is writing to config.log, and then calls config.status.
+--- 14364,14370 ----
+ ac_clean_files=$ac_clean_files_save
+
+ test $ac_write_fail = 0 ||
+! as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+ # configure is writing to config.log, and then calls config.status.
+***************
+*** 14344,14350 ****
+ exec 5>>auto/config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+! $ac_cs_success || as_fn_exit $?
+ fi
+ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+--- 14385,14391 ----
+ exec 5>>auto/config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+! $ac_cs_success || as_fn_exit 1
+ fi
+ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+*** ../vim-7.4.222/src/version.c 2014-03-27 17:19:05.868676325 +0100
+--- src/version.c 2014-03-27 17:37:52.608693590 +0100
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 223,
+ /**/
+
+--
+For humans, honesty is a matter of degree. Engineers are always honest in
+matters of technology and human relationships. That's why it's a good idea
+to keep engineers away from customers, romantic interests, and other people
+who can't handle the truth.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.224 b/patches/source/vim/patches/7.4.224
new file mode 100644
index 000000000..977cd82cd
--- /dev/null
+++ b/patches/source/vim/patches/7.4.224
@@ -0,0 +1,210 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.224
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.224
+Problem: /usr/bin/grep on Solaris does not support -F.
+Solution: Add configure check to find a good grep. (Danek Duvall)
+Files: src/configure.in, src/auto/configure
+
+
+*** ../vim-7.4.223/src/configure.in 2014-03-27 17:40:53.384696360 +0100
+--- src/configure.in 2014-03-27 18:49:24.900759361 +0100
+***************
+*** 14,19 ****
+--- 14,20 ----
+ AC_PROG_CC dnl required by almost everything
+ AC_PROG_CPP dnl required by header file checks
+ AC_PROGRAM_EGREP dnl required by AC_EGREP_CPP
++ AC_PROG_FGREP dnl finds working grep -F
+ AC_ISC_POSIX dnl required by AC_C_CROSS
+ AC_PROG_AWK dnl required for "make html" in ../doc
+
+***************
+*** 936,942 ****
+ PERL_CFLAGS=`echo "$perlcppflags" | sed -e 's/-pipe //' -e 's/-W[[^ ]]*//'`
+ fi
+ if test "X$perlldflags" != "X"; then
+! if test "X`echo \"$LDFLAGS\" | grep -F -e \"$perlldflags\"`" = "X"; then
+ LDFLAGS="$perlldflags $LDFLAGS"
+ fi
+ fi
+--- 937,943 ----
+ PERL_CFLAGS=`echo "$perlcppflags" | sed -e 's/-pipe //' -e 's/-W[[^ ]]*//'`
+ fi
+ if test "X$perlldflags" != "X"; then
+! if test "X`echo \"$LDFLAGS\" | $FGREP -e \"$perlldflags\"`" = "X"; then
+ LDFLAGS="$perlldflags $LDFLAGS"
+ fi
+ fi
+***************
+*** 1727,1733 ****
+ dnl configure, so strip these flags first (if present)
+ rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
+ if test "X$rubyldflags" != "X"; then
+! if test "X`echo \"$LDFLAGS\" | grep -F -e \"$rubyldflags\"`" = "X"; then
+ LDFLAGS="$rubyldflags $LDFLAGS"
+ fi
+ fi
+--- 1728,1734 ----
+ dnl configure, so strip these flags first (if present)
+ rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
+ if test "X$rubyldflags" != "X"; then
+! if test "X`echo \"$LDFLAGS\" | $FGREP -e \"$rubyldflags\"`" = "X"; then
+ LDFLAGS="$rubyldflags $LDFLAGS"
+ fi
+ fi
+*** ../vim-7.4.223/src/auto/configure 2014-03-27 17:40:53.396696361 +0100
+--- src/auto/configure 2014-03-27 18:49:34.356759506 +0100
+***************
+*** 719,724 ****
+--- 719,725 ----
+ CPP_MM
+ STRIP
+ AWK
++ FGREP
+ EGREP
+ GREP
+ CPP
+***************
+*** 3695,3701 ****
+
+ fi
+ rm -f conftest*
+! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
+ $as_echo_n "checking for library containing strerror... " >&6; }
+ if ${ac_cv_search_strerror+:} false; then :
+ $as_echo_n "(cached) " >&6
+--- 3696,3768 ----
+
+ fi
+ rm -f conftest*
+! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+! $as_echo_n "checking for fgrep... " >&6; }
+! if ${ac_cv_path_FGREP+:} false; then :
+! $as_echo_n "(cached) " >&6
+! else
+! if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+! then ac_cv_path_FGREP="$GREP -F"
+! else
+! if test -z "$FGREP"; then
+! ac_path_FGREP_found=false
+! # Loop through the user's path and test for each of PROGNAME-LIST
+! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+! for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+! do
+! IFS=$as_save_IFS
+! test -z "$as_dir" && as_dir=.
+! for ac_prog in fgrep; do
+! for ac_exec_ext in '' $ac_executable_extensions; do
+! ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+! as_fn_executable_p "$ac_path_FGREP" || continue
+! # Check for GNU ac_path_FGREP and select it if it is found.
+! # Check for GNU $ac_path_FGREP
+! case `"$ac_path_FGREP" --version 2>&1` in
+! *GNU*)
+! ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+! *)
+! ac_count=0
+! $as_echo_n 0123456789 >"conftest.in"
+! while :
+! do
+! cat "conftest.in" "conftest.in" >"conftest.tmp"
+! mv "conftest.tmp" "conftest.in"
+! cp "conftest.in" "conftest.nl"
+! $as_echo 'FGREP' >> "conftest.nl"
+! "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+! diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+! as_fn_arith $ac_count + 1 && ac_count=$as_val
+! if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+! # Best one so far, save it but keep looking for a better one
+! ac_cv_path_FGREP="$ac_path_FGREP"
+! ac_path_FGREP_max=$ac_count
+! fi
+! # 10*(2^10) chars as input seems more than enough
+! test $ac_count -gt 10 && break
+! done
+! rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+! esac
+!
+! $ac_path_FGREP_found && break 3
+! done
+! done
+! done
+! IFS=$as_save_IFS
+! if test -z "$ac_cv_path_FGREP"; then
+! as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+! fi
+! else
+! ac_cv_path_FGREP=$FGREP
+! fi
+!
+! fi
+! fi
+! { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+! $as_echo "$ac_cv_path_FGREP" >&6; }
+! FGREP="$ac_cv_path_FGREP"
+!
+! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
+ $as_echo_n "checking for library containing strerror... " >&6; }
+ if ${ac_cv_search_strerror+:} false; then :
+ $as_echo_n "(cached) " >&6
+***************
+*** 5480,5486 ****
+ PERL_CFLAGS=`echo "$perlcppflags" | sed -e 's/-pipe //' -e 's/-W[^ ]*//'`
+ fi
+ if test "X$perlldflags" != "X"; then
+! if test "X`echo \"$LDFLAGS\" | grep -F -e \"$perlldflags\"`" = "X"; then
+ LDFLAGS="$perlldflags $LDFLAGS"
+ fi
+ fi
+--- 5547,5553 ----
+ PERL_CFLAGS=`echo "$perlcppflags" | sed -e 's/-pipe //' -e 's/-W[^ ]*//'`
+ fi
+ if test "X$perlldflags" != "X"; then
+! if test "X`echo \"$LDFLAGS\" | $FGREP -e \"$perlldflags\"`" = "X"; then
+ LDFLAGS="$perlldflags $LDFLAGS"
+ fi
+ fi
+***************
+*** 6838,6844 ****
+ if test "X$rubyldflags" != "X"; then
+ rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
+ if test "X$rubyldflags" != "X"; then
+! if test "X`echo \"$LDFLAGS\" | grep -F -e \"$rubyldflags\"`" = "X"; then
+ LDFLAGS="$rubyldflags $LDFLAGS"
+ fi
+ fi
+--- 6905,6911 ----
+ if test "X$rubyldflags" != "X"; then
+ rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
+ if test "X$rubyldflags" != "X"; then
+! if test "X`echo \"$LDFLAGS\" | $FGREP -e \"$rubyldflags\"`" = "X"; then
+ LDFLAGS="$rubyldflags $LDFLAGS"
+ fi
+ fi
+*** ../vim-7.4.223/src/version.c 2014-03-27 17:40:53.396696361 +0100
+--- src/version.c 2014-03-27 18:48:59.488758971 +0100
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 224,
+ /**/
+
+--
+Female engineers become irresistible at the age of consent and remain that
+way until about thirty minutes after their clinical death. Longer if it's a
+warm day.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.225 b/patches/source/vim/patches/7.4.225
new file mode 100644
index 000000000..ba2207be5
--- /dev/null
+++ b/patches/source/vim/patches/7.4.225
@@ -0,0 +1,83 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.225
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.225
+Problem: Dynamic Ruby doesn't work on Solaris.
+Solution: Always use the stubs. (Danek Duvall, Yukihiro Nakadaira)
+Files: src/if_ruby.c
+
+
+*** ../vim-7.4.224/src/if_ruby.c 2014-02-23 22:52:33.352764716 +0100
+--- src/if_ruby.c 2014-03-27 18:56:37.428765988 +0100
+***************
+*** 88,95 ****
+ # define rb_int2big rb_int2big_stub
+ #endif
+
+! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20 \
+! && VIM_SIZEOF_INT < VIM_SIZEOF_LONG
+ /* Ruby 2.0 defines a number of static functions which use rb_fix2int and
+ * rb_num2int if VIM_SIZEOF_INT < VIM_SIZEOF_LONG (64bit) */
+ # define rb_fix2int rb_fix2int_stub
+--- 88,94 ----
+ # define rb_int2big rb_int2big_stub
+ #endif
+
+! #if defined(DYNAMIC_RUBY_VER) && VIM_SIZEOF_INT < VIM_SIZEOF_LONG
+ /* Ruby 2.0 defines a number of static functions which use rb_fix2int and
+ * rb_num2int if VIM_SIZEOF_INT < VIM_SIZEOF_LONG (64bit) */
+ # define rb_fix2int rb_fix2int_stub
+***************
+*** 203,210 ****
+ # define rb_inspect dll_rb_inspect
+ # define rb_int2inum dll_rb_int2inum
+ # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
+- # define rb_fix2int dll_rb_fix2int
+- # define rb_num2int dll_rb_num2int
+ # define rb_num2uint dll_rb_num2uint
+ # endif
+ # define rb_lastline_get dll_rb_lastline_get
+--- 202,207 ----
+***************
+*** 392,399 ****
+ {
+ return dll_rb_int2big(x);
+ }
+! # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20 \
+! && VIM_SIZEOF_INT < VIM_SIZEOF_LONG
+ long rb_fix2int_stub(VALUE x)
+ {
+ return dll_rb_fix2int(x);
+--- 389,395 ----
+ {
+ return dll_rb_int2big(x);
+ }
+! # if defined(DYNAMIC_RUBY_VER) && VIM_SIZEOF_INT < VIM_SIZEOF_LONG
+ long rb_fix2int_stub(VALUE x)
+ {
+ return dll_rb_fix2int(x);
+*** ../vim-7.4.224/src/version.c 2014-03-27 18:51:06.612760919 +0100
+--- src/version.c 2014-03-27 18:55:21.412764824 +0100
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 225,
+ /**/
+
+--
+Engineers are widely recognized as superior marriage material: intelligent,
+dependable, employed, honest, and handy around the house.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.226 b/patches/source/vim/patches/7.4.226
new file mode 100644
index 000000000..7c00c3d09
--- /dev/null
+++ b/patches/source/vim/patches/7.4.226
@@ -0,0 +1,136 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.226
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.226 (after 7.4.219)
+Problem: Cursurline highlighting not redrawn when scrolling. (John
+ Marriott)
+Solution: Check for required redraw in two places.
+Files: src/move.c
+
+
+*** ../vim-7.4.225/src/move.c 2014-03-27 12:11:43.888393741 +0100
+--- src/move.c 2014-03-28 21:45:56.958245561 +0100
+***************
+*** 20,25 ****
+--- 20,26 ----
+ #include "vim.h"
+
+ static void comp_botline __ARGS((win_T *wp));
++ static void redraw_for_cursorline __ARGS((win_T *wp));
+ static int scrolljump_value __ARGS((void));
+ static int check_top_offset __ARGS((void));
+ static void curs_rows __ARGS((win_T *wp, int do_botline));
+***************
+*** 106,111 ****
+--- 107,113 ----
+ #ifdef FEAT_FOLDING
+ wp->w_cline_folded = folded;
+ #endif
++ redraw_for_cursorline(wp);
+ wp->w_valid |= (VALID_CROW|VALID_CHEIGHT);
+ }
+ if (done + n > wp->w_height)
+***************
+*** 124,129 ****
+--- 126,152 ----
+ }
+
+ /*
++ * Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is
++ * set.
++ */
++ static void
++ redraw_for_cursorline(wp)
++ win_T *wp;
++ {
++ if ((wp->w_p_rnu
++ #ifdef FEAT_SYN_HL
++ || wp->w_p_cul
++ #endif
++ )
++ && (wp->w_valid & VALID_CROW) == 0
++ # ifdef FEAT_INS_EXPAND
++ && !pum_visible()
++ # endif
++ )
++ redraw_win_later(wp, SOME_VALID);
++ }
++
++ /*
+ * Update curwin->w_topline and redraw if necessary.
+ * Used to update the screen before printing a message.
+ */
+***************
+*** 772,791 ****
+ }
+ }
+
+! /* Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is
+! * set. */
+! if ((curwin->w_p_rnu
+! #ifdef FEAT_SYN_HL
+! || curwin->w_p_cul
+! #endif
+! )
+! && (curwin->w_valid & VALID_CROW) == 0
+! # ifdef FEAT_INS_EXPAND
+! && !pum_visible()
+! # endif
+! )
+! redraw_later(SOME_VALID);
+!
+ wp->w_valid |= VALID_CROW|VALID_CHEIGHT;
+
+ /* validate botline too, if update_screen doesn't do it */
+--- 795,801 ----
+ }
+ }
+
+! redraw_for_cursorline(curwin);
+ wp->w_valid |= VALID_CROW|VALID_CHEIGHT;
+
+ /* validate botline too, if update_screen doesn't do it */
+***************
+*** 2504,2511 ****
+ }
+ comp_botline(curwin);
+ curwin->w_cursor.lnum = curwin->w_botline - 1;
+! curwin->w_valid &= ~(VALID_WCOL|VALID_CHEIGHT|
+! VALID_WROW|VALID_CROW);
+ }
+ else
+ {
+--- 2514,2521 ----
+ }
+ comp_botline(curwin);
+ curwin->w_cursor.lnum = curwin->w_botline - 1;
+! curwin->w_valid &=
+! ~(VALID_WCOL|VALID_CHEIGHT|VALID_WROW|VALID_CROW);
+ }
+ else
+ {
+*** ../vim-7.4.225/src/version.c 2014-03-27 19:08:52.008777244 +0100
+--- src/version.c 2014-03-28 21:48:45.330248141 +0100
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 226,
+ /**/
+
+--
+Bad fashion can discourage normal people from interacting with the engineer
+and talking about the cute things their children do.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.227 b/patches/source/vim/patches/7.4.227
new file mode 100644
index 000000000..a7204bce4
--- /dev/null
+++ b/patches/source/vim/patches/7.4.227
@@ -0,0 +1,87 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.227
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.227 (after 7.4.225)
+Problem: Can't build with Ruby 1.8.
+Solution: Do include a check for the Ruby version. (Ken Takata)
+Files: src/if_ruby.c
+
+
+*** ../vim-7.4.226/src/if_ruby.c 2014-03-27 19:08:52.004777244 +0100
+--- src/if_ruby.c 2014-03-28 21:54:06.414253061 +0100
+***************
+*** 88,95 ****
+ # define rb_int2big rb_int2big_stub
+ #endif
+
+! #if defined(DYNAMIC_RUBY_VER) && VIM_SIZEOF_INT < VIM_SIZEOF_LONG
+! /* Ruby 2.0 defines a number of static functions which use rb_fix2int and
+ * rb_num2int if VIM_SIZEOF_INT < VIM_SIZEOF_LONG (64bit) */
+ # define rb_fix2int rb_fix2int_stub
+ # define rb_num2int rb_num2int_stub
+--- 88,96 ----
+ # define rb_int2big rb_int2big_stub
+ #endif
+
+! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 \
+! && VIM_SIZEOF_INT < VIM_SIZEOF_LONG
+! /* Ruby 1.9 defines a number of static functions which use rb_fix2int and
+ * rb_num2int if VIM_SIZEOF_INT < VIM_SIZEOF_LONG (64bit) */
+ # define rb_fix2int rb_fix2int_stub
+ # define rb_num2int rb_num2int_stub
+***************
+*** 202,207 ****
+--- 203,212 ----
+ # define rb_inspect dll_rb_inspect
+ # define rb_int2inum dll_rb_int2inum
+ # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
++ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 18
++ # define rb_fix2int dll_rb_fix2int
++ # define rb_num2int dll_rb_num2int
++ # endif
+ # define rb_num2uint dll_rb_num2uint
+ # endif
+ # define rb_lastline_get dll_rb_lastline_get
+***************
+*** 389,395 ****
+ {
+ return dll_rb_int2big(x);
+ }
+! # if defined(DYNAMIC_RUBY_VER) && VIM_SIZEOF_INT < VIM_SIZEOF_LONG
+ long rb_fix2int_stub(VALUE x)
+ {
+ return dll_rb_fix2int(x);
+--- 394,401 ----
+ {
+ return dll_rb_int2big(x);
+ }
+! # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 \
+! && VIM_SIZEOF_INT < VIM_SIZEOF_LONG
+ long rb_fix2int_stub(VALUE x)
+ {
+ return dll_rb_fix2int(x);
+*** ../vim-7.4.226/src/version.c 2014-03-28 21:49:26.854248777 +0100
+--- src/version.c 2014-03-28 21:53:51.546252833 +0100
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 227,
+ /**/
+
+--
+No engineer can take a shower without wondering if some sort of Teflon coating
+would make showering unnecessary.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.228 b/patches/source/vim/patches/7.4.228
new file mode 100644
index 000000000..0ce909c07
--- /dev/null
+++ b/patches/source/vim/patches/7.4.228
@@ -0,0 +1,189 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.228
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.228
+Problem: Compiler warnings when building with Python 3.2.
+Solution: Make type cast depend on Python version. (Ken Takata)
+Files: src/if_py_both.h, src/if_python.c, src/if_python3.c
+
+
+*** ../vim-7.4.227/src/if_py_both.h 2014-03-08 16:13:39.115462069 +0100
+--- src/if_py_both.h 2014-03-30 15:58:40.948518929 +0200
+***************
+*** 2328,2334 ****
+ {
+ Py_ssize_t start, stop, step, slicelen;
+
+! if (PySlice_GetIndicesEx((PySliceObject *)idx, ListLength(self),
+ &start, &stop, &step, &slicelen) < 0)
+ return NULL;
+ return ListSlice(self, start, step, slicelen);
+--- 2328,2334 ----
+ {
+ Py_ssize_t start, stop, step, slicelen;
+
+! if (PySlice_GetIndicesEx((PySliceObject_T *)idx, ListLength(self),
+ &start, &stop, &step, &slicelen) < 0)
+ return NULL;
+ return ListSlice(self, start, step, slicelen);
+***************
+*** 2618,2624 ****
+ {
+ Py_ssize_t start, stop, step, slicelen;
+
+! if (PySlice_GetIndicesEx((PySliceObject *)idx, ListLength(self),
+ &start, &stop, &step, &slicelen) < 0)
+ return -1;
+ return ListAssSlice(self, start, step, slicelen,
+--- 2618,2624 ----
+ {
+ Py_ssize_t start, stop, step, slicelen;
+
+! if (PySlice_GetIndicesEx((PySliceObject_T *)idx, ListLength(self),
+ &start, &stop, &step, &slicelen) < 0)
+ return -1;
+ return ListAssSlice(self, start, step, slicelen,
+*** ../vim-7.4.227/src/if_python.c 2014-02-23 22:52:33.368764715 +0100
+--- src/if_python.c 2014-03-30 15:58:35.768518850 +0200
+***************
+*** 803,808 ****
+--- 803,810 ----
+ # define PY_STRSAVE(s) ((char_u *) py_memsave(s, STRLEN(s) + 1))
+ #endif
+
++ typedef PySliceObject PySliceObject_T;
++
+ /*
+ * Include the code shared with if_python3.c
+ */
+*** ../vim-7.4.227/src/if_python3.c 2014-01-14 19:35:49.000000000 +0100
+--- src/if_python3.c 2014-03-30 15:59:24.752519600 +0200
+***************
+*** 100,105 ****
+--- 100,115 ----
+ #define PyIntArgFunc ssizeargfunc
+ #define PyIntObjArgProc ssizeobjargproc
+
++ /*
++ * PySlice_GetIndicesEx(): first argument type changed from PySliceObject
++ * to PyObject in Python 3.2 or later.
++ */
++ #if PY_VERSION_HEX >= 0x030200f0
++ typedef PyObject PySliceObject_T;
++ #else
++ typedef PySliceObject PySliceObject_T;
++ #endif
++
+ #if defined(DYNAMIC_PYTHON3) || defined(PROTO)
+
+ # ifndef WIN3264
+***************
+*** 294,300 ****
+ static PyObject* (*py3_PyTuple_GetItem)(PyObject *, Py_ssize_t);
+ static int (*py3_PyMapping_Check)(PyObject *);
+ static PyObject* (*py3_PyMapping_Keys)(PyObject *);
+! static int (*py3_PySlice_GetIndicesEx)(PySliceObject *r, Py_ssize_t length,
+ Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step,
+ Py_ssize_t *slicelen);
+ static PyObject* (*py3_PyErr_NoMemory)(void);
+--- 304,310 ----
+ static PyObject* (*py3_PyTuple_GetItem)(PyObject *, Py_ssize_t);
+ static int (*py3_PyMapping_Check)(PyObject *);
+ static PyObject* (*py3_PyMapping_Keys)(PyObject *);
+! static int (*py3_PySlice_GetIndicesEx)(PySliceObject_T *r, Py_ssize_t length,
+ Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step,
+ Py_ssize_t *slicelen);
+ static PyObject* (*py3_PyErr_NoMemory)(void);
+***************
+*** 1190,1196 ****
+ if (CheckBuffer((BufferObject *) self))
+ return NULL;
+
+! if (PySlice_GetIndicesEx((PySliceObject *)idx,
+ (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
+ &start, &stop,
+ &step, &slicelen) < 0)
+--- 1200,1206 ----
+ if (CheckBuffer((BufferObject *) self))
+ return NULL;
+
+! if (PySlice_GetIndicesEx((PySliceObject_T *)idx,
+ (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
+ &start, &stop,
+ &step, &slicelen) < 0)
+***************
+*** 1222,1228 ****
+ if (CheckBuffer((BufferObject *) self))
+ return -1;
+
+! if (PySlice_GetIndicesEx((PySliceObject *)idx,
+ (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
+ &start, &stop,
+ &step, &slicelen) < 0)
+--- 1232,1238 ----
+ if (CheckBuffer((BufferObject *) self))
+ return -1;
+
+! if (PySlice_GetIndicesEx((PySliceObject_T *)idx,
+ (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
+ &start, &stop,
+ &step, &slicelen) < 0)
+***************
+*** 1306,1312 ****
+ {
+ Py_ssize_t start, stop, step, slicelen;
+
+! if (PySlice_GetIndicesEx((PySliceObject *)idx,
+ ((RangeObject *)(self))->end-((RangeObject *)(self))->start+1,
+ &start, &stop,
+ &step, &slicelen) < 0)
+--- 1316,1322 ----
+ {
+ Py_ssize_t start, stop, step, slicelen;
+
+! if (PySlice_GetIndicesEx((PySliceObject_T *)idx,
+ ((RangeObject *)(self))->end-((RangeObject *)(self))->start+1,
+ &start, &stop,
+ &step, &slicelen) < 0)
+***************
+*** 1333,1339 ****
+ {
+ Py_ssize_t start, stop, step, slicelen;
+
+! if (PySlice_GetIndicesEx((PySliceObject *)idx,
+ ((RangeObject *)(self))->end-((RangeObject *)(self))->start+1,
+ &start, &stop,
+ &step, &slicelen) < 0)
+--- 1343,1349 ----
+ {
+ Py_ssize_t start, stop, step, slicelen;
+
+! if (PySlice_GetIndicesEx((PySliceObject_T *)idx,
+ ((RangeObject *)(self))->end-((RangeObject *)(self))->start+1,
+ &start, &stop,
+ &step, &slicelen) < 0)
+*** ../vim-7.4.227/src/version.c 2014-03-28 21:58:17.878256914 +0100
+--- src/version.c 2014-03-30 15:52:27.784513211 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 228,
+ /**/
+
+--
+The average life of an organization chart is six months. You can safely
+ignore any order from your boss that would take six months to complete.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.229 b/patches/source/vim/patches/7.4.229
new file mode 100644
index 000000000..e77a98cfb
--- /dev/null
+++ b/patches/source/vim/patches/7.4.229
@@ -0,0 +1,141 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.229
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.229
+Problem: Using ":let" for listing variables and the second one is a curly
+ braces expression may fail.
+Solution: Check for an "=" in a better way. (ZyX)
+Files: src/eval.c, src/testdir/test104.in, src/testdir/test104.ok
+
+
+*** ../vim-7.4.228/src/eval.c 2014-03-25 18:23:27.062087691 +0100
+--- src/eval.c 2014-03-30 16:46:24.464562806 +0200
+***************
+*** 1856,1863 ****
+ return;
+ if (argend > arg && argend[-1] == '.') /* for var.='str' */
+ --argend;
+! expr = vim_strchr(argend, '=');
+! if (expr == NULL)
+ {
+ /*
+ * ":let" without "=": list variables
+--- 1856,1864 ----
+ return;
+ if (argend > arg && argend[-1] == '.') /* for var.='str' */
+ --argend;
+! expr = skipwhite(argend);
+! if (*expr != '=' && !(vim_strchr((char_u *)"+-.", *expr) != NULL
+! && expr[1] == '='))
+ {
+ /*
+ * ":let" without "=": list variables
+***************
+*** 1886,1897 ****
+ {
+ op[0] = '=';
+ op[1] = NUL;
+! if (expr > argend)
+ {
+! if (vim_strchr((char_u *)"+-.", expr[-1]) != NULL)
+! op[0] = expr[-1]; /* +=, -= or .= */
+ }
+! expr = skipwhite(expr + 1);
+
+ if (eap->skip)
+ ++emsg_skip;
+--- 1887,1900 ----
+ {
+ op[0] = '=';
+ op[1] = NUL;
+! if (*expr != '=')
+ {
+! if (vim_strchr((char_u *)"+-.", *expr) != NULL)
+! op[0] = *expr; /* +=, -= or .= */
+! expr = skipwhite(expr + 2);
+ }
+! else
+! expr = skipwhite(expr + 1);
+
+ if (eap->skip)
+ ++emsg_skip;
+*** ../vim-7.4.228/src/testdir/test104.in 2014-02-05 22:25:29.982568243 +0100
+--- src/testdir/test104.in 2014-03-30 16:44:39.432561197 +0200
+***************
+*** 1,4 ****
+! Tests for autoload. vim: set ft=vim ts=8 :
+
+ STARTTEST
+ :so small.vim
+--- 1,4 ----
+! Tests for :let. vim: set ft=vim ts=8 :
+
+ STARTTEST
+ :so small.vim
+***************
+*** 10,15 ****
+--- 10,29 ----
+ :catch
+ : $put ='FAIL: ' . v:exception
+ :endtry
++ :let a = 1
++ :let b = 2
++ :for letargs in ['a b', '{0 == 1 ? "a" : "b"}', '{0 == 1 ? "a" : "b"} a', 'a {0 == 1 ? "a" : "b"}']
++ : try
++ : redir => messages
++ : execute 'let' letargs
++ : redir END
++ : $put ='OK:'
++ : $put =split(substitute(messages, '\n', '\0 ', 'g'), '\n')
++ : catch
++ : $put ='FAIL: ' . v:exception
++ : redir END
++ : endtry
++ :endfor
+ :/^Results/,$wq! test.out
+ ENDTEST
+
+*** ../vim-7.4.228/src/testdir/test104.ok 2014-02-05 22:25:29.982568243 +0100
+--- src/testdir/test104.ok 2014-03-30 16:44:39.432561197 +0200
+***************
+*** 1,2 ****
+--- 1,13 ----
+ Results of test104:
+ OK: function('tr')
++ OK:
++ a #1
++ b #2
++ OK:
++ b #2
++ OK:
++ b #2
++ a #1
++ OK:
++ a #1
++ b #2
+*** ../vim-7.4.228/src/version.c 2014-03-30 16:11:37.180530823 +0200
+--- src/version.c 2014-03-30 16:46:39.660563039 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 229,
+ /**/
+
+--
+You have heard the saying that if you put a thousand monkeys in a room with a
+thousand typewriters and waited long enough, eventually you would have a room
+full of dead monkeys.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.230 b/patches/source/vim/patches/7.4.230
new file mode 100644
index 000000000..933de67ea
--- /dev/null
+++ b/patches/source/vim/patches/7.4.230
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.230
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.230
+Problem: Error when using ":options".
+Solution: Fix the entry for 'lispwords'. (Kenichi Ito)
+Files: runtime/optwin.vim
+
+
+*** ../vim-7.4.229/runtime/optwin.vim 2014-03-12 18:55:52.100906804 +0100
+--- runtime/optwin.vim 2014-04-01 12:25:09.825159207 +0200
+***************
+*** 855,861 ****
+ call append("$", "\t(local to buffer)")
+ call <SID>BinOptionL("lisp")
+ call append("$", "lispwords\twords that change how lisp indenting works")
+! call <SID>OptionL("lw", &lw)
+ endif
+
+
+--- 855,861 ----
+ call append("$", "\t(local to buffer)")
+ call <SID>BinOptionL("lisp")
+ call append("$", "lispwords\twords that change how lisp indenting works")
+! call <SID>OptionL("lw")
+ endif
+
+
+*** ../vim-7.4.229/src/version.c 2014-03-30 16:49:06.412565288 +0200
+--- src/version.c 2014-04-01 12:23:07.629160888 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 230,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+9. All your daydreaming is preoccupied with getting a faster connection to the
+ net: 28.8...ISDN...cable modem...T1...T3.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.231 b/patches/source/vim/patches/7.4.231
new file mode 100644
index 000000000..eb661441b
--- /dev/null
+++ b/patches/source/vim/patches/7.4.231
@@ -0,0 +1,267 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.231
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.231
+Problem: An error in ":options" is not caught by the tests.
+Solution: Add a test for ":options". Set $VIMRUNTIME for the tests so that
+ it uses the current runtime files instead of the installed ones.
+Files: src/Makefile, src/testdir/Makefile, src/testdir/test_options.in,
+ src/testdir/test_options.ok, src/testdir/Make_amiga.mak,
+ src/testdir/Make_dos.mak, src/testdir/Make_ming.mak,
+ src/testdir/Make_os2.mak, src/testdir/Make_vms.mms
+
+
+*** ../vim-7.4.230/src/Makefile 2014-03-27 17:40:53.384696360 +0100
+--- src/Makefile 2014-04-01 13:49:14.025089820 +0200
+***************
+*** 1867,1873 ****
+ -if test $(VIMTARGET) != vim -a ! -r vim; then \
+ ln -s $(VIMTARGET) vim; \
+ fi
+! cd testdir; $(MAKE) -f Makefile $(GUI_TESTTARGET) VIMPROG=../$(VIMTARGET) $(GUI_TESTARG)
+ $(MAKE) -f Makefile unittest
+
+ unittesttargets:
+--- 1867,1873 ----
+ -if test $(VIMTARGET) != vim -a ! -r vim; then \
+ ln -s $(VIMTARGET) vim; \
+ fi
+! cd testdir; $(MAKE) -f Makefile $(GUI_TESTTARGET) VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
+ $(MAKE) -f Makefile unittest
+
+ unittesttargets:
+***************
+*** 1880,1885 ****
+--- 1880,1886 ----
+
+ # Run individual test, assuming that Vim was already compiled.
+ test1 test2 test3 test4 test5 test6 test7 test8 test9 \
++ test_options \
+ test10 test11 test12 test13 test14 test15 test16 test17 test18 test19 \
+ test20 test21 test22 test23 test24 test25 test26 test27 test28 test29 \
+ test30 test31 test32 test33 test34 test35 test36 test37 test38 test39 \
+***************
+*** 1890,1896 ****
+ test80 test81 test82 test83 test84 test85 test86 test87 test88 test89 \
+ test90 test91 test92 test93 test94 test95 test96 test97 test98 test99 \
+ test100 test101 test102 test103 test104 test105 test106 test107:
+! cd testdir; rm $@.out; $(MAKE) -f Makefile $@.out VIMPROG=../$(VIMTARGET)
+
+ testclean:
+ cd testdir; $(MAKE) -f Makefile clean
+--- 1891,1897 ----
+ test80 test81 test82 test83 test84 test85 test86 test87 test88 test89 \
+ test90 test91 test92 test93 test94 test95 test96 test97 test98 test99 \
+ test100 test101 test102 test103 test104 test105 test106 test107:
+! cd testdir; rm $@.out; $(MAKE) -f Makefile $@.out VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
+
+ testclean:
+ cd testdir; $(MAKE) -f Makefile clean
+*** ../vim-7.4.230/src/testdir/Makefile 2014-03-12 19:41:37.100948866 +0100
+--- src/testdir/Makefile 2014-04-01 13:48:07.593090734 +0200
+***************
+*** 3,8 ****
+--- 3,9 ----
+ #
+
+ VIMPROG = ../vim
++ SCRIPTSOURCE = ../../runtime
+
+ # Uncomment this line to use valgrind for memory leaks and extra warnings.
+ # The output goes into a file "valgrind.testN"
+***************
+*** 31,37 ****
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+ test99.out test100.out test101.out test102.out test103.out \
+! test104.out test105.out test106.out
+
+ SCRIPTS_GUI = test16.out
+
+--- 32,39 ----
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+ test99.out test100.out test101.out test102.out test103.out \
+! test104.out test105.out test106.out \
+! test_options.out
+
+ SCRIPTS_GUI = test16.out
+
+***************
+*** 53,59 ****
+
+ RM_ON_RUN = test.out X* viminfo
+ RM_ON_START = tiny.vim small.vim mbyte.vim mzscheme.vim lua.vim test.ok
+! RUN_VIM = $(VALGRIND) $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in
+
+ clean:
+ -rm -rf *.out *.failed *.rej *.orig test.log $(RM_ON_RUN) $(RM_ON_START) valgrind.*
+--- 55,61 ----
+
+ RM_ON_RUN = test.out X* viminfo
+ RM_ON_START = tiny.vim small.vim mbyte.vim mzscheme.vim lua.vim test.ok
+! RUN_VIM = export VIMRUNTIME=$(SCRIPTSOURCE); $(VALGRIND) $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in
+
+ clean:
+ -rm -rf *.out *.failed *.rej *.orig test.log $(RM_ON_RUN) $(RM_ON_START) valgrind.*
+*** ../vim-7.4.230/src/testdir/test_options.in 2014-04-01 14:07:21.057074867 +0200
+--- src/testdir/test_options.in 2014-04-01 13:19:34.073114305 +0200
+***************
+*** 0 ****
+--- 1,17 ----
++ Test for ":options".
++
++ STARTTEST
++ :so small.vim
++ :let caught = 'ok'
++ :try
++ :options
++ :catch
++ :let caught = v:throwpoint . "\n" . v:exception
++ :endtry
++ :buf 1
++ :$put =caught
++ :/^result/,$w! test.out
++ :qa!
++ ENDTEST
++
++ result
+*** ../vim-7.4.230/src/testdir/test_options.ok 2014-04-01 14:07:21.065074867 +0200
+--- src/testdir/test_options.ok 2014-04-01 13:04:45.041126534 +0200
+***************
+*** 0 ****
+--- 1,2 ----
++ result
++ ok
+*** ../vim-7.4.230/src/testdir/Make_amiga.mak 2014-03-12 19:41:37.096948866 +0100
+--- src/testdir/Make_amiga.mak 2014-04-01 13:13:31.561119292 +0200
+***************
+*** 35,41 ****
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+ test99.out test100.out test101.out test102.out test103.out \
+! test104.out test105.out test106.out
+
+ .SUFFIXES: .in .out
+
+--- 35,42 ----
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+ test99.out test100.out test101.out test102.out test103.out \
+! test104.out test105.out test106.out \
+! test_options.out
+
+ .SUFFIXES: .in .out
+
+***************
+*** 158,160 ****
+--- 159,162 ----
+ test104.out: test104.in
+ test105.out: test105.in
+ test106.out: test106.in
++ test_options.out: test_options.in
+*** ../vim-7.4.230/src/testdir/Make_dos.mak 2014-03-12 19:41:37.096948866 +0100
+--- src/testdir/Make_dos.mak 2014-04-01 13:14:07.909118792 +0200
+***************
+*** 34,40 ****
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+ test100.out test101.out test102.out test103.out test104.out \
+! test105.out test106.out
+
+ SCRIPTS32 = test50.out test70.out
+
+--- 34,41 ----
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+ test100.out test101.out test102.out test103.out test104.out \
+! test105.out test106.out \
+! test_options.out
+
+ SCRIPTS32 = test50.out test70.out
+
+*** ../vim-7.4.230/src/testdir/Make_ming.mak 2014-03-12 19:41:37.096948866 +0100
+--- src/testdir/Make_ming.mak 2014-04-01 13:14:23.889118572 +0200
+***************
+*** 54,60 ****
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+ test100.out test101.out test102.out test103.out test104.out \
+! test105.out test106.out
+
+ SCRIPTS32 = test50.out test70.out
+
+--- 54,61 ----
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+ test100.out test101.out test102.out test103.out test104.out \
+! test105.out test106.out \
+! test_options.out
+
+ SCRIPTS32 = test50.out test70.out
+
+*** ../vim-7.4.230/src/testdir/Make_os2.mak 2014-03-12 19:41:37.096948866 +0100
+--- src/testdir/Make_os2.mak 2014-04-01 13:14:34.377118428 +0200
+***************
+*** 36,42 ****
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+ test100.out test101.out test102.out test103.out test104.out \
+! test105.out test106.out
+
+ .SUFFIXES: .in .out
+
+--- 36,43 ----
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+ test100.out test101.out test102.out test103.out test104.out \
+! test105.out test106.out \
+! test_options.out
+
+ .SUFFIXES: .in .out
+
+*** ../vim-7.4.230/src/testdir/Make_vms.mms 2014-03-12 19:41:37.096948866 +0100
+--- src/testdir/Make_vms.mms 2014-04-01 13:14:47.821118243 +0200
+***************
+*** 95,101 ****
+ test90.out test91.out test92.out test93.out test94.out \
+ test95.out test96.out test98.out test99.out \
+ test100.out test101.out test103.out test104.out \
+! test105.out test106.out
+
+ # Known problems:
+ # test17: ?
+--- 95,102 ----
+ test90.out test91.out test92.out test93.out test94.out \
+ test95.out test96.out test98.out test99.out \
+ test100.out test101.out test103.out test104.out \
+! test105.out test106.out \
+! test_options.out
+
+ # Known problems:
+ # test17: ?
+*** ../vim-7.4.230/src/version.c 2014-04-01 12:26:40.245157964 +0200
+--- src/version.c 2014-04-01 13:14:57.549118109 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 231,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+11. You find yourself typing "com" after every period when using a word
+ processor.com
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.232 b/patches/source/vim/patches/7.4.232
new file mode 100644
index 000000000..3e2dfe289
--- /dev/null
+++ b/patches/source/vim/patches/7.4.232
@@ -0,0 +1,109 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.232
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.232
+Problem: ":%s/\n//" uses a lot of memory. (Aidan Marlin)
+Solution: Turn this into a join command. (Christian Brabandt)
+Files: src/ex_cmds.c, src/ex_docmd.c, src/proto/ex_docmd.pro
+
+
+*** ../vim-7.4.231/src/ex_cmds.c 2014-03-23 15:12:29.919264336 +0100
+--- src/ex_cmds.c 2014-04-01 17:37:59.560901015 +0200
+***************
+*** 4420,4425 ****
+--- 4420,4450 ----
+ endcolumn = (curwin->w_curswant == MAXCOL);
+ }
+
++ /* Recognize ":%s/\n//" and turn it into a join command, which is much
++ * more efficient.
++ * TODO: find a generic solution to make line-joining operations more
++ * efficient, avoid allocating a string that grows in size.
++ */
++ if (STRCMP(pat, "\\n") == 0 && STRLEN(pat) == 2
++ && *sub == NUL
++ && (*cmd == NUL || (cmd[1] == NUL && (*cmd == 'g' || *cmd == 'l'
++ || *cmd == 'p' || *cmd == '#'))))
++ {
++ curwin->w_cursor.lnum = eap->line1;
++ if (*cmd == 'l')
++ eap->flags = EXFLAG_LIST;
++ else if (*cmd == '#')
++ eap->flags = EXFLAG_NR;
++ else if (*cmd == 'p')
++ eap->flags = EXFLAG_PRINT;
++
++ (void)do_join(eap->line2 - eap->line1 + 1, FALSE, TRUE, FALSE);
++ sub_nlines = sub_nsubs = eap->line2 - eap->line1 + 1;
++ (void)do_sub_msg(FALSE);
++ ex_may_print(eap);
++ return;
++ }
++
+ /*
+ * Find trailing options. When '&' is used, keep old options.
+ */
+*** ../vim-7.4.231/src/ex_docmd.c 2014-03-25 13:03:44.937793766 +0100
+--- src/ex_docmd.c 2014-04-01 17:31:59.708905965 +0200
+***************
+*** 316,322 ****
+ static void ex_operators __ARGS((exarg_T *eap));
+ static void ex_put __ARGS((exarg_T *eap));
+ static void ex_copymove __ARGS((exarg_T *eap));
+- static void ex_may_print __ARGS((exarg_T *eap));
+ static void ex_submagic __ARGS((exarg_T *eap));
+ static void ex_join __ARGS((exarg_T *eap));
+ static void ex_at __ARGS((exarg_T *eap));
+--- 316,321 ----
+***************
+*** 8683,8689 ****
+ /*
+ * Print the current line if flags were given to the Ex command.
+ */
+! static void
+ ex_may_print(eap)
+ exarg_T *eap;
+ {
+--- 8682,8688 ----
+ /*
+ * Print the current line if flags were given to the Ex command.
+ */
+! void
+ ex_may_print(eap)
+ exarg_T *eap;
+ {
+*** ../vim-7.4.231/src/proto/ex_docmd.pro 2013-08-10 13:37:10.000000000 +0200
+--- src/proto/ex_docmd.pro 2014-04-01 17:31:59.708905965 +0200
+***************
+*** 54,57 ****
+--- 54,58 ----
+ int put_line __ARGS((FILE *fd, char *s));
+ void dialog_msg __ARGS((char_u *buff, char *format, char_u *fname));
+ char_u *get_behave_arg __ARGS((expand_T *xp, int idx));
++ void ex_may_print __ARGS((exarg_T *eap));
+ /* vim: set ft=c : */
+*** ../vim-7.4.231/src/version.c 2014-04-01 14:08:14.689074130 +0200
+--- src/version.c 2014-04-01 17:33:03.920905082 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 232,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+16. You step out of your room and realize that your parents have moved and
+ you don't have a clue when it happened.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.233 b/patches/source/vim/patches/7.4.233
new file mode 100644
index 000000000..0ae1bcab5
--- /dev/null
+++ b/patches/source/vim/patches/7.4.233
@@ -0,0 +1,80 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.233
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.233
+Problem: Escaping special characters for using "%" with a shell command is
+ inconsistant, parenthesis are escaped but spaces are not.
+Solution: Only escape "!". (Gary Johnson)
+Files: src/ex_docmd.c
+
+
+*** ../vim-7.4.232/src/ex_docmd.c 2014-04-01 17:49:40.140891378 +0200
+--- src/ex_docmd.c 2014-04-01 18:26:16.036861171 +0200
+***************
+*** 4580,4604 ****
+
+ /* For a shell command a '!' must be escaped. */
+ if ((eap->usefilter || eap->cmdidx == CMD_bang)
+! && vim_strpbrk(repl, (char_u *)"!&;()<>") != NULL)
+ {
+ char_u *l;
+
+! l = vim_strsave_escaped(repl, (char_u *)"!&;()<>");
+ if (l != NULL)
+ {
+ vim_free(repl);
+ repl = l;
+- /* For a sh-like shell escape "!" another time. */
+- if (strstr((char *)p_sh, "sh") != NULL)
+- {
+- l = vim_strsave_escaped(repl, (char_u *)"!");
+- if (l != NULL)
+- {
+- vim_free(repl);
+- repl = l;
+- }
+- }
+ }
+ }
+
+--- 4580,4594 ----
+
+ /* For a shell command a '!' must be escaped. */
+ if ((eap->usefilter || eap->cmdidx == CMD_bang)
+! && vim_strpbrk(repl, (char_u *)"!") != NULL)
+ {
+ char_u *l;
+
+! l = vim_strsave_escaped(repl, (char_u *)"!");
+ if (l != NULL)
+ {
+ vim_free(repl);
+ repl = l;
+ }
+ }
+
+*** ../vim-7.4.232/src/version.c 2014-04-01 17:49:40.144891378 +0200
+--- src/version.c 2014-04-01 18:54:13.276838100 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 233,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+17. You turn on your intercom when leaving the room so you can hear if new
+ e-mail arrives.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.234 b/patches/source/vim/patches/7.4.234
new file mode 100644
index 000000000..d70b7a07a
--- /dev/null
+++ b/patches/source/vim/patches/7.4.234
@@ -0,0 +1,95 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.234
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.234
+Problem: Can't get the command that was used to start Vim.
+Solution: Add v:progpath. (Viktor Kojouharov)
+Files: runtime/doc/eval.txt, src/eval.c, src/main.c, src/vim.h
+
+
+*** ../vim-7.4.233/runtime/doc/eval.txt 2014-03-25 18:23:27.054087691 +0100
+--- runtime/doc/eval.txt 2014-04-01 19:33:25.516805743 +0200
+***************
+*** 1557,1562 ****
+--- 1558,1569 ----
+ |evim| etc., or any other name you might symlink to Vim.
+ Read-only.
+
++ *v:progpath* *progpath-variable*
++ v:progpath Contains the command with which Vim was invoked, including the
++ path. Useful if you want to message a Vim server using a
++ |--remote-expr|.
++ Read-only.
++
+ *v:register* *register-variable*
+ v:register The name of the register in effect for the current normal mode
+ command (regardless of whether that command actually used a
+*** ../vim-7.4.233/src/eval.c 2014-03-30 16:49:06.412565288 +0200
+--- src/eval.c 2014-04-01 19:34:13.164805087 +0200
+***************
+*** 361,366 ****
+--- 361,367 ----
+ {VV_NAME("hlsearch", VAR_NUMBER), 0},
+ {VV_NAME("oldfiles", VAR_LIST), 0},
+ {VV_NAME("windowid", VAR_NUMBER), VV_RO},
++ {VV_NAME("progpath", VAR_STRING), VV_RO},
+ };
+
+ /* shorthand */
+*** ../vim-7.4.233/src/main.c 2014-03-23 15:12:29.923264336 +0100
+--- src/main.c 2014-04-01 19:34:13.164805087 +0200
+***************
+*** 1602,1607 ****
+--- 1602,1608 ----
+
+ #ifdef FEAT_EVAL
+ set_vim_var_string(VV_PROGNAME, initstr, -1);
++ set_vim_var_string(VV_PROGPATH, (char_u *)parmp->argv[0], -1);
+ #endif
+
+ if (TOLOWER_ASC(initstr[0]) == 'r')
+*** ../vim-7.4.233/src/vim.h 2014-03-24 19:43:56.600837795 +0100
+--- src/vim.h 2014-04-01 19:34:13.164805087 +0200
+***************
+*** 1880,1886 ****
+ #define VV_HLSEARCH 54
+ #define VV_OLDFILES 55
+ #define VV_WINDOWID 56
+! #define VV_LEN 57 /* number of v: vars */
+
+ #ifdef FEAT_CLIPBOARD
+
+--- 1880,1887 ----
+ #define VV_HLSEARCH 54
+ #define VV_OLDFILES 55
+ #define VV_WINDOWID 56
+! #define VV_PROGPATH 57
+! #define VV_LEN 58 /* number of v: vars */
+
+ #ifdef FEAT_CLIPBOARD
+
+*** ../vim-7.4.233/src/version.c 2014-04-01 18:54:44.316837673 +0200
+--- src/version.c 2014-04-01 19:28:05.092810150 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 234,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+18. Your wife drapes a blond wig over your monitor to remind you of what she
+ looks like.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.235 b/patches/source/vim/patches/7.4.235
new file mode 100644
index 000000000..1f12ee7c1
--- /dev/null
+++ b/patches/source/vim/patches/7.4.235
@@ -0,0 +1,552 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.235
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.235
+Problem: It is not easy to get the full path of a command.
+Solution: Add the exepath() function.
+Files: src/eval.c, src/misc1.c, src/os_amiga.c, src/os_msdos.c,
+ src/os_unix.c, src/os_vms.c, src/os_win32.c,
+ src/proto/os_amiga.pro, src/proto/os_msdos.pro,
+ src/proto/os_unix.pro, src/proto/os_win32.pro,
+ runtime/doc/eval.txt
+
+
+*** ../vim-7.4.234/src/eval.c 2014-04-01 19:55:46.252787300 +0200
+--- src/eval.c 2014-04-01 20:18:39.212768414 +0200
+***************
+*** 514,519 ****
+--- 514,520 ----
+ static void f_eval __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_eventhandler __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_executable __ARGS((typval_T *argvars, typval_T *rettv));
++ static void f_exepath __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_exists __ARGS((typval_T *argvars, typval_T *rettv));
+ #ifdef FEAT_FLOAT
+ static void f_exp __ARGS((typval_T *argvars, typval_T *rettv));
+***************
+*** 7920,7925 ****
+--- 7921,7927 ----
+ {"eval", 1, 1, f_eval},
+ {"eventhandler", 0, 0, f_eventhandler},
+ {"executable", 1, 1, f_executable},
++ {"exepath", 1, 1, f_exepath},
+ {"exists", 1, 1, f_exists},
+ #ifdef FEAT_FLOAT
+ {"exp", 1, 1, f_exp},
+***************
+*** 10046,10052 ****
+ typval_T *argvars;
+ typval_T *rettv;
+ {
+! rettv->vval.v_number = mch_can_exe(get_tv_string(&argvars[0]));
+ }
+
+ /*
+--- 10048,10069 ----
+ typval_T *argvars;
+ typval_T *rettv;
+ {
+! rettv->vval.v_number = mch_can_exe(get_tv_string(&argvars[0]), NULL);
+! }
+!
+! /*
+! * "exepath()" function
+! */
+! static void
+! f_exepath(argvars, rettv)
+! typval_T *argvars;
+! typval_T *rettv;
+! {
+! char_u *p = NULL;
+!
+! (void)mch_can_exe(get_tv_string(&argvars[0]), &p);
+! rettv->v_type = VAR_STRING;
+! rettv->vval.v_string = p;
+ }
+
+ /*
+*** ../vim-7.4.234/src/misc1.c 2014-03-12 18:55:52.100906804 +0100
+--- src/misc1.c 2014-04-01 20:01:08.752782864 +0200
+***************
+*** 10728,10734 ****
+ return;
+
+ /* If the file isn't executable, may not add it. Do accept directories. */
+! if (!isdir && (flags & EW_EXEC) && !mch_can_exe(f))
+ return;
+
+ /* Make room for another item in the file list. */
+--- 10728,10734 ----
+ return;
+
+ /* If the file isn't executable, may not add it. Do accept directories. */
+! if (!isdir && (flags & EW_EXEC) && !mch_can_exe(f, NULL))
+ return;
+
+ /* Make room for another item in the file list. */
+*** ../vim-7.4.234/src/os_amiga.c 2013-05-06 04:06:04.000000000 +0200
+--- src/os_amiga.c 2014-04-01 20:19:50.804767429 +0200
+***************
+*** 884,891 ****
+ * Return -1 if unknown.
+ */
+ int
+! mch_can_exe(name)
+ char_u *name;
+ {
+ /* TODO */
+ return -1;
+--- 884,892 ----
+ * Return -1 if unknown.
+ */
+ int
+! mch_can_exe(name, path)
+ char_u *name;
++ char_u **path;
+ {
+ /* TODO */
+ return -1;
+*** ../vim-7.4.234/src/os_msdos.c 2014-03-23 15:12:29.931264336 +0100
+--- src/os_msdos.c 2014-04-01 20:02:39.996781608 +0200
+***************
+*** 2945,2958 ****
+ * Return -1 if unknown.
+ */
+ int
+! mch_can_exe(name)
+ char_u *name;
+ {
+ char *p;
+
+ p = searchpath(name);
+ if (p == NULL || mch_isdir(p))
+ return FALSE;
+ return TRUE;
+ }
+
+--- 2945,2961 ----
+ * Return -1 if unknown.
+ */
+ int
+! mch_can_exe(name, path)
+ char_u *name;
++ char_u **path;
+ {
+ char *p;
+
+ p = searchpath(name);
+ if (p == NULL || mch_isdir(p))
+ return FALSE;
++ if (path != NULL)
++ *path = vim_strsave(p);
+ return TRUE;
+ }
+
+*** ../vim-7.4.234/src/os_unix.c 2014-03-12 16:51:35.060792541 +0100
+--- src/os_unix.c 2014-04-01 20:46:21.304745550 +0200
+***************
+*** 2992,2999 ****
+ * Return -1 if unknown.
+ */
+ int
+! mch_can_exe(name)
+ char_u *name;
+ {
+ char_u *buf;
+ char_u *p, *e;
+--- 2992,3000 ----
+ * Return -1 if unknown.
+ */
+ int
+! mch_can_exe(name, path)
+ char_u *name;
++ char_u **path;
+ {
+ char_u *buf;
+ char_u *p, *e;
+***************
+*** 3003,3009 ****
+ if (mch_isFullName(name) || (name[0] == '.' && (name[1] == '/'
+ || (name[1] == '.' && name[2] == '/'))))
+ {
+! return executable_file(name);
+ }
+
+ p = (char_u *)getenv("PATH");
+--- 3004,3021 ----
+ if (mch_isFullName(name) || (name[0] == '.' && (name[1] == '/'
+ || (name[1] == '.' && name[2] == '/'))))
+ {
+! if (executable_file(name))
+! {
+! if (path != NULL)
+! {
+! if (name[0] == '.')
+! *path = FullName_save(name, TRUE);
+! else
+! *path = vim_strsave(name);
+! }
+! return TRUE;
+! }
+! return FALSE;
+ }
+
+ p = (char_u *)getenv("PATH");
+***************
+*** 3032,3038 ****
+--- 3044,3059 ----
+ STRCAT(buf, name);
+ retval = executable_file(buf);
+ if (retval == 1)
++ {
++ if (path != NULL)
++ {
++ if (buf[0] == '.')
++ *path = FullName_save(buf, TRUE);
++ else
++ *path = vim_strsave(buf);
++ }
+ break;
++ }
+
+ if (*e != ':')
+ break;
+***************
+*** 5592,5598 ****
+ continue;
+
+ /* Skip files that are not executable if we check for that. */
+! if (!dir && (flags & EW_EXEC) && !mch_can_exe(p))
+ continue;
+
+ if (--files_free == 0)
+--- 5613,5619 ----
+ continue;
+
+ /* Skip files that are not executable if we check for that. */
+! if (!dir && (flags & EW_EXEC) && !mch_can_exe(p, NULL))
+ continue;
+
+ if (--files_free == 0)
+***************
+*** 6090,6096 ****
+ continue;
+
+ /* Skip files that are not executable if we check for that. */
+! if (!dir && (flags & EW_EXEC) && !mch_can_exe((*file)[i]))
+ continue;
+
+ p = alloc((unsigned)(STRLEN((*file)[i]) + 1 + dir));
+--- 6111,6117 ----
+ continue;
+
+ /* Skip files that are not executable if we check for that. */
+! if (!dir && (flags & EW_EXEC) && !mch_can_exe((*file)[i], NULL))
+ continue;
+
+ p = alloc((unsigned)(STRLEN((*file)[i]) + 1 + dir));
+***************
+*** 6317,6323 ****
+
+ /* Reads gpm event and adds special keys to input buf. Returns length of
+ * generated key sequence.
+! * This function is made after gui_send_mouse_event
+ */
+ static int
+ mch_gpm_process()
+--- 6338,6344 ----
+
+ /* Reads gpm event and adds special keys to input buf. Returns length of
+ * generated key sequence.
+! * This function is styled after gui_send_mouse_event().
+ */
+ static int
+ mch_gpm_process()
+*** ../vim-7.4.234/src/os_vms.c 2014-03-12 16:51:35.060792541 +0100
+--- src/os_vms.c 2014-04-01 20:05:52.960778954 +0200
+***************
+*** 483,489 ****
+ continue;
+
+ /* Skip files that are not executable if we check for that. */
+! if (!dir && (flags & EW_EXEC) && !mch_can_exe(vms_fmatch[i]))
+ continue;
+
+ /* allocate memory for pointers */
+--- 483,489 ----
+ continue;
+
+ /* Skip files that are not executable if we check for that. */
+! if (!dir && (flags & EW_EXEC) && !mch_can_exe(vms_fmatch[i], NULL))
+ continue;
+
+ /* allocate memory for pointers */
+*** ../vim-7.4.234/src/os_win32.c 2014-02-11 17:05:57.282217857 +0100
+--- src/os_win32.c 2014-04-01 20:26:07.432762248 +0200
+***************
+*** 1882,1888 ****
+ * TODO: Should somehow check if it's really executable.
+ */
+ static int
+! executable_exists(char *name)
+ {
+ char *dum;
+ char fname[_MAX_PATH];
+--- 1882,1888 ----
+ * TODO: Should somehow check if it's really executable.
+ */
+ static int
+! executable_exists(char *name, char_u **path)
+ {
+ char *dum;
+ char fname[_MAX_PATH];
+***************
+*** 1905,1910 ****
+--- 1905,1912 ----
+ return FALSE;
+ if (GetFileAttributesW(fnamew) & FILE_ATTRIBUTE_DIRECTORY)
+ return FALSE;
++ if (path != NULL)
++ *path = utf16_to_enc(fnamew, NULL);
+ return TRUE;
+ }
+ /* Retry with non-wide function (for Windows 98). */
+***************
+*** 1915,1920 ****
+--- 1917,1924 ----
+ return FALSE;
+ if (mch_isdir(fname))
+ return FALSE;
++ if (path != NULL)
++ *path = vim_strsave(fname);
+ return TRUE;
+ }
+
+***************
+*** 1996,2002 ****
+ vimrun_path = (char *)vim_strsave(vimrun_location);
+ s_dont_use_vimrun = FALSE;
+ }
+! else if (executable_exists("vimrun.exe"))
+ s_dont_use_vimrun = FALSE;
+
+ /* Don't give the warning for a missing vimrun.exe right now, but only
+--- 2000,2006 ----
+ vimrun_path = (char *)vim_strsave(vimrun_location);
+ s_dont_use_vimrun = FALSE;
+ }
+! else if (executable_exists("vimrun.exe", NULL))
+ s_dont_use_vimrun = FALSE;
+
+ /* Don't give the warning for a missing vimrun.exe right now, but only
+***************
+*** 2010,2016 ****
+ * If "finstr.exe" doesn't exist, use "grep -n" for 'grepprg'.
+ * Otherwise the default "findstr /n" is used.
+ */
+! if (!executable_exists("findstr.exe"))
+ set_option_value((char_u *)"grepprg", 0, (char_u *)"grep -n", 0);
+
+ #ifdef FEAT_CLIPBOARD
+--- 2014,2020 ----
+ * If "finstr.exe" doesn't exist, use "grep -n" for 'grepprg'.
+ * Otherwise the default "findstr /n" is used.
+ */
+! if (!executable_exists("findstr.exe", NULL))
+ set_option_value((char_u *)"grepprg", 0, (char_u *)"grep -n", 0);
+
+ #ifdef FEAT_CLIPBOARD
+***************
+*** 3330,3336 ****
+ * Return -1 if unknown.
+ */
+ int
+! mch_can_exe(char_u *name)
+ {
+ char_u buf[_MAX_PATH];
+ int len = (int)STRLEN(name);
+--- 3334,3340 ----
+ * Return -1 if unknown.
+ */
+ int
+! mch_can_exe(char_u *name, char_u **path)
+ {
+ char_u buf[_MAX_PATH];
+ int len = (int)STRLEN(name);
+***************
+*** 3343,3349 ****
+ * this with a Unix-shell like 'shell'. */
+ if (vim_strchr(gettail(name), '.') != NULL
+ || strstr((char *)gettail(p_sh), "sh") != NULL)
+! if (executable_exists((char *)name))
+ return TRUE;
+
+ /*
+--- 3347,3353 ----
+ * this with a Unix-shell like 'shell'. */
+ if (vim_strchr(gettail(name), '.') != NULL
+ || strstr((char *)gettail(p_sh), "sh") != NULL)
+! if (executable_exists((char *)name, path))
+ return TRUE;
+
+ /*
+***************
+*** 3365,3371 ****
+ }
+ else
+ copy_option_part(&p, buf + len, _MAX_PATH - len, ";");
+! if (executable_exists((char *)buf))
+ return TRUE;
+ }
+ return FALSE;
+--- 3369,3375 ----
+ }
+ else
+ copy_option_part(&p, buf + len, _MAX_PATH - len, ";");
+! if (executable_exists((char *)buf, path))
+ return TRUE;
+ }
+ return FALSE;
+*** ../vim-7.4.234/src/proto/os_amiga.pro 2013-08-10 13:37:37.000000000 +0200
+--- src/proto/os_amiga.pro 2014-04-01 20:41:23.672749644 +0200
+***************
+*** 26,32 ****
+ void mch_hide __ARGS((char_u *name));
+ int mch_isdir __ARGS((char_u *name));
+ int mch_mkdir __ARGS((char_u *name));
+! int mch_can_exe __ARGS((char_u *name));
+ int mch_nodetype __ARGS((char_u *name));
+ void mch_early_init __ARGS((void));
+ void mch_exit __ARGS((int r));
+--- 26,32 ----
+ void mch_hide __ARGS((char_u *name));
+ int mch_isdir __ARGS((char_u *name));
+ int mch_mkdir __ARGS((char_u *name));
+! int mch_can_exe __ARGS((char_u *name, char_u **path));
+ int mch_nodetype __ARGS((char_u *name));
+ void mch_early_init __ARGS((void));
+ void mch_exit __ARGS((int r));
+*** ../vim-7.4.234/src/proto/os_msdos.pro 2013-08-10 13:37:37.000000000 +0200
+--- src/proto/os_msdos.pro 2014-04-01 20:41:32.432749524 +0200
+***************
+*** 38,44 ****
+ int mch_setperm __ARGS((char_u *name, long perm));
+ void mch_hide __ARGS((char_u *name));
+ int mch_isdir __ARGS((char_u *name));
+! int mch_can_exe __ARGS((char_u *name));
+ int mch_nodetype __ARGS((char_u *name));
+ int mch_dirname __ARGS((char_u *buf, int len));
+ int mch_remove __ARGS((char_u *name));
+--- 38,44 ----
+ int mch_setperm __ARGS((char_u *name, long perm));
+ void mch_hide __ARGS((char_u *name));
+ int mch_isdir __ARGS((char_u *name));
+! int mch_can_exe __ARGS((char_u *name, char_u **path));
+ int mch_nodetype __ARGS((char_u *name));
+ int mch_dirname __ARGS((char_u *buf, int len));
+ int mch_remove __ARGS((char_u *name));
+*** ../vim-7.4.234/src/proto/os_unix.pro 2013-08-10 13:37:23.000000000 +0200
+--- src/proto/os_unix.pro 2014-04-01 20:41:58.712749162 +0200
+***************
+*** 42,48 ****
+ void mch_free_acl __ARGS((vim_acl_T aclent));
+ void mch_hide __ARGS((char_u *name));
+ int mch_isdir __ARGS((char_u *name));
+! int mch_can_exe __ARGS((char_u *name));
+ int mch_nodetype __ARGS((char_u *name));
+ void mch_early_init __ARGS((void));
+ void mch_free_mem __ARGS((void));
+--- 42,48 ----
+ void mch_free_acl __ARGS((vim_acl_T aclent));
+ void mch_hide __ARGS((char_u *name));
+ int mch_isdir __ARGS((char_u *name));
+! int mch_can_exe __ARGS((char_u *name, char_u **path));
+ int mch_nodetype __ARGS((char_u *name));
+ void mch_early_init __ARGS((void));
+ void mch_free_mem __ARGS((void));
+*** ../vim-7.4.234/src/proto/os_win32.pro 2013-08-10 13:37:38.000000000 +0200
+--- src/proto/os_win32.pro 2014-04-01 20:42:16.992748911 +0200
+***************
+*** 26,32 ****
+ int mch_is_linked __ARGS((char_u *fname));
+ int win32_fileinfo __ARGS((char_u *fname, BY_HANDLE_FILE_INFORMATION *info));
+ int mch_writable __ARGS((char_u *name));
+! int mch_can_exe __ARGS((char_u *name));
+ int mch_nodetype __ARGS((char_u *name));
+ vim_acl_T mch_get_acl __ARGS((char_u *fname));
+ void mch_set_acl __ARGS((char_u *fname, vim_acl_T acl));
+--- 26,32 ----
+ int mch_is_linked __ARGS((char_u *fname));
+ int win32_fileinfo __ARGS((char_u *fname, BY_HANDLE_FILE_INFORMATION *info));
+ int mch_writable __ARGS((char_u *name));
+! int mch_can_exe __ARGS((char_u *name, char_u **path));
+ int mch_nodetype __ARGS((char_u *name));
+ vim_acl_T mch_get_acl __ARGS((char_u *fname));
+ void mch_set_acl __ARGS((char_u *fname, vim_acl_T acl));
+*** ../vim-7.4.234/runtime/doc/eval.txt 2014-04-01 19:55:46.244787300 +0200
+--- runtime/doc/eval.txt 2014-04-01 20:54:37.832738720 +0200
+***************
+*** 1561,1566 ****
+--- 1562,1571 ----
+ v:progpath Contains the command with which Vim was invoked, including the
+ path. Useful if you want to message a Vim server using a
+ |--remote-expr|.
++ To get the full path use: >
++ echo exepath(v:progpath)
++ < NOTE: This does not work when the command is a relative path
++ and the current directory has changed.
+ Read-only.
+
+ *v:register* *register-variable*
+***************
+*** 1761,1766 ****
+--- 1766,1772 ----
+ eval( {string}) any evaluate {string} into its value
+ eventhandler( ) Number TRUE if inside an event handler
+ executable( {expr}) Number 1 if executable {expr} exists
++ exepath( {expr}) String full path of the command {expr}
+ exists( {expr}) Number TRUE if {expr} exists
+ extend( {expr1}, {expr2} [, {expr3}])
+ List/Dict insert items of {expr2} into {expr1}
+***************
+*** 2705,2710 ****
+--- 2711,2725 ----
+ 0 does not exist
+ -1 not implemented on this system
+
++ exepath({expr}) *exepath()*
++ If {expr} is an executable and is either an absolute path, a
++ relative path or found in $PATH, return the full path.
++ Note that the current directory is used when {expr} starts
++ with "./", which may be a problem for Vim: >
++ echo exepath(v:progpath)
++ < If {expr} cannot be found in $PATH or is not executable then
++ an empty string is returned.
++
+ *exists()*
+ exists({expr}) The result is a Number, which is non-zero if {expr} is
+ defined, zero otherwise. The {expr} argument is a string,
+*** ../vim-7.4.234/src/version.c 2014-04-01 19:55:46.252787300 +0200
+--- src/version.c 2014-04-01 20:00:44.108783203 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 235,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+19. All of your friends have an @ in their names.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.236 b/patches/source/vim/patches/7.4.236
new file mode 100644
index 000000000..927b0436d
--- /dev/null
+++ b/patches/source/vim/patches/7.4.236
@@ -0,0 +1,159 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.236
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.236
+Problem: It's not that easy to check the Vim patch version.
+Solution: Make has("patch-7.4.123") work. (partly by Marc Weber)
+Files: runtime/doc/eval.txt, src/eval.c, src/testdir/test60.in,
+ src/testdir/test60.ok
+
+
+*** ../vim-7.4.235/runtime/doc/eval.txt 2014-04-01 21:00:45.440733663 +0200
+--- runtime/doc/eval.txt 2014-04-01 21:19:52.232717888 +0200
+***************
+*** 6395,6407 ****
+ Example: >
+ :if has("gui_running")
+ < *has-patch*
+! 3. Included patches. First check |v:version| for the version of Vim.
+! Then the "patch123" feature means that patch 123 has been included for
+! this version. Example (checking version 6.2.148 or later): >
+ :if v:version > 602 || v:version == 602 && has("patch148")
+! < Note that it's possible for patch 147 to be omitted even though 148 is
+ included.
+
+ all_builtin_terms Compiled with all builtin terminals enabled.
+ amiga Amiga version of Vim.
+ arabic Compiled with Arabic support |Arabic|.
+--- 6408,6430 ----
+ Example: >
+ :if has("gui_running")
+ < *has-patch*
+! 3. Included patches. The "patch123" feature means that patch 123 has been
+! included. Note that this form does not check the version of Vim, you need
+! to inspect |v:version| for that:
+! Example (checking version 6.2.148 or later): >
+ :if v:version > 602 || v:version == 602 && has("patch148")
+! < Note that it's possible for patch 147 to be omitted even though 148 is
+ included.
+
++ 4. Beyond a certain patch level. The "patch-7.4.123" feature means that
++ the Vim version is 7.4 and patch 123 or later was included, or the Vim
++ version is later than 7.4.
++ The example above can be simplified to: >
++ :if has("patch-6.2.148")
++ < Note that this does not check if the patch was actually included, some
++ patches may have been skipped. That is unusual though.
++
++ acl Compiled with |ACL| support.
+ all_builtin_terms Compiled with all builtin terminals enabled.
+ amiga Amiga version of Vim.
+ arabic Compiled with Arabic support |Arabic|.
+*** ../vim-7.4.235/src/eval.c 2014-04-01 21:00:45.428733664 +0200
+--- src/eval.c 2014-04-01 21:50:59.084692208 +0200
+***************
+*** 12638,12644 ****
+ if (n == FALSE)
+ {
+ if (STRNICMP(name, "patch", 5) == 0)
+! n = has_patch(atoi((char *)name + 5));
+ else if (STRICMP(name, "vim_starting") == 0)
+ n = (starting != 0);
+ #ifdef FEAT_MBYTE
+--- 12638,12664 ----
+ if (n == FALSE)
+ {
+ if (STRNICMP(name, "patch", 5) == 0)
+! {
+! if (name[5] == '-'
+! && STRLEN(name) > 11
+! && vim_isdigit(name[6])
+! && vim_isdigit(name[8])
+! && vim_isdigit(name[10]))
+! {
+! int major = atoi((char *)name + 6);
+! int minor = atoi((char *)name + 8);
+! int patch = atoi((char *)name + 10);
+!
+! /* Expect "patch-9.9.01234". */
+! n = (major < VIM_VERSION_MAJOR
+! || (major == VIM_VERSION_MAJOR
+! && (minor < VIM_VERSION_MINOR
+! || (minor == VIM_VERSION_MINOR
+! && patch <= highest_patch()))));
+! }
+! else
+! n = has_patch(atoi((char *)name + 5));
+! }
+ else if (STRICMP(name, "vim_starting") == 0)
+ n = (starting != 0);
+ #ifdef FEAT_MBYTE
+*** ../vim-7.4.235/src/testdir/test60.in 2014-01-14 15:24:24.000000000 +0100
+--- src/testdir/test60.in 2014-04-01 22:01:40.256683388 +0200
+***************
+*** 1,4 ****
+! Tests for the exists() function. vim: set ft=vim ts=8 :
+
+ STARTTEST
+ :so small.vim
+--- 1,4 ----
+! Tests for the exists() and has() functions. vim: set ft=vim ts=8 sw=2 :
+
+ STARTTEST
+ :so small.vim
+***************
+*** 588,593 ****
+--- 588,603 ----
+ redir END
+ endfunction
+ :call TestExists()
++ :"
++ :function TestHas()
++ redir >> test.out
++ for pl in ['6.9.999', '7.1.999', '7.4.123', '9.1.0', '9.9.1']
++ echo 'has patch ' . pl . ': ' . has('patch-' . pl)
++ endfor
++ redir END
++ endfunc
++ :call TestHas()
++ :"
+ :delfunc TestExists
+ :delfunc RunTest
+ :delfunc TestFuncArg
+*** ../vim-7.4.235/src/testdir/test60.ok 2014-01-14 15:24:24.000000000 +0100
+--- src/testdir/test60.ok 2014-04-01 22:01:46.664683300 +0200
+***************
+*** 204,206 ****
+--- 204,211 ----
+ g:footest#x = 1
+ footest#F() 0
+ UndefFun() 0
++ has patch 6.9.999: 1
++ has patch 7.1.999: 1
++ has patch 7.4.123: 1
++ has patch 9.1.0: 0
++ has patch 9.9.1: 0
+*** ../vim-7.4.235/src/version.c 2014-04-01 21:00:45.440733663 +0200
+--- src/version.c 2014-04-01 21:22:27.964715746 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 236,
+ /**/
+
+--
+When a fly lands on the ceiling, does it do a half roll or
+a half loop?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.237 b/patches/source/vim/patches/7.4.237
new file mode 100644
index 000000000..02f940502
--- /dev/null
+++ b/patches/source/vim/patches/7.4.237
@@ -0,0 +1,127 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.237
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.237 (after 7.4.236)
+Problem: When some patches was not included has("patch-7.4.123") may return
+ true falsely.
+Solution: Check for the specific patch number.
+Files: runtime/doc/eval.txt, src/eval.c
+
+
+*** ../vim-7.4.236/runtime/doc/eval.txt 2014-04-01 22:08:51.008677463 +0200
+--- runtime/doc/eval.txt 2014-04-02 12:09:35.991983552 +0200
+***************
+*** 1681,1687 ****
+ is 501. Read-only. "version" also works, for backwards
+ compatibility.
+ Use |has()| to check if a certain patch was included, e.g.: >
+! if has("patch123")
+ < Note that patch numbers are specific to the version, thus both
+ version 5.0 and 5.1 may have a patch 123, but these are
+ completely different.
+--- 1682,1688 ----
+ is 501. Read-only. "version" also works, for backwards
+ compatibility.
+ Use |has()| to check if a certain patch was included, e.g.: >
+! if has("patch-7.4.123")
+ < Note that patch numbers are specific to the version, thus both
+ version 5.0 and 5.1 may have a patch 123, but these are
+ completely different.
+***************
+*** 6397,6415 ****
+ < *has-patch*
+ 3. Included patches. The "patch123" feature means that patch 123 has been
+ included. Note that this form does not check the version of Vim, you need
+! to inspect |v:version| for that:
+ Example (checking version 6.2.148 or later): >
+ :if v:version > 602 || v:version == 602 && has("patch148")
+ < Note that it's possible for patch 147 to be omitted even though 148 is
+ included.
+
+! 4. Beyond a certain patch level. The "patch-7.4.123" feature means that
+! the Vim version is 7.4 and patch 123 or later was included, or the Vim
+! version is later than 7.4.
+ The example above can be simplified to: >
+ :if has("patch-6.2.148")
+! < Note that this does not check if the patch was actually included, some
+! patches may have been skipped. That is unusual though.
+
+ acl Compiled with |ACL| support.
+ all_builtin_terms Compiled with all builtin terminals enabled.
+--- 6410,6428 ----
+ < *has-patch*
+ 3. Included patches. The "patch123" feature means that patch 123 has been
+ included. Note that this form does not check the version of Vim, you need
+! to inspect |v:version| for that.
+ Example (checking version 6.2.148 or later): >
+ :if v:version > 602 || v:version == 602 && has("patch148")
+ < Note that it's possible for patch 147 to be omitted even though 148 is
+ included.
+
+! 4. Beyond a certain version or at a certain version and including a specific
+! patch. The "patch-7.4.123" feature means that the Vim version is 7.5 or
+! later, or it is version 7.4 and patch 123 was included.
+ The example above can be simplified to: >
+ :if has("patch-6.2.148")
+! < Note that it's possible for patch 147 to be omitted even though 148 is
+! included.
+
+ acl Compiled with |ACL| support.
+ all_builtin_terms Compiled with all builtin terminals enabled.
+*** ../vim-7.4.236/src/eval.c 2014-04-01 22:08:51.016677463 +0200
+--- src/eval.c 2014-04-02 12:04:41.179987607 +0200
+***************
+*** 12647,12660 ****
+ {
+ int major = atoi((char *)name + 6);
+ int minor = atoi((char *)name + 8);
+- int patch = atoi((char *)name + 10);
+
+ /* Expect "patch-9.9.01234". */
+ n = (major < VIM_VERSION_MAJOR
+ || (major == VIM_VERSION_MAJOR
+ && (minor < VIM_VERSION_MINOR
+ || (minor == VIM_VERSION_MINOR
+! && patch <= highest_patch()))));
+ }
+ else
+ n = has_patch(atoi((char *)name + 5));
+--- 12647,12659 ----
+ {
+ int major = atoi((char *)name + 6);
+ int minor = atoi((char *)name + 8);
+
+ /* Expect "patch-9.9.01234". */
+ n = (major < VIM_VERSION_MAJOR
+ || (major == VIM_VERSION_MAJOR
+ && (minor < VIM_VERSION_MINOR
+ || (minor == VIM_VERSION_MINOR
+! && has_patch(atoi((char *)name + 10))))));
+ }
+ else
+ n = has_patch(atoi((char *)name + 5));
+*** ../vim-7.4.236/src/version.c 2014-04-01 22:08:51.016677463 +0200
+--- src/version.c 2014-04-02 12:10:48.911982549 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 237,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+22. You've already visited all the links at Yahoo and you're halfway through
+ Lycos.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.238 b/patches/source/vim/patches/7.4.238
new file mode 100644
index 000000000..bec909841
--- /dev/null
+++ b/patches/source/vim/patches/7.4.238
@@ -0,0 +1,505 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.238
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.238
+Problem: Vim does not support the smack library.
+Solution: Add smack support (Jose Bollo)
+Files: src/config.h.in, src/configure.in, src/fileio.c, src/memfile.c,
+ src/os_unix.c, src/undo.c, src/auto/configure
+
+
+*** ../vim-7.4.237/src/config.h.in 2014-02-23 22:52:33.364764715 +0100
+--- src/config.h.in 2014-04-02 13:37:41.095910851 +0200
+***************
+*** 191,196 ****
+--- 191,197 ----
+ #undef HAVE_SIGSETJMP
+ #undef HAVE_SIGSTACK
+ #undef HAVE_SIGVEC
++ #undef HAVE_SMACK
+ #undef HAVE_STRCASECMP
+ #undef HAVE_STRERROR
+ #undef HAVE_STRFTIME
+*** ../vim-7.4.237/src/configure.in 2014-03-27 18:51:06.604760919 +0100
+--- src/configure.in 2014-04-02 13:49:36.955901004 +0200
+***************
+*** 387,406 ****
+ AC_SUBST(QUOTESED)
+
+
+! dnl Link with -lselinux for SELinux stuff; if not found
+! AC_MSG_CHECKING(--disable-selinux argument)
+! AC_ARG_ENABLE(selinux,
+! [ --disable-selinux Don't check for SELinux support.],
+! , enable_selinux="yes")
+! if test "$enable_selinux" = "yes"; then
+ AC_MSG_RESULT(no)
+! AC_CHECK_LIB(selinux, is_selinux_enabled,
+! [LIBS="$LIBS -lselinux"
+! AC_DEFINE(HAVE_SELINUX)])
+ else
+ AC_MSG_RESULT(yes)
+ fi
+
+ dnl Check user requested features.
+
+ AC_MSG_CHECKING(--with-features argument)
+--- 387,427 ----
+ AC_SUBST(QUOTESED)
+
+
+! dnl Link with -lsmack for Smack stuff; if not found
+! AC_MSG_CHECKING(--disable-smack argument)
+! AC_ARG_ENABLE(smack,
+! [ --disable-smack Do not check for Smack support.],
+! , enable_smack="yes")
+! if test "$enable_smack" = "yes"; then
+! AC_CHECK_HEADER([linux/xattr.h], true, enable_smack="no")
+! fi
+! if test "$enable_smack" = "yes"; then
+ AC_MSG_RESULT(no)
+! AC_CHECK_LIB(attr, llistxattr,
+! [LIBS="$LIBS -lattr"
+! found_smack="yes"
+! AC_DEFINE(HAVE_SMACK)])
+ else
+ AC_MSG_RESULT(yes)
+ fi
+
++ dnl When smack was found don't search for SELinux
++ if test "x$found_smack" = "x"; then
++ dnl Link with -lselinux for SELinux stuff; if not found
++ AC_MSG_CHECKING(--disable-selinux argument)
++ AC_ARG_ENABLE(selinux,
++ [ --disable-selinux Do not check for SELinux support.],
++ , enable_selinux="yes")
++ if test "$enable_selinux" = "yes"; then
++ AC_MSG_RESULT(no)
++ AC_CHECK_LIB(selinux, is_selinux_enabled,
++ [LIBS="$LIBS -lselinux"
++ AC_DEFINE(HAVE_SELINUX)])
++ else
++ AC_MSG_RESULT(yes)
++ fi
++ fi
++
+ dnl Check user requested features.
+
+ AC_MSG_CHECKING(--with-features argument)
+*** ../vim-7.4.237/src/fileio.c 2014-03-12 16:51:35.056792541 +0100
+--- src/fileio.c 2014-04-02 13:39:28.983909367 +0200
+***************
+*** 4030,4036 ****
+ )
+ mch_setperm(backup,
+ (perm & 0707) | ((perm & 07) << 3));
+! # ifdef HAVE_SELINUX
+ mch_copy_sec(fname, backup);
+ # endif
+ #endif
+--- 4030,4036 ----
+ )
+ mch_setperm(backup,
+ (perm & 0707) | ((perm & 07) << 3));
+! # if defined(HAVE_SELINUX) || defined(HAVE_SMACK)
+ mch_copy_sec(fname, backup);
+ # endif
+ #endif
+***************
+*** 4069,4075 ****
+ #ifdef HAVE_ACL
+ mch_set_acl(backup, acl);
+ #endif
+! #ifdef HAVE_SELINUX
+ mch_copy_sec(fname, backup);
+ #endif
+ break;
+--- 4069,4075 ----
+ #ifdef HAVE_ACL
+ mch_set_acl(backup, acl);
+ #endif
+! #if defined(HAVE_SELINUX) || defined(HAVE_SMACK)
+ mch_copy_sec(fname, backup);
+ #endif
+ break;
+***************
+*** 4718,4724 ****
+ }
+ #endif
+
+! #ifdef HAVE_SELINUX
+ /* Probably need to set the security context. */
+ if (!backup_copy)
+ mch_copy_sec(backup, wfname);
+--- 4718,4724 ----
+ }
+ #endif
+
+! #if defined(HAVE_SELINUX) || defined(HAVE_SMACK)
+ /* Probably need to set the security context. */
+ if (!backup_copy)
+ mch_copy_sec(backup, wfname);
+***************
+*** 6707,6713 ****
+ mch_set_acl(to, acl);
+ mch_free_acl(acl);
+ #endif
+! #ifdef HAVE_SELINUX
+ mch_copy_sec(from, to);
+ #endif
+ if (errmsg != NULL)
+--- 6707,6713 ----
+ mch_set_acl(to, acl);
+ mch_free_acl(acl);
+ #endif
+! #if defined(HAVE_SELINUX) || defined(HAVE_SMACK)
+ mch_copy_sec(from, to);
+ #endif
+ if (errmsg != NULL)
+*** ../vim-7.4.237/src/memfile.c 2013-05-23 22:22:22.000000000 +0200
+--- src/memfile.c 2014-04-02 13:37:41.103910851 +0200
+***************
+*** 1358,1364 ****
+ if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0)
+ fcntl(mfp->mf_fd, F_SETFD, fdflags | FD_CLOEXEC);
+ #endif
+! #ifdef HAVE_SELINUX
+ mch_copy_sec(fname, mfp->mf_fname);
+ #endif
+ mch_hide(mfp->mf_fname); /* try setting the 'hidden' flag */
+--- 1358,1364 ----
+ if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0)
+ fcntl(mfp->mf_fd, F_SETFD, fdflags | FD_CLOEXEC);
+ #endif
+! #if defined(HAVE_SELINUX) || defined(HAVE_SMACK)
+ mch_copy_sec(fname, mfp->mf_fname);
+ #endif
+ mch_hide(mfp->mf_fname); /* try setting the 'hidden' flag */
+*** ../vim-7.4.237/src/os_unix.c 2014-04-01 21:00:45.436733663 +0200
+--- src/os_unix.c 2014-04-02 13:58:55.427893322 +0200
+***************
+*** 46,51 ****
+--- 46,59 ----
+ static int selinux_enabled = -1;
+ #endif
+
++ #ifdef HAVE_SMACK
++ # include <attr/xattr.h>
++ # include <linux/xattr.h>
++ # ifndef SMACK_LABEL_LEN
++ # define SMACK_LABEL_LEN 1024
++ # endif
++ #endif
++
+ /*
+ * Use this prototype for select, some include files have a wrong prototype
+ */
+***************
+*** 2798,2803 ****
+--- 2806,2895 ----
+ }
+ #endif /* HAVE_SELINUX */
+
++ #if defined(HAVE_SMACK) && !defined(PROTO)
++ /*
++ * Copy security info from "from_file" to "to_file".
++ */
++ void
++ mch_copy_sec(from_file, to_file)
++ char_u *from_file;
++ char_u *to_file;
++ {
++ static const char const *smack_copied_attributes[] =
++ {
++ XATTR_NAME_SMACK,
++ XATTR_NAME_SMACKEXEC,
++ XATTR_NAME_SMACKMMAP
++ };
++
++ char buffer[SMACK_LABEL_LEN];
++ const char *name;
++ int index;
++ int ret;
++ ssize_t size;
++
++ if (from_file == NULL)
++ return;
++
++ for (index = 0 ; index < (int)(sizeof(smack_copied_attributes)
++ / sizeof(smack_copied_attributes)[0]) ; index++)
++ {
++ /* get the name of the attribute to copy */
++ name = smack_copied_attributes[index];
++
++ /* get the value of the attribute in buffer */
++ size = getxattr((char*)from_file, name, buffer, sizeof(buffer));
++ if (size >= 0)
++ {
++ /* copy the attribute value of buffer */
++ ret = setxattr((char*)to_file, name, buffer, (size_t)size, 0);
++ if (ret < 0)
++ {
++ MSG_PUTS(_("Could not set security context "));
++ MSG_PUTS(name);
++ MSG_PUTS(_(" for "));
++ msg_outtrans(to_file);
++ msg_putchar('\n');
++ }
++ }
++ else
++ {
++ /* what reason of not having the attribute value? */
++ switch (errno)
++ {
++ case ENOTSUP:
++ /* extended attributes aren't supported or enabled */
++ /* should a message be echoed? not sure... */
++ return; /* leave because it isn't usefull to continue */
++
++ case ERANGE:
++ default:
++ /* no enough size OR unexpected error */
++ MSG_PUTS(_("Could not get security context "));
++ MSG_PUTS(name);
++ MSG_PUTS(_(" for "));
++ msg_outtrans(from_file);
++ MSG_PUTS(_(". Removing it!\n"));
++ /* FALLTHROUGH to remove the attribute */
++
++ case ENODATA:
++ /* no attribute of this name */
++ ret = removexattr((char*)to_file, name);
++ if (ret < 0 && errno != ENODATA)
++ {
++ MSG_PUTS(_("Could not remove security context "));
++ MSG_PUTS(name);
++ MSG_PUTS(_(" for "));
++ msg_outtrans(to_file);
++ msg_putchar('\n');
++ }
++ break;
++ }
++ }
++ }
++ }
++ #endif /* HAVE_SMACK */
++
+ /*
+ * Return a pointer to the ACL of file "fname" in allocated memory.
+ * Return NULL if the ACL is not available for whatever reason.
+*** ../vim-7.4.237/src/undo.c 2014-03-23 15:12:29.943264337 +0100
+--- src/undo.c 2014-04-02 13:42:15.387907078 +0200
+***************
+*** 1455,1461 ****
+ # endif
+ )
+ mch_setperm(file_name, (perm & 0707) | ((perm & 07) << 3));
+! # ifdef HAVE_SELINUX
+ if (buf->b_ffname != NULL)
+ mch_copy_sec(buf->b_ffname, file_name);
+ # endif
+--- 1455,1461 ----
+ # endif
+ )
+ mch_setperm(file_name, (perm & 0707) | ((perm & 07) << 3));
+! # if defined(HAVE_SELINUX) || defined(HAVE_SMACK)
+ if (buf->b_ffname != NULL)
+ mch_copy_sec(buf->b_ffname, file_name);
+ # endif
+*** ../vim-7.4.237/src/auto/configure 2014-03-27 18:51:06.612760919 +0100
+--- src/auto/configure 2014-04-02 13:50:11.375900531 +0200
+***************
+*** 782,787 ****
+--- 782,788 ----
+ with_view_name
+ with_global_runtime
+ with_modified_by
++ enable_smack
+ enable_selinux
+ with_features
+ with_compiledby
+***************
+*** 1453,1459 ****
+ --enable-fail-if-missing Fail if dependencies on additional features
+ specified on the command line are missing.
+ --disable-darwin Disable Darwin (Mac OS X) support.
+! --disable-selinux Don't check for SELinux support.
+ --disable-xsmp Disable XSMP session management
+ --disable-xsmp-interact Disable XSMP interaction
+ --enable-luainterp=OPTS Include Lua interpreter. default=no OPTS=no/yes/dynamic
+--- 1454,1461 ----
+ --enable-fail-if-missing Fail if dependencies on additional features
+ specified on the command line are missing.
+ --disable-darwin Disable Darwin (Mac OS X) support.
+! --disable-smack Do not check for Smack support.
+! --disable-selinux Do not check for SELinux support.
+ --disable-xsmp Disable XSMP session management
+ --disable-xsmp-interact Disable XSMP interaction
+ --enable-luainterp=OPTS Include Lua interpreter. default=no OPTS=no/yes/dynamic
+***************
+*** 4588,4606 ****
+
+
+
+! { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-selinux argument" >&5
+ $as_echo_n "checking --disable-selinux argument... " >&6; }
+! # Check whether --enable-selinux was given.
+ if test "${enable_selinux+set}" = set; then :
+ enableval=$enable_selinux;
+ else
+ enable_selinux="yes"
+ fi
+
+! if test "$enable_selinux" = "yes"; then
+! { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5
+ $as_echo_n "checking for is_selinux_enabled in -lselinux... " >&6; }
+ if ${ac_cv_lib_selinux_is_selinux_enabled+:} false; then :
+ $as_echo_n "(cached) " >&6
+--- 4590,4679 ----
+
+
+
+! { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-smack argument" >&5
+! $as_echo_n "checking --disable-smack argument... " >&6; }
+! # Check whether --enable-smack was given.
+! if test "${enable_smack+set}" = set; then :
+! enableval=$enable_smack;
+! else
+! enable_smack="yes"
+! fi
+!
+! if test "$enable_smack" = "yes"; then
+! ac_fn_c_check_header_mongrel "$LINENO" "linux/xattr.h" "ac_cv_header_linux_xattr_h" "$ac_includes_default"
+! if test "x$ac_cv_header_linux_xattr_h" = xyes; then :
+! true
+! else
+! enable_smack="no"
+! fi
+!
+!
+! fi
+! if test "$enable_smack" = "yes"; then
+! { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+! $as_echo "no" >&6; }
+! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for llistxattr in -lattr" >&5
+! $as_echo_n "checking for llistxattr in -lattr... " >&6; }
+! if ${ac_cv_lib_attr_llistxattr+:} false; then :
+! $as_echo_n "(cached) " >&6
+! else
+! ac_check_lib_save_LIBS=$LIBS
+! LIBS="-lattr $LIBS"
+! cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+! /* end confdefs.h. */
+!
+! /* Override any GCC internal prototype to avoid an error.
+! Use char because int might match the return type of a GCC
+! builtin and then its argument prototype would still apply. */
+! #ifdef __cplusplus
+! extern "C"
+! #endif
+! char llistxattr ();
+! int
+! main ()
+! {
+! return llistxattr ();
+! ;
+! return 0;
+! }
+! _ACEOF
+! if ac_fn_c_try_link "$LINENO"; then :
+! ac_cv_lib_attr_llistxattr=yes
+! else
+! ac_cv_lib_attr_llistxattr=no
+! fi
+! rm -f core conftest.err conftest.$ac_objext \
+! conftest$ac_exeext conftest.$ac_ext
+! LIBS=$ac_check_lib_save_LIBS
+! fi
+! { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_llistxattr" >&5
+! $as_echo "$ac_cv_lib_attr_llistxattr" >&6; }
+! if test "x$ac_cv_lib_attr_llistxattr" = xyes; then :
+! LIBS="$LIBS -lattr"
+! found_smack="yes"
+! $as_echo "#define HAVE_SMACK 1" >>confdefs.h
+!
+! fi
+!
+! else
+! { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+! $as_echo "yes" >&6; }
+! fi
+!
+! if test "x$found_smack" = "x"; then
+! { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-selinux argument" >&5
+ $as_echo_n "checking --disable-selinux argument... " >&6; }
+! # Check whether --enable-selinux was given.
+ if test "${enable_selinux+set}" = set; then :
+ enableval=$enable_selinux;
+ else
+ enable_selinux="yes"
+ fi
+
+! if test "$enable_selinux" = "yes"; then
+! { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5
+ $as_echo_n "checking for is_selinux_enabled in -lselinux... " >&6; }
+ if ${ac_cv_lib_selinux_is_selinux_enabled+:} false; then :
+ $as_echo_n "(cached) " >&6
+***************
+*** 4638,4650 ****
+ $as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; }
+ if test "x$ac_cv_lib_selinux_is_selinux_enabled" = xyes; then :
+ LIBS="$LIBS -lselinux"
+! $as_echo "#define HAVE_SELINUX 1" >>confdefs.h
+
+ fi
+
+! else
+! { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ fi
+
+
+--- 4711,4724 ----
+ $as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; }
+ if test "x$ac_cv_lib_selinux_is_selinux_enabled" = xyes; then :
+ LIBS="$LIBS -lselinux"
+! $as_echo "#define HAVE_SELINUX 1" >>confdefs.h
+
+ fi
+
+! else
+! { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
++ fi
+ fi
+
+
+*** ../vim-7.4.237/src/version.c 2014-04-02 12:12:04.163981514 +0200
+--- src/version.c 2014-04-02 13:38:22.511910282 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 238,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+25. You believe nothing looks sexier than a man in boxer shorts illuminated
+ only by a 17" inch svga monitor.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.239 b/patches/source/vim/patches/7.4.239
new file mode 100644
index 000000000..5943d69f9
--- /dev/null
+++ b/patches/source/vim/patches/7.4.239
@@ -0,0 +1,55 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.239
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.239
+Problem: ":e +" does not position cursor at end of the file.
+Solution: Check for "+" being the last character (ZyX)
+Files: src/ex_docmd.c
+
+
+*** ../vim-7.4.238/src/ex_docmd.c 2014-04-01 18:54:44.312837673 +0200
+--- src/ex_docmd.c 2014-04-02 14:18:02.247877546 +0200
+***************
+*** 4841,4847 ****
+ if (*arg == '+') /* +[command] */
+ {
+ ++arg;
+! if (vim_isspace(*arg))
+ command = dollar_command;
+ else
+ {
+--- 4841,4847 ----
+ if (*arg == '+') /* +[command] */
+ {
+ ++arg;
+! if (vim_isspace(*arg) || *arg == NUL)
+ command = dollar_command;
+ else
+ {
+*** ../vim-7.4.238/src/version.c 2014-04-02 14:05:34.003887839 +0200
+--- src/version.c 2014-04-02 14:17:40.923877840 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 239,
+ /**/
+
+--
+Q: What is the difference betwee open-source and commercial software?
+A: If you have a problem with commercial software you can call a phone
+ number and they will tell you it might be solved in a future version.
+ For open-source software there isn't a phone number to call, but you
+ get the solution within a day.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.240 b/patches/source/vim/patches/7.4.240
new file mode 100644
index 000000000..e51e2e620
--- /dev/null
+++ b/patches/source/vim/patches/7.4.240
@@ -0,0 +1,57 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.240
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.240
+Problem: ":tjump" shows "\n" as "\\n".
+Solution: Skip over "\" that escapes a backslash. (Gary Johnson)
+Files: src/tag.c
+
+
+*** ../vim-7.4.239/src/tag.c 2013-11-28 14:36:24.000000000 +0100
+--- src/tag.c 2014-04-02 17:14:27.087731943 +0200
+***************
+*** 741,748 ****
+ break;
+ msg_advance(15);
+
+! /* skip backslash used for escaping command char */
+! if (*p == '\\' && *(p + 1) == *tagp.command)
+ ++p;
+
+ if (*p == TAB)
+--- 741,750 ----
+ break;
+ msg_advance(15);
+
+! /* skip backslash used for escaping a command char or
+! * a backslash */
+! if (*p == '\\' && (*(p + 1) == *tagp.command
+! || *(p + 1) == '\\'))
+ ++p;
+
+ if (*p == TAB)
+*** ../vim-7.4.239/src/version.c 2014-04-02 14:22:00.123874274 +0200
+--- src/version.c 2014-04-02 17:15:26.395731128 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 240,
+ /**/
+
+--
+Anyone who is capable of getting themselves made President should on no
+account be allowed to do the job.
+ -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.241 b/patches/source/vim/patches/7.4.241
new file mode 100644
index 000000000..c7805c4c2
--- /dev/null
+++ b/patches/source/vim/patches/7.4.241
@@ -0,0 +1,386 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.241
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.241
+Problem: The string returned by submatch() does not distinguish between a
+ NL from a line break and a NL that stands for a NUL character.
+Solution: Add a second argument to return a list. (ZyX)
+Files: runtime/doc/eval.txt, src/eval.c, src/proto/regexp.pro,
+ src/regexp.c, src/testdir/test79.in, src/testdir/test79.ok,
+ src/testdir/test80.in, src/testdir/test80.ok
+
+
+*** ../vim-7.4.240/runtime/doc/eval.txt 2014-04-02 12:12:04.151981514 +0200
+--- runtime/doc/eval.txt 2014-04-02 17:56:51.163696948 +0200
+***************
+*** 1989,1995 ****
+ Number last index of {needle} in {haystack}
+ strtrans( {expr}) String translate string to make it printable
+ strwidth( {expr}) Number display cell length of the String {expr}
+! submatch( {nr}) String specific match in ":s" or substitute()
+ substitute( {expr}, {pat}, {sub}, {flags})
+ String all {pat} in {expr} replaced with {sub}
+ synID( {lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col}
+--- 1990,1997 ----
+ Number last index of {needle} in {haystack}
+ strtrans( {expr}) String translate string to make it printable
+ strwidth( {expr}) Number display cell length of the String {expr}
+! submatch( {nr}[, {list}]) String or List
+! specific match in ":s" or substitute()
+ substitute( {expr}, {pat}, {sub}, {flags})
+ String all {pat} in {expr} replaced with {sub}
+ synID( {lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col}
+***************
+*** 5784,5795 ****
+ Ambiguous, this function's return value depends on 'ambiwidth'.
+ Also see |strlen()|, |strdisplaywidth()| and |strchars()|.
+
+! submatch({nr}) *submatch()*
+ Only for an expression in a |:substitute| command or
+ substitute() function.
+ Returns the {nr}'th submatch of the matched text. When {nr}
+ is 0 the whole matched text is returned.
+ Also see |sub-replace-expression|.
+ Example: >
+ :s/\d\+/\=submatch(0) + 1/
+ < This finds the first number in the line and adds one to it.
+--- 5798,5820 ----
+ Ambiguous, this function's return value depends on 'ambiwidth'.
+ Also see |strlen()|, |strdisplaywidth()| and |strchars()|.
+
+! submatch({nr}[, {list}]) *submatch()*
+ Only for an expression in a |:substitute| command or
+ substitute() function.
+ Returns the {nr}'th submatch of the matched text. When {nr}
+ is 0 the whole matched text is returned.
++ Note that a NL in the string can stand for a line break of a
++ multi-line match or a NUL character in the text.
+ Also see |sub-replace-expression|.
++
++ If {list} is present and non-zero then submatch() returns
++ a list of strings, similar to |getline()| with two arguments.
++ NL characters in the text represent NUL characters in the
++ text.
++ Only returns more than one item for |:substitute|, inside
++ |substitute()| this list will always contain one or zero
++ items, since there are no real line breaks.
++
+ Example: >
+ :s/\d\+/\=submatch(0) + 1/
+ < This finds the first number in the line and adds one to it.
+*** ../vim-7.4.240/src/eval.c 2014-04-02 12:12:04.159981514 +0200
+--- src/eval.c 2014-04-02 18:16:33.011680690 +0200
+***************
+*** 8129,8135 ****
+ {"strridx", 2, 3, f_strridx},
+ {"strtrans", 1, 1, f_strtrans},
+ {"strwidth", 1, 1, f_strwidth},
+! {"submatch", 1, 1, f_submatch},
+ {"substitute", 4, 4, f_substitute},
+ {"synID", 3, 3, f_synID},
+ {"synIDattr", 2, 3, f_synIDattr},
+--- 8129,8135 ----
+ {"strridx", 2, 3, f_strridx},
+ {"strtrans", 1, 1, f_strtrans},
+ {"strwidth", 1, 1, f_strwidth},
+! {"submatch", 1, 2, f_submatch},
+ {"substitute", 4, 4, f_substitute},
+ {"synID", 3, 3, f_synID},
+ {"synIDattr", 2, 3, f_synIDattr},
+***************
+*** 17890,17898 ****
+ typval_T *argvars;
+ typval_T *rettv;
+ {
+! rettv->v_type = VAR_STRING;
+! rettv->vval.v_string =
+! reg_submatch((int)get_tv_number_chk(&argvars[0], NULL));
+ }
+
+ /*
+--- 17890,17921 ----
+ typval_T *argvars;
+ typval_T *rettv;
+ {
+! int error = FALSE;
+! char_u **match;
+! char_u **s;
+! listitem_T *li;
+! int no;
+! int retList = 0;
+!
+! no = (int)get_tv_number_chk(&argvars[0], &error);
+! if (error)
+! return;
+! error = FALSE;
+! if (argvars[1].v_type != VAR_UNKNOWN)
+! retList = get_tv_number_chk(&argvars[1], &error);
+! if (error)
+! return;
+!
+! if (retList == 0)
+! {
+! rettv->v_type = VAR_STRING;
+! rettv->vval.v_string = reg_submatch(no);
+! }
+! else
+! {
+! rettv->v_type = VAR_LIST;
+! rettv->vval.v_list = reg_submatch_list(no);
+! }
+ }
+
+ /*
+*** ../vim-7.4.240/src/proto/regexp.pro 2013-08-10 13:37:24.000000000 +0200
+--- src/proto/regexp.pro 2014-04-02 18:19:12.415678498 +0200
+***************
+*** 10,15 ****
+--- 10,16 ----
+ int vim_regsub __ARGS((regmatch_T *rmp, char_u *source, char_u *dest, int copy, int magic, int backslash));
+ int vim_regsub_multi __ARGS((regmmatch_T *rmp, linenr_T lnum, char_u *source, char_u *dest, int copy, int magic, int backslash));
+ char_u *reg_submatch __ARGS((int no));
++ list_T *reg_submatch_list __ARGS((int no));
+ regprog_T *vim_regcomp __ARGS((char_u *expr_arg, int re_flags));
+ void vim_regfree __ARGS((regprog_T *prog));
+ int vim_regexec __ARGS((regmatch_T *rmp, char_u *line, colnr_T col));
+*** ../vim-7.4.240/src/regexp.c 2014-03-23 15:12:29.931264336 +0100
+--- src/regexp.c 2014-04-02 18:59:34.431645181 +0200
+***************
+*** 7897,7902 ****
+--- 7897,7981 ----
+
+ return retval;
+ }
++
++ /*
++ * Used for the submatch() function with the optional non-zero argument: get
++ * the list of strings from the n'th submatch in allocated memory with NULs
++ * represented in NLs.
++ * Returns a list of allocated strings. Returns NULL when not in a ":s"
++ * command, for a non-existing submatch and for any error.
++ */
++ list_T *
++ reg_submatch_list(no)
++ int no;
++ {
++ char_u *s;
++ linenr_T slnum;
++ linenr_T elnum;
++ colnr_T scol;
++ colnr_T ecol;
++ int i;
++ list_T *list;
++ int error = FALSE;
++
++ if (!can_f_submatch || no < 0)
++ return NULL;
++
++ if (submatch_match == NULL)
++ {
++ slnum = submatch_mmatch->startpos[no].lnum;
++ elnum = submatch_mmatch->endpos[no].lnum;
++ if (slnum < 0 || elnum < 0)
++ return NULL;
++
++ scol = submatch_mmatch->startpos[no].col;
++ ecol = submatch_mmatch->endpos[no].col;
++
++ list = list_alloc();
++ if (list == NULL)
++ return NULL;
++
++ s = reg_getline_submatch(slnum) + scol;
++ if (slnum == elnum)
++ {
++ if (list_append_string(list, s, ecol - scol) == FAIL)
++ error = TRUE;
++ }
++ else
++ {
++ if (list_append_string(list, s, -1) == FAIL)
++ error = TRUE;
++ for (i = 1; i < elnum - slnum; i++)
++ {
++ s = reg_getline_submatch(slnum + i);
++ if (list_append_string(list, s, -1) == FAIL)
++ error = TRUE;
++ }
++ s = reg_getline_submatch(elnum);
++ if (list_append_string(list, s, ecol) == FAIL)
++ error = TRUE;
++ }
++ }
++ else
++ {
++ s = submatch_match->startp[no];
++ if (s == NULL || submatch_match->endp[no] == NULL)
++ return NULL;
++ list = list_alloc();
++ if (list == NULL)
++ return NULL;
++ if (list_append_string(list, s,
++ (int)(submatch_match->endp[no] - s)) == FAIL)
++ error = TRUE;
++ }
++
++ if (error)
++ {
++ list_free(list, TRUE);
++ return NULL;
++ }
++ return list;
++ }
+ #endif
+
+ static regengine_T bt_regengine =
+*** ../vim-7.4.240/src/testdir/test79.in 2013-04-13 11:16:38.000000000 +0200
+--- src/testdir/test79.in 2014-04-02 17:51:01.807701753 +0200
+***************
+*** 181,190 ****
+--- 181,192 ----
+ :set cpo&
+ /^TEST/
+ j:s/A\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)/\=submatch(0) . submatch(9) . submatch(8) . submatch(7) . submatch(6) . submatch(5) . submatch(4) . submatch(3) . submatch(2) . submatch(1)/
++ j:s/B\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)/\=string([submatch(0, 1), submatch(9, 1), submatch(8, 1), submatch(7, 1), submatch(6, 1), submatch(5, 1), submatch(4, 1), submatch(3, 1), submatch(2, 1), submatch(1, 1)])/
+ ENDTEST
+
+ TEST_5:
+ A123456789
++ B123456789
+
+ STARTTEST
+ :set magic&
+***************
+*** 209,214 ****
+--- 211,219 ----
+ /^TEST_7/
+ j:s/A./\=submatch(0)/
+ j:s/B./\=submatch(0)/
++ j:s/C./\=strtrans(string(submatch(0, 1)))/
++ j:s/D.\nD/\=strtrans(string(submatch(0, 1)))/
++ j:s/E\_.\{-}E/\=strtrans(string(submatch(0, 1)))/
+ /^Q$
+ :s/Q[^\n]Q/\=submatch(0)."foobar"/
+ :" Avoid :s error breaks dotest map on Windows.
+***************
+*** 217,226 ****
+--- 222,240 ----
+ TEST_7:
+ A A
+ B
++ C
++ D
++ D
++ E
++
++
++
++
+ Q
+ Q
+
+ STARTTEST
+ :g/^STARTTEST/.,/^ENDTEST/d
+ :1;/^Results/,$wq! test.out
++ :call getchar()
+ ENDTEST
+*** ../vim-7.4.240/src/testdir/test79.ok 2013-03-19 17:30:51.000000000 +0100
+--- src/testdir/test79.ok 2014-04-02 17:51:01.807701753 +0200
+***************
+*** 105,110 ****
+--- 105,111 ----
+
+ TEST_5:
+ A123456789987654321
++ [['B123456789'], ['9'], ['8'], ['7'], ['6'], ['5'], ['4'], ['3'], ['2'], ['1']]
+
+
+ TEST_6:
+***************
+*** 119,124 ****
+--- 120,128 ----
+ A
+ B
+ B
++ ['C^@']C
++ ['D^@', 'D']
++ ['E^@', '^@', '^@', '^@', '^@E']
+ Q
+ Q
+
+*** ../vim-7.4.240/src/testdir/test80.in 2014-01-23 20:09:29.523869260 +0100
+--- src/testdir/test80.in 2014-04-02 17:52:14.059700759 +0200
+***************
+*** 117,122 ****
+--- 117,123 ----
+ :set cpo&
+ :$put =\"\n\nTEST_5:\"
+ :$put =substitute('A123456789', 'A\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\=submatch(0) . submatch(9) . submatch(8) . submatch(7) . submatch(6) . submatch(5) . submatch(4) . submatch(3) . submatch(2) . submatch(1)', '')
++ :$put =substitute('A123456789', 'A\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\=string([submatch(0, 1), submatch(9, 1), submatch(8, 1), submatch(7, 1), submatch(6, 1), submatch(5, 1), submatch(4, 1), submatch(3, 1), submatch(2, 1), submatch(1, 1)])', '')
+ /^TEST_6
+ ENDTEST
+
+***************
+*** 142,147 ****
+--- 143,149 ----
+ :$put =\"\n\nTEST_7:\"
+ :$put =substitute('A A', 'A.', '\=submatch(0)', '')
+ :$put =substitute(\"B\nB\", 'B.', '\=submatch(0)', '')
++ :$put =substitute(\"B\nB\", 'B.', '\=string(submatch(0, 1))', '')
+ :$put =substitute('-bb', '\zeb', 'a', 'g')
+ :$put =substitute('-bb', '\ze', 'c', 'g')
+ /^TEST_8
+*** ../vim-7.4.240/src/testdir/test80.ok 2014-01-23 20:09:29.523869260 +0100
+--- src/testdir/test80.ok 2014-04-02 17:52:44.111700346 +0200
+***************
+*** 90,95 ****
+--- 90,96 ----
+
+ TEST_5:
+ A123456789987654321
++ [['A123456789'], ['9'], ['8'], ['7'], ['6'], ['5'], ['4'], ['3'], ['2'], ['1']]
+
+
+ TEST_6:
+***************
+*** 103,108 ****
+--- 104,111 ----
+ A A
+ B
+ B
++ ['B
++ ']B
+ -abab
+ c-cbcbc
+
+*** ../vim-7.4.240/src/version.c 2014-04-02 17:18:59.051728202 +0200
+--- src/version.c 2014-04-02 17:37:44.639712719 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 241,
+ /**/
+
+--
+Bypasses are devices that allow some people to dash from point A to
+point B very fast while other people dash from point B to point A very
+fast. People living at point C, being a point directly in between, are
+often given to wonder what's so great about point A that so many people
+from point B are so keen to get there and what's so great about point B
+that so many people from point A are so keen to get there. They often
+wish that people would just once and for all work out where the hell
+they wanted to be.
+ -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.242 b/patches/source/vim/patches/7.4.242
new file mode 100644
index 000000000..507687832
--- /dev/null
+++ b/patches/source/vim/patches/7.4.242
@@ -0,0 +1,520 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.242
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.242
+Problem: getreg() does not distinguish between a NL used for a line break
+ and a NL used for a NUL character.
+Solution: Add another argument to return a list. (ZyX)
+Files: runtime/doc/eval.txt, src/eval.c src/ops.c, src/proto/ops.pro,
+ src/vim.h, src/Makefile, src/testdir/test_eval.in,
+ src/testdir/test_eval.ok, src/testdir/Make_amiga.mak,
+ src/testdir/Make_dos.mak, src/testdir/Make_ming.mak,
+ src/testdir/Make_os2.mak, src/testdir/Make_vms.mms
+
+
+*** ../vim-7.4.241/runtime/doc/eval.txt 2014-04-02 19:00:53.035644100 +0200
+--- runtime/doc/eval.txt 2014-04-02 19:15:31.847632011 +0200
+***************
+*** 1818,1824 ****
+ getpid() Number process ID of Vim
+ getpos( {expr}) List position of cursor, mark, etc.
+ getqflist() List list of quickfix items
+! getreg( [{regname} [, 1]]) String contents of register
+ getregtype( [{regname}]) String type of register
+ gettabvar( {nr}, {varname} [, {def}])
+ any variable {varname} in tab {nr} or {def}
+--- 1819,1826 ----
+ getpid() Number process ID of Vim
+ getpos( {expr}) List position of cursor, mark, etc.
+ getqflist() List list of quickfix items
+! getreg( [{regname} [, 1 [, {list}]]])
+! String or List contents of register
+ getregtype( [{regname}]) String type of register
+ gettabvar( {nr}, {varname} [, {def}])
+ any variable {varname} in tab {nr} or {def}
+***************
+*** 3466,3472 ****
+ :endfor
+
+
+! getreg([{regname} [, 1]]) *getreg()*
+ The result is a String, which is the contents of register
+ {regname}. Example: >
+ :let cliptext = getreg('*')
+--- 3468,3474 ----
+ :endfor
+
+
+! getreg([{regname} [, 1 [, {list}]]]) *getreg()*
+ The result is a String, which is the contents of register
+ {regname}. Example: >
+ :let cliptext = getreg('*')
+***************
+*** 3475,3480 ****
+--- 3477,3487 ----
+ getreg('=', 1) returns the expression itself, so that it can
+ be restored with |setreg()|. For other registers the extra
+ argument is ignored, thus you can always give it.
++ If {list} is present and non-zero result type is changed to
++ |List|. Each list item is one text line. Use it if you care
++ about zero bytes possibly present inside register: without
++ third argument both NLs and zero bytes are represented as NLs
++ (see |NL-used-for-Nul|).
+ If {regname} is not specified, |v:register| is used.
+
+
+*** ../vim-7.4.241/src/eval.c 2014-04-02 19:00:53.043644100 +0200
+--- src/eval.c 2014-04-02 19:35:54.919615187 +0200
+***************
+*** 2458,2464 ****
+ p = get_tv_string_chk(tv);
+ if (p != NULL && op != NULL && *op == '.')
+ {
+! s = get_reg_contents(*arg == '@' ? '"' : *arg, TRUE, TRUE);
+ if (s != NULL)
+ {
+ p = ptofree = concat_str(s, p);
+--- 2458,2464 ----
+ p = get_tv_string_chk(tv);
+ if (p != NULL && op != NULL && *op == '.')
+ {
+! s = get_reg_contents(*arg == '@' ? '"' : *arg, GREG_EXPR_SRC);
+ if (s != NULL)
+ {
+ p = ptofree = concat_str(s, p);
+***************
+*** 5121,5127 ****
+ if (evaluate)
+ {
+ rettv->v_type = VAR_STRING;
+! rettv->vval.v_string = get_reg_contents(**arg, TRUE, TRUE);
+ }
+ if (**arg != NUL)
+ ++*arg;
+--- 5121,5128 ----
+ if (evaluate)
+ {
+ rettv->v_type = VAR_STRING;
+! rettv->vval.v_string = get_reg_contents(**arg,
+! GREG_EXPR_SRC);
+ }
+ if (**arg != NUL)
+ ++*arg;
+***************
+*** 7970,7976 ****
+ {"getpid", 0, 0, f_getpid},
+ {"getpos", 1, 1, f_getpos},
+ {"getqflist", 0, 0, f_getqflist},
+! {"getreg", 0, 2, f_getreg},
+ {"getregtype", 0, 1, f_getregtype},
+ {"gettabvar", 2, 3, f_gettabvar},
+ {"gettabwinvar", 3, 4, f_gettabwinvar},
+--- 7971,7977 ----
+ {"getpid", 0, 0, f_getpid},
+ {"getpos", 1, 1, f_getpos},
+ {"getqflist", 0, 0, f_getqflist},
+! {"getreg", 0, 3, f_getreg},
+ {"getregtype", 0, 1, f_getregtype},
+ {"gettabvar", 2, 3, f_gettabvar},
+ {"gettabwinvar", 3, 4, f_gettabwinvar},
+***************
+*** 11799,11804 ****
+--- 11800,11806 ----
+ char_u *strregname;
+ int regname;
+ int arg2 = FALSE;
++ int return_list = FALSE;
+ int error = FALSE;
+
+ if (argvars[0].v_type != VAR_UNKNOWN)
+***************
+*** 11806,11822 ****
+ strregname = get_tv_string_chk(&argvars[0]);
+ error = strregname == NULL;
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ arg2 = get_tv_number_chk(&argvars[1], &error);
+ }
+ else
+ strregname = vimvars[VV_REG].vv_str;
+ regname = (strregname == NULL ? '"' : *strregname);
+ if (regname == 0)
+ regname = '"';
+
+! rettv->v_type = VAR_STRING;
+! rettv->vval.v_string = error ? NULL :
+! get_reg_contents(regname, TRUE, arg2);
+ }
+
+ /*
+--- 11808,11841 ----
+ strregname = get_tv_string_chk(&argvars[0]);
+ error = strregname == NULL;
+ if (argvars[1].v_type != VAR_UNKNOWN)
++ {
+ arg2 = get_tv_number_chk(&argvars[1], &error);
++ if (!error && argvars[2].v_type != VAR_UNKNOWN)
++ return_list = get_tv_number_chk(&argvars[2], &error);
++ }
+ }
+ else
+ strregname = vimvars[VV_REG].vv_str;
++
++ if (error)
++ return;
++
+ regname = (strregname == NULL ? '"' : *strregname);
+ if (regname == 0)
+ regname = '"';
+
+! if (return_list)
+! {
+! rettv->v_type = VAR_LIST;
+! rettv->vval.v_list = (list_T *)get_reg_contents(regname,
+! (arg2 ? GREG_EXPR_SRC : 0) | GREG_LIST);
+! }
+! else
+! {
+! rettv->v_type = VAR_STRING;
+! rettv->vval.v_string = get_reg_contents(regname,
+! arg2 ? GREG_EXPR_SRC : 0);
+! }
+ }
+
+ /*
+***************
+*** 17891,17899 ****
+ typval_T *rettv;
+ {
+ int error = FALSE;
+- char_u **match;
+- char_u **s;
+- listitem_T *li;
+ int no;
+ int retList = 0;
+
+--- 17910,17915 ----
+*** ../vim-7.4.241/src/ops.c 2014-03-23 15:12:29.931264336 +0100
+--- src/ops.c 2014-04-02 19:36:08.831614995 +0200
+***************
+*** 6166,6181 ****
+ return MAUTO;
+ }
+
+ /*
+ * Return the contents of a register as a single allocated string.
+ * Used for "@r" in expressions and for getreg().
+ * Returns NULL for error.
+ */
+ char_u *
+! get_reg_contents(regname, allowexpr, expr_src)
+ int regname;
+! int allowexpr; /* allow "=" register */
+! int expr_src; /* get expression for "=" register */
+ {
+ long i;
+ char_u *retval;
+--- 6166,6214 ----
+ return MAUTO;
+ }
+
++ static char_u *getreg_wrap_one_line __ARGS((char_u *s, int flags));
++
++ /*
++ * When "flags" has GREG_LIST return a list with text "s".
++ * Otherwise just return "s".
++ */
++ static char_u *
++ getreg_wrap_one_line(s, flags)
++ char_u *s;
++ int flags;
++ {
++ if (flags & GREG_LIST)
++ {
++ list_T *list = list_alloc();
++
++ if (list != NULL)
++ {
++ if (list_append_string(list, NULL, -1) == FAIL)
++ {
++ list_free(list, TRUE);
++ return NULL;
++ }
++ list->lv_first->li_tv.vval.v_string = s;
++ }
++ return (char_u *)list;
++ }
++ return s;
++ }
++
+ /*
+ * Return the contents of a register as a single allocated string.
+ * Used for "@r" in expressions and for getreg().
+ * Returns NULL for error.
++ * Flags:
++ * GREG_NO_EXPR Do not allow expression register
++ * GREG_EXPR_SRC For the expression register: return expression itself,
++ * not the result of its evaluation.
++ * GREG_LIST Return a list of lines in place of a single string.
+ */
+ char_u *
+! get_reg_contents(regname, flags)
+ int regname;
+! int flags;
+ {
+ long i;
+ char_u *retval;
+***************
+*** 6185,6197 ****
+ /* Don't allow using an expression register inside an expression */
+ if (regname == '=')
+ {
+! if (allowexpr)
+! {
+! if (expr_src)
+! return get_expr_line_src();
+! return get_expr_line();
+! }
+! return NULL;
+ }
+
+ if (regname == '@') /* "@@" is used for unnamed register */
+--- 6218,6228 ----
+ /* Don't allow using an expression register inside an expression */
+ if (regname == '=')
+ {
+! if (flags & GREG_NO_EXPR)
+! return NULL;
+! if (flags & GREG_EXPR_SRC)
+! return getreg_wrap_one_line(get_expr_line_src(), flags);
+! return getreg_wrap_one_line(get_expr_line(), flags);
+ }
+
+ if (regname == '@') /* "@@" is used for unnamed register */
+***************
+*** 6209,6223 ****
+ {
+ if (retval == NULL)
+ return NULL;
+! if (!allocated)
+! retval = vim_strsave(retval);
+! return retval;
+ }
+
+ get_yank_register(regname, FALSE);
+ if (y_current->y_array == NULL)
+ return NULL;
+
+ /*
+ * Compute length of resulting string.
+ */
+--- 6240,6272 ----
+ {
+ if (retval == NULL)
+ return NULL;
+! if (allocated)
+! return getreg_wrap_one_line(retval, flags);
+! return getreg_wrap_one_line(vim_strsave(retval), flags);
+ }
+
+ get_yank_register(regname, FALSE);
+ if (y_current->y_array == NULL)
+ return NULL;
+
++ if (flags & GREG_LIST)
++ {
++ list_T *list = list_alloc();
++ int error = FALSE;
++
++ if (list == NULL)
++ return NULL;
++ for (i = 0; i < y_current->y_size; ++i)
++ if (list_append_string(list, y_current->y_array[i], -1) == FAIL)
++ error = TRUE;
++ if (error)
++ {
++ list_free(list, TRUE);
++ return NULL;
++ }
++ return (char_u *)list;
++ }
++
+ /*
+ * Compute length of resulting string.
+ */
+*** ../vim-7.4.241/src/proto/ops.pro 2013-08-10 13:37:22.000000000 +0200
+--- src/proto/ops.pro 2014-04-02 19:17:22.407630490 +0200
+***************
+*** 53,59 ****
+ int clip_convert_selection __ARGS((char_u **str, long_u *len, VimClipboard *cbd));
+ void dnd_yank_drag_data __ARGS((char_u *str, long len));
+ char_u get_reg_type __ARGS((int regname, long *reglen));
+! char_u *get_reg_contents __ARGS((int regname, int allowexpr, int expr_src));
+ void write_reg_contents __ARGS((int name, char_u *str, int maxlen, int must_append));
+ void write_reg_contents_ex __ARGS((int name, char_u *str, int maxlen, int must_append, int yank_type, long block_len));
+ void clear_oparg __ARGS((oparg_T *oap));
+--- 53,59 ----
+ int clip_convert_selection __ARGS((char_u **str, long_u *len, VimClipboard *cbd));
+ void dnd_yank_drag_data __ARGS((char_u *str, long len));
+ char_u get_reg_type __ARGS((int regname, long *reglen));
+! char_u *get_reg_contents __ARGS((int regname, int flags));
+ void write_reg_contents __ARGS((int name, char_u *str, int maxlen, int must_append));
+ void write_reg_contents_ex __ARGS((int name, char_u *str, int maxlen, int must_append, int yank_type, long block_len));
+ void clear_oparg __ARGS((oparg_T *oap));
+*** ../vim-7.4.241/src/vim.h 2014-04-01 19:55:46.252787300 +0200
+--- src/vim.h 2014-04-02 19:17:22.407630490 +0200
+***************
+*** 2259,2264 ****
+--- 2259,2269 ----
+ #define SREQ_WIN 1 /* Request window-local option */
+ #define SREQ_BUF 2 /* Request buffer-local option */
+
++ /* Flags for get_reg_contents */
++ #define GREG_NO_EXPR 1 /* Do not allow expression register */
++ #define GREG_EXPR_SRC 2 /* Return expression itself for "=" register */
++ #define GREG_LIST 4 /* Return list */
++
+ /* Character used as separated in autoload function/variable names. */
+ #define AUTOLOAD_CHAR '#'
+
+*** ../vim-7.4.241/src/Makefile 2014-04-01 14:08:14.685074130 +0200
+--- src/Makefile 2014-04-02 19:42:21.931609863 +0200
+***************
+*** 1880,1885 ****
+--- 1880,1886 ----
+
+ # Run individual test, assuming that Vim was already compiled.
+ test1 test2 test3 test4 test5 test6 test7 test8 test9 \
++ test_eval \
+ test_options \
+ test10 test11 test12 test13 test14 test15 test16 test17 test18 test19 \
+ test20 test21 test22 test23 test24 test25 test26 test27 test28 test29 \
+*** ../vim-7.4.241/src/testdir/test_eval.in 2014-04-02 19:51:32.391602291 +0200
+--- src/testdir/test_eval.in 2014-04-02 19:47:13.607605851 +0200
+***************
+*** 0 ****
+--- 1,21 ----
++ Test for various eval features.
++
++ STARTTEST
++ :so small.vim
++ :"
++ :" test getreg()
++ /^one
++ "ay3j:$put =string(getreg('a'))
++ :$put =string(getreg('a', 1, 1))
++ :"
++ :/^result/,$w! test.out
++ :qa!
++ ENDTEST
++
++ one
++ two
++ three
++ four
++ five
++
++ result
+*** ../vim-7.4.241/src/testdir/test_eval.ok 2014-04-02 19:51:32.399602291 +0200
+--- src/testdir/test_eval.ok 2014-04-02 19:48:51.595604503 +0200
+***************
+*** 0 ****
+--- 1,7 ----
++ result
++ 'one
++ two
++ three
++ four
++ '
++ ['one', 'two', 'three', 'four']
+*** ../vim-7.4.241/src/testdir/Make_amiga.mak 2014-04-01 14:08:14.685074130 +0200
+--- src/testdir/Make_amiga.mak 2014-04-02 19:41:24.331610655 +0200
+***************
+*** 36,41 ****
+--- 36,42 ----
+ test94.out test95.out test96.out test97.out test98.out \
+ test99.out test100.out test101.out test102.out test103.out \
+ test104.out test105.out test106.out \
++ test_eval.out \
+ test_options.out
+
+ .SUFFIXES: .in .out
+***************
+*** 159,162 ****
+--- 160,164 ----
+ test104.out: test104.in
+ test105.out: test105.in
+ test106.out: test106.in
++ test_eval.out: test_eval.in
+ test_options.out: test_options.in
+*** ../vim-7.4.241/src/testdir/Make_dos.mak 2014-04-01 14:08:14.685074130 +0200
+--- src/testdir/Make_dos.mak 2014-04-02 19:41:34.419610516 +0200
+***************
+*** 35,40 ****
+--- 35,41 ----
+ test94.out test95.out test96.out test98.out test99.out \
+ test100.out test101.out test102.out test103.out test104.out \
+ test105.out test106.out \
++ test_eval.out \
+ test_options.out
+
+ SCRIPTS32 = test50.out test70.out
+*** ../vim-7.4.241/src/testdir/Make_ming.mak 2014-04-01 14:08:14.685074130 +0200
+--- src/testdir/Make_ming.mak 2014-04-02 19:41:43.131610397 +0200
+***************
+*** 55,60 ****
+--- 55,61 ----
+ test94.out test95.out test96.out test98.out test99.out \
+ test100.out test101.out test102.out test103.out test104.out \
+ test105.out test106.out \
++ test_eval.out \
+ test_options.out
+
+ SCRIPTS32 = test50.out test70.out
+*** ../vim-7.4.241/src/testdir/Make_os2.mak 2014-04-01 14:08:14.685074130 +0200
+--- src/testdir/Make_os2.mak 2014-04-02 19:41:50.659610293 +0200
+***************
+*** 37,42 ****
+--- 37,43 ----
+ test94.out test95.out test96.out test98.out test99.out \
+ test100.out test101.out test102.out test103.out test104.out \
+ test105.out test106.out \
++ test_eval.out \
+ test_options.out
+
+ .SUFFIXES: .in .out
+*** ../vim-7.4.241/src/testdir/Make_vms.mms 2014-04-01 14:08:14.689074130 +0200
+--- src/testdir/Make_vms.mms 2014-04-02 19:41:58.971610179 +0200
+***************
+*** 96,101 ****
+--- 96,102 ----
+ test95.out test96.out test98.out test99.out \
+ test100.out test101.out test103.out test104.out \
+ test105.out test106.out \
++ test_eval.out \
+ test_options.out
+
+ # Known problems:
+*** ../vim-7.4.241/src/version.c 2014-04-02 19:00:53.047644099 +0200
+--- src/version.c 2014-04-02 19:46:41.867606287 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 242,
+ /**/
+
+--
+Don't Panic!
+ -- The Hitchhiker's Guide to the Galaxy
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.243 b/patches/source/vim/patches/7.4.243
new file mode 100644
index 000000000..77eff1e69
--- /dev/null
+++ b/patches/source/vim/patches/7.4.243
@@ -0,0 +1,1109 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.243
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.243
+Problem: Cannot use setreg() to add text that includes a NUL.
+Solution: Make setreg() accept a list.
+Files: runtime/doc/eval.txt, src/eval.c, src/ops.c, src/proto/ops.pro,
+ src/testdir/test_eval.in, src/testdir/test_eval.ok
+
+
+*** ../vim-7.4.242/runtime/doc/eval.txt 2014-04-02 19:54:58.263599459 +0200
+--- runtime/doc/eval.txt 2014-04-02 22:06:58.855490505 +0200
+***************
+*** 5355,5360 ****
+--- 5368,5375 ----
+ *setreg()*
+ setreg({regname}, {value} [,{options}])
+ Set the register {regname} to {value}.
++ {value} may be any value returned by |getreg()|, including
++ a |List|.
+ If {options} contains "a" or {regname} is upper case,
+ then the value is appended.
+ {options} can also contain a register type specification:
+***************
+*** 5367,5376 ****
+ in the longest line (counting a <Tab> as 1 character).
+
+ If {options} contains no register settings, then the default
+! is to use character mode unless {value} ends in a <NL>.
+! Setting the '=' register is not possible, but you can use >
+! :let @= = var_expr
+! < Returns zero for success, non-zero for failure.
+
+ Examples: >
+ :call setreg(v:register, @*)
+--- 5382,5396 ----
+ in the longest line (counting a <Tab> as 1 character).
+
+ If {options} contains no register settings, then the default
+! is to use character mode unless {value} ends in a <NL> for
+! string {value} and linewise mode for list {value}. Blockwise
+! mode is never selected automatically.
+! Returns zero for success, non-zero for failure.
+!
+! *E883*
+! Note: you may not use |List| containing more then one item to
+! set search and expression registers. Lists containing no
+! items act like empty strings.
+
+ Examples: >
+ :call setreg(v:register, @*)
+***************
+*** 5378,5385 ****
+ :call setreg('a', "1\n2\n3", 'b5')
+
+ < This example shows using the functions to save and restore a
+! register. >
+! :let var_a = getreg('a', 1)
+ :let var_amode = getregtype('a')
+ ....
+ :call setreg('a', var_a, var_amode)
+--- 5398,5408 ----
+ :call setreg('a', "1\n2\n3", 'b5')
+
+ < This example shows using the functions to save and restore a
+! register (note: you may not reliably restore register value
+! without using the third argument to |getreg()| as without it
+! newlines are represented as newlines AND Nul bytes are
+! represented as newlines as well, see |NL-used-for-Nul|). >
+! :let var_a = getreg('a', 1, 1)
+ :let var_amode = getregtype('a')
+ ....
+ :call setreg('a', var_a, var_amode)
+*** ../vim-7.4.242/src/eval.c 2014-04-02 19:54:58.275599459 +0200
+--- src/eval.c 2014-04-02 22:09:25.279488491 +0200
+***************
+*** 16790,16797 ****
+ regname = *strregname;
+ if (regname == 0 || regname == '@')
+ regname = '"';
+- else if (regname == '=')
+- return;
+
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+--- 16790,16795 ----
+***************
+*** 16822,16831 ****
+ }
+ }
+
+! strval = get_tv_string_chk(&argvars[1]);
+! if (strval != NULL)
+ write_reg_contents_ex(regname, strval, -1,
+ append, yank_type, block_len);
+ rettv->vval.v_number = 0;
+ }
+
+--- 16820,16863 ----
+ }
+ }
+
+! if (argvars[1].v_type == VAR_LIST)
+! {
+! char_u **lstval;
+! char_u **curval;
+! int len = argvars[1].vval.v_list->lv_len;
+! listitem_T *li;
+!
+! lstval = (char_u **)alloc(sizeof(char_u *) * (len + 1));
+! if (lstval == NULL)
+! return;
+! curval = lstval;
+!
+! for (li = argvars[1].vval.v_list->lv_first; li != NULL;
+! li = li->li_next)
+! {
+! /* TODO: this may use a static buffer several times. */
+! strval = get_tv_string_chk(&li->li_tv);
+! if (strval == NULL)
+! {
+! vim_free(lstval);
+! return;
+! }
+! *curval++ = strval;
+! }
+! *curval++ = NULL;
+!
+! write_reg_contents_lst(regname, lstval, -1,
+! append, yank_type, block_len);
+! vim_free(lstval);
+! }
+! else
+! {
+! strval = get_tv_string_chk(&argvars[1]);
+! if (strval == NULL)
+! return;
+ write_reg_contents_ex(regname, strval, -1,
+ append, yank_type, block_len);
++ }
+ rettv->vval.v_number = 0;
+ }
+
+*** ../vim-7.4.242/src/ops.c 2014-04-02 19:54:58.275599459 +0200
+--- src/ops.c 2014-04-02 22:06:46.499490675 +0200
+***************
+*** 113,119 ****
+ #endif
+ static void block_prep __ARGS((oparg_T *oap, struct block_def *, linenr_T, int));
+ #if defined(FEAT_CLIPBOARD) || defined(FEAT_EVAL)
+! static void str_to_reg __ARGS((struct yankreg *y_ptr, int type, char_u *str, long len, long blocklen));
+ #endif
+ static int ends_in_white __ARGS((linenr_T lnum));
+ #ifdef FEAT_COMMENTS
+--- 113,119 ----
+ #endif
+ static void block_prep __ARGS((oparg_T *oap, struct block_def *, linenr_T, int));
+ #if defined(FEAT_CLIPBOARD) || defined(FEAT_EVAL)
+! static void str_to_reg __ARGS((struct yankreg *y_ptr, int type, char_u *str, long len, long blocklen, int str_list));
+ #endif
+ static int ends_in_white __ARGS((linenr_T lnum));
+ #ifdef FEAT_COMMENTS
+***************
+*** 6005,6011 ****
+
+ clip_free_selection(cbd);
+
+! str_to_reg(y_ptr, type, str, len, 0L);
+ }
+
+ /*
+--- 6005,6011 ----
+
+ clip_free_selection(cbd);
+
+! str_to_reg(y_ptr, type, str, len, 0L, FALSE);
+ }
+
+ /*
+***************
+*** 6113,6119 ****
+ curr = y_current;
+ y_current = &y_regs[TILDE_REGISTER];
+ free_yank_all();
+! str_to_reg(y_current, MCHAR, str, len, 0L);
+ y_current = curr;
+ }
+ #endif
+--- 6113,6119 ----
+ curr = y_current;
+ y_current = &y_regs[TILDE_REGISTER];
+ free_yank_all();
+! str_to_reg(y_current, MCHAR, str, len, 0L, FALSE);
+ y_current = curr;
+ }
+ #endif
+***************
+*** 6308,6313 ****
+--- 6308,6354 ----
+ return retval;
+ }
+
++ static int
++ init_write_reg(name, old_y_previous, old_y_current, must_append, yank_type)
++ int name;
++ struct yankreg **old_y_previous;
++ struct yankreg **old_y_current;
++ int must_append;
++ int *yank_type UNUSED;
++ {
++ if (!valid_yank_reg(name, TRUE)) /* check for valid reg name */
++ {
++ emsg_invreg(name);
++ return FAIL;
++ }
++
++ /* Don't want to change the current (unnamed) register */
++ *old_y_previous = y_previous;
++ *old_y_current = y_current;
++
++ get_yank_register(name, TRUE);
++ if (!y_append && !must_append)
++ free_yank_all();
++ return OK;
++ }
++
++ static void
++ finish_write_reg(name, old_y_previous, old_y_current)
++ int name;
++ struct yankreg *old_y_previous;
++ struct yankreg *old_y_current;
++ {
++ # ifdef FEAT_CLIPBOARD
++ /* Send text of clipboard register to the clipboard. */
++ may_set_selection();
++ # endif
++
++ /* ':let @" = "val"' should change the meaning of the "" register */
++ if (name != '"')
++ y_previous = old_y_previous;
++ y_current = old_y_current;
++ }
++
+ /*
+ * Store string "str" in register "name".
+ * "maxlen" is the maximum number of bytes to use, -1 for all bytes.
+***************
+*** 6328,6333 ****
+--- 6369,6419 ----
+ }
+
+ void
++ write_reg_contents_lst(name, strings, maxlen, must_append, yank_type, block_len)
++ int name;
++ char_u **strings;
++ int maxlen UNUSED;
++ int must_append;
++ int yank_type;
++ long block_len;
++ {
++ struct yankreg *old_y_previous, *old_y_current;
++
++ if (name == '/'
++ #ifdef FEAT_EVAL
++ || name == '='
++ #endif
++ )
++ {
++ char_u *s;
++
++ if (strings[0] == NULL)
++ s = (char_u *)"";
++ else if (strings[1] != NULL)
++ {
++ EMSG(_("E883: search pattern and expression register may not "
++ "contain two or more lines"));
++ return;
++ }
++ else
++ s = strings[0];
++ write_reg_contents_ex(name, s, -1, must_append, yank_type, block_len);
++ return;
++ }
++
++ if (name == '_') /* black hole: nothing to do */
++ return;
++
++ if (init_write_reg(name, &old_y_previous, &old_y_current, must_append,
++ &yank_type) == FAIL)
++ return;
++
++ str_to_reg(y_current, yank_type, (char_u *) strings, -1, block_len, TRUE);
++
++ finish_write_reg(name, old_y_previous, old_y_current);
++ }
++
++ void
+ write_reg_contents_ex(name, str, maxlen, must_append, yank_type, block_len)
+ int name;
+ char_u *str;
+***************
+*** 6364,6403 ****
+ s = concat_str(get_expr_line_src(), p);
+ vim_free(p);
+ p = s;
+-
+ }
+ set_expr_line(p);
+ return;
+ }
+ #endif
+
+- if (!valid_yank_reg(name, TRUE)) /* check for valid reg name */
+- {
+- emsg_invreg(name);
+- return;
+- }
+-
+ if (name == '_') /* black hole: nothing to do */
+ return;
+
+! /* Don't want to change the current (unnamed) register */
+! old_y_previous = y_previous;
+! old_y_current = y_current;
+!
+! get_yank_register(name, TRUE);
+! if (!y_append && !must_append)
+! free_yank_all();
+! str_to_reg(y_current, yank_type, str, len, block_len);
+
+! # ifdef FEAT_CLIPBOARD
+! /* Send text of clipboard register to the clipboard. */
+! may_set_selection();
+! # endif
+
+! /* ':let @" = "val"' should change the meaning of the "" register */
+! if (name != '"')
+! y_previous = old_y_previous;
+! y_current = old_y_current;
+ }
+ #endif /* FEAT_EVAL */
+
+--- 6450,6471 ----
+ s = concat_str(get_expr_line_src(), p);
+ vim_free(p);
+ p = s;
+ }
+ set_expr_line(p);
+ return;
+ }
+ #endif
+
+ if (name == '_') /* black hole: nothing to do */
+ return;
+
+! if (init_write_reg(name, &old_y_previous, &old_y_current, must_append,
+! &yank_type) == FAIL)
+! return;
+
+! str_to_reg(y_current, yank_type, str, len, block_len, FALSE);
+
+! finish_write_reg(name, old_y_previous, old_y_current);
+ }
+ #endif /* FEAT_EVAL */
+
+***************
+*** 6407,6418 ****
+ * is appended.
+ */
+ static void
+! str_to_reg(y_ptr, yank_type, str, len, blocklen)
+ struct yankreg *y_ptr; /* pointer to yank register */
+ int yank_type; /* MCHAR, MLINE, MBLOCK, MAUTO */
+ char_u *str; /* string to put in register */
+ long len; /* length of string */
+ long blocklen; /* width of Visual block */
+ {
+ int type; /* MCHAR, MLINE or MBLOCK */
+ int lnum;
+--- 6475,6487 ----
+ * is appended.
+ */
+ static void
+! str_to_reg(y_ptr, yank_type, str, len, blocklen, str_list)
+ struct yankreg *y_ptr; /* pointer to yank register */
+ int yank_type; /* MCHAR, MLINE, MBLOCK, MAUTO */
+ char_u *str; /* string to put in register */
+ long len; /* length of string */
+ long blocklen; /* width of Visual block */
++ int str_list; /* TRUE if str is char_u ** */
+ {
+ int type; /* MCHAR, MLINE or MBLOCK */
+ int lnum;
+***************
+*** 6423,6428 ****
+--- 6492,6498 ----
+ int extraline = 0; /* extra line at the end */
+ int append = FALSE; /* append to last line in register */
+ char_u *s;
++ char_u **ss;
+ char_u **pp;
+ long maxlen;
+
+***************
+*** 6430,6436 ****
+ y_ptr->y_size = 0;
+
+ if (yank_type == MAUTO)
+! type = ((len > 0 && (str[len - 1] == NL || str[len - 1] == CAR))
+ ? MLINE : MCHAR);
+ else
+ type = yank_type;
+--- 6500,6507 ----
+ y_ptr->y_size = 0;
+
+ if (yank_type == MAUTO)
+! type = ((str_list || (len > 0 && (str[len - 1] == NL
+! || str[len - 1] == CAR)))
+ ? MLINE : MCHAR);
+ else
+ type = yank_type;
+***************
+*** 6439,6456 ****
+ * Count the number of lines within the string
+ */
+ newlines = 0;
+! for (i = 0; i < len; i++)
+! if (str[i] == '\n')
+! ++newlines;
+! if (type == MCHAR || len == 0 || str[len - 1] != '\n')
+ {
+! extraline = 1;
+! ++newlines; /* count extra newline at the end */
+ }
+! if (y_ptr->y_size > 0 && y_ptr->y_type == MCHAR)
+ {
+! append = TRUE;
+! --newlines; /* uncount newline when appending first line */
+ }
+
+ /*
+--- 6510,6535 ----
+ * Count the number of lines within the string
+ */
+ newlines = 0;
+! if (str_list)
+ {
+! for (ss = (char_u **) str; *ss != NULL; ++ss)
+! ++newlines;
+ }
+! else
+ {
+! for (i = 0; i < len; i++)
+! if (str[i] == '\n')
+! ++newlines;
+! if (type == MCHAR || len == 0 || str[len - 1] != '\n')
+! {
+! extraline = 1;
+! ++newlines; /* count extra newline at the end */
+! }
+! if (y_ptr->y_size > 0 && y_ptr->y_type == MCHAR)
+! {
+! append = TRUE;
+! --newlines; /* uncount newline when appending first line */
+! }
+ }
+
+ /*
+***************
+*** 6470,6509 ****
+ /*
+ * Find the end of each line and save it into the array.
+ */
+! for (start = 0; start < len + extraline; start += i + 1)
+ {
+! for (i = start; i < len; ++i) /* find the end of the line */
+! if (str[i] == '\n')
+! break;
+! i -= start; /* i is now length of line */
+! if (i > maxlen)
+! maxlen = i;
+! if (append)
+ {
+! --lnum;
+! extra = (int)STRLEN(y_ptr->y_array[lnum]);
+ }
+! else
+! extra = 0;
+! s = alloc((unsigned)(i + extra + 1));
+! if (s == NULL)
+! break;
+! if (extra)
+! mch_memmove(s, y_ptr->y_array[lnum], (size_t)extra);
+! if (append)
+! vim_free(y_ptr->y_array[lnum]);
+! if (i)
+! mch_memmove(s + extra, str + start, (size_t)i);
+! extra += i;
+! s[extra] = NUL;
+! y_ptr->y_array[lnum++] = s;
+! while (--extra >= 0)
+! {
+! if (*s == NUL)
+! *s = '\n'; /* replace NUL with newline */
+! ++s;
+ }
+- append = FALSE; /* only first line is appended */
+ }
+ y_ptr->y_type = type;
+ y_ptr->y_size = lnum;
+--- 6549,6601 ----
+ /*
+ * Find the end of each line and save it into the array.
+ */
+! if (str_list)
+ {
+! for (ss = (char_u **) str; *ss != NULL; ++ss, ++lnum)
+ {
+! i = STRLEN(*ss);
+! pp[lnum] = vim_strnsave(*ss, i);
+! if (i > maxlen)
+! maxlen = i;
+ }
+! }
+! else
+! {
+! for (start = 0; start < len + extraline; start += i + 1)
+! {
+! for (i = start; i < len; ++i) /* find the end of the line */
+! if (str[i] == '\n')
+! break;
+! i -= start; /* i is now length of line */
+! if (i > maxlen)
+! maxlen = i;
+! if (append)
+! {
+! --lnum;
+! extra = (int)STRLEN(y_ptr->y_array[lnum]);
+! }
+! else
+! extra = 0;
+! s = alloc((unsigned)(i + extra + 1));
+! if (s == NULL)
+! break;
+! if (extra)
+! mch_memmove(s, y_ptr->y_array[lnum], (size_t)extra);
+! if (append)
+! vim_free(y_ptr->y_array[lnum]);
+! if (i)
+! mch_memmove(s + extra, str + start, (size_t)i);
+! extra += i;
+! s[extra] = NUL;
+! y_ptr->y_array[lnum++] = s;
+! while (--extra >= 0)
+! {
+! if (*s == NUL)
+! *s = '\n'; /* replace NUL with newline */
+! ++s;
+! }
+! append = FALSE; /* only first line is appended */
+ }
+ }
+ y_ptr->y_type = type;
+ y_ptr->y_size = lnum;
+*** ../vim-7.4.242/src/proto/ops.pro 2014-04-02 19:54:58.275599459 +0200
+--- src/proto/ops.pro 2014-04-02 21:33:48.679517881 +0200
+***************
+*** 56,61 ****
+--- 56,62 ----
+ char_u *get_reg_contents __ARGS((int regname, int flags));
+ void write_reg_contents __ARGS((int name, char_u *str, int maxlen, int must_append));
+ void write_reg_contents_ex __ARGS((int name, char_u *str, int maxlen, int must_append, int yank_type, long block_len));
++ void write_reg_contents_lst __ARGS((int name, char_u **strings, int maxlen, int must_append, int yank_type, long block_len));
+ void clear_oparg __ARGS((oparg_T *oap));
+ void cursor_pos_info __ARGS((void));
+ /* vim: set ft=c : */
+*** ../vim-7.4.242/src/testdir/test_eval.in 2014-04-02 19:54:58.275599459 +0200
+--- src/testdir/test_eval.in 2014-04-02 21:35:26.683516533 +0200
+***************
+*** 1,21 ****
+! Test for various eval features.
+
+ STARTTEST
+ :so small.vim
+ :"
+! :" test getreg()
+! /^one
+! "ay3j:$put =string(getreg('a'))
+! :$put =string(getreg('a', 1, 1))
+ :"
+! :/^result/,$w! test.out
+! :qa!
+ ENDTEST
+
+! one
+! two
+! three
+! four
+! five
+!
+! result
+--- 1,150 ----
+! Test for various eval features. vim: set ft=vim :
+!
+! Note: system clipboard support is not tested. I do not think anybody will thank
+! me for messing with clipboard.
+
+ STARTTEST
+ :so small.vim
++ :set encoding=latin1
++ :set noswapfile
++ :lang C
++ :fun AppendRegContents(reg)
++ call append('$', printf('%s: type %s; value: %s (%s), expr: %s (%s)', a:reg, getregtype(a:reg), getreg(a:reg), string(getreg(a:reg, 0, 1)), getreg(a:reg, 1), string(getreg(a:reg, 1, 1))))
++ endfun
++ :command -nargs=? AR :call AppendRegContents(<q-args>)
++ :fun SetReg(...)
++ call call('setreg', a:000)
++ call append('$', printf('{{{2 setreg(%s)', string(a:000)[1:-2]))
++ call AppendRegContents(a:1)
++ if a:1 isnot# '='
++ execute "silent normal! Go==\n==\e\"".a:1."P"
++ endif
++ endfun
++ :fun ErrExe(str)
++ call append('$', 'Executing '.a:str)
++ try
++ execute a:str
++ catch
++ $put =v:exception
++ endtry
++ endfun
++ :fun Test()
++ $put ='{{{1 let tests'
++ let @" = 'abc'
++ AR "
++ let @" = "abc\n"
++ AR "
++ let @" = "abc\<C-m>"
++ AR "
++ let @= = '"abc"'
++ AR =
++
++ $put ='{{{1 Basic setreg tests'
++ call SetReg('a', 'abcA', 'c')
++ call SetReg('b', 'abcB', 'v')
++ call SetReg('c', 'abcC', 'l')
++ call SetReg('d', 'abcD', 'V')
++ call SetReg('e', 'abcE', 'b')
++ call SetReg('f', 'abcF', "\<C-v>")
++ call SetReg('g', 'abcG', 'b10')
++ call SetReg('h', 'abcH', "\<C-v>10")
++ call SetReg('I', 'abcI')
++
++ $put ='{{{1 Appending single lines with setreg()'
++ call SetReg('A', 'abcAc', 'c')
++ call SetReg('A', 'abcAl', 'l')
++ call SetReg('A', 'abcAc2','c')
++ call SetReg('b', 'abcBc', 'ca')
++ call SetReg('b', 'abcBb', 'ba')
++ call SetReg('b', 'abcBc2','ca')
++ call SetReg('b', 'abcBb2','b50a')
++
++ call SetReg('C', 'abcCl', 'l')
++ call SetReg('C', 'abcCc', 'c')
++ call SetReg('D', 'abcDb', 'b')
++
++ call SetReg('E', 'abcEb', 'b')
++ call SetReg('E', 'abcEl', 'l')
++ call SetReg('F', 'abcFc', 'c')
++
++ $put ='{{{1 Appending NL with setreg()'
++ call setreg('a', 'abcA2', 'c')
++ call setreg('b', 'abcB2', 'v')
++ call setreg('c', 'abcC2', 'l')
++ call setreg('d', 'abcD2', 'V')
++ call setreg('e', 'abcE2', 'b')
++ call setreg('f', 'abcF2', "\<C-v>")
++ call setreg('g', 'abcG2', 'b10')
++ call setreg('h', 'abcH2', "\<C-v>10")
++ call setreg('I', 'abcI2')
++
++ call SetReg('A', "\n")
++ call SetReg('B', "\n", 'c')
++ call SetReg('C', "\n")
++ call SetReg('D', "\n", 'l')
++ call SetReg('E', "\n")
++ call SetReg('F', "\n", 'b')
++
++ $put ='{{{1 Setting lists with setreg()'
++ call SetReg('a', ['abcA3'], 'c')
++ call SetReg('b', ['abcB3'], 'l')
++ call SetReg('c', ['abcC3'], 'b')
++ call SetReg('d', ['abcD3'])
++
++ $put ='{{{1 Appending lists with setreg()'
++ call SetReg('A', ['abcA3c'], 'c')
++ call SetReg('b', ['abcB3l'], 'la')
++ call SetReg('C', ['abcC3b'], 'lb')
++ call SetReg('D', ['abcD32'])
++
++ call SetReg('A', ['abcA32'])
++ call SetReg('B', ['abcB3c'], 'c')
++ call SetReg('C', ['abcC3l'], 'l')
++ call SetReg('D', ['abcD3b'], 'b')
++
++ $put ='{{{1 Appending lists with NL with setreg()'
++ call SetReg('A', ["\n", 'abcA3l2'], 'l')
++ call SetReg('B', ["\n", 'abcB3c2'], 'c')
++ call SetReg('C', ["\n", 'abcC3b2'], 'b')
++ call SetReg('D', ["\n", 'abcD3b50'],'b50')
++
++ $put ='{{{1 Setting lists with NLs with setreg()'
++ call SetReg('a', ['abcA4-0', "\n", "abcA4-2\n", "\nabcA4-3", "abcA4-4\nabcA4-4-2"])
++ call SetReg('b', ['abcB4c-0', "\n", "abcB4c-2\n", "\nabcB4c-3", "abcB4c-4\nabcB4c-4-2"], 'c')
++ call SetReg('c', ['abcC4l-0', "\n", "abcC4l-2\n", "\nabcC4l-3", "abcC4l-4\nabcC4l-4-2"], 'l')
++ call SetReg('d', ['abcD4b-0', "\n", "abcD4b-2\n", "\nabcD4b-3", "abcD4b-4\nabcD4b-4-2"], 'b')
++ call SetReg('e', ['abcE4b10-0', "\n", "abcE4b10-2\n", "\nabcE4b10-3", "abcE4b10-4\nabcE4b10-4-2"], 'b10')
++
++ $put ='{{{1 Search and expressions'
++ call SetReg('/', ['abc/'])
++ call SetReg('/', ["abc/\n"])
++ call SetReg('=', ['"abc/"'])
++ call SetReg('=', ["\"abc/\n\""])
++
++ $put ='{{{1 Errors'
++ call ErrExe('call setreg()')
++ call ErrExe('call setreg(1)')
++ call ErrExe('call setreg(1, 2, 3, 4)')
++ call ErrExe('call setreg([], 2)')
++ call ErrExe('call setreg(1, {})')
++ call ErrExe('call setreg(1, 2, [])')
++ call ErrExe('call setreg("/", [1, 2])')
++ call ErrExe('call setreg("=", [1, 2])')
++ call ErrExe('call setreg(1, ["", "", [], ""])')
++ endfun
+ :"
+! :call Test()
+ :"
+! :delfunction SetReg
+! :delfunction AppendRegContents
+! :delfunction ErrExe
+! :delfunction Test
+! :delcommand AR
+! :call garbagecollect(1)
+! :"
+! :/^start:/+1,$wq! test.out
+! :" vim: et ts=4 isk-=\: fmr=???,???
+! :call getchar()
+ ENDTEST
+
+! start:
+*** ../vim-7.4.242/src/testdir/test_eval.ok 2014-04-02 19:54:58.275599459 +0200
+--- src/testdir/test_eval.ok 2014-04-02 22:15:12.547483714 +0200
+***************
+*** 1,7 ****
+! result
+! 'one
+! two
+! three
+! four
+! '
+! ['one', 'two', 'three', 'four']
+--- 1,322 ----
+! {{{1 let tests
+! ": type v; value: abc (['abc']), expr: abc (['abc'])
+! ": type V; value: abc
+! ": type V; value: abc
+! =: type v; value: abc (['abc']), expr: "abc" (['"abc"'])
+! {{{1 Basic setreg tests
+! {{{2 setreg('a', 'abcA', 'c')
+! a: type v; value: abcA (['abcA']), expr: abcA (['abcA'])
+! ==
+! =abcA=
+! {{{2 setreg('b', 'abcB', 'v')
+! b: type v; value: abcB (['abcB']), expr: abcB (['abcB'])
+! ==
+! =abcB=
+! {{{2 setreg('c', 'abcC', 'l')
+! c: type V; value: abcC
+! ==
+! abcC
+! ==
+! {{{2 setreg('d', 'abcD', 'V')
+! d: type V; value: abcD
+! ==
+! abcD
+! ==
+! {{{2 setreg('e', 'abcE', 'b')
+! e: type 4; value: abcE (['abcE']), expr: abcE (['abcE'])
+! ==
+! =abcE=
+! {{{2 setreg('f', 'abcF', '')
+! f: type 4; value: abcF (['abcF']), expr: abcF (['abcF'])
+! ==
+! =abcF=
+! {{{2 setreg('g', 'abcG', 'b10')
+! g: type 10; value: abcG (['abcG']), expr: abcG (['abcG'])
+! ==
+! =abcG =
+! {{{2 setreg('h', 'abcH', '10')
+! h: type 10; value: abcH (['abcH']), expr: abcH (['abcH'])
+! ==
+! =abcH =
+! {{{2 setreg('I', 'abcI')
+! I: type v; value: abcI (['abcI']), expr: abcI (['abcI'])
+! ==
+! =abcI=
+! {{{1 Appending single lines with setreg()
+! {{{2 setreg('A', 'abcAc', 'c')
+! A: type v; value: abcAabcAc (['abcAabcAc']), expr: abcAabcAc (['abcAabcAc'])
+! ==
+! =abcAabcAc=
+! {{{2 setreg('A', 'abcAl', 'l')
+! A: type V; value: abcAabcAcabcAl
+! ==
+! abcAabcAcabcAl
+! ==
+! {{{2 setreg('A', 'abcAc2', 'c')
+! A: type v; value: abcAabcAcabcAl
+! ==
+! =abcAabcAcabcAl
+! abcAc2=
+! {{{2 setreg('b', 'abcBc', 'ca')
+! b: type v; value: abcBabcBc (['abcBabcBc']), expr: abcBabcBc (['abcBabcBc'])
+! ==
+! =abcBabcBc=
+! {{{2 setreg('b', 'abcBb', 'ba')
+! b: type 5; value: abcBabcBcabcBb (['abcBabcBcabcBb']), expr: abcBabcBcabcBb (['abcBabcBcabcBb'])
+! ==
+! =abcBabcBcabcBb=
+! {{{2 setreg('b', 'abcBc2', 'ca')
+! b: type v; value: abcBabcBcabcBb
+! ==
+! =abcBabcBcabcBb
+! abcBc2=
+! {{{2 setreg('b', 'abcBb2', 'b50a')
+! b: type 50; value: abcBabcBcabcBb
+! ==
+! =abcBabcBcabcBb =
+! abcBc2abcBb2
+! {{{2 setreg('C', 'abcCl', 'l')
+! C: type V; value: abcC
+! ==
+! abcC
+! abcCl
+! ==
+! {{{2 setreg('C', 'abcCc', 'c')
+! C: type v; value: abcC
+! ==
+! =abcC
+! abcCl
+! abcCc=
+! {{{2 setreg('D', 'abcDb', 'b')
+! D: type 5; value: abcD
+! ==
+! =abcD =
+! abcDb
+! {{{2 setreg('E', 'abcEb', 'b')
+! E: type 5; value: abcE
+! ==
+! =abcE =
+! abcEb
+! {{{2 setreg('E', 'abcEl', 'l')
+! E: type V; value: abcE
+! ==
+! abcE
+! abcEb
+! abcEl
+! ==
+! {{{2 setreg('F', 'abcFc', 'c')
+! F: type v; value: abcF
+! ==
+! =abcF
+! abcFc=
+! {{{1 Appending NL with setreg()
+! {{{2 setreg('A', '
+! A: type V; value: abcA2
+! ==
+! abcA2
+! ==
+! {{{2 setreg('B', '
+! B: type v; value: abcB2
+! ==
+! =abcB2
+! =
+! {{{2 setreg('C', '
+! C: type V; value: abcC2
+! ==
+! abcC2
+!
+! ==
+! {{{2 setreg('D', '
+! D: type V; value: abcD2
+! ==
+! abcD2
+!
+! ==
+! {{{2 setreg('E', '
+! E: type V; value: abcE2
+! ==
+! abcE2
+!
+! ==
+! {{{2 setreg('F', '
+! F: type 0; value: abcF2
+! ==
+! =abcF2=
+!
+! {{{1 Setting lists with setreg()
+! {{{2 setreg('a', ['abcA3'], 'c')
+! a: type v; value: abcA3 (['abcA3']), expr: abcA3 (['abcA3'])
+! ==
+! =abcA3=
+! {{{2 setreg('b', ['abcB3'], 'l')
+! b: type V; value: abcB3
+! ==
+! abcB3
+! ==
+! {{{2 setreg('c', ['abcC3'], 'b')
+! c: type 5; value: abcC3 (['abcC3']), expr: abcC3 (['abcC3'])
+! ==
+! =abcC3=
+! {{{2 setreg('d', ['abcD3'])
+! d: type V; value: abcD3
+! ==
+! abcD3
+! ==
+! {{{1 Appending lists with setreg()
+! {{{2 setreg('A', ['abcA3c'], 'c')
+! A: type v; value: abcA3
+! ==
+! =abcA3
+! abcA3c=
+! {{{2 setreg('b', ['abcB3l'], 'la')
+! b: type V; value: abcB3
+! ==
+! abcB3
+! abcB3l
+! ==
+! {{{2 setreg('C', ['abcC3b'], 'lb')
+! C: type 6; value: abcC3
+! ==
+! =abcC3 =
+! abcC3b
+! {{{2 setreg('D', ['abcD32'])
+! D: type V; value: abcD3
+! ==
+! abcD3
+! abcD32
+! ==
+! {{{2 setreg('A', ['abcA32'])
+! A: type V; value: abcA3
+! ==
+! abcA3
+! abcA3c
+! abcA32
+! ==
+! {{{2 setreg('B', ['abcB3c'], 'c')
+! B: type v; value: abcB3
+! ==
+! =abcB3
+! abcB3l
+! abcB3c=
+! {{{2 setreg('C', ['abcC3l'], 'l')
+! C: type V; value: abcC3
+! ==
+! abcC3
+! abcC3b
+! abcC3l
+! ==
+! {{{2 setreg('D', ['abcD3b'], 'b')
+! D: type 6; value: abcD3
+! ==
+! =abcD3 =
+! abcD32
+! abcD3b
+! {{{1 Appending lists with NL with setreg()
+! {{{2 setreg('A', ['
+! A: type V; value: abcA3
+! ==
+! abcA3
+! abcA3c
+! abcA32
+!
+! abcA3l2
+! ==
+! {{{2 setreg('B', ['
+! B: type v; value: abcB3
+! ==
+! =abcB3
+! abcB3l
+! abcB3c
+!
+! abcB3c2=
+! {{{2 setreg('C', ['
+! C: type 7; value: abcC3
+! ==
+! =abcC3 =
+! abcC3b
+! abcC3l
+!
+! abcC3b2
+! {{{2 setreg('D', ['
+! D: type 50; value: abcD3
+! ==
+! =abcD3 =
+! abcD32
+! abcD3b
+!
+! abcD3b50
+! {{{1 Setting lists with NLs with setreg()
+! {{{2 setreg('a', ['abcA4-0', '
+! a: type V; value: abcA4-0
+! ==
+! abcA4-0
+!
+! abcA4-2
+!
+! abcA4-4
+! ==
+! {{{2 setreg('b', ['abcB4c-0', '
+! b: type v; value: abcB4c-0
+! ==
+! =abcB4c-0
+!
+! abcB4c-2
+!
+! abcB4c-4
+! {{{2 setreg('c', ['abcC4l-0', '
+! c: type V; value: abcC4l-0
+! ==
+! abcC4l-0
+!
+! abcC4l-2
+!
+! abcC4l-4
+! ==
+! {{{2 setreg('d', ['abcD4b-0', '
+! d: type 19; value: abcD4b-0
+! ==
+! =abcD4b-0 =
+!
+! abcD4b-2
+!
+! abcD4b-4
+! {{{2 setreg('e', ['abcE4b10-0', '
+! e: type 10; value: abcE4b10-0
+! ==
+! =abcE4b10-0=
+!
+! abcE4b10-2
+!
+! abcE4b10-4
+! {{{1 Search and expressions
+! {{{2 setreg('/', ['abc/'])
+! /: type v; value: abc/ (['abc/']), expr: abc/ (['abc/'])
+! ==
+! =abc/=
+! {{{2 setreg('/', ['abc/
+! /: type v; value: abc/
+! ==
+! =abc/
+! {{{2 setreg('=', ['"abc/"'])
+! =: type v; value: abc/ (['abc/']), expr: "abc/" (['"abc/"'])
+! {{{2 setreg('=', ['"abc/
+! =: type v; value: abc/
+! {{{1 Errors
+! Executing call setreg()
+! Vim(call):E119: Not enough arguments for function: setreg
+! Executing call setreg(1)
+! Vim(call):E119: Not enough arguments for function: setreg
+! Executing call setreg(1, 2, 3, 4)
+! Vim(call):E118: Too many arguments for function: setreg
+! Executing call setreg([], 2)
+! Vim(call):E730: using List as a String
+! Executing call setreg(1, {})
+! Vim(call):E731: using Dictionary as a String
+! Executing call setreg(1, 2, [])
+! Vim(call):E730: using List as a String
+! Executing call setreg("/", [1, 2])
+! Vim(call):E883: search pattern and expression register may not contain two or more lines
+! Executing call setreg("=", [1, 2])
+! Vim(call):E883: search pattern and expression register may not contain two or more lines
+! Executing call setreg(1, ["", "", [], ""])
+! Vim(call):E730: using List as a String
+*** ../vim-7.4.242/src/version.c 2014-04-02 19:54:58.279599459 +0200
+--- src/version.c 2014-04-02 22:15:32.767483436 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 243,
+ /**/
+
+--
+I have a drinking problem -- I don't have a drink!
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.244 b/patches/source/vim/patches/7.4.244
new file mode 100644
index 000000000..448edfa50
--- /dev/null
+++ b/patches/source/vim/patches/7.4.244
@@ -0,0 +1,60 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.244
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.244 (after 7.4.238)
+Problem: The smack feature causes stray error messages.
+Solution: Remove the error messages.
+Files: src/os_unix.c
+
+
+*** ../vim-7.4.243/src/os_unix.c 2014-04-02 14:05:33.999887839 +0200
+--- src/os_unix.c 2014-04-02 23:08:25.967439786 +0200
+***************
+*** 2875,2888 ****
+ case ENODATA:
+ /* no attribute of this name */
+ ret = removexattr((char*)to_file, name);
+! if (ret < 0 && errno != ENODATA)
+! {
+! MSG_PUTS(_("Could not remove security context "));
+! MSG_PUTS(name);
+! MSG_PUTS(_(" for "));
+! msg_outtrans(to_file);
+! msg_putchar('\n');
+! }
+ break;
+ }
+ }
+--- 2875,2882 ----
+ case ENODATA:
+ /* no attribute of this name */
+ ret = removexattr((char*)to_file, name);
+! /* Silently ignore errors, apparently this happens when
+! * smack is not actually being used. */
+ break;
+ }
+ }
+*** ../vim-7.4.243/src/version.c 2014-04-02 22:17:00.007482236 +0200
+--- src/version.c 2014-04-02 23:07:36.067440472 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 244,
+ /**/
+
+--
+How To Keep A Healthy Level Of Insanity:
+2. Page yourself over the intercom. Don't disguise your voice.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.245 b/patches/source/vim/patches/7.4.245
new file mode 100644
index 000000000..83ca6a4fd
--- /dev/null
+++ b/patches/source/vim/patches/7.4.245
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.245
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.245
+Problem: Crash for "vim -u NONE -N -c '&&'".
+Solution: Check for the pattern to be NULL. (Dominique Pelle)
+Files: src/ex_cmds.c
+
+
+*** ../vim-7.4.244/src/ex_cmds.c 2014-04-01 17:49:40.136891378 +0200
+--- src/ex_cmds.c 2014-04-04 18:56:00.159939544 +0200
+***************
+*** 4425,4431 ****
+ * TODO: find a generic solution to make line-joining operations more
+ * efficient, avoid allocating a string that grows in size.
+ */
+! if (STRCMP(pat, "\\n") == 0 && STRLEN(pat) == 2
+ && *sub == NUL
+ && (*cmd == NUL || (cmd[1] == NUL && (*cmd == 'g' || *cmd == 'l'
+ || *cmd == 'p' || *cmd == '#'))))
+--- 4425,4431 ----
+ * TODO: find a generic solution to make line-joining operations more
+ * efficient, avoid allocating a string that grows in size.
+ */
+! if (pat != NULL && STRCMP(pat, "\\n") == 0
+ && *sub == NUL
+ && (*cmd == NUL || (cmd[1] == NUL && (*cmd == 'g' || *cmd == 'l'
+ || *cmd == 'p' || *cmd == '#'))))
+*** ../vim-7.4.244/src/version.c 2014-04-02 23:09:23.003439001 +0200
+--- src/version.c 2014-04-04 18:52:21.519939067 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 245,
+ /**/
+
+--
+One difference between a man and a machine is that a machine is quiet
+when well oiled.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.246 b/patches/source/vim/patches/7.4.246
new file mode 100644
index 000000000..0ac7afa1f
--- /dev/null
+++ b/patches/source/vim/patches/7.4.246
@@ -0,0 +1,121 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.246
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.246
+Problem: Configure message for detecting smack are out of sequence.
+Solution: Put the messages in the right place. (Kazunobu Kuriyama)
+Files: src/configure.in, src/auto/configure
+
+
+*** ../vim-7.4.245/src/configure.in 2014-04-02 14:05:33.999887839 +0200
+--- src/configure.in 2014-04-05 11:56:33.807099380 +0200
+***************
+*** 393,408 ****
+ [ --disable-smack Do not check for Smack support.],
+ , enable_smack="yes")
+ if test "$enable_smack" = "yes"; then
+ AC_CHECK_HEADER([linux/xattr.h], true, enable_smack="no")
+ fi
+ if test "$enable_smack" = "yes"; then
+- AC_MSG_RESULT(no)
+ AC_CHECK_LIB(attr, llistxattr,
+ [LIBS="$LIBS -lattr"
+ found_smack="yes"
+ AC_DEFINE(HAVE_SMACK)])
+- else
+- AC_MSG_RESULT(yes)
+ fi
+
+ dnl When smack was found don't search for SELinux
+--- 393,408 ----
+ [ --disable-smack Do not check for Smack support.],
+ , enable_smack="yes")
+ if test "$enable_smack" = "yes"; then
++ AC_MSG_RESULT(no)
+ AC_CHECK_HEADER([linux/xattr.h], true, enable_smack="no")
++ else
++ AC_MSG_RESULT(yes)
+ fi
+ if test "$enable_smack" = "yes"; then
+ AC_CHECK_LIB(attr, llistxattr,
+ [LIBS="$LIBS -lattr"
+ found_smack="yes"
+ AC_DEFINE(HAVE_SMACK)])
+ fi
+
+ dnl When smack was found don't search for SELinux
+*** ../vim-7.4.245/src/auto/configure 2014-04-02 14:05:34.003887839 +0200
+--- src/auto/configure 2014-04-05 11:56:37.123099387 +0200
+***************
+*** 4600,4605 ****
+--- 4600,4607 ----
+ fi
+
+ if test "$enable_smack" = "yes"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++ $as_echo "no" >&6; }
+ ac_fn_c_check_header_mongrel "$LINENO" "linux/xattr.h" "ac_cv_header_linux_xattr_h" "$ac_includes_default"
+ if test "x$ac_cv_header_linux_xattr_h" = xyes; then :
+ true
+***************
+*** 4608,4617 ****
+ fi
+
+
+ fi
+ if test "$enable_smack" = "yes"; then
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+- $as_echo "no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for llistxattr in -lattr" >&5
+ $as_echo_n "checking for llistxattr in -lattr... " >&6; }
+ if ${ac_cv_lib_attr_llistxattr+:} false; then :
+--- 4610,4620 ----
+ fi
+
+
++ else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++ $as_echo "yes" >&6; }
+ fi
+ if test "$enable_smack" = "yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for llistxattr in -lattr" >&5
+ $as_echo_n "checking for llistxattr in -lattr... " >&6; }
+ if ${ac_cv_lib_attr_llistxattr+:} false; then :
+***************
+*** 4655,4663 ****
+
+ fi
+
+- else
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+- $as_echo "yes" >&6; }
+ fi
+
+ if test "x$found_smack" = "x"; then
+--- 4658,4663 ----
+*** ../vim-7.4.245/src/version.c 2014-04-04 19:00:46.351940169 +0200
+--- src/version.c 2014-04-05 11:57:29.503099502 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 246,
+ /**/
+
+--
+Apparently, 1 in 5 people in the world are Chinese. And there are 5
+people in my family, so it must be one of them. It's either my mum
+or my dad. Or my older brother Colin. Or my younger brother
+Ho-Cha-Chu. But I think it's Colin.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.247 b/patches/source/vim/patches/7.4.247
new file mode 100644
index 000000000..36006e17b
--- /dev/null
+++ b/patches/source/vim/patches/7.4.247
@@ -0,0 +1,227 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.247
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.247
+Problem: When passing input to system() there is no way to keep NUL and
+ NL characters separate.
+Solution: Optionally use a list for the system() input. (ZyX)
+Files: runtime/doc/eval.txt, src/eval.c
+
+
+*** ../vim-7.4.246/runtime/doc/eval.txt 2014-04-02 22:16:59.995482236 +0200
+--- runtime/doc/eval.txt 2014-04-05 18:47:12.907153201 +0200
+***************
+*** 5951,5960 ****
+
+ system({expr} [, {input}]) *system()* *E677*
+ Get the output of the shell command {expr}.
+! When {input} is given, this string is written to a file and
+! passed as stdin to the command. The string is written as-is,
+! you need to take care of using the correct line separators
+! yourself. Pipes are not used.
+ Note: Use |shellescape()| or |::S| with |expand()| or
+ |fnamemodify()| to escape special characters in a command
+ argument. Newlines in {expr} may cause the command to fail.
+--- 5964,5980 ----
+
+ system({expr} [, {input}]) *system()* *E677*
+ Get the output of the shell command {expr}.
+!
+! When {input} is given and is a string this string is written
+! to a file and passed as stdin to the command. The string is
+! written as-is, you need to take care of using the correct line
+! separators yourself.
+! If {input} is given and is a |List| it is written to the file
+! in a way |writefile()| does with {binary} set to "b" (i.e.
+! with a newline between each list item with newlines inside
+! list items converted to NULs).
+! Pipes are not used.
+!
+ Note: Use |shellescape()| or |::S| with |expand()| or
+ |fnamemodify()| to escape special characters in a command
+ argument. Newlines in {expr} may cause the command to fail.
+*** ../vim-7.4.246/src/eval.c 2014-04-02 22:17:00.003482236 +0200
+--- src/eval.c 2014-04-05 18:47:50.971153284 +0200
+***************
+*** 836,841 ****
+--- 836,842 ----
+ static int searchpair_cmn __ARGS((typval_T *argvars, pos_T *match_pos));
+ static int search_cmn __ARGS((typval_T *argvars, pos_T *match_pos, int *flagsp));
+ static void setwinvar __ARGS((typval_T *argvars, typval_T *rettv, int off));
++ static int write_list __ARGS((FILE *fd, list_T *list, int binary));
+
+
+ #ifdef EBCDIC
+***************
+*** 18267,18280 ****
+ EMSG2(_(e_notopen), infile);
+ goto done;
+ }
+! p = get_tv_string_buf_chk(&argvars[1], buf);
+! if (p == NULL)
+ {
+! fclose(fd);
+! goto done; /* type error; errmsg already given */
+ }
+- if (fwrite(p, STRLEN(p), 1, fd) != 1)
+- err = TRUE;
+ if (fclose(fd) != 0)
+ err = TRUE;
+ if (err)
+--- 18268,18289 ----
+ EMSG2(_(e_notopen), infile);
+ goto done;
+ }
+! if (argvars[1].v_type == VAR_LIST)
+ {
+! if (write_list(fd, argvars[1].vval.v_list, TRUE) == FAIL)
+! err = TRUE;
+! }
+! else
+! {
+! p = get_tv_string_buf_chk(&argvars[1], buf);
+! if (p == NULL)
+! {
+! fclose(fd);
+! goto done; /* type error; errmsg already given */
+! }
+! if (fwrite(p, STRLEN(p), 1, fd) != 1)
+! err = TRUE;
+ }
+ if (fclose(fd) != 0)
+ err = TRUE;
+ if (err)
+***************
+*** 19173,19178 ****
+--- 19182,19230 ----
+ }
+
+ /*
++ * Write list of strings to file
++ */
++ static int
++ write_list(fd, list, binary)
++ FILE *fd;
++ list_T *list;
++ int binary;
++ {
++ listitem_T *li;
++ int c;
++ int ret = OK;
++ char_u *s;
++
++ for (li = list->lv_first; li != NULL; li = li->li_next)
++ {
++ for (s = get_tv_string(&li->li_tv); *s != NUL; ++s)
++ {
++ if (*s == '\n')
++ c = putc(NUL, fd);
++ else
++ c = putc(*s, fd);
++ if (c == EOF)
++ {
++ ret = FAIL;
++ break;
++ }
++ }
++ if (!binary || li->li_next != NULL)
++ if (putc('\n', fd) == EOF)
++ {
++ ret = FAIL;
++ break;
++ }
++ if (ret == FAIL)
++ {
++ EMSG(_(e_write));
++ break;
++ }
++ }
++ return ret;
++ }
++
++ /*
+ * "writefile()" function
+ */
+ static void
+***************
+*** 19183,19192 ****
+ int binary = FALSE;
+ char_u *fname;
+ FILE *fd;
+- listitem_T *li;
+- char_u *s;
+ int ret = 0;
+- int c;
+
+ if (check_restricted() || check_secure())
+ return;
+--- 19235,19241 ----
+***************
+*** 19213,19245 ****
+ }
+ else
+ {
+! for (li = argvars[0].vval.v_list->lv_first; li != NULL;
+! li = li->li_next)
+! {
+! for (s = get_tv_string(&li->li_tv); *s != NUL; ++s)
+! {
+! if (*s == '\n')
+! c = putc(NUL, fd);
+! else
+! c = putc(*s, fd);
+! if (c == EOF)
+! {
+! ret = -1;
+! break;
+! }
+! }
+! if (!binary || li->li_next != NULL)
+! if (putc('\n', fd) == EOF)
+! {
+! ret = -1;
+! break;
+! }
+! if (ret < 0)
+! {
+! EMSG(_(e_write));
+! break;
+! }
+! }
+ fclose(fd);
+ }
+
+--- 19262,19269 ----
+ }
+ else
+ {
+! if (write_list(fd, argvars[0].vval.v_list, binary) == FAIL)
+! ret = -1;
+ fclose(fd);
+ }
+
+*** ../vim-7.4.246/src/version.c 2014-04-05 12:02:20.751100138 +0200
+--- src/version.c 2014-04-05 18:49:24.411153488 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 247,
+ /**/
+
+--
+Time is an illusion. Lunchtime doubly so.
+ -- Ford Prefect, in Douglas Adams'
+ "The Hitchhiker's Guide to the Galaxy"
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.248 b/patches/source/vim/patches/7.4.248
new file mode 100644
index 000000000..b41f6cb06
--- /dev/null
+++ b/patches/source/vim/patches/7.4.248
@@ -0,0 +1,515 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.248
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.248
+Problem: Cannot distinguish between NL and NUL in output of system().
+Solution: Add systemlist(). (ZyX)
+Files: runtime/doc/eval.txt, src/eval.c, src/ex_cmds2.c, src/misc1.c,
+ src/proto/misc1.pro
+
+
+*** ../vim-7.4.247/runtime/doc/eval.txt 2014-04-05 18:55:40.471154309 +0200
+--- runtime/doc/eval.txt 2014-04-05 19:03:05.419155281 +0200
+***************
+*** 2001,2006 ****
+--- 2002,2008 ----
+ synconcealed( {lnum}, {col}) List info about concealing
+ synstack( {lnum}, {col}) List stack of syntax IDs at {lnum} and {col}
+ system( {expr} [, {input}]) String output of shell command/filter {expr}
++ systemlist( {expr} [, {input}]) List output of shell command/filter {expr}
+ tabpagebuflist( [{arg}]) List list of buffer numbers in tab page
+ tabpagenr( [{arg}]) Number number of current or last tab page
+ tabpagewinnr( {tabarg}[, {arg}])
+***************
+*** 5950,5956 ****
+ valid positions.
+
+ system({expr} [, {input}]) *system()* *E677*
+! Get the output of the shell command {expr}.
+
+ When {input} is given and is a string this string is written
+ to a file and passed as stdin to the command. The string is
+--- 5964,5971 ----
+ valid positions.
+
+ system({expr} [, {input}]) *system()* *E677*
+! Get the output of the shell command {expr} as a string. See
+! |systemlist()| to get the output as a List.
+
+ When {input} is given and is a string this string is written
+ to a file and passed as stdin to the command. The string is
+***************
+*** 5998,6003 ****
+--- 6013,6028 ----
+ Use |:checktime| to force a check.
+
+
++ systemlist({expr} [, {input}]) *systemlist()*
++ Same as |system()|, but returns a |List| with lines (parts of
++ output separated by NL) with NULs transformed into NLs. Output
++ is the same as |readfile()| will output with {binary} argument
++ set to "b".
++
++ Returns an empty string on error, so be careful not to run
++ into |E706|.
++
++
+ tabpagebuflist([{arg}]) *tabpagebuflist()*
+ The result is a |List|, where each item is the number of the
+ buffer associated with each window in the current tab page.
+*** ../vim-7.4.247/src/eval.c 2014-04-05 18:55:40.479154309 +0200
+--- src/eval.c 2014-04-05 19:42:37.675160463 +0200
+***************
+*** 726,731 ****
+--- 726,732 ----
+ static void f_synstack __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_synconcealed __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_system __ARGS((typval_T *argvars, typval_T *rettv));
++ static void f_systemlist __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_tabpagebuflist __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_tabpagenr __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_tabpagewinnr __ARGS((typval_T *argvars, typval_T *rettv));
+***************
+*** 837,842 ****
+--- 838,844 ----
+ static int search_cmn __ARGS((typval_T *argvars, pos_T *match_pos, int *flagsp));
+ static void setwinvar __ARGS((typval_T *argvars, typval_T *rettv, int off));
+ static int write_list __ARGS((FILE *fd, list_T *list, int binary));
++ static void get_cmd_output_as_rettv __ARGS((typval_T *argvars, typval_T *rettv, int retlist));
+
+
+ #ifdef EBCDIC
+***************
+*** 8139,8144 ****
+--- 8141,8147 ----
+ {"synconcealed", 2, 2, f_synconcealed},
+ {"synstack", 2, 2, f_synstack},
+ {"system", 1, 2, f_system},
++ {"systemlist", 1, 2, f_systemlist},
+ {"tabpagebuflist", 0, 1, f_tabpagebuflist},
+ {"tabpagenr", 0, 1, f_tabpagenr},
+ {"tabpagewinnr", 1, 2, f_tabpagewinnr},
+***************
+*** 18232,18244 ****
+ #endif
+ }
+
+- /*
+- * "system()" function
+- */
+ static void
+! f_system(argvars, rettv)
+ typval_T *argvars;
+ typval_T *rettv;
+ {
+ char_u *res = NULL;
+ char_u *p;
+--- 18235,18245 ----
+ #endif
+ }
+
+ static void
+! get_cmd_output_as_rettv(argvars, rettv, retlist)
+ typval_T *argvars;
+ typval_T *rettv;
++ int retlist;
+ {
+ char_u *res = NULL;
+ char_u *p;
+***************
+*** 18246,18254 ****
+ char_u buf[NUMBUFLEN];
+ int err = FALSE;
+ FILE *fd;
+
+ if (check_restricted() || check_secure())
+! goto done;
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+--- 18247,18258 ----
+ char_u buf[NUMBUFLEN];
+ int err = FALSE;
+ FILE *fd;
++ list_T *list = NULL;
+
++ rettv->v_type = VAR_STRING;
++ rettv->vval.v_string = NULL;
+ if (check_restricted() || check_secure())
+! goto errret;
+
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+***************
+*** 18259,18272 ****
+ if ((infile = vim_tempname('i')) == NULL)
+ {
+ EMSG(_(e_notmp));
+! goto done;
+ }
+
+ fd = mch_fopen((char *)infile, WRITEBIN);
+ if (fd == NULL)
+ {
+ EMSG2(_(e_notopen), infile);
+! goto done;
+ }
+ if (argvars[1].v_type == VAR_LIST)
+ {
+--- 18263,18276 ----
+ if ((infile = vim_tempname('i')) == NULL)
+ {
+ EMSG(_(e_notmp));
+! goto errret;
+ }
+
+ fd = mch_fopen((char *)infile, WRITEBIN);
+ if (fd == NULL)
+ {
+ EMSG2(_(e_notopen), infile);
+! goto errret;
+ }
+ if (argvars[1].v_type == VAR_LIST)
+ {
+***************
+*** 18279,18285 ****
+ if (p == NULL)
+ {
+ fclose(fd);
+! goto done; /* type error; errmsg already given */
+ }
+ if (fwrite(p, STRLEN(p), 1, fd) != 1)
+ err = TRUE;
+--- 18283,18289 ----
+ if (p == NULL)
+ {
+ fclose(fd);
+! goto errret; /* type error; errmsg already given */
+ }
+ if (fwrite(p, STRLEN(p), 1, fd) != 1)
+ err = TRUE;
+***************
+*** 18289,18340 ****
+ if (err)
+ {
+ EMSG(_("E677: Error writing temp file"));
+! goto done;
+ }
+ }
+
+! res = get_cmd_output(get_tv_string(&argvars[0]), infile,
+! SHELL_SILENT | SHELL_COOKED);
+!
+! #ifdef USE_CR
+! /* translate <CR> into <NL> */
+! if (res != NULL)
+ {
+! char_u *s;
+
+! for (s = res; *s; ++s)
+! {
+! if (*s == CAR)
+! *s = NL;
+ }
+ }
+! #else
+! # ifdef USE_CRNL
+! /* translate <CR><NL> into <NL> */
+! if (res != NULL)
+ {
+! char_u *s, *d;
+
+! d = res;
+! for (s = res; *s; ++s)
+ {
+! if (s[0] == CAR && s[1] == NL)
+! ++s;
+! *d++ = *s;
+ }
+- *d = NUL;
+- }
+ # endif
+ #endif
+
+! done:
+ if (infile != NULL)
+ {
+ mch_remove(infile);
+ vim_free(infile);
+ }
+! rettv->v_type = VAR_STRING;
+! rettv->vval.v_string = res;
+ }
+
+ /*
+--- 18293,18420 ----
+ if (err)
+ {
+ EMSG(_("E677: Error writing temp file"));
+! goto errret;
+ }
+ }
+
+! if (retlist)
+ {
+! int len;
+! listitem_T *li;
+! char_u *s = NULL;
+! char_u *start;
+! char_u *end;
+! char_u *p;
+! int i;
+!
+! res = get_cmd_output(get_tv_string(&argvars[0]), infile,
+! SHELL_SILENT | SHELL_COOKED, &len);
+! if (res == NULL)
+! goto errret;
+!
+! list = list_alloc();
+! if (list == NULL)
+! goto errret;
+!
+! for (i = 0; i < len; ++i)
+! {
+! start = res + i;
+! for (end = start; i < len && *end != NL; ++end)
+! ++i;
+
+! s = vim_strnsave(start, (int)(end - start));
+! if (s == NULL)
+! goto errret;
+!
+! for (p = s, end = s + (end - start); p < end; ++p)
+! if (*p == NUL)
+! *p = NL;
+!
+! li = listitem_alloc();
+! if (li == NULL)
+! {
+! vim_free(s);
+! goto errret;
+! }
+! li->li_tv.v_type = VAR_STRING;
+! li->li_tv.vval.v_string = s;
+! list_append(list, li);
+ }
++
++ rettv->v_type = VAR_LIST;
++ rettv->vval.v_list = list;
++ list = NULL;
+ }
+! else
+ {
+! res = get_cmd_output(get_tv_string(&argvars[0]), infile,
+! SHELL_SILENT | SHELL_COOKED, NULL);
+! #ifdef USE_CR
+! /* translate <CR> into <NL> */
+! if (res != NULL)
+! {
+! char_u *s;
+
+! for (s = res; *s; ++s)
+! {
+! if (*s == CAR)
+! *s = NL;
+! }
+! }
+! #else
+! # ifdef USE_CRNL
+! /* translate <CR><NL> into <NL> */
+! if (res != NULL)
+ {
+! char_u *s, *d;
+!
+! d = res;
+! for (s = res; *s; ++s)
+! {
+! if (s[0] == CAR && s[1] == NL)
+! ++s;
+! *d++ = *s;
+! }
+! *d = NUL;
+ }
+ # endif
+ #endif
++ rettv->vval.v_string = res;
++ res = NULL;
++ }
+
+! errret:
+ if (infile != NULL)
+ {
+ mch_remove(infile);
+ vim_free(infile);
+ }
+! if (res != NULL)
+! vim_free(res);
+! if (list != NULL)
+! list_free(list, TRUE);
+! }
+!
+! /*
+! * "system()" function
+! */
+! static void
+! f_system(argvars, rettv)
+! typval_T *argvars;
+! typval_T *rettv;
+! {
+! get_cmd_output_as_rettv(argvars, rettv, FALSE);
+! }
+!
+! /*
+! * "systemlist()" function
+! */
+! static void
+! f_systemlist(argvars, rettv)
+! typval_T *argvars;
+! typval_T *rettv;
+! {
+! get_cmd_output_as_rettv(argvars, rettv, TRUE);
+ }
+
+ /*
+*** ../vim-7.4.247/src/ex_cmds2.c 2013-11-09 03:31:45.000000000 +0100
+--- src/ex_cmds2.c 2014-04-05 19:20:25.023157552 +0200
+***************
+*** 4341,4347 ****
+ /* Find all available locales by running command "locale -a". If this
+ * doesn't work we won't have completion. */
+ char_u *locale_a = get_cmd_output((char_u *)"locale -a",
+! NULL, SHELL_SILENT);
+ if (locale_a == NULL)
+ return NULL;
+ ga_init2(&locales_ga, sizeof(char_u *), 20);
+--- 4341,4347 ----
+ /* Find all available locales by running command "locale -a". If this
+ * doesn't work we won't have completion. */
+ char_u *locale_a = get_cmd_output((char_u *)"locale -a",
+! NULL, SHELL_SILENT, NULL);
+ if (locale_a == NULL)
+ return NULL;
+ ga_init2(&locales_ga, sizeof(char_u *), 20);
+*** ../vim-7.4.247/src/misc1.c 2014-04-01 21:00:45.436733663 +0200
+--- src/misc1.c 2014-04-05 19:21:36.603157708 +0200
+***************
+*** 10665,10671 ****
+ else
+ #endif
+ buffer = get_cmd_output(cmd, NULL,
+! (flags & EW_SILENT) ? SHELL_SILENT : 0);
+ vim_free(cmd);
+ if (buffer == NULL)
+ return 0;
+--- 10665,10671 ----
+ else
+ #endif
+ buffer = get_cmd_output(cmd, NULL,
+! (flags & EW_SILENT) ? SHELL_SILENT : 0, NULL);
+ vim_free(cmd);
+ if (buffer == NULL)
+ return 0;
+***************
+*** 10765,10777 ****
+
+ /*
+ * Get the stdout of an external command.
+ * Returns an allocated string, or NULL for error.
+ */
+ char_u *
+! get_cmd_output(cmd, infile, flags)
+ char_u *cmd;
+ char_u *infile; /* optional input file name */
+ int flags; /* can be SHELL_SILENT */
+ {
+ char_u *tempname;
+ char_u *command;
+--- 10765,10780 ----
+
+ /*
+ * Get the stdout of an external command.
++ * If "ret_len" is NULL replace NUL characters with NL. When "ret_len" is not
++ * NULL store the length there.
+ * Returns an allocated string, or NULL for error.
+ */
+ char_u *
+! get_cmd_output(cmd, infile, flags, ret_len)
+ char_u *cmd;
+ char_u *infile; /* optional input file name */
+ int flags; /* can be SHELL_SILENT */
++ int *ret_len;
+ {
+ char_u *tempname;
+ char_u *command;
+***************
+*** 10841,10847 ****
+ vim_free(buffer);
+ buffer = NULL;
+ }
+! else
+ {
+ /* Change NUL into SOH, otherwise the string is truncated. */
+ for (i = 0; i < len; ++i)
+--- 10844,10850 ----
+ vim_free(buffer);
+ buffer = NULL;
+ }
+! else if (ret_len == NULL)
+ {
+ /* Change NUL into SOH, otherwise the string is truncated. */
+ for (i = 0; i < len; ++i)
+***************
+*** 10850,10855 ****
+--- 10853,10860 ----
+
+ buffer[len] = NUL; /* make sure the buffer is terminated */
+ }
++ else
++ *ret_len = len;
+
+ done:
+ vim_free(tempname);
+*** ../vim-7.4.247/src/proto/misc1.pro 2013-11-06 04:01:31.000000000 +0100
+--- src/proto/misc1.pro 2014-04-05 19:06:26.427155720 +0200
+***************
+*** 100,106 ****
+ void remove_duplicates __ARGS((garray_T *gap));
+ int gen_expand_wildcards __ARGS((int num_pat, char_u **pat, int *num_file, char_u ***file, int flags));
+ void addfile __ARGS((garray_T *gap, char_u *f, int flags));
+! char_u *get_cmd_output __ARGS((char_u *cmd, char_u *infile, int flags));
+ void FreeWild __ARGS((int count, char_u **files));
+ int goto_im __ARGS((void));
+ /* vim: set ft=c : */
+--- 100,106 ----
+ void remove_duplicates __ARGS((garray_T *gap));
+ int gen_expand_wildcards __ARGS((int num_pat, char_u **pat, int *num_file, char_u ***file, int flags));
+ void addfile __ARGS((garray_T *gap, char_u *f, int flags));
+! char_u *get_cmd_output __ARGS((char_u *cmd, char_u *infile, int flags, int *ret_len));
+ void FreeWild __ARGS((int count, char_u **files));
+ int goto_im __ARGS((void));
+ /* vim: set ft=c : */
+*** ../vim-7.4.247/src/version.c 2014-04-05 18:55:40.479154309 +0200
+--- src/version.c 2014-04-05 19:07:12.447155821 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 248,
+ /**/
+
+--
+Tips for aliens in New York: Land anywhere. Central Park, anywhere.
+No one will care or indeed even notice.
+ -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.249 b/patches/source/vim/patches/7.4.249
new file mode 100644
index 000000000..9f290a29b
--- /dev/null
+++ b/patches/source/vim/patches/7.4.249
Binary files differ
diff --git a/patches/source/vim/patches/7.4.250 b/patches/source/vim/patches/7.4.250
new file mode 100644
index 000000000..ff078aaab
--- /dev/null
+++ b/patches/source/vim/patches/7.4.250
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.250
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.250
+Problem: Some test files missing from distribution.
+Solution: Add pattern for newly added tests.
+Files: Filelist
+
+
+*** ../vim-7.4.249/Filelist 2014-01-23 14:26:18.815303381 +0100
+--- Filelist 2014-04-05 21:56:31.743178012 +0200
+***************
+*** 82,90 ****
+--- 82,93 ----
+ src/testdir/*.in \
+ src/testdir/sautest/autoload/*.vim \
+ src/testdir/test[0-9]*.ok \
++ src/testdir/test[0-9]*a.ok \
++ src/testdir/test_[a-z]*.ok \
+ src/testdir/test49.vim \
+ src/testdir/test60.vim \
+ src/testdir/test83-tags? \
++ src/testdir/test77a.com \
+ src/testdir/python2/*.py \
+ src/testdir/python3/*.py \
+ src/testdir/pythonx/*.py \
+*** ../vim-7.4.249/src/version.c 2014-04-05 21:28:50.671174384 +0200
+--- src/version.c 2014-04-05 21:58:05.203178216 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 250,
+ /**/
+
+--
+Give a man a computer program and you give him a headache,
+but teach him to program computers and you give him the power
+to create headaches for others for the rest of his life...
+ R. B. Forest
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.251 b/patches/source/vim/patches/7.4.251
new file mode 100644
index 000000000..e841b80b1
--- /dev/null
+++ b/patches/source/vim/patches/7.4.251
@@ -0,0 +1,164 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.251
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.251
+Problem: Crash when BufAdd autocommand wipes out the buffer.
+Solution: Check for buffer to still be valid. Postpone freeing the buffer
+ structure. (Hirohito Higashi)
+Files: src/buffer.c, src/ex_cmds.c, src/fileio.c, src/globals.h
+
+
+*** ../vim-7.4.250/src/buffer.c 2014-03-23 15:12:29.907264336 +0100
+--- src/buffer.c 2014-04-06 19:55:53.563350929 +0200
+***************
+*** 676,683 ****
+ #endif
+ #ifdef FEAT_AUTOCMD
+ aubuflocal_remove(buf);
+ #endif
+! vim_free(buf);
+ }
+
+ /*
+--- 676,691 ----
+ #endif
+ #ifdef FEAT_AUTOCMD
+ aubuflocal_remove(buf);
++ if (autocmd_busy)
++ {
++ /* Do not free the buffer structure while autocommands are executing,
++ * it's still needed. Free it when autocmd_busy is reset. */
++ buf->b_next = au_pending_free_buf;
++ au_pending_free_buf = buf;
++ }
++ else
+ #endif
+! vim_free(buf);
+ }
+
+ /*
+***************
+*** 1681,1687 ****
+--- 1689,1699 ----
+ buf->b_p_bl = TRUE;
+ #ifdef FEAT_AUTOCMD
+ if (!(flags & BLN_DUMMY))
++ {
+ apply_autocmds(EVENT_BUFADD, NULL, NULL, FALSE, buf);
++ if (!buf_valid(buf))
++ return NULL;
++ }
+ #endif
+ }
+ return buf;
+***************
+*** 1857,1864 ****
+--- 1869,1882 ----
+ if (!(flags & BLN_DUMMY))
+ {
+ apply_autocmds(EVENT_BUFNEW, NULL, NULL, FALSE, buf);
++ if (!buf_valid(buf))
++ return NULL;
+ if (flags & BLN_LISTED)
++ {
+ apply_autocmds(EVENT_BUFADD, NULL, NULL, FALSE, buf);
++ if (!buf_valid(buf))
++ return NULL;
++ }
+ # ifdef FEAT_EVAL
+ if (aborting()) /* autocmds may abort script processing */
+ return NULL;
+*** ../vim-7.4.250/src/ex_cmds.c 2014-04-04 19:00:46.351940169 +0200
+--- src/ex_cmds.c 2014-04-06 20:41:37.899356924 +0200
+***************
+*** 3343,3348 ****
+--- 3343,3354 ----
+ #endif
+ buf = buflist_new(ffname, sfname, 0L,
+ BLN_CURBUF | ((flags & ECMD_SET_HELP) ? 0 : BLN_LISTED));
++ #ifdef FEAT_AUTOCMD
++ /* autocommands may change curwin and curbuf */
++ if (oldwin != NULL)
++ oldwin = curwin;
++ old_curbuf = curbuf;
++ #endif
+ }
+ if (buf == NULL)
+ goto theend;
+*** ../vim-7.4.250/src/fileio.c 2014-04-02 14:05:33.999887839 +0200
+--- src/fileio.c 2014-04-06 20:34:24.063355976 +0200
+***************
+*** 9548,9560 ****
+
+ /*
+ * When stopping to execute autocommands, restore the search patterns and
+! * the redo buffer.
+ */
+ if (!autocmd_busy)
+ {
+ restore_search_patterns();
+ restoreRedobuff();
+ did_filetype = FALSE;
+ }
+
+ /*
+--- 9548,9566 ----
+
+ /*
+ * When stopping to execute autocommands, restore the search patterns and
+! * the redo buffer. Free buffers in the au_pending_free_buf list.
+ */
+ if (!autocmd_busy)
+ {
+ restore_search_patterns();
+ restoreRedobuff();
+ did_filetype = FALSE;
++ while (au_pending_free_buf != NULL)
++ {
++ buf_T *b = au_pending_free_buf->b_next;
++ vim_free(au_pending_free_buf);
++ au_pending_free_buf = b;
++ }
+ }
+
+ /*
+*** ../vim-7.4.250/src/globals.h 2014-03-23 15:12:29.943264337 +0100
+--- src/globals.h 2014-04-06 20:32:58.339355789 +0200
+***************
+*** 386,391 ****
+--- 386,396 ----
+ /* When deleting the current buffer, another one must be loaded. If we know
+ * which one is preferred, au_new_curbuf is set to it */
+ EXTERN buf_T *au_new_curbuf INIT(= NULL);
++
++ /* When deleting the buffer and autocmd_busy is TRUE, do not free the buffer
++ * but link it in the list starting with au_pending_free_buf, using b_next.
++ * Free the buffer when autocmd_busy is set to FALSE. */
++ EXTERN buf_T *au_pending_free_buf INIT(= NULL);
+ #endif
+
+ #ifdef FEAT_MOUSE
+*** ../vim-7.4.250/src/version.c 2014-04-05 21:59:35.939178415 +0200
+--- src/version.c 2014-04-06 19:52:46.887350521 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 251,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+37. You start looking for hot HTML addresses in public restrooms.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.252 b/patches/source/vim/patches/7.4.252
new file mode 100644
index 000000000..2c02849b3
--- /dev/null
+++ b/patches/source/vim/patches/7.4.252
@@ -0,0 +1,47 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.252
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.252
+Problem: Critical error in GTK, removing timer twice.
+Solution: Clear the timer after removing it. (James McCoy)
+Files: src/gui_gtk_x11.c
+
+
+*** ../vim-7.4.251/src/gui_gtk_x11.c 2013-06-30 17:42:13.000000000 +0200
+--- src/gui_gtk_x11.c 2014-04-06 21:04:57.595359981 +0200
+***************
+*** 732,738 ****
+--- 732,741 ----
+ gui_mch_start_blink(void)
+ {
+ if (blink_timer)
++ {
+ gtk_timeout_remove(blink_timer);
++ blink_timer = 0;
++ }
+ /* Only switch blinking on if none of the times is zero */
+ if (blink_waittime && blink_ontime && blink_offtime && gui.in_focus)
+ {
+*** ../vim-7.4.251/src/version.c 2014-04-06 20:45:40.127357453 +0200
+--- src/version.c 2014-04-06 21:06:25.543360173 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 252,
+ /**/
+
+--
+Everyone has a photographic memory. Some don't have film.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.253 b/patches/source/vim/patches/7.4.253
new file mode 100644
index 000000000..dadc81bdc
--- /dev/null
+++ b/patches/source/vim/patches/7.4.253
@@ -0,0 +1,76 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.253
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.253
+Problem: Crash when using cpp syntax file with pattern using external
+ match. (Havard Garnes)
+Solution: Discard match when end column is before start column.
+Files: src/regexp.c, src/regexp_nfa.c
+
+
+*** ../vim-7.4.252/src/regexp.c 2014-04-02 19:00:53.043644100 +0200
+--- src/regexp.c 2014-04-06 21:26:17.087362776 +0200
+***************
+*** 4146,4152 ****
+ {
+ /* Only accept single line matches. */
+ if (reg_startzpos[i].lnum >= 0
+! && reg_endzpos[i].lnum == reg_startzpos[i].lnum)
+ re_extmatch_out->matches[i] =
+ vim_strnsave(reg_getline(reg_startzpos[i].lnum)
+ + reg_startzpos[i].col,
+--- 4146,4153 ----
+ {
+ /* Only accept single line matches. */
+ if (reg_startzpos[i].lnum >= 0
+! && reg_endzpos[i].lnum == reg_startzpos[i].lnum
+! && reg_endzpos[i].col >= reg_startzpos[i].col)
+ re_extmatch_out->matches[i] =
+ vim_strnsave(reg_getline(reg_startzpos[i].lnum)
+ + reg_startzpos[i].col,
+*** ../vim-7.4.252/src/regexp_nfa.c 2014-03-23 15:12:29.935264336 +0100
+--- src/regexp_nfa.c 2014-04-06 21:16:57.111361553 +0200
+***************
+*** 6781,6788 ****
+ {
+ struct multipos *mpos = &subs.synt.list.multi[i];
+
+! /* Only accept single line matches. */
+! if (mpos->start.lnum >= 0 && mpos->start.lnum == mpos->end.lnum)
+ re_extmatch_out->matches[i] =
+ vim_strnsave(reg_getline(mpos->start.lnum)
+ + mpos->start.col,
+--- 6781,6790 ----
+ {
+ struct multipos *mpos = &subs.synt.list.multi[i];
+
+! /* Only accept single line matches that are valid. */
+! if (mpos->start.lnum >= 0
+! && mpos->start.lnum == mpos->end.lnum
+! && mpos->end.col >= mpos->start.col)
+ re_extmatch_out->matches[i] =
+ vim_strnsave(reg_getline(mpos->start.lnum)
+ + mpos->start.col,
+*** ../vim-7.4.252/src/version.c 2014-04-06 21:08:41.315360470 +0200
+--- src/version.c 2014-04-06 21:33:17.271363694 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 253,
+ /**/
+
+--
+A day without sunshine is like, well, night.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.254 b/patches/source/vim/patches/7.4.254
new file mode 100644
index 000000000..a5085ba6b
--- /dev/null
+++ b/patches/source/vim/patches/7.4.254
@@ -0,0 +1,183 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.2
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.254
+Problem: Smack support detection is incomplete.
+Solution: Check for attr/xattr.h and specific macro.
+Files: src/configure.in, src/auto/configure
+
+
+*** ../vim-7.4.253/src/configure.in 2014-04-05 12:02:20.747100138 +0200
+--- src/configure.in 2014-04-10 11:02:59.256035996 +0200
+***************
+*** 396,405 ****
+ AC_MSG_RESULT(no)
+ AC_CHECK_HEADER([linux/xattr.h], true, enable_smack="no")
+ else
+! AC_MSG_RESULT(yes)
+ fi
+ if test "$enable_smack" = "yes"; then
+! AC_CHECK_LIB(attr, llistxattr,
+ [LIBS="$LIBS -lattr"
+ found_smack="yes"
+ AC_DEFINE(HAVE_SMACK)])
+--- 396,414 ----
+ AC_MSG_RESULT(no)
+ AC_CHECK_HEADER([linux/xattr.h], true, enable_smack="no")
+ else
+! AC_MSG_RESULT(yes)
+ fi
+ if test "$enable_smack" = "yes"; then
+! AC_CHECK_HEADER([attr/xattr.h], true, enable_smack="no")
+! fi
+! if test "$enable_smack" = "yes"; then
+! AC_MSG_CHECKING(for XATTR_NAME_SMACKEXEC in linux/xattr.h)
+! AC_EGREP_CPP(XATTR_NAME_SMACKEXEC, [#include <linux/xattr.h>],
+! AC_MSG_RESULT(yes),
+! AC_MSG_RESULT(no); enable_smack = "no")
+! fi
+! if test "$enable_smack" = "yes"; then
+! AC_CHECK_LIB(attr, setxattr,
+ [LIBS="$LIBS -lattr"
+ found_smack="yes"
+ AC_DEFINE(HAVE_SMACK)])
+*** ../vim-7.4.253/src/auto/configure 2014-04-05 12:02:20.751100138 +0200
+--- src/auto/configure 2014-04-10 11:03:04.220036007 +0200
+***************
+*** 4611,4623 ****
+
+
+ else
+! { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ fi
+ if test "$enable_smack" = "yes"; then
+! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for llistxattr in -lattr" >&5
+! $as_echo_n "checking for llistxattr in -lattr... " >&6; }
+! if ${ac_cv_lib_attr_llistxattr+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+--- 4611,4651 ----
+
+
+ else
+! { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ fi
+ if test "$enable_smack" = "yes"; then
+! ac_fn_c_check_header_mongrel "$LINENO" "attr/xattr.h" "ac_cv_header_attr_xattr_h" "$ac_includes_default"
+! if test "x$ac_cv_header_attr_xattr_h" = xyes; then :
+! true
+! else
+! enable_smack="no"
+! fi
+!
+!
+! fi
+! if test "$enable_smack" = "yes"; then
+! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR_NAME_SMACKEXEC in linux/xattr.h" >&5
+! $as_echo_n "checking for XATTR_NAME_SMACKEXEC in linux/xattr.h... " >&6; }
+! cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+! /* end confdefs.h. */
+! #include <linux/xattr.h>
+! _ACEOF
+! if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+! $EGREP "XATTR_NAME_SMACKEXEC" >/dev/null 2>&1; then :
+! { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+! $as_echo "yes" >&6; }
+! else
+! { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+! $as_echo "no" >&6; }; enable_smack = "no"
+! fi
+! rm -f conftest*
+!
+! fi
+! if test "$enable_smack" = "yes"; then
+! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setxattr in -lattr" >&5
+! $as_echo_n "checking for setxattr in -lattr... " >&6; }
+! if ${ac_cv_lib_attr_setxattr+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+***************
+*** 4631,4657 ****
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+! char llistxattr ();
+ int
+ main ()
+ {
+! return llistxattr ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+! ac_cv_lib_attr_llistxattr=yes
+ else
+! ac_cv_lib_attr_llistxattr=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+! { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_llistxattr" >&5
+! $as_echo "$ac_cv_lib_attr_llistxattr" >&6; }
+! if test "x$ac_cv_lib_attr_llistxattr" = xyes; then :
+ LIBS="$LIBS -lattr"
+ found_smack="yes"
+ $as_echo "#define HAVE_SMACK 1" >>confdefs.h
+--- 4659,4685 ----
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+! char setxattr ();
+ int
+ main ()
+ {
+! return setxattr ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+! ac_cv_lib_attr_setxattr=yes
+ else
+! ac_cv_lib_attr_setxattr=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+! { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_setxattr" >&5
+! $as_echo "$ac_cv_lib_attr_setxattr" >&6; }
+! if test "x$ac_cv_lib_attr_setxattr" = xyes; then :
+ LIBS="$LIBS -lattr"
+ found_smack="yes"
+ $as_echo "#define HAVE_SMACK 1" >>confdefs.h
+*** ../vim-7.4.253/src/version.c 2014-04-06 21:33:39.675363743 +0200
+--- src/version.c 2014-04-10 11:00:57.200035730 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 254,
+ /**/
+
+--
+George: "I just got a new set of golf clubs for my wife!"
+ John: "Great trade!"
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.255 b/patches/source/vim/patches/7.4.255
new file mode 100644
index 000000000..5741a5ee7
--- /dev/null
+++ b/patches/source/vim/patches/7.4.255
@@ -0,0 +1,108 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.255
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.255
+Problem: Configure check for smack doesn't work with all shells. (David
+ Larson)
+Solution: Remove spaces in set command.
+Files: src/configure.in, src/auto/configure
+
+
+*** ../vim-7.4.254/src/configure.in 2014-04-10 11:09:11.676036810 +0200
+--- src/configure.in 2014-04-10 19:53:38.884105545 +0200
+***************
+*** 405,411 ****
+ AC_MSG_CHECKING(for XATTR_NAME_SMACKEXEC in linux/xattr.h)
+ AC_EGREP_CPP(XATTR_NAME_SMACKEXEC, [#include <linux/xattr.h>],
+ AC_MSG_RESULT(yes),
+! AC_MSG_RESULT(no); enable_smack = "no")
+ fi
+ if test "$enable_smack" = "yes"; then
+ AC_CHECK_LIB(attr, setxattr,
+--- 405,411 ----
+ AC_MSG_CHECKING(for XATTR_NAME_SMACKEXEC in linux/xattr.h)
+ AC_EGREP_CPP(XATTR_NAME_SMACKEXEC, [#include <linux/xattr.h>],
+ AC_MSG_RESULT(yes),
+! AC_MSG_RESULT(no); enable_smack="no")
+ fi
+ if test "$enable_smack" = "yes"; then
+ AC_CHECK_LIB(attr, setxattr,
+***************
+*** 2643,2649 ****
+ AC_MSG_CHECKING(for XIMText in X11/Xlib.h)
+ AC_EGREP_CPP(XIMText, [#include <X11/Xlib.h>],
+ AC_MSG_RESULT(yes),
+! AC_MSG_RESULT(no; xim has been disabled); enable_xim = "no")
+ fi
+ CPPFLAGS=$cppflags_save
+
+--- 2643,2649 ----
+ AC_MSG_CHECKING(for XIMText in X11/Xlib.h)
+ AC_EGREP_CPP(XIMText, [#include <X11/Xlib.h>],
+ AC_MSG_RESULT(yes),
+! AC_MSG_RESULT(no; xim has been disabled); enable_xim="no")
+ fi
+ CPPFLAGS=$cppflags_save
+
+*** ../vim-7.4.254/src/auto/configure 2014-04-10 11:09:11.684036810 +0200
+--- src/auto/configure 2014-04-10 19:53:54.032105578 +0200
+***************
+*** 4637,4643 ****
+ $as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+! $as_echo "no" >&6; }; enable_smack = "no"
+ fi
+ rm -f conftest*
+
+--- 4637,4643 ----
+ $as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+! $as_echo "no" >&6; }; enable_smack="no"
+ fi
+ rm -f conftest*
+
+***************
+*** 9303,9309 ****
+ $as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; xim has been disabled" >&5
+! $as_echo "no; xim has been disabled" >&6; }; enable_xim = "no"
+ fi
+ rm -f conftest*
+
+--- 9303,9309 ----
+ $as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; xim has been disabled" >&5
+! $as_echo "no; xim has been disabled" >&6; }; enable_xim="no"
+ fi
+ rm -f conftest*
+
+*** ../vim-7.4.254/src/version.c 2014-04-10 11:09:11.684036810 +0200
+--- src/version.c 2014-04-10 19:56:55.272105974 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 255,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+40. You tell the cab driver you live at
+ http://123.elm.street/house/bluetrim.html
+41. You actually try that 123.elm.street address.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.256 b/patches/source/vim/patches/7.4.256
new file mode 100644
index 000000000..ef2a859ac
--- /dev/null
+++ b/patches/source/vim/patches/7.4.256
@@ -0,0 +1,83 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.2
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.256 (after 7.4.248)
+Problem: Using systemlist() may cause a crash and does not handle NUL
+ characters properly.
+Solution: Increase the reference count, allocate memory by length. (Yasuhiro
+ Matsumoto)
+Files: src/eval.c
+
+
+*** ../vim-7.4.255/src/eval.c 2014-04-05 21:28:50.667174384 +0200
+--- src/eval.c 2014-04-11 10:10:22.112217827 +0200
+***************
+*** 18334,18349 ****
+ for (i = 0; i < len; ++i)
+ {
+ start = res + i;
+! for (end = start; i < len && *end != NL; ++end)
+ ++i;
+
+! s = vim_strnsave(start, (int)(end - start));
+ if (s == NULL)
+ goto errret;
+
+! for (p = s, end = s + (end - start); p < end; ++p)
+! if (*p == NUL)
+! *p = NL;
+
+ li = listitem_alloc();
+ if (li == NULL)
+--- 18334,18350 ----
+ for (i = 0; i < len; ++i)
+ {
+ start = res + i;
+! while (i < len && res[i] != NL)
+ ++i;
++ end = res + i;
+
+! s = alloc((unsigned)(end - start + 1));
+ if (s == NULL)
+ goto errret;
+
+! for (p = s; start < end; ++p, ++start)
+! *p = *start == NUL ? NL : *start;
+! *p = NUL;
+
+ li = listitem_alloc();
+ if (li == NULL)
+***************
+*** 18356,18361 ****
+--- 18357,18363 ----
+ list_append(list, li);
+ }
+
++ ++list->lv_refcount;
+ rettv->v_type = VAR_LIST;
+ rettv->vval.v_list = list;
+ list = NULL;
+*** ../vim-7.4.255/src/version.c 2014-04-10 20:00:03.720106386 +0200
+--- src/version.c 2014-04-11 09:44:05.208214383 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 256,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+46. Your wife makes a new rule: "The computer cannot come to bed."
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.257 b/patches/source/vim/patches/7.4.257
new file mode 100644
index 000000000..67974a873
--- /dev/null
+++ b/patches/source/vim/patches/7.4.257
@@ -0,0 +1,64 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.257
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.257
+Problem: Compiler warning, possibly for mismatch in parameter name.
+Solution: Rename the parameter in the declaration.
+Files: src/ops.c
+
+*** ../vim-7.4.256/src/ops.c 2014-04-02 22:17:00.003482236 +0200
+--- src/ops.c 2014-04-12 12:23:59.308424067 +0200
+***************
+*** 113,119 ****
+ #endif
+ static void block_prep __ARGS((oparg_T *oap, struct block_def *, linenr_T, int));
+ #if defined(FEAT_CLIPBOARD) || defined(FEAT_EVAL)
+! static void str_to_reg __ARGS((struct yankreg *y_ptr, int type, char_u *str, long len, long blocklen, int str_list));
+ #endif
+ static int ends_in_white __ARGS((linenr_T lnum));
+ #ifdef FEAT_COMMENTS
+--- 113,119 ----
+ #endif
+ static void block_prep __ARGS((oparg_T *oap, struct block_def *, linenr_T, int));
+ #if defined(FEAT_CLIPBOARD) || defined(FEAT_EVAL)
+! static void str_to_reg __ARGS((struct yankreg *y_ptr, int yank_type, char_u *str, long len, long blocklen, int str_list));
+ #endif
+ static int ends_in_white __ARGS((linenr_T lnum));
+ #ifdef FEAT_COMMENTS
+*** ../vim-7.4.256/src/version.c 2014-04-11 10:22:46.288219453 +0200
+--- src/version.c 2014-04-12 12:25:44.176424296 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 257,
+ /**/
+
+--
+The real
+trick is
+this: to
+keep the
+lines as
+short as
+possible
+and keep
+the size
+the same
+yet free
+from the
+need for
+hyphena-
+Dammit!! (Matthew Winn)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.258 b/patches/source/vim/patches/7.4.258
new file mode 100644
index 000000000..d4233452c
--- /dev/null
+++ b/patches/source/vim/patches/7.4.258
@@ -0,0 +1,114 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.258
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.258
+Problem: Configure fails if $CC contains options.
+Solution: Remove quotes around $CC. (Paul Barker)
+Files: src/configure.in, src/auto/configure
+
+
+*** ../vim-7.4.257/src/configure.in 2014-04-10 20:00:03.708106386 +0200
+--- src/configure.in 2014-04-12 13:00:51.332428899 +0200
+***************
+*** 46,55 ****
+ fi
+ if test "$GCC" = yes; then
+ dnl method that should work for nearly all versions
+! gccversion=`"$CC" -dumpversion`
+ if test "x$gccversion" = "x"; then
+ dnl old method; fall-back for when -dumpversion doesn't work
+! gccversion=`"$CC" --version | sed -e '2,$d' -e 's/darwin.//' -e 's/^[[^0-9]]*\([[0-9]]\.[[0-9.]]*\).*$/\1/g'`
+ fi
+ dnl version 4.0.1 was reported to cause trouble on Macintosh by Marcin Dalecki
+ if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then
+--- 46,55 ----
+ fi
+ if test "$GCC" = yes; then
+ dnl method that should work for nearly all versions
+! gccversion=`$CC -dumpversion`
+ if test "x$gccversion" = "x"; then
+ dnl old method; fall-back for when -dumpversion doesn't work
+! gccversion=`$CC --version | sed -e '2,$d' -e 's/darwin.//' -e 's/^[[^0-9]]*\([[0-9]]\.[[0-9.]]*\).*$/\1/g'`
+ fi
+ dnl version 4.0.1 was reported to cause trouble on Macintosh by Marcin Dalecki
+ if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then
+***************
+*** 68,74 ****
+ dnl the version number of the clang in use.
+ dnl Note that this does not work to get the version of clang 3.1 or 3.2.
+ AC_MSG_CHECKING(for recent clang version)
+! CLANG_VERSION_STRING=`"$CC" --version 2>/dev/null | sed -n -e 's/^.*clang.*\([[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\).*$/\1/p'`
+ if test x"$CLANG_VERSION_STRING" != x"" ; then
+ CLANG_MAJOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/\([[0-9]][[0-9]]*\)\.[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*/\1/p'`
+ CLANG_MINOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[[0-9]][[0-9]]*\.\([[0-9]][[0-9]]*\)\.[[0-9]][[0-9]]*/\1/p'`
+--- 68,74 ----
+ dnl the version number of the clang in use.
+ dnl Note that this does not work to get the version of clang 3.1 or 3.2.
+ AC_MSG_CHECKING(for recent clang version)
+! CLANG_VERSION_STRING=`$CC --version 2>/dev/null | sed -n -e 's/^.*clang.*\([[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\).*$/\1/p'`
+ if test x"$CLANG_VERSION_STRING" != x"" ; then
+ CLANG_MAJOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/\([[0-9]][[0-9]]*\)\.[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*/\1/p'`
+ CLANG_MINOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[[0-9]][[0-9]]*\.\([[0-9]][[0-9]]*\)\.[[0-9]][[0-9]]*/\1/p'`
+*** ../vim-7.4.257/src/auto/configure 2014-04-10 20:00:03.716106386 +0200
+--- src/auto/configure 2014-04-12 13:00:58.436428915 +0200
+***************
+*** 4074,4082 ****
+ test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall"
+ fi
+ if test "$GCC" = yes; then
+! gccversion=`"$CC" -dumpversion`
+ if test "x$gccversion" = "x"; then
+! gccversion=`"$CC" --version | sed -e '2,$d' -e 's/darwin.//' -e 's/^[^0-9]*\([0-9]\.[0-9.]*\).*$/\1/g'`
+ fi
+ if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then
+ echo 'GCC [34].0.[12] has a bug in the optimizer, disabling "-O#"'
+--- 4074,4082 ----
+ test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall"
+ fi
+ if test "$GCC" = yes; then
+! gccversion=`$CC -dumpversion`
+ if test "x$gccversion" = "x"; then
+! gccversion=`$CC --version | sed -e '2,$d' -e 's/darwin.//' -e 's/^[^0-9]*\([0-9]\.[0-9.]*\).*$/\1/g'`
+ fi
+ if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then
+ echo 'GCC [34].0.[12] has a bug in the optimizer, disabling "-O#"'
+***************
+*** 4091,4097 ****
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recent clang version" >&5
+ $as_echo_n "checking for recent clang version... " >&6; }
+! CLANG_VERSION_STRING=`"$CC" --version 2>/dev/null | sed -n -e 's/^.*clang.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*$/\1/p'`
+ if test x"$CLANG_VERSION_STRING" != x"" ; then
+ CLANG_MAJOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*/\1/p'`
+ CLANG_MINOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/p'`
+--- 4091,4097 ----
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recent clang version" >&5
+ $as_echo_n "checking for recent clang version... " >&6; }
+! CLANG_VERSION_STRING=`$CC --version 2>/dev/null | sed -n -e 's/^.*clang.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*$/\1/p'`
+ if test x"$CLANG_VERSION_STRING" != x"" ; then
+ CLANG_MAJOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*/\1/p'`
+ CLANG_MINOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/p'`
+*** ../vim-7.4.257/src/version.c 2014-04-12 12:26:25.856424387 +0200
+--- src/version.c 2014-04-12 13:05:09.372429463 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 258,
+ /**/
+
+--
+Never go to the toilet in a paperless office.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.259 b/patches/source/vim/patches/7.4.259
new file mode 100644
index 000000000..e8f28b59e
--- /dev/null
+++ b/patches/source/vim/patches/7.4.259
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.259
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.259
+Problem: Warning for misplaced "const".
+Solution: Move the "const". (Yukihiro Nakadaira)
+Files: src/os_unix.c
+
+
+*** ../vim-7.4.258/src/os_unix.c 2014-04-02 23:09:23.003439001 +0200
+--- src/os_unix.c 2014-04-23 12:40:45.931386548 +0200
+***************
+*** 2815,2821 ****
+ char_u *from_file;
+ char_u *to_file;
+ {
+! static const char const *smack_copied_attributes[] =
+ {
+ XATTR_NAME_SMACK,
+ XATTR_NAME_SMACKEXEC,
+--- 2815,2821 ----
+ char_u *from_file;
+ char_u *to_file;
+ {
+! static const char * const smack_copied_attributes[] =
+ {
+ XATTR_NAME_SMACK,
+ XATTR_NAME_SMACKEXEC,
+*** ../vim-7.4.258/src/version.c 2014-04-12 13:11:58.272430356 +0200
+--- src/version.c 2014-04-23 12:49:22.587374098 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 259,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+91. It's Saturday afternoon in the middle of May and you
+ are on computer.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.260 b/patches/source/vim/patches/7.4.260
new file mode 100644
index 000000000..2ac9669b6
--- /dev/null
+++ b/patches/source/vim/patches/7.4.260
@@ -0,0 +1,281 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.260
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.260
+Problem: It is possible to define a function with a colon in the name. It
+ is possible to define a function with a lower case character if a
+ "#" appears after the name.
+Solution: Disallow using a colon other than with "s:". Ignore "#" after the
+ name.
+Files: runtime/doc/eval.txt, src/eval.c, src/testdir/test_eval.in,
+ src/testdir/test_eval.ok
+
+
+*** ../vim-7.4.259/runtime/doc/eval.txt 2014-04-05 19:44:36.891160723 +0200
+--- runtime/doc/eval.txt 2014-04-23 17:19:57.914982886 +0200
+***************
+*** 123,128 ****
+--- 123,129 ----
+ :echo Fn()
+ < *E704* *E705* *E707*
+ A Funcref variable must start with a capital, "s:", "w:", "t:" or "b:". You
++ can use "g:" but the following name must still start with a capital. You
+ cannot have both a Funcref variable and a function with the same name.
+
+ A special case is defining a function and directly assigning its Funcref to a
+***************
+*** 6675,6680 ****
+--- 6691,6698 ----
+ and autocommands defined in the script. It is also possible to call the
+ function from a mapping defined in the script, but then |<SID>| must be used
+ instead of "s:" when the mapping is expanded outside of the script.
++ There are only script-local functions, no buffer-local or window-local
++ functions.
+
+ *:fu* *:function* *E128* *E129* *E123*
+ :fu[nction] List all functions and their arguments.
+***************
+*** 6698,6708 ****
+ <
+ See |:verbose-cmd| for more information.
+
+! *E124* *E125* *E853*
+ :fu[nction][!] {name}([arguments]) [range] [abort] [dict]
+ Define a new function by the name {name}. The name
+ must be made of alphanumeric characters and '_', and
+! must start with a capital or "s:" (see above).
+
+ {name} can also be a |Dictionary| entry that is a
+ |Funcref|: >
+--- 6716,6727 ----
+ <
+ See |:verbose-cmd| for more information.
+
+! *E124* *E125* *E853* *E884*
+ :fu[nction][!] {name}([arguments]) [range] [abort] [dict]
+ Define a new function by the name {name}. The name
+ must be made of alphanumeric characters and '_', and
+! must start with a capital or "s:" (see above). Note
+! that using "b:" or "g:" is not allowed.
+
+ {name} can also be a |Dictionary| entry that is a
+ |Funcref|: >
+*** ../vim-7.4.259/src/eval.c 2014-04-11 10:22:46.288219453 +0200
+--- src/eval.c 2014-04-23 17:37:23.890957682 +0200
+***************
+*** 808,814 ****
+ static void list_func_head __ARGS((ufunc_T *fp, int indent));
+ static ufunc_T *find_func __ARGS((char_u *name));
+ static int function_exists __ARGS((char_u *name));
+! static int builtin_function __ARGS((char_u *name));
+ #ifdef FEAT_PROFILE
+ static void func_do_profile __ARGS((ufunc_T *fp));
+ static void prof_sort_list __ARGS((FILE *fd, ufunc_T **sorttab, int st_len, char *title, int prefer_self));
+--- 808,814 ----
+ static void list_func_head __ARGS((ufunc_T *fp, int indent));
+ static ufunc_T *find_func __ARGS((char_u *name));
+ static int function_exists __ARGS((char_u *name));
+! static int builtin_function __ARGS((char_u *name, int len));
+ #ifdef FEAT_PROFILE
+ static void func_do_profile __ARGS((ufunc_T *fp));
+ static void prof_sort_list __ARGS((FILE *fd, ufunc_T **sorttab, int st_len, char *title, int prefer_self));
+***************
+*** 8489,8495 ****
+ rettv->vval.v_number = 0;
+ error = ERROR_UNKNOWN;
+
+! if (!builtin_function(fname))
+ {
+ /*
+ * User defined function.
+--- 8489,8495 ----
+ rettv->vval.v_number = 0;
+ error = ERROR_UNKNOWN;
+
+! if (!builtin_function(fname, -1))
+ {
+ /*
+ * User defined function.
+***************
+*** 21584,21589 ****
+--- 21584,21590 ----
+ * Get the function name. There are these situations:
+ * func normal function name
+ * "name" == func, "fudi.fd_dict" == NULL
++ * s:func script-local function name
+ * dict.func new dictionary entry
+ * "name" == NULL, "fudi.fd_dict" set,
+ * "fudi.fd_di" == NULL, "fudi.fd_newkey" == func
+***************
+*** 22314,22324 ****
+ lead += (int)STRLEN(sid_buf);
+ }
+ }
+! else if (!(flags & TFN_INT) && builtin_function(lv.ll_name))
+ {
+! EMSG2(_("E128: Function name must start with a capital or contain a colon: %s"), lv.ll_name);
+ goto theend;
+ }
+ name = alloc((unsigned)(len + lead + 1));
+ if (name != NULL)
+ {
+--- 22315,22338 ----
+ lead += (int)STRLEN(sid_buf);
+ }
+ }
+! else if (!(flags & TFN_INT) && builtin_function(lv.ll_name, len))
+ {
+! EMSG2(_("E128: Function name must start with a capital or \"s:\": %s"),
+! lv.ll_name);
+ goto theend;
+ }
++ if (!skip)
++ {
++ char_u *cp = vim_strchr(lv.ll_name, ':');
++
++ if (cp != NULL && cp < end)
++ {
++ EMSG2(_("E884: Function name cannot contain a colon: %s"),
++ lv.ll_name);
++ goto theend;
++ }
++ }
++
+ name = alloc((unsigned)(len + lead + 1));
+ if (name != NULL)
+ {
+***************
+*** 22331,22337 ****
+ STRCPY(name + 3, sid_buf);
+ }
+ mch_memmove(name + lead, lv.ll_name, (size_t)len);
+! name[len + lead] = NUL;
+ }
+ *pp = end;
+
+--- 22345,22351 ----
+ STRCPY(name + 3, sid_buf);
+ }
+ mch_memmove(name + lead, lv.ll_name, (size_t)len);
+! name[lead + len] = NUL;
+ }
+ *pp = end;
+
+***************
+*** 22452,22458 ****
+ translated_function_exists(name)
+ char_u *name;
+ {
+! if (builtin_function(name))
+ return find_internal_func(name) >= 0;
+ return find_func(name) != NULL;
+ }
+--- 22466,22472 ----
+ translated_function_exists(name)
+ char_u *name;
+ {
+! if (builtin_function(name, -1))
+ return find_internal_func(name) >= 0;
+ return find_func(name) != NULL;
+ }
+***************
+*** 22500,22513 ****
+
+ /*
+ * Return TRUE if "name" looks like a builtin function name: starts with a
+! * lower case letter and doesn't contain a ':' or AUTOLOAD_CHAR.
+ */
+ static int
+! builtin_function(name)
+ char_u *name;
+ {
+! return ASCII_ISLOWER(name[0]) && vim_strchr(name, ':') == NULL
+! && vim_strchr(name, AUTOLOAD_CHAR) == NULL;
+ }
+
+ #if defined(FEAT_PROFILE) || defined(PROTO)
+--- 22514,22533 ----
+
+ /*
+ * Return TRUE if "name" looks like a builtin function name: starts with a
+! * lower case letter and doesn't contain AUTOLOAD_CHAR.
+! * "len" is the length of "name", or -1 for NUL terminated.
+ */
+ static int
+! builtin_function(name, len)
+ char_u *name;
++ int len;
+ {
+! char_u *p;
+!
+! if (!ASCII_ISLOWER(name[0]))
+! return FALSE;
+! p = vim_strchr(name, AUTOLOAD_CHAR);
+! return p == NULL || (len > 0 && p > name + len);
+ }
+
+ #if defined(FEAT_PROFILE) || defined(PROTO)
+*** ../vim-7.4.259/src/testdir/test_eval.in 2014-04-05 21:28:50.667174384 +0200
+--- src/testdir/test_eval.in 2014-04-23 17:35:12.086960858 +0200
+***************
+*** 144,149 ****
+--- 144,167 ----
+ :delcommand AR
+ :call garbagecollect(1)
+ :"
++ :" function name includes a colon
++ :try
++ :func! g:test()
++ :echo "test"
++ :endfunc
++ :catch
++ :$put =v:exception
++ :endtry
++ :"
++ :" function name folowed by #
++ :try
++ :func! test2() "#
++ :echo "test2"
++ :endfunc
++ :catch
++ :$put =v:exception
++ :endtry
++ :"
+ :/^start:/+1,$wq! test.out
+ :" vim: et ts=4 isk-=\: fmr=???,???
+ :call getchar()
+*** ../vim-7.4.259/src/testdir/test_eval.ok 2014-04-05 21:28:50.667174384 +0200
+--- src/testdir/test_eval.ok 2014-04-23 17:36:34.602958870 +0200
+***************
+*** 335,337 ****
+--- 335,339 ----
+ Vim(call):E883: search pattern and expression register may not contain two or more lines
+ Executing call setreg(1, ["", "", [], ""])
+ Vim(call):E730: using List as a String
++ Vim(function):E128: Function name must start with a capital or "s:": g:test()
++ Vim(function):E128: Function name must start with a capital or "s:": test2() "#
+*** ../vim-7.4.259/src/version.c 2014-04-23 12:52:36.499369426 +0200
+--- src/version.c 2014-04-23 17:17:50.994985945 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 260,
+ /**/
+
+--
+From "know your smileys":
+ ;-0 Can't find shift key
+ ,-9 Kann Umschalttaste nicht finden
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.261 b/patches/source/vim/patches/7.4.261
new file mode 100644
index 000000000..a9ca118c1
--- /dev/null
+++ b/patches/source/vim/patches/7.4.261
@@ -0,0 +1,106 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.261
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.261
+Problem: When updating the window involves a regexp pattern, an interactive
+ substitute to replace a "\n" with a line break fails. (Ingo
+ Karkat)
+Solution: Set reg_line_lbr in vim_regsub() and vim_regsub_multi().
+Files: src/regexp.c, src/testdir/test79.in, src/testdir/test79.ok
+
+
+*** ../vim-7.4.260/src/regexp.c 2014-04-06 21:33:39.671363743 +0200
+--- src/regexp.c 2014-04-23 18:40:37.094866280 +0200
+***************
+*** 7381,7386 ****
+--- 7381,7387 ----
+ reg_mmatch = NULL;
+ reg_maxline = 0;
+ reg_buf = curbuf;
++ reg_line_lbr = TRUE;
+ return vim_regsub_both(source, dest, copy, magic, backslash);
+ }
+ #endif
+***************
+*** 7400,7405 ****
+--- 7401,7407 ----
+ reg_buf = curbuf; /* always works on the current buffer! */
+ reg_firstlnum = lnum;
+ reg_maxline = curbuf->b_ml.ml_line_count - lnum;
++ reg_line_lbr = FALSE;
+ return vim_regsub_both(source, dest, copy, magic, backslash);
+ }
+
+*** ../vim-7.4.260/src/testdir/test79.in 2014-04-02 19:00:53.043644100 +0200
+--- src/testdir/test79.in 2014-04-23 18:36:29.158872254 +0200
+***************
+*** 1,6 ****
+--- 1,7 ----
+ Test for *sub-replace-special* and *sub-replace-expression* on :substitute.
+ Test for submatch() on :substitue.
+ Test for *:s%* on :substitute.
++ Test for :s replacing \n with line break.
+
+ STARTTEST
+ :so small.vim
+***************
+*** 234,239 ****
+--- 235,254 ----
+ Q
+
+ STARTTEST
++ :function! TitleString()
++ let check = 'foo' =~ 'bar'
++ return ""
++ endfunction
++ :set titlestring=%{TitleString()}
++ :/^test_one/s/.*/\="foo\nbar"/
++ :/^test_two/s/.*/\="foo\nbar"/c
++ y
++ ENDTEST
++
++ test_one
++ test_two
++
++ STARTTEST
+ :g/^STARTTEST/.,/^ENDTEST/d
+ :1;/^Results/,$wq! test.out
+ :call getchar()
+*** ../vim-7.4.260/src/testdir/test79.ok 2014-04-02 19:00:53.043644100 +0200
+--- src/testdir/test79.ok 2014-04-23 18:35:30.650873664 +0200
+***************
+*** 126,128 ****
+--- 126,134 ----
+ Q
+ Q
+
++
++ foo
++ bar
++ foo
++ bar
++
+*** ../vim-7.4.260/src/version.c 2014-04-23 17:43:37.366948683 +0200
+--- src/version.c 2014-04-23 18:46:45.250857408 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 261,
+ /**/
+
+--
+From "know your smileys":
+ !-| I-am-a-Cylon-Centurian-with-one-red-eye-bouncing-back-and-forth
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.262 b/patches/source/vim/patches/7.4.262
new file mode 100644
index 000000000..ef29032e2
--- /dev/null
+++ b/patches/source/vim/patches/7.4.262
@@ -0,0 +1,314 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.262
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.262
+Problem: Duplicate code in regexec().
+Solution: Add line_lbr flag to regexec_nl().
+Files: src/regexp.c, src/regexp_nfa.c, src/regexp.h
+
+
+*** ../vim-7.4.261/src/regexp.c 2014-04-23 18:48:43.546854558 +0200
+--- src/regexp.c 2014-04-23 18:59:38.606838773 +0200
+***************
+*** 3709,3733 ****
+ /* TRUE if using multi-line regexp. */
+ #define REG_MULTI (reg_match == NULL)
+
+! static int bt_regexec __ARGS((regmatch_T *rmp, char_u *line, colnr_T col));
+
+ /*
+ * Match a regexp against a string.
+ * "rmp->regprog" is a compiled regexp as returned by vim_regcomp().
+ * Uses curbuf for line count and 'iskeyword'.
+ *
+ * Return TRUE if there is a match, FALSE if not.
+ */
+ static int
+! bt_regexec(rmp, line, col)
+ regmatch_T *rmp;
+ char_u *line; /* string to match against */
+ colnr_T col; /* column to start looking for match */
+ {
+ reg_match = rmp;
+ reg_mmatch = NULL;
+ reg_maxline = 0;
+! reg_line_lbr = FALSE;
+ reg_buf = curbuf;
+ reg_win = NULL;
+ ireg_ic = rmp->rm_ic;
+--- 3709,3736 ----
+ /* TRUE if using multi-line regexp. */
+ #define REG_MULTI (reg_match == NULL)
+
+! static int bt_regexec_nl __ARGS((regmatch_T *rmp, char_u *line, colnr_T col, int line_lbr));
+!
+
+ /*
+ * Match a regexp against a string.
+ * "rmp->regprog" is a compiled regexp as returned by vim_regcomp().
+ * Uses curbuf for line count and 'iskeyword'.
++ * if "line_lbr" is TRUE consider a "\n" in "line" to be a line break.
+ *
+ * Return TRUE if there is a match, FALSE if not.
+ */
+ static int
+! bt_regexec_nl(rmp, line, col, line_lbr)
+ regmatch_T *rmp;
+ char_u *line; /* string to match against */
+ colnr_T col; /* column to start looking for match */
++ int line_lbr;
+ {
+ reg_match = rmp;
+ reg_mmatch = NULL;
+ reg_maxline = 0;
+! reg_line_lbr = line_lbr;
+ reg_buf = curbuf;
+ reg_win = NULL;
+ ireg_ic = rmp->rm_ic;
+***************
+*** 3738,3772 ****
+ return (bt_regexec_both(line, col, NULL) != 0);
+ }
+
+- #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \
+- || defined(FIND_REPLACE_DIALOG) || defined(PROTO)
+-
+- static int bt_regexec_nl __ARGS((regmatch_T *rmp, char_u *line, colnr_T col));
+-
+- /*
+- * Like vim_regexec(), but consider a "\n" in "line" to be a line break.
+- */
+- static int
+- bt_regexec_nl(rmp, line, col)
+- regmatch_T *rmp;
+- char_u *line; /* string to match against */
+- colnr_T col; /* column to start looking for match */
+- {
+- reg_match = rmp;
+- reg_mmatch = NULL;
+- reg_maxline = 0;
+- reg_line_lbr = TRUE;
+- reg_buf = curbuf;
+- reg_win = NULL;
+- ireg_ic = rmp->rm_ic;
+- #ifdef FEAT_MBYTE
+- ireg_icombine = FALSE;
+- #endif
+- ireg_maxcol = 0;
+- return (bt_regexec_both(line, col, NULL) != 0);
+- }
+- #endif
+-
+ static long bt_regexec_multi __ARGS((regmmatch_T *rmp, win_T *win, buf_T *buf, linenr_T lnum, colnr_T col, proftime_T *tm));
+
+ /*
+--- 3741,3746 ----
+***************
+*** 7985,7995 ****
+ {
+ bt_regcomp,
+ bt_regfree,
+- bt_regexec,
+- #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \
+- || defined(FIND_REPLACE_DIALOG) || defined(PROTO)
+ bt_regexec_nl,
+- #endif
+ bt_regexec_multi
+ #ifdef DEBUG
+ ,(char_u *)""
+--- 7959,7965 ----
+***************
+*** 8003,8013 ****
+ {
+ nfa_regcomp,
+ nfa_regfree,
+- nfa_regexec,
+- #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \
+- || defined(FIND_REPLACE_DIALOG) || defined(PROTO)
+ nfa_regexec_nl,
+- #endif
+ nfa_regexec_multi
+ #ifdef DEBUG
+ ,(char_u *)""
+--- 7973,7979 ----
+***************
+*** 8131,8137 ****
+ char_u *line; /* string to match against */
+ colnr_T col; /* column to start looking for match */
+ {
+! return rmp->regprog->engine->regexec(rmp, line, col);
+ }
+
+ #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \
+--- 8097,8103 ----
+ char_u *line; /* string to match against */
+ colnr_T col; /* column to start looking for match */
+ {
+! return rmp->regprog->engine->regexec_nl(rmp, line, col, FALSE);
+ }
+
+ #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \
+***************
+*** 8145,8151 ****
+ char_u *line;
+ colnr_T col;
+ {
+! return rmp->regprog->engine->regexec_nl(rmp, line, col);
+ }
+ #endif
+
+--- 8111,8117 ----
+ char_u *line;
+ colnr_T col;
+ {
+! return rmp->regprog->engine->regexec_nl(rmp, line, col, TRUE);
+ }
+ #endif
+
+*** ../vim-7.4.261/src/regexp_nfa.c 2014-04-06 21:33:39.675363743 +0200
+--- src/regexp_nfa.c 2014-04-23 19:00:44.354837189 +0200
+***************
+*** 311,317 ****
+ static long nfa_regexec_both __ARGS((char_u *line, colnr_T col));
+ static regprog_T *nfa_regcomp __ARGS((char_u *expr, int re_flags));
+ static void nfa_regfree __ARGS((regprog_T *prog));
+! static int nfa_regexec __ARGS((regmatch_T *rmp, char_u *line, colnr_T col));
+ static long nfa_regexec_multi __ARGS((regmmatch_T *rmp, win_T *win, buf_T *buf, linenr_T lnum, colnr_T col, proftime_T *tm));
+ static int match_follows __ARGS((nfa_state_T *startstate, int depth));
+ static int failure_chance __ARGS((nfa_state_T *state, int depth));
+--- 311,317 ----
+ static long nfa_regexec_both __ARGS((char_u *line, colnr_T col));
+ static regprog_T *nfa_regcomp __ARGS((char_u *expr, int re_flags));
+ static void nfa_regfree __ARGS((regprog_T *prog));
+! static int nfa_regexec_nl __ARGS((regmatch_T *rmp, char_u *line, colnr_T col, int line_lbr));
+ static long nfa_regexec_multi __ARGS((regmmatch_T *rmp, win_T *win, buf_T *buf, linenr_T lnum, colnr_T col, proftime_T *tm));
+ static int match_follows __ARGS((nfa_state_T *startstate, int depth));
+ static int failure_chance __ARGS((nfa_state_T *state, int depth));
+***************
+*** 7060,7078 ****
+ * Match a regexp against a string.
+ * "rmp->regprog" is a compiled regexp as returned by nfa_regcomp().
+ * Uses curbuf for line count and 'iskeyword'.
+ *
+ * Return TRUE if there is a match, FALSE if not.
+ */
+ static int
+! nfa_regexec(rmp, line, col)
+ regmatch_T *rmp;
+ char_u *line; /* string to match against */
+ colnr_T col; /* column to start looking for match */
+ {
+ reg_match = rmp;
+ reg_mmatch = NULL;
+ reg_maxline = 0;
+! reg_line_lbr = FALSE;
+ reg_buf = curbuf;
+ reg_win = NULL;
+ ireg_ic = rmp->rm_ic;
+--- 7060,7080 ----
+ * Match a regexp against a string.
+ * "rmp->regprog" is a compiled regexp as returned by nfa_regcomp().
+ * Uses curbuf for line count and 'iskeyword'.
++ * If "line_lbr" is TRUE consider a "\n" in "line" to be a line break.
+ *
+ * Return TRUE if there is a match, FALSE if not.
+ */
+ static int
+! nfa_regexec_nl(rmp, line, col, line_lbr)
+ regmatch_T *rmp;
+ char_u *line; /* string to match against */
+ colnr_T col; /* column to start looking for match */
++ int line_lbr;
+ {
+ reg_match = rmp;
+ reg_mmatch = NULL;
+ reg_maxline = 0;
+! reg_line_lbr = line_lbr;
+ reg_buf = curbuf;
+ reg_win = NULL;
+ ireg_ic = rmp->rm_ic;
+***************
+*** 7083,7117 ****
+ return (nfa_regexec_both(line, col) != 0);
+ }
+
+- #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \
+- || defined(FIND_REPLACE_DIALOG) || defined(PROTO)
+-
+- static int nfa_regexec_nl __ARGS((regmatch_T *rmp, char_u *line, colnr_T col));
+-
+- /*
+- * Like nfa_regexec(), but consider a "\n" in "line" to be a line break.
+- */
+- static int
+- nfa_regexec_nl(rmp, line, col)
+- regmatch_T *rmp;
+- char_u *line; /* string to match against */
+- colnr_T col; /* column to start looking for match */
+- {
+- reg_match = rmp;
+- reg_mmatch = NULL;
+- reg_maxline = 0;
+- reg_line_lbr = TRUE;
+- reg_buf = curbuf;
+- reg_win = NULL;
+- ireg_ic = rmp->rm_ic;
+- #ifdef FEAT_MBYTE
+- ireg_icombine = FALSE;
+- #endif
+- ireg_maxcol = 0;
+- return (nfa_regexec_both(line, col) != 0);
+- }
+- #endif
+-
+
+ /*
+ * Match a regexp against multiple lines.
+--- 7085,7090 ----
+*** ../vim-7.4.261/src/regexp.h 2013-06-11 10:53:14.000000000 +0200
+--- src/regexp.h 2014-04-23 18:58:18.614840701 +0200
+***************
+*** 149,159 ****
+ {
+ regprog_T *(*regcomp)(char_u*, int);
+ void (*regfree)(regprog_T *);
+! int (*regexec)(regmatch_T*, char_u*, colnr_T);
+! #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \
+! || defined(FIND_REPLACE_DIALOG) || defined(PROTO)
+! int (*regexec_nl)(regmatch_T*, char_u*, colnr_T);
+! #endif
+ long (*regexec_multi)(regmmatch_T*, win_T*, buf_T*, linenr_T, colnr_T, proftime_T*);
+ #ifdef DEBUG
+ char_u *expr;
+--- 149,155 ----
+ {
+ regprog_T *(*regcomp)(char_u*, int);
+ void (*regfree)(regprog_T *);
+! int (*regexec_nl)(regmatch_T*, char_u*, colnr_T, int);
+ long (*regexec_multi)(regmmatch_T*, win_T*, buf_T*, linenr_T, colnr_T, proftime_T*);
+ #ifdef DEBUG
+ char_u *expr;
+*** ../vim-7.4.261/src/version.c 2014-04-23 18:48:43.546854558 +0200
+--- src/version.c 2014-04-23 18:52:20.102849340 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 262,
+ /**/
+
+--
+From "know your smileys":
+ ~#:-( I just washed my hair, and I can't do nuthin' with it.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.263 b/patches/source/vim/patches/7.4.263
new file mode 100644
index 000000000..ee7fd1362
--- /dev/null
+++ b/patches/source/vim/patches/7.4.263
@@ -0,0 +1,44 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.263
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.263
+Problem: GCC 4.8 compiler warning for hiding a declaration (Francois Gannaz)
+Solution: Remove the second declaration.
+Files: src/eval.c
+
+
+*** ../vim-7.4.262/src/eval.c 2014-04-23 17:43:37.362948683 +0200
+--- src/eval.c 2014-04-23 19:34:46.678787977 +0200
+***************
+*** 18319,18325 ****
+ char_u *s = NULL;
+ char_u *start;
+ char_u *end;
+- char_u *p;
+ int i;
+
+ res = get_cmd_output(get_tv_string(&argvars[0]), infile,
+--- 18319,18324 ----
+*** ../vim-7.4.262/src/version.c 2014-04-23 19:06:33.702828771 +0200
+--- src/version.c 2014-04-23 19:43:22.366775550 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 263,
+ /**/
+
+--
+How many light bulbs does it take to change a person?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.264 b/patches/source/vim/patches/7.4.264
new file mode 100644
index 000000000..06776b880
--- /dev/null
+++ b/patches/source/vim/patches/7.4.264
@@ -0,0 +1,176 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.264
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.264 (after 7.4.260)
+Problem: Can't define a function starting with "g:". Can't assign a
+ funcref to a buffer-local variable.
+Solution: Skip "g:" at the start of a function name. Don't check for colons
+ when assigning to a variable.
+Files: src/eval.c, src/testdir/test_eval.in, src/testdir/test_eval.ok
+
+
+*** ../vim-7.4.263/src/eval.c 2014-04-23 19:44:26.366774008 +0200
+--- src/eval.c 2014-04-23 20:40:16.738693276 +0200
+***************
+*** 21583,21589 ****
+ * Get the function name. There are these situations:
+ * func normal function name
+ * "name" == func, "fudi.fd_dict" == NULL
+- * s:func script-local function name
+ * dict.func new dictionary entry
+ * "name" == NULL, "fudi.fd_dict" set,
+ * "fudi.fd_di" == NULL, "fudi.fd_newkey" == func
+--- 21583,21588 ----
+***************
+*** 21593,21598 ****
+--- 21592,21599 ----
+ * dict.func existing dict entry that's not a Funcref
+ * "name" == NULL, "fudi.fd_dict" set,
+ * "fudi.fd_di" set, "fudi.fd_newkey" == NULL
++ * s:func script-local function name
++ * g:func global function name, same as "func"
+ */
+ p = eap->arg;
+ name = trans_function_name(&p, eap->skip, 0, &fudi);
+***************
+*** 22286,22292 ****
+ }
+ else
+ {
+! if (lead == 2) /* skip over "s:" */
+ lv.ll_name += 2;
+ len = (int)(end - lv.ll_name);
+ }
+--- 22287,22294 ----
+ }
+ else
+ {
+! /* skip over "s:" and "g:" */
+! if (lead == 2 || (lv.ll_name[0] == 'g' && lv.ll_name[1] == ':'))
+ lv.ll_name += 2;
+ len = (int)(end - lv.ll_name);
+ }
+***************
+*** 22317,22333 ****
+ else if (!(flags & TFN_INT) && builtin_function(lv.ll_name, len))
+ {
+ EMSG2(_("E128: Function name must start with a capital or \"s:\": %s"),
+! lv.ll_name);
+ goto theend;
+ }
+! if (!skip)
+ {
+ char_u *cp = vim_strchr(lv.ll_name, ':');
+
+ if (cp != NULL && cp < end)
+ {
+! EMSG2(_("E884: Function name cannot contain a colon: %s"),
+! lv.ll_name);
+ goto theend;
+ }
+ }
+--- 22319,22334 ----
+ else if (!(flags & TFN_INT) && builtin_function(lv.ll_name, len))
+ {
+ EMSG2(_("E128: Function name must start with a capital or \"s:\": %s"),
+! start);
+ goto theend;
+ }
+! if (!skip && !(flags & TFN_QUIET))
+ {
+ char_u *cp = vim_strchr(lv.ll_name, ':');
+
+ if (cp != NULL && cp < end)
+ {
+! EMSG2(_("E884: Function name cannot contain a colon: %s"), start);
+ goto theend;
+ }
+ }
+*** ../vim-7.4.263/src/testdir/test_eval.in 2014-04-23 17:43:37.362948683 +0200
+--- src/testdir/test_eval.in 2014-04-23 20:36:50.494698246 +0200
+***************
+*** 144,150 ****
+ :delcommand AR
+ :call garbagecollect(1)
+ :"
+! :" function name includes a colon
+ :try
+ :func! g:test()
+ :echo "test"
+--- 144,150 ----
+ :delcommand AR
+ :call garbagecollect(1)
+ :"
+! :" function name not starting with capital
+ :try
+ :func! g:test()
+ :echo "test"
+***************
+*** 153,158 ****
+--- 153,167 ----
+ :$put =v:exception
+ :endtry
+ :"
++ :" function name includes a colon
++ :try
++ :func! b:test()
++ :echo "test"
++ :endfunc
++ :catch
++ :$put =v:exception
++ :endtry
++ :"
+ :" function name folowed by #
+ :try
+ :func! test2() "#
+***************
+*** 162,167 ****
+--- 171,183 ----
+ :$put =v:exception
+ :endtry
+ :"
++ :" function name starting with/without "g:", buffer-local funcref.
++ :function! g:Foo()
++ : $put ='called Foo()'
++ :endfunction
++ :let b:my_func = function('Foo')
++ :call b:my_func()
++ :"
+ :/^start:/+1,$wq! test.out
+ :" vim: et ts=4 isk-=\: fmr=???,???
+ :call getchar()
+*** ../vim-7.4.263/src/testdir/test_eval.ok 2014-04-23 17:43:37.362948683 +0200
+--- src/testdir/test_eval.ok 2014-04-23 20:37:45.526696920 +0200
+***************
+*** 336,339 ****
+--- 336,341 ----
+ Executing call setreg(1, ["", "", [], ""])
+ Vim(call):E730: using List as a String
+ Vim(function):E128: Function name must start with a capital or "s:": g:test()
++ Vim(function):E128: Function name must start with a capital or "s:": b:test()
+ Vim(function):E128: Function name must start with a capital or "s:": test2() "#
++ called Foo()
+*** ../vim-7.4.263/src/version.c 2014-04-23 19:44:26.370774008 +0200
+--- src/version.c 2014-04-23 20:27:17.614712050 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 264,
+ /**/
+
+--
+In order for something to become clean, something else must become dirty;
+but you can get everything dirty without getting anything clean.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.265 b/patches/source/vim/patches/7.4.265
new file mode 100644
index 000000000..da88bdb26
--- /dev/null
+++ b/patches/source/vim/patches/7.4.265
@@ -0,0 +1,153 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.265
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.265 (after 7.4.260)
+Problem: Can't call a global function with "g:" in an expression.
+Solution: Skip the "g:" when looking up the function.
+Files: src/eval.c, src/testdir/test_eval.in, src/testdir/test_eval.ok
+
+
+*** ../vim-7.4.264/src/eval.c 2014-04-23 20:43:07.290689167 +0200
+--- src/eval.c 2014-04-24 17:06:38.884920215 +0200
+***************
+*** 8485,8517 ****
+ /* execute the function if no errors detected and executing */
+ if (evaluate && error == ERROR_NONE)
+ {
+ rettv->v_type = VAR_NUMBER; /* default rettv is number zero */
+ rettv->vval.v_number = 0;
+ error = ERROR_UNKNOWN;
+
+! if (!builtin_function(fname, -1))
+ {
+ /*
+ * User defined function.
+ */
+! fp = find_func(fname);
+
+ #ifdef FEAT_AUTOCMD
+ /* Trigger FuncUndefined event, may load the function. */
+ if (fp == NULL
+ && apply_autocmds(EVENT_FUNCUNDEFINED,
+! fname, fname, TRUE, NULL)
+ && !aborting())
+ {
+ /* executed an autocommand, search for the function again */
+! fp = find_func(fname);
+ }
+ #endif
+ /* Try loading a package. */
+! if (fp == NULL && script_autoload(fname, TRUE) && !aborting())
+ {
+ /* loaded a package, search for the function again */
+! fp = find_func(fname);
+ }
+
+ if (fp != NULL)
+--- 8485,8523 ----
+ /* execute the function if no errors detected and executing */
+ if (evaluate && error == ERROR_NONE)
+ {
++ char_u *rfname = fname;
++
++ /* Ignore "g:" before a function name. */
++ if (fname[0] == 'g' && fname[1] == ':')
++ rfname = fname + 2;
++
+ rettv->v_type = VAR_NUMBER; /* default rettv is number zero */
+ rettv->vval.v_number = 0;
+ error = ERROR_UNKNOWN;
+
+! if (!builtin_function(rfname, -1))
+ {
+ /*
+ * User defined function.
+ */
+! fp = find_func(rfname);
+
+ #ifdef FEAT_AUTOCMD
+ /* Trigger FuncUndefined event, may load the function. */
+ if (fp == NULL
+ && apply_autocmds(EVENT_FUNCUNDEFINED,
+! rfname, rfname, TRUE, NULL)
+ && !aborting())
+ {
+ /* executed an autocommand, search for the function again */
+! fp = find_func(rfname);
+ }
+ #endif
+ /* Try loading a package. */
+! if (fp == NULL && script_autoload(rfname, TRUE) && !aborting())
+ {
+ /* loaded a package, search for the function again */
+! fp = find_func(rfname);
+ }
+
+ if (fp != NULL)
+*** ../vim-7.4.264/src/testdir/test_eval.in 2014-04-23 20:43:07.290689167 +0200
+--- src/testdir/test_eval.in 2014-04-24 17:07:57.108918330 +0200
+***************
+*** 172,182 ****
+ :endtry
+ :"
+ :" function name starting with/without "g:", buffer-local funcref.
+! :function! g:Foo()
+! : $put ='called Foo()'
+ :endfunction
+ :let b:my_func = function('Foo')
+! :call b:my_func()
+ :"
+ :/^start:/+1,$wq! test.out
+ :" vim: et ts=4 isk-=\: fmr=???,???
+--- 172,184 ----
+ :endtry
+ :"
+ :" function name starting with/without "g:", buffer-local funcref.
+! :function! g:Foo(n)
+! : $put ='called Foo(' . a:n . ')'
+ :endfunction
+ :let b:my_func = function('Foo')
+! :call b:my_func(1)
+! :echo g:Foo(2)
+! :echo Foo(3)
+ :"
+ :/^start:/+1,$wq! test.out
+ :" vim: et ts=4 isk-=\: fmr=???,???
+*** ../vim-7.4.264/src/testdir/test_eval.ok 2014-04-23 20:43:07.290689167 +0200
+--- src/testdir/test_eval.ok 2014-04-24 16:54:36.856937613 +0200
+***************
+*** 338,341 ****
+ Vim(function):E128: Function name must start with a capital or "s:": g:test()
+ Vim(function):E128: Function name must start with a capital or "s:": b:test()
+ Vim(function):E128: Function name must start with a capital or "s:": test2() "#
+! called Foo()
+--- 338,343 ----
+ Vim(function):E128: Function name must start with a capital or "s:": g:test()
+ Vim(function):E128: Function name must start with a capital or "s:": b:test()
+ Vim(function):E128: Function name must start with a capital or "s:": test2() "#
+! called Foo(1)
+! called Foo(2)
+! called Foo(3)
+*** ../vim-7.4.264/src/version.c 2014-04-23 20:43:07.290689167 +0200
+--- src/version.c 2014-04-24 16:56:24.520935019 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 265,
+ /**/
+
+--
+The sooner you fall behind, the more time you'll have to catch up.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.266 b/patches/source/vim/patches/7.4.266
new file mode 100644
index 000000000..23d56ac81
--- /dev/null
+++ b/patches/source/vim/patches/7.4.266
@@ -0,0 +1,46 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.266
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.266
+Problem: Test 62 fails.
+Solution: Set the language to C. (Christian Brabandt)
+Files: src/testdir/test62.in
+
+
+*** ../vim-7.4.265/src/testdir/test62.in 2013-07-14 13:37:12.000000000 +0200
+--- src/testdir/test62.in 2014-04-29 11:50:50.676058452 +0200
+***************
+*** 2,7 ****
+--- 2,8 ----
+
+ STARTTEST
+ :so small.vim
++ :lang C
+ :" Simple test for opening and closing a tab page
+ :tabnew
+ :let nr = tabpagenr()
+*** ../vim-7.4.265/src/version.c 2014-04-24 17:12:29.584911764 +0200
+--- src/version.c 2014-04-29 11:51:32.356057722 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 266,
+ /**/
+
+--
+I AM THANKFUL...
+...for a lawn that needs mowing, windows that need cleaning
+and gutters that need fixing because it means I have a home.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.267 b/patches/source/vim/patches/7.4.267
new file mode 100644
index 000000000..376e9ee20
--- /dev/null
+++ b/patches/source/vim/patches/7.4.267
@@ -0,0 +1,438 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.2
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.267 (after 7.4.178)
+Problem: The '[ mark is in the wrong position after "gq". (Ingo Karkat)
+Solution: Add the setmark argument to do_join(). (Christian Brabandt)
+Files: src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
+ src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
+ src/testdir/Make_vms.mms, src/testdir/Makefile,
+ src/testdir/test_autoformat_join.in,
+ src/testdir/test_autoformat_join.ok, src/Makefile, src/edit.c,
+ src/ex_cmds.c, src/ex_docmd.c, src/normal.c, src/ops.c,
+ src/proto/ops.pro
+
+
+*** ../vim-7.4.266/src/testdir/Make_amiga.mak 2014-04-02 19:54:58.275599459 +0200
+--- src/testdir/Make_amiga.mak 2014-04-29 12:02:34.144046123 +0200
+***************
+*** 36,41 ****
+--- 36,42 ----
+ test94.out test95.out test96.out test97.out test98.out \
+ test99.out test100.out test101.out test102.out test103.out \
+ test104.out test105.out test106.out \
++ test_autoformat_join.out \
+ test_eval.out \
+ test_options.out
+
+***************
+*** 160,164 ****
+--- 161,166 ----
+ test104.out: test104.in
+ test105.out: test105.in
+ test106.out: test106.in
++ test_autoformat_join.out: test_autoformat_join.in
+ test_eval.out: test_eval.in
+ test_options.out: test_options.in
+*** ../vim-7.4.266/src/testdir/Make_dos.mak 2014-04-02 19:54:58.275599459 +0200
+--- src/testdir/Make_dos.mak 2014-04-29 12:02:45.128045931 +0200
+***************
+*** 35,40 ****
+--- 35,41 ----
+ test94.out test95.out test96.out test98.out test99.out \
+ test100.out test101.out test102.out test103.out test104.out \
+ test105.out test106.out \
++ test_autoformat_join.out \
+ test_eval.out \
+ test_options.out
+
+*** ../vim-7.4.266/src/testdir/Make_ming.mak 2014-04-02 19:54:58.275599459 +0200
+--- src/testdir/Make_ming.mak 2014-04-29 12:02:54.020045775 +0200
+***************
+*** 55,60 ****
+--- 55,61 ----
+ test94.out test95.out test96.out test98.out test99.out \
+ test100.out test101.out test102.out test103.out test104.out \
+ test105.out test106.out \
++ test_autoformat_join.out \
+ test_eval.out \
+ test_options.out
+
+*** ../vim-7.4.266/src/testdir/Make_os2.mak 2014-04-02 19:54:58.275599459 +0200
+--- src/testdir/Make_os2.mak 2014-04-29 12:03:03.384045611 +0200
+***************
+*** 37,42 ****
+--- 37,43 ----
+ test94.out test95.out test96.out test98.out test99.out \
+ test100.out test101.out test102.out test103.out test104.out \
+ test105.out test106.out \
++ test_autoformat_join.out \
+ test_eval.out \
+ test_options.out
+
+*** ../vim-7.4.266/src/testdir/Make_vms.mms 2014-04-02 19:54:58.275599459 +0200
+--- src/testdir/Make_vms.mms 2014-04-29 12:03:12.200045456 +0200
+***************
+*** 96,101 ****
+--- 96,102 ----
+ test95.out test96.out test98.out test99.out \
+ test100.out test101.out test103.out test104.out \
+ test105.out test106.out \
++ test_autoformat_join.out \
+ test_eval.out \
+ test_options.out
+
+*** ../vim-7.4.266/src/testdir/Makefile 2014-04-01 14:08:14.685074130 +0200
+--- src/testdir/Makefile 2014-04-29 12:02:09.152046561 +0200
+***************
+*** 33,38 ****
+--- 33,40 ----
+ test94.out test95.out test96.out test97.out test98.out \
+ test99.out test100.out test101.out test102.out test103.out \
+ test104.out test105.out test106.out \
++ test_autoformat_join.out \
++ test_eval.out \
+ test_options.out
+
+ SCRIPTS_GUI = test16.out
+*** ../vim-7.4.266/src/testdir/test_autoformat_join.in 2014-04-29 12:12:57.324035202 +0200
+--- src/testdir/test_autoformat_join.in 2014-04-29 12:00:35.360048205 +0200
+***************
+*** 0 ****
+--- 1,23 ----
++ Tests for setting the '[,'] marks when joining lines.
++
++ STARTTEST
++ :so small.vim
++ :/^\t\t/
++ 0gqj
++ :let a=string(getpos("'[")).'/'.string(getpos("']"))
++ :/^This line/;'}-join
++ :let b=string(getpos("'[")).'/'.string(getpos("']"))
++ :$put ='First test: Start/End '.string(a)
++ :$put ='Second test: Start/End '.string(b)
++ :/^\t\t/,$wq! test.out
++ ENDTEST
++
++
++ O sodales, ludite, vos qui
++ attamen consulite per voster honur. Tua pulchra facies me fay planszer milies
++
++ This line.
++ Should be joined with the next line
++ and with this line
++
++ Results:
+*** ../vim-7.4.266/src/testdir/test_autoformat_join.ok 2014-04-29 12:12:57.332035201 +0200
+--- src/testdir/test_autoformat_join.ok 2014-04-29 12:00:35.360048205 +0200
+***************
+*** 0 ****
+--- 1,8 ----
++ O sodales, ludite, vos qui attamen consulite per voster honur.
++ Tua pulchra facies me fay planszer milies
++
++ This line. Should be joined with the next line and with this line
++
++ Results:
++ First test: Start/End '[0, 16, 1, 0]/[0, 17, 1, 0]'
++ Second test: Start/End '[0, 19, 11, 0]/[0, 19, 67, 0]'
+*** ../vim-7.4.266/src/Makefile 2014-04-02 19:54:58.275599459 +0200
+--- src/Makefile 2014-04-29 12:03:48.600044818 +0200
+***************
+*** 1880,1885 ****
+--- 1880,1886 ----
+
+ # Run individual test, assuming that Vim was already compiled.
+ test1 test2 test3 test4 test5 test6 test7 test8 test9 \
++ test_autoformat_join \
+ test_eval \
+ test_options \
+ test10 test11 test12 test13 test14 test15 test16 test17 test18 test19 \
+*** ../vim-7.4.266/src/edit.c 2014-03-23 15:12:29.915264336 +0100
+--- src/edit.c 2014-04-29 12:08:50.608039525 +0200
+***************
+*** 8685,8691 ****
+ {
+ temp = curwin->w_cursor.col;
+ if (!can_bs(BS_EOL) /* only if "eol" included */
+! || do_join(2, FALSE, TRUE, FALSE) == FAIL)
+ vim_beep();
+ else
+ curwin->w_cursor.col = temp;
+--- 8685,8691 ----
+ {
+ temp = curwin->w_cursor.col;
+ if (!can_bs(BS_EOL) /* only if "eol" included */
+! || do_join(2, FALSE, TRUE, FALSE, FALSE) == FAIL)
+ vim_beep();
+ else
+ curwin->w_cursor.col = temp;
+***************
+*** 8866,8872 ****
+ ptr[len - 1] = NUL;
+ }
+
+! (void)do_join(2, FALSE, FALSE, FALSE);
+ if (temp == NUL && gchar_cursor() != NUL)
+ inc_cursor();
+ }
+--- 8866,8872 ----
+ ptr[len - 1] = NUL;
+ }
+
+! (void)do_join(2, FALSE, FALSE, FALSE, FALSE);
+ if (temp == NUL && gchar_cursor() != NUL)
+ inc_cursor();
+ }
+*** ../vim-7.4.266/src/ex_cmds.c 2014-04-06 20:45:40.119357453 +0200
+--- src/ex_cmds.c 2014-04-29 12:08:50.612039525 +0200
+***************
+*** 4444,4450 ****
+ else if (*cmd == 'p')
+ eap->flags = EXFLAG_PRINT;
+
+! (void)do_join(eap->line2 - eap->line1 + 1, FALSE, TRUE, FALSE);
+ sub_nlines = sub_nsubs = eap->line2 - eap->line1 + 1;
+ (void)do_sub_msg(FALSE);
+ ex_may_print(eap);
+--- 4444,4450 ----
+ else if (*cmd == 'p')
+ eap->flags = EXFLAG_PRINT;
+
+! (void)do_join(eap->line2 - eap->line1 + 1, FALSE, TRUE, FALSE, TRUE);
+ sub_nlines = sub_nsubs = eap->line2 - eap->line1 + 1;
+ (void)do_sub_msg(FALSE);
+ ex_may_print(eap);
+*** ../vim-7.4.266/src/ex_docmd.c 2014-04-02 14:22:00.119874274 +0200
+--- src/ex_docmd.c 2014-04-29 12:08:50.616039525 +0200
+***************
+*** 8717,8723 ****
+ }
+ ++eap->line2;
+ }
+! (void)do_join(eap->line2 - eap->line1 + 1, !eap->forceit, TRUE, TRUE);
+ beginline(BL_WHITE | BL_FIX);
+ ex_may_print(eap);
+ }
+--- 8717,8723 ----
+ }
+ ++eap->line2;
+ }
+! (void)do_join(eap->line2 - eap->line1 + 1, !eap->forceit, TRUE, TRUE, TRUE);
+ beginline(BL_WHITE | BL_FIX);
+ ex_may_print(eap);
+ }
+*** ../vim-7.4.266/src/normal.c 2014-03-23 15:12:29.927264336 +0100
+--- src/normal.c 2014-04-29 12:08:50.616039525 +0200
+***************
+*** 812,818 ****
+
+ if (text_locked() && (nv_cmds[idx].cmd_flags & NV_NCW))
+ {
+! /* This command is not allowed while editing a ccmdline: beep. */
+ clearopbeep(oap);
+ text_locked_msg();
+ goto normal_end;
+--- 812,818 ----
+
+ if (text_locked() && (nv_cmds[idx].cmd_flags & NV_NCW))
+ {
+! /* This command is not allowed while editing a cmdline: beep. */
+ clearopbeep(oap);
+ text_locked_msg();
+ goto normal_end;
+***************
+*** 1905,1911 ****
+ else
+ {
+ (void)do_join(oap->line_count, oap->op_type == OP_JOIN,
+! TRUE, TRUE);
+ auto_format(FALSE, TRUE);
+ }
+ break;
+--- 1905,1911 ----
+ else
+ {
+ (void)do_join(oap->line_count, oap->op_type == OP_JOIN,
+! TRUE, TRUE, TRUE);
+ auto_format(FALSE, TRUE);
+ }
+ break;
+***************
+*** 9236,9242 ****
+ {
+ prep_redo(cap->oap->regname, cap->count0,
+ NUL, cap->cmdchar, NUL, NUL, cap->nchar);
+! (void)do_join(cap->count0, cap->nchar == NUL, TRUE, TRUE);
+ }
+ }
+ }
+--- 9236,9242 ----
+ {
+ prep_redo(cap->oap->regname, cap->count0,
+ NUL, cap->cmdchar, NUL, NUL, cap->nchar);
+! (void)do_join(cap->count0, cap->nchar == NUL, TRUE, TRUE, TRUE);
+ }
+ }
+ }
+*** ../vim-7.4.266/src/ops.c 2014-04-12 12:26:25.856424387 +0200
+--- src/ops.c 2014-04-29 12:10:29.428037794 +0200
+***************
+*** 1979,1985 ****
+ curwin->w_cursor = curpos; /* restore curwin->w_cursor */
+ }
+ if (curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count)
+! (void)do_join(2, FALSE, FALSE, FALSE);
+ }
+ }
+
+--- 1979,1985 ----
+ curwin->w_cursor = curpos; /* restore curwin->w_cursor */
+ }
+ if (curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count)
+! (void)do_join(2, FALSE, FALSE, FALSE, FALSE);
+ }
+ }
+
+***************
+*** 4323,4339 ****
+ /*
+ * Join 'count' lines (minimal 2) at cursor position.
+ * When "save_undo" is TRUE save lines for undo first.
+! * Set "use_formatoptions" to FALSE when e.g. processing
+! * backspace and comment leaders should not be removed.
+ *
+ * return FAIL for failure, OK otherwise
+ */
+ int
+! do_join(count, insert_space, save_undo, use_formatoptions)
+ long count;
+ int insert_space;
+ int save_undo;
+ int use_formatoptions UNUSED;
+ {
+ char_u *curr = NULL;
+ char_u *curr_start = NULL;
+--- 4323,4342 ----
+ /*
+ * Join 'count' lines (minimal 2) at cursor position.
+ * When "save_undo" is TRUE save lines for undo first.
+! * Set "use_formatoptions" to FALSE when e.g. processing backspace and comment
+! * leaders should not be removed.
+! * When setmark is TRUE, sets the '[ and '] mark, else, the caller is expected
+! * to set those marks.
+ *
+ * return FAIL for failure, OK otherwise
+ */
+ int
+! do_join(count, insert_space, save_undo, use_formatoptions, setmark)
+ long count;
+ int insert_space;
+ int save_undo;
+ int use_formatoptions UNUSED;
++ int setmark;
+ {
+ char_u *curr = NULL;
+ char_u *curr_start = NULL;
+***************
+*** 4384,4390 ****
+ for (t = 0; t < count; ++t)
+ {
+ curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + t));
+! if (t == 0)
+ {
+ /* Set the '[ mark. */
+ curwin->w_buffer->b_op_start.lnum = curwin->w_cursor.lnum;
+--- 4387,4393 ----
+ for (t = 0; t < count; ++t)
+ {
+ curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + t));
+! if (t == 0 && setmark)
+ {
+ /* Set the '[ mark. */
+ curwin->w_buffer->b_op_start.lnum = curwin->w_cursor.lnum;
+***************
+*** 4506,4514 ****
+ }
+ ml_replace(curwin->w_cursor.lnum, newp, FALSE);
+
+! /* Set the '] mark. */
+! curwin->w_buffer->b_op_end.lnum = curwin->w_cursor.lnum;
+! curwin->w_buffer->b_op_end.col = (colnr_T)STRLEN(newp);
+
+ /* Only report the change in the first line here, del_lines() will report
+ * the deleted line. */
+--- 4509,4520 ----
+ }
+ ml_replace(curwin->w_cursor.lnum, newp, FALSE);
+
+! if (setmark)
+! {
+! /* Set the '] mark. */
+! curwin->w_buffer->b_op_end.lnum = curwin->w_cursor.lnum;
+! curwin->w_buffer->b_op_end.col = (colnr_T)STRLEN(newp);
+! }
+
+ /* Only report the change in the first line here, del_lines() will report
+ * the deleted line. */
+***************
+*** 5009,5015 ****
+ }
+ }
+ curwin->w_cursor.lnum--;
+! if (do_join(2, TRUE, FALSE, FALSE) == FAIL)
+ {
+ beep_flush();
+ break;
+--- 5015,5021 ----
+ }
+ }
+ curwin->w_cursor.lnum--;
+! if (do_join(2, TRUE, FALSE, FALSE, FALSE) == FAIL)
+ {
+ beep_flush();
+ break;
+*** ../vim-7.4.266/src/proto/ops.pro 2014-04-02 22:17:00.003482236 +0200
+--- src/proto/ops.pro 2014-04-29 12:08:50.620039525 +0200
+***************
+*** 37,43 ****
+ int preprocs_left __ARGS((void));
+ int get_register_name __ARGS((int num));
+ void ex_display __ARGS((exarg_T *eap));
+! int do_join __ARGS((long count, int insert_space, int save_undo, int use_formatoptions));
+ void op_format __ARGS((oparg_T *oap, int keep_cursor));
+ void op_formatexpr __ARGS((oparg_T *oap));
+ int fex_format __ARGS((linenr_T lnum, long count, int c));
+--- 37,43 ----
+ int preprocs_left __ARGS((void));
+ int get_register_name __ARGS((int num));
+ void ex_display __ARGS((exarg_T *eap));
+! int do_join __ARGS((long count, int insert_space, int save_undo, int use_formatoptions, int setmark));
+ void op_format __ARGS((oparg_T *oap, int keep_cursor));
+ void op_formatexpr __ARGS((oparg_T *oap));
+ int fex_format __ARGS((linenr_T lnum, long count, int c));
+*** ../vim-7.4.266/src/version.c 2014-04-29 11:55:26.176053624 +0200
+--- src/version.c 2014-04-29 11:59:35.620049252 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 267,
+ /**/
+
+--
+I AM THANKFUL...
+...for all the complaining I hear about the government
+because it means we have freedom of speech.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.268 b/patches/source/vim/patches/7.4.268
new file mode 100644
index 000000000..84ab15436
--- /dev/null
+++ b/patches/source/vim/patches/7.4.268
@@ -0,0 +1,108 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.268
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.268
+Problem: Using exists() on a funcref for a script-local function does not
+ work.
+Solution: Translate <SNR> to the special byte sequence. Add a test.
+Files: src/eval.c, src/testdir/test_eval.in, src/testdir/test_eval.ok,
+ src/testdir/test_eval_func.vim, Filelist
+
+
+*** ../vim-7.4.267/src/eval.c 2014-04-24 17:12:29.580911764 +0200
+--- src/eval.c 2014-04-29 13:49:26.759933737 +0200
+***************
+*** 22275,22280 ****
+--- 22275,22288 ----
+ {
+ name = vim_strsave(name);
+ *pp = end;
++ if (STRNCMP(name, "<SNR>", 5) == 0)
++ {
++ /* Change "<SNR>" to the byte sequence. */
++ name[0] = K_SPECIAL;
++ name[1] = KS_EXTRA;
++ name[2] = (int)KE_SNR;
++ mch_memmove(name + 3, name + 5, STRLEN(name + 5) + 1);
++ }
+ goto theend;
+ }
+
+*** ../vim-7.4.267/src/testdir/test_eval.in 2014-04-24 17:12:29.584911764 +0200
+--- src/testdir/test_eval.in 2014-04-29 13:59:09.495923525 +0200
+***************
+*** 180,185 ****
+--- 180,188 ----
+ :echo g:Foo(2)
+ :echo Foo(3)
+ :"
++ :" script-local function used in Funcref must exist.
++ :so test_eval_func.vim
++ :"
+ :/^start:/+1,$wq! test.out
+ :" vim: et ts=4 isk-=\: fmr=???,???
+ :call getchar()
+*** ../vim-7.4.267/src/testdir/test_eval.ok 2014-04-24 17:12:29.584911764 +0200
+--- src/testdir/test_eval.ok 2014-04-29 13:59:39.551922998 +0200
+***************
+*** 341,343 ****
+--- 341,347 ----
+ called Foo(1)
+ called Foo(2)
+ called Foo(3)
++ s:Testje exists: 0
++ func s:Testje exists: 1
++ Bar exists: 1
++ func Bar exists: 1
+*** ../vim-7.4.267/src/testdir/test_eval_func.vim 2014-04-29 14:02:08.415920389 +0200
+--- src/testdir/test_eval_func.vim 2014-04-29 13:57:34.503925189 +0200
+***************
+*** 0 ****
+--- 1,10 ----
++ " Vim script used in test_eval.in. Needed for script-local function.
++
++ func! s:Testje()
++ return "foo"
++ endfunc
++ let Bar = function('s:Testje')
++ $put ='s:Testje exists: ' . exists('s:Testje')
++ $put ='func s:Testje exists: ' . exists('*s:Testje')
++ $put ='Bar exists: ' . exists('Bar')
++ $put ='func Bar exists: ' . exists('*Bar')
+*** ../vim-7.4.267/Filelist 2014-04-05 21:59:35.939178415 +0200
+--- Filelist 2014-04-29 13:58:40.207924038 +0200
+***************
+*** 88,93 ****
+--- 88,94 ----
+ src/testdir/test60.vim \
+ src/testdir/test83-tags? \
+ src/testdir/test77a.com \
++ src/testdir/test_*.vim \
+ src/testdir/python2/*.py \
+ src/testdir/python3/*.py \
+ src/testdir/pythonx/*.py \
+*** ../vim-7.4.267/src/version.c 2014-04-29 12:15:22.860032651 +0200
+--- src/version.c 2014-04-29 13:47:32.935935732 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 268,
+ /**/
+
+--
+I AM THANKFUL...
+...for the piles of laundry and ironing because it means I
+have plenty of clothes to wear.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.269 b/patches/source/vim/patches/7.4.269
new file mode 100644
index 000000000..80f29a486
--- /dev/null
+++ b/patches/source/vim/patches/7.4.269
@@ -0,0 +1,213 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.269
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.269
+Problem: CTRL-U in Insert mode does not work after using a cursor key.
+ (Pine Wu)
+Solution: Use the original insert start position. (Christian Brabandt)
+Files: src/edit.c, src/testdir/test29.in, src/testdir/test29.ok
+
+
+*** ../vim-7.4.268/src/edit.c 2014-04-29 12:15:22.852032651 +0200
+--- src/edit.c 2014-04-29 14:44:07.867876234 +0200
+***************
+*** 8760,8767 ****
+ ((curwin->w_cursor.lnum == 1 && curwin->w_cursor.col == 0)
+ || (!can_bs(BS_START)
+ && (arrow_used
+! || (curwin->w_cursor.lnum == Insstart.lnum
+! && curwin->w_cursor.col <= Insstart.col)))
+ || (!can_bs(BS_INDENT) && !arrow_used && ai_col > 0
+ && curwin->w_cursor.col <= ai_col)
+ || (!can_bs(BS_EOL) && curwin->w_cursor.col == 0))))
+--- 8760,8767 ----
+ ((curwin->w_cursor.lnum == 1 && curwin->w_cursor.col == 0)
+ || (!can_bs(BS_START)
+ && (arrow_used
+! || (curwin->w_cursor.lnum == Insstart_orig.lnum
+! && curwin->w_cursor.col <= Insstart_orig.col)))
+ || (!can_bs(BS_INDENT) && !arrow_used && ai_col > 0
+ && curwin->w_cursor.col <= ai_col)
+ || (!can_bs(BS_EOL) && curwin->w_cursor.col == 0))))
+***************
+*** 8812,8819 ****
+ */
+ if (curwin->w_cursor.col == 0)
+ {
+! lnum = Insstart.lnum;
+! if (curwin->w_cursor.lnum == Insstart.lnum
+ #ifdef FEAT_RIGHTLEFT
+ || revins_on
+ #endif
+--- 8812,8819 ----
+ */
+ if (curwin->w_cursor.col == 0)
+ {
+! lnum = Insstart_orig.lnum;
+! if (curwin->w_cursor.lnum == lnum
+ #ifdef FEAT_RIGHTLEFT
+ || revins_on
+ #endif
+***************
+*** 8822,8829 ****
+ if (u_save((linenr_T)(curwin->w_cursor.lnum - 2),
+ (linenr_T)(curwin->w_cursor.lnum + 1)) == FAIL)
+ return FALSE;
+! --Insstart.lnum;
+! Insstart.col = MAXCOL;
+ }
+ /*
+ * In replace mode:
+--- 8822,8829 ----
+ if (u_save((linenr_T)(curwin->w_cursor.lnum - 2),
+ (linenr_T)(curwin->w_cursor.lnum + 1)) == FAIL)
+ return FALSE;
+! --Insstart_orig.lnum;
+! Insstart_orig.col = MAXCOL;
+ }
+ /*
+ * In replace mode:
+***************
+*** 8981,8989 ****
+ while (vcol < want_vcol)
+ {
+ /* Remember the first char we inserted */
+! if (curwin->w_cursor.lnum == Insstart.lnum
+! && curwin->w_cursor.col < Insstart.col)
+! Insstart.col = curwin->w_cursor.col;
+
+ #ifdef FEAT_VREPLACE
+ if (State & VREPLACE_FLAG)
+--- 8981,8989 ----
+ while (vcol < want_vcol)
+ {
+ /* Remember the first char we inserted */
+! if (curwin->w_cursor.lnum == Insstart_orig.lnum
+! && curwin->w_cursor.col < Insstart_orig.col)
+! Insstart_orig.col = curwin->w_cursor.col;
+
+ #ifdef FEAT_VREPLACE
+ if (State & VREPLACE_FLAG)
+***************
+*** 9071,9078 ****
+ revins_on ||
+ #endif
+ (curwin->w_cursor.col > mincol
+! && (curwin->w_cursor.lnum != Insstart.lnum
+! || curwin->w_cursor.col != Insstart.col)));
+ did_backspace = TRUE;
+ }
+ #ifdef FEAT_SMARTINDENT
+--- 9071,9078 ----
+ revins_on ||
+ #endif
+ (curwin->w_cursor.col > mincol
+! && (curwin->w_cursor.lnum != Insstart_orig.lnum
+! || curwin->w_cursor.col != Insstart_orig.col)));
+ did_backspace = TRUE;
+ }
+ #ifdef FEAT_SMARTINDENT
+***************
+*** 9090,9098 ****
+ AppendCharToRedobuff(c);
+
+ /* If deleted before the insertion point, adjust it */
+! if (curwin->w_cursor.lnum == Insstart.lnum
+! && curwin->w_cursor.col < Insstart.col)
+! Insstart.col = curwin->w_cursor.col;
+
+ /* vi behaviour: the cursor moves backward but the character that
+ * was there remains visible
+--- 9090,9098 ----
+ AppendCharToRedobuff(c);
+
+ /* If deleted before the insertion point, adjust it */
+! if (curwin->w_cursor.lnum == Insstart_orig.lnum
+! && curwin->w_cursor.col < Insstart_orig.col)
+! Insstart_orig.col = curwin->w_cursor.col;
+
+ /* vi behaviour: the cursor moves backward but the character that
+ * was there remains visible
+*** ../vim-7.4.268/src/testdir/test29.in 2012-06-13 13:48:26.000000000 +0200
+--- src/testdir/test29.in 2014-04-29 14:31:23.619889628 +0200
+***************
+*** 102,107 ****
+--- 102,135 ----
+ }
+
+ STARTTEST
++ :" Test with backspace set to the non-compatible setting
++ /^\d\+ this
++ :set cp bs=2
++ Avim1
++ Avim2u
++ :set cpo-=<
++ :inoremap <c-u> <left><c-u>
++ Avim3
++ :iunmap <c-u>
++ Avim4
++ :" Test with backspace set to the compatible setting
++ :set bs=
++ A vim5A
++ A vim6Azweiu
++ :inoremap <c-u> <left><c-u>
++ A vim7
++ :set cp
++ ENDTEST
++ 1 this shouldn't be deleted
++ 2 this shouldn't be deleted
++ 3 this shouldn't be deleted
++ 4 this should be deleted
++ 5 this shouldn't be deleted
++ 6 this shouldn't be deleted
++ 7 this shouldn't be deleted
++ 8 this shouldn't be deleted (not touched yet)
++
++ STARTTEST
+ /^{/+1
+ :set comments=sO:*\ -,mO:*\ \ ,exO:*/
+ :set comments+=s1:/*,mb:*,ex:*/,://
+*** ../vim-7.4.268/src/testdir/test29.ok 2012-06-13 13:48:26.000000000 +0200
+--- src/testdir/test29.ok 2014-04-29 14:31:23.623889628 +0200
+***************
+*** 62,67 ****
+--- 62,76 ----
+ action();
+ }
+
++ 1 this shouldn't be deleted
++ 2 this shouldn't be deleted
++ 3 this shouldn't be deleted
++ 4 this should be deleted3
++
++ 6 this shouldn't be deleted vim5
++ 7 this shouldn't be deleted vim6
++ 8 this shouldn't be deleted (not touched yet) vim7
++
+
+ {
+ /* Make sure the previous comment leader is not removed. */
+*** ../vim-7.4.268/src/version.c 2014-04-29 14:02:42.547919791 +0200
+--- src/version.c 2014-04-29 14:42:09.083878315 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 269,
+ /**/
+
+--
+From "know your smileys":
+ [:-) Frankenstein's monster
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.270 b/patches/source/vim/patches/7.4.270
new file mode 100644
index 000000000..ce9fb70dd
--- /dev/null
+++ b/patches/source/vim/patches/7.4.270
@@ -0,0 +1,62 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.270
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.270
+Problem: Comparing pointers instead of the string they point to.
+Solution: Use strcmp(). (Ken Takata)
+Files: src/gui_gtk_x11.c
+
+
+*** ../vim-7.4.269/src/gui_gtk_x11.c 2014-04-06 21:08:41.311360470 +0200
+--- src/gui_gtk_x11.c 2014-04-29 15:02:35.931856814 +0200
+***************
+*** 3142,3151 ****
+ gnome_program_init(VIMPACKAGE, VIM_VERSION_SHORT,
+ LIBGNOMEUI_MODULE, gui_argc, gui_argv, NULL);
+ # if defined(FEAT_FLOAT) && defined(LC_NUMERIC)
+! /* Make sure strtod() uses a decimal point, not a comma. Gnome init
+! * may change it. */
+! if (setlocale(LC_NUMERIC, NULL) != (char *) "C")
+! setlocale(LC_NUMERIC, "C");
+ # endif
+ }
+ #endif
+--- 3142,3155 ----
+ gnome_program_init(VIMPACKAGE, VIM_VERSION_SHORT,
+ LIBGNOMEUI_MODULE, gui_argc, gui_argv, NULL);
+ # if defined(FEAT_FLOAT) && defined(LC_NUMERIC)
+! {
+! char *p = setlocale(LC_NUMERIC, NULL);
+!
+! /* Make sure strtod() uses a decimal point, not a comma. Gnome
+! * init may change it. */
+! if (p == NULL || strcmp(p, "C") != 0)
+! setlocale(LC_NUMERIC, "C");
+! }
+ # endif
+ }
+ #endif
+*** ../vim-7.4.269/src/version.c 2014-04-29 14:44:31.519875819 +0200
+--- src/version.c 2014-04-29 14:59:21.799860216 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 270,
+ /**/
+
+--
+From "know your smileys":
+ :-| :-| Deja' vu!
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.271 b/patches/source/vim/patches/7.4.271
new file mode 100644
index 000000000..c7f03ee7e
--- /dev/null
+++ b/patches/source/vim/patches/7.4.271
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.271
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.271
+Problem: Compiler warning on 64 bit windows.
+Solution: Add type cast. (Mike Williams)
+Files: src/ops.c
+
+
+*** ../vim-7.4.270/src/ops.c 2014-04-29 12:15:22.860032651 +0200
+--- src/ops.c 2014-04-29 15:54:23.055802359 +0200
+***************
+*** 6559,6565 ****
+ {
+ for (ss = (char_u **) str; *ss != NULL; ++ss, ++lnum)
+ {
+! i = STRLEN(*ss);
+ pp[lnum] = vim_strnsave(*ss, i);
+ if (i > maxlen)
+ maxlen = i;
+--- 6559,6565 ----
+ {
+ for (ss = (char_u **) str; *ss != NULL; ++ss, ++lnum)
+ {
+! i = (long)STRLEN(*ss);
+ pp[lnum] = vim_strnsave(*ss, i);
+ if (i > maxlen)
+ maxlen = i;
+*** ../vim-7.4.270/src/version.c 2014-04-29 15:11:39.783847283 +0200
+--- src/version.c 2014-04-29 15:52:54.083803919 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 271,
+ /**/
+
+--
+From "know your smileys":
+ :.-( Crying
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.272 b/patches/source/vim/patches/7.4.272
new file mode 100644
index 000000000..e893a9625
--- /dev/null
+++ b/patches/source/vim/patches/7.4.272
@@ -0,0 +1,148 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.272
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.272
+Problem: Using just "$" does not cause an error message.
+Solution: Check for empty environment variable name. (Christian Brabandt)
+Files: src/eval.c, src/testdir/test_eval.in, src/testdir/test_eval.ok
+
+
+*** ../vim-7.4.271/src/eval.c 2014-04-29 14:02:42.543919791 +0200
+--- src/eval.c 2014-04-29 17:33:40.575697949 +0200
+***************
+*** 7798,7804 ****
+ * Get the value of an environment variable.
+ * "arg" is pointing to the '$'. It is advanced to after the name.
+ * If the environment variable was not set, silently assume it is empty.
+! * Always return OK.
+ */
+ static int
+ get_env_tv(arg, rettv, evaluate)
+--- 7798,7804 ----
+ * Get the value of an environment variable.
+ * "arg" is pointing to the '$'. It is advanced to after the name.
+ * If the environment variable was not set, silently assume it is empty.
+! * Return FAIL if the name is invalid.
+ */
+ static int
+ get_env_tv(arg, rettv, evaluate)
+***************
+*** 7817,7848 ****
+ len = get_env_len(arg);
+ if (evaluate)
+ {
+! if (len != 0)
+ {
+! cc = name[len];
+! name[len] = NUL;
+! /* first try vim_getenv(), fast for normal environment vars */
+! string = vim_getenv(name, &mustfree);
+! if (string != NULL && *string != NUL)
+! {
+! if (!mustfree)
+! string = vim_strsave(string);
+! }
+! else
+! {
+! if (mustfree)
+! vim_free(string);
+
+! /* next try expanding things like $VIM and ${HOME} */
+! string = expand_env_save(name - 1);
+! if (string != NULL && *string == '$')
+! {
+! vim_free(string);
+! string = NULL;
+! }
+ }
+- name[len] = cc;
+ }
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = string;
+ }
+--- 7817,7849 ----
+ len = get_env_len(arg);
+ if (evaluate)
+ {
+! if (len == 0)
+! return FAIL; /* can't be an environment variable */
+!
+! cc = name[len];
+! name[len] = NUL;
+! /* first try vim_getenv(), fast for normal environment vars */
+! string = vim_getenv(name, &mustfree);
+! if (string != NULL && *string != NUL)
+ {
+! if (!mustfree)
+! string = vim_strsave(string);
+! }
+! else
+! {
+! if (mustfree)
+! vim_free(string);
+
+! /* next try expanding things like $VIM and ${HOME} */
+! string = expand_env_save(name - 1);
+! if (string != NULL && *string == '$')
+! {
+! vim_free(string);
+! string = NULL;
+ }
+ }
++ name[len] = cc;
++
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = string;
+ }
+*** ../vim-7.4.271/src/testdir/test_eval.in 2014-04-29 14:02:42.543919791 +0200
+--- src/testdir/test_eval.in 2014-04-29 17:35:27.243696080 +0200
+***************
+*** 183,188 ****
+--- 183,195 ----
+ :" script-local function used in Funcref must exist.
+ :so test_eval_func.vim
+ :"
++ :" Using $ instead of '$' must give an error
++ :try
++ : call append($, 'foobar')
++ :catch
++ :$put =v:exception
++ :endtry
++ :"
+ :/^start:/+1,$wq! test.out
+ :" vim: et ts=4 isk-=\: fmr=???,???
+ :call getchar()
+*** ../vim-7.4.271/src/testdir/test_eval.ok 2014-04-29 14:02:42.543919791 +0200
+--- src/testdir/test_eval.ok 2014-04-29 17:36:41.451694779 +0200
+***************
+*** 345,347 ****
+--- 345,348 ----
+ func s:Testje exists: 1
+ Bar exists: 1
+ func Bar exists: 1
++ Vim(call):E116: Invalid arguments for function append
+*** ../vim-7.4.271/src/version.c 2014-04-29 15:55:39.443801021 +0200
+--- src/version.c 2014-04-29 17:31:54.203699814 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 272,
+ /**/
+
+--
+From "know your smileys":
+ C=}>;*{)) Drunk, devilish chef with a toupee in an updraft,
+ a mustache, and a double chin
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.273 b/patches/source/vim/patches/7.4.273
new file mode 100644
index 000000000..2fe4d17a9
--- /dev/null
+++ b/patches/source/vim/patches/7.4.273
@@ -0,0 +1,57 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.273
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.273
+Problem: "make autoconf" and "make reconfig" may first run configure and
+ then remove the output.
+Solution: Add these targets to the exceptions. (Ken Takata)
+Files: src/Makefile
+
+
+*** ../vim-7.4.272/src/Makefile 2014-04-29 12:15:22.852032651 +0200
+--- src/Makefile 2014-04-29 19:58:23.611545773 +0200
+***************
+*** 1670,1676 ****
+ ! grep -x -F 'ac_cv_env_CFLAGS_value=$(CFLAGS)' auto/config.cache > /dev/null; then \
+ rm auto/config.cache; \
+ fi
+! if test "X$(MAKECMDGOALS)" != "Xclean" -a "X$(MAKECMDGOALS)" != "Xdistclean"; then \
+ GUI_INC_LOC="$(GUI_INC_LOC)" GUI_LIB_LOC="$(GUI_LIB_LOC)" \
+ CC="$(CC)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" \
+ LDFLAGS="$(LDFLAGS)" $(CONF_SHELL) srcdir="$(srcdir)" \
+--- 1670,1679 ----
+ ! grep -x -F 'ac_cv_env_CFLAGS_value=$(CFLAGS)' auto/config.cache > /dev/null; then \
+ rm auto/config.cache; \
+ fi
+! if test "X$(MAKECMDGOALS)" != "Xclean" \
+! -a "X$(MAKECMDGOALS)" != "Xdistclean" \
+! -a "X$(MAKECMDGOALS)" != "Xautoconf" \
+! -a "X$(MAKECMDGOALS)" != "Xreconfig"; then \
+ GUI_INC_LOC="$(GUI_INC_LOC)" GUI_LIB_LOC="$(GUI_LIB_LOC)" \
+ CC="$(CC)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" \
+ LDFLAGS="$(LDFLAGS)" $(CONF_SHELL) srcdir="$(srcdir)" \
+*** ../vim-7.4.272/src/version.c 2014-04-29 17:41:18.351689927 +0200
+--- src/version.c 2014-04-29 19:59:21.895544751 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 273,
+ /**/
+
+--
+From "know your smileys":
+ <|-) Chinese
+ <|-( Chinese and doesn't like these kind of jokes
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.274 b/patches/source/vim/patches/7.4.274
new file mode 100644
index 000000000..186e09b9d
--- /dev/null
+++ b/patches/source/vim/patches/7.4.274
@@ -0,0 +1,46 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.274
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.274
+Problem: When doing ":update" just before running an external command that
+ changes the file, the timestamp may be unchanged and the file
+ is not reloaded.
+Solution: Also check the file size.
+Files: src/fileio.c
+
+
+*** ../vim-7.4.273/src/fileio.c 2014-04-06 20:45:40.123357453 +0200
+--- src/fileio.c 2014-05-02 15:35:19.671279728 +0200
+***************
+*** 6897,6902 ****
+--- 6897,6903 ----
+ && buf->b_mtime != 0
+ && ((stat_res = mch_stat((char *)buf->b_ffname, &st)) < 0
+ || time_differs((long)st.st_mtime, buf->b_mtime)
++ || st.st_size != buf->b_orig_size
+ #ifdef HAVE_ST_MODE
+ || (int)st.st_mode != buf->b_orig_mode
+ #else
+*** ../vim-7.4.273/src/version.c 2014-04-29 20:04:05.331539784 +0200
+--- src/version.c 2014-05-02 15:36:22.619278625 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 274,
+ /**/
+
+--
+A meeting is an event at which the minutes are kept and the hours are lost.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.275 b/patches/source/vim/patches/7.4.275
new file mode 100644
index 000000000..443fe185c
--- /dev/null
+++ b/patches/source/vim/patches/7.4.275
@@ -0,0 +1,56 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.275
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.275
+Problem: When changing the type of a sign that hasn't been placed ther is
+ no error message.
+Solution: Add an error message. (Christian Brabandt)
+Files: src/ex_cmds.c
+
+
+*** ../vim-7.4.274/src/ex_cmds.c 2014-04-29 12:15:22.856032651 +0200
+--- src/ex_cmds.c 2014-05-07 14:38:31.293091622 +0200
+***************
+*** 7275,7281 ****
+ else
+ /* ":sign place {id} file={fname}": change sign type */
+ lnum = buf_change_sign_type(buf, id, sp->sn_typenr);
+! update_debug_sign(buf, lnum);
+ }
+ else
+ EMSG(_(e_invarg));
+--- 7275,7284 ----
+ else
+ /* ":sign place {id} file={fname}": change sign type */
+ lnum = buf_change_sign_type(buf, id, sp->sn_typenr);
+! if (lnum > 0)
+! update_debug_sign(buf, lnum);
+! else
+! EMSG2(_("E885: Not possible to change sign %s"), sign_name);
+ }
+ else
+ EMSG(_(e_invarg));
+*** ../vim-7.4.274/src/version.c 2014-05-02 15:46:10.731268318 +0200
+--- src/version.c 2014-05-07 14:18:32.581081129 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 275,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+117. You are more comfortable typing in html.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.276 b/patches/source/vim/patches/7.4.276
new file mode 100644
index 000000000..ab4f310dc
--- /dev/null
+++ b/patches/source/vim/patches/7.4.276
@@ -0,0 +1,302 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.276
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.276
+Problem: The fish shell is not supported.
+Solution: Use begin/end instead of () for fish. (Andy Russell)
+Files: src/ex_cmds.c, src/misc1.c, src/option.c, src/proto/misc1.pro
+
+
+*** ../vim-7.4.275/src/ex_cmds.c 2014-05-07 14:38:41.129091709 +0200
+--- src/ex_cmds.c 2014-05-07 15:09:57.797108136 +0200
+***************
+*** 1551,1558 ****
+ {
+ char_u *buf;
+ long_u len;
+
+! len = (long_u)STRLEN(cmd) + 3; /* "()" + NUL */
+ if (itmp != NULL)
+ len += (long_u)STRLEN(itmp) + 9; /* " { < " + " } " */
+ if (otmp != NULL)
+--- 1551,1566 ----
+ {
+ char_u *buf;
+ long_u len;
++ int is_fish_shell;
+
+! #if (defined(UNIX) && !defined(ARCHIE)) || defined(OS2)
+! /* Account for fish's different syntax for subshells */
+! is_fish_shell = (fnamecmp(get_isolated_shell_name(), "fish") == 0);
+! if (is_fish_shell)
+! len = (long_u)STRLEN(cmd) + 13; /* "begin; " + "; end" + NUL */
+! else
+! #endif
+! len = (long_u)STRLEN(cmd) + 3; /* "()" + NUL */
+ if (itmp != NULL)
+ len += (long_u)STRLEN(itmp) + 9; /* " { < " + " } " */
+ if (otmp != NULL)
+***************
+*** 1567,1573 ****
+ * redirecting input and/or output.
+ */
+ if (itmp != NULL || otmp != NULL)
+! vim_snprintf((char *)buf, len, "(%s)", (char *)cmd);
+ else
+ STRCPY(buf, cmd);
+ if (itmp != NULL)
+--- 1575,1586 ----
+ * redirecting input and/or output.
+ */
+ if (itmp != NULL || otmp != NULL)
+! {
+! if (is_fish_shell)
+! vim_snprintf((char *)buf, len, "begin; %s; end", (char *)cmd);
+! else
+! vim_snprintf((char *)buf, len, "(%s)", (char *)cmd);
+! }
+ else
+ STRCPY(buf, cmd);
+ if (itmp != NULL)
+***************
+*** 1577,1583 ****
+ }
+ #else
+ /*
+! * for shells that don't understand braces around commands, at least allow
+ * the use of commands in a pipe.
+ */
+ STRCPY(buf, cmd);
+--- 1590,1596 ----
+ }
+ #else
+ /*
+! * For shells that don't understand braces around commands, at least allow
+ * the use of commands in a pipe.
+ */
+ STRCPY(buf, cmd);
+***************
+*** 4315,4321 ****
+ pos_T old_cursor = curwin->w_cursor;
+ int start_nsubs;
+ #ifdef FEAT_EVAL
+! int save_ma = 0;
+ #endif
+
+ cmd = eap->arg;
+--- 4328,4334 ----
+ pos_T old_cursor = curwin->w_cursor;
+ int start_nsubs;
+ #ifdef FEAT_EVAL
+! int save_ma = 0;
+ #endif
+
+ cmd = eap->arg;
+***************
+*** 5986,5992 ****
+ "/\\\\?", "/\\\\z(\\\\)", "\\\\=", ":s\\\\=",
+ "\\[count]", "\\[quotex]", "\\[range]",
+ "\\[pattern]", "\\\\bar", "/\\\\%\\$",
+! "s/\\\\\\~", "s/\\\\U", "s/\\\\L",
+ "s/\\\\1", "s/\\\\2", "s/\\\\3", "s/\\\\9"};
+ int flags;
+
+--- 5999,6005 ----
+ "/\\\\?", "/\\\\z(\\\\)", "\\\\=", ":s\\\\=",
+ "\\[count]", "\\[quotex]", "\\[range]",
+ "\\[pattern]", "\\\\bar", "/\\\\%\\$",
+! "s/\\\\\\~", "s/\\\\U", "s/\\\\L",
+ "s/\\\\1", "s/\\\\2", "s/\\\\3", "s/\\\\9"};
+ int flags;
+
+***************
+*** 6026,6032 ****
+ /* Replace:
+ * "[:...:]" with "\[:...:]"
+ * "[++...]" with "\[++...]"
+! * "\{" with "\\{" -- matching "} \}"
+ */
+ if ((arg[0] == '[' && (arg[1] == ':'
+ || (arg[1] == '+' && arg[2] == '+')))
+--- 6039,6045 ----
+ /* Replace:
+ * "[:...:]" with "\[:...:]"
+ * "[++...]" with "\[++...]"
+! * "\{" with "\\{" -- matching "} \}"
+ */
+ if ((arg[0] == '[' && (arg[1] == ':'
+ || (arg[1] == '+' && arg[2] == '+')))
+*** ../vim-7.4.275/src/misc1.c 2014-04-05 19:44:36.903160723 +0200
+--- src/misc1.c 2014-05-07 15:04:25.921105231 +0200
+***************
+*** 1405,1411 ****
+ #ifdef FEAT_SMARTINDENT
+ if (did_si)
+ {
+! int sw = (int)get_sw_value(curbuf);
+
+ if (p_sr)
+ newindent -= newindent % sw;
+--- 1405,1411 ----
+ #ifdef FEAT_SMARTINDENT
+ if (did_si)
+ {
+! int sw = (int)get_sw_value(curbuf);
+
+ if (p_sr)
+ newindent -= newindent % sw;
+***************
+*** 10896,10898 ****
+--- 10896,10936 ----
+ {
+ return (p_im && stuff_empty() && typebuf_typed());
+ }
++
++ /*
++ * Returns the isolated name of the shell:
++ * - Skip beyond any path. E.g., "/usr/bin/csh -f" -> "csh -f".
++ * - Remove any argument. E.g., "csh -f" -> "csh".
++ * But don't allow a space in the path, so that this works:
++ * "/usr/bin/csh --rcfile ~/.cshrc"
++ * But don't do that for Windows, it's common to have a space in the path.
++ */
++ char_u *
++ get_isolated_shell_name()
++ {
++ char_u *p;
++
++ #ifdef WIN3264
++ p = gettail(p_sh);
++ p = vim_strnsave(p, (int)(skiptowhite(p) - p));
++ #else
++ p = skiptowhite(p_sh);
++ if (*p == NUL)
++ {
++ /* No white space, use the tail. */
++ p = vim_strsave(gettail(p_sh));
++ }
++ else
++ {
++ char_u *p1, *p2;
++
++ /* Find the last path separator before the space. */
++ p1 = p_sh;
++ for (p2 = p_sh; p2 < p; mb_ptr_adv(p2))
++ if (vim_ispathsep(*p2))
++ p1 = p2 + 1;
++ p = vim_strnsave(p1, (int)(p - p1));
++ }
++ #endif
++ return p;
++ }
+*** ../vim-7.4.275/src/option.c 2014-03-23 15:12:29.931264336 +0100
+--- src/option.c 2014-05-07 15:05:14.117105653 +0200
+***************
+*** 3804,3840 ****
+ else
+ do_sp = !(options[idx_sp].flags & P_WAS_SET);
+ #endif
+!
+! /*
+! * Isolate the name of the shell:
+! * - Skip beyond any path. E.g., "/usr/bin/csh -f" -> "csh -f".
+! * - Remove any argument. E.g., "csh -f" -> "csh".
+! * But don't allow a space in the path, so that this works:
+! * "/usr/bin/csh --rcfile ~/.cshrc"
+! * But don't do that for Windows, it's common to have a space in the path.
+! */
+! #ifdef WIN3264
+! p = gettail(p_sh);
+! p = vim_strnsave(p, (int)(skiptowhite(p) - p));
+! #else
+! p = skiptowhite(p_sh);
+! if (*p == NUL)
+! {
+! /* No white space, use the tail. */
+! p = vim_strsave(gettail(p_sh));
+! }
+! else
+! {
+! char_u *p1, *p2;
+!
+! /* Find the last path separator before the space. */
+! p1 = p_sh;
+! for (p2 = p_sh; p2 < p; mb_ptr_adv(p2))
+! if (vim_ispathsep(*p2))
+! p1 = p2 + 1;
+! p = vim_strnsave(p1, (int)(p - p1));
+! }
+! #endif
+ if (p != NULL)
+ {
+ /*
+--- 3804,3810 ----
+ else
+ do_sp = !(options[idx_sp].flags & P_WAS_SET);
+ #endif
+! p = get_isolated_shell_name();
+ if (p != NULL)
+ {
+ /*
+***************
+*** 3875,3880 ****
+--- 3845,3851 ----
+ || fnamecmp(p, "zsh") == 0
+ || fnamecmp(p, "zsh-beta") == 0
+ || fnamecmp(p, "bash") == 0
++ || fnamecmp(p, "fish") == 0
+ # ifdef WIN3264
+ || fnamecmp(p, "cmd") == 0
+ || fnamecmp(p, "sh.exe") == 0
+***************
+*** 8858,8865 ****
+ * opt_type). Uses
+ *
+ * Returned flags:
+! * 0 hidden or unknown option, also option that does not have requested
+! * type (see SREQ_* in vim.h)
+ * see SOPT_* in vim.h for other flags
+ *
+ * Possible opt_type values: see SREQ_* in vim.h
+--- 8829,8836 ----
+ * opt_type). Uses
+ *
+ * Returned flags:
+! * 0 hidden or unknown option, also option that does not have requested
+! * type (see SREQ_* in vim.h)
+ * see SOPT_* in vim.h for other flags
+ *
+ * Possible opt_type values: see SREQ_* in vim.h
+*** ../vim-7.4.275/src/proto/misc1.pro 2014-04-05 19:44:36.903160723 +0200
+--- src/proto/misc1.pro 2014-05-07 14:57:04.605101368 +0200
+***************
+*** 103,106 ****
+--- 103,107 ----
+ char_u *get_cmd_output __ARGS((char_u *cmd, char_u *infile, int flags, int *ret_len));
+ void FreeWild __ARGS((int count, char_u **files));
+ int goto_im __ARGS((void));
++ char_u *get_isolated_shell_name __ARGS((void));
+ /* vim: set ft=c : */
+*** ../vim-7.4.275/src/version.c 2014-05-07 14:38:41.129091709 +0200
+--- src/version.c 2014-05-07 14:58:59.769102376 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 276,
+ /**/
+
+--
+Support your right to bare arms! Wear short sleeves!
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.277 b/patches/source/vim/patches/7.4.277
new file mode 100644
index 000000000..1b569cb5e
--- /dev/null
+++ b/patches/source/vim/patches/7.4.277
@@ -0,0 +1,80 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.277
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.277
+Problem: Using ":sign unplace *" may leave the cursor in the wrong position
+ (Christian Brabandt)
+Solution: Update the cursor position when removing all signs.
+Files: src/buffer.c
+
+
+*** ../vim-7.4.276/src/buffer.c 2014-04-06 20:45:40.115357453 +0200
+--- src/buffer.c 2014-05-07 16:30:13.117150289 +0200
+***************
+*** 5525,5530 ****
+--- 5525,5534 ----
+ return;
+ }
+
++ /*
++ * For an existing, placed sign "markId" change the type to "typenr".
++ * Returns the line number of the sign, or zero if the sign is not found.
++ */
+ linenr_T
+ buf_change_sign_type(buf, markId, typenr)
+ buf_T *buf; /* buffer to store sign in */
+***************
+*** 5693,5698 ****
+--- 5697,5710 ----
+ {
+ signlist_T *next;
+
++ /* When deleting the last sign need to redraw the windows to remove the
++ * sign column. */
++ if (buf->b_signlist != NULL)
++ {
++ redraw_buf_later(buf, NOT_VALID);
++ changed_cline_bef_curs();
++ }
++
+ while (buf->b_signlist != NULL)
+ {
+ next = buf->b_signlist->next;
+***************
+*** 5711,5721 ****
+
+ for (buf = firstbuf; buf != NULL; buf = buf->b_next)
+ if (buf->b_signlist != NULL)
+- {
+- /* Need to redraw the windows to remove the sign column. */
+- redraw_buf_later(buf, NOT_VALID);
+ buf_delete_signs(buf);
+- }
+ }
+
+ /*
+--- 5723,5729 ----
+*** ../vim-7.4.276/src/version.c 2014-05-07 15:10:17.661108310 +0200
+--- src/version.c 2014-05-07 16:32:06.933151285 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 277,
+ /**/
+
+--
+An actual excerpt from a classified section of a city newspaper:
+"Illiterate? Write today for free help!"
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.278 b/patches/source/vim/patches/7.4.278
new file mode 100644
index 000000000..5740fb84c
--- /dev/null
+++ b/patches/source/vim/patches/7.4.278
@@ -0,0 +1,183 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.278
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.278
+Problem: list_remove() conflicts with function defined in Sun header file.
+Solution: Rename the function. (Richard Palo)
+Files: src/eval.c, src/if_lua.c, src/if_py_both.h, src/proto/eval.pro
+
+
+*** ../vim-7.4.277/src/eval.c 2014-04-29 17:41:18.351689927 +0200
+--- src/eval.c 2014-05-07 17:28:56.037181128 +0200
+***************
+*** 5998,6004 ****
+ list_T *l;
+ listitem_T *item;
+ {
+! list_remove(l, item, item);
+ listitem_free(item);
+ }
+
+--- 5998,6004 ----
+ list_T *l;
+ listitem_T *item;
+ {
+! vimlist_remove(l, item, item);
+ listitem_free(item);
+ }
+
+***************
+*** 6577,6585 ****
+ /*
+ * Remove items "item" to "item2" from list "l".
+ * Does not free the listitem or the value!
+ */
+ void
+! list_remove(l, item, item2)
+ list_T *l;
+ listitem_T *item;
+ listitem_T *item2;
+--- 6577,6587 ----
+ /*
+ * Remove items "item" to "item2" from list "l".
+ * Does not free the listitem or the value!
++ * This used to be called list_remove, but that conflicts with a Sun header
++ * file.
+ */
+ void
+! vimlist_remove(l, item, item2)
+ list_T *l;
+ listitem_T *item;
+ listitem_T *item2;
+***************
+*** 15435,15441 ****
+ if (argvars[2].v_type == VAR_UNKNOWN)
+ {
+ /* Remove one item, return its value. */
+! list_remove(l, item, item);
+ *rettv = item->li_tv;
+ vim_free(item);
+ }
+--- 15437,15443 ----
+ if (argvars[2].v_type == VAR_UNKNOWN)
+ {
+ /* Remove one item, return its value. */
+! vimlist_remove(l, item, item);
+ *rettv = item->li_tv;
+ vim_free(item);
+ }
+***************
+*** 15461,15467 ****
+ EMSG(_(e_invrange));
+ else
+ {
+! list_remove(l, item, item2);
+ if (rettv_list_alloc(rettv) == OK)
+ {
+ l = rettv->vval.v_list;
+--- 15463,15469 ----
+ EMSG(_(e_invrange));
+ else
+ {
+! vimlist_remove(l, item, item2);
+ if (rettv_list_alloc(rettv) == OK)
+ {
+ l = rettv->vval.v_list;
+*** ../vim-7.4.277/src/if_lua.c 2013-06-23 12:55:02.000000000 +0200
+--- src/if_lua.c 2014-05-07 17:29:08.913181240 +0200
+***************
+*** 734,740 ****
+ if (li == NULL) return 0;
+ if (lua_isnil(L, 3)) /* remove? */
+ {
+! list_remove(l, li, li);
+ clear_tv(&li->li_tv);
+ vim_free(li);
+ }
+--- 734,740 ----
+ if (li == NULL) return 0;
+ if (lua_isnil(L, 3)) /* remove? */
+ {
+! vimlist_remove(l, li, li);
+ clear_tv(&li->li_tv);
+ vim_free(li);
+ }
+*** ../vim-7.4.277/src/if_py_both.h 2014-03-30 16:11:37.176530823 +0200
+--- src/if_py_both.h 2014-05-07 17:29:26.497181394 +0200
+***************
+*** 2494,2500 ****
+ if (numreplaced < slicelen)
+ {
+ lis[slicelen + numreplaced] = lis[numreplaced]->li_prev;
+! list_remove(l, lis[numreplaced], lis[numreplaced]);
+ numreplaced++;
+ }
+ else
+--- 2494,2500 ----
+ if (numreplaced < slicelen)
+ {
+ lis[slicelen + numreplaced] = lis[numreplaced]->li_prev;
+! vimlist_remove(l, lis[numreplaced], lis[numreplaced]);
+ numreplaced++;
+ }
+ else
+***************
+*** 2570,2576 ****
+ if (obj == NULL)
+ {
+ li = list_find(l, (long) index);
+! list_remove(l, li, li);
+ clear_tv(&li->li_tv);
+ vim_free(li);
+ return 0;
+--- 2570,2576 ----
+ if (obj == NULL)
+ {
+ li = list_find(l, (long) index);
+! vimlist_remove(l, li, li);
+ clear_tv(&li->li_tv);
+ vim_free(li);
+ return 0;
+*** ../vim-7.4.277/src/proto/eval.pro 2014-01-14 16:36:40.000000000 +0100
+--- src/proto/eval.pro 2014-05-07 17:30:02.517181710 +0200
+***************
+*** 59,65 ****
+ int list_append_dict __ARGS((list_T *list, dict_T *dict));
+ int list_append_string __ARGS((list_T *l, char_u *str, int len));
+ int list_insert_tv __ARGS((list_T *l, typval_T *tv, listitem_T *item));
+! void list_remove __ARGS((list_T *l, listitem_T *item, listitem_T *item2));
+ void list_insert __ARGS((list_T *l, listitem_T *ni, listitem_T *item));
+ int garbage_collect __ARGS((void));
+ void set_ref_in_ht __ARGS((hashtab_T *ht, int copyID));
+--- 59,65 ----
+ int list_append_dict __ARGS((list_T *list, dict_T *dict));
+ int list_append_string __ARGS((list_T *l, char_u *str, int len));
+ int list_insert_tv __ARGS((list_T *l, typval_T *tv, listitem_T *item));
+! void vimlist_remove __ARGS((list_T *l, listitem_T *item, listitem_T *item2));
+ void list_insert __ARGS((list_T *l, listitem_T *ni, listitem_T *item));
+ int garbage_collect __ARGS((void));
+ void set_ref_in_ht __ARGS((hashtab_T *ht, int copyID));
+*** ../vim-7.4.277/src/version.c 2014-05-07 16:35:05.029152844 +0200
+--- src/version.c 2014-05-07 17:30:43.449182068 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 278,
+ /**/
+
+--
+"Computers in the future may weigh no more than 1.5 tons."
+ Popular Mechanics, 1949
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.279 b/patches/source/vim/patches/7.4.279
new file mode 100644
index 000000000..6fb4c1b3a
--- /dev/null
+++ b/patches/source/vim/patches/7.4.279
@@ -0,0 +1,616 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.279
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.279
+Problem: globpath() returns a string, making it difficult to get a list of
+ matches. (Greg Novack)
+Solution: Add an optional argument like with glob(). (Adnan Zafar)
+Files: runtime/doc/eval.txt, src/eval.c, src/ex_getln.c, src/misc1.c,
+ src/misc2.c, src/proto/ex_getln.pro, src/proto/misc2.pro,
+ src/testdir/test97.in, src/testdir/test97.ok
+
+
+*** ../vim-7.4.278/runtime/doc/eval.txt 2014-04-23 17:43:37.350948683 +0200
+--- runtime/doc/eval.txt 2014-05-07 17:38:03.045185916 +0200
+***************
+*** 1832,1838 ****
+ any variable {varname} in window {nr}
+ glob( {expr} [, {nosuf} [, {list}]])
+ any expand file wildcards in {expr}
+! globpath( {path}, {expr} [, {flag}])
+ String do glob({expr}) for all dirs in {path}
+ has( {feature}) Number TRUE if feature {feature} supported
+ has_key( {dict}, {key}) Number TRUE if {dict} has entry {key}
+--- 1832,1838 ----
+ any variable {varname} in window {nr}
+ glob( {expr} [, {nosuf} [, {list}]])
+ any expand file wildcards in {expr}
+! globpath( {path}, {expr} [, {nosuf} [, {list}]])
+ String do glob({expr}) for all dirs in {path}
+ has( {feature}) Number TRUE if feature {feature} supported
+ has_key( {dict}, {key}) Number TRUE if {dict} has entry {key}
+***************
+*** 3570,3580 ****
+ See |expand()| for expanding special Vim variables. See
+ |system()| for getting the raw output of an external command.
+
+! globpath({path}, {expr} [, {flag}]) *globpath()*
+ Perform glob() on all directories in {path} and concatenate
+ the results. Example: >
+ :echo globpath(&rtp, "syntax/c.vim")
+! < {path} is a comma-separated list of directory names. Each
+ directory name is prepended to {expr} and expanded like with
+ |glob()|. A path separator is inserted when needed.
+ To add a comma inside a directory name escape it with a
+--- 3571,3582 ----
+ See |expand()| for expanding special Vim variables. See
+ |system()| for getting the raw output of an external command.
+
+! globpath({path}, {expr} [, {nosuf} [, {list}]]) *globpath()*
+ Perform glob() on all directories in {path} and concatenate
+ the results. Example: >
+ :echo globpath(&rtp, "syntax/c.vim")
+! <
+! {path} is a comma-separated list of directory names. Each
+ directory name is prepended to {expr} and expanded like with
+ |glob()|. A path separator is inserted when needed.
+ To add a comma inside a directory name escape it with a
+***************
+*** 3582,3592 ****
+ trailing backslash, remove it if you put a comma after it.
+ If the expansion fails for one of the directories, there is no
+ error message.
+! Unless the optional {flag} argument is given and is non-zero,
+ the 'suffixes' and 'wildignore' options apply: Names matching
+ one of the patterns in 'wildignore' will be skipped and
+ 'suffixes' affect the ordering of matches.
+
+ The "**" item can be used to search in a directory tree.
+ For example, to find all "README.txt" files in the directories
+ in 'runtimepath' and below: >
+--- 3584,3602 ----
+ trailing backslash, remove it if you put a comma after it.
+ If the expansion fails for one of the directories, there is no
+ error message.
+!
+! Unless the optional {nosuf} argument is given and is non-zero,
+ the 'suffixes' and 'wildignore' options apply: Names matching
+ one of the patterns in 'wildignore' will be skipped and
+ 'suffixes' affect the ordering of matches.
+
++ When {list} is present and it is non-zero the result is a List
++ with all matching files. The advantage of using a List is, you
++ also get filenames containing newlines correctly. Otherwise
++ the result is a String and when there are several matches,
++ they are separated by <NL> characters. Example: >
++ :echo globpath(&rtp, "syntax/c.vim", 0, 1)
++ <
+ The "**" item can be used to search in a directory tree.
+ For example, to find all "README.txt" files in the directories
+ in 'runtimepath' and below: >
+*** ../vim-7.4.278/src/eval.c 2014-05-07 17:31:32.473182497 +0200
+--- src/eval.c 2014-05-07 18:06:29.541200854 +0200
+***************
+*** 7985,7991 ****
+ {"getwinposy", 0, 0, f_getwinposy},
+ {"getwinvar", 2, 3, f_getwinvar},
+ {"glob", 1, 3, f_glob},
+! {"globpath", 2, 3, f_globpath},
+ {"has", 1, 1, f_has},
+ {"has_key", 2, 2, f_has_key},
+ {"haslocaldir", 0, 0, f_haslocaldir},
+--- 7985,7991 ----
+ {"getwinposy", 0, 0, f_getwinposy},
+ {"getwinvar", 2, 3, f_getwinvar},
+ {"glob", 1, 3, f_glob},
+! {"globpath", 2, 4, f_globpath},
+ {"has", 1, 1, f_has},
+ {"has_key", 2, 2, f_has_key},
+ {"haslocaldir", 0, 0, f_haslocaldir},
+***************
+*** 12151,12168 ****
+ char_u buf1[NUMBUFLEN];
+ char_u *file = get_tv_string_buf_chk(&argvars[1], buf1);
+ int error = FALSE;
+
+ /* When the optional second argument is non-zero, don't remove matches
+ * for 'wildignore' and don't put matches for 'suffixes' at the end. */
+- if (argvars[2].v_type != VAR_UNKNOWN
+- && get_tv_number_chk(&argvars[2], &error))
+- flags |= WILD_KEEP_ALL;
+ rettv->v_type = VAR_STRING;
+! if (file == NULL || error)
+! rettv->vval.v_string = NULL;
+ else
+! rettv->vval.v_string = globpath(get_tv_string(&argvars[0]), file,
+! flags);
+ }
+
+ /*
+--- 12151,12187 ----
+ char_u buf1[NUMBUFLEN];
+ char_u *file = get_tv_string_buf_chk(&argvars[1], buf1);
+ int error = FALSE;
++ garray_T ga;
++ int i;
+
+ /* When the optional second argument is non-zero, don't remove matches
+ * for 'wildignore' and don't put matches for 'suffixes' at the end. */
+ rettv->v_type = VAR_STRING;
+! if (argvars[2].v_type != VAR_UNKNOWN)
+! {
+! if (get_tv_number_chk(&argvars[2], &error))
+! flags |= WILD_KEEP_ALL;
+! if (argvars[3].v_type != VAR_UNKNOWN
+! && get_tv_number_chk(&argvars[3], &error))
+! {
+! rettv->v_type = VAR_LIST;
+! rettv->vval.v_list = NULL;
+! }
+! }
+! if (file != NULL && !error)
+! {
+! ga_init2(&ga, (int)sizeof(char_u *), 10);
+! globpath(get_tv_string(&argvars[0]), file, &ga, flags);
+! if (rettv->v_type == VAR_STRING)
+! rettv->vval.v_string = ga_concat_strings(&ga, "\n");
+! else if (rettv_list_alloc(rettv) != FAIL)
+! for (i = 0; i < ga.ga_len; ++i)
+! list_append_string(rettv->vval.v_list,
+! ((char_u **)(ga.ga_data))[i], -1);
+! ga_clear_strings(&ga);
+! }
+ else
+! rettv->vval.v_string = NULL;
+ }
+
+ /*
+*** ../vim-7.4.278/src/ex_getln.c 2013-11-12 05:28:08.000000000 +0100
+--- src/ex_getln.c 2014-05-07 18:11:49.281203653 +0200
+***************
+*** 5095,5103 ****
+ char_u ***file;
+ char *dirnames[];
+ {
+- char_u *matches;
+ char_u *s;
+ char_u *e;
+ garray_T ga;
+ int i;
+ int pat_len;
+--- 5095,5103 ----
+ char_u ***file;
+ char *dirnames[];
+ {
+ char_u *s;
+ char_u *e;
++ char_u *match;
+ garray_T ga;
+ int i;
+ int pat_len;
+***************
+*** 5116,5148 ****
+ return FAIL;
+ }
+ sprintf((char *)s, "%s/%s*.vim", dirnames[i], pat);
+! matches = globpath(p_rtp, s, 0);
+ vim_free(s);
+! if (matches == NULL)
+! continue;
+
+! for (s = matches; *s != NUL; s = e)
+ {
+! e = vim_strchr(s, '\n');
+! if (e == NULL)
+! e = s + STRLEN(s);
+! if (ga_grow(&ga, 1) == FAIL)
+! break;
+! if (e - 4 > s && STRNICMP(e - 4, ".vim", 4) == 0)
+! {
+! for (s = e - 4; s > matches; mb_ptr_back(matches, s))
+! if (*s == '\n' || vim_ispathsep(*s))
+! break;
+! ++s;
+! ((char_u **)ga.ga_data)[ga.ga_len] =
+! vim_strnsave(s, (int)(e - s - 4));
+! ++ga.ga_len;
+! }
+! if (*e != NUL)
+! ++e;
+ }
+- vim_free(matches);
+ }
+ if (ga.ga_len == 0)
+ return FAIL;
+
+--- 5116,5142 ----
+ return FAIL;
+ }
+ sprintf((char *)s, "%s/%s*.vim", dirnames[i], pat);
+! globpath(p_rtp, s, &ga, 0);
+ vim_free(s);
+! }
+
+! for (i = 0; i < ga.ga_len; ++i)
+! {
+! match = ((char_u **)ga.ga_data)[i];
+! s = match;
+! e = s + STRLEN(s);
+! if (e - 4 > s && STRNICMP(e - 4, ".vim", 4) == 0)
+ {
+! e -= 4;
+! for (s = e; s > match; mb_ptr_back(match, s))
+! if (s < match || vim_ispathsep(*s))
+! break;
+! ++s;
+! *e = NUL;
+! mch_memmove(match, s, e - s + 1);
+ }
+ }
++
+ if (ga.ga_len == 0)
+ return FAIL;
+
+***************
+*** 5160,5192 ****
+ #if defined(FEAT_CMDL_COMPL) || defined(FEAT_EVAL) || defined(PROTO)
+ /*
+ * Expand "file" for all comma-separated directories in "path".
+! * Returns an allocated string with all matches concatenated, separated by
+! * newlines. Returns NULL for an error or no matches.
+ */
+! char_u *
+! globpath(path, file, expand_options)
+ char_u *path;
+ char_u *file;
+ int expand_options;
+ {
+ expand_T xpc;
+ char_u *buf;
+- garray_T ga;
+ int i;
+- int len;
+ int num_p;
+ char_u **p;
+- char_u *cur = NULL;
+
+ buf = alloc(MAXPATHL);
+ if (buf == NULL)
+! return NULL;
+
+ ExpandInit(&xpc);
+ xpc.xp_context = EXPAND_FILES;
+
+- ga_init2(&ga, 1, 100);
+-
+ /* Loop over all entries in {path}. */
+ while (*path != NUL)
+ {
+--- 5154,5181 ----
+ #if defined(FEAT_CMDL_COMPL) || defined(FEAT_EVAL) || defined(PROTO)
+ /*
+ * Expand "file" for all comma-separated directories in "path".
+! * Adds the matches to "ga". Caller must init "ga".
+ */
+! void
+! globpath(path, file, ga, expand_options)
+ char_u *path;
+ char_u *file;
++ garray_T *ga;
+ int expand_options;
+ {
+ expand_T xpc;
+ char_u *buf;
+ int i;
+ int num_p;
+ char_u **p;
+
+ buf = alloc(MAXPATHL);
+ if (buf == NULL)
+! return;
+
+ ExpandInit(&xpc);
+ xpc.xp_context = EXPAND_FILES;
+
+ /* Loop over all entries in {path}. */
+ while (*path != NUL)
+ {
+***************
+*** 5207,5236 ****
+ WILD_SILENT|expand_options) != FAIL && num_p > 0)
+ {
+ ExpandEscape(&xpc, buf, num_p, p, WILD_SILENT|expand_options);
+- for (len = 0, i = 0; i < num_p; ++i)
+- len += (int)STRLEN(p[i]) + 1;
+
+! /* Concatenate new results to previous ones. */
+! if (ga_grow(&ga, len) == OK)
+ {
+- cur = (char_u *)ga.ga_data + ga.ga_len;
+ for (i = 0; i < num_p; ++i)
+ {
+! STRCPY(cur, p[i]);
+! cur += STRLEN(p[i]);
+! *cur++ = '\n';
+ }
+- ga.ga_len += len;
+ }
+ FreeWild(num_p, p);
+ }
+ }
+ }
+- if (cur != NULL)
+- *--cur = 0; /* Replace trailing newline with NUL */
+
+ vim_free(buf);
+- return (char_u *)ga.ga_data;
+ }
+
+ #endif
+--- 5196,5218 ----
+ WILD_SILENT|expand_options) != FAIL && num_p > 0)
+ {
+ ExpandEscape(&xpc, buf, num_p, p, WILD_SILENT|expand_options);
+
+! if (ga_grow(ga, num_p) == OK)
+ {
+ for (i = 0; i < num_p; ++i)
+ {
+! ((char_u **)ga->ga_data)[ga->ga_len] =
+! vim_strnsave(p[i], STRLEN(p[i]));
+! ++ga->ga_len;
+ }
+ }
++
+ FreeWild(num_p, p);
+ }
+ }
+ }
+
+ vim_free(buf);
+ }
+
+ #endif
+*** ../vim-7.4.278/src/misc1.c 2014-05-07 15:10:17.657108310 +0200
+--- src/misc1.c 2014-05-07 17:46:30.269190356 +0200
+***************
+*** 10336,10344 ****
+ {
+ char_u *curdir;
+ garray_T path_ga;
+- char_u *files = NULL;
+- char_u *s; /* start */
+- char_u *e; /* end */
+ char_u *paths = NULL;
+
+ if ((curdir = alloc((unsigned)MAXPATHL)) == NULL)
+--- 10336,10341 ----
+***************
+*** 10351,10387 ****
+ if (path_ga.ga_len == 0)
+ return 0;
+
+! paths = ga_concat_strings(&path_ga);
+ ga_clear_strings(&path_ga);
+ if (paths == NULL)
+ return 0;
+
+! files = globpath(paths, pattern, (flags & EW_ICASE) ? WILD_ICASE : 0);
+ vim_free(paths);
+- if (files == NULL)
+- return 0;
+-
+- /* Copy each path in files into gap */
+- s = e = files;
+- while (*s != NUL)
+- {
+- while (*e != '\n' && *e != NUL)
+- e++;
+- if (*e == NUL)
+- {
+- addfile(gap, s, flags);
+- break;
+- }
+- else
+- {
+- /* *e is '\n' */
+- *e = NUL;
+- addfile(gap, s, flags);
+- e++;
+- s = e;
+- }
+- }
+- vim_free(files);
+
+ return gap->ga_len;
+ }
+--- 10348,10360 ----
+ if (path_ga.ga_len == 0)
+ return 0;
+
+! paths = ga_concat_strings(&path_ga, ",");
+ ga_clear_strings(&path_ga);
+ if (paths == NULL)
+ return 0;
+
+! globpath(paths, pattern, gap, (flags & EW_ICASE) ? WILD_ICASE : 0);
+ vim_free(paths);
+
+ return gap->ga_len;
+ }
+*** ../vim-7.4.278/src/misc2.c 2014-03-23 15:12:29.927264336 +0100
+--- src/misc2.c 2014-05-07 18:34:37.689215632 +0200
+***************
+*** 2087,2115 ****
+
+ /*
+ * For a growing array that contains a list of strings: concatenate all the
+! * strings with a separating comma.
+ * Returns NULL when out of memory.
+ */
+ char_u *
+! ga_concat_strings(gap)
+ garray_T *gap;
+ {
+ int i;
+ int len = 0;
+ char_u *s;
+
+ for (i = 0; i < gap->ga_len; ++i)
+! len += (int)STRLEN(((char_u **)(gap->ga_data))[i]) + 1;
+
+ s = alloc(len + 1);
+ if (s != NULL)
+ {
+ *s = NUL;
+ for (i = 0; i < gap->ga_len; ++i)
+ {
+! if (*s != NUL)
+! STRCAT(s, ",");
+! STRCAT(s, ((char_u **)(gap->ga_data))[i]);
+ }
+ }
+ return s;
+--- 2087,2123 ----
+
+ /*
+ * For a growing array that contains a list of strings: concatenate all the
+! * strings with a separating "sep".
+ * Returns NULL when out of memory.
+ */
+ char_u *
+! ga_concat_strings(gap, sep)
+ garray_T *gap;
++ char *sep;
+ {
+ int i;
+ int len = 0;
++ int sep_len = (int)STRLEN(sep);
+ char_u *s;
++ char_u *p;
+
+ for (i = 0; i < gap->ga_len; ++i)
+! len += (int)STRLEN(((char_u **)(gap->ga_data))[i]) + sep_len;
+
+ s = alloc(len + 1);
+ if (s != NULL)
+ {
+ *s = NUL;
++ p = s;
+ for (i = 0; i < gap->ga_len; ++i)
+ {
+! if (p != s)
+! {
+! STRCPY(p, sep);
+! p += sep_len;
+! }
+! STRCPY(p, ((char_u **)(gap->ga_data))[i]);
+! p += STRLEN(p);
+ }
+ }
+ return s;
+*** ../vim-7.4.278/src/proto/ex_getln.pro 2013-08-10 13:37:11.000000000 +0200
+--- src/proto/ex_getln.pro 2014-05-07 17:52:42.457193614 +0200
+***************
+*** 32,38 ****
+ void set_cmd_context __ARGS((expand_T *xp, char_u *str, int len, int col));
+ int expand_cmdline __ARGS((expand_T *xp, char_u *str, int col, int *matchcount, char_u ***matches));
+ int ExpandGeneric __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file, char_u *((*func)(expand_T *, int)), int escaped));
+! char_u *globpath __ARGS((char_u *path, char_u *file, int expand_options));
+ void init_history __ARGS((void));
+ int get_histtype __ARGS((char_u *name));
+ void add_to_history __ARGS((int histype, char_u *new_entry, int in_map, int sep));
+--- 32,38 ----
+ void set_cmd_context __ARGS((expand_T *xp, char_u *str, int len, int col));
+ int expand_cmdline __ARGS((expand_T *xp, char_u *str, int col, int *matchcount, char_u ***matches));
+ int ExpandGeneric __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file, char_u *((*func)(expand_T *, int)), int escaped));
+! void globpath __ARGS((char_u *path, char_u *file, garray_T *ga, int expand_options));
+ void init_history __ARGS((void));
+ int get_histtype __ARGS((char_u *name));
+ void add_to_history __ARGS((int histype, char_u *new_entry, int in_map, int sep));
+*** ../vim-7.4.278/src/proto/misc2.pro 2014-02-23 23:38:58.828760280 +0100
+--- src/proto/misc2.pro 2014-05-07 17:52:36.189193559 +0200
+***************
+*** 55,61 ****
+ void ga_init __ARGS((garray_T *gap));
+ void ga_init2 __ARGS((garray_T *gap, int itemsize, int growsize));
+ int ga_grow __ARGS((garray_T *gap, int n));
+! char_u *ga_concat_strings __ARGS((garray_T *gap));
+ void ga_concat __ARGS((garray_T *gap, char_u *s));
+ void ga_append __ARGS((garray_T *gap, int c));
+ void append_ga_line __ARGS((garray_T *gap));
+--- 55,61 ----
+ void ga_init __ARGS((garray_T *gap));
+ void ga_init2 __ARGS((garray_T *gap, int itemsize, int growsize));
+ int ga_grow __ARGS((garray_T *gap, int n));
+! char_u *ga_concat_strings __ARGS((garray_T *gap, char *sep));
+ void ga_concat __ARGS((garray_T *gap, char_u *s));
+ void ga_append __ARGS((garray_T *gap, int c));
+ void append_ga_line __ARGS((garray_T *gap));
+*** ../vim-7.4.278/src/testdir/test97.in 2013-08-02 14:55:50.000000000 +0200
+--- src/testdir/test97.in 2014-05-07 18:27:59.213212144 +0200
+***************
+*** 5,16 ****
+ :so small.vim
+ :set shell=doesnotexist
+ :e test.out
+! :put =glob('Xxx\{')
+! :put =glob('Xxx\$')
+ :w! Xxx{
+ :w! Xxx\$
+! :put =glob('Xxx\{')
+! :put =glob('Xxx\$')
+ :w
+ :qa!
+ ENDTEST
+--- 5,19 ----
+ :so small.vim
+ :set shell=doesnotexist
+ :e test.out
+! :$put =glob('Xxx\{')
+! :$put =glob('Xxx\$')
+ :w! Xxx{
+ :w! Xxx\$
+! :$put =glob('Xxx\{')
+! :$put =glob('Xxx\$')
+! :"
+! :$put =string(globpath('sautest/autoload', '*.vim'))
+! :$put =string(globpath('sautest/autoload', '*.vim', 0, 1))
+ :w
+ :qa!
+ ENDTEST
+*** ../vim-7.4.278/src/testdir/test97.ok 2013-07-03 16:14:50.000000000 +0200
+--- src/testdir/test97.ok 2014-05-07 18:28:01.985212168 +0200
+***************
+*** 3,5 ****
+--- 3,8 ----
+
+ Xxx{
+ Xxx$
++ 'sautest/autoload/Test104.vim
++ sautest/autoload/footest.vim'
++ ['sautest/autoload/Test104.vim', 'sautest/autoload/footest.vim']
+*** ../vim-7.4.278/src/version.c 2014-05-07 17:31:32.473182497 +0200
+--- src/version.c 2014-05-07 17:35:06.253184368 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 279,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+121. You ask for e-mail adresses instead of telephone numbers.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.280 b/patches/source/vim/patches/7.4.280
new file mode 100644
index 000000000..6b392df0d
--- /dev/null
+++ b/patches/source/vim/patches/7.4.280
@@ -0,0 +1,125 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.280
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.280
+Problem: When using a session file the relative position of the cursor is
+ not restored if there is another tab. (Nobuhiro Takasaki)
+Solution: Update w_wrow before calculating the fraction.
+Files: src/window.c
+
+
+*** ../vim-7.4.279/src/window.c 2014-03-23 15:12:29.943264337 +0100
+--- src/window.c 2014-05-07 20:18:55.237270409 +0200
+***************
+*** 5623,5629 ****
+ win_T *wp;
+ {
+ wp->w_fraction = ((long)wp->w_wrow * FRACTION_MULT
+! + FRACTION_MULT / 2) / (long)wp->w_height;
+ }
+
+ /*
+--- 5623,5629 ----
+ win_T *wp;
+ {
+ wp->w_fraction = ((long)wp->w_wrow * FRACTION_MULT
+! + wp->w_height / 2) / (long)wp->w_height;
+ }
+
+ /*
+***************
+*** 5638,5643 ****
+--- 5638,5644 ----
+ {
+ linenr_T lnum;
+ int sline, line_size;
++ int prev_height = wp->w_height;
+
+ /* Don't want a negative height. Happens when splitting a tiny window.
+ * Will equalize heights soon to fix it. */
+***************
+*** 5646,5653 ****
+ if (wp->w_height == height)
+ return; /* nothing to do */
+
+! if (wp->w_wrow != wp->w_prev_fraction_row && wp->w_height > 0)
+! set_fraction(wp);
+
+ wp->w_height = height;
+ wp->w_skipcol = 0;
+--- 5647,5659 ----
+ if (wp->w_height == height)
+ return; /* nothing to do */
+
+! if (wp->w_height > 0)
+! {
+! if (wp == curwin)
+! validate_cursor(); /* w_wrow needs to be valid */
+! if (wp->w_wrow != wp->w_prev_fraction_row)
+! set_fraction(wp);
+! }
+
+ wp->w_height = height;
+ wp->w_skipcol = 0;
+***************
+*** 5667,5673 ****
+ lnum = wp->w_cursor.lnum;
+ if (lnum < 1) /* can happen when starting up */
+ lnum = 1;
+! wp->w_wrow = ((long)wp->w_fraction * (long)height - 1L) / FRACTION_MULT;
+ line_size = plines_win_col(wp, lnum, (long)(wp->w_cursor.col)) - 1;
+ sline = wp->w_wrow - line_size;
+
+--- 5673,5680 ----
+ lnum = wp->w_cursor.lnum;
+ if (lnum < 1) /* can happen when starting up */
+ lnum = 1;
+! wp->w_wrow = ((long)wp->w_fraction * (long)height - 1L
+! + FRACTION_MULT / 2) / FRACTION_MULT;
+ line_size = plines_win_col(wp, lnum, (long)(wp->w_cursor.col)) - 1;
+ sline = wp->w_wrow - line_size;
+
+***************
+*** 5757,5763 ****
+ update_topline();
+ curs_columns(FALSE); /* validate w_wrow */
+ }
+! wp->w_prev_fraction_row = wp->w_wrow;
+
+ win_comp_scroll(wp);
+ redraw_win_later(wp, SOME_VALID);
+--- 5764,5771 ----
+ update_topline();
+ curs_columns(FALSE); /* validate w_wrow */
+ }
+! if (prev_height > 0)
+! wp->w_prev_fraction_row = wp->w_wrow;
+
+ win_comp_scroll(wp);
+ redraw_win_later(wp, SOME_VALID);
+*** ../vim-7.4.279/src/version.c 2014-05-07 18:35:25.669216052 +0200
+--- src/version.c 2014-05-07 20:24:14.313273202 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 280,
+ /**/
+
+--
+~
+~
+~
+".signature" 4 lines, 50 characters written
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.281 b/patches/source/vim/patches/7.4.281
new file mode 100644
index 000000000..6c6765ab4
--- /dev/null
+++ b/patches/source/vim/patches/7.4.281
@@ -0,0 +1,80 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.281
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.281
+Problem: When a session file has more than one tabpage and 'showtabline' is
+ one the positions may be slightly off.
+Solution: Set 'showtabline' to two while positioning windows.
+Files: src/ex_docmd.c
+
+
+*** ../vim-7.4.280/src/ex_docmd.c 2014-04-29 12:15:22.856032651 +0200
+--- src/ex_docmd.c 2014-05-07 21:07:56.249296154 +0200
+***************
+*** 10290,10295 ****
+--- 10290,10296 ----
+ char_u *sname;
+ win_T *edited_win = NULL;
+ int tabnr;
++ int restore_stal = FALSE;
+ win_T *tab_firstwin;
+ frame_T *tab_topframe;
+ int cur_arg_idx = 0;
+***************
+*** 10399,10404 ****
+--- 10400,10418 ----
+ #endif
+
+ /*
++ * When there are two or more tabpages and 'showtabline' is 1 the tabline
++ * will be displayed when creating the next tab. That resizes the windows
++ * in the first tab, which may cause problems. Set 'showtabline' to 2
++ * temporarily to avoid that.
++ */
++ if (p_stal == 1 && first_tabpage->tp_next != NULL)
++ {
++ if (put_line(fd, "set stal=2") == FAIL)
++ return FAIL;
++ restore_stal = TRUE;
++ }
++
++ /*
+ * May repeat putting Windows for each tab, when "tabpages" is in
+ * 'sessionoptions'.
+ * Don't use goto_tabpage(), it may change directory and trigger
+***************
+*** 10548,10553 ****
+--- 10562,10569 ----
+ || put_eol(fd) == FAIL)
+ return FAIL;
+ }
++ if (restore_stal && put_line(fd, "set stal=1") == FAIL)
++ return FAIL;
+
+ /*
+ * Wipe out an empty unnamed buffer we started in.
+*** ../vim-7.4.280/src/version.c 2014-05-07 20:25:30.845273872 +0200
+--- src/version.c 2014-05-07 21:11:24.925297981 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 281,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+122. You ask if the Netaholics Anonymous t-shirt you ordered can be
+ sent to you via e-mail.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.282 b/patches/source/vim/patches/7.4.282
new file mode 100644
index 000000000..5ee4e8d22
--- /dev/null
+++ b/patches/source/vim/patches/7.4.282
@@ -0,0 +1,48 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.282
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.282 (after 7.4.279)
+Problem: Test 97 fails on Mac.
+Solution: Do not ignore case in file names. (Jun Takimoto)
+Files: src/testdir/test97.in
+
+
+*** ../vim-7.4.281/src/testdir/test97.in 2014-05-07 18:35:25.669216052 +0200
+--- src/testdir/test97.in 2014-05-08 11:42:37.701755565 +0200
+***************
+*** 3,9 ****
+--- 3,12 ----
+
+ STARTTEST
+ :so small.vim
++ :" make sure glob() doesn't use the shell
+ :set shell=doesnotexist
++ :" consistent sorting of file names
++ :set nofileignorecase
+ :e test.out
+ :$put =glob('Xxx\{')
+ :$put =glob('Xxx\$')
+*** ../vim-7.4.281/src/version.c 2014-05-07 21:14:42.913299714 +0200
+--- src/version.c 2014-05-08 11:46:04.825757378 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 282,
+ /**/
+
+--
+Would you care for a drink? I mean, if it were, like,
+disabled and you had to look after it?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.283 b/patches/source/vim/patches/7.4.283
new file mode 100644
index 000000000..213847035
--- /dev/null
+++ b/patches/source/vim/patches/7.4.283
@@ -0,0 +1,56 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.283
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.283 (after 7.4.276)
+Problem: Compiler warning about unused variable. (Charles Cooper)
+Solution: Move the variable inside the #if block.
+Files: src/ex_cmds.c
+
+
+*** ../vim-7.4.282/src/ex_cmds.c 2014-05-07 15:10:17.657108310 +0200
+--- src/ex_cmds.c 2014-05-09 20:31:16.414789550 +0200
+***************
+*** 1551,1559 ****
+ {
+ char_u *buf;
+ long_u len;
+- int is_fish_shell;
+
+ #if (defined(UNIX) && !defined(ARCHIE)) || defined(OS2)
+ /* Account for fish's different syntax for subshells */
+ is_fish_shell = (fnamecmp(get_isolated_shell_name(), "fish") == 0);
+ if (is_fish_shell)
+--- 1551,1560 ----
+ {
+ char_u *buf;
+ long_u len;
+
+ #if (defined(UNIX) && !defined(ARCHIE)) || defined(OS2)
++ int is_fish_shell;
++
+ /* Account for fish's different syntax for subshells */
+ is_fish_shell = (fnamecmp(get_isolated_shell_name(), "fish") == 0);
+ if (is_fish_shell)
+*** ../vim-7.4.282/src/version.c 2014-05-08 11:46:23.621757543 +0200
+--- src/version.c 2014-05-09 20:32:06.538789989 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 283,
+ /**/
+
+--
+Don't drink and drive. You might hit a bump and spill your beer.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.284 b/patches/source/vim/patches/7.4.284
new file mode 100644
index 000000000..0c9781eb9
--- /dev/null
+++ b/patches/source/vim/patches/7.4.284
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.284
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.284
+Problem: Setting 'langmap' in the modeline can cause trouble. E.g. mapping
+ ":" breaks many commands. (Jens-Wolfhard Schicke-Uffmann)
+Solution: Disallow setting 'langmap' from the modeline.
+Files: src/option.c
+
+
+*** ../vim-7.4.283/src/option.c 2014-05-07 15:10:17.661108310 +0200
+--- src/option.c 2014-05-13 12:11:39.677552445 +0200
+***************
+*** 1652,1658 ****
+ #endif
+ #endif
+ (char_u *)0L} SCRIPTID_INIT},
+! {"langmap", "lmap", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
+ #ifdef FEAT_LANGMAP
+ (char_u *)&p_langmap, PV_NONE,
+ {(char_u *)"", /* unmatched } */
+--- 1652,1658 ----
+ #endif
+ #endif
+ (char_u *)0L} SCRIPTID_INIT},
+! {"langmap", "lmap", P_STRING|P_VI_DEF|P_COMMA|P_NODUP|P_SECURE,
+ #ifdef FEAT_LANGMAP
+ (char_u *)&p_langmap, PV_NONE,
+ {(char_u *)"", /* unmatched } */
+*** ../vim-7.4.283/src/version.c 2014-05-09 20:33:01.102790466 +0200
+--- src/version.c 2014-05-13 12:12:21.273552809 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 284,
+ /**/
+
+--
+We are the Borg of GNU GPL. We will assimilate your source code.
+Resistance is futile.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.285 b/patches/source/vim/patches/7.4.285
new file mode 100644
index 000000000..2d3862dab
--- /dev/null
+++ b/patches/source/vim/patches/7.4.285
@@ -0,0 +1,49 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.285
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.285
+Problem: When 'relativenumber' is set and deleting lines or undoing that,
+ line numbers are not always updated. (Robert Arkwright)
+Solution: (Christian Brabandt)
+Files: src/misc1.c
+
+
+*** ../vim-7.4.284/src/misc1.c 2014-05-07 18:35:25.669216052 +0200
+--- src/misc1.c 2014-05-13 12:41:56.357568348 +0200
+***************
+*** 3125,3130 ****
+--- 3125,3133 ----
+ if (hasAnyFolding(wp))
+ set_topline(wp, wp->w_topline);
+ #endif
++ /* relative numbering may require updating more */
++ if (wp->w_p_rnu)
++ redraw_win_later(wp, SOME_VALID);
+ }
+ }
+
+*** ../vim-7.4.284/src/version.c 2014-05-13 12:16:44.037555110 +0200
+--- src/version.c 2014-05-13 12:33:21.553563842 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 285,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+148. You find it easier to dial-up the National Weather Service
+ Weather/your_town/now.html than to simply look out the window.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.286 b/patches/source/vim/patches/7.4.286
new file mode 100644
index 000000000..9c60ec003
--- /dev/null
+++ b/patches/source/vim/patches/7.4.286
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.286
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.286
+Problem: Error messages are inconsistant. (ZyX)
+Solution: Change "Lists" to "list".
+Files: src/eval.c
+
+
+*** ../vim-7.4.285/src/eval.c 2014-05-07 18:35:25.665216052 +0200
+--- src/eval.c 2014-05-13 13:37:47.349597682 +0200
+***************
+*** 4431,4437 ****
+ if (rettv->v_type != var2.v_type)
+ EMSG(_("E691: Can only compare List with List"));
+ else
+! EMSG(_("E692: Invalid operation for Lists"));
+ clear_tv(rettv);
+ clear_tv(&var2);
+ return FAIL;
+--- 4431,4437 ----
+ if (rettv->v_type != var2.v_type)
+ EMSG(_("E691: Can only compare List with List"));
+ else
+! EMSG(_("E692: Invalid operation for List"));
+ clear_tv(rettv);
+ clear_tv(&var2);
+ return FAIL;
+*** ../vim-7.4.285/src/version.c 2014-05-13 12:44:19.897569605 +0200
+--- src/version.c 2014-05-13 13:31:23.393594321 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 286,
+ /**/
+
+--
+You are not really successful until someone claims he sat
+beside you in school.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.287 b/patches/source/vim/patches/7.4.287
new file mode 100644
index 000000000..1288981cc
--- /dev/null
+++ b/patches/source/vim/patches/7.4.287
@@ -0,0 +1,47 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.287
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.287
+Problem: Patches for .hgignore don't work, since the file is not in the
+ distribution.
+Solution: Add .hgignore to the distribution. Will be effective with the
+ next version.
+Files: Filelist
+
+
+*** ../vim-7.4.286/Filelist 2014-04-29 14:02:42.547919791 +0200
+--- Filelist 2014-05-13 13:50:01.669604110 +0200
+***************
+*** 3,8 ****
+--- 3,9 ----
+
+ # source files for all source archives
+ SRC_ALL = \
++ .hgignore \
+ src/README.txt \
+ src/arabic.c \
+ src/arabic.h \
+*** ../vim-7.4.286/src/version.c 2014-05-13 13:46:30.597602262 +0200
+--- src/version.c 2014-05-13 13:51:38.101604954 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 287,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+150. You find yourself counting emoticons to get to sleep.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.288 b/patches/source/vim/patches/7.4.288
new file mode 100644
index 000000000..a1fd18204
--- /dev/null
+++ b/patches/source/vim/patches/7.4.288
@@ -0,0 +1,46 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.288
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.288
+Problem: When 'spellfile' is set the screen is not redrawn.
+Solution: Redraw when updating the spelling info. (Christian Brabandt)
+Files: src/spell.c
+
+
+*** ../vim-7.4.287/src/spell.c 2014-03-23 15:12:29.939264336 +0100
+--- src/spell.c 2014-05-13 14:01:59.165610391 +0200
+***************
+*** 4508,4513 ****
+--- 4508,4514 ----
+ theend:
+ vim_free(spl_copy);
+ recursive = FALSE;
++ redraw_win_later(wp, NOT_VALID);
+ return ret_msg;
+ }
+
+*** ../vim-7.4.287/src/version.c 2014-05-13 13:52:34.821605451 +0200
+--- src/version.c 2014-05-13 13:55:26.865606957 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 288,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+151. You find yourself engaged to someone you've never actually met,
+ except through e-mail.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.289 b/patches/source/vim/patches/7.4.289
new file mode 100644
index 000000000..e62ce146a
--- /dev/null
+++ b/patches/source/vim/patches/7.4.289
@@ -0,0 +1,122 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.289
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.289
+Problem: Pattern with repeated backreference does not match with new regexp
+ engine. (Urtica Dioica)
+Solution: Also check the end of a submatch when deciding to put a state in
+ the state list.
+Files: src/testdir/test64.in, src/testdir/test64.ok, src/regexp_nfa.c
+
+
+*** ../vim-7.4.288/src/testdir/test64.in 2013-11-21 17:12:55.000000000 +0100
+--- src/testdir/test64.in 2014-05-13 15:35:02.477659266 +0200
+***************
+*** 407,412 ****
+--- 407,413 ----
+ :call add(tl, [2, '^.*\.\(.*\)/.\+\(\1\)\@<=$', 'foo.bat/foo.bat', 'foo.bat/foo.bat', 'bat', 'bat'])
+ :call add(tl, [2, '\\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}', '2013-06-27${0}', '${0}', '0'])
+ :call add(tl, [2, '^\(a*\)\1$', 'aaaaaaaa', 'aaaaaaaa', 'aaaa'])
++ :call add(tl, [2, '^\(a\{-2,}\)\1\+$', 'aaaaaaaaa', 'aaaaaaaaa', 'aaa'])
+ :"
+ :"""" Look-behind with limit
+ :call add(tl, [2, '<\@<=span.', 'xxspanxx<spanyyy', 'spany'])
+*** ../vim-7.4.288/src/testdir/test64.ok 2013-11-21 17:12:55.000000000 +0100
+--- src/testdir/test64.ok 2014-05-13 15:49:21.381666784 +0200
+***************
+*** 947,952 ****
+--- 947,955 ----
+ OK 0 - ^\(a*\)\1$
+ OK 1 - ^\(a*\)\1$
+ OK 2 - ^\(a*\)\1$
++ OK 0 - ^\(a\{-2,}\)\1\+$
++ OK 1 - ^\(a\{-2,}\)\1\+$
++ OK 2 - ^\(a\{-2,}\)\1\+$
+ OK 0 - <\@<=span.
+ OK 1 - <\@<=span.
+ OK 2 - <\@<=span.
+*** ../vim-7.4.288/src/regexp_nfa.c 2014-04-23 19:06:33.702828771 +0200
+--- src/regexp_nfa.c 2014-05-13 15:49:15.065666729 +0200
+***************
+*** 3945,3950 ****
+--- 3945,3951 ----
+
+ /*
+ * Return TRUE if "sub1" and "sub2" have the same start positions.
++ * When using back-references also check the end position.
+ */
+ static int
+ sub_equal(sub1, sub2)
+***************
+*** 3976,3981 ****
+--- 3977,3999 ----
+ if (s1 != -1 && sub1->list.multi[i].start.col
+ != sub2->list.multi[i].start.col)
+ return FALSE;
++
++ if (nfa_has_backref)
++ {
++ if (i < sub1->in_use)
++ s1 = sub1->list.multi[i].end.lnum;
++ else
++ s1 = -1;
++ if (i < sub2->in_use)
++ s2 = sub2->list.multi[i].end.lnum;
++ else
++ s2 = -1;
++ if (s1 != s2)
++ return FALSE;
++ if (s1 != -1 && sub1->list.multi[i].end.col
++ != sub2->list.multi[i].end.col)
++ return FALSE;
++ }
+ }
+ }
+ else
+***************
+*** 3992,3997 ****
+--- 4010,4028 ----
+ sp2 = NULL;
+ if (sp1 != sp2)
+ return FALSE;
++ if (nfa_has_backref)
++ {
++ if (i < sub1->in_use)
++ sp1 = sub1->list.line[i].end;
++ else
++ sp1 = NULL;
++ if (i < sub2->in_use)
++ sp2 = sub2->list.line[i].end;
++ else
++ sp2 = NULL;
++ if (sp1 != sp2)
++ return FALSE;
++ }
+ }
+ }
+
+*** ../vim-7.4.288/src/version.c 2014-05-13 14:03:36.425611242 +0200
+--- src/version.c 2014-05-13 15:51:52.009668103 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 289,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+152. You find yourself falling for someone you've never seen or hardly
+ know, but, boy can he/she TYPE!!!!!!
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.290 b/patches/source/vim/patches/7.4.290
new file mode 100644
index 000000000..e2e1e62bb
--- /dev/null
+++ b/patches/source/vim/patches/7.4.290
@@ -0,0 +1,156 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.290
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.290
+Problem: A non-greedy match followed by a branch is too greedy. (Ingo
+ Karkat)
+Solution: Add NFA_MATCH when it is already in the state list if the position
+ differs.
+Files: src/testdir/test64.in, src/testdir/test64.ok, src/regexp_nfa.c
+
+
+*** ../vim-7.4.289/src/testdir/test64.in 2014-05-13 15:56:45.017670668 +0200
+--- src/testdir/test64.in 2014-05-13 16:15:57.213680754 +0200
+***************
+*** 238,244 ****
+ :call add(tl, [2, '\vx(.{-,8})yz(.*)','xayxayzxayzxayz','xayxayzxayzxayz','ayxa','xayzxayz'])
+ :call add(tl, [2, '\vx(.*)yz(.*)','xayxayzxayzxayz','xayxayzxayzxayz', 'ayxayzxayzxa',''])
+ :call add(tl, [2, '\v(a{1,2}){-2,3}','aaaaaaa','aaaa','aa'])
+! :call add(tl, [2, '\v(a{-1,3})+','aa','aa','a'])
+ :"
+ :" Test Character classes
+ :call add(tl, [2, '\d\+e\d\d','test 10e23 fd','10e23'])
+--- 238,248 ----
+ :call add(tl, [2, '\vx(.{-,8})yz(.*)','xayxayzxayzxayz','xayxayzxayzxayz','ayxa','xayzxayz'])
+ :call add(tl, [2, '\vx(.*)yz(.*)','xayxayzxayzxayz','xayxayzxayzxayz', 'ayxayzxayzxa',''])
+ :call add(tl, [2, '\v(a{1,2}){-2,3}','aaaaaaa','aaaa','aa'])
+! :call add(tl, [2, '\v(a{-1,3})+', 'aa', 'aa', 'a'])
+! :call add(tl, [2, '^\s\{-}\zs\( x\|x$\)', ' x', ' x', ' x'])
+! :call add(tl, [2, '^\s\{-}\zs\(x\| x$\)', ' x', ' x', ' x'])
+! :call add(tl, [2, '^\s\{-}\ze\(x\| x$\)', ' x', '', ' x'])
+! :call add(tl, [2, '^\(\s\{-}\)\(x\| x$\)', ' x', ' x', '', ' x'])
+ :"
+ :" Test Character classes
+ :call add(tl, [2, '\d\+e\d\d','test 10e23 fd','10e23'])
+***************
+*** 462,476 ****
+ : try
+ : let l = matchlist(text, pat)
+ : catch
+! : $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", caused an exception: \"' . v:exception . '\"'
+ : endtry
+ :" check the match itself
+ : if len(l) == 0 && len(t) > matchidx
+! : $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", did not match, expected: \"' . t[matchidx] . '\"'
+ : elseif len(l) > 0 && len(t) == matchidx
+! : $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected no match'
+ : elseif len(t) > matchidx && l[0] != t[matchidx]
+! : $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected: \"' . t[matchidx] . '\"'
+ : else
+ : $put ='OK ' . engine . ' - ' . pat
+ : endif
+--- 466,480 ----
+ : try
+ : let l = matchlist(text, pat)
+ : catch
+! : $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", caused an exception: \"' . v:exception . '\"'
+ : endtry
+ :" check the match itself
+ : if len(l) == 0 && len(t) > matchidx
+! : $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", did not match, expected: \"' . t[matchidx] . '\"'
+ : elseif len(l) > 0 && len(t) == matchidx
+! : $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected no match'
+ : elseif len(t) > matchidx && l[0] != t[matchidx]
+! : $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected: \"' . t[matchidx] . '\"'
+ : else
+ : $put ='OK ' . engine . ' - ' . pat
+ : endif
+***************
+*** 483,489 ****
+ : let e = t[matchidx + i]
+ : endif
+ : if l[i] != e
+! : $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", submatch ' . i . ': \"' . l[i] . '\", expected: \"' . e . '\"'
+ : endif
+ : endfor
+ : unlet i
+--- 487,493 ----
+ : let e = t[matchidx + i]
+ : endif
+ : if l[i] != e
+! : $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", submatch ' . i . ': \"' . l[i] . '\", expected: \"' . e . '\"'
+ : endif
+ : endfor
+ : unlet i
+*** ../vim-7.4.289/src/testdir/test64.ok 2014-05-13 15:56:45.017670668 +0200
+--- src/testdir/test64.ok 2014-05-13 16:39:35.077693166 +0200
+***************
+*** 533,538 ****
+--- 533,550 ----
+ OK 0 - \v(a{-1,3})+
+ OK 1 - \v(a{-1,3})+
+ OK 2 - \v(a{-1,3})+
++ OK 0 - ^\s\{-}\zs\( x\|x$\)
++ OK 1 - ^\s\{-}\zs\( x\|x$\)
++ OK 2 - ^\s\{-}\zs\( x\|x$\)
++ OK 0 - ^\s\{-}\zs\(x\| x$\)
++ OK 1 - ^\s\{-}\zs\(x\| x$\)
++ OK 2 - ^\s\{-}\zs\(x\| x$\)
++ OK 0 - ^\s\{-}\ze\(x\| x$\)
++ OK 1 - ^\s\{-}\ze\(x\| x$\)
++ OK 2 - ^\s\{-}\ze\(x\| x$\)
++ OK 0 - ^\(\s\{-}\)\(x\| x$\)
++ OK 1 - ^\(\s\{-}\)\(x\| x$\)
++ OK 2 - ^\(\s\{-}\)\(x\| x$\)
+ OK 0 - \d\+e\d\d
+ OK 1 - \d\+e\d\d
+ OK 2 - \d\+e\d\d
+*** ../vim-7.4.289/src/regexp_nfa.c 2014-05-13 15:56:45.021670668 +0200
+--- src/regexp_nfa.c 2014-05-13 16:37:58.481692320 +0200
+***************
+*** 4324,4331 ****
+ {
+ /* This state is already in the list, don't add it again,
+ * unless it is an MOPEN that is used for a backreference or
+! * when there is a PIM. */
+! if (!nfa_has_backref && pim == NULL && !l->has_pim)
+ {
+ skip_add:
+ #ifdef ENABLE_LOG
+--- 4324,4333 ----
+ {
+ /* This state is already in the list, don't add it again,
+ * unless it is an MOPEN that is used for a backreference or
+! * when there is a PIM. For NFA_MATCH check the position,
+! * lower position is preferred. */
+! if (!nfa_has_backref && pim == NULL && !l->has_pim
+! && state->c != NFA_MATCH)
+ {
+ skip_add:
+ #ifdef ENABLE_LOG
+*** ../vim-7.4.289/src/version.c 2014-05-13 15:56:45.025670668 +0200
+--- src/version.c 2014-05-13 16:13:33.953679500 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 290,
+ /**/
+
+--
+Although the scythe isn't pre-eminent among the weapons of war, anyone who
+has been on the wrong end of, say, a peasants' revolt will know that in
+skilled hands it is fearsome.
+ -- (Terry Pratchett, Mort)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.291 b/patches/source/vim/patches/7.4.291
new file mode 100644
index 000000000..c9da78121
--- /dev/null
+++ b/patches/source/vim/patches/7.4.291
@@ -0,0 +1,56 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.291
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.291
+Problem: Compiler warning for int to pointer of different size when DEBUG
+ is defined.
+Solution: use smsg() instead of EMSG3().
+Files: src/regexp.c
+
+
+*** ../vim-7.4.290/src/regexp.c 2014-04-23 19:06:33.702828771 +0200
+--- src/regexp.c 2014-05-13 16:39:28.833693111 +0200
+***************
+*** 8022,8029 ****
+ regexp_engine = expr[4] - '0';
+ expr += 5;
+ #ifdef DEBUG
+! EMSG3("New regexp mode selected (%d): %s", regexp_engine,
+! regname[newengine]);
+ #endif
+ }
+ else
+--- 8022,8029 ----
+ regexp_engine = expr[4] - '0';
+ expr += 5;
+ #ifdef DEBUG
+! smsg((char_u *)"New regexp mode selected (%d): %s",
+! regexp_engine, regname[newengine]);
+ #endif
+ }
+ else
+*** ../vim-7.4.290/src/version.c 2014-05-13 16:44:25.637695709 +0200
+--- src/version.c 2014-05-13 16:45:34.901696316 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 291,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+153. You find yourself staring at your "inbox" waiting for new e-mail
+ to arrive.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.292 b/patches/source/vim/patches/7.4.292
new file mode 100644
index 000000000..c35c61663
--- /dev/null
+++ b/patches/source/vim/patches/7.4.292
@@ -0,0 +1,139 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.292
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.292
+Problem: Searching for "a" does not match accented "a" with new regexp
+ engine, does match with old engine. (David Bürgin)
+ "ca" does not match "ca" with accented "a" with either engine.
+Solution: Change the old engine, check for following composing character
+ also for single-byte patterns.
+Files: src/regexp.c, src/testdir/test95.in, src/testdir/test95.ok
+
+
+*** ../vim-7.4.291/src/regexp.c 2014-05-13 16:46:25.693696760 +0200
+--- src/regexp.c 2014-05-13 17:45:50.977727970 +0200
+***************
+*** 4692,4722 ****
+ /* match empty string always works; happens when "~" is
+ * empty. */
+ }
+! else if (opnd[1] == NUL
+ #ifdef FEAT_MBYTE
+ && !(enc_utf8 && ireg_ic)
+ #endif
+ )
+! ++reginput; /* matched a single char */
+! else
+! {
+! len = (int)STRLEN(opnd);
+! /* Need to match first byte again for multi-byte. */
+! if (cstrncmp(opnd, reginput, &len) != 0)
+! status = RA_NOMATCH;
+ #ifdef FEAT_MBYTE
+ /* Check for following composing character. */
+! else if (enc_utf8
+! && UTF_COMPOSINGLIKE(reginput, reginput + len))
+ {
+ /* raaron: This code makes a composing character get
+ * ignored, which is the correct behavior (sometimes)
+ * for voweled Hebrew texts. */
+! if (!ireg_icombine)
+! status = RA_NOMATCH;
+ }
+ #endif
+! else
+ reginput += len;
+ }
+ }
+--- 4692,4728 ----
+ /* match empty string always works; happens when "~" is
+ * empty. */
+ }
+! else
+! {
+! if (opnd[1] == NUL
+ #ifdef FEAT_MBYTE
+ && !(enc_utf8 && ireg_ic)
+ #endif
+ )
+! {
+! len = 1; /* matched a single byte above */
+! }
+! else
+! {
+! /* Need to match first byte again for multi-byte. */
+! len = (int)STRLEN(opnd);
+! if (cstrncmp(opnd, reginput, &len) != 0)
+! status = RA_NOMATCH;
+! }
+ #ifdef FEAT_MBYTE
+ /* Check for following composing character. */
+! if (status != RA_NOMATCH
+! && enc_utf8
+! && UTF_COMPOSINGLIKE(reginput, reginput + len)
+! && !ireg_icombine)
+ {
+ /* raaron: This code makes a composing character get
+ * ignored, which is the correct behavior (sometimes)
+ * for voweled Hebrew texts. */
+! status = RA_NOMATCH;
+ }
+ #endif
+! if (status != RA_NOMATCH)
+ reginput += len;
+ }
+ }
+*** ../vim-7.4.291/src/testdir/test95.in 2013-07-21 16:53:52.000000000 +0200
+--- src/testdir/test95.in 2014-05-13 17:49:00.201729626 +0200
+***************
+*** 50,55 ****
+--- 50,57 ----
+ :call add(tl, [2, ".\u05b9", " y\u05bb\u05b9 x\u05b9 ", "y\u05bb\u05b9"])
+ :call add(tl, [1, "\u05b9\u05bb", " y\u05b9 x\u05b9\u05bb ", "x\u05b9\u05bb"])
+ :call add(tl, [2, ".\u05b9\u05bb", " y\u05bb x\u05b9\u05bb ", "x\u05b9\u05bb"])
++ :call add(tl, [2, "a", "ca\u0300t"])
++ :call add(tl, [2, "a\u0300", "ca\u0300t", "a\u0300"])
+
+
+ :"""" Test \Z
+*** ../vim-7.4.291/src/testdir/test95.ok 2013-07-21 17:01:22.000000000 +0200
+--- src/testdir/test95.ok 2014-05-13 17:49:46.709730033 +0200
+***************
+*** 67,72 ****
+--- 67,78 ----
+ OK 0 - .Ö¹Ö»
+ OK 1 - .Ö¹Ö»
+ OK 2 - .Ö¹Ö»
++ OK 0 - a
++ OK 1 - a
++ OK 2 - a
++ OK 0 - à
++ OK 1 - à
++ OK 2 - à
+ OK 0 - ú\Z
+ OK 1 - ú\Z
+ OK 2 - ú\Z
+*** ../vim-7.4.291/src/version.c 2014-05-13 16:46:25.693696760 +0200
+--- src/version.c 2014-05-13 18:00:22.149735596 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 292,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+154. You fondle your mouse.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.293 b/patches/source/vim/patches/7.4.293
new file mode 100644
index 000000000..5cc60a1ea
--- /dev/null
+++ b/patches/source/vim/patches/7.4.293
@@ -0,0 +1,301 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.293
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.293
+Problem: It is not possible to ignore composing characters at a specific
+ point in a pattern.
+Solution: Add the %C item.
+Files: src/regexp.c, src/regexp_nfa.c, src/testdir/test95.in,
+ src/testdir/test95.ok, runtime/doc/pattern.txt
+
+
+*** ../vim-7.4.292/src/regexp.c 2014-05-13 18:03:55.729737466 +0200
+--- src/regexp.c 2014-05-13 18:27:08.725749659 +0200
+***************
+*** 244,249 ****
+--- 244,250 ----
+
+ #define RE_MARK 207 /* mark cmp Match mark position */
+ #define RE_VISUAL 208 /* Match Visual area */
++ #define RE_COMPOSING 209 /* any composing characters */
+
+ /*
+ * Magic characters have a special meaning, they don't match literally.
+***************
+*** 2208,2213 ****
+--- 2209,2218 ----
+ ret = regnode(RE_VISUAL);
+ break;
+
++ case 'C':
++ ret = regnode(RE_COMPOSING);
++ break;
++
+ /* \%[abc]: Emit as a list of branches, all ending at the last
+ * branch which matches nothing. */
+ case '[':
+***************
+*** 4710,4720 ****
+ status = RA_NOMATCH;
+ }
+ #ifdef FEAT_MBYTE
+! /* Check for following composing character. */
+ if (status != RA_NOMATCH
+ && enc_utf8
+ && UTF_COMPOSINGLIKE(reginput, reginput + len)
+! && !ireg_icombine)
+ {
+ /* raaron: This code makes a composing character get
+ * ignored, which is the correct behavior (sometimes)
+--- 4715,4727 ----
+ status = RA_NOMATCH;
+ }
+ #ifdef FEAT_MBYTE
+! /* Check for following composing character, unless %C
+! * follows (skips over all composing chars). */
+ if (status != RA_NOMATCH
+ && enc_utf8
+ && UTF_COMPOSINGLIKE(reginput, reginput + len)
+! && !ireg_icombine
+! && OP(next) != RE_COMPOSING)
+ {
+ /* raaron: This code makes a composing character get
+ * ignored, which is the correct behavior (sometimes)
+***************
+*** 4791,4796 ****
+--- 4798,4813 ----
+ status = RA_NOMATCH;
+ break;
+ #endif
++ case RE_COMPOSING:
++ #ifdef FEAT_MBYTE
++ if (enc_utf8)
++ {
++ /* Skip composing characters. */
++ while (utf_iscomposing(utf_ptr2char(reginput)))
++ mb_cptr_adv(reginput);
++ }
++ #endif
++ break;
+
+ case NOTHING:
+ break;
+*** ../vim-7.4.292/src/regexp_nfa.c 2014-05-13 16:44:25.633695709 +0200
+--- src/regexp_nfa.c 2014-05-13 19:25:58.285780556 +0200
+***************
+*** 81,86 ****
+--- 81,87 ----
+ NFA_COMPOSING, /* Next nodes in NFA are part of the
+ composing multibyte char */
+ NFA_END_COMPOSING, /* End of a composing char in the NFA */
++ NFA_ANY_COMPOSING, /* \%C: Any composing characters. */
+ NFA_OPT_CHARS, /* \%[abc] */
+
+ /* The following are used only in the postfix form, not in the NFA */
+***************
+*** 1418,1423 ****
+--- 1419,1428 ----
+ EMIT(NFA_VISUAL);
+ break;
+
++ case 'C':
++ EMIT(NFA_ANY_COMPOSING);
++ break;
++
+ case '[':
+ {
+ int n;
+***************
+*** 2429,2434 ****
+--- 2434,2440 ----
+ case NFA_MARK_LT: STRCPY(code, "NFA_MARK_LT "); break;
+ case NFA_CURSOR: STRCPY(code, "NFA_CURSOR "); break;
+ case NFA_VISUAL: STRCPY(code, "NFA_VISUAL "); break;
++ case NFA_ANY_COMPOSING: STRCPY(code, "NFA_ANY_COMPOSING "); break;
+
+ case NFA_STAR: STRCPY(code, "NFA_STAR "); break;
+ case NFA_STAR_NONGREEDY: STRCPY(code, "NFA_STAR_NONGREEDY "); break;
+***************
+*** 2967,2972 ****
+--- 2973,2979 ----
+ case NFA_NLOWER_IC:
+ case NFA_UPPER_IC:
+ case NFA_NUPPER_IC:
++ case NFA_ANY_COMPOSING:
+ /* possibly non-ascii */
+ #ifdef FEAT_MBYTE
+ if (has_mbyte)
+***************
+*** 4152,4157 ****
+--- 4159,4165 ----
+ continue;
+
+ case NFA_ANY:
++ case NFA_ANY_COMPOSING:
+ case NFA_IDENT:
+ case NFA_SIDENT:
+ case NFA_KWORD:
+***************
+*** 4395,4401 ****
+ switch (state->c)
+ {
+ case NFA_MATCH:
+! nfa_match = TRUE;
+ break;
+
+ case NFA_SPLIT:
+--- 4403,4409 ----
+ switch (state->c)
+ {
+ case NFA_MATCH:
+! // nfa_match = TRUE;
+ break;
+
+ case NFA_SPLIT:
+***************
+*** 5151,5156 ****
+--- 5159,5165 ----
+
+ case NFA_MATCH:
+ case NFA_MCLOSE:
++ case NFA_ANY_COMPOSING:
+ /* empty match works always */
+ return 0;
+
+***************
+*** 5573,5578 ****
+--- 5582,5593 ----
+ {
+ case NFA_MATCH:
+ {
++ #ifdef FEAT_MBYTE
++ /* If the match ends before a composing characters and
++ * ireg_icombine is not set, that is not really a match. */
++ if (enc_utf8 && !ireg_icombine && utf_iscomposing(curc))
++ break;
++ #endif
+ nfa_match = TRUE;
+ copy_sub(&submatch->norm, &t->subs.norm);
+ #ifdef FEAT_SYN_HL
+***************
+*** 6120,6125 ****
+--- 6135,6157 ----
+ }
+ break;
+
++ case NFA_ANY_COMPOSING:
++ /* On a composing character skip over it. Otherwise do
++ * nothing. Always matches. */
++ #ifdef FEAT_MBYTE
++ if (enc_utf8 && utf_iscomposing(curc))
++ {
++ add_off = clen;
++ }
++ else
++ #endif
++ {
++ add_here = TRUE;
++ add_off = 0;
++ }
++ add_state = t->state->out;
++ break;
++
+ /*
+ * Character classes like \a for alpha, \d for digit etc.
+ */
+***************
+*** 6484,6495 ****
+ if (!result && ireg_ic)
+ result = MB_TOLOWER(c) == MB_TOLOWER(curc);
+ #ifdef FEAT_MBYTE
+! /* If there is a composing character which is not being
+! * ignored there can be no match. Match with composing
+! * character uses NFA_COMPOSING above. */
+! if (result && enc_utf8 && !ireg_icombine
+! && clen != utf_char2len(curc))
+! result = FALSE;
+ #endif
+ ADD_STATE_IF_MATCH(t->state);
+ break;
+--- 6516,6525 ----
+ if (!result && ireg_ic)
+ result = MB_TOLOWER(c) == MB_TOLOWER(curc);
+ #ifdef FEAT_MBYTE
+! /* If ireg_icombine is not set only skip over the character
+! * itself. When it is set skip over composing characters. */
+! if (result && enc_utf8 && !ireg_icombine)
+! clen = utf_char2len(curc);
+ #endif
+ ADD_STATE_IF_MATCH(t->state);
+ break;
+diff: ../vim-7.4.292/src/testdir/test95.insrc/testdir/test95.ok,: No such file or directory
+diff: src/testdir/test95.insrc/testdir/test95.ok,: No such file or directory
+*** ../vim-7.4.292/runtime/doc/pattern.txt 2013-08-10 13:24:59.000000000 +0200
+--- runtime/doc/pattern.txt 2014-05-13 18:59:57.621766895 +0200
+***************
+*** 545,550 ****
+--- 545,551 ----
+ |/\%u| \%u \%u match specified multibyte character (eg \%u20ac)
+ |/\%U| \%U \%U match specified large multibyte character (eg
+ \%U12345678)
++ |/\%C| \%C \%C match any composing characters
+
+ Example matches ~
+ \<\I\i* or
+***************
+*** 1207,1218 ****
+ 8. Composing characters *patterns-composing*
+
+ */\Z*
+! When "\Z" appears anywhere in the pattern, composing characters are ignored.
+! Thus only the base characters need to match, the composing characters may be
+! different and the number of composing characters may differ. Only relevant
+! when 'encoding' is "utf-8".
+ Exception: If the pattern starts with one or more composing characters, these
+ must match.
+
+ When a composing character appears at the start of the pattern of after an
+ item that doesn't include the composing character, a match is found at any
+--- 1208,1225 ----
+ 8. Composing characters *patterns-composing*
+
+ */\Z*
+! When "\Z" appears anywhere in the pattern, all composing characters are
+! ignored. Thus only the base characters need to match, the composing
+! characters may be different and the number of composing characters may differ.
+! Only relevant when 'encoding' is "utf-8".
+ Exception: If the pattern starts with one or more composing characters, these
+ must match.
++ */\%C*
++ Use "\%C" to skip any composing characters. For example, the pattern "a" does
++ not match in "càt" (where the a has the composing character 0x0300), but
++ "a\%C" does. Note that this does not match "cát" (where the á is character
++ 0xe1, it does not have a compositing character). It does match "cat" (where
++ the a is just an a).
+
+ When a composing character appears at the start of the pattern of after an
+ item that doesn't include the composing character, a match is found at any
+*** ../vim-7.4.292/src/version.c 2014-05-13 18:03:55.729737466 +0200
+--- src/version.c 2014-05-13 18:28:45.885750510 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 293,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+155. You forget to eat because you're too busy surfing the net.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.294 b/patches/source/vim/patches/7.4.294
new file mode 100644
index 000000000..aa0201ceb
--- /dev/null
+++ b/patches/source/vim/patches/7.4.294
@@ -0,0 +1,125 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.294
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.294 (after 7.4.293)
+Problem: Test files missing from patch.
+Solution: Patch the test files.
+Files: src/testdir/test95.in, src/testdir/test95.ok
+
+
+*** ../vim-7.4.293/src/testdir/test95.in 2014-05-13 18:03:55.729737466 +0200
+--- src/testdir/test95.in 2014-05-13 19:16:24.433775533 +0200
+***************
+*** 51,57 ****
+--- 51,61 ----
+ :call add(tl, [1, "\u05b9\u05bb", " y\u05b9 x\u05b9\u05bb ", "x\u05b9\u05bb"])
+ :call add(tl, [2, ".\u05b9\u05bb", " y\u05bb x\u05b9\u05bb ", "x\u05b9\u05bb"])
+ :call add(tl, [2, "a", "ca\u0300t"])
++ :call add(tl, [2, "ca", "ca\u0300t"])
+ :call add(tl, [2, "a\u0300", "ca\u0300t", "a\u0300"])
++ :call add(tl, [2, 'a\%C', "ca\u0300t", "a\u0300"])
++ :call add(tl, [2, 'ca\%C', "ca\u0300t", "ca\u0300"])
++ :call add(tl, [2, 'ca\%Ct', "ca\u0300t", "ca\u0300t"])
+
+
+ :"""" Test \Z
+***************
+*** 91,105 ****
+ : try
+ : let l = matchlist(text, pat)
+ : catch
+! : $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", caused an exception: \"' . v:exception . '\"'
+ : endtry
+ :" check the match itself
+ : if len(l) == 0 && len(t) > matchidx
+! : $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", did not match, expected: \"' . t[matchidx] . '\"'
+ : elseif len(l) > 0 && len(t) == matchidx
+! : $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected no match'
+ : elseif len(t) > matchidx && l[0] != t[matchidx]
+! : $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected: \"' . t[matchidx] . '\"'
+ : else
+ : $put ='OK ' . engine . ' - ' . pat
+ : endif
+--- 95,109 ----
+ : try
+ : let l = matchlist(text, pat)
+ : catch
+! : $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", caused an exception: \"' . v:exception . '\"'
+ : endtry
+ :" check the match itself
+ : if len(l) == 0 && len(t) > matchidx
+! : $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", did not match, expected: \"' . t[matchidx] . '\"'
+ : elseif len(l) > 0 && len(t) == matchidx
+! : $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected no match'
+ : elseif len(t) > matchidx && l[0] != t[matchidx]
+! : $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected: \"' . t[matchidx] . '\"'
+ : else
+ : $put ='OK ' . engine . ' - ' . pat
+ : endif
+***************
+*** 112,118 ****
+ : let e = t[matchidx + i]
+ : endif
+ : if l[i] != e
+! : $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", submatch ' . i . ': \"' . l[i] . '\", expected: \"' . e . '\"'
+ : endif
+ : endfor
+ : unlet i
+--- 116,122 ----
+ : let e = t[matchidx + i]
+ : endif
+ : if l[i] != e
+! : $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", submatch ' . i . ': \"' . l[i] . '\", expected: \"' . e . '\"'
+ : endif
+ : endfor
+ : unlet i
+*** ../vim-7.4.293/src/testdir/test95.ok 2014-05-13 18:03:55.729737466 +0200
+--- src/testdir/test95.ok 2014-05-13 19:01:54.693767920 +0200
+***************
+*** 70,78 ****
+--- 70,90 ----
+ OK 0 - a
+ OK 1 - a
+ OK 2 - a
++ OK 0 - ca
++ OK 1 - ca
++ OK 2 - ca
+ OK 0 - à
+ OK 1 - à
+ OK 2 - à
++ OK 0 - a\%C
++ OK 1 - a\%C
++ OK 2 - a\%C
++ OK 0 - ca\%C
++ OK 1 - ca\%C
++ OK 2 - ca\%C
++ OK 0 - ca\%Ct
++ OK 1 - ca\%Ct
++ OK 2 - ca\%Ct
+ OK 0 - ú\Z
+ OK 1 - ú\Z
+ OK 2 - ú\Z
+*** ../vim-7.4.293/src/version.c 2014-05-13 19:37:19.489786520 +0200
+--- src/version.c 2014-05-13 20:09:45.133803551 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 294,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+156. You forget your friend's name but not her e-mail address.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.295 b/patches/source/vim/patches/7.4.295
new file mode 100644
index 000000000..bb01d0a47
--- /dev/null
+++ b/patches/source/vim/patches/7.4.295
@@ -0,0 +1,144 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.295
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.295
+Problem: Various typos, bad white space and unclear comments.
+Solution: Fix typos. Improve white space. Update comments.
+Files: src/testdir/test49.in, src/macros.h, src/screen.c, src/structs.h,
+ src/gui_gtk_x11.c, src/os_unix.c
+
+
+*** ../vim-7.4.294/src/testdir/test49.in 2012-11-15 22:29:55.000000000 +0100
+--- src/testdir/test49.in 2013-11-08 01:06:23.000000000 +0100
+***************
+*** 1,7 ****
+ This is a test of the script language.
+
+ If after adding a new test, the test output doesn't appear properly in
+! test49.failed, try to add one ore more "G"s at the line ending in "test.out"
+
+ STARTTEST
+ :so small.vim
+--- 1,7 ----
+ This is a test of the script language.
+
+ If after adding a new test, the test output doesn't appear properly in
+! test49.failed, try to add one or more "G"s at the line ending in "test.out"
+
+ STARTTEST
+ :so small.vim
+*** ../vim-7.4.294/src/macros.h 2013-06-12 17:07:32.000000000 +0200
+--- src/macros.h 2013-11-08 04:12:45.000000000 +0100
+***************
+*** 264,270 ****
+ # define mb_ptr_adv(p) p += has_mbyte ? (*mb_ptr2len)(p) : 1
+ /* Advance multi-byte pointer, do not skip over composing chars. */
+ # define mb_cptr_adv(p) p += enc_utf8 ? utf_ptr2len(p) : has_mbyte ? (*mb_ptr2len)(p) : 1
+! /* Backup multi-byte pointer. */
+ # define mb_ptr_back(s, p) p -= has_mbyte ? ((*mb_head_off)(s, p - 1) + 1) : 1
+ /* get length of multi-byte char, not including composing chars */
+ # define mb_cptr2len(p) (enc_utf8 ? utf_ptr2len(p) : (*mb_ptr2len)(p))
+--- 264,270 ----
+ # define mb_ptr_adv(p) p += has_mbyte ? (*mb_ptr2len)(p) : 1
+ /* Advance multi-byte pointer, do not skip over composing chars. */
+ # define mb_cptr_adv(p) p += enc_utf8 ? utf_ptr2len(p) : has_mbyte ? (*mb_ptr2len)(p) : 1
+! /* Backup multi-byte pointer. Only use with "p" > "s" ! */
+ # define mb_ptr_back(s, p) p -= has_mbyte ? ((*mb_head_off)(s, p - 1) + 1) : 1
+ /* get length of multi-byte char, not including composing chars */
+ # define mb_cptr2len(p) (enc_utf8 ? utf_ptr2len(p) : (*mb_ptr2len)(p))
+*** ../vim-7.4.294/src/screen.c 2014-03-23 15:12:29.935264336 +0100
+--- src/screen.c 2014-03-27 11:34:36.128359605 +0100
+***************
+*** 2456,2463 ****
+ if (len > 0)
+ {
+ int w = number_width(wp);
+! long num;
+! char *fmt = "%*ld ";
+
+ if (len > w + 1)
+ len = w + 1;
+--- 2456,2463 ----
+ if (len > 0)
+ {
+ int w = number_width(wp);
+! long num;
+! char *fmt = "%*ld ";
+
+ if (len > w + 1)
+ len = w + 1;
+*** ../vim-7.4.294/src/structs.h 2014-03-23 16:03:56.171311627 +0100
+--- src/structs.h 2014-04-24 15:00:59.053101897 +0200
+***************
+*** 572,578 ****
+ unsigned mf_page_size; /* number of bytes in a page */
+ int mf_dirty; /* TRUE if there are dirty blocks */
+ #ifdef FEAT_CRYPT
+! buf_T *mf_buffer; /* bufer this memfile is for */
+ char_u mf_seed[MF_SEED_LEN]; /* seed for encryption */
+
+ /* Values for key, method and seed used for reading data blocks when
+--- 572,578 ----
+ unsigned mf_page_size; /* number of bytes in a page */
+ int mf_dirty; /* TRUE if there are dirty blocks */
+ #ifdef FEAT_CRYPT
+! buf_T *mf_buffer; /* buffer this memfile is for */
+ char_u mf_seed[MF_SEED_LEN]; /* seed for encryption */
+
+ /* Values for key, method and seed used for reading data blocks when
+*** ../vim-7.4.294/src/gui_gtk_x11.c 2014-04-29 15:11:39.783847283 +0200
+--- src/gui_gtk_x11.c 2014-05-07 20:27:54.545275130 +0200
+***************
+*** 2054,2059 ****
+--- 2054,2060 ----
+
+ ssop_flags = save_ssop_flags;
+ g_free(mksession_cmdline);
++
+ /*
+ * Reopen the file and append a command to restore v:this_session,
+ * as if this save never happened. This is to avoid conflicts with
+*** ../vim-7.4.294/src/os_unix.c 2014-04-23 12:52:36.499369426 +0200
+--- src/os_unix.c 2014-05-13 13:02:56.329579378 +0200
+***************
+*** 3783,3789 ****
+ del_mouse_termcode(KS_URXVT_MOUSE);
+ # endif
+ # ifdef FEAT_MOUSE_SGR
+! /* same as the dec mouse */
+ if (use_xterm_mouse() == 4
+ # ifdef FEAT_GUI
+ && !gui.in_use
+--- 3783,3789 ----
+ del_mouse_termcode(KS_URXVT_MOUSE);
+ # endif
+ # ifdef FEAT_MOUSE_SGR
+! /* There is no conflict with xterm mouse */
+ if (use_xterm_mouse() == 4
+ # ifdef FEAT_GUI
+ && !gui.in_use
+*** ../vim-7.4.294/src/version.c 2014-05-13 20:15:20.461806487 +0200
+--- src/version.c 2014-05-13 20:17:27.693807600 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 295,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+157. You fum through a magazine, you first check to see if it has a web
+ address.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.296 b/patches/source/vim/patches/7.4.296
new file mode 100644
index 000000000..2004516d3
--- /dev/null
+++ b/patches/source/vim/patches/7.4.296
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.296
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.296
+Problem: Can't run tests on Solaris.
+Solution: Change the way VIMRUNTIME is set. (Laurent Blume)
+Files: src/testdir/Makefile
+
+
+*** ../vim-7.4.295/src/testdir/Makefile 2014-04-29 12:15:22.852032651 +0200
+--- src/testdir/Makefile 2014-05-22 13:07:17.458599247 +0200
+***************
+*** 57,63 ****
+
+ RM_ON_RUN = test.out X* viminfo
+ RM_ON_START = tiny.vim small.vim mbyte.vim mzscheme.vim lua.vim test.ok
+! RUN_VIM = export VIMRUNTIME=$(SCRIPTSOURCE); $(VALGRIND) $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in
+
+ clean:
+ -rm -rf *.out *.failed *.rej *.orig test.log $(RM_ON_RUN) $(RM_ON_START) valgrind.*
+--- 57,63 ----
+
+ RM_ON_RUN = test.out X* viminfo
+ RM_ON_START = tiny.vim small.vim mbyte.vim mzscheme.vim lua.vim test.ok
+! RUN_VIM = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(VALGRIND) $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in
+
+ clean:
+ -rm -rf *.out *.failed *.rej *.orig test.log $(RM_ON_RUN) $(RM_ON_START) valgrind.*
+*** ../vim-7.4.295/src/version.c 2014-05-13 20:19:53.577808878 +0200
+--- src/version.c 2014-05-22 13:10:36.114595209 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 296,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+187. You promise yourself that you'll only stay online for another
+ 15 minutes...at least once every hour.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.297 b/patches/source/vim/patches/7.4.297
new file mode 100644
index 000000000..ccfa6d6d0
--- /dev/null
+++ b/patches/source/vim/patches/7.4.297
@@ -0,0 +1,76 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.297
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.297
+Problem: Memory leak from result of get_isolated_shell_name().
+Solution: Free the memory. (Dominique Pelle)
+Files: src/ex_cmds.c, src/misc1.c
+
+
+*** ../vim-7.4.296/src/ex_cmds.c 2014-05-09 20:33:01.098790466 +0200
+--- src/ex_cmds.c 2014-05-22 13:59:20.962535763 +0200
+***************
+*** 1554,1562 ****
+
+ #if (defined(UNIX) && !defined(ARCHIE)) || defined(OS2)
+ int is_fish_shell;
+
+ /* Account for fish's different syntax for subshells */
+! is_fish_shell = (fnamecmp(get_isolated_shell_name(), "fish") == 0);
+ if (is_fish_shell)
+ len = (long_u)STRLEN(cmd) + 13; /* "begin; " + "; end" + NUL */
+ else
+--- 1554,1564 ----
+
+ #if (defined(UNIX) && !defined(ARCHIE)) || defined(OS2)
+ int is_fish_shell;
++ char_u *shell_name = get_isolated_shell_name();
+
+ /* Account for fish's different syntax for subshells */
+! is_fish_shell = (fnamecmp(shell_name, "fish") == 0);
+! vim_free(shell_name);
+ if (is_fish_shell)
+ len = (long_u)STRLEN(cmd) + 13; /* "begin; " + "; end" + NUL */
+ else
+*** ../vim-7.4.296/src/misc1.c 2014-05-13 12:44:19.897569605 +0200
+--- src/misc1.c 2014-05-22 13:58:52.254536347 +0200
+***************
+*** 10874,10880 ****
+ }
+
+ /*
+! * Returns the isolated name of the shell:
+ * - Skip beyond any path. E.g., "/usr/bin/csh -f" -> "csh -f".
+ * - Remove any argument. E.g., "csh -f" -> "csh".
+ * But don't allow a space in the path, so that this works:
+--- 10874,10880 ----
+ }
+
+ /*
+! * Returns the isolated name of the shell in allocated memory:
+ * - Skip beyond any path. E.g., "/usr/bin/csh -f" -> "csh -f".
+ * - Remove any argument. E.g., "csh -f" -> "csh".
+ * But don't allow a space in the path, so that this works:
+*** ../vim-7.4.296/src/version.c 2014-05-22 13:12:25.650592983 +0200
+--- src/version.c 2014-05-22 13:57:37.346537869 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 297,
+ /**/
+
+--
+A computer program does what you tell it to do, not what you want it to do.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.298 b/patches/source/vim/patches/7.4.298
new file mode 100644
index 000000000..59109024b
--- /dev/null
+++ b/patches/source/vim/patches/7.4.298
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.298
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.298
+Problem: Can't have a funcref start with "t:".
+Solution: Add "t" to the list of accepted names. (Yukihiro Nakadaira)
+Files: src/eval.c
+
+
+*** ../vim-7.4.297/src/eval.c 2014-05-13 13:46:30.593602262 +0200
+--- src/eval.c 2014-05-22 14:09:46.902523041 +0200
+***************
+*** 21064,21070 ****
+ char_u *name; /* points to start of variable name */
+ int new_var; /* TRUE when creating the variable */
+ {
+! if (!(vim_strchr((char_u *)"wbs", name[0]) != NULL && name[1] == ':')
+ && !ASCII_ISUPPER((name[0] != NUL && name[1] == ':')
+ ? name[2] : name[0]))
+ {
+--- 21064,21071 ----
+ char_u *name; /* points to start of variable name */
+ int new_var; /* TRUE when creating the variable */
+ {
+! /* Allow for w: b: s: and t:. */
+! if (!(vim_strchr((char_u *)"wbst", name[0]) != NULL && name[1] == ':')
+ && !ASCII_ISUPPER((name[0] != NUL && name[1] == ':')
+ ? name[2] : name[0]))
+ {
+*** ../vim-7.4.297/src/version.c 2014-05-22 14:00:12.698534712 +0200
+--- src/version.c 2014-05-22 14:08:43.874524322 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 298,
+ /**/
+
+--
+I'm in shape. Round IS a shape.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.299 b/patches/source/vim/patches/7.4.299
new file mode 100644
index 000000000..087cca6d1
--- /dev/null
+++ b/patches/source/vim/patches/7.4.299
@@ -0,0 +1,458 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.299
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.299
+Problem: When running configure twice DYNAMIC_PYTHON_DLL may become empty.
+Solution: Use AC_CACHE_VAL. (Ken Takata)
+Files: src/configure.in, src/auto/configure
+
+
+*** ../vim-7.4.298/src/configure.in 2014-04-12 13:11:58.260430356 +0200
+--- src/configure.in 2014-05-22 14:39:39.326486611 +0200
+***************
+*** 1132,1141 ****
+ vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
+ fi
+ ])
+
+- if test "X$python_DLLLIBRARY" != "X"; then
+- python_INSTSONAME="$python_DLLLIBRARY"
+- fi
+ PYTHON_LIBS="${vi_cv_path_python_plibs}"
+ if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
+ PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
+--- 1132,1146 ----
+ vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
+ fi
+ ])
++ AC_CACHE_VAL(vi_cv_dll_name_python,
++ [
++ if test "X$python_DLLLIBRARY" != "X"; then
++ vi_cv_dll_name_python="$python_DLLLIBRARY"
++ else
++ vi_cv_dll_name_python="$python_INSTSONAME"
++ fi
++ ])
+
+ PYTHON_LIBS="${vi_cv_path_python_plibs}"
+ if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
+ PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
+***************
+*** 1323,1341 ****
+ @echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
+ @echo "python3_INSTSONAME='$(INSTSONAME)'"
+ eof
+! dnl -- delete the lines from make about Entering/Leaving directory
+! eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
+! rm -f -- "${tmp_mkf}"
+ vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
+! vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}"
+! dnl remove -ltermcap, it can conflict with an earlier -lncurses
+! vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
+! vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
+! ])
+!
+! if test "X$python3_DLLLIBRARY" != "X"; then
+! python3_INSTSONAME="$python3_DLLLIBRARY"
+! fi
+ PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
+ if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then
+ PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'"
+--- 1328,1351 ----
+ @echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
+ @echo "python3_INSTSONAME='$(INSTSONAME)'"
+ eof
+! dnl -- delete the lines from make about Entering/Leaving directory
+! eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
+! rm -f -- "${tmp_mkf}"
+ vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
+! vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}"
+! dnl remove -ltermcap, it can conflict with an earlier -lncurses
+! vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
+! vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
+! ])
+! AC_CACHE_VAL(vi_cv_dll_name_python3,
+! [
+! if test "X$python3_DLLLIBRARY" != "X"; then
+! vi_cv_dll_name_python3="$python3_DLLLIBRARY"
+! else
+! vi_cv_dll_name_python3="$python3_INSTSONAME"
+! fi
+! ])
+!
+ PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
+ if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then
+ PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'"
+***************
+*** 1458,1464 ****
+ int main(int argc, char** argv)
+ {
+ int not_needed = 0;
+! if (no_rtl_global_needed_for("${python_INSTSONAME}", "${vi_cv_path_python_pfx}"))
+ not_needed = 1;
+ return !not_needed;
+ }])],
+--- 1468,1474 ----
+ int main(int argc, char** argv)
+ {
+ int not_needed = 0;
+! if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}"))
+ not_needed = 1;
+ return !not_needed;
+ }])],
+***************
+*** 1504,1510 ****
+ int main(int argc, char** argv)
+ {
+ int not_needed = 0;
+! if (no_rtl_global_needed_for("${python3_INSTSONAME}", L"${vi_cv_path_python3_pfx}"))
+ not_needed = 1;
+ return !not_needed;
+ }])],
+--- 1514,1520 ----
+ int main(int argc, char** argv)
+ {
+ int not_needed = 0;
+! if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}"))
+ not_needed = 1;
+ return !not_needed;
+ }])],
+***************
+*** 1515,1531 ****
+
+ PYTHON_SRC="if_python.c"
+ PYTHON_OBJ="objects/if_python.o"
+! PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\""
+ PYTHON_LIBS=
+ PYTHON3_SRC="if_python3.c"
+ PYTHON3_OBJ="objects/if_python3.o"
+! PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${python3_INSTSONAME}\\\""
+ PYTHON3_LIBS=
+ elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then
+ AC_DEFINE(DYNAMIC_PYTHON)
+ PYTHON_SRC="if_python.c"
+ PYTHON_OBJ="objects/if_python.o"
+! PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\""
+ PYTHON_LIBS=
+ elif test "$python_ok" = yes; then
+ dnl Check that adding -fPIE works. It may be needed when using a static
+--- 1525,1541 ----
+
+ PYTHON_SRC="if_python.c"
+ PYTHON_OBJ="objects/if_python.o"
+! PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
+ PYTHON_LIBS=
+ PYTHON3_SRC="if_python3.c"
+ PYTHON3_OBJ="objects/if_python3.o"
+! PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
+ PYTHON3_LIBS=
+ elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then
+ AC_DEFINE(DYNAMIC_PYTHON)
+ PYTHON_SRC="if_python.c"
+ PYTHON_OBJ="objects/if_python.o"
+! PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
+ PYTHON_LIBS=
+ elif test "$python_ok" = yes; then
+ dnl Check that adding -fPIE works. It may be needed when using a static
+***************
+*** 1547,1553 ****
+ AC_DEFINE(DYNAMIC_PYTHON3)
+ PYTHON3_SRC="if_python3.c"
+ PYTHON3_OBJ="objects/if_python3.o"
+! PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${python3_INSTSONAME}\\\""
+ PYTHON3_LIBS=
+ elif test "$python3_ok" = yes; then
+ dnl Check that adding -fPIE works. It may be needed when using a static
+--- 1557,1563 ----
+ AC_DEFINE(DYNAMIC_PYTHON3)
+ PYTHON3_SRC="if_python3.c"
+ PYTHON3_OBJ="objects/if_python3.o"
+! PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
+ PYTHON3_LIBS=
+ elif test "$python3_ok" = yes; then
+ dnl Check that adding -fPIE works. It may be needed when using a static
+*** ../vim-7.4.298/src/auto/configure 2014-04-12 13:11:58.268430356 +0200
+--- src/auto/configure 2014-05-22 14:40:05.146486086 +0200
+***************
+*** 5893,5902 ****
+
+ fi
+
+
+- if test "X$python_DLLLIBRARY" != "X"; then
+- python_INSTSONAME="$python_DLLLIBRARY"
+- fi
+ PYTHON_LIBS="${vi_cv_path_python_plibs}"
+ if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
+ PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
+--- 5893,5911 ----
+
+ fi
+
++ if ${vi_cv_dll_name_python+:} false; then :
++ $as_echo_n "(cached) " >&6
++ else
++
++ if test "X$python_DLLLIBRARY" != "X"; then
++ vi_cv_dll_name_python="$python_DLLLIBRARY"
++ else
++ vi_cv_dll_name_python="$python_INSTSONAME"
++ fi
++
++ fi
++
+
+ PYTHON_LIBS="${vi_cv_path_python_plibs}"
+ if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
+ PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
+***************
+*** 6200,6218 ****
+ @echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
+ @echo "python3_INSTSONAME='$(INSTSONAME)'"
+ eof
+! eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
+! rm -f -- "${tmp_mkf}"
+ vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
+! vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}"
+! vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
+! vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
+
+ fi
+
+
+- if test "X$python3_DLLLIBRARY" != "X"; then
+- python3_INSTSONAME="$python3_DLLLIBRARY"
+- fi
+ PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
+ if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then
+ PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'"
+--- 6209,6236 ----
+ @echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
+ @echo "python3_INSTSONAME='$(INSTSONAME)'"
+ eof
+! eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
+! rm -f -- "${tmp_mkf}"
+ vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
+! vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}"
+! vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
+! vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
+!
+! fi
+!
+! if ${vi_cv_dll_name_python3+:} false; then :
+! $as_echo_n "(cached) " >&6
+! else
+!
+! if test "X$python3_DLLLIBRARY" != "X"; then
+! vi_cv_dll_name_python3="$python3_DLLLIBRARY"
+! else
+! vi_cv_dll_name_python3="$python3_INSTSONAME"
+! fi
+
+ fi
+
+
+ PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
+ if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then
+ PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'"
+***************
+*** 6372,6378 ****
+ int main(int argc, char** argv)
+ {
+ int not_needed = 0;
+! if (no_rtl_global_needed_for("${python_INSTSONAME}", "${vi_cv_path_python_pfx}"))
+ not_needed = 1;
+ return !not_needed;
+ }
+--- 6390,6396 ----
+ int main(int argc, char** argv)
+ {
+ int not_needed = 0;
+! if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}"))
+ not_needed = 1;
+ return !not_needed;
+ }
+***************
+*** 6438,6444 ****
+ int main(int argc, char** argv)
+ {
+ int not_needed = 0;
+! if (no_rtl_global_needed_for("${python3_INSTSONAME}", L"${vi_cv_path_python3_pfx}"))
+ not_needed = 1;
+ return !not_needed;
+ }
+--- 6456,6462 ----
+ int main(int argc, char** argv)
+ {
+ int not_needed = 0;
+! if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}"))
+ not_needed = 1;
+ return !not_needed;
+ }
+***************
+*** 6461,6478 ****
+
+ PYTHON_SRC="if_python.c"
+ PYTHON_OBJ="objects/if_python.o"
+! PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\""
+ PYTHON_LIBS=
+ PYTHON3_SRC="if_python3.c"
+ PYTHON3_OBJ="objects/if_python3.o"
+! PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${python3_INSTSONAME}\\\""
+ PYTHON3_LIBS=
+ elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then
+ $as_echo "#define DYNAMIC_PYTHON 1" >>confdefs.h
+
+ PYTHON_SRC="if_python.c"
+ PYTHON_OBJ="objects/if_python.o"
+! PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\""
+ PYTHON_LIBS=
+ elif test "$python_ok" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python" >&5
+--- 6479,6496 ----
+
+ PYTHON_SRC="if_python.c"
+ PYTHON_OBJ="objects/if_python.o"
+! PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
+ PYTHON_LIBS=
+ PYTHON3_SRC="if_python3.c"
+ PYTHON3_OBJ="objects/if_python3.o"
+! PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
+ PYTHON3_LIBS=
+ elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then
+ $as_echo "#define DYNAMIC_PYTHON 1" >>confdefs.h
+
+ PYTHON_SRC="if_python.c"
+ PYTHON_OBJ="objects/if_python.o"
+! PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
+ PYTHON_LIBS=
+ elif test "$python_ok" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python" >&5
+***************
+*** 6511,6517 ****
+
+ PYTHON3_SRC="if_python3.c"
+ PYTHON3_OBJ="objects/if_python3.o"
+! PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${python3_INSTSONAME}\\\""
+ PYTHON3_LIBS=
+ elif test "$python3_ok" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python3" >&5
+--- 6529,6535 ----
+
+ PYTHON3_SRC="if_python3.c"
+ PYTHON3_OBJ="objects/if_python3.o"
+! PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
+ PYTHON3_LIBS=
+ elif test "$python3_ok" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python3" >&5
+***************
+*** 11420,11426 ****
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+! #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+--- 11438,11444 ----
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+! #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+***************
+*** 11466,11472 ****
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+! #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+--- 11484,11490 ----
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+! #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+***************
+*** 11490,11496 ****
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+! #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+--- 11508,11514 ----
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+! #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+***************
+*** 11535,11541 ****
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+! #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+--- 11553,11559 ----
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+! #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+***************
+*** 11559,11565 ****
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+! #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+--- 11577,11583 ----
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+! #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+*** ../vim-7.4.298/src/version.c 2014-05-22 14:19:51.674510749 +0200
+--- src/version.c 2014-05-22 14:36:44.634490162 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 299,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+190. You quickly hand over your wallet, leather jacket, and car keys
+ during a mugging, then proceed to beat the crap out of your
+ assailant when he asks for your laptop.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.300 b/patches/source/vim/patches/7.4.300
new file mode 100644
index 000000000..308fd9340
--- /dev/null
+++ b/patches/source/vim/patches/7.4.300
@@ -0,0 +1,62 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.300
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.300
+Problem: The way config.cache is removed doesn't always work.
+Solution: Always remove config.cache. (Ken Takata)
+Files: src/Makefile
+
+
+*** ../vim-7.4.299/src/Makefile 2014-04-29 20:04:05.331539784 +0200
+--- src/Makefile 2014-05-22 14:48:23.034475967 +0200
+***************
+*** 1664,1675 ****
+ # auto/config.h isn't updated. The dependency on auto/config.mk should make
+ # sure configure is run when it's needed.
+ #
+ config auto/config.mk: auto/configure config.mk.in config.h.in
+! if test -f auto/config.cache && \
+! grep '^ac_cv_env_CFLAGS_value=' auto/config.cache > /dev/null && \
+! ! grep -x -F 'ac_cv_env_CFLAGS_value=$(CFLAGS)' auto/config.cache > /dev/null; then \
+! rm auto/config.cache; \
+! fi
+ if test "X$(MAKECMDGOALS)" != "Xclean" \
+ -a "X$(MAKECMDGOALS)" != "Xdistclean" \
+ -a "X$(MAKECMDGOALS)" != "Xautoconf" \
+--- 1664,1674 ----
+ # auto/config.h isn't updated. The dependency on auto/config.mk should make
+ # sure configure is run when it's needed.
+ #
++ # Remove the config.cache every time, once in a while it causes problems that
++ # are very hard to figure out.
++ #
+ config auto/config.mk: auto/configure config.mk.in config.h.in
+! -rm -f auto/config.cache
+ if test "X$(MAKECMDGOALS)" != "Xclean" \
+ -a "X$(MAKECMDGOALS)" != "Xdistclean" \
+ -a "X$(MAKECMDGOALS)" != "Xautoconf" \
+*** ../vim-7.4.299/src/version.c 2014-05-22 14:44:08.098481148 +0200
+--- src/version.c 2014-05-22 14:51:36.022472045 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 300,
+ /**/
+
+
+--
+What is the difference between a professional and an amateur?
+The ark was built by an amateur; professionals gave us the Titanic.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.301 b/patches/source/vim/patches/7.4.301
new file mode 100644
index 000000000..5870932c9
--- /dev/null
+++ b/patches/source/vim/patches/7.4.301
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.301
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.301 (after 7.4.280)
+Problem: Still a scrolling problem when loading a session file.
+Solution: Fix off-by-one mistake. (Nobuhiro Takasaki)
+Files: src/window.c
+
+
+*** ../vim-7.4.300/src/window.c 2014-05-07 20:25:30.845273872 +0200
+--- src/window.c 2014-05-22 15:11:58.786447193 +0200
+***************
+*** 5748,5754 ****
+ lnum++;
+ wp->w_wrow -= line_size + sline;
+ }
+! else if (sline > 0)
+ {
+ /* First line of file reached, use that as topline. */
+ lnum = 1;
+--- 5748,5754 ----
+ lnum++;
+ wp->w_wrow -= line_size + sline;
+ }
+! else if (sline >= 0)
+ {
+ /* First line of file reached, use that as topline. */
+ lnum = 1;
+*** ../vim-7.4.300/src/version.c 2014-05-22 14:54:22.854468654 +0200
+--- src/version.c 2014-05-22 15:12:33.770446481 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 301,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+191. You rate eating establishments not by the quality of the food,
+ but by the availability of electrical outlets for your PowerBook.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.302 b/patches/source/vim/patches/7.4.302
new file mode 100644
index 000000000..3411f4d48
--- /dev/null
+++ b/patches/source/vim/patches/7.4.302
@@ -0,0 +1,78 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.302
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.302
+Problem: Signs placed with 'foldcolumn' set don't show up after filler
+ lines.
+Solution: Take filler lines into account. (Olaf Dabrunz)
+Files: src/screen.c
+
+
+*** ../vim-7.4.301/src/screen.c 2014-05-13 20:19:53.573808877 +0200
+--- src/screen.c 2014-05-22 15:27:11.966428633 +0200
+***************
+*** 3553,3563 ****
+ draw_state = WL_SIGN;
+ /* Show the sign column when there are any signs in this
+ * buffer or when using Netbeans. */
+! if (draw_signcolumn(wp)
+! # ifdef FEAT_DIFF
+! && filler_todo <= 0
+! # endif
+! )
+ {
+ int text_sign;
+ # ifdef FEAT_SIGN_ICONS
+--- 3553,3559 ----
+ draw_state = WL_SIGN;
+ /* Show the sign column when there are any signs in this
+ * buffer or when using Netbeans. */
+! if (draw_signcolumn(wp))
+ {
+ int text_sign;
+ # ifdef FEAT_SIGN_ICONS
+***************
+*** 3569,3575 ****
+ char_attr = hl_attr(HLF_SC);
+ n_extra = 2;
+
+! if (row == startrow)
+ {
+ text_sign = buf_getsigntype(wp->w_buffer, lnum,
+ SIGN_TEXT);
+--- 3565,3575 ----
+ char_attr = hl_attr(HLF_SC);
+ n_extra = 2;
+
+! if (row == startrow
+! #ifdef FEAT_DIFF
+! + filler_lines && filler_todo <= 0
+! #endif
+! )
+ {
+ text_sign = buf_getsigntype(wp->w_buffer, lnum,
+ SIGN_TEXT);
+*** ../vim-7.4.301/src/version.c 2014-05-22 15:17:24.706440568 +0200
+--- src/version.c 2014-05-22 15:46:00.058405705 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 302,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+192. Your boss asks you to "go fer" coffee and you come up with 235 FTP sites.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.303 b/patches/source/vim/patches/7.4.303
new file mode 100644
index 000000000..8e49c6948
--- /dev/null
+++ b/patches/source/vim/patches/7.4.303
@@ -0,0 +1,85 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.303
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.303
+Problem: When using double-width characters the text displayed on the
+ command line is sometimes truncated.
+Solution: Reset the string lenght. (Nobuhiro Takasaki)
+Files: src/screen.c
+
+
+*** ../vim-7.4.302/src/screen.c 2014-05-22 15:51:00.734399594 +0200
+--- src/screen.c 2014-05-22 16:02:24.294385701 +0200
+***************
+*** 6916,6930 ****
+ * a NUL.
+ */
+ void
+! screen_puts_len(text, len, row, col, attr)
+ char_u *text;
+! int len;
+ int row;
+ int col;
+ int attr;
+ {
+ unsigned off;
+ char_u *ptr = text;
+ int c;
+ #ifdef FEAT_MBYTE
+ unsigned max_off;
+--- 6916,6931 ----
+ * a NUL.
+ */
+ void
+! screen_puts_len(text, textlen, row, col, attr)
+ char_u *text;
+! int textlen;
+ int row;
+ int col;
+ int attr;
+ {
+ unsigned off;
+ char_u *ptr = text;
++ int len = textlen;
+ int c;
+ #ifdef FEAT_MBYTE
+ unsigned max_off;
+***************
+*** 7169,7175 ****
+--- 7170,7180 ----
+ col += mbyte_cells;
+ ptr += mbyte_blen;
+ if (clear_next_cell)
++ {
++ /* This only happens at the end, display one space next. */
+ ptr = (char_u *)" ";
++ len = -1;
++ }
+ }
+ else
+ #endif
+*** ../vim-7.4.302/src/version.c 2014-05-22 15:51:00.738399594 +0200
+--- src/version.c 2014-05-22 15:58:15.050390766 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 303,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+193. You ask your girlfriend to drive home so you can sit back with
+ your PDA and download the information to your laptop
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.304 b/patches/source/vim/patches/7.4.304
new file mode 100644
index 000000000..874d108ca
--- /dev/null
+++ b/patches/source/vim/patches/7.4.304
@@ -0,0 +1,45 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.304
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.304
+Problem: Cannot always use Python with Vim.
+Solution: Add the manifest to the executable. (Jacques Germishuys)
+Files: src/Make_mvc.mak
+
+
+*** ../vim-7.4.303/src/Make_mvc.mak 2014-02-15 19:47:46.685882910 +0100
+--- src/Make_mvc.mak 2014-05-22 16:25:40.978357314 +0200
+***************
+*** 973,978 ****
+--- 973,979 ----
+ $(LUA_OBJ) $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) \
+ $(TCL_OBJ) $(SNIFF_OBJ) $(CSCOPE_OBJ) $(NETBEANS_OBJ) \
+ $(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2)
++ if exist $(VIM).exe.manifest mt.exe -nologo -manifest $(VIM).exe.manifest -updateresource:$(VIM).exe;1
+
+ $(VIM): $(VIM).exe
+
+*** ../vim-7.4.303/src/version.c 2014-05-22 16:05:16.342382204 +0200
+--- src/version.c 2014-05-22 16:20:07.534364091 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 304,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+194. Your business cards contain your e-mail and home page address.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.305.gz b/patches/source/vim/patches/7.4.305.gz
new file mode 100644
index 000000000..3747e1e00
--- /dev/null
+++ b/patches/source/vim/patches/7.4.305.gz
Binary files differ
diff --git a/patches/source/vim/patches/7.4.306 b/patches/source/vim/patches/7.4.306
new file mode 100644
index 000000000..756eb1829
--- /dev/null
+++ b/patches/source/vim/patches/7.4.306
@@ -0,0 +1,84 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.306
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.306
+Problem: getchar(0) does not return Esc.
+Solution: Do not wait for an Esc sequence to be complete. (Yasuhiro
+ Matsumoto)
+Files: src/eval.c, src/getchar.c
+
+
+*** ../vim-7.4.305/src/eval.c 2014-05-22 14:19:51.674510749 +0200
+--- src/eval.c 2014-05-22 18:59:34.038169656 +0200
+***************
+*** 11313,11325 ****
+ n = safe_vgetc();
+ else if (get_tv_number_chk(&argvars[0], &error) == 1)
+ /* getchar(1): only check if char avail */
+! n = vpeekc();
+! else if (error || vpeekc() == NUL)
+ /* illegal argument or getchar(0) and no char avail: return zero */
+ n = 0;
+ else
+ /* getchar(0) and char avail: return char */
+ n = safe_vgetc();
+ if (n == K_IGNORE)
+ continue;
+ break;
+--- 11313,11326 ----
+ n = safe_vgetc();
+ else if (get_tv_number_chk(&argvars[0], &error) == 1)
+ /* getchar(1): only check if char avail */
+! n = vpeekc_any();
+! else if (error || vpeekc_any() == NUL)
+ /* illegal argument or getchar(0) and no char avail: return zero */
+ n = 0;
+ else
+ /* getchar(0) and char avail: return char */
+ n = safe_vgetc();
++
+ if (n == K_IGNORE)
+ continue;
+ break;
+*** ../vim-7.4.305/src/getchar.c 2014-03-23 15:12:29.919264336 +0100
+--- src/getchar.c 2014-05-22 18:34:13.450200562 +0200
+***************
+*** 1883,1889 ****
+ }
+ #endif
+
+! #if defined(FEAT_INS_EXPAND) || defined(PROTO)
+ /*
+ * Check if any character is available, also half an escape sequence.
+ * Trick: when no typeahead found, but there is something in the typeahead
+--- 1883,1889 ----
+ }
+ #endif
+
+! #if defined(FEAT_INS_EXPAND) || defined(FEAT_EVAL) || defined(PROTO)
+ /*
+ * Check if any character is available, also half an escape sequence.
+ * Trick: when no typeahead found, but there is something in the typeahead
+*** ../vim-7.4.305/src/version.c 2014-05-22 18:14:27.570224664 +0200
+--- src/version.c 2014-05-22 18:37:10.734196958 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 306,
+ /**/
+
+--
+Press any key to continue, press any other key to quit.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.307 b/patches/source/vim/patches/7.4.307
new file mode 100644
index 000000000..8b0788171
--- /dev/null
+++ b/patches/source/vim/patches/7.4.307
@@ -0,0 +1,147 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.307
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.307 (after 7.4.305)
+Problem: Can't build without the +termresponse feature.
+Solution: Add proper #ifdefs.
+Files: src/os_unix.c, src/term.c
+
+
+*** ../vim-7.4.306/src/os_unix.c 2014-05-22 18:14:27.570224664 +0200
+--- src/os_unix.c 2014-05-22 20:29:36.930059845 +0200
+***************
+*** 3743,3749 ****
+ /* Conflicts with xterm mouse: "\033[" and "\033[M".
+ * Also conflicts with the xterm termresponse, skip this if it was
+ * requested already. */
+! if (!use_xterm_mouse() && !did_request_esc_sequence()
+ # ifdef FEAT_GUI
+ && !gui.in_use
+ # endif
+--- 3743,3752 ----
+ /* Conflicts with xterm mouse: "\033[" and "\033[M".
+ * Also conflicts with the xterm termresponse, skip this if it was
+ * requested already. */
+! if (!use_xterm_mouse()
+! # ifdef FEAT_TERMRESPONSE
+! && !did_request_esc_sequence()
+! # endif
+ # ifdef FEAT_GUI
+ && !gui.in_use
+ # endif
+***************
+*** 3758,3764 ****
+ # endif
+ # ifdef FEAT_MOUSE_PTERM
+ /* same as the dec mouse */
+! if (!use_xterm_mouse() && !did_request_esc_sequence()
+ # ifdef FEAT_GUI
+ && !gui.in_use
+ # endif
+--- 3761,3770 ----
+ # endif
+ # ifdef FEAT_MOUSE_PTERM
+ /* same as the dec mouse */
+! if (!use_xterm_mouse()
+! # ifdef FEAT_TERMRESPONSE
+! && !did_request_esc_sequence()
+! # endif
+ # ifdef FEAT_GUI
+ && !gui.in_use
+ # endif
+***************
+*** 3773,3779 ****
+ # endif
+ # ifdef FEAT_MOUSE_URXVT
+ /* same as the dec mouse */
+! if (use_xterm_mouse() == 3 && !did_request_esc_sequence()
+ # ifdef FEAT_GUI
+ && !gui.in_use
+ # endif
+--- 3779,3788 ----
+ # endif
+ # ifdef FEAT_MOUSE_URXVT
+ /* same as the dec mouse */
+! if (use_xterm_mouse() == 3
+! # ifdef FEAT_TERMRESPONSE
+! && !did_request_esc_sequence()
+! # endif
+ # ifdef FEAT_GUI
+ && !gui.in_use
+ # endif
+*** ../vim-7.4.306/src/term.c 2014-05-22 18:14:27.570224664 +0200
+--- src/term.c 2014-05-22 20:28:34.922061106 +0200
+***************
+*** 3311,3317 ****
+ }
+ }
+
+! #if defined(UNIX) || defined(PROTO)
+ /*
+ * Return TRUE when the xterm version was requested or anything else that
+ * would send an ESC sequence back to Vim.
+--- 3311,3318 ----
+ }
+ }
+
+! #if defined(FEAT_TERMRESPONSE) || defined(PROTO)
+! # if defined(UNIX) || defined(PROTO)
+ /*
+ * Return TRUE when the xterm version was requested or anything else that
+ * would send an ESC sequence back to Vim.
+***************
+*** 3327,3341 ****
+ if (u7_status == U7_GET)
+ u7_status = 0;
+ return crv_status == CRV_SENT || u7_status == U7_SENT
+! # if defined(FEAT_TERMRESPONSE)
+! || xt_index_out > xt_index_in
+! # endif
+! ;
+ }
+! #endif
+
+
+- #if defined(FEAT_TERMRESPONSE) || defined(PROTO)
+ /*
+ * Request version string (for xterm) when needed.
+ * Only do this after switching to raw mode, otherwise the result will be
+--- 3328,3338 ----
+ if (u7_status == U7_GET)
+ u7_status = 0;
+ return crv_status == CRV_SENT || u7_status == U7_SENT
+! || xt_index_out > xt_index_in;
+ }
+! # endif
+
+
+ /*
+ * Request version string (for xterm) when needed.
+ * Only do this after switching to raw mode, otherwise the result will be
+*** ../vim-7.4.306/src/version.c 2014-05-22 18:59:54.510169240 +0200
+--- src/version.c 2014-05-22 21:20:36.665997658 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 307,
+ /**/
+
+--
+Some of the well known MS-Windows errors:
+ ESLEEP Operator fell asleep
+ ENOERR No error yet
+ EDOLLAR OS too expensive
+ EWINDOWS MS-Windows loaded, system in danger
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.308 b/patches/source/vim/patches/7.4.308
new file mode 100644
index 000000000..f3d6a3c52
--- /dev/null
+++ b/patches/source/vim/patches/7.4.308
@@ -0,0 +1,47 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.308
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.308
+Problem: When using ":diffsplit" on an empty file the cursor is displayed
+ on the command line.
+Solution: Limit the value of w_topfill.
+Files: src/diff.c
+
+
+*** ../vim-7.4.307/src/diff.c 2013-09-20 20:13:48.000000000 +0200
+--- src/diff.c 2014-05-28 11:30:11.724008432 +0200
+***************
+*** 622,627 ****
+--- 622,628 ----
+ wp->w_topfill = (n < 0 ? 0 : n);
+ else if (n > 0 && n > wp->w_topfill)
+ wp->w_topfill = n;
++ check_topfill(wp, FALSE);
+ }
+ }
+ }
+*** ../vim-7.4.307/src/version.c 2014-05-22 21:22:15.361995652 +0200
+--- src/version.c 2014-05-28 11:34:01.064010440 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 308,
+ /**/
+
+--
+msdn.microsoft.com:
+ERROR_SUCCESS 0 (0x0) The operation completed successfully.
+I have always suspected that for Microsoft success is an error.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.309 b/patches/source/vim/patches/7.4.309
new file mode 100644
index 000000000..82c9e0b2d
--- /dev/null
+++ b/patches/source/vim/patches/7.4.309
@@ -0,0 +1,88 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.309
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.309
+Problem: When increasing the size of the lower window, the upper window
+ jumps back to the top. (Ron Aaron)
+Solution: Change setting the topline. (Nobuhiro Takasaki)
+Files: src/window.c
+
+
+*** ../vim-7.4.308/src/window.c 2014-05-22 15:17:24.706440568 +0200
+--- src/window.c 2014-05-28 13:24:40.308068558 +0200
+***************
+*** 5710,5717 ****
+ --wp->w_wrow;
+ }
+ }
+ }
+! else
+ {
+ while (sline > 0 && lnum > 1)
+ {
+--- 5710,5718 ----
+ --wp->w_wrow;
+ }
+ }
++ set_topline(wp, lnum);
+ }
+! else if (sline > 0)
+ {
+ while (sline > 0 && lnum > 1)
+ {
+***************
+*** 5748,5761 ****
+ lnum++;
+ wp->w_wrow -= line_size + sline;
+ }
+! else if (sline >= 0)
+ {
+ /* First line of file reached, use that as topline. */
+ lnum = 1;
+ wp->w_wrow -= sline;
+ }
+ }
+- set_topline(wp, lnum);
+ }
+
+ if (wp == curwin)
+--- 5749,5763 ----
+ lnum++;
+ wp->w_wrow -= line_size + sline;
+ }
+! else if (sline > 0)
+ {
+ /* First line of file reached, use that as topline. */
+ lnum = 1;
+ wp->w_wrow -= sline;
+ }
++
++ set_topline(wp, lnum);
+ }
+ }
+
+ if (wp == curwin)
+*** ../vim-7.4.308/src/version.c 2014-05-28 11:35:33.428011248 +0200
+--- src/version.c 2014-05-28 13:33:54.244073407 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 309,
+ /**/
+
+--
+Don't be humble ... you're not that great.
+ -- Golda Meir
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.310 b/patches/source/vim/patches/7.4.310
new file mode 100644
index 000000000..2d25f0f2f
--- /dev/null
+++ b/patches/source/vim/patches/7.4.310
@@ -0,0 +1,373 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.310
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.310
+Problem: getpos()/setpos() don't include curswant.
+Solution: Add a fifth number when getting/setting the cursor.
+Files: src/eval.c, src/testdir/test_eval.in, src/testdir/test_eval.ok,
+ runtime/doc/eval.txt
+
+
+*** ../vim-7.4.309/src/eval.c 2014-05-22 18:59:54.506169240 +0200
+--- src/eval.c 2014-05-28 14:23:37.608099523 +0200
+***************
+*** 764,770 ****
+ static void f_writefile __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_xor __ARGS((typval_T *argvars, typval_T *rettv));
+
+! static int list2fpos __ARGS((typval_T *arg, pos_T *posp, int *fnump));
+ static pos_T *var2fpos __ARGS((typval_T *varp, int dollar_lnum, int *fnum));
+ static int get_env_len __ARGS((char_u **arg));
+ static int get_id_len __ARGS((char_u **arg));
+--- 764,770 ----
+ static void f_writefile __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_xor __ARGS((typval_T *argvars, typval_T *rettv));
+
+! static int list2fpos __ARGS((typval_T *arg, pos_T *posp, int *fnump, colnr_T *curswantp));
+ static pos_T *var2fpos __ARGS((typval_T *varp, int dollar_lnum, int *fnum));
+ static int get_env_len __ARGS((char_u **arg));
+ static int get_id_len __ARGS((char_u **arg));
+***************
+*** 9799,9812 ****
+ if (argvars[1].v_type == VAR_UNKNOWN)
+ {
+ pos_T pos;
+
+! if (list2fpos(argvars, &pos, NULL) == FAIL)
+ return;
+ line = pos.lnum;
+ col = pos.col;
+ #ifdef FEAT_VIRTUALEDIT
+ coladd = pos.coladd;
+ #endif
+ }
+ else
+ {
+--- 9799,9815 ----
+ if (argvars[1].v_type == VAR_UNKNOWN)
+ {
+ pos_T pos;
++ colnr_T curswant = -1;
+
+! if (list2fpos(argvars, &pos, NULL, &curswant) == FAIL)
+ return;
+ line = pos.lnum;
+ col = pos.col;
+ #ifdef FEAT_VIRTUALEDIT
+ coladd = pos.coladd;
+ #endif
++ if (curswant >= 0)
++ curwin->w_curswant = curswant - 1;
+ }
+ else
+ {
+***************
+*** 11770,11775 ****
+--- 11773,11780 ----
+ (fp != NULL) ? (varnumber_T)fp->coladd :
+ #endif
+ (varnumber_T)0);
++ if (fp == &curwin->w_cursor)
++ list_append_number(l, (varnumber_T)curwin->w_curswant + 1);
+ }
+ else
+ rettv->vval.v_number = FALSE;
+***************
+*** 16751,16762 ****
+ pos_T pos;
+ int fnum;
+ char_u *name;
+
+ rettv->vval.v_number = -1;
+ name = get_tv_string_chk(argvars);
+ if (name != NULL)
+ {
+! if (list2fpos(&argvars[1], &pos, &fnum) == OK)
+ {
+ if (--pos.col < 0)
+ pos.col = 0;
+--- 16756,16768 ----
+ pos_T pos;
+ int fnum;
+ char_u *name;
++ colnr_T curswant = -1;
+
+ rettv->vval.v_number = -1;
+ name = get_tv_string_chk(argvars);
+ if (name != NULL)
+ {
+! if (list2fpos(&argvars[1], &pos, &fnum, &curswant) == OK)
+ {
+ if (--pos.col < 0)
+ pos.col = 0;
+***************
+*** 16766,16771 ****
+--- 16772,16779 ----
+ if (fnum == curbuf->b_fnum)
+ {
+ curwin->w_cursor = pos;
++ if (curswant >= 0)
++ curwin->w_curswant = curswant - 1;
+ check_cursor();
+ rettv->vval.v_number = 0;
+ }
+***************
+*** 19532,19552 ****
+ * validity.
+ */
+ static int
+! list2fpos(arg, posp, fnump)
+ typval_T *arg;
+ pos_T *posp;
+ int *fnump;
+ {
+ list_T *l = arg->vval.v_list;
+ long i = 0;
+ long n;
+
+! /* List must be: [fnum, lnum, col, coladd], where "fnum" is only there
+! * when "fnump" isn't NULL and "coladd" is optional. */
+ if (arg->v_type != VAR_LIST
+ || l == NULL
+ || l->lv_len < (fnump == NULL ? 2 : 3)
+! || l->lv_len > (fnump == NULL ? 3 : 4))
+ return FAIL;
+
+ if (fnump != NULL)
+--- 19540,19561 ----
+ * validity.
+ */
+ static int
+! list2fpos(arg, posp, fnump, curswantp)
+ typval_T *arg;
+ pos_T *posp;
+ int *fnump;
++ colnr_T *curswantp;
+ {
+ list_T *l = arg->vval.v_list;
+ long i = 0;
+ long n;
+
+! /* List must be: [fnum, lnum, col, coladd, curswant], where "fnum" is only
+! * there when "fnump" isn't NULL; "coladd" and "curswant" are optional. */
+ if (arg->v_type != VAR_LIST
+ || l == NULL
+ || l->lv_len < (fnump == NULL ? 2 : 3)
+! || l->lv_len > (fnump == NULL ? 4 : 5))
+ return FAIL;
+
+ if (fnump != NULL)
+***************
+*** 19570,19582 ****
+ posp->col = n;
+
+ #ifdef FEAT_VIRTUALEDIT
+! n = list_find_nr(l, i, NULL);
+ if (n < 0)
+ posp->coladd = 0;
+ else
+ posp->coladd = n;
+ #endif
+
+ return OK;
+ }
+
+--- 19579,19594 ----
+ posp->col = n;
+
+ #ifdef FEAT_VIRTUALEDIT
+! n = list_find_nr(l, i, NULL); /* off */
+ if (n < 0)
+ posp->coladd = 0;
+ else
+ posp->coladd = n;
+ #endif
+
++ if (curswantp != NULL)
++ *curswantp = list_find_nr(l, i + 1, NULL); /* curswant */
++
+ return OK;
+ }
+
+*** ../vim-7.4.309/src/testdir/test_eval.in 2014-04-29 17:41:18.351689927 +0200
+--- src/testdir/test_eval.in 2014-05-28 14:22:31.780098947 +0200
+***************
+*** 190,198 ****
+--- 190,207 ----
+ :$put =v:exception
+ :endtry
+ :"
++ :$put ='{{{1 setpos/getpos'
++ /^012345678
++ 6l:let sp = getpos('.')
++ 0:call setpos('.', sp)
++ jyl:$put
++ :"
+ :/^start:/+1,$wq! test.out
+ :" vim: et ts=4 isk-=\: fmr=???,???
+ :call getchar()
+ ENDTEST
+
++ 012345678
++ 012345678
++
+ start:
+*** ../vim-7.4.309/src/testdir/test_eval.ok 2014-04-29 17:41:18.351689927 +0200
+--- src/testdir/test_eval.ok 2014-05-28 14:19:31.836097372 +0200
+***************
+*** 346,348 ****
+--- 346,350 ----
+ Bar exists: 1
+ func Bar exists: 1
+ Vim(call):E116: Invalid arguments for function append
++ {{{1 setpos/getpos
++ 6
+*** ../vim-7.4.309/runtime/doc/eval.txt 2014-05-07 18:35:25.661216052 +0200
+--- runtime/doc/eval.txt 2014-05-28 14:04:40.928089573 +0200
+***************
+*** 2587,2595 ****
+ cursor({list})
+ Positions the cursor at the column (byte count) {col} in the
+ line {lnum}. The first column is one.
+ When there is one argument {list} this is used as a |List|
+! with two or three items {lnum}, {col} and {off}. This is like
+! the return value of |getpos()|, but without the first item.
+ Does not change the jumplist.
+ If {lnum} is greater than the number of lines in the buffer,
+ the cursor will be positioned at the last line in the buffer.
+--- 2587,2600 ----
+ cursor({list})
+ Positions the cursor at the column (byte count) {col} in the
+ line {lnum}. The first column is one.
++
+ When there is one argument {list} this is used as a |List|
+! with two, three or four item:
+! [{lnum}, {col}, {off}]
+! [{lnum}, {col}, {off}, {curswant}]
+! This is like the return value of |getpos()|, but without the
+! first item.
+!
+ Does not change the jumplist.
+ If {lnum} is greater than the number of lines in the buffer,
+ the cursor will be positioned at the last line in the buffer.
+***************
+*** 4475,4482 ****
+ *getpos()*
+ getpos({expr}) Get the position for {expr}. For possible values of {expr}
+ see |line()|.
+! The result is a |List| with four numbers:
+ [bufnum, lnum, col, off]
+ "bufnum" is zero, unless a mark like '0 or 'A is used, then it
+ is the buffer number of the mark.
+ "lnum" and "col" are the position in the buffer. The first
+--- 4490,4498 ----
+ *getpos()*
+ getpos({expr}) Get the position for {expr}. For possible values of {expr}
+ see |line()|.
+! The result is a |List| with four or five numbers:
+ [bufnum, lnum, col, off]
++ [bufnum, lnum, col, off, curswant]
+ "bufnum" is zero, unless a mark like '0 or 'A is used, then it
+ is the buffer number of the mark.
+ "lnum" and "col" are the position in the buffer. The first
+***************
+*** 4485,4490 ****
+--- 4501,4511 ----
+ it is the offset in screen columns from the start of the
+ character. E.g., a position within a <Tab> or after the last
+ character.
++ The "curswant" number is only added for getpos('.'), it is the
++ preferred column when moving the cursor vertically.
++ Note that for '< and '> Visual mode matters: when it is "V"
++ (visual line mode) the column of '< is zero and the column of
++ '> is a large number.
+ This can be used to save and restore the cursor position: >
+ let save_cursor = getpos(".")
+ MoveTheCursorAround
+***************
+*** 5289,5296 ****
+ . the cursor
+ 'x mark x
+
+! {list} must be a |List| with four numbers:
+ [bufnum, lnum, col, off]
+
+ "bufnum" is the buffer number. Zero can be used for the
+ current buffer. Setting the cursor is only possible for
+--- 5310,5318 ----
+ . the cursor
+ 'x mark x
+
+! {list} must be a |List| with four or five numbers:
+ [bufnum, lnum, col, off]
++ [bufnum, lnum, col, off, curswant]
+
+ "bufnum" is the buffer number. Zero can be used for the
+ current buffer. Setting the cursor is only possible for
+***************
+*** 5308,5320 ****
+ character. E.g., a position within a <Tab> or after the last
+ character.
+
+ Returns 0 when the position could be set, -1 otherwise.
+ An error message is given if {expr} is invalid.
+
+ Also see |getpos()|
+
+ This does not restore the preferred column for moving
+! vertically. See |winrestview()| for that.
+
+
+ setqflist({list} [, {action}]) *setqflist()*
+--- 5330,5355 ----
+ character. E.g., a position within a <Tab> or after the last
+ character.
+
++ The "curswant" number is only used when setting the cursor
++ position. It sets the preferred column for when moving the
++ cursor vertically. When the "curswant" number is missing the
++ preferred column is not set. When it is present and setting a
++ mark position it is not used.
++
++ Note that for '< and '> changing the line number may result in
++ the marks to be effectively be swapped, so that '< is always
++ before '>.
++
+ Returns 0 when the position could be set, -1 otherwise.
+ An error message is given if {expr} is invalid.
+
+ Also see |getpos()|
+
+ This does not restore the preferred column for moving
+! vertically; if you set the cursor position with this, |j| and
+! |k| motions will jump to previous columns! Use |cursor()| to
+! also set the preferred column. Also see the "curswant" key in
+! |winrestview()|.
+
+
+ setqflist({list} [, {action}]) *setqflist()*
+*** ../vim-7.4.309/src/version.c 2014-05-28 13:42:59.884078184 +0200
+--- src/version.c 2014-05-28 14:27:20.132101471 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 310,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+218. Your spouse hands you a gift wrapped magnet with your PC's name
+ on it and you accuse him or her of genocide.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.311 b/patches/source/vim/patches/7.4.311
new file mode 100644
index 000000000..00097883c
--- /dev/null
+++ b/patches/source/vim/patches/7.4.311
@@ -0,0 +1,127 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.311
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.311
+Problem: Can't use winrestview to only restore part of the view.
+Solution: Handle missing items in the dict. (Christian Brabandt)
+Files: src/eval.c, runtime/doc/eval.txt
+
+
+*** ../vim-7.4.310/src/eval.c 2014-05-28 14:32:47.156104334 +0200
+--- src/eval.c 2014-05-28 16:42:25.196172421 +0200
+***************
+*** 19231,19250 ****
+ EMSG(_(e_invarg));
+ else
+ {
+! curwin->w_cursor.lnum = get_dict_number(dict, (char_u *)"lnum");
+! curwin->w_cursor.col = get_dict_number(dict, (char_u *)"col");
+ #ifdef FEAT_VIRTUALEDIT
+! curwin->w_cursor.coladd = get_dict_number(dict, (char_u *)"coladd");
+ #endif
+! curwin->w_curswant = get_dict_number(dict, (char_u *)"curswant");
+! curwin->w_set_curswant = FALSE;
+
+! set_topline(curwin, get_dict_number(dict, (char_u *)"topline"));
+ #ifdef FEAT_DIFF
+! curwin->w_topfill = get_dict_number(dict, (char_u *)"topfill");
+ #endif
+! curwin->w_leftcol = get_dict_number(dict, (char_u *)"leftcol");
+! curwin->w_skipcol = get_dict_number(dict, (char_u *)"skipcol");
+
+ check_cursor();
+ win_new_height(curwin, curwin->w_height);
+--- 19231,19260 ----
+ EMSG(_(e_invarg));
+ else
+ {
+! if (dict_find(dict, (char_u *)"lnum", -1) != NULL)
+! curwin->w_cursor.lnum = get_dict_number(dict, (char_u *)"lnum");
+! if (dict_find(dict, (char_u *)"col", -1) != NULL)
+! curwin->w_cursor.col = get_dict_number(dict, (char_u *)"col");
+ #ifdef FEAT_VIRTUALEDIT
+! if (dict_find(dict, (char_u *)"coladd", -1) != NULL)
+! curwin->w_cursor.coladd = get_dict_number(dict, (char_u *)"coladd");
+ #endif
+! if (dict_find(dict, (char_u *)"curswant", -1) != NULL)
+! {
+! curwin->w_curswant = get_dict_number(dict, (char_u *)"curswant");
+! curwin->w_set_curswant = FALSE;
+! }
+
+! if (dict_find(dict, (char_u *)"topline", -1) != NULL)
+! set_topline(curwin, get_dict_number(dict, (char_u *)"topline"));
+ #ifdef FEAT_DIFF
+! if (dict_find(dict, (char_u *)"topfill", -1) != NULL)
+! curwin->w_topfill = get_dict_number(dict, (char_u *)"topfill");
+ #endif
+! if (dict_find(dict, (char_u *)"leftcol", -1) != NULL)
+! curwin->w_leftcol = get_dict_number(dict, (char_u *)"leftcol");
+! if (dict_find(dict, (char_u *)"skipcol", -1) != NULL)
+! curwin->w_skipcol = get_dict_number(dict, (char_u *)"skipcol");
+
+ check_cursor();
+ win_new_height(curwin, curwin->w_height);
+*** ../vim-7.4.310/runtime/doc/eval.txt 2014-05-28 14:32:47.164104334 +0200
+--- runtime/doc/eval.txt 2014-05-28 16:42:25.192172421 +0200
+***************
+*** 6404,6409 ****
+--- 6414,6429 ----
+ winrestview({dict})
+ Uses the |Dictionary| returned by |winsaveview()| to restore
+ the view of the current window.
++ Note: The {dict} does not have to contain all values, that are
++ returned by |winsaveview()|. If values are missing, those
++ settings won't be restored. So you can use: >
++ :call winrestview({'curswant': 4})
++ <
++ This will only set the curswant value (the column the cursor
++ wants to move on vertical movements) of the cursor to column 5
++ (yes, that is 5), while all other settings will remain the
++ same. This is useful, if you set the cursor position manually.
++
+ If you have changed the values the result is unpredictable.
+ If the window size changed the result won't be the same.
+
+***************
+*** 6418,6424 ****
+ not opened when moving around.
+ The return value includes:
+ lnum cursor line number
+! col cursor column
+ coladd cursor column offset for 'virtualedit'
+ curswant column for vertical movement
+ topline first line in the window
+--- 6438,6446 ----
+ not opened when moving around.
+ The return value includes:
+ lnum cursor line number
+! col cursor column (Note: the first column
+! zero, as opposed to what getpos()
+! returns)
+ coladd cursor column offset for 'virtualedit'
+ curswant column for vertical movement
+ topline first line in the window
+*** ../vim-7.4.310/src/version.c 2014-05-28 14:32:47.164104334 +0200
+--- src/version.c 2014-05-28 16:45:19.200173944 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 311,
+ /**/
+
+--
+Your fault: core dumped
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.312 b/patches/source/vim/patches/7.4.312
new file mode 100644
index 000000000..14bc1c1c9
--- /dev/null
+++ b/patches/source/vim/patches/7.4.312
@@ -0,0 +1,194 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.312
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.312
+Problem: Cannot figure out what argument list is being used for a window.
+Solution: Add the arglistid() function. (Marcin Szamotulski)
+Files: runtime/doc/eval.txt, runtime/doc/usr_41.txt, src/eval.c,
+ src/ex_docmd.c, src/globals.h, src/structs.h, src/main.c
+
+
+*** ../vim-7.4.311/runtime/doc/eval.txt 2014-05-28 16:47:11.396174926 +0200
+--- runtime/doc/eval.txt 2014-05-28 18:00:06.248213223 +0200
+***************
+*** 1716,1721 ****
+--- 1716,1723 ----
+ append( {lnum}, {list}) Number append lines {list} below line {lnum}
+ argc() Number number of files in the argument list
+ argidx() Number current index in the argument list
++ arglistid( [{winnr}, [ {tabnr}]])
++ Number argument list id
+ argv( {nr}) String {nr} entry of the argument list
+ argv( ) List the argument list
+ asin( {expr}) Float arc sine of {expr}
+***************
+*** 2103,2108 ****
+--- 2105,2122 ----
+ argidx() The result is the current index in the argument list. 0 is
+ the first file. argc() - 1 is the last one. See |arglist|.
+
++ *arglistid()*
++ arglistid([{winnr}, [ {tabnr} ]])
++ Return the argument list ID. This is a number which
++ identifies the argument list being used. Zero is used for the
++ global argument list.
++ Return zero if the arguments are invalid.
++
++ Without arguments use the current window.
++ With {winnr} only use this window in the current tab page.
++ With {winnr} and {tabnr} use the window in the specified tab
++ page.
++
+ *argv()*
+ argv([{nr}]) The result is the {nr}th file in the argument list of the
+ current window. See |arglist|. "argv(0)" is the first one.
+*** ../vim-7.4.311/runtime/doc/usr_41.txt 2014-03-25 18:23:27.054087691 +0100
+--- runtime/doc/usr_41.txt 2014-05-28 18:07:43.096217222 +0200
+***************
+*** 770,775 ****
+--- 772,778 ----
+ Buffers, windows and the argument list:
+ argc() number of entries in the argument list
+ argidx() current position in the argument list
++ arglistid() get id of the argument list
+ argv() get one entry from the argument list
+ bufexists() check if a buffer exists
+ buflisted() check if a buffer exists and is listed
+*** ../vim-7.4.311/src/eval.c 2014-05-28 16:47:11.392174926 +0200
+--- src/eval.c 2014-05-28 18:11:10.264219035 +0200
+***************
+*** 463,468 ****
+--- 463,469 ----
+ static void f_append __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_argc __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_argidx __ARGS((typval_T *argvars, typval_T *rettv));
++ static void f_arglistid __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_argv __ARGS((typval_T *argvars, typval_T *rettv));
+ #ifdef FEAT_FLOAT
+ static void f_asin __ARGS((typval_T *argvars, typval_T *rettv));
+***************
+*** 7875,7880 ****
+--- 7876,7882 ----
+ {"append", 2, 2, f_append},
+ {"argc", 0, 0, f_argc},
+ {"argidx", 0, 0, f_argidx},
++ {"arglistid", 0, 2, f_arglistid},
+ {"argv", 0, 1, f_argv},
+ #ifdef FEAT_FLOAT
+ {"asin", 1, 1, f_asin}, /* WJMc */
+***************
+*** 8859,8864 ****
+--- 8861,8901 ----
+ }
+
+ /*
++ * "arglistid()" function
++ */
++ static void
++ f_arglistid(argvars, rettv)
++ typval_T *argvars UNUSED;
++ typval_T *rettv;
++ {
++ win_T *wp;
++ tabpage_T *tp = NULL;
++ long n;
++
++ rettv->vval.v_number = -1;
++ if (argvars[0].v_type != VAR_UNKNOWN)
++ {
++ if (argvars[1].v_type != VAR_UNKNOWN)
++ {
++ n = get_tv_number(&argvars[1]);
++ if (n >= 0)
++ tp = find_tabpage(n);
++ }
++ else
++ tp = curtab;
++
++ if (tp != NULL)
++ {
++ wp = find_win_by_nr(&argvars[0], tp);
++ if (wp != NULL)
++ rettv->vval.v_number = wp->w_alist->id;
++ }
++ }
++ else
++ rettv->vval.v_number = curwin->w_alist->id;
++ }
++
++ /*
+ * "argv(nr)" function
+ */
+ static void
+*** ../vim-7.4.311/src/ex_docmd.c 2014-05-07 21:14:42.913299714 +0200
+--- src/ex_docmd.c 2014-05-28 18:10:01.696218435 +0200
+***************
+*** 7211,7216 ****
+--- 7211,7217 ----
+ else
+ {
+ curwin->w_alist->al_refcount = 1;
++ curwin->w_alist->id = ++max_alist_id;
+ alist_init(curwin->w_alist);
+ }
+ }
+*** ../vim-7.4.311/src/globals.h 2014-05-22 18:14:27.570224664 +0200
+--- src/globals.h 2014-05-28 17:56:53.392211534 +0200
+***************
+*** 601,606 ****
+--- 601,607 ----
+ * to this when the window is using the global argument list.
+ */
+ EXTERN alist_T global_alist; /* global argument list */
++ EXTERN int max_alist_id INIT(= 0); /* the previous argument list id */
+ EXTERN int arg_had_last INIT(= FALSE); /* accessed last file in
+ global_alist */
+
+*** ../vim-7.4.311/src/structs.h 2014-05-13 20:19:53.573808877 +0200
+--- src/structs.h 2014-05-28 17:54:18.312210177 +0200
+***************
+*** 675,680 ****
+--- 675,681 ----
+ {
+ garray_T al_ga; /* growarray with the array of file names */
+ int al_refcount; /* number of windows using this arglist */
++ int id; /* id of this arglist */
+ } alist_T;
+
+ /*
+*** ../vim-7.4.311/src/main.c 2014-04-01 19:55:46.252787300 +0200
+--- src/main.c 2014-05-28 18:09:32.040218175 +0200
+***************
+*** 322,327 ****
+--- 322,328 ----
+ init_yank(); /* init yank buffers */
+
+ alist_init(&global_alist); /* Init the argument list to empty. */
++ global_alist.id = 0;
+
+ /*
+ * Set the default values for the options.
+*** ../vim-7.4.311/src/version.c 2014-05-28 16:47:11.396174926 +0200
+--- src/version.c 2014-05-28 17:25:32.644195071 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 312,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+222. You send more than 20 personal e-mails a day.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.313 b/patches/source/vim/patches/7.4.313
new file mode 100644
index 000000000..39468e0ad
--- /dev/null
+++ b/patches/source/vim/patches/7.4.313
@@ -0,0 +1,320 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.313
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.313 (after 7.4.310)
+Problem: Changing the return value of getpos() causes an error. (Jie Zhu)
+Solution: Revert getpos() and add getcurpos().
+Files: src/eval.c, src/testdir/test_eval.in, src/testdir/test_eval.ok,
+ runtime/doc/eval.txt
+
+
+*** ../vim-7.4.312/src/eval.c 2014-05-28 18:22:37.876225054 +0200
+--- src/eval.c 2014-05-28 20:11:55.364282457 +0200
+***************
+*** 560,565 ****
+--- 560,566 ----
+ static void f_getline __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_getmatches __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_getpid __ARGS((typval_T *argvars, typval_T *rettv));
++ static void f_getcurpos __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_getpos __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_getqflist __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_getreg __ARGS((typval_T *argvars, typval_T *rettv));
+***************
+*** 7967,7972 ****
+--- 7968,7974 ----
+ {"getcmdline", 0, 0, f_getcmdline},
+ {"getcmdpos", 0, 0, f_getcmdpos},
+ {"getcmdtype", 0, 0, f_getcmdtype},
++ {"getcurpos", 0, 0, f_getcurpos},
+ {"getcwd", 0, 0, f_getcwd},
+ {"getfontname", 0, 1, f_getfontname},
+ {"getfperm", 1, 1, f_getfperm},
+***************
+*** 11780,11785 ****
+--- 11782,11800 ----
+ rettv->vval.v_number = mch_get_pid();
+ }
+
++ static void getpos_both __ARGS((typval_T *argvars, typval_T *rettv, int getcurpos));
++
++ /*
++ * "getcurpos()" function
++ */
++ static void
++ f_getcurpos(argvars, rettv)
++ typval_T *argvars;
++ typval_T *rettv;
++ {
++ getpos_both(argvars, rettv, TRUE);
++ }
++
+ /*
+ * "getpos(string)" function
+ */
+***************
+*** 11788,11793 ****
+--- 11803,11817 ----
+ typval_T *argvars;
+ typval_T *rettv;
+ {
++ getpos_both(argvars, rettv, FALSE);
++ }
++
++ static void
++ getpos_both(argvars, rettv, getcurpos)
++ typval_T *argvars;
++ typval_T *rettv;
++ int getcurpos;
++ {
+ pos_T *fp;
+ list_T *l;
+ int fnum = -1;
+***************
+*** 11795,11801 ****
+ if (rettv_list_alloc(rettv) == OK)
+ {
+ l = rettv->vval.v_list;
+! fp = var2fpos(&argvars[0], TRUE, &fnum);
+ if (fnum != -1)
+ list_append_number(l, (varnumber_T)fnum);
+ else
+--- 11819,11828 ----
+ if (rettv_list_alloc(rettv) == OK)
+ {
+ l = rettv->vval.v_list;
+! if (getcurpos)
+! fp = &curwin->w_cursor;
+! else
+! fp = var2fpos(&argvars[0], TRUE, &fnum);
+ if (fnum != -1)
+ list_append_number(l, (varnumber_T)fnum);
+ else
+***************
+*** 11810,11816 ****
+ (fp != NULL) ? (varnumber_T)fp->coladd :
+ #endif
+ (varnumber_T)0);
+! if (fp == &curwin->w_cursor)
+ list_append_number(l, (varnumber_T)curwin->w_curswant + 1);
+ }
+ else
+--- 11837,11843 ----
+ (fp != NULL) ? (varnumber_T)fp->coladd :
+ #endif
+ (varnumber_T)0);
+! if (getcurpos)
+ list_append_number(l, (varnumber_T)curwin->w_curswant + 1);
+ }
+ else
+*** ../vim-7.4.312/src/testdir/test_eval.in 2014-05-28 14:32:47.160104334 +0200
+--- src/testdir/test_eval.in 2014-05-28 20:14:27.048283785 +0200
+***************
+*** 190,198 ****
+ :$put =v:exception
+ :endtry
+ :"
+! :$put ='{{{1 setpos/getpos'
+ /^012345678
+! 6l:let sp = getpos('.')
+ 0:call setpos('.', sp)
+ jyl:$put
+ :"
+--- 190,198 ----
+ :$put =v:exception
+ :endtry
+ :"
+! :$put ='{{{1 getcurpos/setpos'
+ /^012345678
+! 6l:let sp = getcurpos()
+ 0:call setpos('.', sp)
+ jyl:$put
+ :"
+*** ../vim-7.4.312/src/testdir/test_eval.ok 2014-05-28 14:32:47.160104334 +0200
+--- src/testdir/test_eval.ok 2014-05-28 20:14:43.316283927 +0200
+***************
+*** 346,350 ****
+ Bar exists: 1
+ func Bar exists: 1
+ Vim(call):E116: Invalid arguments for function append
+! {{{1 setpos/getpos
+ 6
+--- 346,350 ----
+ Bar exists: 1
+ func Bar exists: 1
+ Vim(call):E116: Invalid arguments for function append
+! {{{1 getcurpos/setpos
+ 6
+*** ../vim-7.4.312/runtime/doc/eval.txt 2014-05-28 18:22:37.872225054 +0200
+--- runtime/doc/eval.txt 2014-05-28 20:27:57.092290876 +0200
+***************
+*** 1808,1817 ****
+ getcmdline() String return the current command-line
+ getcmdpos() Number return cursor position in command-line
+ getcmdtype() String return the current command-line type
+ getcwd() String the current working directory
+ getfperm( {fname}) String file permissions of file {fname}
+ getfsize( {fname}) Number size in bytes of file {fname}
+- getfontname( [{name}]) String name of font being used
+ getftime( {fname}) Number last modification time of file
+ getftype( {fname}) String description of type of file {fname}
+ getline( {lnum}) String line {lnum} of current buffer
+--- 1808,1818 ----
+ getcmdline() String return the current command-line
+ getcmdpos() Number return cursor position in command-line
+ getcmdtype() String return the current command-line type
++ getcurpos() List position of the cursor
+ getcwd() String the current working directory
++ getfontname( [{name}]) String name of font being used
+ getfperm( {fname}) String file permissions of file {fname}
+ getfsize( {fname}) Number size in bytes of file {fname}
+ getftime( {fname}) Number last modification time of file
+ getftype( {fname}) String description of type of file {fname}
+ getline( {lnum}) String line {lnum} of current buffer
+***************
+*** 2606,2613 ****
+ with two, three or four item:
+ [{lnum}, {col}, {off}]
+ [{lnum}, {col}, {off}, {curswant}]
+! This is like the return value of |getpos()|, but without the
+! first item.
+
+ Does not change the jumplist.
+ If {lnum} is greater than the number of lines in the buffer,
+--- 2607,2614 ----
+ with two, three or four item:
+ [{lnum}, {col}, {off}]
+ [{lnum}, {col}, {off}, {curswant}]
+! This is like the return value of |getpos()| or |getcurpos|,
+! but without the first item.
+
+ Does not change the jumplist.
+ If {lnum} is greater than the number of lines in the buffer,
+***************
+*** 2617,2622 ****
+--- 2618,2625 ----
+ the cursor will be positioned at the last character in the
+ line.
+ If {col} is zero, the cursor will stay in the current column.
++ If {curswant} is given it is used to set the preferred column
++ for vertical movment. Otherwise {col} is used.
+ When 'virtualedit' is used {off} specifies the offset in
+ screen columns from the start of the character. E.g., a
+ position within a <Tab> or after the last character.
+***************
+*** 3339,3344 ****
+--- 3347,3363 ----
+ Returns an empty string otherwise.
+ Also see |getcmdpos()|, |setcmdpos()| and |getcmdline()|.
+
++ *getcurpos()*
++ getcurpos() Get the position of the cursor. This is like getpos('.'), but
++ includes an extra item in the list:
++ [bufnum, lnum, col, off, curswant]
++ The "curswant" number is the preferred column when moving the
++ cursor vertically.
++ This can be used to save and restore the cursor position: >
++ let save_cursor = getcurpos()
++ MoveTheCursorAround
++ call setpos('.', save_cursor)
++
+ *getcwd()*
+ getcwd() The result is a String, which is the name of the current
+ working directory.
+***************
+*** 4493,4502 ****
+
+ *getpos()*
+ getpos({expr}) Get the position for {expr}. For possible values of {expr}
+! see |line()|.
+! The result is a |List| with four or five numbers:
+ [bufnum, lnum, col, off]
+- [bufnum, lnum, col, off, curswant]
+ "bufnum" is zero, unless a mark like '0 or 'A is used, then it
+ is the buffer number of the mark.
+ "lnum" and "col" are the position in the buffer. The first
+--- 4517,4526 ----
+
+ *getpos()*
+ getpos({expr}) Get the position for {expr}. For possible values of {expr}
+! see |line()|. For getting the cursor position see
+! |getcurpos()|.
+! The result is a |List| with four numbers:
+ [bufnum, lnum, col, off]
+ "bufnum" is zero, unless a mark like '0 or 'A is used, then it
+ is the buffer number of the mark.
+ "lnum" and "col" are the position in the buffer. The first
+***************
+*** 4505,4520 ****
+ it is the offset in screen columns from the start of the
+ character. E.g., a position within a <Tab> or after the last
+ character.
+- The "curswant" number is only added for getpos('.'), it is the
+- preferred column when moving the cursor vertically.
+ Note that for '< and '> Visual mode matters: when it is "V"
+ (visual line mode) the column of '< is zero and the column of
+ '> is a large number.
+! This can be used to save and restore the cursor position: >
+! let save_cursor = getpos(".")
+! MoveTheCursorAround
+! call setpos('.', save_cursor)
+! < Also see |setpos()|.
+
+ or({expr}, {expr}) *or()*
+ Bitwise OR on the two arguments. The arguments are converted
+--- 4529,4542 ----
+ it is the offset in screen columns from the start of the
+ character. E.g., a position within a <Tab> or after the last
+ character.
+ Note that for '< and '> Visual mode matters: when it is "V"
+ (visual line mode) the column of '< is zero and the column of
+ '> is a large number.
+! This can be used to save and restore the position of a mark: >
+! let save_a_mark = getpos("'a")
+! ...
+! call setpos(''a', save_a_mark
+! < Also see |getcurpos()| and |setpos()|.
+
+ or({expr}, {expr}) *or()*
+ Bitwise OR on the two arguments. The arguments are converted
+***************
+*** 5347,5353 ****
+ Returns 0 when the position could be set, -1 otherwise.
+ An error message is given if {expr} is invalid.
+
+! Also see |getpos()|
+
+ This does not restore the preferred column for moving
+ vertically; if you set the cursor position with this, |j| and
+--- 5369,5375 ----
+ Returns 0 when the position could be set, -1 otherwise.
+ An error message is given if {expr} is invalid.
+
+! Also see |getpos()| and |getcurpos()|.
+
+ This does not restore the preferred column for moving
+ vertically; if you set the cursor position with this, |j| and
+*** ../vim-7.4.312/src/version.c 2014-05-28 18:22:37.880225054 +0200
+--- src/version.c 2014-05-28 20:15:52.164284530 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 313,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+225. You sign up for free subscriptions for all the computer magazines
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.314 b/patches/source/vim/patches/7.4.314
new file mode 100644
index 000000000..9308e38c9
--- /dev/null
+++ b/patches/source/vim/patches/7.4.314
@@ -0,0 +1,178 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.314
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.314
+Problem: Completion messages can get in the way of a plugin.
+Solution: Add 'c' flag to 'shortmess' option. (Shougo Matsu)
+Files: runtime/doc/options.txt, src/edit.c, src/option.h, src/screen.c
+
+
+*** ../vim-7.4.313/runtime/doc/options.txt 2014-03-12 18:55:52.096906804 +0100
+--- runtime/doc/options.txt 2014-05-28 20:55:14.640305211 +0200
+***************
+*** 6252,6257 ****
+--- 6254,6262 ----
+ A don't give the "ATTENTION" message when an existing swap file
+ is found.
+ I don't give the intro message when starting Vim |:intro|.
++ c don't give |ins-completion-menu| messages. For example,
++ "-- XXX completion (YYY)", "match 1 of 2", "The only match",
++ "Pattern not found", "Back at original", etc.
+
+ This gives you the opportunity to avoid that a change between buffers
+ requires you to hit <Enter>, but still gives as useful a message as
+*** ../vim-7.4.313/src/edit.c 2014-04-29 14:44:31.515875819 +0200
+--- src/edit.c 2014-05-28 21:33:57.588325545 +0200
+***************
+*** 3854,3860 ****
+ ins_compl_free();
+ compl_started = FALSE;
+ compl_matches = 0;
+! msg_clr_cmdline(); /* necessary for "noshowmode" */
+ ctrl_x_mode = 0;
+ compl_enter_selects = FALSE;
+ if (edit_submode != NULL)
+--- 3854,3861 ----
+ ins_compl_free();
+ compl_started = FALSE;
+ compl_matches = 0;
+! if (!shortmess(SHM_COMPLETIONMENU))
+! msg_clr_cmdline(); /* necessary for "noshowmode" */
+ ctrl_x_mode = 0;
+ compl_enter_selects = FALSE;
+ if (edit_submode != NULL)
+***************
+*** 5285,5291 ****
+ {
+ ctrl_x_mode = 0;
+ edit_submode = NULL;
+! msg_clr_cmdline();
+ return FAIL;
+ }
+
+--- 5286,5293 ----
+ {
+ ctrl_x_mode = 0;
+ edit_submode = NULL;
+! if (!shortmess(SHM_COMPLETIONMENU))
+! msg_clr_cmdline();
+ return FAIL;
+ }
+
+***************
+*** 5544,5558 ****
+
+ /* Show a message about what (completion) mode we're in. */
+ showmode();
+! if (edit_submode_extra != NULL)
+ {
+! if (!p_smd)
+! msg_attr(edit_submode_extra,
+! edit_submode_highl < HLF_COUNT
+! ? hl_attr(edit_submode_highl) : 0);
+ }
+- else
+- msg_clr_cmdline(); /* necessary for "noshowmode" */
+
+ /* Show the popup menu, unless we got interrupted. */
+ if (!compl_interrupted)
+--- 5546,5563 ----
+
+ /* Show a message about what (completion) mode we're in. */
+ showmode();
+! if (!shortmess(SHM_COMPLETIONMENU))
+ {
+! if (edit_submode_extra != NULL)
+! {
+! if (!p_smd)
+! msg_attr(edit_submode_extra,
+! edit_submode_highl < HLF_COUNT
+! ? hl_attr(edit_submode_highl) : 0);
+! }
+! else
+! msg_clr_cmdline(); /* necessary for "noshowmode" */
+ }
+
+ /* Show the popup menu, unless we got interrupted. */
+ if (!compl_interrupted)
+*** ../vim-7.4.313/src/option.h 2014-03-23 15:12:29.943264337 +0100
+--- src/option.h 2014-05-28 21:34:25.244325787 +0200
+***************
+*** 212,218 ****
+ #define SHM_SEARCH 's' /* no search hit bottom messages */
+ #define SHM_ATTENTION 'A' /* no ATTENTION messages */
+ #define SHM_INTRO 'I' /* intro messages */
+! #define SHM_ALL "rmfixlnwaWtToOsAI" /* all possible flags for 'shm' */
+
+ /* characters for p_go: */
+ #define GO_ASEL 'a' /* autoselect */
+--- 212,219 ----
+ #define SHM_SEARCH 's' /* no search hit bottom messages */
+ #define SHM_ATTENTION 'A' /* no ATTENTION messages */
+ #define SHM_INTRO 'I' /* intro messages */
+! #define SHM_COMPLETIONMENU 'c' /* completion menu messages */
+! #define SHM_ALL "rmfixlnwaWtToOsAIc" /* all possible flags for 'shm' */
+
+ /* characters for p_go: */
+ #define GO_ASEL 'a' /* autoselect */
+*** ../vim-7.4.313/src/screen.c 2014-05-22 16:05:16.338382204 +0200
+--- src/screen.c 2014-05-28 20:53:20.488304211 +0200
+***************
+*** 42,48 ****
+ *
+ * The part of the buffer that is displayed in a window is set with:
+ * - w_topline (first buffer line in window)
+! * - w_topfill (filler line above the first line)
+ * - w_leftcol (leftmost window cell in window),
+ * - w_skipcol (skipped window cells of first line)
+ *
+--- 42,48 ----
+ *
+ * The part of the buffer that is displayed in a window is set with:
+ * - w_topline (first buffer line in window)
+! * - w_topfill (filler lines above the first line)
+ * - w_leftcol (leftmost window cell in window),
+ * - w_skipcol (skipped window cells of first line)
+ *
+***************
+*** 9683,9689 ****
+ }
+ #endif
+ #ifdef FEAT_INS_EXPAND
+! if (edit_submode != NULL) /* CTRL-X in Insert mode */
+ {
+ /* These messages can get long, avoid a wrap in a narrow
+ * window. Prefer showing edit_submode_extra. */
+--- 9683,9690 ----
+ }
+ #endif
+ #ifdef FEAT_INS_EXPAND
+! /* CTRL-X in Insert mode */
+! if (edit_submode != NULL && !shortmess(SHM_COMPLETIONMENU))
+ {
+ /* These messages can get long, avoid a wrap in a narrow
+ * window. Prefer showing edit_submode_extra. */
+*** ../vim-7.4.313/src/version.c 2014-05-28 20:31:37.504292805 +0200
+--- src/version.c 2014-05-28 20:54:27.664304800 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 314,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+227. You sleep next to your monitor. Or on top of it.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.315 b/patches/source/vim/patches/7.4.315
new file mode 100644
index 000000000..ab52ec577
--- /dev/null
+++ b/patches/source/vim/patches/7.4.315
@@ -0,0 +1,229 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.315
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.315 (after 7.4.309)
+Problem: Fixes for computation of topline not tested.
+Solution: Add test. (Hirohito Higashi)
+Files: src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
+ src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
+ src/testdir/Make_vms.mms, src/testdir/Makefile,
+ src/testdir/test107.in, src/testdir/test107.ok
+
+
+*** ../vim-7.4.314/src/testdir/Make_amiga.mak 2014-04-29 12:15:22.852032651 +0200
+--- src/testdir/Make_amiga.mak 2014-05-28 13:13:32.108062709 +0200
+***************
+*** 35,41 ****
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+ test99.out test100.out test101.out test102.out test103.out \
+! test104.out test105.out test106.out \
+ test_autoformat_join.out \
+ test_eval.out \
+ test_options.out
+--- 35,41 ----
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+ test99.out test100.out test101.out test102.out test103.out \
+! test104.out test105.out test106.out test107.out \
+ test_autoformat_join.out \
+ test_eval.out \
+ test_options.out
+***************
+*** 161,166 ****
+--- 161,167 ----
+ test104.out: test104.in
+ test105.out: test105.in
+ test106.out: test106.in
++ test107.out: test107.in
+ test_autoformat_join.out: test_autoformat_join.in
+ test_eval.out: test_eval.in
+ test_options.out: test_options.in
+*** ../vim-7.4.314/src/testdir/Make_dos.mak 2014-04-29 12:15:22.852032651 +0200
+--- src/testdir/Make_dos.mak 2014-05-28 13:13:44.344062816 +0200
+***************
+*** 34,40 ****
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+ test100.out test101.out test102.out test103.out test104.out \
+! test105.out test106.out \
+ test_autoformat_join.out \
+ test_eval.out \
+ test_options.out
+--- 34,40 ----
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+ test100.out test101.out test102.out test103.out test104.out \
+! test105.out test106.out test107.out\
+ test_autoformat_join.out \
+ test_eval.out \
+ test_options.out
+*** ../vim-7.4.314/src/testdir/Make_ming.mak 2014-04-29 12:15:22.852032651 +0200
+--- src/testdir/Make_ming.mak 2014-05-28 13:13:52.656062889 +0200
+***************
+*** 54,60 ****
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+ test100.out test101.out test102.out test103.out test104.out \
+! test105.out test106.out \
+ test_autoformat_join.out \
+ test_eval.out \
+ test_options.out
+--- 54,60 ----
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+ test100.out test101.out test102.out test103.out test104.out \
+! test105.out test106.out test107.out \
+ test_autoformat_join.out \
+ test_eval.out \
+ test_options.out
+*** ../vim-7.4.314/src/testdir/Make_os2.mak 2014-04-29 12:15:22.852032651 +0200
+--- src/testdir/Make_os2.mak 2014-05-28 13:14:03.616062985 +0200
+***************
+*** 36,42 ****
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+ test100.out test101.out test102.out test103.out test104.out \
+! test105.out test106.out \
+ test_autoformat_join.out \
+ test_eval.out \
+ test_options.out
+--- 36,42 ----
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test98.out test99.out \
+ test100.out test101.out test102.out test103.out test104.out \
+! test105.out test106.out test107.out \
+ test_autoformat_join.out \
+ test_eval.out \
+ test_options.out
+*** ../vim-7.4.314/src/testdir/Make_vms.mms 2014-04-29 12:15:22.852032651 +0200
+--- src/testdir/Make_vms.mms 2014-05-28 13:14:09.724063038 +0200
+***************
+*** 4,10 ****
+ # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
+ # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
+ #
+! # Last change: 2014 Mar 12
+ #
+ # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
+ # Edit the lines in the Configuration section below to select.
+--- 4,10 ----
+ # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
+ # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
+ #
+! # Last change: 2014 May 28
+ #
+ # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
+ # Edit the lines in the Configuration section below to select.
+***************
+*** 95,101 ****
+ test90.out test91.out test92.out test93.out test94.out \
+ test95.out test96.out test98.out test99.out \
+ test100.out test101.out test103.out test104.out \
+! test105.out test106.out \
+ test_autoformat_join.out \
+ test_eval.out \
+ test_options.out
+--- 95,101 ----
+ test90.out test91.out test92.out test93.out test94.out \
+ test95.out test96.out test98.out test99.out \
+ test100.out test101.out test103.out test104.out \
+! test105.out test106.out test107.out \
+ test_autoformat_join.out \
+ test_eval.out \
+ test_options.out
+*** ../vim-7.4.314/src/testdir/Makefile 2014-05-22 13:12:25.650592983 +0200
+--- src/testdir/Makefile 2014-05-28 13:14:28.688063204 +0200
+***************
+*** 32,38 ****
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+ test99.out test100.out test101.out test102.out test103.out \
+! test104.out test105.out test106.out \
+ test_autoformat_join.out \
+ test_eval.out \
+ test_options.out
+--- 32,38 ----
+ test89.out test90.out test91.out test92.out test93.out \
+ test94.out test95.out test96.out test97.out test98.out \
+ test99.out test100.out test101.out test102.out test103.out \
+! test104.out test105.out test106.out test107.out \
+ test_autoformat_join.out \
+ test_eval.out \
+ test_options.out
+*** ../vim-7.4.314/src/testdir/test107.in 2014-05-29 11:46:48.728773486 +0200
+--- src/testdir/test107.in 2014-05-29 11:40:20.096770084 +0200
+***************
+*** 0 ****
+--- 1,38 ----
++ Tests for adjusting window and contents vim: set ft=vim :
++
++ STARTTEST
++ :so small.vim
++ :new
++ :call setline(1, range(1,256))
++ :let r=[]
++ :func! GetScreenStr(row)
++ : let str = ""
++ : for c in range(1,3)
++ : let str .= nr2char(screenchar(a:row, c))
++ : endfor
++ : return str
++ :endfunc
++ :
++ :exe ":norm! \<C-W>t\<C-W>=1Gzt\<C-W>w\<C-W>+"
++ :let s3=GetScreenStr(1)
++ :wincmd p
++ :call add(r, [line("w0"), s3])
++ :
++ :exe ":norm! \<C-W>t\<C-W>=50Gzt\<C-W>w\<C-W>+"
++ :let s3=GetScreenStr(1)
++ :wincmd p
++ :call add(r, [line("w0"), s3])
++ :
++ :exe ":norm! \<C-W>t\<C-W>=59Gzt\<C-W>w\<C-W>+"
++ :let s3=GetScreenStr(1)
++ ::wincmd p
++ :call add(r, [line("w0"), s3])
++ :
++ :bwipeout!
++ :$put=r
++ :call garbagecollect(1)
++ :"
++ :/^start:/,$wq! test.out
++ ENDTEST
++
++ start:
+*** ../vim-7.4.314/src/testdir/test107.ok 2014-05-29 11:46:48.736773486 +0200
+--- src/testdir/test107.ok 2014-05-29 11:40:20.096770084 +0200
+***************
+*** 0 ****
+--- 1,4 ----
++ start:
++ [1, '1 ']
++ [50, '50 ']
++ [59, '59 ']
+*** ../vim-7.4.314/src/version.c 2014-05-28 21:40:47.092329130 +0200
+--- src/version.c 2014-05-29 11:41:47.640770850 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 315,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+229. You spend so much time thinking what to add on this list.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.316 b/patches/source/vim/patches/7.4.316
new file mode 100644
index 000000000..89b3b5011
--- /dev/null
+++ b/patches/source/vim/patches/7.4.316
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.316
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.316
+Problem: Warning from 64-bit compiler.
+Solution: Add type cast. (Mike Williams)
+Files: src/ex_getln.c
+
+
+*** ../vim-7.4.315/src/ex_getln.c 2014-05-07 18:35:25.665216052 +0200
+--- src/ex_getln.c 2014-05-29 14:32:53.584860716 +0200
+***************
+*** 5202,5208 ****
+ for (i = 0; i < num_p; ++i)
+ {
+ ((char_u **)ga->ga_data)[ga->ga_len] =
+! vim_strnsave(p[i], STRLEN(p[i]));
+ ++ga->ga_len;
+ }
+ }
+--- 5202,5208 ----
+ for (i = 0; i < num_p; ++i)
+ {
+ ((char_u **)ga->ga_data)[ga->ga_len] =
+! vim_strnsave(p[i], (int)STRLEN(p[i]));
+ ++ga->ga_len;
+ }
+ }
+*** ../vim-7.4.315/src/version.c 2014-05-29 11:47:19.808773758 +0200
+--- src/version.c 2014-05-29 14:33:29.476861030 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 316,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+232. You start conversations with, "Have you gotten an ISDN line?"
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.317 b/patches/source/vim/patches/7.4.317
new file mode 100644
index 000000000..34ea33628
--- /dev/null
+++ b/patches/source/vim/patches/7.4.317
@@ -0,0 +1,57 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.317
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.317
+Problem: Crash when starting gvim. Issue 230.
+Solution: Check for a pointer to be NULL. (Christian Brabandt)
+Files: src/window.c
+
+
+*** ../vim-7.4.316/src/window.c 2014-05-28 13:42:59.884078184 +0200
+--- src/window.c 2014-06-12 11:36:53.619441640 +0200
+***************
+*** 4721,4728 ****
+ win_free_lsize(wp)
+ win_T *wp;
+ {
+! vim_free(wp->w_lines);
+! wp->w_lines = NULL;
+ }
+
+ /*
+--- 4721,4732 ----
+ win_free_lsize(wp)
+ win_T *wp;
+ {
+! /* TODO: why would wp be NULL here? */
+! if (wp != NULL)
+! {
+! vim_free(wp->w_lines);
+! wp->w_lines = NULL;
+! }
+ }
+
+ /*
+*** ../vim-7.4.316/src/version.c 2014-05-29 14:36:26.156862577 +0200
+--- src/version.c 2014-06-12 11:37:37.907443315 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 317,
+ /**/
+
+--
+press CTRL-ALT-DEL for more information
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.318 b/patches/source/vim/patches/7.4.318
new file mode 100644
index 000000000..3f82c53fe
--- /dev/null
+++ b/patches/source/vim/patches/7.4.318
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.318
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.318
+Problem: Check for whether a highlight group has settings ignores fg and bg
+ color settings.
+Solution: Also check cterm and GUI color settings. (Christian Brabandt)
+Files: src/syntax.c
+
+
+*** ../vim-7.4.317/src/syntax.c 2014-03-23 15:12:29.939264336 +0100
+--- src/syntax.c 2014-06-12 12:16:13.851530931 +0200
+***************
+*** 8043,8050 ****
+--- 8043,8056 ----
+ {
+ return ( HL_TABLE()[idx].sg_term_attr != 0
+ || HL_TABLE()[idx].sg_cterm_attr != 0
++ || HL_TABLE()[idx].sg_cterm_fg != 0
++ || HL_TABLE()[idx].sg_cterm_bg != 0
+ #ifdef FEAT_GUI
+ || HL_TABLE()[idx].sg_gui_attr != 0
++ || HL_TABLE()[idx].sg_gui_fg_name != NULL
++ || HL_TABLE()[idx].sg_gui_bg_name != NULL
++ || HL_TABLE()[idx].sg_gui_sp_name != NULL
++ || HL_TABLE()[idx].sg_font_name != NUL
+ #endif
+ || (check_link && (HL_TABLE()[idx].sg_set & SG_LINK)));
+ }
+*** ../vim-7.4.317/src/version.c 2014-06-12 11:49:42.219470717 +0200
+--- src/version.c 2014-06-12 12:17:25.607533645 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 318,
+ /**/
+
+--
+The software said it requires Windows 95 or better, so I installed Linux.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.319 b/patches/source/vim/patches/7.4.319
new file mode 100644
index 000000000..9b7cfaa37
--- /dev/null
+++ b/patches/source/vim/patches/7.4.319
@@ -0,0 +1,55 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.319
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.319
+Problem: Crash when putting zero bytes on the clipboard.
+Solution: Do not support the utf8_atom target when not using an Unicode
+ encoding. (Naofumi Honda)
+Files: src/ui.c
+
+
+*** ../vim-7.4.318/src/ui.c 2014-03-23 15:12:29.943264337 +0100
+--- src/ui.c 2014-06-12 13:25:21.791687853 +0200
+***************
+*** 2324,2330 ****
+ if ( *target != XA_STRING
+ #ifdef FEAT_MBYTE
+ && *target != vimenc_atom
+! && *target != utf8_atom
+ #endif
+ && *target != vim_atom
+ && *target != text_atom
+--- 2324,2330 ----
+ if ( *target != XA_STRING
+ #ifdef FEAT_MBYTE
+ && *target != vimenc_atom
+! && (*target != utf8_atom || !enc_utf8)
+ #endif
+ && *target != vim_atom
+ && *target != text_atom
+*** ../vim-7.4.318/src/version.c 2014-06-12 12:20:50.195541385 +0200
+--- src/version.c 2014-06-12 13:26:09.147689645 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 319,
+ /**/
+
+--
+FIRST HEAD: Oh! quick! get the sword out I want to cut his head off.
+THIRD HEAD: Oh, cut your own head off.
+SECOND HEAD: Yes - do us all a favour.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.320 b/patches/source/vim/patches/7.4.320
new file mode 100644
index 000000000..92830aa08
--- /dev/null
+++ b/patches/source/vim/patches/7.4.320
@@ -0,0 +1,143 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.320
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.320
+Problem: Possible crash when an BufLeave autocommand deletes the buffer.
+Solution: Check for the window pointer being valid. Postpone freeing the
+ window until autocommands are done. (Yasuhiro Matsumoto)
+Files: src/buffer.c, src/fileio.c, src/globals.h, src/window.c
+
+
+*** ../vim-7.4.319/src/buffer.c 2014-05-07 16:35:05.029152844 +0200
+--- src/buffer.c 2014-06-12 13:47:17.799737639 +0200
+***************
+*** 371,377 ****
+ unload_buf = TRUE;
+ #endif
+
+! if (win != NULL)
+ {
+ /* Set b_last_cursor when closing the last window for the buffer.
+ * Remember the last cursor position and window options of the buffer.
+--- 371,381 ----
+ unload_buf = TRUE;
+ #endif
+
+! if (win != NULL
+! #ifdef FEAT_WINDOWS
+! && win_valid(win) /* in case autocommands closed the window */
+! #endif
+! )
+ {
+ /* Set b_last_cursor when closing the last window for the buffer.
+ * Remember the last cursor position and window options of the buffer.
+*** ../vim-7.4.319/src/fileio.c 2014-05-02 15:46:10.731268318 +0200
+--- src/fileio.c 2014-06-12 13:53:33.207751842 +0200
+***************
+*** 9549,9555 ****
+
+ /*
+ * When stopping to execute autocommands, restore the search patterns and
+! * the redo buffer. Free buffers in the au_pending_free_buf list.
+ */
+ if (!autocmd_busy)
+ {
+--- 9549,9556 ----
+
+ /*
+ * When stopping to execute autocommands, restore the search patterns and
+! * the redo buffer. Free any buffers in the au_pending_free_buf list and
+! * free any windows in the au_pending_free_win list.
+ */
+ if (!autocmd_busy)
+ {
+***************
+*** 9562,9567 ****
+--- 9563,9574 ----
+ vim_free(au_pending_free_buf);
+ au_pending_free_buf = b;
+ }
++ while (au_pending_free_win != NULL)
++ {
++ win_T *w = au_pending_free_win->w_next;
++ vim_free(au_pending_free_win);
++ au_pending_free_win = w;
++ }
+ }
+
+ /*
+*** ../vim-7.4.319/src/globals.h 2014-05-28 18:22:37.876225054 +0200
+--- src/globals.h 2014-06-12 13:54:29.163753959 +0200
+***************
+*** 387,396 ****
+ * which one is preferred, au_new_curbuf is set to it */
+ EXTERN buf_T *au_new_curbuf INIT(= NULL);
+
+! /* When deleting the buffer and autocmd_busy is TRUE, do not free the buffer
+! * but link it in the list starting with au_pending_free_buf, using b_next.
+! * Free the buffer when autocmd_busy is set to FALSE. */
+ EXTERN buf_T *au_pending_free_buf INIT(= NULL);
+ #endif
+
+ #ifdef FEAT_MOUSE
+--- 387,398 ----
+ * which one is preferred, au_new_curbuf is set to it */
+ EXTERN buf_T *au_new_curbuf INIT(= NULL);
+
+! /* When deleting a buffer/window and autocmd_busy is TRUE, do not free the
+! * buffer/window. but link it in the list starting with
+! * au_pending_free_buf/ap_pending_free_win, using b_next/w_next.
+! * Free the buffer/window when autocmd_busy is being set to FALSE. */
+ EXTERN buf_T *au_pending_free_buf INIT(= NULL);
++ EXTERN win_T *au_pending_free_win INIT(= NULL);
+ #endif
+
+ #ifdef FEAT_MOUSE
+*** ../vim-7.4.319/src/window.c 2014-06-12 11:49:42.219470717 +0200
+--- src/window.c 2014-06-12 13:51:54.939748124 +0200
+***************
+*** 4597,4603 ****
+ if (wp != aucmd_win)
+ #endif
+ win_remove(wp, tp);
+! vim_free(wp);
+
+ #ifdef FEAT_AUTOCMD
+ unblock_autocmds();
+--- 4597,4609 ----
+ if (wp != aucmd_win)
+ #endif
+ win_remove(wp, tp);
+! if (autocmd_busy)
+! {
+! wp->w_next = au_pending_free_win;
+! au_pending_free_win = wp;
+! }
+! else
+! vim_free(wp);
+
+ #ifdef FEAT_AUTOCMD
+ unblock_autocmds();
+*** ../vim-7.4.319/src/version.c 2014-06-12 13:28:26.771694851 +0200
+--- src/version.c 2014-06-12 13:40:23.507721966 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 320,
+ /**/
+
+--
+Life would be so much easier if we could just look at the source code.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.321 b/patches/source/vim/patches/7.4.321
new file mode 100644
index 000000000..eaac413d9
--- /dev/null
+++ b/patches/source/vim/patches/7.4.321
@@ -0,0 +1,71 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.321
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.321
+Problem: Can't build with strawberry perl 5.20 + mingw-w64-4.9.0.
+Solution: Define save_strlen. (Ken Takata)
+Files: src/if_perl.xs
+
+
+*** ../vim-7.4.320/src/if_perl.xs 2014-03-12 17:08:01.508807656 +0100
+--- src/if_perl.xs 2014-06-12 16:02:25.584044368 +0200
+***************
+*** 191,196 ****
+--- 191,199 ----
+ # define Perl_pop_scope dll_Perl_pop_scope
+ # define Perl_push_scope dll_Perl_push_scope
+ # define Perl_save_int dll_Perl_save_int
++ # if (PERL_REVISION == 5) && (PERL_VERSION >= 20)
++ # define Perl_save_strlen dll_Perl_save_strlen
++ # endif
+ # define Perl_stack_grow dll_Perl_stack_grow
+ # define Perl_set_context dll_Perl_set_context
+ # if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
+***************
+*** 311,316 ****
+--- 314,322 ----
+ static void (*Perl_pop_scope)(pTHX);
+ static void (*Perl_push_scope)(pTHX);
+ static void (*Perl_save_int)(pTHX_ int*);
++ #if (PERL_REVISION == 5) && (PERL_VERSION >= 20)
++ static void (*Perl_save_strlen)(pTHX_ STRLEN* ptr);
++ #endif
+ static SV** (*Perl_stack_grow)(pTHX_ SV**, SV**p, int);
+ static SV** (*Perl_set_context)(void*);
+ #if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
+***************
+*** 440,445 ****
+--- 446,454 ----
+ {"Perl_pop_scope", (PERL_PROC*)&Perl_pop_scope},
+ {"Perl_push_scope", (PERL_PROC*)&Perl_push_scope},
+ {"Perl_save_int", (PERL_PROC*)&Perl_save_int},
++ #if (PERL_REVISION == 5) && (PERL_VERSION >= 20)
++ {"Perl_save_strlen", (PERL_PROC*)&Perl_save_strlen},
++ #endif
+ {"Perl_stack_grow", (PERL_PROC*)&Perl_stack_grow},
+ {"Perl_set_context", (PERL_PROC*)&Perl_set_context},
+ #if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
+*** ../vim-7.4.320/src/version.c 2014-06-12 14:01:27.583769788 +0200
+--- src/version.c 2014-06-12 16:02:37.156044806 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 321,
+ /**/
+
+--
+Microsoft's definition of a boolean: TRUE, FALSE, MAYBE
+"Embrace and extend"...?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.322 b/patches/source/vim/patches/7.4.322
new file mode 100644
index 000000000..6c12b6172
--- /dev/null
+++ b/patches/source/vim/patches/7.4.322
@@ -0,0 +1,92 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.322
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.322
+Problem: Using "msgfmt" is hard coded, cannot use "gmsgfmt".
+Solution: Use the msgfmt command found by configure. (Danek Duvall)
+Files: src/config.mk.in, src/po/Makefile
+
+
+*** ../vim-7.4.321/src/config.mk.in 2010-11-03 22:26:24.000000000 +0100
+--- src/config.mk.in 2014-06-12 17:41:12.892268607 +0200
+***************
+*** 164,169 ****
+--- 164,171 ----
+ ### If the *.po files are to be translated to *.mo files.
+ MAKEMO = @MAKEMO@
+
++ MSGFMT = @MSGFMT@
++
+ # Make sure that "make first" will run "make all" once configure has done its
+ # work. This is needed when using the Makefile in the top directory.
+ first: all
+*** ../vim-7.4.321/src/po/Makefile 2013-06-23 13:26:12.000000000 +0200
+--- src/po/Makefile 2014-06-12 17:45:19.116277922 +0200
+***************
+*** 1,5 ****
+--- 1,8 ----
+ # Makefile for the Vim message translations.
+
++ # Include stuff found by configure.
++ include ../auto/config.mk
++
+ # TODO make this configurable
+ # Note: ja.sjis, *.cp1250 and zh_CN.cp936 are only for MS-Windows, they are
+ # not installed on Unix
+***************
+*** 133,139 ****
+ # tools 0.10.37, which use a slightly different .po file format that is not
+ # compatible with Solaris (and old gettext implementations) unless these are
+ # set. gettext 0.10.36 will not work!
+! MSGFMT = OLD_PO_FILE_INPUT=yes msgfmt -v
+ XGETTEXT = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes xgettext
+ MSGMERGE = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes msgmerge
+
+--- 136,142 ----
+ # tools 0.10.37, which use a slightly different .po file format that is not
+ # compatible with Solaris (and old gettext implementations) unless these are
+ # set. gettext 0.10.36 will not work!
+! MSGFMTCMD = OLD_PO_FILE_INPUT=yes $(MSGFMT) -v
+ XGETTEXT = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes xgettext
+ MSGMERGE = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes msgmerge
+
+***************
+*** 142,148 ****
+ .PHONY: all install uninstall prefixcheck converted check clean checkclean distclean update-po $(LANGUAGES) $(CONVERTED)
+
+ .po.mo:
+! $(MSGFMT) -o $@ $<
+
+ .po.ck:
+ $(VIM) -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq $<
+--- 145,151 ----
+ .PHONY: all install uninstall prefixcheck converted check clean checkclean distclean update-po $(LANGUAGES) $(CONVERTED)
+
+ .po.mo:
+! $(MSGFMTCMD) -o $@ $<
+
+ .po.ck:
+ $(VIM) -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq $<
+*** ../vim-7.4.321/src/version.c 2014-06-12 16:03:24.268046589 +0200
+--- src/version.c 2014-06-12 17:42:27.584271433 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 322,
+ /**/
+
+--
+If I tell you "you have a beautiful body", would you hold it against me?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.323 b/patches/source/vim/patches/7.4.323
new file mode 100644
index 000000000..3faac9c69
--- /dev/null
+++ b/patches/source/vim/patches/7.4.323
@@ -0,0 +1,96 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.323
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.323
+Problem: Substitute() with zero width pattern breaks multi-byte character.
+Solution: Take multi-byte character size into account. (Yukihiro Nakadaira)
+Files: src/eval.c src/testdir/test69.in, src/testdir/test69.ok
+
+
+*** ../vim-7.4.322/src/eval.c 2014-05-28 20:31:37.496292805 +0200
+--- src/eval.c 2014-06-12 18:34:22.928389291 +0200
+***************
+*** 24848,24855 ****
+ if (zero_width == regmatch.startp[0])
+ {
+ /* avoid getting stuck on a match with an empty string */
+! *((char_u *)ga.ga_data + ga.ga_len) = *tail++;
+! ++ga.ga_len;
+ continue;
+ }
+ zero_width = regmatch.startp[0];
+--- 24848,24858 ----
+ if (zero_width == regmatch.startp[0])
+ {
+ /* avoid getting stuck on a match with an empty string */
+! i = MB_PTR2LEN(tail);
+! mch_memmove((char_u *)ga.ga_data + ga.ga_len, tail,
+! (size_t)i);
+! ga.ga_len += i;
+! tail += i;
+ continue;
+ }
+ zero_width = regmatch.startp[0];
+*** ../vim-7.4.322/src/testdir/test69.in 2014-02-22 23:49:30.268896843 +0100
+--- src/testdir/test69.in 2014-06-12 18:32:43.108385514 +0200
+***************
+*** 180,185 ****
+--- 180,192 ----
+ byteidxcomp
+
+ STARTTEST
++ /^substitute
++ :let y = substitute('123', '\zs', 'a', 'g') | put =y
++ ENDTEST
++
++ substitute
++
++ STARTTEST
+ :g/^STARTTEST/.,/^ENDTEST/d
+ :1;/^Results/,$wq! test.out
+ ENDTEST
+*** ../vim-7.4.322/src/testdir/test69.ok 2014-02-22 23:49:30.268896843 +0100
+--- src/testdir/test69.ok 2014-06-12 18:32:43.108385514 +0200
+***************
+*** 160,162 ****
+--- 160,166 ----
+ [0, 1, 3, 4, -1]
+ [0, 1, 2, 4, 5, -1]
+
++
++ substitute
++ a1a2a3a
++
+*** ../vim-7.4.322/src/version.c 2014-06-12 18:03:24.940319000 +0200
+--- src/version.c 2014-06-12 18:32:08.356384200 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 323,
+ /**/
+
+--
+ When danger reared its ugly head,
+ He bravely turned his tail and fled
+ Yes, Brave Sir Robin turned about
+ And gallantly he chickened out
+ Bravely taking to his feet
+ He beat a very brave retreat
+ Bravest of the brave Sir Robin
+ Petrified of being dead
+ Soiled his pants then brave Sir Robin
+ Turned away and fled.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.324 b/patches/source/vim/patches/7.4.324
new file mode 100644
index 000000000..7418d06b7
--- /dev/null
+++ b/patches/source/vim/patches/7.4.324
@@ -0,0 +1,190 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.324
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.324
+Problem: In Ex mode, cyrillic characters are not handled. (Stas Malavin)
+Solution: Support multi-byte characters in Ex mode. (Yukihiro Nakadaira)
+Files: src/ex_getln.c
+
+
+*** ../vim-7.4.323/src/ex_getln.c 2014-05-29 14:36:26.156862577 +0200
+--- src/ex_getln.c 2014-06-12 19:33:10.440522741 +0200
+***************
+*** 2188,2193 ****
+--- 2188,2194 ----
+ int vcol = 0;
+ char_u *p;
+ int prev_char;
++ int len;
+
+ /* Switch cursor on now. This avoids that it happens after the "\n", which
+ * confuses the system function that computes tabstops. */
+***************
+*** 2264,2270 ****
+ {
+ if (line_ga.ga_len > 0)
+ {
+! --line_ga.ga_len;
+ goto redraw;
+ }
+ continue;
+--- 2265,2281 ----
+ {
+ if (line_ga.ga_len > 0)
+ {
+! #ifdef FEAT_MBYTE
+! if (has_mbyte)
+! {
+! p = (char_u *)line_ga.ga_data;
+! p[line_ga.ga_len] = NUL;
+! len = (*mb_head_off)(p, p + line_ga.ga_len - 1) + 1;
+! line_ga.ga_len -= len;
+! }
+! else
+! #endif
+! --line_ga.ga_len;
+ goto redraw;
+ }
+ continue;
+***************
+*** 2280,2286 ****
+
+ if (c1 == Ctrl_T)
+ {
+! long sw = get_sw_value(curbuf);
+
+ p = (char_u *)line_ga.ga_data;
+ p[line_ga.ga_len] = NUL;
+--- 2291,2297 ----
+
+ if (c1 == Ctrl_T)
+ {
+! long sw = get_sw_value(curbuf);
+
+ p = (char_u *)line_ga.ga_data;
+ p[line_ga.ga_len] = NUL;
+***************
+*** 2300,2307 ****
+ /* redraw the line */
+ msg_col = startcol;
+ vcol = 0;
+! for (p = (char_u *)line_ga.ga_data;
+! p < (char_u *)line_ga.ga_data + line_ga.ga_len; ++p)
+ {
+ if (*p == TAB)
+ {
+--- 2311,2319 ----
+ /* redraw the line */
+ msg_col = startcol;
+ vcol = 0;
+! p = (char_u *)line_ga.ga_data;
+! p[line_ga.ga_len] = NUL;
+! while (p < (char_u *)line_ga.ga_data + line_ga.ga_len)
+ {
+ if (*p == TAB)
+ {
+***************
+*** 2309,2319 ****
+ {
+ msg_putchar(' ');
+ } while (++vcol % 8);
+ }
+ else
+ {
+! msg_outtrans_len(p, 1);
+! vcol += char2cells(*p);
+ }
+ }
+ msg_clr_eos();
+--- 2321,2334 ----
+ {
+ msg_putchar(' ');
+ } while (++vcol % 8);
++ ++p;
+ }
+ else
+ {
+! len = MB_PTR2LEN(p);
+! msg_outtrans_len(p, len);
+! vcol += ptr2cells(p);
+! p += len;
+ }
+ }
+ msg_clr_eos();
+***************
+*** 2362,2368 ****
+
+ if (IS_SPECIAL(c1))
+ c1 = '?';
+! ((char_u *)line_ga.ga_data)[line_ga.ga_len] = c1;
+ if (c1 == '\n')
+ msg_putchar('\n');
+ else if (c1 == TAB)
+--- 2377,2392 ----
+
+ if (IS_SPECIAL(c1))
+ c1 = '?';
+! #ifdef FEAT_MBYTE
+! if (has_mbyte)
+! len = (*mb_char2bytes)(c1,
+! (char_u *)line_ga.ga_data + line_ga.ga_len);
+! else
+! #endif
+! {
+! len = 1;
+! ((char_u *)line_ga.ga_data)[line_ga.ga_len] = c1;
+! }
+ if (c1 == '\n')
+ msg_putchar('\n');
+ else if (c1 == TAB)
+***************
+*** 2376,2385 ****
+ else
+ {
+ msg_outtrans_len(
+! ((char_u *)line_ga.ga_data) + line_ga.ga_len, 1);
+ vcol += char2cells(c1);
+ }
+! ++line_ga.ga_len;
+ escaped = FALSE;
+
+ windgoto(msg_row, msg_col);
+--- 2400,2409 ----
+ else
+ {
+ msg_outtrans_len(
+! ((char_u *)line_ga.ga_data) + line_ga.ga_len, len);
+ vcol += char2cells(c1);
+ }
+! line_ga.ga_len += len;
+ escaped = FALSE;
+
+ windgoto(msg_row, msg_col);
+*** ../vim-7.4.323/src/version.c 2014-06-12 18:39:16.828400409 +0200
+--- src/version.c 2014-06-12 19:37:40.296532950 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 324,
+ /**/
+
+--
+ZOOT: I'm afraid our life must seem very dull and quiet compared to yours.
+ We are but eightscore young blondes, all between sixteen and
+ nineteen-and-a-half, cut off in this castle, with no one to protect us.
+ Oooh. It is a lonely life ... bathing ... dressing ... undressing ...
+ making exciting underwear....
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.325 b/patches/source/vim/patches/7.4.325
new file mode 100644
index 000000000..5482a1ddb
--- /dev/null
+++ b/patches/source/vim/patches/7.4.325
@@ -0,0 +1,62 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.325
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.325
+Problem: When starting the gui and changing the window size the status line
+ may not be drawn correctly.
+Solution: Catch new_win_height() being called recursively. (Christian
+ Brabandt)
+Files: src/window.c
+
+
+*** ../vim-7.4.324/src/window.c 2014-06-12 14:01:27.579769788 +0200
+--- src/window.c 2014-06-13 20:04:59.051863582 +0200
+***************
+*** 5660,5666 ****
+ if (wp->w_height > 0)
+ {
+ if (wp == curwin)
+! validate_cursor(); /* w_wrow needs to be valid */
+ if (wp->w_wrow != wp->w_prev_fraction_row)
+ set_fraction(wp);
+ }
+--- 5660,5671 ----
+ if (wp->w_height > 0)
+ {
+ if (wp == curwin)
+! /* w_wrow needs to be valid. When setting 'laststatus' this may
+! * call win_new_height() recursively. */
+! validate_cursor();
+! if (wp->w_height != prev_height)
+! return; /* Recursive call already changed the size, bail out here
+! to avoid the following to mess things up. */
+ if (wp->w_wrow != wp->w_prev_fraction_row)
+ set_fraction(wp);
+ }
+*** ../vim-7.4.324/src/version.c 2014-06-12 19:44:45.324549030 +0200
+--- src/version.c 2014-06-13 20:06:12.947866378 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 325,
+ /**/
+
+--
+DINGO: And after the spanking ... the oral sex.
+GALAHAD: Oh, dear! Well, I...
+GIRLS: The oral sex ... The oral sex.
+GALAHAD: Well, I suppose I could stay a BIT longer.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.326 b/patches/source/vim/patches/7.4.326
new file mode 100644
index 000000000..da62b68c1
--- /dev/null
+++ b/patches/source/vim/patches/7.4.326
@@ -0,0 +1,51 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.326
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.326
+Problem: Can't build Tiny version. (Elimar Riesebieter)
+Solution: Add #ifdef.
+Files: src/window.c
+
+
+*** ../vim-7.4.325/src/window.c 2014-06-13 20:08:41.295871990 +0200
+--- src/window.c 2014-06-14 12:51:00.010147123 +0200
+***************
+*** 4597,4608 ****
+--- 4597,4610 ----
+ if (wp != aucmd_win)
+ #endif
+ win_remove(wp, tp);
++ #ifdef FEAT_AUTOCMD
+ if (autocmd_busy)
+ {
+ wp->w_next = au_pending_free_win;
+ au_pending_free_win = wp;
+ }
+ else
++ #endif
+ vim_free(wp);
+
+ #ifdef FEAT_AUTOCMD
+*** ../vim-7.4.325/src/version.c 2014-06-13 20:08:41.295871990 +0200
+--- src/version.c 2014-06-14 12:53:05.134151857 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 326,
+ /**/
+
+--
+You cannot propel yourself forward by patting yourself on the back.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.327 b/patches/source/vim/patches/7.4.327
new file mode 100644
index 000000000..a797dd7ec
--- /dev/null
+++ b/patches/source/vim/patches/7.4.327
@@ -0,0 +1,163 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.327
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.327
+Problem: When 'verbose' is set to display the return value of a function,
+ may get E724 repeatedly.
+Solution: Do not give an error for verbose messages. Abort conversion to
+ string after an error.
+Files: src/eval.c
+
+
+*** ../vim-7.4.326/src/eval.c 2014-06-12 18:39:16.828400409 +0200
+--- src/eval.c 2014-06-17 12:48:12.083946675 +0200
+***************
+*** 134,139 ****
+--- 134,142 ----
+ #define COPYID_INC 2
+ #define COPYID_MASK (~0x1)
+
++ /* Abort conversion to string after a recursion error. */
++ static int did_echo_string_emsg = FALSE;
++
+ /*
+ * Array to hold the hashtab with variables local to each sourced script.
+ * Each item holds a variable (nameless) that points to the dict_T.
+***************
+*** 6686,6691 ****
+--- 6689,6696 ----
+ }
+
+ line_breakcheck();
++ if (did_echo_string_emsg) /* recursion error, bail out */
++ break;
+ }
+
+ /* Allocate result buffer with its total size, avoid re-allocation and
+***************
+*** 7460,7467 ****
+ if (s != NULL)
+ ga_concat(&ga, s);
+ vim_free(tofree);
+! if (s == NULL)
+ break;
+ }
+ }
+ if (todo > 0)
+--- 7465,7474 ----
+ if (s != NULL)
+ ga_concat(&ga, s);
+ vim_free(tofree);
+! if (s == NULL || did_echo_string_emsg)
+ break;
++ line_breakcheck();
++
+ }
+ }
+ if (todo > 0)
+***************
+*** 7619,7627 ****
+
+ if (recurse >= DICT_MAXNEST)
+ {
+! EMSG(_("E724: variable nested too deep for displaying"));
+ *tofree = NULL;
+! return NULL;
+ }
+ ++recurse;
+
+--- 7626,7641 ----
+
+ if (recurse >= DICT_MAXNEST)
+ {
+! if (!did_echo_string_emsg)
+! {
+! /* Only give this message once for a recursive call to avoid
+! * flooding the user with errors. And stop iterating over lists
+! * and dicts. */
+! did_echo_string_emsg = TRUE;
+! EMSG(_("E724: variable nested too deep for displaying"));
+! }
+ *tofree = NULL;
+! return (char_u *)"{E724}";
+ }
+ ++recurse;
+
+***************
+*** 7689,7695 ****
+ *tofree = NULL;
+ }
+
+! --recurse;
+ return r;
+ }
+
+--- 7703,7710 ----
+ *tofree = NULL;
+ }
+
+! if (--recurse == 0)
+! did_echo_string_emsg = FALSE;
+ return r;
+ }
+
+***************
+*** 23303,23309 ****
+--- 23318,23327 ----
+ msg_outnum((long)argvars[i].vval.v_number);
+ else
+ {
++ /* Do not want errors such as E724 here. */
++ ++emsg_off;
+ s = tv2string(&argvars[i], &tofree, numbuf2, 0);
++ --emsg_off;
+ if (s != NULL)
+ {
+ if (vim_strsize(s) > MSG_BUF_CLEN)
+***************
+*** 23395,23402 ****
+
+ /* The value may be very long. Skip the middle part, so that we
+ * have some idea how it starts and ends. smsg() would always
+! * truncate it at the end. */
+ s = tv2string(fc->rettv, &tofree, numbuf2, 0);
+ if (s != NULL)
+ {
+ if (vim_strsize(s) > MSG_BUF_CLEN)
+--- 23413,23422 ----
+
+ /* The value may be very long. Skip the middle part, so that we
+ * have some idea how it starts and ends. smsg() would always
+! * truncate it at the end. Don't want errors such as E724 here. */
+! ++emsg_off;
+ s = tv2string(fc->rettv, &tofree, numbuf2, 0);
++ --emsg_off;
+ if (s != NULL)
+ {
+ if (vim_strsize(s) > MSG_BUF_CLEN)
+*** ../vim-7.4.326/src/version.c 2014-06-14 12:53:27.394152699 +0200
+--- src/version.c 2014-06-17 12:41:45.019932032 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 327,
+ /**/
+
+--
+TALL KNIGHT: We shall say Ni! again to you if you do not appease us.
+ARTHUR: All right! What do you want?
+TALL KNIGHT: We want ... a shrubbery!
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.328 b/patches/source/vim/patches/7.4.328
new file mode 100644
index 000000000..d1f8c493b
--- /dev/null
+++ b/patches/source/vim/patches/7.4.328
@@ -0,0 +1,82 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.328
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.328
+Problem: Selection of inner block is inconsistent.
+Solution: Skip indent not only for '}' but all parens. (Tom McDonald)
+Files: src/search.c
+
+
+*** ../vim-7.4.327/src/search.c 2014-03-23 15:12:29.935264336 +0100
+--- src/search.c 2014-06-17 12:37:49.075923106 +0200
+***************
+*** 3608,3628 ****
+
+ /*
+ * Try to exclude the '(', '{', ')', '}', etc. when "include" is FALSE.
+! * If the ending '}' is only preceded by indent, skip that indent.
+! * But only if the resulting area is not smaller than what we started with.
+ */
+ while (!include)
+ {
+ incl(&start_pos);
+ sol = (curwin->w_cursor.col == 0);
+ decl(&curwin->w_cursor);
+! if (what == '{')
+! while (inindent(1))
+! {
+! sol = TRUE;
+! if (decl(&curwin->w_cursor) != 0)
+! break;
+! }
+ /*
+ * In Visual mode, when the resulting area is not bigger than what we
+ * started with, extend it to the next block, and then exclude again.
+--- 3608,3629 ----
+
+ /*
+ * Try to exclude the '(', '{', ')', '}', etc. when "include" is FALSE.
+! * If the ending '}', ')' or ']' is only preceded by indent, skip that
+! * indent. But only if the resulting area is not smaller than what we
+! * started with.
+ */
+ while (!include)
+ {
+ incl(&start_pos);
+ sol = (curwin->w_cursor.col == 0);
+ decl(&curwin->w_cursor);
+! while (inindent(1))
+! {
+! sol = TRUE;
+! if (decl(&curwin->w_cursor) != 0)
+! break;
+! }
+!
+ /*
+ * In Visual mode, when the resulting area is not bigger than what we
+ * started with, extend it to the next block, and then exclude again.
+*** ../vim-7.4.327/src/version.c 2014-06-17 12:51:13.207953527 +0200
+--- src/version.c 2014-06-17 12:52:35.279956632 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 328,
+ /**/
+
+--
+FATHER: One day, lad, all this will be yours ...
+PRINCE: What - the curtains?
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.329 b/patches/source/vim/patches/7.4.329
new file mode 100644
index 000000000..0fd9bad8d
--- /dev/null
+++ b/patches/source/vim/patches/7.4.329
@@ -0,0 +1,55 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.329
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.329
+Problem: When moving the cursor and then switching to another window the
+ previous window isn't scrolled. (Yukihiro Nakadaira)
+Solution: Call update_topline() before leaving the window. (Christian
+ Brabandt)
+Files: src/window.c
+
+
+*** ../vim-7.4.328/src/window.c 2014-06-14 12:53:27.394152699 +0200
+--- src/window.c 2014-06-17 13:44:48.812075178 +0200
+***************
+*** 4250,4255 ****
+--- 4250,4260 ----
+ /* sync undo before leaving the current buffer */
+ if (undo_sync && curbuf != wp->w_buffer)
+ u_sync(FALSE);
++
++ /* Might need to scroll the old window before switching, e.g., when the
++ * cursor was moved. */
++ update_topline();
++
+ /* may have to copy the buffer options when 'cpo' contains 'S' */
+ if (wp->w_buffer != curbuf)
+ buf_copy_options(wp->w_buffer, BCO_ENTER | BCO_NOHELP);
+*** ../vim-7.4.328/src/version.c 2014-06-17 13:50:06.148087184 +0200
+--- src/version.c 2014-06-17 13:51:09.960089598 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 329,
+ /**/
+
+--
+FATHER: Make sure the Prince doesn't leave this room until I come and
+ get him.
+FIRST GUARD: Not ... to leave the room ... even if you come and get him.
+FATHER: No. Until I come and get him.
+SECOND GUARD: Hic.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.330 b/patches/source/vim/patches/7.4.330
new file mode 100644
index 000000000..360d20c43
--- /dev/null
+++ b/patches/source/vim/patches/7.4.330
@@ -0,0 +1,1131 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.330
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.330
+Problem: Using a regexp pattern to highlight a specific position can be
+ slow.
+Solution: Add matchaddpos() to highlight specific positions efficiently.
+ (Alexey Radkov)
+Files: runtime/doc/eval.txt, runtime/doc/usr_41.txt,
+ runtime/plugin/matchparen.vim, src/eval.c, src/ex_docmd.c,
+ src/proto/window.pro, src/screen.c, src/structs.h,
+ src/testdir/test63.in, src/testdir/test63.ok, src/window.c
+
+
+*** ../vim-7.4.329/runtime/doc/eval.txt 2014-05-28 20:31:37.500292805 +0200
+--- runtime/doc/eval.txt 2014-06-17 16:31:35.572453748 +0200
+***************
+*** 1887,1892 ****
+--- 1887,1894 ----
+ Number position where {pat} matches in {expr}
+ matchadd( {group}, {pattern}[, {priority}[, {id}]])
+ Number highlight {pattern} with {group}
++ matchaddpos( {group}, {list}[, {priority}[, {id}]])
++ Number highlight positions with {group}
+ matcharg( {nr}) List arguments of |:match|
+ matchdelete( {id}) Number delete match identified by {id}
+ matchend( {expr}, {pat}[, {start}[, {count}]])
+***************
+*** 4342,4347 ****
+--- 4382,4422 ----
+ available from |getmatches()|. All matches can be deleted in
+ one operation by |clearmatches()|.
+
++ matchaddpos({group}, {pos}[, {priority}[, {id}]]) *matchaddpos()*
++ Same as |matchadd()|, but requires a list of positions {pos}
++ instead of a pattern. This command is faster than |matchadd()|
++ because it does not require to handle regular expressions and
++ sets buffer line boundaries to redraw screen. It is supposed
++ to be used when fast match additions and deletions are
++ required, for example to highlight matching parentheses.
++
++ The list {pos} can contain one of these items:
++ - A number. This while line will be highlighted. The first
++ line has number 1.
++ - A list with one number, e.g., [23]. The whole line with this
++ number will be highlighted.
++ - A list with two numbers, e.g., [23, 11]. The first number is
++ the line number, the second one the column number (first
++ column is 1). The character at this position will be
++ highlighted.
++ - A list with three numbers, e.g., [23, 11, 3]. As above, but
++ the third number gives the length of the highlight in screen
++ cells.
++
++ The maximum number of positions is 8.
++
++ Example: >
++ :highlight MyGroup ctermbg=green guibg=green
++ :let m = matchaddpos("MyGroup", [[23, 24], 34])
++ < Deletion of the pattern: >
++ :call matchdelete(m)
++
++ < Matches added by |matchaddpos()| are returned by
++ |getmatches()| with an entry "pos1", "pos2", etc., with the
++ value a list like the {pos} item.
++ These matches cannot be set via |setmatches()|, however they
++ can still be deleted by |clearmatches()|.
++
+ matcharg({nr}) *matcharg()*
+ Selects the {nr} match item, as set with a |:match|,
+ |:2match| or |:3match| command.
+*** ../vim-7.4.329/runtime/doc/usr_41.txt 2014-05-28 18:22:37.872225054 +0200
+--- runtime/doc/usr_41.txt 2014-06-17 14:06:44.836124965 +0200
+***************
+*** 824,829 ****
+--- 827,833 ----
+ synconcealed() get info about concealing
+ diff_hlID() get highlight ID for diff mode at a position
+ matchadd() define a pattern to highlight (a "match")
++ matchaddpos() define a list of positions to highlight
+ matcharg() get info about |:match| arguments
+ matchdelete() delete a match defined by |matchadd()| or a
+ |:match| command
+*** ../vim-7.4.329/runtime/plugin/matchparen.vim 2013-05-08 05:15:53.000000000 +0200
+--- runtime/plugin/matchparen.vim 2014-06-17 14:14:45.712143158 +0200
+***************
+*** 1,6 ****
+ " Vim plugin for showing matching parens
+ " Maintainer: Bram Moolenaar <Bram@vim.org>
+! " Last Change: 2013 May 08
+
+ " Exit quickly when:
+ " - this plugin was already loaded (or disabled)
+--- 1,6 ----
+ " Vim plugin for showing matching parens
+ " Maintainer: Bram Moolenaar <Bram@vim.org>
+! " Last Change: 2014 Jun 17
+
+ " Exit quickly when:
+ " - this plugin was already loaded (or disabled)
+***************
+*** 39,45 ****
+ function! s:Highlight_Matching_Pair()
+ " Remove any previous match.
+ if exists('w:paren_hl_on') && w:paren_hl_on
+! 3match none
+ let w:paren_hl_on = 0
+ endif
+
+--- 39,45 ----
+ function! s:Highlight_Matching_Pair()
+ " Remove any previous match.
+ if exists('w:paren_hl_on') && w:paren_hl_on
+! silent! call matchdelete(3)
+ let w:paren_hl_on = 0
+ endif
+
+***************
+*** 152,165 ****
+
+ " If a match is found setup match highlighting.
+ if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom
+! exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) .
+! \ 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/'
+ let w:paren_hl_on = 1
+ endif
+ endfunction
+
+ " Define commands that will disable and enable the plugin.
+! command! NoMatchParen windo 3match none | unlet! g:loaded_matchparen |
+ \ au! matchparen
+ command! DoMatchParen runtime plugin/matchparen.vim | windo doau CursorMoved
+
+--- 152,169 ----
+
+ " If a match is found setup match highlighting.
+ if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom
+! if exists('*matchaddpos')
+! call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3)
+! else
+! exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) .
+! \ 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/'
+! endif
+ let w:paren_hl_on = 1
+ endif
+ endfunction
+
+ " Define commands that will disable and enable the plugin.
+! command! NoMatchParen windo silent! call matchdelete(3) | unlet! g:loaded_matchparen |
+ \ au! matchparen
+ command! DoMatchParen runtime plugin/matchparen.vim | windo doau CursorMoved
+
+*** ../vim-7.4.329/src/eval.c 2014-06-17 12:51:13.207953527 +0200
+--- src/eval.c 2014-06-17 17:02:25.388523729 +0200
+***************
+*** 622,627 ****
+--- 622,628 ----
+ static void f_mapcheck __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_match __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_matchadd __ARGS((typval_T *argvars, typval_T *rettv));
++ static void f_matchaddpos __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_matcharg __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_matchdelete __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_matchend __ARGS((typval_T *argvars, typval_T *rettv));
+***************
+*** 8054,8059 ****
+--- 8055,8061 ----
+ {"mapcheck", 1, 3, f_mapcheck},
+ {"match", 2, 4, f_match},
+ {"matchadd", 2, 4, f_matchadd},
++ {"matchaddpos", 2, 4, f_matchaddpos},
+ {"matcharg", 1, 1, f_matcharg},
+ {"matchdelete", 1, 1, f_matchdelete},
+ {"matchend", 2, 4, f_matchend},
+***************
+*** 11767,11772 ****
+--- 11769,11775 ----
+ #ifdef FEAT_SEARCH_EXTRA
+ dict_T *dict;
+ matchitem_T *cur = curwin->w_match_head;
++ int i;
+
+ if (rettv_list_alloc(rettv) == OK)
+ {
+***************
+*** 11775,11782 ****
+ dict = dict_alloc();
+ if (dict == NULL)
+ return;
+ dict_add_nr_str(dict, "group", 0L, syn_id2name(cur->hlg_id));
+- dict_add_nr_str(dict, "pattern", 0L, cur->pattern);
+ dict_add_nr_str(dict, "priority", (long)cur->priority, NULL);
+ dict_add_nr_str(dict, "id", (long)cur->id, NULL);
+ list_append_dict(rettv->vval.v_list, dict);
+--- 11778,11813 ----
+ dict = dict_alloc();
+ if (dict == NULL)
+ return;
++ if (cur->match.regprog == NULL)
++ {
++ /* match added with matchaddpos() */
++ for (i = 0; i < MAXPOSMATCH; ++i)
++ {
++ llpos_T *llpos;
++ char buf[6];
++ list_T *l;
++
++ llpos = &cur->pos.pos[i];
++ if (llpos->lnum == 0)
++ break;
++ l = list_alloc();
++ if (l == NULL)
++ break;
++ list_append_number(l, (varnumber_T)llpos->lnum);
++ if (llpos->col > 0)
++ {
++ list_append_number(l, (varnumber_T)llpos->col);
++ list_append_number(l, (varnumber_T)llpos->len);
++ }
++ sprintf(buf, "pos%d", i + 1);
++ dict_add_list(dict, buf, l);
++ }
++ }
++ else
++ {
++ dict_add_nr_str(dict, "pattern", 0L, cur->pattern);
++ }
+ dict_add_nr_str(dict, "group", 0L, syn_id2name(cur->hlg_id));
+ dict_add_nr_str(dict, "priority", (long)cur->priority, NULL);
+ dict_add_nr_str(dict, "id", (long)cur->id, NULL);
+ list_append_dict(rettv->vval.v_list, dict);
+***************
+*** 14313,14319 ****
+ return;
+ }
+
+! rettv->vval.v_number = match_add(curwin, grp, pat, prio, id);
+ #endif
+ }
+
+--- 14344,14401 ----
+ return;
+ }
+
+! rettv->vval.v_number = match_add(curwin, grp, pat, prio, id, NULL);
+! #endif
+! }
+!
+! /*
+! * "matchaddpos()" function
+! */
+! static void
+! f_matchaddpos(argvars, rettv)
+! typval_T *argvars UNUSED;
+! typval_T *rettv UNUSED;
+! {
+! #ifdef FEAT_SEARCH_EXTRA
+! char_u buf[NUMBUFLEN];
+! char_u *group;
+! int prio = 10;
+! int id = -1;
+! int error = FALSE;
+! list_T *l;
+!
+! rettv->vval.v_number = -1;
+!
+! group = get_tv_string_buf_chk(&argvars[0], buf);
+! if (group == NULL)
+! return;
+!
+! if (argvars[1].v_type != VAR_LIST)
+! {
+! EMSG2(_(e_listarg), "matchaddpos()");
+! return;
+! }
+! l = argvars[1].vval.v_list;
+! if (l == NULL)
+! return;
+!
+! if (argvars[2].v_type != VAR_UNKNOWN)
+! {
+! prio = get_tv_number_chk(&argvars[2], &error);
+! if (argvars[3].v_type != VAR_UNKNOWN)
+! id = get_tv_number_chk(&argvars[3], &error);
+! }
+! if (error == TRUE)
+! return;
+!
+! /* id == 3 is ok because matchaddpos() is supposed to substitute :3match */
+! if (id == 1 || id == 2)
+! {
+! EMSGN("E798: ID is reserved for \":match\": %ld", id);
+! return;
+! }
+!
+! rettv->vval.v_number = match_add(curwin, group, NULL, prio, id, l);
+ #endif
+ }
+
+***************
+*** 16816,16822 ****
+ match_add(curwin, get_dict_string(d, (char_u *)"group", FALSE),
+ get_dict_string(d, (char_u *)"pattern", FALSE),
+ (int)get_dict_number(d, (char_u *)"priority"),
+! (int)get_dict_number(d, (char_u *)"id"));
+ li = li->li_next;
+ }
+ rettv->vval.v_number = 0;
+--- 16898,16904 ----
+ match_add(curwin, get_dict_string(d, (char_u *)"group", FALSE),
+ get_dict_string(d, (char_u *)"pattern", FALSE),
+ (int)get_dict_number(d, (char_u *)"priority"),
+! (int)get_dict_number(d, (char_u *)"id"), NULL);
+ li = li->li_next;
+ }
+ rettv->vval.v_number = 0;
+*** ../vim-7.4.329/src/ex_docmd.c 2014-05-28 18:22:37.876225054 +0200
+--- src/ex_docmd.c 2014-06-17 14:06:44.844124966 +0200
+***************
+*** 11489,11495 ****
+
+ c = *end;
+ *end = NUL;
+! match_add(curwin, g, p + 1, 10, id);
+ vim_free(g);
+ *end = c;
+ }
+--- 11489,11495 ----
+
+ c = *end;
+ *end = NUL;
+! match_add(curwin, g, p + 1, 10, id, NULL);
+ vim_free(g);
+ *end = c;
+ }
+*** ../vim-7.4.329/src/proto/window.pro 2013-08-14 17:11:14.000000000 +0200
+--- src/proto/window.pro 2014-06-17 14:06:44.844124966 +0200
+***************
+*** 75,81 ****
+ void switch_buffer __ARGS((buf_T **save_curbuf, buf_T *buf));
+ void restore_buffer __ARGS((buf_T *save_curbuf));
+ int win_hasvertsplit __ARGS((void));
+! int match_add __ARGS((win_T *wp, char_u *grp, char_u *pat, int prio, int id));
+ int match_delete __ARGS((win_T *wp, int id, int perr));
+ void clear_matches __ARGS((win_T *wp));
+ matchitem_T *get_match __ARGS((win_T *wp, int id));
+--- 75,81 ----
+ void switch_buffer __ARGS((buf_T **save_curbuf, buf_T *buf));
+ void restore_buffer __ARGS((buf_T *save_curbuf));
+ int win_hasvertsplit __ARGS((void));
+! int match_add __ARGS((win_T *wp, char_u *grp, char_u *pat, int prio, int id, list_T *pos));
+ int match_delete __ARGS((win_T *wp, int id, int perr));
+ void clear_matches __ARGS((win_T *wp));
+ matchitem_T *get_match __ARGS((win_T *wp, int id));
+*** ../vim-7.4.329/src/screen.c 2014-05-28 21:40:47.092329130 +0200
+--- src/screen.c 2014-06-17 17:04:08.064527614 +0200
+***************
+*** 144,150 ****
+ static void end_search_hl __ARGS((void));
+ static void init_search_hl __ARGS((win_T *wp));
+ static void prepare_search_hl __ARGS((win_T *wp, linenr_T lnum));
+! static void next_search_hl __ARGS((win_T *win, match_T *shl, linenr_T lnum, colnr_T mincol));
+ #endif
+ static void screen_start_highlight __ARGS((int attr));
+ static void screen_char __ARGS((unsigned off, int row, int col));
+--- 144,151 ----
+ static void end_search_hl __ARGS((void));
+ static void init_search_hl __ARGS((win_T *wp));
+ static void prepare_search_hl __ARGS((win_T *wp, linenr_T lnum));
+! static void next_search_hl __ARGS((win_T *win, match_T *shl, linenr_T lnum, colnr_T mincol, matchitem_T *cur));
+! static int next_search_hl_pos __ARGS((match_T *shl, linenr_T lnum, posmatch_T *pos, colnr_T mincol));
+ #endif
+ static void screen_start_highlight __ARGS((int attr));
+ static void screen_char __ARGS((unsigned off, int row, int col));
+***************
+*** 2929,2934 ****
+--- 2930,2937 ----
+ match_T *shl; /* points to search_hl or a match */
+ int shl_flag; /* flag to indicate whether search_hl
+ has been processed or not */
++ int pos_inprogress; /* marks that position match search is
++ in progress */
+ int prevcol_hl_flag; /* flag to indicate whether prevcol
+ equals startcol of search_hl or one
+ of the matches */
+***************
+*** 3439,3482 ****
+ shl->startcol = MAXCOL;
+ shl->endcol = MAXCOL;
+ shl->attr_cur = 0;
+! if (shl->rm.regprog != NULL)
+! {
+! v = (long)(ptr - line);
+! next_search_hl(wp, shl, lnum, (colnr_T)v);
+!
+! /* Need to get the line again, a multi-line regexp may have made it
+! * invalid. */
+! line = ml_get_buf(wp->w_buffer, lnum, FALSE);
+! ptr = line + v;
+
+! if (shl->lnum != 0 && shl->lnum <= lnum)
+ {
+- if (shl->lnum == lnum)
+- shl->startcol = shl->rm.startpos[0].col;
+- else
+- shl->startcol = 0;
+- if (lnum == shl->lnum + shl->rm.endpos[0].lnum
+- - shl->rm.startpos[0].lnum)
+- shl->endcol = shl->rm.endpos[0].col;
+- else
+- shl->endcol = MAXCOL;
+- /* Highlight one character for an empty match. */
+- if (shl->startcol == shl->endcol)
+- {
+ #ifdef FEAT_MBYTE
+! if (has_mbyte && line[shl->endcol] != NUL)
+! shl->endcol += (*mb_ptr2len)(line + shl->endcol);
+! else
+ #endif
+! ++shl->endcol;
+! }
+! if ((long)shl->startcol < v) /* match at leftcol */
+! {
+! shl->attr_cur = shl->attr;
+! search_attr = shl->attr;
+! }
+! area_highlighting = TRUE;
+ }
+ }
+ if (shl != &search_hl && cur != NULL)
+ cur = cur->next;
+--- 3442,3484 ----
+ shl->startcol = MAXCOL;
+ shl->endcol = MAXCOL;
+ shl->attr_cur = 0;
+! v = (long)(ptr - line);
+! if (cur != NULL)
+! cur->pos.cur = 0;
+! next_search_hl(wp, shl, lnum, (colnr_T)v, cur);
+!
+! /* Need to get the line again, a multi-line regexp may have made it
+! * invalid. */
+! line = ml_get_buf(wp->w_buffer, lnum, FALSE);
+! ptr = line + v;
+
+! if (shl->lnum != 0 && shl->lnum <= lnum)
+! {
+! if (shl->lnum == lnum)
+! shl->startcol = shl->rm.startpos[0].col;
+! else
+! shl->startcol = 0;
+! if (lnum == shl->lnum + shl->rm.endpos[0].lnum
+! - shl->rm.startpos[0].lnum)
+! shl->endcol = shl->rm.endpos[0].col;
+! else
+! shl->endcol = MAXCOL;
+! /* Highlight one character for an empty match. */
+! if (shl->startcol == shl->endcol)
+ {
+ #ifdef FEAT_MBYTE
+! if (has_mbyte && line[shl->endcol] != NUL)
+! shl->endcol += (*mb_ptr2len)(line + shl->endcol);
+! else
+ #endif
+! ++shl->endcol;
+ }
++ if ((long)shl->startcol < v) /* match at leftcol */
++ {
++ shl->attr_cur = shl->attr;
++ search_attr = shl->attr;
++ }
++ area_highlighting = TRUE;
+ }
+ if (shl != &search_hl && cur != NULL)
+ cur = cur->next;
+***************
+*** 3488,3494 ****
+ * when Visual mode is active, because it's not clear what is selected
+ * then. */
+ if (wp->w_p_cul && lnum == wp->w_cursor.lnum
+! && !(wp == curwin && VIsual_active))
+ {
+ line_attr = hl_attr(HLF_CUL);
+ area_highlighting = TRUE;
+--- 3490,3496 ----
+ * when Visual mode is active, because it's not clear what is selected
+ * then. */
+ if (wp->w_p_cul && lnum == wp->w_cursor.lnum
+! && !(wp == curwin && VIsual_active))
+ {
+ line_attr = hl_attr(HLF_CUL);
+ area_highlighting = TRUE;
+***************
+*** 3792,3798 ****
+ }
+ else
+ shl = &cur->hl;
+! while (shl->rm.regprog != NULL)
+ {
+ if (shl->startcol != MAXCOL
+ && v >= (long)shl->startcol
+--- 3794,3804 ----
+ }
+ else
+ shl = &cur->hl;
+! if (cur != NULL)
+! cur->pos.cur = 0;
+! pos_inprogress = TRUE;
+! while (shl->rm.regprog != NULL
+! || (cur != NULL && pos_inprogress))
+ {
+ if (shl->startcol != MAXCOL
+ && v >= (long)shl->startcol
+***************
+*** 3803,3810 ****
+ else if (v == (long)shl->endcol)
+ {
+ shl->attr_cur = 0;
+!
+! next_search_hl(wp, shl, lnum, (colnr_T)v);
+
+ /* Need to get the line again, a multi-line regexp
+ * may have made it invalid. */
+--- 3809,3817 ----
+ else if (v == (long)shl->endcol)
+ {
+ shl->attr_cur = 0;
+! next_search_hl(wp, shl, lnum, (colnr_T)v, cur);
+! pos_inprogress = cur == NULL || cur->pos.cur == 0
+! ? FALSE : TRUE;
+
+ /* Need to get the line again, a multi-line regexp
+ * may have made it invalid. */
+***************
+*** 7277,7282 ****
+--- 7284,7291 ----
+ match_T *shl; /* points to search_hl or a match */
+ int shl_flag; /* flag to indicate whether search_hl
+ has been processed or not */
++ int pos_inprogress; /* marks that position match search is
++ in progress */
+ int n;
+
+ /*
+***************
+*** 7311,7320 ****
+ shl->first_lnum = wp->w_topline;
+ # endif
+ }
+ n = 0;
+! while (shl->first_lnum < lnum && shl->rm.regprog != NULL)
+ {
+! next_search_hl(wp, shl, shl->first_lnum, (colnr_T)n);
+ if (shl->lnum != 0)
+ {
+ shl->first_lnum = shl->lnum
+--- 7320,7335 ----
+ shl->first_lnum = wp->w_topline;
+ # endif
+ }
++ if (cur != NULL)
++ cur->pos.cur = 0;
++ pos_inprogress = TRUE;
+ n = 0;
+! while (shl->first_lnum < lnum && (shl->rm.regprog != NULL
+! || (cur != NULL && pos_inprogress)))
+ {
+! next_search_hl(wp, shl, shl->first_lnum, (colnr_T)n, cur);
+! pos_inprogress = cur == NULL || cur->pos.cur == 0
+! ? FALSE : TRUE;
+ if (shl->lnum != 0)
+ {
+ shl->first_lnum = shl->lnum
+***************
+*** 7343,7353 ****
+ * Careful: Any pointers for buffer lines will become invalid.
+ */
+ static void
+! next_search_hl(win, shl, lnum, mincol)
+! win_T *win;
+! match_T *shl; /* points to search_hl or a match */
+! linenr_T lnum;
+! colnr_T mincol; /* minimal column for a match */
+ {
+ linenr_T l;
+ colnr_T matchcol;
+--- 7358,7369 ----
+ * Careful: Any pointers for buffer lines will become invalid.
+ */
+ static void
+! next_search_hl(win, shl, lnum, mincol, cur)
+! win_T *win;
+! match_T *shl; /* points to search_hl or a match */
+! linenr_T lnum;
+! colnr_T mincol; /* minimal column for a match */
+! matchitem_T *cur; /* to retrieve match postions if any */
+ {
+ linenr_T l;
+ colnr_T matchcol;
+***************
+*** 7415,7440 ****
+ matchcol = shl->rm.endpos[0].col;
+
+ shl->lnum = lnum;
+! nmatched = vim_regexec_multi(&shl->rm, win, shl->buf, lnum, matchcol,
+ #ifdef FEAT_RELTIME
+! &(shl->tm)
+ #else
+! NULL
+ #endif
+! );
+! if (called_emsg || got_int)
+! {
+! /* Error while handling regexp: stop using this regexp. */
+! if (shl == &search_hl)
+ {
+! /* don't free regprog in the match list, it's a copy */
+! vim_regfree(shl->rm.regprog);
+! SET_NO_HLSEARCH(TRUE);
+ }
+! shl->rm.regprog = NULL;
+! shl->lnum = 0;
+! got_int = FALSE; /* avoid the "Type :quit to exit Vim" message */
+! break;
+ }
+ if (nmatched == 0)
+ {
+--- 7431,7465 ----
+ matchcol = shl->rm.endpos[0].col;
+
+ shl->lnum = lnum;
+! if (shl->rm.regprog != NULL)
+! {
+! nmatched = vim_regexec_multi(&shl->rm, win, shl->buf, lnum,
+! matchcol,
+ #ifdef FEAT_RELTIME
+! &(shl->tm)
+ #else
+! NULL
+ #endif
+! );
+! if (called_emsg || got_int)
+ {
+! /* Error while handling regexp: stop using this regexp. */
+! if (shl == &search_hl)
+! {
+! /* don't free regprog in the match list, it's a copy */
+! vim_regfree(shl->rm.regprog);
+! SET_NO_HLSEARCH(TRUE);
+! }
+! shl->rm.regprog = NULL;
+! shl->lnum = 0;
+! got_int = FALSE; /* avoid the "Type :quit to exit Vim"
+! message */
+! break;
+ }
+! }
+! else if (cur != NULL)
+! {
+! nmatched = next_search_hl_pos(shl, lnum, &(cur->pos), matchcol);
+ }
+ if (nmatched == 0)
+ {
+***************
+*** 7453,7458 ****
+--- 7478,7539 ----
+ }
+ #endif
+
++ static int
++ next_search_hl_pos(shl, lnum, posmatch, mincol)
++ match_T *shl; /* points to a match */
++ linenr_T lnum;
++ posmatch_T *posmatch; /* match positions */
++ colnr_T mincol; /* minimal column for a match */
++ {
++ int i;
++ int bot = -1;
++
++ shl->lnum = 0;
++ for (i = posmatch->cur; i < MAXPOSMATCH; i++)
++ {
++ if (posmatch->pos[i].lnum == 0)
++ break;
++ if (posmatch->pos[i].col < mincol)
++ continue;
++ if (posmatch->pos[i].lnum == lnum)
++ {
++ if (shl->lnum == lnum)
++ {
++ /* partially sort positions by column numbers
++ * on the same line */
++ if (posmatch->pos[i].col < posmatch->pos[bot].col)
++ {
++ llpos_T tmp = posmatch->pos[i];
++
++ posmatch->pos[i] = posmatch->pos[bot];
++ posmatch->pos[bot] = tmp;
++ }
++ }
++ else
++ {
++ bot = i;
++ shl->lnum = lnum;
++ }
++ }
++ }
++ posmatch->cur = 0;
++ if (shl->lnum == lnum)
++ {
++ colnr_T start = posmatch->pos[bot].col == 0
++ ? 0 : posmatch->pos[bot].col - 1;
++ colnr_T end = posmatch->pos[bot].col == 0
++ ? MAXCOL : start + posmatch->pos[bot].len;
++
++ shl->rm.startpos[0].lnum = 0;
++ shl->rm.startpos[0].col = start;
++ shl->rm.endpos[0].lnum = 0;
++ shl->rm.endpos[0].col = end;
++ posmatch->cur = bot + 1;
++ return TRUE;
++ }
++ return FALSE;
++ }
++
+ static void
+ screen_start_highlight(attr)
+ int attr;
+*** ../vim-7.4.329/src/structs.h 2014-05-28 18:22:37.876225054 +0200
+--- src/structs.h 2014-06-17 17:00:55.524520330 +0200
+***************
+*** 1927,1932 ****
+--- 1927,1958 ----
+ #endif
+ } match_T;
+
++ /* number of positions supported by matchaddpos() */
++ #define MAXPOSMATCH 8
++
++ /*
++ * Same as lpos_T, but with additional field len.
++ */
++ typedef struct
++ {
++ linenr_T lnum; /* line number */
++ colnr_T col; /* column number */
++ int len; /* length: 0 - to the end of line */
++ } llpos_T;
++
++ /*
++ * posmatch_T provides an array for storing match items for matchaddpos()
++ * function.
++ */
++ typedef struct posmatch posmatch_T;
++ struct posmatch
++ {
++ llpos_T pos[MAXPOSMATCH]; /* array of positions */
++ int cur; /* internal position counter */
++ linenr_T toplnum; /* top buffer line */
++ linenr_T botlnum; /* bottom buffer line */
++ };
++
+ /*
+ * matchitem_T provides a linked list for storing match items for ":match" and
+ * the match functions.
+***************
+*** 1940,1945 ****
+--- 1966,1972 ----
+ char_u *pattern; /* pattern to highlight */
+ int hlg_id; /* highlight group ID */
+ regmmatch_T match; /* regexp program for pattern */
++ posmatch_T pos; /* position matches */
+ match_T hl; /* struct for doing the actual highlighting */
+ };
+
+*** ../vim-7.4.329/src/testdir/test63.in 2010-05-15 13:04:10.000000000 +0200
+--- src/testdir/test63.in 2014-06-17 16:29:36.056449227 +0200
+***************
+*** 1,5 ****
+ Test for ":match", ":2match", ":3match", "clearmatches()", "getmatches()",
+! "matchadd()", "matcharg()", "matchdelete()", and "setmatches()".
+
+ STARTTEST
+ :so small.vim
+--- 1,5 ----
+ Test for ":match", ":2match", ":3match", "clearmatches()", "getmatches()",
+! "matchadd()", "matchaddpos", "matcharg()", "matchdelete()", and "setmatches()".
+
+ STARTTEST
+ :so small.vim
+***************
+*** 147,155 ****
+ :unlet rf1
+ :unlet rf2
+ :unlet rf3
+! :highlight clear MyGroup1
+! :highlight clear MyGroup2
+! :highlight clear MyGroup3
+ G"rp
+ :/^Results/,$wq! test.out
+ ENDTEST
+--- 147,172 ----
+ :unlet rf1
+ :unlet rf2
+ :unlet rf3
+! :" --- Check that "matchaddpos()" positions matches correctly
+! :let @r .= "*** Test 11:\n"
+! :set nolazyredraw
+! :call setline(1, 'abcdefghijklmnopq')
+! :call matchaddpos("MyGroup1", [[1, 5], [1, 8, 3]], 10, 3)
+! :1
+! :redraw!
+! :let v1 = screenattr(1, 1)
+! :let v5 = screenattr(1, 5)
+! :let v6 = screenattr(1, 6)
+! :let v8 = screenattr(1, 8)
+! :let v10 = screenattr(1, 10)
+! :let v11 = screenattr(1, 11)
+! :let @r .= string(getmatches())."\n"
+! :if v1 != v5 && v6 == v1 && v8 == v5 && v10 == v5 && v11 == v1
+! : let @r .= "OK\n"
+! :else
+! : let @r .= "FAILED\n"
+! :endif
+! :call clearmatches()
+ G"rp
+ :/^Results/,$wq! test.out
+ ENDTEST
+*** ../vim-7.4.329/src/testdir/test63.ok 2010-05-15 13:04:10.000000000 +0200
+--- src/testdir/test63.ok 2014-06-17 17:32:57.036593023 +0200
+***************
+*** 9,11 ****
+--- 9,14 ----
+ *** Test 8: OK
+ *** Test 9: OK
+ *** Test 10: OK
++ *** Test 11:
++ [{'group': 'MyGroup1', 'id': 3, 'priority': 10, 'pos1': [1, 5, 1], 'pos2': [1, 8, 3]}]
++ OK
+*** ../vim-7.4.329/src/window.c 2014-06-17 13:52:35.868092848 +0200
+--- src/window.c 2014-06-17 17:04:51.060529240 +0200
+***************
+*** 6751,6770 ****
+ * Return ID of added match, -1 on failure.
+ */
+ int
+! match_add(wp, grp, pat, prio, id)
+ win_T *wp;
+ char_u *grp;
+ char_u *pat;
+ int prio;
+ int id;
+ {
+! matchitem_T *cur;
+! matchitem_T *prev;
+! matchitem_T *m;
+ int hlg_id;
+! regprog_T *regprog;
+
+! if (*grp == NUL || *pat == NUL)
+ return -1;
+ if (id < -1 || id == 0)
+ {
+--- 6751,6772 ----
+ * Return ID of added match, -1 on failure.
+ */
+ int
+! match_add(wp, grp, pat, prio, id, pos_list)
+ win_T *wp;
+ char_u *grp;
+ char_u *pat;
+ int prio;
+ int id;
++ list_T *pos_list;
+ {
+! matchitem_T *cur;
+! matchitem_T *prev;
+! matchitem_T *m;
+ int hlg_id;
+! regprog_T *regprog = NULL;
+! int rtype = SOME_VALID;
+
+! if (*grp == NUL || (pat != NULL && *pat == NUL))
+ return -1;
+ if (id < -1 || id == 0)
+ {
+***************
+*** 6789,6795 ****
+ EMSG2(_(e_nogroup), grp);
+ return -1;
+ }
+! if ((regprog = vim_regcomp(pat, RE_MAGIC)) == NULL)
+ {
+ EMSG2(_(e_invarg2), pat);
+ return -1;
+--- 6791,6797 ----
+ EMSG2(_(e_nogroup), grp);
+ return -1;
+ }
+! if (pat != NULL && (regprog = vim_regcomp(pat, RE_MAGIC)) == NULL)
+ {
+ EMSG2(_(e_invarg2), pat);
+ return -1;
+***************
+*** 6810,6821 ****
+ m = (matchitem_T *)alloc(sizeof(matchitem_T));
+ m->id = id;
+ m->priority = prio;
+! m->pattern = vim_strsave(pat);
+ m->hlg_id = hlg_id;
+ m->match.regprog = regprog;
+ m->match.rmm_ic = FALSE;
+ m->match.rmm_maxcol = 0;
+
+ /* Insert new match. The match list is in ascending order with regard to
+ * the match priorities. */
+ cur = wp->w_match_head;
+--- 6812,6922 ----
+ m = (matchitem_T *)alloc(sizeof(matchitem_T));
+ m->id = id;
+ m->priority = prio;
+! m->pattern = pat == NULL ? NULL : vim_strsave(pat);
+! m->pos.cur = 0;
+ m->hlg_id = hlg_id;
+ m->match.regprog = regprog;
+ m->match.rmm_ic = FALSE;
+ m->match.rmm_maxcol = 0;
+
++ /* Set up position matches */
++ if (pos_list != NULL)
++ {
++ linenr_T toplnum = 0;
++ linenr_T botlnum = 0;
++ listitem_T *li;
++ int i;
++
++ for (i = 0, li = pos_list->lv_first; i < MAXPOSMATCH;
++ i++, li = li->li_next)
++ {
++ linenr_T lnum = 0;
++ colnr_T col = 0;
++ int len = 1;
++ list_T *subl;
++ listitem_T *subli;
++ int error;
++
++ if (li == NULL)
++ {
++ m->pos.pos[i].lnum = 0;
++ break;
++ }
++ if (li->li_tv.v_type == VAR_LIST)
++ {
++ subl = li->li_tv.vval.v_list;
++ if (subl == NULL)
++ goto fail;
++ subli = subl->lv_first;
++ if (subli == NULL)
++ goto fail;
++ lnum = get_tv_number_chk(&subli->li_tv, &error);
++ if (error == TRUE)
++ goto fail;
++ m->pos.pos[i].lnum = lnum;
++ if (lnum == 0)
++ {
++ --i;
++ continue;
++ }
++ subli = subli->li_next;
++ if (subli != NULL)
++ {
++ col = get_tv_number_chk(&subli->li_tv, &error);
++ if (error == TRUE)
++ goto fail;
++ subli = subli->li_next;
++ if (subli != NULL)
++ {
++ len = get_tv_number_chk(&subli->li_tv, &error);
++ if (error == TRUE)
++ goto fail;
++ }
++ }
++ m->pos.pos[i].col = col;
++ m->pos.pos[i].len = len;
++ }
++ else if (li->li_tv.v_type == VAR_NUMBER)
++ {
++ if (li->li_tv.vval.v_number == 0)
++ continue;
++ m->pos.pos[i].lnum = li->li_tv.vval.v_number;
++ m->pos.pos[i].col = 0;
++ m->pos.pos[i].len = 0;
++ }
++ else
++ {
++ EMSG(_("List or number required"));
++ goto fail;
++ }
++ if (toplnum == 0 || lnum < toplnum)
++ toplnum = lnum;
++ if (botlnum == 0 || lnum > botlnum)
++ botlnum = lnum;
++ }
++
++ /* Calculate top and bottom lines for redrawing area */
++ if (toplnum != 0)
++ {
++ if (wp->w_buffer->b_mod_set)
++ {
++ if (wp->w_buffer->b_mod_top > toplnum)
++ wp->w_buffer->b_mod_top = toplnum;
++ if (wp->w_buffer->b_mod_bot < botlnum)
++ wp->w_buffer->b_mod_bot = botlnum;
++ }
++ else
++ {
++ wp->w_buffer->b_mod_top = toplnum;
++ wp->w_buffer->b_mod_bot = botlnum;
++ }
++ m->pos.toplnum = toplnum;
++ m->pos.botlnum = botlnum;
++ wp->w_buffer->b_mod_set = TRUE;
++ rtype = VALID;
++ }
++ }
++
+ /* Insert new match. The match list is in ascending order with regard to
+ * the match priorities. */
+ cur = wp->w_match_head;
+***************
+*** 6831,6838 ****
+ prev->next = m;
+ m->next = cur;
+
+! redraw_later(SOME_VALID);
+ return id;
+ }
+
+ /*
+--- 6932,6943 ----
+ prev->next = m;
+ m->next = cur;
+
+! redraw_later(rtype);
+ return id;
++
++ fail:
++ vim_free(m);
++ return -1;
+ }
+
+ /*
+***************
+*** 6845,6852 ****
+ int id;
+ int perr;
+ {
+! matchitem_T *cur = wp->w_match_head;
+! matchitem_T *prev = cur;
+
+ if (id < 1)
+ {
+--- 6950,6958 ----
+ int id;
+ int perr;
+ {
+! matchitem_T *cur = wp->w_match_head;
+! matchitem_T *prev = cur;
+! int rtype = SOME_VALID;
+
+ if (id < 1)
+ {
+***************
+*** 6872,6879 ****
+ prev->next = cur->next;
+ vim_regfree(cur->match.regprog);
+ vim_free(cur->pattern);
+ vim_free(cur);
+! redraw_later(SOME_VALID);
+ return 0;
+ }
+
+--- 6978,7002 ----
+ prev->next = cur->next;
+ vim_regfree(cur->match.regprog);
+ vim_free(cur->pattern);
++ if (cur->pos.toplnum != 0)
++ {
++ if (wp->w_buffer->b_mod_set)
++ {
++ if (wp->w_buffer->b_mod_top > cur->pos.toplnum)
++ wp->w_buffer->b_mod_top = cur->pos.toplnum;
++ if (wp->w_buffer->b_mod_bot < cur->pos.botlnum)
++ wp->w_buffer->b_mod_bot = cur->pos.botlnum;
++ }
++ else
++ {
++ wp->w_buffer->b_mod_top = cur->pos.toplnum;
++ wp->w_buffer->b_mod_bot = cur->pos.botlnum;
++ }
++ wp->w_buffer->b_mod_set = TRUE;
++ rtype = VALID;
++ }
+ vim_free(cur);
+! redraw_later(rtype);
+ return 0;
+ }
+
+*** ../vim-7.4.329/src/version.c 2014-06-17 13:52:35.868092848 +0200
+--- src/version.c 2014-06-17 14:11:53.764136653 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 330,
+ /**/
+
+--
+I'd like to meet the man who invented sex and see what he's working on now.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.331 b/patches/source/vim/patches/7.4.331
new file mode 100644
index 000000000..d8d526d7f
--- /dev/null
+++ b/patches/source/vim/patches/7.4.331
@@ -0,0 +1,47 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.331
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.331
+Problem: Relative numbering not updated after a linewise yank. Issue 235.
+Solution: Redraw after the yank. (Christian Brabandt)
+Files: src/ops.c
+
+
+*** ../vim-7.4.330/src/ops.c 2014-04-29 15:55:39.443801021 +0200
+--- src/ops.c 2014-06-17 18:14:36.584687585 +0200
+***************
+*** 3150,3155 ****
+--- 3150,3157 ----
+ vim_free(y_current->y_array);
+ y_current = curr;
+ }
++ if (curwin->w_p_rnu)
++ redraw_later(SOME_VALID); /* cursor moved to start */
+ if (mess) /* Display message about yank? */
+ {
+ if (yanktype == MCHAR
+*** ../vim-7.4.330/src/version.c 2014-06-17 17:48:21.784628008 +0200
+--- src/version.c 2014-06-17 18:13:35.824685286 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 331,
+ /**/
+
+--
+CONCORDE: Message for you, sir.
+ He falls forward revealing the arrow with the note.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.332 b/patches/source/vim/patches/7.4.332
new file mode 100644
index 000000000..94e04d2dc
--- /dev/null
+++ b/patches/source/vim/patches/7.4.332
@@ -0,0 +1,118 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.332
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.332
+Problem: GTK: When a sign icon doesn't fit exactly there can be ugly gaps.
+Solution: Scale the sign to fit when the aspect ratio is not too far off.
+ (Christian Brabandt)
+Files: src/gui_gtk_x11.c
+
+
+*** ../vim-7.4.331/src/gui_gtk_x11.c 2014-05-13 20:19:53.573808877 +0200
+--- src/gui_gtk_x11.c 2014-06-17 18:44:39.900755807 +0200
+***************
+*** 5965,5991 ****
+ * Decide whether we need to scale. Allow one pixel of border
+ * width to be cut off, in order to avoid excessive scaling for
+ * tiny differences in font size.
+ */
+ need_scale = (width > SIGN_WIDTH + 2
+! || height > SIGN_HEIGHT + 2
+ || (width < 3 * SIGN_WIDTH / 4
+ && height < 3 * SIGN_HEIGHT / 4));
+ if (need_scale)
+ {
+! double aspect;
+
+ /* Keep the original aspect ratio */
+ aspect = (double)height / (double)width;
+ width = (double)SIGN_WIDTH * SIGN_ASPECT / aspect;
+ width = MIN(width, SIGN_WIDTH);
+! height = (double)width * aspect;
+
+! /* This doesn't seem to be worth caching, and doing so
+! * would complicate the code quite a bit. */
+! sign = gdk_pixbuf_scale_simple(sign, width, height,
+! GDK_INTERP_BILINEAR);
+! if (sign == NULL)
+! return; /* out of memory */
+ }
+
+ /* The origin is the upper-left corner of the pixmap. Therefore
+--- 5965,6012 ----
+ * Decide whether we need to scale. Allow one pixel of border
+ * width to be cut off, in order to avoid excessive scaling for
+ * tiny differences in font size.
++ * Do scale to fit the height to avoid gaps because of linespacing.
+ */
+ need_scale = (width > SIGN_WIDTH + 2
+! || height != SIGN_HEIGHT
+ || (width < 3 * SIGN_WIDTH / 4
+ && height < 3 * SIGN_HEIGHT / 4));
+ if (need_scale)
+ {
+! double aspect;
+! int w = width;
+! int h = height;
+
+ /* Keep the original aspect ratio */
+ aspect = (double)height / (double)width;
+ width = (double)SIGN_WIDTH * SIGN_ASPECT / aspect;
+ width = MIN(width, SIGN_WIDTH);
+! if (((double)(MAX(height, SIGN_HEIGHT)) /
+! (double)(MIN(height, SIGN_HEIGHT))) < 1.15)
+! {
+! /* Change the aspect ratio by at most 15% to fill the
+! * available space completly. */
+! height = (double)SIGN_HEIGHT * SIGN_ASPECT / aspect;
+! height = MIN(height, SIGN_HEIGHT);
+! }
+! else
+! height = (double)width * aspect;
+
+! if (w == width && h == height)
+! {
+! /* no change in dimensions; don't decrease reference counter
+! * (below) */
+! need_scale = FALSE;
+! }
+! else
+! {
+! /* This doesn't seem to be worth caching, and doing so would
+! * complicate the code quite a bit. */
+! sign = gdk_pixbuf_scale_simple(sign, width, height,
+! GDK_INTERP_BILINEAR);
+! if (sign == NULL)
+! return; /* out of memory */
+! }
+ }
+
+ /* The origin is the upper-left corner of the pixmap. Therefore
+*** ../vim-7.4.331/src/version.c 2014-06-17 18:16:08.420691059 +0200
+--- src/version.c 2014-06-17 18:46:49.784760721 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 332,
+ /**/
+
+--
+ "To whoever finds this note -
+ I have been imprisoned by my father who wishes me to marry
+ against my will. Please please please please come and rescue me.
+ I am in the tall tower of Swamp Castle."
+ SIR LAUNCELOT's eyes light up with holy inspiration.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.333 b/patches/source/vim/patches/7.4.333
new file mode 100644
index 000000000..d0b61711d
--- /dev/null
+++ b/patches/source/vim/patches/7.4.333
@@ -0,0 +1,72 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.333
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.333
+Problem: Compiler warning for unused function.
+Solution: Put the function inside the #ifdef.
+Files: src/screen.c
+
+
+*** ../vim-7.4.332/src/screen.c 2014-06-17 17:48:21.784628008 +0200
+--- src/screen.c 2014-06-17 23:16:24.121372619 +0200
+***************
+*** 139,145 ****
+ static void redraw_custom_statusline __ARGS((win_T *wp));
+ #endif
+ #ifdef FEAT_SEARCH_EXTRA
+! #define SEARCH_HL_PRIORITY 0
+ static void start_search_hl __ARGS((void));
+ static void end_search_hl __ARGS((void));
+ static void init_search_hl __ARGS((win_T *wp));
+--- 139,145 ----
+ static void redraw_custom_statusline __ARGS((win_T *wp));
+ #endif
+ #ifdef FEAT_SEARCH_EXTRA
+! # define SEARCH_HL_PRIORITY 0
+ static void start_search_hl __ARGS((void));
+ static void end_search_hl __ARGS((void));
+ static void init_search_hl __ARGS((win_T *wp));
+***************
+*** 7476,7482 ****
+ }
+ }
+ }
+- #endif
+
+ static int
+ next_search_hl_pos(shl, lnum, posmatch, mincol)
+--- 7476,7481 ----
+***************
+*** 7533,7538 ****
+--- 7532,7538 ----
+ }
+ return FALSE;
+ }
++ #endif
+
+ static void
+ screen_start_highlight(attr)
+*** ../vim-7.4.332/src/version.c 2014-06-17 18:46:57.880761027 +0200
+--- src/version.c 2014-06-17 23:17:14.949374542 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 333,
+ /**/
+
+--
+You had connectors? Eeee, when I were a lad we 'ad to carry the
+bits between the computer and the terminal with a spoon...
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.334 b/patches/source/vim/patches/7.4.334
new file mode 100644
index 000000000..4f72bb24b
--- /dev/null
+++ b/patches/source/vim/patches/7.4.334
@@ -0,0 +1,112 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.334
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.334 (after 7.4.330)
+Problem: Unitialized variables, causing some problems.
+Solution: Initialize the variables. (Dominique Pelle)
+Files: src/screen.c, src/window.c
+
+
+*** ../vim-7.4.333/src/screen.c 2014-06-17 23:17:56.489376113 +0200
+--- src/screen.c 2014-06-18 21:16:23.560368846 +0200
+***************
+*** 7363,7369 ****
+ match_T *shl; /* points to search_hl or a match */
+ linenr_T lnum;
+ colnr_T mincol; /* minimal column for a match */
+! matchitem_T *cur; /* to retrieve match postions if any */
+ {
+ linenr_T l;
+ colnr_T matchcol;
+--- 7363,7369 ----
+ match_T *shl; /* points to search_hl or a match */
+ linenr_T lnum;
+ colnr_T mincol; /* minimal column for a match */
+! matchitem_T *cur; /* to retrieve match positions if any */
+ {
+ linenr_T l;
+ colnr_T matchcol;
+***************
+*** 7458,7466 ****
+ }
+ }
+ else if (cur != NULL)
+- {
+ nmatched = next_search_hl_pos(shl, lnum, &(cur->pos), matchcol);
+! }
+ if (nmatched == 0)
+ {
+ shl->lnum = 0; /* no match found */
+--- 7458,7466 ----
+ }
+ }
+ else if (cur != NULL)
+ nmatched = next_search_hl_pos(shl, lnum, &(cur->pos), matchcol);
+! else
+! nmatched = 0;
+ if (nmatched == 0)
+ {
+ shl->lnum = 0; /* no match found */
+*** ../vim-7.4.333/src/window.c 2014-06-17 17:48:21.784628008 +0200
+--- src/window.c 2014-06-18 21:12:15.232359452 +0200
+***************
+*** 6809,6815 ****
+ }
+
+ /* Build new match. */
+! m = (matchitem_T *)alloc(sizeof(matchitem_T));
+ m->id = id;
+ m->priority = prio;
+ m->pattern = pat == NULL ? NULL : vim_strsave(pat);
+--- 6809,6815 ----
+ }
+
+ /* Build new match. */
+! m = (matchitem_T *)alloc_clear(sizeof(matchitem_T));
+ m->id = id;
+ m->priority = prio;
+ m->pattern = pat == NULL ? NULL : vim_strsave(pat);
+***************
+*** 6835,6841 ****
+ int len = 1;
+ list_T *subl;
+ listitem_T *subli;
+! int error;
+
+ if (li == NULL)
+ {
+--- 6835,6841 ----
+ int len = 1;
+ list_T *subl;
+ listitem_T *subli;
+! int error = FALSE;
+
+ if (li == NULL)
+ {
+*** ../vim-7.4.333/src/version.c 2014-06-17 23:17:56.493376113 +0200
+--- src/version.c 2014-06-18 21:14:16.516364040 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 334,
+ /**/
+
+--
+You were lucky. We lived for three months in a brown paper bag in a
+septic tank. We used to have to get up at six o'clock in the morning,
+clean the bag, eat a crust of stale bread, go to work down mill for
+fourteen hours a day week in-week out. When we got home, our Dad
+would thrash us to sleep with his belt!
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.335 b/patches/source/vim/patches/7.4.335
new file mode 100644
index 000000000..ef41bc8aa
--- /dev/null
+++ b/patches/source/vim/patches/7.4.335
@@ -0,0 +1,108 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.335
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.335
+Problem: No digraph for the new rouble sign.
+Solution: Add the digraphs =R and =P.
+Files: src/digraph.c, runtime/doc/digraph.txt
+
+
+*** ../vim-7.4.334/src/digraph.c 2012-01-10 21:57:16.000000000 +0100
+--- src/digraph.c 2014-06-18 21:36:46.148415099 +0200
+***************
+*** 1425,1430 ****
+--- 1425,1432 ----
+ {'W', '=', 0x20a9},
+ {'=', 'e', 0x20ac}, /* euro */
+ {'E', 'u', 0x20ac}, /* euro */
++ {'=', 'R', 0x20bd}, /* rouble */
++ {'=', 'P', 0x20bd}, /* rouble */
+ {'o', 'C', 0x2103},
+ {'c', 'o', 0x2105},
+ {'o', 'F', 0x2109},
+*** ../vim-7.4.334/runtime/doc/digraph.txt 2013-08-10 13:24:52.000000000 +0200
+--- runtime/doc/digraph.txt 2014-06-18 21:35:21.684411903 +0200
+***************
+*** 147,153 ****
+ Two 2 Hook
+ Nine 9 Horn
+
+! Equals = Cyrillic
+ Asterisk * Greek
+ Percent sign % Greek/Cyrillic special
+ Plus + smalls: Arabic, capitals: Hebrew
+--- 147,153 ----
+ Two 2 Hook
+ Nine 9 Horn
+
+! Equals = Cyrillic (= used as second char)
+ Asterisk * Greek
+ Percent sign % Greek/Cyrillic special
+ Plus + smalls: Arabic, capitals: Hebrew
+***************
+*** 170,175 ****
+--- 170,180 ----
+ used for the euro sign, while both of them are the character 164, 0xa4. For
+ compatibility with zsh Eu can also be used for the euro sign.
+
++ ROUBLE
++
++ The rouble sign was added in 2014 as 0x20bd. Vim supports the digraphs =R and
++ =P for this. Note that R= and P= are other characters.
++
+ *digraph-table*
+ char digraph hex dec official name ~
+ ^@ NU 0x00 0 NULL (NUL)
+***************
+*** 966,971 ****
+--- 971,978 ----
+ ₧ Pt 20A7 8359 PESETA SIGN
+ â‚© W= 20A9 8361 WON SIGN
+ € Eu 20AC 8364 EURO SIGN
++ ₽ =R 20AC 8381 ROUBLE SIGN
++ ₽ =P 20AC 8381 ROUBLE SIGN
+ ℃ oC 2103 8451 DEGREE CELSIUS
+ â„… co 2105 8453 CARE OF
+ ℉ oF 2109 8457 DEGREE FAHRENHEIT
+***************
+*** 1077,1083 ****
+ ⊥ -T 22A5 8869 UP TACK
+ â‹… .P 22C5 8901 DOT OPERATOR
+ â‹® :3 22EE 8942 VERTICAL ELLIPSIS
+! ⋯ .3 22EF 8943 MIDLINE HORIZONTAL ELLIPSIS
+ ⌂ Eh 2302 8962 HOUSE
+ ⌈ <7 2308 8968 LEFT CEILING
+ ⌉ >7 2309 8969 RIGHT CEILING
+--- 1084,1090 ----
+ ⊥ -T 22A5 8869 UP TACK
+ â‹… .P 22C5 8901 DOT OPERATOR
+ â‹® :3 22EE 8942 VERTICAL ELLIPSIS
+! ⋯ .3 22EF 8943 MIDLINE HORIZONTAL ELLIPSIS
+ ⌂ Eh 2302 8962 HOUSE
+ ⌈ <7 2308 8968 LEFT CEILING
+ ⌉ >7 2309 8969 RIGHT CEILING
+*** ../vim-7.4.334/src/version.c 2014-06-18 21:20:07.240377308 +0200
+--- src/version.c 2014-06-18 21:36:14.632413906 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 335,
+ /**/
+
+--
+You got to work at a mill? Lucky! I got sent back to work in the
+acid-mines for my daily crust of stale bread... which not even the
+birds would eat.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.336 b/patches/source/vim/patches/7.4.336
new file mode 100644
index 000000000..6e5fe3f39
--- /dev/null
+++ b/patches/source/vim/patches/7.4.336
@@ -0,0 +1,100 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.336
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.336
+Problem: Setting 'history' to a big value causes out-of-memory errors.
+Solution: Limit the value to 10000. (Hirohito Higashi)
+Files: runtime/doc/options.txt, src/option.c
+
+
+*** ../vim-7.4.335/runtime/doc/options.txt 2014-05-28 21:40:47.088329130 +0200
+--- runtime/doc/options.txt 2014-06-25 11:44:16.985950668 +0200
+***************
+*** 3920,3931 ****
+ NOTE: This option is reset when 'compatible' is set.
+
+ *'history'* *'hi'*
+! 'history' 'hi' number (Vim default: 20, Vi default: 0)
+ global
+ {not in Vi}
+ A history of ":" commands, and a history of previous search patterns
+! are remembered. This option decides how many entries may be stored in
+ each of these histories (see |cmdline-editing|).
+ NOTE: This option is set to the Vi default value when 'compatible' is
+ set and to the Vim default value when 'compatible' is reset.
+
+--- 3920,3932 ----
+ NOTE: This option is reset when 'compatible' is set.
+
+ *'history'* *'hi'*
+! 'history' 'hi' number (Vim default: 50, Vi default: 0)
+ global
+ {not in Vi}
+ A history of ":" commands, and a history of previous search patterns
+! is remembered. This option decides how many entries may be stored in
+ each of these histories (see |cmdline-editing|).
++ The maximum value is 10000.
+ NOTE: This option is set to the Vi default value when 'compatible' is
+ set and to the Vim default value when 'compatible' is reset.
+
+*** ../vim-7.4.335/src/option.c 2014-05-13 12:16:44.037555110 +0200
+--- src/option.c 2014-06-25 11:44:48.349951855 +0200
+***************
+*** 1392,1398 ****
+ SCRIPTID_INIT},
+ {"history", "hi", P_NUM|P_VIM,
+ (char_u *)&p_hi, PV_NONE,
+! {(char_u *)0L, (char_u *)20L} SCRIPTID_INIT},
+ {"hkmap", "hk", P_BOOL|P_VI_DEF|P_VIM,
+ #ifdef FEAT_RIGHTLEFT
+ (char_u *)&p_hkmap, PV_NONE,
+--- 1392,1398 ----
+ SCRIPTID_INIT},
+ {"history", "hi", P_NUM|P_VIM,
+ (char_u *)&p_hi, PV_NONE,
+! {(char_u *)0L, (char_u *)50L} SCRIPTID_INIT},
+ {"hkmap", "hk", P_BOOL|P_VI_DEF|P_VIM,
+ #ifdef FEAT_RIGHTLEFT
+ (char_u *)&p_hkmap, PV_NONE,
+***************
+*** 8595,8600 ****
+--- 8595,8605 ----
+ errmsg = e_positive;
+ p_hi = 0;
+ }
++ else if (p_hi > 10000)
++ {
++ errmsg = e_invarg;
++ p_hi = 10000;
++ }
+ if (p_re < 0 || p_re > 2)
+ {
+ errmsg = e_invarg;
+*** ../vim-7.4.335/src/version.c 2014-06-18 21:38:12.216418355 +0200
+--- src/version.c 2014-06-25 11:45:08.141952604 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 336,
+ /**/
+
+--
+ARTHUR: Well, it doesn't matter. Will you go and tell your master that
+ Arthur from the Court of Camelot is here.
+GUARD #1: Listen, in order to maintain air-speed velocity, a swallow
+ needs to beat its wings 43 times every second, right?
+ARTHUR: Please!
+ The Quest for the Holy Grail (Monty Python)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.337 b/patches/source/vim/patches/7.4.337
new file mode 100644
index 000000000..80b8349b3
--- /dev/null
+++ b/patches/source/vim/patches/7.4.337
@@ -0,0 +1,51 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.337
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.337
+Problem: When there is an error preparing to edit the command line, the
+ command won't be executed. (Hirohito Higashi)
+Solution: Reset did_emsg before editing.
+Files: src/ex_getln.c
+
+
+*** ../vim-7.4.336/src/ex_getln.c 2014-06-12 19:44:45.324549030 +0200
+--- src/ex_getln.c 2014-06-25 12:06:38.018001402 +0200
+***************
+*** 342,347 ****
+--- 342,354 ----
+ do_digraph(-1); /* init digraph typeahead */
+ #endif
+
++ /* If something above caused an error, reset the flags, we do want to type
++ * and execute commands. Display may be messed up a bit. */
++ if (did_emsg)
++ redrawcmd();
++ did_emsg = FALSE;
++ got_int = FALSE;
++
+ /*
+ * Collect the command string, handling editing keys.
+ */
+*** ../vim-7.4.336/src/version.c 2014-06-25 11:48:40.733960646 +0200
+--- src/version.c 2014-06-25 12:24:39.442042313 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 337,
+ /**/
+
+--
+Computers are not intelligent. They only think they are.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.338 b/patches/source/vim/patches/7.4.338
new file mode 100644
index 000000000..f533693cc
--- /dev/null
+++ b/patches/source/vim/patches/7.4.338
@@ -0,0 +1,1830 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.338
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.338
+Problem: Cannot wrap lines taking indent into account.
+Solution: Add the 'breakindent' option. (many authors, final improvements by
+ Christian Brabandt)
+Files: runtime/doc/eval.txt, runtime/doc/options.txt, runtime/optwin.vim,
+ src/buffer.c, src/charset.c, src/edit.c, src/ex_getln.c,
+ src/getchar.c, src/misc1.c, src/misc2.c, src/ops.c, src/option.c,
+ src/option.h, src/proto/charset.pro, src/proto/misc1.pro,
+ src/proto/option.pro, src/screen.c, src/structs.h,
+ src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
+ src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
+ src/testdir/Make_vms.mms, src/testdir/Makefile,
+ src/testdir/test_breakindent.in, src/testdir/test_breakindent.ok,
+ src/ui.c
+
+
+*** ../vim-7.4.337/runtime/doc/eval.txt 2014-06-17 17:48:21.768628007 +0200
+--- runtime/doc/eval.txt 2014-06-25 12:57:00.986115765 +0200
+***************
+*** 6639,6646 ****
+ keymap Compiled with 'keymap' support.
+ langmap Compiled with 'langmap' support.
+ libcall Compiled with |libcall()| support.
+! linebreak Compiled with 'linebreak', 'breakat' and 'showbreak'
+! support.
+ lispindent Compiled with support for lisp indenting.
+ listcmds Compiled with commands for the buffer list |:files|
+ and the argument list |arglist|.
+--- 6651,6658 ----
+ keymap Compiled with 'keymap' support.
+ langmap Compiled with 'langmap' support.
+ libcall Compiled with |libcall()| support.
+! linebreak Compiled with 'linebreak', 'breakat', 'showbreak' and
+! 'breakindent' support.
+ lispindent Compiled with support for lisp indenting.
+ listcmds Compiled with commands for the buffer list |:files|
+ and the argument list |arglist|.
+*** ../vim-7.4.337/runtime/doc/options.txt 2014-06-17 17:48:21.768628007 +0200
+--- runtime/doc/options.txt 2014-06-25 12:57:00.986115765 +0200
+***************
+*** 1200,1205 ****
+--- 1200,1237 ----
+ break if 'linebreak' is on. Only works for ASCII and also for 8-bit
+ characters when 'encoding' is an 8-bit encoding.
+
++ *'breakindent'* *'bri'*
++ 'breakindent' 'bri' boolean (default off)
++ local to window
++ {not in Vi}
++ {not available when compiled without the |+linebreak|
++ feature}
++ Every wrapped line will continue visually indented (same amount of
++ space as the beginning of that line), thus preserving horizontal blocks
++ of text.
++
++ *'breakindentopt'* *'briopt'*
++ 'breakindentopt' 'briopt' string (default empty)
++ local to window
++ {not in Vi}
++ {not available when compiled without the |+linebreak|
++ feature}
++ Settings for 'breakindent'. It can consist of the following optional
++ items and must be seperated by a comma:
++ min:{n} Minimum text width that will be kept after
++ applying 'breakindent', even if the resulting
++ text should normally be narrower. This prevents
++ text indented almost to the right window border
++ occupying lot of vertical space when broken.
++ shift:{n} After applying 'breakindent', wrapped line
++ beginning will be shift by given number of
++ characters. It permits dynamic French paragraph
++ indentation (negative) or emphasizing the line
++ continuation (positive).
++ sbr Display the 'showbreak' value before applying the
++ additional indent.
++ The default value for min is 20 and shift is 0.
++
+ *'browsedir'* *'bsdir'*
+ 'browsedir' 'bsdir' string (default: "last")
+ global
+*** ../vim-7.4.337/runtime/optwin.vim 2014-04-01 12:26:40.241157964 +0200
+--- runtime/optwin.vim 2014-06-25 12:57:00.990115765 +0200
+***************
+*** 324,329 ****
+--- 324,335 ----
+ call append("$", "linebreak\twrap long lines at a character in 'breakat'")
+ call append("$", "\t(local to window)")
+ call <SID>BinOptionL("lbr")
++ call append("$", "breakindent\tpreserve indentation in wrapped text")
++ call append("$", "\t(local to window)")
++ call <SID>BinOptionL("bri")
++ call append("$", "breakindentopt\tadjust breakindent behaviour")
++ call append("$", "\t(local to window)")
++ call <SID>OptionL("briopt")
+ call append("$", "breakat\twhich characters might cause a line break")
+ call <SID>OptionG("brk", &brk)
+ call append("$", "showbreak\tstring to put before wrapped screen lines")
+*** ../vim-7.4.337/src/charset.c 2014-03-23 15:12:29.911264336 +0100
+--- src/charset.c 2014-06-25 13:23:05.842174966 +0200
+***************
+*** 867,875 ****
+ char_u *s;
+ {
+ colnr_T col = startcol;
+
+ while (*s != NUL)
+! col += lbr_chartabsize_adv(&s, col);
+ return (int)col;
+ }
+
+--- 867,876 ----
+ char_u *s;
+ {
+ colnr_T col = startcol;
++ char_u *line = s; /* pointer to start of line, for breakindent */
+
+ while (*s != NUL)
+! col += lbr_chartabsize_adv(line, &s, col);
+ return (int)col;
+ }
+
+***************
+*** 877,892 ****
+ * Like linetabsize(), but for a given window instead of the current one.
+ */
+ int
+! win_linetabsize(wp, p, len)
+ win_T *wp;
+! char_u *p;
+ colnr_T len;
+ {
+ colnr_T col = 0;
+ char_u *s;
+
+! for (s = p; *s != NUL && (len == MAXCOL || s < p + len); mb_ptr_adv(s))
+! col += win_lbr_chartabsize(wp, s, col, NULL);
+ return (int)col;
+ }
+
+--- 878,894 ----
+ * Like linetabsize(), but for a given window instead of the current one.
+ */
+ int
+! win_linetabsize(wp, line, len)
+ win_T *wp;
+! char_u *line;
+ colnr_T len;
+ {
+ colnr_T col = 0;
+ char_u *s;
+
+! for (s = line; *s != NUL && (len == MAXCOL || s < line + len);
+! mb_ptr_adv(s))
+! col += win_lbr_chartabsize(wp, line, s, col, NULL);
+ return (int)col;
+ }
+
+***************
+*** 1021,1032 ****
+ * like chartabsize(), but also check for line breaks on the screen
+ */
+ int
+! lbr_chartabsize(s, col)
+ unsigned char *s;
+ colnr_T col;
+ {
+ #ifdef FEAT_LINEBREAK
+! if (!curwin->w_p_lbr && *p_sbr == NUL)
+ {
+ #endif
+ #ifdef FEAT_MBYTE
+--- 1023,1035 ----
+ * like chartabsize(), but also check for line breaks on the screen
+ */
+ int
+! lbr_chartabsize(line, s, col)
+! char_u *line; /* start of the line */
+ unsigned char *s;
+ colnr_T col;
+ {
+ #ifdef FEAT_LINEBREAK
+! if (!curwin->w_p_lbr && *p_sbr == NUL && !curwin->w_p_bri)
+ {
+ #endif
+ #ifdef FEAT_MBYTE
+***************
+*** 1036,1042 ****
+ RET_WIN_BUF_CHARTABSIZE(curwin, curbuf, s, col)
+ #ifdef FEAT_LINEBREAK
+ }
+! return win_lbr_chartabsize(curwin, s, col, NULL);
+ #endif
+ }
+
+--- 1039,1045 ----
+ RET_WIN_BUF_CHARTABSIZE(curwin, curbuf, s, col)
+ #ifdef FEAT_LINEBREAK
+ }
+! return win_lbr_chartabsize(curwin, line == NULL ? s : line, s, col, NULL);
+ #endif
+ }
+
+***************
+*** 1044,1056 ****
+ * Call lbr_chartabsize() and advance the pointer.
+ */
+ int
+! lbr_chartabsize_adv(s, col)
+ char_u **s;
+ colnr_T col;
+ {
+ int retval;
+
+! retval = lbr_chartabsize(*s, col);
+ mb_ptr_adv(*s);
+ return retval;
+ }
+--- 1047,1060 ----
+ * Call lbr_chartabsize() and advance the pointer.
+ */
+ int
+! lbr_chartabsize_adv(line, s, col)
+! char_u *line; /* start of the line */
+ char_u **s;
+ colnr_T col;
+ {
+ int retval;
+
+! retval = lbr_chartabsize(line, *s, col);
+ mb_ptr_adv(*s);
+ return retval;
+ }
+***************
+*** 1063,1070 ****
+ * value, init to 0 before calling.
+ */
+ int
+! win_lbr_chartabsize(wp, s, col, headp)
+ win_T *wp;
+ char_u *s;
+ colnr_T col;
+ int *headp UNUSED;
+--- 1067,1075 ----
+ * value, init to 0 before calling.
+ */
+ int
+! win_lbr_chartabsize(wp, line, s, col, headp)
+ win_T *wp;
++ char_u *line; /* start of the line */
+ char_u *s;
+ colnr_T col;
+ int *headp UNUSED;
+***************
+*** 1086,1094 ****
+ int n;
+
+ /*
+! * No 'linebreak' and 'showbreak': return quickly.
+ */
+! if (!wp->w_p_lbr && *p_sbr == NUL)
+ #endif
+ {
+ #ifdef FEAT_MBYTE
+--- 1091,1099 ----
+ int n;
+
+ /*
+! * No 'linebreak', 'showbreak' and 'breakindent': return quickly.
+ */
+! if (!wp->w_p_lbr && !wp->w_p_bri && *p_sbr == NUL)
+ #endif
+ {
+ #ifdef FEAT_MBYTE
+***************
+*** 1163,1173 ****
+ # endif
+
+ /*
+! * May have to add something for 'showbreak' string at start of line
+ * Set *headp to the size of what we add.
+ */
+ added = 0;
+! if (*p_sbr != NUL && wp->w_p_wrap && col != 0)
+ {
+ numberextra = win_col_off(wp);
+ col += numberextra + mb_added;
+--- 1168,1179 ----
+ # endif
+
+ /*
+! * May have to add something for 'breakindent' and/or 'showbreak'
+! * string at start of line.
+ * Set *headp to the size of what we add.
+ */
+ added = 0;
+! if ((*p_sbr != NUL || wp->w_p_bri) && wp->w_p_wrap && col != 0)
+ {
+ numberextra = win_col_off(wp);
+ col += numberextra + mb_added;
+***************
+*** 1180,1186 ****
+ }
+ if (col == 0 || col + size > (colnr_T)W_WIDTH(wp))
+ {
+! added = vim_strsize(p_sbr);
+ if (tab_corr)
+ size += (added / wp->w_buffer->b_p_ts) * wp->w_buffer->b_p_ts;
+ else
+--- 1186,1197 ----
+ }
+ if (col == 0 || col + size > (colnr_T)W_WIDTH(wp))
+ {
+! added = 0;
+! if (*p_sbr != NUL)
+! added += vim_strsize(p_sbr);
+! if (wp->w_p_bri)
+! added += get_breakindent_win(wp, line);
+!
+ if (tab_corr)
+ size += (added / wp->w_buffer->b_p_ts) * wp->w_buffer->b_p_ts;
+ else
+***************
+*** 1274,1286 ****
+ colnr_T vcol;
+ char_u *ptr; /* points to current char */
+ char_u *posptr; /* points to char at pos->col */
+ int incr;
+ int head;
+ int ts = wp->w_buffer->b_p_ts;
+ int c;
+
+ vcol = 0;
+! ptr = ml_get_buf(wp->w_buffer, pos->lnum, FALSE);
+ if (pos->col == MAXCOL)
+ posptr = NULL; /* continue until the NUL */
+ else
+--- 1285,1298 ----
+ colnr_T vcol;
+ char_u *ptr; /* points to current char */
+ char_u *posptr; /* points to char at pos->col */
++ char_u *line; /* start of the line */
+ int incr;
+ int head;
+ int ts = wp->w_buffer->b_p_ts;
+ int c;
+
+ vcol = 0;
+! line = ptr = ml_get_buf(wp->w_buffer, pos->lnum, FALSE);
+ if (pos->col == MAXCOL)
+ posptr = NULL; /* continue until the NUL */
+ else
+***************
+*** 1288,1299 ****
+
+ /*
+ * This function is used very often, do some speed optimizations.
+! * When 'list', 'linebreak' and 'showbreak' are not set use a simple loop.
+ * Also use this when 'list' is set but tabs take their normal size.
+ */
+ if ((!wp->w_p_list || lcs_tab1 != NUL)
+ #ifdef FEAT_LINEBREAK
+! && !wp->w_p_lbr && *p_sbr == NUL
+ #endif
+ )
+ {
+--- 1300,1312 ----
+
+ /*
+ * This function is used very often, do some speed optimizations.
+! * When 'list', 'linebreak', 'showbreak' and 'breakindent' are not set
+! * use a simple loop.
+ * Also use this when 'list' is set but tabs take their normal size.
+ */
+ if ((!wp->w_p_list || lcs_tab1 != NUL)
+ #ifdef FEAT_LINEBREAK
+! && !wp->w_p_lbr && *p_sbr == NUL && !wp->w_p_bri
+ #endif
+ )
+ {
+***************
+*** 1355,1361 ****
+ {
+ /* A tab gets expanded, depending on the current column */
+ head = 0;
+! incr = win_lbr_chartabsize(wp, ptr, vcol, &head);
+ /* make sure we don't go past the end of the line */
+ if (*ptr == NUL)
+ {
+--- 1368,1374 ----
+ {
+ /* A tab gets expanded, depending on the current column */
+ head = 0;
+! incr = win_lbr_chartabsize(wp, line, ptr, vcol, &head);
+ /* make sure we don't go past the end of the line */
+ if (*ptr == NUL)
+ {
+*** ../vim-7.4.337/src/edit.c 2014-05-28 21:40:47.092329130 +0200
+--- src/edit.c 2014-06-25 13:16:43.278160493 +0200
+***************
+*** 1956,1962 ****
+ else
+ #endif
+ ++new_cursor_col;
+! vcol += lbr_chartabsize(ptr + new_cursor_col, (colnr_T)vcol);
+ }
+ vcol = last_vcol;
+
+--- 1956,1962 ----
+ else
+ #endif
+ ++new_cursor_col;
+! vcol += lbr_chartabsize(ptr, ptr + new_cursor_col, (colnr_T)vcol);
+ }
+ vcol = last_vcol;
+
+***************
+*** 7126,7134 ****
+ for (;;)
+ {
+ coladvance(v - width);
+! /* getviscol() is slow, skip it when 'showbreak' is empty and
+! * there are no multi-byte characters */
+! if ((*p_sbr == NUL
+ # ifdef FEAT_MBYTE
+ && !has_mbyte
+ # endif
+--- 7126,7135 ----
+ for (;;)
+ {
+ coladvance(v - width);
+! /* getviscol() is slow, skip it when 'showbreak' is empty,
+! * 'breakindent' is not set and there are no multi-byte
+! * characters */
+! if ((*p_sbr == NUL && !curwin->w_p_bri
+ # ifdef FEAT_MBYTE
+ && !has_mbyte
+ # endif
+***************
+*** 9758,9768 ****
+ getvcol(curwin, &fpos, &vcol, NULL, NULL);
+ getvcol(curwin, cursor, &want_vcol, NULL, NULL);
+
+! /* Use as many TABs as possible. Beware of 'showbreak' and
+! * 'linebreak' adding extra virtual columns. */
+ while (vim_iswhite(*ptr))
+ {
+! i = lbr_chartabsize((char_u *)"\t", vcol);
+ if (vcol + i > want_vcol)
+ break;
+ if (*ptr != TAB)
+--- 9759,9769 ----
+ getvcol(curwin, &fpos, &vcol, NULL, NULL);
+ getvcol(curwin, cursor, &want_vcol, NULL, NULL);
+
+! /* Use as many TABs as possible. Beware of 'breakindent', 'showbreak'
+! * and 'linebreak' adding extra virtual columns. */
+ while (vim_iswhite(*ptr))
+ {
+! i = lbr_chartabsize(NULL, (char_u *)"\t", vcol);
+ if (vcol + i > want_vcol)
+ break;
+ if (*ptr != TAB)
+***************
+*** 9784,9794 ****
+ if (change_col >= 0)
+ {
+ int repl_off = 0;
+
+ /* Skip over the spaces we need. */
+ while (vcol < want_vcol && *ptr == ' ')
+ {
+! vcol += lbr_chartabsize(ptr, vcol);
+ ++ptr;
+ ++repl_off;
+ }
+--- 9785,9796 ----
+ if (change_col >= 0)
+ {
+ int repl_off = 0;
++ char_u *line = ptr;
+
+ /* Skip over the spaces we need. */
+ while (vcol < want_vcol && *ptr == ' ')
+ {
+! vcol += lbr_chartabsize(line, ptr, vcol);
+ ++ptr;
+ ++repl_off;
+ }
+***************
+*** 10029,10034 ****
+--- 10031,10037 ----
+ int c;
+ int temp;
+ char_u *ptr, *prev_ptr;
++ char_u *line;
+
+ if (lnum < 1 || lnum > curbuf->b_ml.ml_line_count)
+ {
+***************
+*** 10038,10050 ****
+
+ /* try to advance to the cursor column */
+ temp = 0;
+! ptr = ml_get(lnum);
+ prev_ptr = ptr;
+ validate_virtcol();
+ while ((colnr_T)temp < curwin->w_virtcol && *ptr != NUL)
+ {
+ prev_ptr = ptr;
+! temp += lbr_chartabsize_adv(&ptr, (colnr_T)temp);
+ }
+ if ((colnr_T)temp > curwin->w_virtcol)
+ ptr = prev_ptr;
+--- 10041,10053 ----
+
+ /* try to advance to the cursor column */
+ temp = 0;
+! line = ptr = ml_get(lnum);
+ prev_ptr = ptr;
+ validate_virtcol();
+ while ((colnr_T)temp < curwin->w_virtcol && *ptr != NUL)
+ {
+ prev_ptr = ptr;
+! temp += lbr_chartabsize_adv(line, &ptr, (colnr_T)temp);
+ }
+ if ((colnr_T)temp > curwin->w_virtcol)
+ ptr = prev_ptr;
+*** ../vim-7.4.337/src/ex_getln.c 2014-06-25 12:26:42.230046959 +0200
+--- src/ex_getln.c 2014-06-25 12:57:00.998115765 +0200
+***************
+*** 2302,2311 ****
+
+ p = (char_u *)line_ga.ga_data;
+ p[line_ga.ga_len] = NUL;
+! indent = get_indent_str(p, 8);
+ indent += sw - indent % sw;
+ add_indent:
+! while (get_indent_str(p, 8) < indent)
+ {
+ char_u *s = skipwhite(p);
+
+--- 2302,2311 ----
+
+ p = (char_u *)line_ga.ga_data;
+ p[line_ga.ga_len] = NUL;
+! indent = get_indent_str(p, 8, FALSE);
+ indent += sw - indent % sw;
+ add_indent:
+! while (get_indent_str(p, 8, FALSE) < indent)
+ {
+ char_u *s = skipwhite(p);
+
+***************
+*** 2357,2367 ****
+ else
+ {
+ p[line_ga.ga_len] = NUL;
+! indent = get_indent_str(p, 8);
+ --indent;
+ indent -= indent % get_sw_value(curbuf);
+ }
+! while (get_indent_str(p, 8) > indent)
+ {
+ char_u *s = skipwhite(p);
+
+--- 2357,2367 ----
+ else
+ {
+ p[line_ga.ga_len] = NUL;
+! indent = get_indent_str(p, 8, FALSE);
+ --indent;
+ indent -= indent % get_sw_value(curbuf);
+ }
+! while (get_indent_str(p, 8, FALSE) > indent)
+ {
+ char_u *s = skipwhite(p);
+
+*** ../vim-7.4.337/src/getchar.c 2014-05-22 18:59:54.510169240 +0200
+--- src/getchar.c 2014-06-25 13:16:53.946160896 +0200
+***************
+*** 2675,2681 ****
+ {
+ if (!vim_iswhite(ptr[col]))
+ curwin->w_wcol = vcol;
+! vcol += lbr_chartabsize(ptr + col,
+ (colnr_T)vcol);
+ #ifdef FEAT_MBYTE
+ if (has_mbyte)
+--- 2675,2681 ----
+ {
+ if (!vim_iswhite(ptr[col]))
+ curwin->w_wcol = vcol;
+! vcol += lbr_chartabsize(ptr, ptr + col,
+ (colnr_T)vcol);
+ #ifdef FEAT_MBYTE
+ if (has_mbyte)
+*** ../vim-7.4.337/src/misc1.c 2014-05-22 14:00:12.698534712 +0200
+--- src/misc1.c 2014-06-25 13:39:43.598212712 +0200
+***************
+*** 32,38 ****
+ int
+ get_indent()
+ {
+! return get_indent_str(ml_get_curline(), (int)curbuf->b_p_ts);
+ }
+
+ /*
+--- 32,38 ----
+ int
+ get_indent()
+ {
+! return get_indent_str(ml_get_curline(), (int)curbuf->b_p_ts, FALSE);
+ }
+
+ /*
+***************
+*** 42,48 ****
+ get_indent_lnum(lnum)
+ linenr_T lnum;
+ {
+! return get_indent_str(ml_get(lnum), (int)curbuf->b_p_ts);
+ }
+
+ #if defined(FEAT_FOLDING) || defined(PROTO)
+--- 42,48 ----
+ get_indent_lnum(lnum)
+ linenr_T lnum;
+ {
+! return get_indent_str(ml_get(lnum), (int)curbuf->b_p_ts, FALSE);
+ }
+
+ #if defined(FEAT_FOLDING) || defined(PROTO)
+***************
+*** 55,61 ****
+ buf_T *buf;
+ linenr_T lnum;
+ {
+! return get_indent_str(ml_get_buf(buf, lnum, FALSE), (int)buf->b_p_ts);
+ }
+ #endif
+
+--- 55,61 ----
+ buf_T *buf;
+ linenr_T lnum;
+ {
+! return get_indent_str(ml_get_buf(buf, lnum, FALSE), (int)buf->b_p_ts, FALSE);
+ }
+ #endif
+
+***************
+*** 64,79 ****
+ * 'tabstop' at "ts"
+ */
+ int
+! get_indent_str(ptr, ts)
+ char_u *ptr;
+ int ts;
+ {
+ int count = 0;
+
+ for ( ; *ptr; ++ptr)
+ {
+! if (*ptr == TAB) /* count a tab for what it is worth */
+! count += ts - (count % ts);
+ else if (*ptr == ' ')
+ ++count; /* count a space for one */
+ else
+--- 64,86 ----
+ * 'tabstop' at "ts"
+ */
+ int
+! get_indent_str(ptr, ts, list)
+ char_u *ptr;
+ int ts;
++ int list; /* if TRUE, count only screen size for tabs */
+ {
+ int count = 0;
+
+ for ( ; *ptr; ++ptr)
+ {
+! if (*ptr == TAB)
+! {
+! if (!list || lcs_tab1) /* count a tab for what it is worth */
+! count += ts - (count % ts);
+! else
+! /* in list mode, when tab is not set, count screen char width for Tab: ^I */
+! count += ptr2cells(ptr);
+! }
+ else if (*ptr == ' ')
+ ++count; /* count a space for one */
+ else
+***************
+*** 476,481 ****
+--- 483,540 ----
+ return (int)col;
+ }
+
++ #if defined(FEAT_LINEBREAK) || defined(PROTO)
++ /*
++ * Return appropriate space number for breakindent, taking influencing
++ * parameters into account. Window must be specified, since it is not
++ * necessarily always the current one.
++ */
++ int
++ get_breakindent_win(wp, line)
++ win_T *wp;
++ char_u *line; /* start of the line */
++ {
++ static int prev_indent = 0; /* cached indent value */
++ static long prev_ts = 0L; /* cached tabstop value */
++ static char_u *prev_line = NULL; /* cached pointer to line */
++ int bri = 0;
++ /* window width minus window margin space, i.e. what rests for text */
++ const int eff_wwidth = W_WIDTH(wp)
++ - ((wp->w_p_nu || wp->w_p_rnu)
++ && (vim_strchr(p_cpo, CPO_NUMCOL) == NULL)
++ ? number_width(wp) + 1 : 0);
++
++ /* used cached indent, unless pointer or 'tabstop' changed */
++ if (prev_line != line || prev_ts != wp->w_buffer->b_p_ts)
++ {
++ prev_line = line;
++ prev_ts = wp->w_buffer->b_p_ts;
++ prev_indent = get_indent_str(line,
++ (int)wp->w_buffer->b_p_ts, wp->w_p_list) + wp->w_p_brishift;
++ }
++
++ /* indent minus the length of the showbreak string */
++ bri = prev_indent;
++ if (wp->w_p_brisbr)
++ bri -= vim_strsize(p_sbr);
++
++ /* Add offset for number column, if 'n' is in 'cpoptions' */
++ bri += win_col_off2(wp);
++
++ /* never indent past left window margin */
++ if (bri < 0)
++ bri = 0;
++ /* always leave at least bri_min characters on the left,
++ * if text width is sufficient */
++ else if (bri > eff_wwidth - wp->w_p_brimin)
++ bri = (eff_wwidth - wp->w_p_brimin < 0)
++ ? 0 : eff_wwidth - wp->w_p_brimin;
++
++ return bri;
++ }
++ #endif
++
++
+ #if defined(FEAT_CINDENT) || defined(FEAT_SMARTINDENT)
+
+ static int cin_is_cinword __ARGS((char_u *line));
+***************
+*** 678,684 ****
+ /*
+ * count white space on current line
+ */
+! newindent = get_indent_str(saved_line, (int)curbuf->b_p_ts);
+ if (newindent == 0 && !(flags & OPENLINE_COM_LIST))
+ newindent = second_line_indent; /* for ^^D command in insert mode */
+
+--- 737,743 ----
+ /*
+ * count white space on current line
+ */
+! newindent = get_indent_str(saved_line, (int)curbuf->b_p_ts, FALSE);
+ if (newindent == 0 && !(flags & OPENLINE_COM_LIST))
+ newindent = second_line_indent; /* for ^^D command in insert mode */
+
+***************
+*** 1201,1207 ****
+ || do_si
+ #endif
+ )
+! newindent = get_indent_str(leader, (int)curbuf->b_p_ts);
+
+ /* Add the indent offset */
+ if (newindent + off < 0)
+--- 1260,1266 ----
+ || do_si
+ #endif
+ )
+! newindent = get_indent_str(leader, (int)curbuf->b_p_ts, FALSE);
+
+ /* Add the indent offset */
+ if (newindent + off < 0)
+***************
+*** 1994,1999 ****
+--- 2053,2059 ----
+ char_u *s;
+ int lines = 0;
+ int width;
++ char_u *line;
+
+ #ifdef FEAT_DIFF
+ /* Check for filler lines above this buffer line. When folded the result
+***************
+*** 2009,2020 ****
+ return lines + 1;
+ #endif
+
+! s = ml_get_buf(wp->w_buffer, lnum, FALSE);
+
+ col = 0;
+ while (*s != NUL && --column >= 0)
+ {
+! col += win_lbr_chartabsize(wp, s, (colnr_T)col, NULL);
+ mb_ptr_adv(s);
+ }
+
+--- 2069,2080 ----
+ return lines + 1;
+ #endif
+
+! line = s = ml_get_buf(wp->w_buffer, lnum, FALSE);
+
+ col = 0;
+ while (*s != NUL && --column >= 0)
+ {
+! col += win_lbr_chartabsize(wp, line, s, (colnr_T)col, NULL);
+ mb_ptr_adv(s);
+ }
+
+***************
+*** 2026,2032 ****
+ * 'ts') -- webb.
+ */
+ if (*s == TAB && (State & NORMAL) && (!wp->w_p_list || lcs_tab1))
+! col += win_lbr_chartabsize(wp, s, (colnr_T)col, NULL) - 1;
+
+ /*
+ * Add column offset for 'number', 'relativenumber', 'foldcolumn', etc.
+--- 2086,2092 ----
+ * 'ts') -- webb.
+ */
+ if (*s == TAB && (State & NORMAL) && (!wp->w_p_list || lcs_tab1))
+! col += win_lbr_chartabsize(wp, line, s, (colnr_T)col, NULL) - 1;
+
+ /*
+ * Add column offset for 'number', 'relativenumber', 'foldcolumn', etc.
+***************
+*** 9002,9011 ****
+ amount = 2;
+ else
+ {
+ amount = 0;
+ while (*that && col)
+ {
+! amount += lbr_chartabsize_adv(&that, (colnr_T)amount);
+ col--;
+ }
+
+--- 9062,9073 ----
+ amount = 2;
+ else
+ {
++ char_u *line = that;
++
+ amount = 0;
+ while (*that && col)
+ {
+! amount += lbr_chartabsize_adv(line, &that, (colnr_T)amount);
+ col--;
+ }
+
+***************
+*** 9028,9034 ****
+
+ while (vim_iswhite(*that))
+ {
+! amount += lbr_chartabsize(that, (colnr_T)amount);
+ ++that;
+ }
+
+--- 9090,9096 ----
+
+ while (vim_iswhite(*that))
+ {
+! amount += lbr_chartabsize(line, that, (colnr_T)amount);
+ ++that;
+ }
+
+***************
+*** 9066,9080 ****
+ && !quotecount)
+ --parencount;
+ if (*that == '\\' && *(that+1) != NUL)
+! amount += lbr_chartabsize_adv(&that,
+! (colnr_T)amount);
+! amount += lbr_chartabsize_adv(&that,
+! (colnr_T)amount);
+ }
+ }
+ while (vim_iswhite(*that))
+ {
+! amount += lbr_chartabsize(that, (colnr_T)amount);
+ that++;
+ }
+ if (!*that || *that == ';')
+--- 9128,9143 ----
+ && !quotecount)
+ --parencount;
+ if (*that == '\\' && *(that+1) != NUL)
+! amount += lbr_chartabsize_adv(
+! line, &that, (colnr_T)amount);
+! amount += lbr_chartabsize_adv(
+! line, &that, (colnr_T)amount);
+ }
+ }
+ while (vim_iswhite(*that))
+ {
+! amount += lbr_chartabsize(
+! line, that, (colnr_T)amount);
+ that++;
+ }
+ if (!*that || *that == ';')
+*** ../vim-7.4.337/src/misc2.c 2014-05-07 18:35:25.669216052 +0200
+--- src/misc2.c 2014-06-25 13:21:18.474170904 +0200
+***************
+*** 201,210 ****
+ {
+ /* Count a tab for what it's worth (if list mode not on) */
+ #ifdef FEAT_LINEBREAK
+! csize = win_lbr_chartabsize(curwin, ptr, col, &head);
+ mb_ptr_adv(ptr);
+ #else
+! csize = lbr_chartabsize_adv(&ptr, col);
+ #endif
+ col += csize;
+ }
+--- 201,210 ----
+ {
+ /* Count a tab for what it's worth (if list mode not on) */
+ #ifdef FEAT_LINEBREAK
+! csize = win_lbr_chartabsize(curwin, line, ptr, col, &head);
+ mb_ptr_adv(ptr);
+ #else
+! csize = lbr_chartabsize_adv(line, &ptr, col);
+ #endif
+ col += csize;
+ }
+***************
+*** 2156,2162 ****
+ }
+ }
+
+! #if (defined(UNIX) && !defined(USE_SYSTEM)) || defined(WIN3264)
+ /*
+ * Append the text in "gap" below the cursor line and clear "gap".
+ */
+--- 2156,2163 ----
+ }
+ }
+
+! #if (defined(UNIX) && !defined(USE_SYSTEM)) || defined(WIN3264) \
+! || defined(PROTO)
+ /*
+ * Append the text in "gap" below the cursor line and clear "gap".
+ */
+*** ../vim-7.4.337/src/ops.c 2014-06-17 18:16:08.420691059 +0200
+--- src/ops.c 2014-06-25 13:18:27.082164420 +0200
+***************
+*** 420,426 ****
+ }
+ for ( ; vim_iswhite(*bd.textstart); )
+ {
+! incr = lbr_chartabsize_adv(&bd.textstart, (colnr_T)(bd.start_vcol));
+ total += incr;
+ bd.start_vcol += incr;
+ }
+--- 420,428 ----
+ }
+ for ( ; vim_iswhite(*bd.textstart); )
+ {
+! /* TODO: is passing bd.textstart for start of the line OK? */
+! incr = lbr_chartabsize_adv(bd.textstart, &bd.textstart,
+! (colnr_T)(bd.start_vcol));
+ total += incr;
+ bd.start_vcol += incr;
+ }
+***************
+*** 480,486 ****
+
+ while (vim_iswhite(*non_white))
+ {
+! incr = lbr_chartabsize_adv(&non_white, non_white_col);
+ non_white_col += incr;
+ }
+
+--- 482,488 ----
+
+ while (vim_iswhite(*non_white))
+ {
+! incr = lbr_chartabsize_adv(bd.textstart, &non_white, non_white_col);
+ non_white_col += incr;
+ }
+
+***************
+*** 505,511 ****
+ verbatim_copy_width -= bd.start_char_vcols;
+ while (verbatim_copy_width < destination_col)
+ {
+! incr = lbr_chartabsize(verbatim_copy_end, verbatim_copy_width);
+ if (verbatim_copy_width + incr > destination_col)
+ break;
+ verbatim_copy_width += incr;
+--- 507,517 ----
+ verbatim_copy_width -= bd.start_char_vcols;
+ while (verbatim_copy_width < destination_col)
+ {
+! char_u *line = verbatim_copy_end;
+!
+! /* TODO: is passing verbatim_copy_end for start of the line OK? */
+! incr = lbr_chartabsize(line, verbatim_copy_end,
+! verbatim_copy_width);
+ if (verbatim_copy_width + incr > destination_col)
+ break;
+ verbatim_copy_width += incr;
+***************
+*** 3617,3623 ****
+ for (ptr = oldp; vcol < col && *ptr; )
+ {
+ /* Count a tab for what it's worth (if list mode not on) */
+! incr = lbr_chartabsize_adv(&ptr, (colnr_T)vcol);
+ vcol += incr;
+ }
+ bd.textcol = (colnr_T)(ptr - oldp);
+--- 3623,3629 ----
+ for (ptr = oldp; vcol < col && *ptr; )
+ {
+ /* Count a tab for what it's worth (if list mode not on) */
+! incr = lbr_chartabsize_adv(oldp, &ptr, (colnr_T)vcol);
+ vcol += incr;
+ }
+ bd.textcol = (colnr_T)(ptr - oldp);
+***************
+*** 3651,3657 ****
+ /* calculate number of spaces required to fill right side of block*/
+ spaces = y_width + 1;
+ for (j = 0; j < yanklen; j++)
+! spaces -= lbr_chartabsize(&y_array[i][j], 0);
+ if (spaces < 0)
+ spaces = 0;
+
+--- 3657,3663 ----
+ /* calculate number of spaces required to fill right side of block*/
+ spaces = y_width + 1;
+ for (j = 0; j < yanklen; j++)
+! spaces -= lbr_chartabsize(NULL, &y_array[i][j], 0);
+ if (spaces < 0)
+ spaces = 0;
+
+***************
+*** 5203,5209 ****
+ while (bdp->start_vcol < oap->start_vcol && *pstart)
+ {
+ /* Count a tab for what it's worth (if list mode not on) */
+! incr = lbr_chartabsize(pstart, (colnr_T)bdp->start_vcol);
+ bdp->start_vcol += incr;
+ #ifdef FEAT_VISUALEXTRA
+ if (vim_iswhite(*pstart))
+--- 5209,5215 ----
+ while (bdp->start_vcol < oap->start_vcol && *pstart)
+ {
+ /* Count a tab for what it's worth (if list mode not on) */
+! incr = lbr_chartabsize(line, pstart, (colnr_T)bdp->start_vcol);
+ bdp->start_vcol += incr;
+ #ifdef FEAT_VISUALEXTRA
+ if (vim_iswhite(*pstart))
+***************
+*** 5272,5278 ****
+ {
+ /* Count a tab for what it's worth (if list mode not on) */
+ prev_pend = pend;
+! incr = lbr_chartabsize_adv(&pend, (colnr_T)bdp->end_vcol);
+ bdp->end_vcol += incr;
+ }
+ if (bdp->end_vcol <= oap->end_vcol
+--- 5278,5287 ----
+ {
+ /* Count a tab for what it's worth (if list mode not on) */
+ prev_pend = pend;
+! /* TODO: is passing prev_pend for start of the line OK?
+! * perhaps it should be "line". */
+! incr = lbr_chartabsize_adv(prev_pend, &pend,
+! (colnr_T)bdp->end_vcol);
+ bdp->end_vcol += incr;
+ }
+ if (bdp->end_vcol <= oap->end_vcol
+***************
+*** 6882,6888 ****
+ validate_virtcol();
+ col_print(buf1, sizeof(buf1), (int)curwin->w_cursor.col + 1,
+ (int)curwin->w_virtcol + 1);
+! col_print(buf2, sizeof(buf2), (int)STRLEN(p), linetabsize(p));
+
+ if (char_count_cursor == byte_count_cursor
+ && char_count == byte_count)
+--- 6891,6898 ----
+ validate_virtcol();
+ col_print(buf1, sizeof(buf1), (int)curwin->w_cursor.col + 1,
+ (int)curwin->w_virtcol + 1);
+! col_print(buf2, sizeof(buf2), (int)STRLEN(p),
+! linetabsize(p));
+
+ if (char_count_cursor == byte_count_cursor
+ && char_count == byte_count)
+*** ../vim-7.4.337/src/option.c 2014-06-25 11:48:40.733960646 +0200
+--- src/option.c 2014-06-25 14:31:41.630330672 +0200
+***************
+*** 188,193 ****
+--- 188,197 ----
+ #ifdef FEAT_ARABIC
+ # define PV_ARAB OPT_WIN(WV_ARAB)
+ #endif
++ #ifdef FEAT_LINEBREAK
++ # define PV_BRI OPT_WIN(WV_BRI)
++ # define PV_BRIOPT OPT_WIN(WV_BRIOPT)
++ #endif
+ #ifdef FEAT_DIFF
+ # define PV_DIFF OPT_WIN(WV_DIFF)
+ #endif
+***************
+*** 648,653 ****
+--- 652,675 ----
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+ SCRIPTID_INIT},
++ {"breakindent", "bri", P_BOOL|P_VI_DEF|P_VIM|P_RWIN,
++ #ifdef FEAT_LINEBREAK
++ (char_u *)VAR_WIN, PV_BRI,
++ {(char_u *)FALSE, (char_u *)0L}
++ #else
++ (char_u *)NULL, PV_NONE,
++ {(char_u *)0L, (char_u *)0L}
++ #endif
++ SCRIPTID_INIT},
++ {"breakindentopt", "briopt", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF|P_COMMA|P_NODUP,
++ #ifdef FEAT_LINEBREAK
++ (char_u *)VAR_WIN, PV_BRIOPT,
++ {(char_u *)"", (char_u *)NULL}
++ #else
++ (char_u *)NULL, PV_NONE,
++ {(char_u *)"", (char_u *)NULL}
++ #endif
++ SCRIPTID_INIT},
+ {"browsedir", "bsdir",P_STRING|P_VI_DEF,
+ #ifdef FEAT_BROWSE
+ (char_u *)&p_bsdir, PV_NONE,
+***************
+*** 5256,5261 ****
+--- 5278,5286 ----
+ /* set cedit_key */
+ (void)check_cedit();
+ #endif
++ #ifdef FEAT_LINEBREAK
++ briopt_check();
++ #endif
+ }
+
+ /*
+***************
+*** 5709,5714 ****
+--- 5734,5747 ----
+ *p_pm == '.' ? p_pm + 1 : p_pm) == 0)
+ errmsg = (char_u *)N_("E589: 'backupext' and 'patchmode' are equal");
+ }
++ #ifdef FEAT_LINEBREAK
++ /* 'breakindentopt' */
++ else if (varp == &curwin->w_p_briopt)
++ {
++ if (briopt_check() == FAIL)
++ errmsg = e_invarg;
++ }
++ #endif
+
+ /*
+ * 'isident', 'iskeyword', 'isprint or 'isfname' option: refill chartab[]
+***************
+*** 10018,10023 ****
+--- 10051,10058 ----
+ case PV_WRAP: return (char_u *)&(curwin->w_p_wrap);
+ #ifdef FEAT_LINEBREAK
+ case PV_LBR: return (char_u *)&(curwin->w_p_lbr);
++ case PV_BRI: return (char_u *)&(curwin->w_p_bri);
++ case PV_BRIOPT: return (char_u *)&(curwin->w_p_briopt);
+ #endif
+ #ifdef FEAT_SCROLLBIND
+ case PV_SCBIND: return (char_u *)&(curwin->w_p_scb);
+***************
+*** 10207,10212 ****
+--- 10242,10249 ----
+ #endif
+ #ifdef FEAT_LINEBREAK
+ to->wo_lbr = from->wo_lbr;
++ to->wo_bri = from->wo_bri;
++ to->wo_briopt = vim_strsave(from->wo_briopt);
+ #endif
+ #ifdef FEAT_SCROLLBIND
+ to->wo_scb = from->wo_scb;
+***************
+*** 10294,10299 ****
+--- 10331,10339 ----
+ #ifdef FEAT_CONCEAL
+ check_string_option(&wop->wo_cocu);
+ #endif
++ #ifdef FEAT_LINEBREAK
++ check_string_option(&wop->wo_briopt);
++ #endif
+ }
+
+ /*
+***************
+*** 10313,10318 ****
+--- 10353,10361 ----
+ # endif
+ clear_string_option(&wop->wo_fmr);
+ #endif
++ #ifdef FEAT_LINEBREAK
++ clear_string_option(&wop->wo_briopt);
++ #endif
+ #ifdef FEAT_RIGHTLEFT
+ clear_string_option(&wop->wo_rlc);
+ #endif
+***************
+*** 11927,11929 ****
+--- 11970,12018 ----
+ ++ptr;
+ }
+ }
++
++ #if defined(FEAT_LINEBREAK) || defined(PROTO)
++ /*
++ * This is called when 'breakindentopt' is changed and when a window is
++ * initialized.
++ */
++ int
++ briopt_check()
++ {
++ char_u *p;
++ int bri_shift = 0;
++ long bri_min = 20;
++ int bri_sbr = FALSE;
++
++ p = curwin->w_p_briopt;
++ while (*p != NUL)
++ {
++ if (STRNCMP(p, "shift:", 6) == 0
++ && ((p[6] == '-' && VIM_ISDIGIT(p[7])) || VIM_ISDIGIT(p[6])))
++ {
++ p += 6;
++ bri_shift = getdigits(&p);
++ }
++ else if (STRNCMP(p, "min:", 4) == 0 && VIM_ISDIGIT(p[4]))
++ {
++ p += 4;
++ bri_min = getdigits(&p);
++ }
++ else if (STRNCMP(p, "sbr", 3) == 0)
++ {
++ p += 3;
++ bri_sbr = TRUE;
++ }
++ if (*p != ',' && *p != NUL)
++ return FAIL;
++ if (*p == ',')
++ ++p;
++ }
++
++ curwin->w_p_brishift = bri_shift;
++ curwin->w_p_brimin = bri_min;
++ curwin->w_p_brisbr = bri_sbr;
++
++ return OK;
++ }
++ #endif
+*** ../vim-7.4.337/src/option.h 2014-05-28 21:40:47.092329130 +0200
+--- src/option.h 2014-06-25 12:57:01.002115765 +0200
+***************
+*** 1052,1057 ****
+--- 1052,1061 ----
+ #ifdef FEAT_CURSORBIND
+ , WV_CRBIND
+ #endif
++ #ifdef FEAT_LINEBREAK
++ , WV_BRI
++ , WV_BRIOPT
++ #endif
+ #ifdef FEAT_DIFF
+ , WV_DIFF
+ #endif
+*** ../vim-7.4.337/src/proto/charset.pro 2013-08-10 13:37:07.000000000 +0200
+--- src/proto/charset.pro 2014-06-25 13:22:32.934173721 +0200
+***************
+*** 16,22 ****
+ int chartabsize __ARGS((char_u *p, colnr_T col));
+ int linetabsize __ARGS((char_u *s));
+ int linetabsize_col __ARGS((int startcol, char_u *s));
+! int win_linetabsize __ARGS((win_T *wp, char_u *p, colnr_T len));
+ int vim_isIDc __ARGS((int c));
+ int vim_iswordc __ARGS((int c));
+ int vim_iswordc_buf __ARGS((int c, buf_T *buf));
+--- 16,22 ----
+ int chartabsize __ARGS((char_u *p, colnr_T col));
+ int linetabsize __ARGS((char_u *s));
+ int linetabsize_col __ARGS((int startcol, char_u *s));
+! int win_linetabsize __ARGS((win_T *wp, char_u *line, colnr_T len));
+ int vim_isIDc __ARGS((int c));
+ int vim_iswordc __ARGS((int c));
+ int vim_iswordc_buf __ARGS((int c, buf_T *buf));
+***************
+*** 26,34 ****
+ int vim_isfilec_or_wc __ARGS((int c));
+ int vim_isprintc __ARGS((int c));
+ int vim_isprintc_strict __ARGS((int c));
+! int lbr_chartabsize __ARGS((unsigned char *s, colnr_T col));
+! int lbr_chartabsize_adv __ARGS((char_u **s, colnr_T col));
+! int win_lbr_chartabsize __ARGS((win_T *wp, char_u *s, colnr_T col, int *headp));
+ int in_win_border __ARGS((win_T *wp, colnr_T vcol));
+ void getvcol __ARGS((win_T *wp, pos_T *pos, colnr_T *start, colnr_T *cursor, colnr_T *end));
+ colnr_T getvcol_nolist __ARGS((pos_T *posp));
+--- 26,34 ----
+ int vim_isfilec_or_wc __ARGS((int c));
+ int vim_isprintc __ARGS((int c));
+ int vim_isprintc_strict __ARGS((int c));
+! int lbr_chartabsize __ARGS((char_u *line, unsigned char *s, colnr_T col));
+! int lbr_chartabsize_adv __ARGS((char_u *line, char_u **s, colnr_T col));
+! int win_lbr_chartabsize __ARGS((win_T *wp, char_u *line, char_u *s, colnr_T col, int *headp));
+ int in_win_border __ARGS((win_T *wp, colnr_T vcol));
+ void getvcol __ARGS((win_T *wp, pos_T *pos, colnr_T *start, colnr_T *cursor, colnr_T *end));
+ colnr_T getvcol_nolist __ARGS((pos_T *posp));
+*** ../vim-7.4.337/src/proto/misc1.pro 2014-05-07 15:10:17.661108310 +0200
+--- src/proto/misc1.pro 2014-06-25 12:57:01.002115765 +0200
+***************
+*** 2,10 ****
+ int get_indent __ARGS((void));
+ int get_indent_lnum __ARGS((linenr_T lnum));
+ int get_indent_buf __ARGS((buf_T *buf, linenr_T lnum));
+! int get_indent_str __ARGS((char_u *ptr, int ts));
+ int set_indent __ARGS((int size, int flags));
+ int get_number_indent __ARGS((linenr_T lnum));
+ int open_line __ARGS((int dir, int flags, int second_line_indent));
+ int get_leader_len __ARGS((char_u *line, char_u **flags, int backward, int include_space));
+ int get_last_leader_offset __ARGS((char_u *line, char_u **flags));
+--- 2,11 ----
+ int get_indent __ARGS((void));
+ int get_indent_lnum __ARGS((linenr_T lnum));
+ int get_indent_buf __ARGS((buf_T *buf, linenr_T lnum));
+! int get_indent_str __ARGS((char_u *ptr, int ts, int list));
+ int set_indent __ARGS((int size, int flags));
+ int get_number_indent __ARGS((linenr_T lnum));
++ int get_breakindent_win __ARGS((win_T *wp, char_u *ptr));
+ int open_line __ARGS((int dir, int flags, int second_line_indent));
+ int get_leader_len __ARGS((char_u *line, char_u **flags, int backward, int include_space));
+ int get_last_leader_offset __ARGS((char_u *line, char_u **flags));
+*** ../vim-7.4.337/src/proto/option.pro 2014-01-14 16:54:53.000000000 +0100
+--- src/proto/option.pro 2014-06-25 14:16:04.882295233 +0200
+***************
+*** 63,66 ****
+--- 63,67 ----
+ long get_sw_value __ARGS((buf_T *buf));
+ long get_sts_value __ARGS((void));
+ void find_mps_values __ARGS((int *initc, int *findc, int *backwards, int switchit));
++ int briopt_check __ARGS((void));
+ /* vim: set ft=c : */
+*** ../vim-7.4.337/src/screen.c 2014-06-18 21:20:07.232377308 +0200
+--- src/screen.c 2014-06-25 13:43:39.930221653 +0200
+***************
+*** 2962,2971 ****
+ # define WL_SIGN WL_FOLD /* column for signs */
+ #endif
+ #define WL_NR WL_SIGN + 1 /* line number */
+ #if defined(FEAT_LINEBREAK) || defined(FEAT_DIFF)
+! # define WL_SBR WL_NR + 1 /* 'showbreak' or 'diff' */
+ #else
+! # define WL_SBR WL_NR
+ #endif
+ #define WL_LINE WL_SBR + 1 /* text in the line */
+ int draw_state = WL_START; /* what to draw next */
+--- 2962,2976 ----
+ # define WL_SIGN WL_FOLD /* column for signs */
+ #endif
+ #define WL_NR WL_SIGN + 1 /* line number */
++ #ifdef FEAT_LINEBREAK
++ # define WL_BRI WL_NR + 1 /* 'breakindent' */
++ #else
++ # define WL_BRI WL_NR
++ #endif
+ #if defined(FEAT_LINEBREAK) || defined(FEAT_DIFF)
+! # define WL_SBR WL_BRI + 1 /* 'showbreak' or 'diff' */
+ #else
+! # define WL_SBR WL_BRI
+ #endif
+ #define WL_LINE WL_SBR + 1 /* text in the line */
+ int draw_state = WL_START; /* what to draw next */
+***************
+*** 3301,3307 ****
+ #endif
+ while (vcol < v && *ptr != NUL)
+ {
+! c = win_lbr_chartabsize(wp, ptr, (colnr_T)vcol, NULL);
+ vcol += c;
+ #ifdef FEAT_MBYTE
+ prev_ptr = ptr;
+--- 3306,3312 ----
+ #endif
+ while (vcol < v && *ptr != NUL)
+ {
+! c = win_lbr_chartabsize(wp, line, ptr, (colnr_T)vcol, NULL);
+ vcol += c;
+ #ifdef FEAT_MBYTE
+ prev_ptr = ptr;
+***************
+*** 3670,3675 ****
+--- 3675,3718 ----
+ }
+ }
+
++ #ifdef FEAT_LINEBREAK
++ if (wp->w_p_brisbr && draw_state == WL_BRI - 1
++ && n_extra == 0 && *p_sbr != NUL)
++ /* draw indent after showbreak value */
++ draw_state = WL_BRI;
++ else if (wp->w_p_brisbr && draw_state == WL_SBR && n_extra == 0)
++ /* After the showbreak, draw the breakindent */
++ draw_state = WL_BRI - 1;
++
++ /* draw 'breakindent': indent wrapped text accordingly */
++ if (draw_state == WL_BRI - 1 && n_extra == 0)
++ {
++ draw_state = WL_BRI;
++ # ifdef FEAT_DIFF
++ # endif
++ if (wp->w_p_bri && n_extra == 0 && row != startrow
++ #ifdef FEAT_DIFF
++ && filler_lines == 0
++ #endif
++ )
++ {
++ char_attr = 0; /* was: hl_attr(HLF_AT); */
++ #ifdef FEAT_DIFF
++ if (diff_hlf != (hlf_T)0)
++ char_attr = hl_attr(diff_hlf);
++ #endif
++ p_extra = NUL;
++ c_extra = ' ';
++ n_extra = get_breakindent_win(wp,
++ ml_get_buf(wp->w_buffer, lnum, FALSE));
++ /* Correct end of highlighted area for 'breakindent',
++ * required when 'linebreak' is also set. */
++ if (tocol == vcol)
++ tocol += n_extra;
++ }
++ }
++ #endif
++
+ #if defined(FEAT_LINEBREAK) || defined(FEAT_DIFF)
+ if (draw_state == WL_SBR - 1 && n_extra == 0)
+ {
+***************
+*** 4382,4392 ****
+ if (wp->w_p_lbr && vim_isbreak(c) && !vim_isbreak(*ptr)
+ && !wp->w_p_list)
+ {
+! n_extra = win_lbr_chartabsize(wp, ptr - (
+ # ifdef FEAT_MBYTE
+ has_mbyte ? mb_l :
+ # endif
+! 1), (colnr_T)vcol, NULL) - 1;
+ c_extra = ' ';
+ if (vim_iswhite(c))
+ {
+--- 4425,4438 ----
+ if (wp->w_p_lbr && vim_isbreak(c) && !vim_isbreak(*ptr)
+ && !wp->w_p_list)
+ {
+! char_u *p = ptr - (
+ # ifdef FEAT_MBYTE
+ has_mbyte ? mb_l :
+ # endif
+! 1);
+! /* TODO: is passing p for start of the line OK? */
+! n_extra = win_lbr_chartabsize(wp, p, p, (colnr_T)vcol,
+! NULL) - 1;
+ c_extra = ' ';
+ if (vim_iswhite(c))
+ {
+***************
+*** 8916,8923 ****
+ {
+ if (noinvcurs)
+ screen_stop_highlight();
+! if (row == screen_cur_row && (col > screen_cur_col) &&
+! *T_CRI != NUL)
+ term_cursor_right(col - screen_cur_col);
+ else
+ term_windgoto(row, col);
+--- 8962,8969 ----
+ {
+ if (noinvcurs)
+ screen_stop_highlight();
+! if (row == screen_cur_row && (col > screen_cur_col)
+! && *T_CRI != NUL)
+ term_cursor_right(col - screen_cur_col);
+ else
+ term_windgoto(row, col);
+*** ../vim-7.4.337/src/structs.h 2014-06-17 17:48:21.784628008 +0200
+--- src/structs.h 2014-06-25 12:57:01.006115766 +0200
+***************
+*** 134,139 ****
+--- 134,145 ----
+ int wo_arab;
+ # define w_p_arab w_onebuf_opt.wo_arab /* 'arabic' */
+ #endif
++ #ifdef FEAT_LINEBREAK
++ int wo_bri;
++ # define w_p_bri w_onebuf_opt.wo_bri /* 'breakindent' */
++ char_u *wo_briopt;
++ # define w_p_briopt w_onebuf_opt.wo_briopt /* 'breakindentopt' */
++ #endif
+ #ifdef FEAT_DIFF
+ int wo_diff;
+ # define w_p_diff w_onebuf_opt.wo_diff /* 'diff' */
+***************
+*** 2189,2194 ****
+--- 2195,2205 ----
+ #ifdef FEAT_SYN_HL
+ int *w_p_cc_cols; /* array of columns to highlight or NULL */
+ #endif
++ #ifdef FEAT_LINEBREAK
++ int w_p_brimin; /* minimum width for breakindent */
++ int w_p_brishift; /* additional shift for breakindent */
++ int w_p_brisbr; /* sbr in 'briopt' */
++ #endif
+
+ /* transform a pointer to a "onebuf" option into a "allbuf" option */
+ #define GLOBAL_WO(p) ((char *)p + sizeof(winopt_T))
+*** ../vim-7.4.337/src/testdir/Make_amiga.mak 2014-05-29 11:47:19.804773758 +0200
+--- src/testdir/Make_amiga.mak 2014-06-25 12:57:01.006115766 +0200
+***************
+*** 37,42 ****
+--- 37,43 ----
+ test99.out test100.out test101.out test102.out test103.out \
+ test104.out test105.out test106.out test107.out \
+ test_autoformat_join.out \
++ test_breakindent.out \
+ test_eval.out \
+ test_options.out
+
+***************
+*** 163,167 ****
+--- 164,169 ----
+ test106.out: test106.in
+ test107.out: test107.in
+ test_autoformat_join.out: test_autoformat_join.in
++ test_breakindent.out: test_breakindent.in
+ test_eval.out: test_eval.in
+ test_options.out: test_options.in
+*** ../vim-7.4.337/src/testdir/Make_dos.mak 2014-05-29 11:47:19.804773758 +0200
+--- src/testdir/Make_dos.mak 2014-06-25 12:57:01.006115766 +0200
+***************
+*** 36,41 ****
+--- 36,42 ----
+ test100.out test101.out test102.out test103.out test104.out \
+ test105.out test106.out test107.out\
+ test_autoformat_join.out \
++ test_breakindent.out \
+ test_eval.out \
+ test_options.out
+
+*** ../vim-7.4.337/src/testdir/Make_ming.mak 2014-05-29 11:47:19.804773758 +0200
+--- src/testdir/Make_ming.mak 2014-06-25 12:57:01.006115766 +0200
+***************
+*** 56,61 ****
+--- 56,62 ----
+ test100.out test101.out test102.out test103.out test104.out \
+ test105.out test106.out test107.out \
+ test_autoformat_join.out \
++ test_breakindent.out \
+ test_eval.out \
+ test_options.out
+
+*** ../vim-7.4.337/src/testdir/Make_os2.mak 2014-05-29 11:47:19.804773758 +0200
+--- src/testdir/Make_os2.mak 2014-06-25 12:59:45.774121999 +0200
+***************
+*** 39,44 ****
+--- 39,45 ----
+ test105.out test106.out test107.out \
+ test_autoformat_join.out \
+ test_eval.out \
++ test_breakindent.out \
+ test_options.out
+
+ .SUFFIXES: .in .out
+*** ../vim-7.4.337/src/testdir/Make_vms.mms 2014-05-29 11:47:19.804773758 +0200
+--- src/testdir/Make_vms.mms 2014-06-25 12:57:01.006115766 +0200
+***************
+*** 97,102 ****
+--- 97,103 ----
+ test100.out test101.out test103.out test104.out \
+ test105.out test106.out test107.out \
+ test_autoformat_join.out \
++ test_breakindent.out \
+ test_eval.out \
+ test_options.out
+
+*** ../vim-7.4.337/src/testdir/Makefile 2014-05-29 11:47:19.804773758 +0200
+--- src/testdir/Makefile 2014-06-25 12:57:01.006115766 +0200
+***************
+*** 34,39 ****
+--- 34,40 ----
+ test99.out test100.out test101.out test102.out test103.out \
+ test104.out test105.out test106.out test107.out \
+ test_autoformat_join.out \
++ test_breakindent.out \
+ test_eval.out \
+ test_options.out
+
+*** ../vim-7.4.337/src/testdir/test_breakindent.in 2014-06-25 14:36:28.690341532 +0200
+--- src/testdir/test_breakindent.in 2014-06-25 14:26:00.994317785 +0200
+***************
+*** 0 ****
+--- 1,79 ----
++ Test for breakindent
++
++ STARTTEST
++ :so small.vim
++ :if !exists("+breakindent") | e! test.ok | w! test.out | qa! | endif
++ :10new|:vsp|:vert resize 20
++ :put =\"\tabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP\"
++ :set ts=4 sw=4 sts=4 breakindent
++ :fu! ScreenChar(width)
++ : let c=''
++ : for i in range(1,a:width)
++ : let c.=nr2char(screenchar(line('.'), i))
++ : endfor
++ : let c.="\n"
++ : for i in range(1,a:width)
++ : let c.=nr2char(screenchar(line('.')+1, i))
++ : endfor
++ : let c.="\n"
++ : for i in range(1,a:width)
++ : let c.=nr2char(screenchar(line('.')+2, i))
++ : endfor
++ : return c
++ :endfu
++ :fu DoRecordScreen()
++ : wincmd l
++ : $put =printf(\"\n%s\", g:test)
++ : $put =g:line1
++ : wincmd p
++ :endfu
++ :let g:test="Test 1: Simple breakindent"
++ :let line1=ScreenChar(8)
++ :call DoRecordScreen()
++ :let g:test="Test 2: Simple breakindent + sbr=>>"
++ :set sbr=>>
++ :let line1=ScreenChar(8)
++ :call DoRecordScreen()
++ :let g:test ="Test 3: Simple breakindent + briopt:sbr"
++ :set briopt=sbr,min:0 sbr=++
++ :let line1=ScreenChar(8)
++ :call DoRecordScreen()
++ :let g:test ="Test 4: Simple breakindent + min width: 18"
++ :set sbr= briopt=min:18
++ :let line1=ScreenChar(8)
++ :call DoRecordScreen()
++ :let g:test =" Test 5: Simple breakindent + shift by 2"
++ :set briopt=shift:2,min:0
++ :let line1=ScreenChar(8)
++ :call DoRecordScreen()
++ :let g:test=" Test 6: Simple breakindent + shift by -1"
++ :set briopt=shift:-1,min:0
++ :let line1=ScreenChar(8)
++ :call DoRecordScreen()
++ :let g:test=" Test 7: breakindent + shift by +1 + nu + sbr=? briopt:sbr"
++ :set briopt=shift:1,sbr,min:0 nu sbr=? nuw=4
++ :let line1=ScreenChar(10)
++ :call DoRecordScreen()
++ :let g:test=" Test 8: breakindent + shift:1 + nu + sbr=# list briopt:sbr"
++ :set briopt=shift:1,sbr,min:0 nu sbr=# list
++ :let line1=ScreenChar(10)
++ :call DoRecordScreen()
++ :let g:test=" Test 9: breakindent + shift by +1 + 'nu' + sbr=# list"
++ :set briopt-=sbr
++ :let line1=ScreenChar(10)
++ :call DoRecordScreen()
++ :let g:test=" Test 10: breakindent + shift by +1 + 'nu' + sbr=~ cpo+=n"
++ :set cpo+=n sbr=~ nu nuw=4 nolist briopt=sbr,min:0
++ :let line1=ScreenChar(10)
++ :call DoRecordScreen()
++ :wincmd p
++ :let g:test="\n Test 11: strdisplaywidth when breakindent is on"
++ :set cpo-=n sbr=>> nu nuw=4 nolist briopt= ts=4
++ :let text=getline(2) "skip leading tab when calculating text width
++ :let width = strlen(text[1:])+indent(2)*4+strlen(&sbr)*3 " text wraps 3 times
++ :$put =g:test
++ :$put =printf(\"strdisplaywidth: %d == calculated: %d\", strdisplaywidth(text), width)
++ :%w! test.out
++ :qa!
++ ENDTEST
++ dummy text
+*** ../vim-7.4.337/src/testdir/test_breakindent.ok 2014-06-25 14:36:28.698341532 +0200
+--- src/testdir/test_breakindent.ok 2014-06-25 12:57:01.006115766 +0200
+***************
+*** 0 ****
+--- 1,55 ----
++
++ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP
++
++ Test 1: Simple breakindent
++ abcd
++ qrst
++ GHIJ
++
++ Test 2: Simple breakindent + sbr=>>
++ abcd
++ >>qr
++ >>EF
++
++ Test 3: Simple breakindent + briopt:sbr
++ abcd
++ ++ qrst
++ ++ GHIJ
++
++ Test 4: Simple breakindent + min width: 18
++ abcd
++ qrstuv
++ IJKLMN
++
++ Test 5: Simple breakindent + shift by 2
++ abcd
++ qr
++ EF
++
++ Test 6: Simple breakindent + shift by -1
++ abcd
++ qrstu
++ HIJKL
++
++ Test 7: breakindent + shift by +1 + nu + sbr=? briopt:sbr
++ 2 ab
++ ? m
++ ? x
++
++ Test 8: breakindent + shift:1 + nu + sbr=# list briopt:sbr
++ 2 ^Iabcd
++ # opq
++ # BCD
++
++ Test 9: breakindent + shift by +1 + 'nu' + sbr=# list
++ 2 ^Iabcd
++ #op
++ #AB
++
++ Test 10: breakindent + shift by +1 + 'nu' + sbr=~ cpo+=n
++ 2 ab
++ ~ mn
++ ~ yz
++
++ Test 11: strdisplaywidth when breakindent is on
++ strdisplaywidth: 46 == calculated: 64
+*** ../vim-7.4.337/src/ui.c 2014-06-12 13:28:26.771694851 +0200
+--- src/ui.c 2014-06-25 13:22:20.218173240 +0200
+***************
+*** 3162,3176 ****
+ /* try to advance to the specified column */
+ int count = 0;
+ char_u *ptr;
+! char_u *start;
+
+! start = ptr = ml_get_buf(wp->w_buffer, lnum, FALSE);
+ while (count < vcol && *ptr != NUL)
+ {
+! count += win_lbr_chartabsize(wp, ptr, count, NULL);
+ mb_ptr_adv(ptr);
+ }
+! return (int)(ptr - start);
+ }
+ #endif
+
+--- 3162,3176 ----
+ /* try to advance to the specified column */
+ int count = 0;
+ char_u *ptr;
+! char_u *line;
+
+! line = ptr = ml_get_buf(wp->w_buffer, lnum, FALSE);
+ while (count < vcol && *ptr != NUL)
+ {
+! count += win_lbr_chartabsize(wp, line, ptr, count, NULL);
+ mb_ptr_adv(ptr);
+ }
+! return (int)(ptr - line);
+ }
+ #endif
+
+*** ../vim-7.4.337/src/version.c 2014-06-25 12:26:42.230046959 +0200
+--- src/version.c 2014-06-25 13:00:26.990123558 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 338,
+ /**/
+
+--
+MORTICIAN: Bring out your dead!
+ [clang]
+ Bring out your dead!
+ [clang]
+ Bring out your dead!
+CUSTOMER: Here's one -- nine pence.
+DEAD PERSON: I'm not dead!
+ The Quest for the Holy Grail (Monty Python)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.339 b/patches/source/vim/patches/7.4.339
new file mode 100644
index 000000000..ffe2d16be
--- /dev/null
+++ b/patches/source/vim/patches/7.4.339
@@ -0,0 +1,79 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.339
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.339
+Problem: Local function is available globally.
+Solution: Add "static".
+Files: src/option.c, src/proto/option.pro
+
+
+*** ../vim-7.4.338/src/option.c 2014-06-25 14:39:35.110348584 +0200
+--- src/option.c 2014-06-25 14:42:33.986355351 +0200
+***************
+*** 3074,3079 ****
+--- 3074,3080 ----
+ static char_u *get_varp_scope __ARGS((struct vimoption *p, int opt_flags));
+ static char_u *get_varp __ARGS((struct vimoption *));
+ static void option_value2string __ARGS((struct vimoption *, int opt_flags));
++ static void check_winopt __ARGS((winopt_T *wop));
+ static int wc_use_keyname __ARGS((char_u *varp, long *wcp));
+ #ifdef FEAT_LANGMAP
+ static void langmap_init __ARGS((void));
+***************
+*** 10305,10311 ****
+ /*
+ * Check for NULL pointers in a winopt_T and replace them with empty_option.
+ */
+! void
+ check_winopt(wop)
+ winopt_T *wop UNUSED;
+ {
+--- 10306,10312 ----
+ /*
+ * Check for NULL pointers in a winopt_T and replace them with empty_option.
+ */
+! static void
+ check_winopt(wop)
+ winopt_T *wop UNUSED;
+ {
+*** ../vim-7.4.338/src/proto/option.pro 2014-06-25 14:39:35.110348584 +0200
+--- src/proto/option.pro 2014-06-25 14:42:38.702355530 +0200
+***************
+*** 40,46 ****
+ void win_copy_options __ARGS((win_T *wp_from, win_T *wp_to));
+ void copy_winopt __ARGS((winopt_T *from, winopt_T *to));
+ void check_win_options __ARGS((win_T *win));
+- void check_winopt __ARGS((winopt_T *wop));
+ void clear_winopt __ARGS((winopt_T *wop));
+ void buf_copy_options __ARGS((buf_T *buf, int flags));
+ void reset_modifiable __ARGS((void));
+--- 40,45 ----
+*** ../vim-7.4.338/src/version.c 2014-06-25 14:39:35.114348584 +0200
+--- src/version.c 2014-06-25 14:43:41.502357905 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 339,
+ /**/
+
+--
+MORTICIAN: What?
+CUSTOMER: Nothing -- here's your nine pence.
+DEAD PERSON: I'm not dead!
+MORTICIAN: Here -- he says he's not dead!
+CUSTOMER: Yes, he is.
+DEAD PERSON: I'm not!
+ The Quest for the Holy Grail (Monty Python)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.340 b/patches/source/vim/patches/7.4.340
new file mode 100644
index 000000000..f4694201d
--- /dev/null
+++ b/patches/source/vim/patches/7.4.340
@@ -0,0 +1,97 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.340
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.340
+Problem: Error from sed about illegal bytes when installing Vim.
+Solution: Prepend LC_ALL=C. (Itchyny)
+Files: src/installman.sh
+
+
+*** ../vim-7.4.339/src/installman.sh 2010-05-15 13:04:07.000000000 +0200
+--- src/installman.sh 2014-06-25 14:54:11.742381748 +0200
+***************
+*** 43,52 ****
+ fi
+ fi
+
+ if test $what = "install"; then
+ # vim.1
+ echo installing $destdir/$exename.1
+! sed -e s+/usr/local/lib/vim+$vimloc+ \
+ -e s+$vimloc/doc+$helpsubloc+ \
+ -e s+$vimloc/print+$printsubloc+ \
+ -e s+$vimloc/syntax+$synsubloc+ \
+--- 43,55 ----
+ fi
+ fi
+
++ # Note: setting LC_ALL to C is required to avoid illegal byte errors from sed
++ # on some systems.
++
+ if test $what = "install"; then
+ # vim.1
+ echo installing $destdir/$exename.1
+! LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \
+ -e s+$vimloc/doc+$helpsubloc+ \
+ -e s+$vimloc/print+$printsubloc+ \
+ -e s+$vimloc/syntax+$synsubloc+ \
+***************
+*** 64,70 ****
+
+ # vimtutor.1
+ echo installing $destdir/$exename""tutor.1
+! sed -e s+/usr/local/lib/vim+$vimloc+ \
+ -e s+$vimloc/tutor+$tutorsubloc+ \
+ $helpsource/vimtutor$langadd.1 > $destdir/$exename""tutor.1
+ chmod $manmod $destdir/$exename""tutor.1
+--- 67,73 ----
+
+ # vimtutor.1
+ echo installing $destdir/$exename""tutor.1
+! LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \
+ -e s+$vimloc/tutor+$tutorsubloc+ \
+ $helpsource/vimtutor$langadd.1 > $destdir/$exename""tutor.1
+ chmod $manmod $destdir/$exename""tutor.1
+***************
+*** 76,82 ****
+
+ # evim.1
+ echo installing $destdir/$evimname.1
+! sed -e s+/usr/local/lib/vim+$vimloc+ \
+ -e s+$vimloc/evim.vim+$scriptloc/evim.vim+ \
+ $helpsource/evim$langadd.1 > $destdir/$evimname.1
+ chmod $manmod $destdir/$evimname.1
+--- 79,85 ----
+
+ # evim.1
+ echo installing $destdir/$evimname.1
+! LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \
+ -e s+$vimloc/evim.vim+$scriptloc/evim.vim+ \
+ $helpsource/evim$langadd.1 > $destdir/$evimname.1
+ chmod $manmod $destdir/$evimname.1
+*** ../vim-7.4.339/src/version.c 2014-06-25 14:44:04.458358774 +0200
+--- src/version.c 2014-06-25 14:55:14.198384111 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 340,
+ /**/
+
+--
+DEAD PERSON: I'm getting better!
+CUSTOMER: No, you're not -- you'll be stone dead in a moment.
+MORTICIAN: Oh, I can't take him like that -- it's against regulations.
+ The Quest for the Holy Grail (Monty Python)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.341 b/patches/source/vim/patches/7.4.341
new file mode 100644
index 000000000..061828a51
--- /dev/null
+++ b/patches/source/vim/patches/7.4.341
@@ -0,0 +1,178 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.341
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.341
+Problem: sort() doesn't handle numbers well.
+Solution: Add an argument to specify sorting on numbers. (Christian Brabandt)
+Files: runtime/doc/eval.txt, src/eval.c, src/testdir/test55.in,
+ src/testdir/test55.ok
+
+
+*** ../vim-7.4.340/runtime/doc/eval.txt 2014-06-25 14:39:35.094348583 +0200
+--- runtime/doc/eval.txt 2014-06-25 17:05:50.606680574 +0200
+***************
+*** 5618,5628 ****
+
+ If you want a list to remain unmodified make a copy first: >
+ :let sortedlist = sort(copy(mylist))
+- < Uses the string representation of each item to sort on.
+- Numbers sort after Strings, |Lists| after Numbers.
+- For sorting text in the current buffer use |:sort|.
+
+! When {func} is given and it is one then case is ignored.
+ When {func} is a |Funcref| or a function name, this function
+ is called to compare items. The function is invoked with two
+ items as argument and must return zero if they are equal, 1 or
+--- 5628,5647 ----
+
+ If you want a list to remain unmodified make a copy first: >
+ :let sortedlist = sort(copy(mylist))
+
+! < When {func} is omitted, is empty or zero, then sort() uses the
+! string representation of each item to sort on. Numbers sort
+! after Strings, |Lists| after Numbers. For sorting text in the
+! current buffer use |:sort|.
+!
+! When {func} is given and it is is '1' or 'i' then case is
+! ignored.
+!
+! When {func} is given and it is 'n' then all items will be
+! sorted numerical (Implementation detail: This uses the
+! strtod() function to parse numbers, Strings, Lists, Dicts and
+! Funcrefs will be considered as being 0).
+!
+ When {func} is a |Funcref| or a function name, this function
+ is called to compare items. The function is invoked with two
+ items as argument and must return zero if they are equal, 1 or
+*** ../vim-7.4.340/src/eval.c 2014-06-17 17:48:21.776628008 +0200
+--- src/eval.c 2014-06-25 17:23:05.466719724 +0200
+***************
+*** 17330,17335 ****
+--- 17330,17336 ----
+ item_compare2 __ARGS((const void *s1, const void *s2));
+
+ static int item_compare_ic;
++ static int item_compare_numeric;
+ static char_u *item_compare_func;
+ static dict_T *item_compare_selfdict;
+ static int item_compare_func_err;
+***************
+*** 17359,17368 ****
+ p1 = (char_u *)"";
+ if (p2 == NULL)
+ p2 = (char_u *)"";
+! if (item_compare_ic)
+! res = STRICMP(p1, p2);
+ else
+! res = STRCMP(p1, p2);
+ vim_free(tofree1);
+ vim_free(tofree2);
+ return res;
+--- 17360,17379 ----
+ p1 = (char_u *)"";
+ if (p2 == NULL)
+ p2 = (char_u *)"";
+! if (!item_compare_numeric)
+! {
+! if (item_compare_ic)
+! res = STRICMP(p1, p2);
+! else
+! res = STRCMP(p1, p2);
+! }
+ else
+! {
+! double n1, n2;
+! n1 = strtod((char *)p1, (char **)&p1);
+! n2 = strtod((char *)p2, (char **)&p2);
+! res = n1 == n2 ? 0 : n1 > n2 ? 1 : -1;
+! }
+ vim_free(tofree1);
+ vim_free(tofree2);
+ return res;
+***************
+*** 17439,17444 ****
+--- 17450,17456 ----
+ return; /* short list sorts pretty quickly */
+
+ item_compare_ic = FALSE;
++ item_compare_numeric = FALSE;
+ item_compare_func = NULL;
+ item_compare_selfdict = NULL;
+ if (argvars[1].v_type != VAR_UNKNOWN)
+***************
+*** 17457,17462 ****
+--- 17469,17487 ----
+ item_compare_ic = TRUE;
+ else
+ item_compare_func = get_tv_string(&argvars[1]);
++ if (item_compare_func != NULL)
++ {
++ if (STRCMP(item_compare_func, "n") == 0)
++ {
++ item_compare_func = NULL;
++ item_compare_numeric = TRUE;
++ }
++ else if (STRCMP(item_compare_func, "i") == 0)
++ {
++ item_compare_func = NULL;
++ item_compare_ic = TRUE;
++ }
++ }
+ }
+
+ if (argvars[2].v_type != VAR_UNKNOWN)
+*** ../vim-7.4.340/src/testdir/test55.in 2014-03-25 18:23:27.062087691 +0100
+--- src/testdir/test55.in 2014-06-25 17:20:47.006714486 +0200
+***************
+*** 332,337 ****
+--- 332,342 ----
+ :$put =string(reverse(sort(l)))
+ :$put =string(sort(reverse(sort(l))))
+ :$put =string(uniq(sort(l)))
++ :let l=[7, 9, 18, 12, 22, 10.0e-16, -1, 0xff, 0, -0, 0.22, 'foo', 'FOOBAR',{}, []]
++ :$put =string(sort(copy(l), 'n'))
++ :$put =string(sort(copy(l), 1))
++ :$put =string(sort(copy(l), 'i'))
++ :$put =string(sort(copy(l)))
+ :"
+ :" splitting a string to a List
+ :$put =string(split(' aa bb '))
+*** ../vim-7.4.340/src/testdir/test55.ok 2014-03-25 18:23:27.062087691 +0100
+--- src/testdir/test55.ok 2014-06-25 17:23:31.382720704 +0200
+***************
+*** 101,106 ****
+--- 101,110 ----
+ [[0, 1, 2], [0, 1, 2], 4, 2, 2, 1.5, 'xaaa', 'x8', 'foo6', 'foo', 'foo', 'A11', '-0']
+ ['-0', 'A11', 'foo', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 2, 4, [0, 1, 2], [0, 1, 2]]
+ ['-0', 'A11', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 4, [0, 1, 2]]
++ [-1, 0, 0, 'foo', 'FOOBAR', {}, [], 1.0e-15, 0.22, 7, 9, 12, 18, 22, 255]
++ ['foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}]
++ ['foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}]
++ ['FOOBAR', 'foo', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}]
+ ['aa', 'bb']
+ ['aa', 'bb']
+ ['', 'aa', 'bb', '']
+*** ../vim-7.4.340/src/version.c 2014-06-25 15:02:29.250400570 +0200
+--- src/version.c 2014-06-25 16:46:45.438637250 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 341,
+ /**/
+
+--
+We do not stumble over mountains, but over molehills.
+ Confucius
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.342 b/patches/source/vim/patches/7.4.342
new file mode 100644
index 000000000..8bdc72e4a
--- /dev/null
+++ b/patches/source/vim/patches/7.4.342
@@ -0,0 +1,67 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.342
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.342
+Problem: Clang gives warnings.
+Solution: Add an else block. (Dominique Pelle)
+Files: src/gui_beval.c
+
+
+*** ../vim-7.4.341/src/gui_beval.c 2013-05-06 04:06:04.000000000 +0200
+--- src/gui_beval.c 2014-06-25 17:40:40.818759649 +0200
+***************
+*** 1193,1203 ****
+ XmFontList fl;
+
+ fl = gui_motif_fontset2fontlist(&gui.tooltip_fontset);
+! if (fl != NULL)
+ {
+! XmStringExtent(fl, s, &w, &h);
+! XmFontListFree(fl);
+ }
+ }
+ w += gui.border_offset << 1;
+ h += gui.border_offset << 1;
+--- 1193,1205 ----
+ XmFontList fl;
+
+ fl = gui_motif_fontset2fontlist(&gui.tooltip_fontset);
+! if (fl == NULL)
+ {
+! XmStringFree(s);
+! return;
+ }
++ XmStringExtent(fl, s, &w, &h);
++ XmFontListFree(fl);
+ }
+ w += gui.border_offset << 1;
+ h += gui.border_offset << 1;
+*** ../vim-7.4.341/src/version.c 2014-06-25 17:31:04.942737863 +0200
+--- src/version.c 2014-06-25 17:40:56.902760258 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 342,
+ /**/
+
+--
+CUSTOMER: Well, can you hang around a couple of minutes? He won't be
+ long.
+MORTICIAN: Naaah, I got to go on to Robinson's -- they've lost nine today.
+CUSTOMER: Well, when is your next round?
+MORTICIAN: Thursday.
+DEAD PERSON: I think I'll go for a walk.
+ The Quest for the Holy Grail (Monty Python)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.343 b/patches/source/vim/patches/7.4.343
new file mode 100644
index 000000000..141d9816c
--- /dev/null
+++ b/patches/source/vim/patches/7.4.343
@@ -0,0 +1,60 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.343
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.343
+Problem: matchdelete() does not always update the right lines.
+Solution: Fix off-by-one error. (Ozaki Kiichi)
+Files: src/window.c
+
+
+*** ../vim-7.4.342/src/window.c 2014-06-18 21:20:07.236377308 +0200
+--- src/window.c 2014-06-25 17:55:34.190793447 +0200
+***************
+*** 6891,6898 ****
+ }
+ if (toplnum == 0 || lnum < toplnum)
+ toplnum = lnum;
+! if (botlnum == 0 || lnum > botlnum)
+! botlnum = lnum;
+ }
+
+ /* Calculate top and bottom lines for redrawing area */
+--- 6891,6898 ----
+ }
+ if (toplnum == 0 || lnum < toplnum)
+ toplnum = lnum;
+! if (botlnum == 0 || lnum >= botlnum)
+! botlnum = lnum + 1;
+ }
+
+ /* Calculate top and bottom lines for redrawing area */
+*** ../vim-7.4.342/src/version.c 2014-06-25 17:44:45.850768919 +0200
+--- src/version.c 2014-06-25 17:54:14.258790423 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 343,
+ /**/
+
+--
+CUSTOMER: You're not fooling anyone y'know. Look, isn't there something
+ you can do?
+DEAD PERSON: I feel happy... I feel happy.
+ [whop]
+CUSTOMER: Ah, thanks very much.
+MORTICIAN: Not at all. See you on Thursday.
+CUSTOMER: Right.
+ The Quest for the Holy Grail (Monty Python)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.344 b/patches/source/vim/patches/7.4.344
new file mode 100644
index 000000000..3b619e76c
--- /dev/null
+++ b/patches/source/vim/patches/7.4.344
@@ -0,0 +1,180 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.344
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.344
+Problem: Unessecary initializations and other things related to
+ matchaddpos().
+Solution: Code cleanup. (Alexey Radkov)
+Files: runtime/doc/eval.txt, src/screen.c, src/window.c
+
+
+*** ../vim-7.4.343/runtime/doc/eval.txt 2014-06-25 17:31:04.934737863 +0200
+--- runtime/doc/eval.txt 2014-06-25 18:08:50.790823583 +0200
+***************
+*** 4353,4369 ****
+ required, for example to highlight matching parentheses.
+
+ The list {pos} can contain one of these items:
+! - A number. This while line will be highlighted. The first
+ line has number 1.
+ - A list with one number, e.g., [23]. The whole line with this
+ number will be highlighted.
+ - A list with two numbers, e.g., [23, 11]. The first number is
+! the line number, the second one the column number (first
+! column is 1). The character at this position will be
+! highlighted.
+ - A list with three numbers, e.g., [23, 11, 3]. As above, but
+! the third number gives the length of the highlight in screen
+! cells.
+
+ The maximum number of positions is 8.
+
+--- 4391,4407 ----
+ required, for example to highlight matching parentheses.
+
+ The list {pos} can contain one of these items:
+! - A number. This whole line will be highlighted. The first
+ line has number 1.
+ - A list with one number, e.g., [23]. The whole line with this
+ number will be highlighted.
+ - A list with two numbers, e.g., [23, 11]. The first number is
+! the line number, the second one is the column number (first
+! column is 1, the value must correspond to the byte index as
+! |col()| would return). The character at this position will
+! be highlighted.
+ - A list with three numbers, e.g., [23, 11, 3]. As above, but
+! the third number gives the length of the highlight in bytes.
+
+ The maximum number of positions is 8.
+
+*** ../vim-7.4.343/src/screen.c 2014-06-25 14:39:35.110348584 +0200
+--- src/screen.c 2014-06-25 18:10:11.906826652 +0200
+***************
+*** 7531,7537 ****
+ colnr_T mincol; /* minimal column for a match */
+ {
+ int i;
+! int bot = -1;
+
+ shl->lnum = 0;
+ for (i = posmatch->cur; i < MAXPOSMATCH; i++)
+--- 7531,7537 ----
+ colnr_T mincol; /* minimal column for a match */
+ {
+ int i;
+! int bot = -1;
+
+ shl->lnum = 0;
+ for (i = posmatch->cur; i < MAXPOSMATCH; i++)
+*** ../vim-7.4.343/src/window.c 2014-06-25 17:58:07.346799241 +0200
+--- src/window.c 2014-06-25 18:10:45.698827930 +0200
+***************
+*** 6813,6819 ****
+ m->id = id;
+ m->priority = prio;
+ m->pattern = pat == NULL ? NULL : vim_strsave(pat);
+- m->pos.cur = 0;
+ m->hlg_id = hlg_id;
+ m->match.regprog = regprog;
+ m->match.rmm_ic = FALSE;
+--- 6813,6818 ----
+***************
+*** 6827,6833 ****
+ listitem_T *li;
+ int i;
+
+! for (i = 0, li = pos_list->lv_first; i < MAXPOSMATCH;
+ i++, li = li->li_next)
+ {
+ linenr_T lnum = 0;
+--- 6826,6832 ----
+ listitem_T *li;
+ int i;
+
+! for (i = 0, li = pos_list->lv_first; li != NULL && i < MAXPOSMATCH;
+ i++, li = li->li_next)
+ {
+ linenr_T lnum = 0;
+***************
+*** 6837,6847 ****
+ listitem_T *subli;
+ int error = FALSE;
+
+- if (li == NULL)
+- {
+- m->pos.pos[i].lnum = 0;
+- break;
+- }
+ if (li->li_tv.v_type == VAR_LIST)
+ {
+ subl = li->li_tv.vval.v_list;
+--- 6836,6841 ----
+***************
+*** 6853,6864 ****
+ lnum = get_tv_number_chk(&subli->li_tv, &error);
+ if (error == TRUE)
+ goto fail;
+- m->pos.pos[i].lnum = lnum;
+ if (lnum == 0)
+ {
+ --i;
+ continue;
+ }
+ subli = subli->li_next;
+ if (subli != NULL)
+ {
+--- 6847,6858 ----
+ lnum = get_tv_number_chk(&subli->li_tv, &error);
+ if (error == TRUE)
+ goto fail;
+ if (lnum == 0)
+ {
+ --i;
+ continue;
+ }
++ m->pos.pos[i].lnum = lnum;
+ subli = subli->li_next;
+ if (subli != NULL)
+ {
+***************
+*** 6879,6885 ****
+--- 6873,6882 ----
+ else if (li->li_tv.v_type == VAR_NUMBER)
+ {
+ if (li->li_tv.vval.v_number == 0)
++ {
++ --i;
+ continue;
++ }
+ m->pos.pos[i].lnum = li->li_tv.vval.v_number;
+ m->pos.pos[i].col = 0;
+ m->pos.pos[i].len = 0;
+*** ../vim-7.4.343/src/version.c 2014-06-25 17:58:07.346799241 +0200
+--- src/version.c 2014-06-25 18:07:06.170819625 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 344,
+ /**/
+
+--
+ [clop clop]
+MORTICIAN: Who's that then?
+CUSTOMER: I don't know.
+MORTICIAN: Must be a king.
+CUSTOMER: Why?
+MORTICIAN: He hasn't got shit all over him.
+ The Quest for the Holy Grail (Monty Python)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.345 b/patches/source/vim/patches/7.4.345
new file mode 100644
index 000000000..7cac5f6ab
--- /dev/null
+++ b/patches/source/vim/patches/7.4.345
@@ -0,0 +1,73 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.345
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.345 (after 7.4.338)
+Problem: Indent is not updated when deleting indent.
+Solution: Remember changedtick.
+Files: src/misc1.c
+
+
+*** ../vim-7.4.344/src/misc1.c 2014-06-25 14:39:35.106348584 +0200
+--- src/misc1.c 2014-06-25 22:51:32.955465286 +0200
+***************
+*** 497,502 ****
+--- 497,503 ----
+ static int prev_indent = 0; /* cached indent value */
+ static long prev_ts = 0L; /* cached tabstop value */
+ static char_u *prev_line = NULL; /* cached pointer to line */
++ static int prev_tick = 0; /* changedtick of cached value */
+ int bri = 0;
+ /* window width minus window margin space, i.e. what rests for text */
+ const int eff_wwidth = W_WIDTH(wp)
+***************
+*** 505,514 ****
+ ? number_width(wp) + 1 : 0);
+
+ /* used cached indent, unless pointer or 'tabstop' changed */
+! if (prev_line != line || prev_ts != wp->w_buffer->b_p_ts)
+ {
+ prev_line = line;
+ prev_ts = wp->w_buffer->b_p_ts;
+ prev_indent = get_indent_str(line,
+ (int)wp->w_buffer->b_p_ts, wp->w_p_list) + wp->w_p_brishift;
+ }
+--- 506,517 ----
+ ? number_width(wp) + 1 : 0);
+
+ /* used cached indent, unless pointer or 'tabstop' changed */
+! if (prev_line != line || prev_ts != wp->w_buffer->b_p_ts
+! || prev_tick != wp->w_buffer->b_changedtick)
+ {
+ prev_line = line;
+ prev_ts = wp->w_buffer->b_p_ts;
++ prev_tick = wp->w_buffer->b_changedtick;
+ prev_indent = get_indent_str(line,
+ (int)wp->w_buffer->b_p_ts, wp->w_p_list) + wp->w_p_brishift;
+ }
+*** ../vim-7.4.344/src/version.c 2014-06-25 18:15:18.446838249 +0200
+--- src/version.c 2014-06-25 22:52:55.971468427 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 345,
+ /**/
+
+--
+ARTHUR: Well, I can't just call you `Man'.
+DENNIS: Well, you could say `Dennis'.
+ARTHUR: Well, I didn't know you were called `Dennis.'
+DENNIS: Well, you didn't bother to find out, did you?
+ The Quest for the Holy Grail (Monty Python)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.346 b/patches/source/vim/patches/7.4.346
new file mode 100644
index 000000000..a40278e10
--- /dev/null
+++ b/patches/source/vim/patches/7.4.346
@@ -0,0 +1,61 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.346
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.346 (after 7.4.338)
+Problem: Indent is not updated when changing 'breakindentopt'. (itchyny)
+Solution: Do not cache "brishift". (Christian Brabandt)
+Files: src/misc1.c
+
+
+*** ../vim-7.4.345/src/misc1.c 2014-06-25 22:55:34.783474435 +0200
+--- src/misc1.c 2014-06-26 21:15:46.970516542 +0200
+***************
+*** 513,523 ****
+ prev_ts = wp->w_buffer->b_p_ts;
+ prev_tick = wp->w_buffer->b_changedtick;
+ prev_indent = get_indent_str(line,
+! (int)wp->w_buffer->b_p_ts, wp->w_p_list) + wp->w_p_brishift;
+ }
+
+ /* indent minus the length of the showbreak string */
+- bri = prev_indent;
+ if (wp->w_p_brisbr)
+ bri -= vim_strsize(p_sbr);
+
+--- 513,523 ----
+ prev_ts = wp->w_buffer->b_p_ts;
+ prev_tick = wp->w_buffer->b_changedtick;
+ prev_indent = get_indent_str(line,
+! (int)wp->w_buffer->b_p_ts, wp->w_p_list);
+ }
++ bri = prev_indent + wp->w_p_brishift;
+
+ /* indent minus the length of the showbreak string */
+ if (wp->w_p_brisbr)
+ bri -= vim_strsize(p_sbr);
+
+*** ../vim-7.4.345/src/version.c 2014-06-25 22:55:34.783474435 +0200
+--- src/version.c 2014-06-26 21:17:10.342519697 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 346,
+ /**/
+
+--
+A computer programmer is a device for turning requirements into
+undocumented features. It runs on cola, pizza and Dilbert cartoons.
+ Bram Moolenaar
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.347 b/patches/source/vim/patches/7.4.347
new file mode 100644
index 000000000..7b6b6ddb0
--- /dev/null
+++ b/patches/source/vim/patches/7.4.347
@@ -0,0 +1,74 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.347
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.347
+Problem: test55 fails on some systems.
+Solution: Remove the elements that all result in zero and can end up in an
+ arbitrary position.
+Files: src/testdir/test55.in, src/testdir/test55.ok
+
+
+*** ../vim-7.4.346/src/testdir/test55.in 2014-06-25 17:31:04.942737863 +0200
+--- src/testdir/test55.in 2014-06-26 22:25:33.078674909 +0200
+***************
+*** 332,339 ****
+ :$put =string(reverse(sort(l)))
+ :$put =string(sort(reverse(sort(l))))
+ :$put =string(uniq(sort(l)))
+! :let l=[7, 9, 18, 12, 22, 10.0e-16, -1, 0xff, 0, -0, 0.22, 'foo', 'FOOBAR',{}, []]
+ :$put =string(sort(copy(l), 'n'))
+ :$put =string(sort(copy(l), 1))
+ :$put =string(sort(copy(l), 'i'))
+ :$put =string(sort(copy(l)))
+--- 332,340 ----
+ :$put =string(reverse(sort(l)))
+ :$put =string(sort(reverse(sort(l))))
+ :$put =string(uniq(sort(l)))
+! :let l=[7, 9, 18, 12, 22, 10.0e-16, -1, 0xff, 0.22, 'foo']
+ :$put =string(sort(copy(l), 'n'))
++ :let l=[7, 9, 18, 12, 22, 10.0e-16, -1, 0xff, 0, -0, 0.22, 'foo', 'FOOBAR',{}, []]
+ :$put =string(sort(copy(l), 1))
+ :$put =string(sort(copy(l), 'i'))
+ :$put =string(sort(copy(l)))
+*** ../vim-7.4.346/src/testdir/test55.ok 2014-06-25 17:31:04.942737863 +0200
+--- src/testdir/test55.ok 2014-06-26 22:26:38.662677390 +0200
+***************
+*** 101,107 ****
+ [[0, 1, 2], [0, 1, 2], 4, 2, 2, 1.5, 'xaaa', 'x8', 'foo6', 'foo', 'foo', 'A11', '-0']
+ ['-0', 'A11', 'foo', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 2, 4, [0, 1, 2], [0, 1, 2]]
+ ['-0', 'A11', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 4, [0, 1, 2]]
+! [-1, 0, 0, 'foo', 'FOOBAR', {}, [], 1.0e-15, 0.22, 7, 9, 12, 18, 22, 255]
+ ['foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}]
+ ['foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}]
+ ['FOOBAR', 'foo', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}]
+--- 101,107 ----
+ [[0, 1, 2], [0, 1, 2], 4, 2, 2, 1.5, 'xaaa', 'x8', 'foo6', 'foo', 'foo', 'A11', '-0']
+ ['-0', 'A11', 'foo', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 2, 4, [0, 1, 2], [0, 1, 2]]
+ ['-0', 'A11', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 4, [0, 1, 2]]
+! [-1, 'foo', 1.0e-15, 0.22, 7, 9, 12, 18, 22, 255]
+ ['foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}]
+ ['foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}]
+ ['FOOBAR', 'foo', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}]
+*** ../vim-7.4.346/src/version.c 2014-06-26 21:24:53.134537205 +0200
+--- src/version.c 2014-06-26 22:28:15.402681050 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 347,
+ /**/
+
+--
+Witches prefer brooms: vacuum-cleaners need extension cords!
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.348 b/patches/source/vim/patches/7.4.348
new file mode 100644
index 000000000..c8817197b
--- /dev/null
+++ b/patches/source/vim/patches/7.4.348
@@ -0,0 +1,58 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.348
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.348
+Problem: When using "J1" in 'cinoptions' a line below a continuation line
+ gets too much indent.
+Solution: Fix parenthesis in condition.
+Files: src/misc1.c
+
+
+*** ../vim-7.4.347/src/misc1.c 2014-06-26 21:24:53.134537205 +0200
+--- src/misc1.c 2014-07-02 16:58:08.854208322 +0200
+***************
+*** 7497,7505 ****
+ * ldfd) {
+ * }
+ */
+! if (curbuf->b_ind_js || (curbuf->b_ind_keep_case_label
+! && cin_iscase(skipwhite(ml_get_curline()), FALSE)))
+ amount = get_indent();
+ else
+ amount = skip_label(lnum, &l);
+
+--- 7497,7507 ----
+ * ldfd) {
+ * }
+ */
+! if ((curbuf->b_ind_js || curbuf->b_ind_keep_case_label)
+! && cin_iscase(skipwhite(ml_get_curline()), FALSE))
+ amount = get_indent();
++ else if (curbuf->b_ind_js)
++ amount = get_indent_lnum(lnum);
+ else
+ amount = skip_label(lnum, &l);
+
+*** ../vim-7.4.347/src/version.c 2014-06-26 22:33:47.850693627 +0200
+--- src/version.c 2014-07-02 16:46:14.934197383 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 348,
+ /**/
+
+--
+5 out of 4 people have trouble with fractions.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.349 b/patches/source/vim/patches/7.4.349
new file mode 100644
index 000000000..ce2320205
--- /dev/null
+++ b/patches/source/vim/patches/7.4.349
@@ -0,0 +1,111 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.349
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.349
+Problem: When there are matches to highlight the whole window is redrawn,
+ which is slow.
+Solution: Only redraw everything when lines were inserted or deleted.
+ Reset b_mod_xlines when needed. (Alexey Radkov)
+Files: src/screen.c, src/window.c
+
+
+*** ../vim-7.4.348/src/screen.c 2014-06-25 18:15:18.446838249 +0200
+--- src/screen.c 2014-06-28 15:35:18.868836570 +0200
+***************
+*** 1769,1776 ****
+ syntax_check_changed(lnum)))
+ #endif
+ #ifdef FEAT_SEARCH_EXTRA
+! /* match in fixed position might need redraw */
+! || wp->w_match_head != NULL
+ #endif
+ )))))
+ {
+--- 1769,1778 ----
+ syntax_check_changed(lnum)))
+ #endif
+ #ifdef FEAT_SEARCH_EXTRA
+! /* match in fixed position might need redraw
+! * if lines were inserted or deleted */
+! || (wp->w_match_head != NULL
+! && buf->b_mod_xlines != 0)
+ #endif
+ )))))
+ {
+*** ../vim-7.4.348/src/window.c 2014-06-25 18:15:18.446838249 +0200
+--- src/window.c 2014-06-28 15:38:51.952839835 +0200
+***************
+*** 6904,6915 ****
+ }
+ else
+ {
+ wp->w_buffer->b_mod_top = toplnum;
+ wp->w_buffer->b_mod_bot = botlnum;
+ }
+ m->pos.toplnum = toplnum;
+ m->pos.botlnum = botlnum;
+- wp->w_buffer->b_mod_set = TRUE;
+ rtype = VALID;
+ }
+ }
+--- 6904,6916 ----
+ }
+ else
+ {
++ wp->w_buffer->b_mod_set = TRUE;
+ wp->w_buffer->b_mod_top = toplnum;
+ wp->w_buffer->b_mod_bot = botlnum;
++ wp->w_buffer->b_mod_xlines = 0;
+ }
+ m->pos.toplnum = toplnum;
+ m->pos.botlnum = botlnum;
+ rtype = VALID;
+ }
+ }
+***************
+*** 6986,6995 ****
+ }
+ else
+ {
+ wp->w_buffer->b_mod_top = cur->pos.toplnum;
+ wp->w_buffer->b_mod_bot = cur->pos.botlnum;
+ }
+- wp->w_buffer->b_mod_set = TRUE;
+ rtype = VALID;
+ }
+ vim_free(cur);
+--- 6987,6997 ----
+ }
+ else
+ {
++ wp->w_buffer->b_mod_set = TRUE;
+ wp->w_buffer->b_mod_top = cur->pos.toplnum;
+ wp->w_buffer->b_mod_bot = cur->pos.botlnum;
++ wp->w_buffer->b_mod_xlines = 0;
+ }
+ rtype = VALID;
+ }
+ vim_free(cur);
+*** ../vim-7.4.348/src/version.c 2014-07-02 17:02:29.726212319 +0200
+--- src/version.c 2014-07-02 17:15:58.646224714 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 349,
+ /**/
+
+--
+Trees moving back and forth is what makes the wind blow.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.350 b/patches/source/vim/patches/7.4.350
new file mode 100644
index 000000000..1c4a5a34a
--- /dev/null
+++ b/patches/source/vim/patches/7.4.350
@@ -0,0 +1,139 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.350
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.350
+Problem: Using C indenting for Javascript does not work well for a {} block
+ inside parenthesis.
+Solution: When looking for a matching paren ignore one that is before the
+ start of a {} block.
+Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok
+
+
+*** ../vim-7.4.349/src/misc1.c 2014-07-02 17:02:29.722212319 +0200
+--- src/misc1.c 2014-07-02 18:09:39.670274070 +0200
+***************
+*** 6614,6620 ****
+ }
+
+ /*
+! * Find the matching '(', failing if it is in a comment.
+ * Return NULL if no match found.
+ */
+ static pos_T *
+--- 6614,6620 ----
+ }
+
+ /*
+! * Find the matching '(', ignoring it if it is in a comment.
+ * Return NULL if no match found.
+ */
+ static pos_T *
+***************
+*** 6645,6650 ****
+--- 6645,6676 ----
+ }
+
+ /*
++ * Find the matching '(', ignoring it if it is in a comment or before an
++ * unmatched {.
++ * Return NULL if no match found.
++ */
++ static pos_T *
++ find_match_paren_after_brace(ind_maxparen) /* XXX */
++ int ind_maxparen;
++ {
++ pos_T *trypos = find_match_paren(ind_maxparen);
++
++ if (trypos != NULL)
++ {
++ pos_T *tryposBrace = find_start_brace();
++
++ /* If both an unmatched '(' and '{' is found. Ignore the '('
++ * position if the '{' is further down. */
++ if (tryposBrace != NULL
++ && (trypos->lnum != tryposBrace->lnum
++ ? trypos->lnum < tryposBrace->lnum
++ : trypos->col < tryposBrace->col))
++ trypos = NULL;
++ }
++ return trypos;
++ }
++
++ /*
+ * Return ind_maxparen corrected for the difference in line number between the
+ * cursor position and "startpos". This makes sure that searching for a
+ * matching paren above the cursor line doesn't find a match because of
+***************
+*** 7419,7425 ****
+ {
+ curwin->w_cursor.lnum = our_paren_pos.lnum;
+ curwin->w_cursor.col = col;
+! if (find_match_paren(curbuf->b_ind_maxparen) != NULL)
+ amount += curbuf->b_ind_unclosed2;
+ else
+ {
+--- 7445,7452 ----
+ {
+ curwin->w_cursor.lnum = our_paren_pos.lnum;
+ curwin->w_cursor.col = col;
+! if (find_match_paren_after_brace(curbuf->b_ind_maxparen)
+! != NULL)
+ amount += curbuf->b_ind_unclosed2;
+ else
+ {
+*** ../vim-7.4.349/src/testdir/test3.in 2013-03-07 12:39:35.000000000 +0100
+--- src/testdir/test3.in 2014-07-02 18:08:06.430272641 +0200
+***************
+*** 1950,1955 ****
+--- 1950,1959 ----
+ JSSTART
+ (function($){
+
++ if (cond &&
++ cond) {
++ stmt;
++ }
+ var class_name='myclass';
+
+ function private_method() {
+*** ../vim-7.4.349/src/testdir/test3.ok 2013-03-07 12:40:03.000000000 +0100
+--- src/testdir/test3.ok 2014-07-02 18:09:14.470273684 +0200
+***************
+*** 1728,1733 ****
+--- 1728,1737 ----
+ JSSTART
+ (function($){
+
++ if (cond &&
++ cond) {
++ stmt;
++ }
+ var class_name='myclass';
+
+ function private_method() {
+*** ../vim-7.4.349/src/version.c 2014-07-02 17:16:51.334225522 +0200
+--- src/version.c 2014-07-02 18:06:31.330271184 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 350,
+ /**/
+
+--
+FATHER: You killed eight wedding guests in all!
+LAUNCELOT: Er, Well ... the thing is ... I thought your son was a lady.
+FATHER: I can understand that.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.351 b/patches/source/vim/patches/7.4.351
new file mode 100644
index 000000000..0ace333eb
--- /dev/null
+++ b/patches/source/vim/patches/7.4.351
@@ -0,0 +1,160 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.351
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.351
+Problem: sort() is not stable.
+Solution: When the items are identical, compare the pointers.
+Files: src/eval.c, src/testdir/test55.in, src/testdir/test55.ok
+
+
+*** ../vim-7.4.350/src/eval.c 2014-06-25 17:31:04.942737863 +0200
+--- src/eval.c 2014-07-02 18:52:19.102313288 +0200
+***************
+*** 17334,17339 ****
+--- 17334,17340 ----
+ static char_u *item_compare_func;
+ static dict_T *item_compare_selfdict;
+ static int item_compare_func_err;
++ static int item_compare_keep_zero;
+ static void do_sort_uniq __ARGS((typval_T *argvars, typval_T *rettv, int sort));
+ #define ITEM_COMPARE_FAIL 999
+
+***************
+*** 17374,17379 ****
+--- 17375,17386 ----
+ n2 = strtod((char *)p2, (char **)&p2);
+ res = n1 == n2 ? 0 : n1 > n2 ? 1 : -1;
+ }
++
++ /* When the result would be zero, compare the pointers themselves. Makes
++ * the sort stable. */
++ if (res == 0 && !item_compare_keep_zero)
++ res = s1 > s2 ? 1 : -1;
++
+ vim_free(tofree1);
+ vim_free(tofree2);
+ return res;
+***************
+*** 17396,17402 ****
+ if (item_compare_func_err)
+ return 0;
+
+! /* copy the values. This is needed to be able to set v_lock to VAR_FIXED
+ * in the copy without changing the original list items. */
+ copy_tv(&(*(listitem_T **)s1)->li_tv, &argv[0]);
+ copy_tv(&(*(listitem_T **)s2)->li_tv, &argv[1]);
+--- 17403,17409 ----
+ if (item_compare_func_err)
+ return 0;
+
+! /* Copy the values. This is needed to be able to set v_lock to VAR_FIXED
+ * in the copy without changing the original list items. */
+ copy_tv(&(*(listitem_T **)s1)->li_tv, &argv[0]);
+ copy_tv(&(*(listitem_T **)s2)->li_tv, &argv[1]);
+***************
+*** 17415,17420 ****
+--- 17422,17433 ----
+ if (item_compare_func_err)
+ res = ITEM_COMPARE_FAIL; /* return value has wrong type */
+ clear_tv(&rettv);
++
++ /* When the result would be zero, compare the pointers themselves. Makes
++ * the sort stable. */
++ if (res == 0 && !item_compare_keep_zero)
++ res = s1 > s2 ? 1 : -1;
++
+ return res;
+ }
+
+***************
+*** 17509,17514 ****
+--- 17522,17528 ----
+ ptrs[i++] = li;
+
+ item_compare_func_err = FALSE;
++ item_compare_keep_zero = FALSE;
+ /* test the compare function */
+ if (item_compare_func != NULL
+ && item_compare2((void *)&ptrs[0], (void *)&ptrs[1])
+***************
+*** 17536,17541 ****
+--- 17550,17556 ----
+
+ /* f_uniq(): ptrs will be a stack of items to remove */
+ item_compare_func_err = FALSE;
++ item_compare_keep_zero = TRUE;
+ item_compare_func_ptr = item_compare_func
+ ? item_compare2 : item_compare;
+
+*** ../vim-7.4.350/src/testdir/test55.in 2014-06-26 22:33:47.850693627 +0200
+--- src/testdir/test55.in 2014-07-02 19:00:09.238320492 +0200
+***************
+*** 332,340 ****
+ :$put =string(reverse(sort(l)))
+ :$put =string(sort(reverse(sort(l))))
+ :$put =string(uniq(sort(l)))
+! :let l=[7, 9, 18, 12, 22, 10.0e-16, -1, 0xff, 0.22, 'foo']
+ :$put =string(sort(copy(l), 'n'))
+! :let l=[7, 9, 18, 12, 22, 10.0e-16, -1, 0xff, 0, -0, 0.22, 'foo', 'FOOBAR',{}, []]
+ :$put =string(sort(copy(l), 1))
+ :$put =string(sort(copy(l), 'i'))
+ :$put =string(sort(copy(l)))
+--- 332,340 ----
+ :$put =string(reverse(sort(l)))
+ :$put =string(sort(reverse(sort(l))))
+ :$put =string(uniq(sort(l)))
+! :let l=[7, 9, 'one', 18, 12, 22, 'two', 10.0e-16, -1, 'three', 0xff, 0.22, 'four']
+ :$put =string(sort(copy(l), 'n'))
+! :let l=[7, 9, 18, 12, 22, 10.0e-16, -1, 0xff, 0, -0, 0.22, 'bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', {}, []]
+ :$put =string(sort(copy(l), 1))
+ :$put =string(sort(copy(l), 'i'))
+ :$put =string(sort(copy(l)))
+*** ../vim-7.4.350/src/testdir/test55.ok 2014-06-26 22:33:47.850693627 +0200
+--- src/testdir/test55.ok 2014-07-02 19:00:57.078321225 +0200
+***************
+*** 101,110 ****
+ [[0, 1, 2], [0, 1, 2], 4, 2, 2, 1.5, 'xaaa', 'x8', 'foo6', 'foo', 'foo', 'A11', '-0']
+ ['-0', 'A11', 'foo', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 2, 4, [0, 1, 2], [0, 1, 2]]
+ ['-0', 'A11', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 4, [0, 1, 2]]
+! [-1, 'foo', 1.0e-15, 0.22, 7, 9, 12, 18, 22, 255]
+! ['foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}]
+! ['foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}]
+! ['FOOBAR', 'foo', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}]
+ ['aa', 'bb']
+ ['aa', 'bb']
+ ['', 'aa', 'bb', '']
+--- 101,110 ----
+ [[0, 1, 2], [0, 1, 2], 4, 2, 2, 1.5, 'xaaa', 'x8', 'foo6', 'foo', 'foo', 'A11', '-0']
+ ['-0', 'A11', 'foo', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 2, 4, [0, 1, 2], [0, 1, 2]]
+ ['-0', 'A11', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 4, [0, 1, 2]]
+! [-1, 'one', 'two', 'three', 'four', 1.0e-15, 0.22, 7, 9, 12, 18, 22, 255]
+! ['bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}]
+! ['bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}]
+! ['BAR', 'Bar', 'FOO', 'FOOBAR', 'Foo', 'bar', 'foo', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}]
+ ['aa', 'bb']
+ ['aa', 'bb']
+ ['', 'aa', 'bb', '']
+*** ../vim-7.4.350/src/version.c 2014-07-02 18:27:44.662290695 +0200
+--- src/version.c 2014-07-02 18:46:38.230308065 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 351,
+ /**/
+
+--
+The early bird gets the worm. If you want something else for
+breakfast, get up later.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.352 b/patches/source/vim/patches/7.4.352
new file mode 100644
index 000000000..ecfabb3b3
--- /dev/null
+++ b/patches/source/vim/patches/7.4.352
@@ -0,0 +1,101 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.352
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.352
+Problem: With 'linebreak' a tab causes missing line break.
+Solution: Count a tab for what it's worth also for shorter lines.
+ (Christian Brabandt)
+Files: src/charset.c
+
+
+*** ../vim-7.4.351/src/charset.c 2014-06-25 14:39:35.098348584 +0200
+--- src/charset.c 2014-07-02 19:34:28.142352040 +0200
+***************
+*** 1078,1083 ****
+--- 1078,1084 ----
+ int c;
+ int size;
+ colnr_T col2;
++ colnr_T col_adj = 0; /* col + screen size of tab */
+ colnr_T colmax;
+ int added;
+ # ifdef FEAT_MBYTE
+***************
+*** 1109,1114 ****
+--- 1110,1117 ----
+ */
+ size = win_chartabsize(wp, s, col);
+ c = *s;
++ if (tab_corr)
++ col_adj = size - 1;
+
+ /*
+ * If 'linebreak' set check at a blank before a non-blank if the line
+***************
+*** 1130,1141 ****
+ */
+ numberextra = win_col_off(wp);
+ col2 = col;
+! colmax = (colnr_T)(W_WIDTH(wp) - numberextra);
+ if (col >= colmax)
+ {
+! n = colmax + win_col_off2(wp);
+ if (n > 0)
+! colmax += (((col - colmax) / n) + 1) * n;
+ }
+
+ for (;;)
+--- 1133,1145 ----
+ */
+ numberextra = win_col_off(wp);
+ col2 = col;
+! colmax = (colnr_T)(W_WIDTH(wp) - numberextra - col_adj);
+ if (col >= colmax)
+ {
+! colmax += col_adj;
+! n = colmax + win_col_off2(wp);
+ if (n > 0)
+! colmax += (((col - colmax) / n) + 1) * n - col_adj;
+ }
+
+ for (;;)
+***************
+*** 1152,1158 ****
+ col2 += win_chartabsize(wp, s, col2);
+ if (col2 >= colmax) /* doesn't fit */
+ {
+! size = colmax - col;
+ tab_corr = FALSE;
+ break;
+ }
+--- 1156,1162 ----
+ col2 += win_chartabsize(wp, s, col2);
+ if (col2 >= colmax) /* doesn't fit */
+ {
+! size = colmax - col + col_adj;
+ tab_corr = FALSE;
+ break;
+ }
+*** ../vim-7.4.351/src/version.c 2014-07-02 19:06:14.686326091 +0200
+--- src/version.c 2014-07-02 19:32:50.218350540 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 352,
+ /**/
+
+--
+The early bird gets the worm. The second mouse gets the cheese.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.353 b/patches/source/vim/patches/7.4.353
new file mode 100644
index 000000000..c54465d96
--- /dev/null
+++ b/patches/source/vim/patches/7.4.353
@@ -0,0 +1,489 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.353
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.353
+Problem: 'linebreak' doesn't work with the 'list' option.
+Solution: Make it work. (Christian Brabandt)
+Files: runtime/doc/options.txt, src/charset.c, src/screen.c,
+ src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
+ src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
+ src/testdir/Make_vms.mms, src/testdir/Makefile,
+ src/testdir/test_listlbr.in, src/testdir/test_listlbr.ok
+
+
+*** ../vim-7.4.352/runtime/doc/options.txt 2014-06-25 11:48:40.729960646 +0200
+--- runtime/doc/options.txt 2014-07-02 19:47:21.602363892 +0200
+***************
+*** 1200,1205 ****
+--- 1200,1237 ----
+ break if 'linebreak' is on. Only works for ASCII and also for 8-bit
+ characters when 'encoding' is an 8-bit encoding.
+
++ *'breakindent'* *'bri'*
++ 'breakindent' 'bri' boolean (default off)
++ local to window
++ {not in Vi}
++ {not available when compiled without the |+linebreak|
++ feature}
++ Every wrapped line will continue visually indented (same amount of
++ space as the beginning of that line), thus preserving horizontal blocks
++ of text.
++
++ *'breakindentopt'* *'briopt'*
++ 'breakindentopt' 'briopt' string (default empty)
++ local to window
++ {not in Vi}
++ {not available when compiled without the |+linebreak|
++ feature}
++ Settings for 'breakindent'. It can consist of the following optional
++ items and must be separated by a comma:
++ min:{n} Minimum text width that will be kept after
++ applying 'breakindent', even if the resulting
++ text should normally be narrower. This prevents
++ text indented almost to the right window border
++ occupying lot of vertical space when broken.
++ shift:{n} After applying 'breakindent', the wrapped line's
++ beginning will be shifted by the given number of
++ characters. It permits dynamic French paragraph
++ indentation (negative) or emphasizing the line
++ continuation (positive).
++ sbr Display the 'showbreak' value before applying the
++ additional indent.
++ The default value for min is 20 and shift is 0.
++
+ *'browsedir'* *'bsdir'*
+ 'browsedir' 'bsdir' string (default: "last")
+ global
+*** ../vim-7.4.352/src/charset.c 2014-07-02 19:37:38.462354956 +0200
+--- src/charset.c 2014-07-02 19:47:21.602363892 +0200
+***************
+*** 1120,1126 ****
+ if (wp->w_p_lbr
+ && vim_isbreak(c)
+ && !vim_isbreak(s[1])
+- && !wp->w_p_list
+ && wp->w_p_wrap
+ # ifdef FEAT_VERTSPLIT
+ && wp->w_width != 0
+--- 1120,1125 ----
+*** ../vim-7.4.352/src/screen.c 2014-07-02 17:16:51.330225522 +0200
+--- src/screen.c 2014-07-02 19:51:42.082367883 +0200
+***************
+*** 2843,2848 ****
+--- 2843,2849 ----
+ char_u extra[18]; /* "%ld" and 'fdc' must fit in here */
+ int n_extra = 0; /* number of extra chars */
+ char_u *p_extra = NULL; /* string of extra chars, plus NUL */
++ char_u *p_extra_free = NULL; /* p_extra needs to be freed */
+ int c_extra = NUL; /* extra chars, all the same */
+ int extra_attr = 0; /* attributes when n_extra != 0 */
+ static char_u *at_end_str = (char_u *)""; /* used for p_extra when
+***************
+*** 4053,4058 ****
+--- 4054,4064 ----
+ }
+ else
+ {
++ if (p_extra_free != NULL)
++ {
++ vim_free(p_extra_free);
++ p_extra_free = NULL;
++ }
+ /*
+ * Get a character from the line itself.
+ */
+***************
+*** 4424,4431 ****
+ /*
+ * Found last space before word: check for line break.
+ */
+! if (wp->w_p_lbr && vim_isbreak(c) && !vim_isbreak(*ptr)
+! && !wp->w_p_list)
+ {
+ char_u *p = ptr - (
+ # ifdef FEAT_MBYTE
+--- 4430,4436 ----
+ /*
+ * Found last space before word: check for line break.
+ */
+! if (wp->w_p_lbr && vim_isbreak(c) && !vim_isbreak(*ptr))
+ {
+ char_u *p = ptr - (
+ # ifdef FEAT_MBYTE
+***************
+*** 4433,4439 ****
+ # endif
+ 1);
+ /* TODO: is passing p for start of the line OK? */
+! n_extra = win_lbr_chartabsize(wp, p, p, (colnr_T)vcol,
+ NULL) - 1;
+ c_extra = ' ';
+ if (vim_iswhite(c))
+--- 4438,4444 ----
+ # endif
+ 1);
+ /* TODO: is passing p for start of the line OK? */
+! n_extra = win_lbr_chartabsize(wp, line, p, (colnr_T)vcol,
+ NULL) - 1;
+ c_extra = ' ';
+ if (vim_iswhite(c))
+***************
+*** 4443,4449 ****
+ /* See "Tab alignment" below. */
+ FIX_FOR_BOGUSCOLS;
+ #endif
+! c = ' ';
+ }
+ }
+ #endif
+--- 4448,4455 ----
+ /* See "Tab alignment" below. */
+ FIX_FOR_BOGUSCOLS;
+ #endif
+! if (!wp->w_p_list)
+! c = ' ';
+ }
+ }
+ #endif
+***************
+*** 4483,4491 ****
+ */
+ if (c == TAB && (!wp->w_p_list || lcs_tab1))
+ {
+ /* tab amount depends on current column */
+! n_extra = (int)wp->w_buffer->b_p_ts
+ - vcol % (int)wp->w_buffer->b_p_ts - 1;
+ #ifdef FEAT_CONCEAL
+ /* Tab alignment should be identical regardless of
+ * 'conceallevel' value. So tab compensates of all
+--- 4489,4538 ----
+ */
+ if (c == TAB && (!wp->w_p_list || lcs_tab1))
+ {
++ int tab_len = 0;
+ /* tab amount depends on current column */
+! tab_len = (int)wp->w_buffer->b_p_ts
+ - vcol % (int)wp->w_buffer->b_p_ts - 1;
++ #ifdef FEAT_LINEBREAK
++ if (!wp->w_p_lbr)
++ #endif
++ /* tab amount depends on current column */
++ n_extra = tab_len;
++ #ifdef FEAT_LINEBREAK
++ else
++ {
++ char_u *p;
++ int len = n_extra;
++ int i;
++ int saved_nextra = n_extra;
++
++ /* if n_extra > 0, it gives the number of chars, to
++ * use for a tab, else we need to calculate the width
++ * for a tab */
++ #ifdef FEAT_MBYTE
++ len = (tab_len * mb_char2len(lcs_tab2));
++ if (n_extra > 0)
++ len += n_extra - tab_len;
++ #endif
++ c = lcs_tab1;
++ p = alloc((unsigned)(len + 1));
++ vim_memset(p, ' ', len);
++ p[len] = NUL;
++ p_extra_free = p;
++ for (i = 0; i < tab_len; i++)
++ {
++ #ifdef FEAT_MBYTE
++ mb_char2bytes(lcs_tab2, p);
++ p += mb_char2len(lcs_tab2);
++ n_extra += mb_char2len(lcs_tab2)
++ - (saved_nextra > 0 ? 1 : 0);
++ #else
++ p[i] = lcs_tab2;
++ #endif
++ }
++ p_extra = p_extra_free;
++ }
++ #endif
+ #ifdef FEAT_CONCEAL
+ /* Tab alignment should be identical regardless of
+ * 'conceallevel' value. So tab compensates of all
+***************
+*** 4501,4508 ****
+ if (wp->w_p_list)
+ {
+ c = lcs_tab1;
+! c_extra = lcs_tab2;
+! n_attr = n_extra + 1;
+ extra_attr = hl_attr(HLF_8);
+ saved_attr2 = char_attr; /* save current attr */
+ #ifdef FEAT_MBYTE
+--- 4548,4560 ----
+ if (wp->w_p_list)
+ {
+ c = lcs_tab1;
+! #ifdef FEAT_LINEBREAK
+! if (wp->w_p_lbr)
+! c_extra = NUL; /* using p_extra from above */
+! else
+! #endif
+! c_extra = lcs_tab2;
+! n_attr = tab_len + 1;
+ extra_attr = hl_attr(HLF_8);
+ saved_attr2 = char_attr; /* save current attr */
+ #ifdef FEAT_MBYTE
+***************
+*** 4598,4606 ****
+ if ((dy_flags & DY_UHEX) && wp->w_p_rl)
+ rl_mirror(p_extra); /* reverse "<12>" */
+ #endif
+- n_extra = byte2cells(c) - 1;
+ c_extra = NUL;
+! c = *p_extra++;
+ if (!attr_pri)
+ {
+ n_attr = n_extra + 1;
+--- 4650,4674 ----
+ if ((dy_flags & DY_UHEX) && wp->w_p_rl)
+ rl_mirror(p_extra); /* reverse "<12>" */
+ #endif
+ c_extra = NUL;
+! #ifdef FEAT_LINEBREAK
+! if (wp->w_p_lbr)
+! {
+! char_u *p;
+!
+! c = *p_extra;
+! p = alloc((unsigned)n_extra + 1);
+! vim_memset(p, ' ', n_extra);
+! STRNCPY(p, p_extra + 1, STRLEN(p_extra) - 1);
+! p[n_extra] = NUL;
+! p_extra_free = p_extra = p;
+! }
+! else
+! #endif
+! {
+! n_extra = byte2cells(c) - 1;
+! c = *p_extra++;
+! }
+ if (!attr_pri)
+ {
+ n_attr = n_extra + 1;
+*** ../vim-7.4.352/src/testdir/Make_amiga.mak 2014-06-25 14:39:35.110348584 +0200
+--- src/testdir/Make_amiga.mak 2014-07-02 19:47:21.610363892 +0200
+***************
+*** 38,43 ****
+--- 38,44 ----
+ test104.out test105.out test106.out test107.out \
+ test_autoformat_join.out \
+ test_breakindent.out \
++ test_listlbr.out \
+ test_eval.out \
+ test_options.out
+
+***************
+*** 165,169 ****
+--- 166,171 ----
+ test107.out: test107.in
+ test_autoformat_join.out: test_autoformat_join.in
+ test_breakindent.out: test_breakindent.in
++ test_listlbr.out: test_listlbr.in
+ test_eval.out: test_eval.in
+ test_options.out: test_options.in
+*** ../vim-7.4.352/src/testdir/Make_dos.mak 2014-06-25 14:39:35.110348584 +0200
+--- src/testdir/Make_dos.mak 2014-07-02 19:47:21.610363892 +0200
+***************
+*** 37,42 ****
+--- 37,43 ----
+ test105.out test106.out test107.out\
+ test_autoformat_join.out \
+ test_breakindent.out \
++ test_listlbr \
+ test_eval.out \
+ test_options.out
+
+*** ../vim-7.4.352/src/testdir/Make_ming.mak 2014-06-25 14:39:35.110348584 +0200
+--- src/testdir/Make_ming.mak 2014-07-02 19:47:21.610363892 +0200
+***************
+*** 57,62 ****
+--- 57,63 ----
+ test105.out test106.out test107.out \
+ test_autoformat_join.out \
+ test_breakindent.out \
++ test_listlbr.out \
+ test_eval.out \
+ test_options.out
+
+*** ../vim-7.4.352/src/testdir/Make_os2.mak 2014-06-25 14:39:35.114348584 +0200
+--- src/testdir/Make_os2.mak 2014-07-02 19:47:21.610363892 +0200
+***************
+*** 40,45 ****
+--- 40,46 ----
+ test_autoformat_join.out \
+ test_eval.out \
+ test_breakindent.out \
++ test_listlbr.out \
+ test_options.out
+
+ .SUFFIXES: .in .out
+*** ../vim-7.4.352/src/testdir/Make_vms.mms 2014-06-25 14:39:35.114348584 +0200
+--- src/testdir/Make_vms.mms 2014-07-02 19:47:21.610363892 +0200
+***************
+*** 98,103 ****
+--- 98,104 ----
+ test105.out test106.out test107.out \
+ test_autoformat_join.out \
+ test_breakindent.out \
++ test_listlbr.out \
+ test_eval.out \
+ test_options.out
+
+*** ../vim-7.4.352/src/testdir/Makefile 2014-06-25 14:39:35.114348584 +0200
+--- src/testdir/Makefile 2014-07-02 19:47:21.610363892 +0200
+***************
+*** 35,40 ****
+--- 35,41 ----
+ test104.out test105.out test106.out test107.out \
+ test_autoformat_join.out \
+ test_breakindent.out \
++ test_listlbr.out \
+ test_eval.out \
+ test_options.out
+
+*** ../vim-7.4.352/src/testdir/test_listlbr.in 2014-07-02 19:58:25.642374067 +0200
+--- src/testdir/test_listlbr.in 2014-07-02 19:47:21.610363892 +0200
+***************
+*** 0 ****
+--- 1,62 ----
++ Test for linebreak and list option
++
++ STARTTEST
++ :so small.vim
++ :if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif
++ :10new|:vsp|:vert resize 20
++ :put =\"\tabcdef hijklmn\tpqrstuvwxyz\u00a01060ABCDEFGHIJKLMNOP \"
++ :norm! zt
++ :set ts=4 sw=4 sts=4 linebreak sbr=+ wrap
++ :fu! ScreenChar(width)
++ : let c=''
++ : for j in range(1,4)
++ : for i in range(1,a:width)
++ : let c.=nr2char(screenchar(j, i))
++ : endfor
++ : let c.="\n"
++ : endfor
++ : return c
++ :endfu
++ :fu! DoRecordScreen()
++ : wincmd l
++ : $put =printf(\"\n%s\", g:test)
++ : $put =g:line
++ : wincmd p
++ :endfu
++ :let g:test="Test 1: set linebreak"
++ :redraw!
++ :let line=ScreenChar(winwidth(0))
++ :call DoRecordScreen()
++ :let g:test="Test 2: set linebreak + set list"
++ :set linebreak list listchars=
++ :redraw!
++ :let line=ScreenChar(winwidth(0))
++ :call DoRecordScreen()
++ :let g:test ="Test 3: set linebreak + set list + fancy listchars"
++ :exe "set linebreak list listchars=nbsp:\u2423,tab:\u2595\u2014,trail:\u02d1,eol:\ub6"
++ :redraw!
++ :let line=ScreenChar(winwidth(0))
++ :call DoRecordScreen()
++ :let g:test ="Test 4: set linebreak nolist"
++ :set nolist linebreak
++ :redraw!
++ :let line=ScreenChar(winwidth(0))
++ :call DoRecordScreen()
++ :let g:test ="Test 5: set nolinebreak list"
++ :set list nolinebreak
++ :redraw!
++ :let line=ScreenChar(winwidth(0))
++ :call DoRecordScreen()
++ :let g:test ="Test 6: set linebreak with tab and 1 line as long as screen: should break!"
++ :set nolist linebreak ts=8
++ :let line="1\t".repeat('a', winwidth(0)-2)
++ :$put =line
++ :$
++ :norm! zt
++ :redraw!
++ :let line=ScreenChar(winwidth(0))
++ :call DoRecordScreen()
++ :%w! test.out
++ :qa!
++ ENDTEST
++ dummy text
+*** ../vim-7.4.352/src/testdir/test_listlbr.ok 2014-07-02 19:58:25.646374067 +0200
+--- src/testdir/test_listlbr.ok 2014-07-02 19:47:21.610363892 +0200
+***************
+*** 0 ****
+--- 1,39 ----
++
++ abcdef hijklmn pqrstuvwxyz 1060ABCDEFGHIJKLMNOP
++
++ Test 1: set linebreak
++ abcdef
++ +hijklmn
++ +pqrstuvwxyz 1060ABC
++ +DEFGHIJKLMNOP
++
++ Test 2: set linebreak + set list
++ ^Iabcdef hijklmn^I
++ +pqrstuvwxyz 1060ABC
++ +DEFGHIJKLMNOP
++
++
++ Test 3: set linebreak + set list + fancy listchars
++ ▕———abcdef
++ +hijklmn▕———
++ +pqrstuvwxyzâ£1060ABC
++ +DEFGHIJKLMNOPˑ¶
++
++ Test 4: set linebreak nolist
++ abcdef
++ +hijklmn
++ +pqrstuvwxyz 1060ABC
++ +DEFGHIJKLMNOP
++
++ Test 5: set nolinebreak list
++ ▕———abcdef hijklmn▕—
++ +pqrstuvwxyzâ£1060ABC
++ +DEFGHIJKLMNOPˑ¶
++ ¶
++ 1 aaaaaaaaaaaaaaaaaa
++
++ Test 6: set linebreak with tab and 1 line as long as screen: should break!
++ 1
++ +aaaaaaaaaaaaaaaaaa
++ ~
++ ~
+*** ../vim-7.4.352/src/version.c 2014-07-02 19:37:38.462354956 +0200
+--- src/version.c 2014-07-02 19:57:44.066373430 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 353,
+ /**/
+
+--
+FATHER: You only killed the bride's father - that's all -
+LAUNCELOT: Oh dear, I didn't really mean to...
+FATHER: Didn't mean to? You put your sword right through his head!
+LAUNCELOT: Gosh - Is he all right?
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.354 b/patches/source/vim/patches/7.4.354
new file mode 100644
index 000000000..1bbcf6dde
--- /dev/null
+++ b/patches/source/vim/patches/7.4.354
@@ -0,0 +1,56 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.354
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.354
+Problem: Compiler warning.
+Solution: Change NUL to NULL. (Ken Takata)
+Files: src/screen.c
+
+
+*** ../vim-7.4.353/src/screen.c 2014-07-02 19:59:35.454375136 +0200
+--- src/screen.c 2014-07-03 14:08:03.579375847 +0200
+***************
+*** 3704,3710 ****
+ if (diff_hlf != (hlf_T)0)
+ char_attr = hl_attr(diff_hlf);
+ #endif
+! p_extra = NUL;
+ c_extra = ' ';
+ n_extra = get_breakindent_win(wp,
+ ml_get_buf(wp->w_buffer, lnum, FALSE));
+--- 3704,3710 ----
+ if (diff_hlf != (hlf_T)0)
+ char_attr = hl_attr(diff_hlf);
+ #endif
+! p_extra = NULL;
+ c_extra = ' ';
+ n_extra = get_breakindent_win(wp,
+ ml_get_buf(wp->w_buffer, lnum, FALSE));
+*** ../vim-7.4.353/src/version.c 2014-07-02 19:59:35.454375136 +0200
+--- src/version.c 2014-07-03 14:08:38.875376388 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 354,
+ /**/
+
+--
+ [SIR LAUNCELOT runs back up the stairs, grabs a rope
+ of the wall and swings out over the heads of the CROWD in a
+ swashbuckling manner towards a large window. He stops just short
+ of the window and is left swing pathetically back and forth.]
+LAUNCELOT: Excuse me ... could somebody give me a push ...
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.355 b/patches/source/vim/patches/7.4.355
new file mode 100644
index 000000000..49d4276ab
--- /dev/null
+++ b/patches/source/vim/patches/7.4.355
@@ -0,0 +1,929 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.355
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.355
+Problem: Several problems with Javascript indenting.
+Solution: Improve Javascript indenting.
+Files: src/misc1.c
+
+
+*** ../vim-7.4.354/src/misc1.c 2014-07-02 18:27:44.662290695 +0200
+--- src/misc1.c 2014-07-03 22:42:20.315848662 +0200
+***************
+*** 5382,5387 ****
+--- 5382,5388 ----
+ static char_u *cin_skipcomment __ARGS((char_u *));
+ static int cin_nocode __ARGS((char_u *));
+ static pos_T *find_line_comment __ARGS((void));
++ static int cin_has_js_key __ARGS((char_u *text));
+ static int cin_islabel_skip __ARGS((char_u **));
+ static int cin_isdefault __ARGS((char_u *));
+ static char_u *after_label __ARGS((char_u *l));
+***************
+*** 5410,5415 ****
+--- 5411,5417 ----
+ static int cin_skip2pos __ARGS((pos_T *trypos));
+ static pos_T *find_start_brace __ARGS((void));
+ static pos_T *find_match_paren __ARGS((int));
++ static pos_T *find_match_char __ARGS((int c, int ind_maxparen));
+ static int corr_ind_maxparen __ARGS((pos_T *startpos));
+ static int find_last_paren __ARGS((char_u *l, int start, int end));
+ static int find_match __ARGS((int lookfor, linenr_T ourscope));
+***************
+*** 5494,5500 ****
+--- 5496,5533 ----
+ }
+
+ /*
++ * Return TRUE if "text" starts with "key:".
++ */
++ static int
++ cin_has_js_key(text)
++ char_u *text;
++ {
++ char_u *s = skipwhite(text);
++ int quote = 0;
++
++ if (*s == '\'' || *s == '"')
++ {
++ /* can be 'key': or "key": */
++ quote = *s;
++ ++s;
++ }
++ if (!vim_isIDc(*s)) /* need at least one ID character */
++ return FALSE;
++
++ while (vim_isIDc(*s))
++ ++s;
++ if (*s == quote)
++ ++s;
++
++ s = cin_skipcomment(s);
++
++ /* "::" is not a label, it's C++ */
++ return (*s == ':' && s[1] != ':');
++ }
++
++ /*
+ * Check if string matches "label:"; move to character after ':' if true.
++ * "*s" must point to the start of the label, if there is one.
+ */
+ static int
+ cin_islabel_skip(s)
+***************
+*** 6621,6632 ****
+ find_match_paren(ind_maxparen) /* XXX */
+ int ind_maxparen;
+ {
+ pos_T cursor_save;
+ pos_T *trypos;
+ static pos_T pos_copy;
+
+ cursor_save = curwin->w_cursor;
+! if ((trypos = findmatchlimit(NULL, '(', 0, ind_maxparen)) != NULL)
+ {
+ /* check if the ( is in a // comment */
+ if ((colnr_T)cin_skip2pos(trypos) > trypos->col)
+--- 6654,6673 ----
+ find_match_paren(ind_maxparen) /* XXX */
+ int ind_maxparen;
+ {
++ return find_match_char('(', ind_maxparen);
++ }
++
++ static pos_T *
++ find_match_char(c, ind_maxparen) /* XXX */
++ int c;
++ int ind_maxparen;
++ {
+ pos_T cursor_save;
+ pos_T *trypos;
+ static pos_T pos_copy;
+
+ cursor_save = curwin->w_cursor;
+! if ((trypos = findmatchlimit(NULL, c, 0, ind_maxparen)) != NULL)
+ {
+ /* check if the ( is in a // comment */
+ if ((colnr_T)cin_skip2pos(trypos) > trypos->col)
+***************
+*** 6976,6981 ****
+--- 7017,7024 ----
+ #define LOOKFOR_NOBREAK 8
+ #define LOOKFOR_CPP_BASECLASS 9
+ #define LOOKFOR_ENUM_OR_INIT 10
++ #define LOOKFOR_JS_KEY 11
++ #define LOOKFOR_NO_COMMA 12
+
+ int whilelevel;
+ linenr_T lnum;
+***************
+*** 6986,6991 ****
+--- 7029,7035 ----
+ int cont_amount = 0; /* amount for continuation line */
+ int original_line_islabel;
+ int added_to_amount = 0;
++ int js_cur_has_key = 0;
+
+ /* make a copy, value is changed below */
+ int ind_continuation = curbuf->b_ind_continuation;
+***************
+*** 7209,7214 ****
+--- 7253,7268 ----
+ }
+
+ /*
++ * Are we looking at a ']' that has a match?
++ */
++ else if (*skipwhite(theline) == ']'
++ && (trypos = find_match_char('[', curbuf->b_ind_maxparen)) != NULL)
++ {
++ /* align with the line containing the '['. */
++ amount = get_indent_lnum(trypos->lnum);
++ }
++
++ /*
+ * Are we inside parentheses or braces?
+ */ /* XXX */
+ else if (((trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL
+***************
+*** 7473,7486 ****
+ if (cin_iscomment(theline))
+ amount += curbuf->b_ind_comment;
+ }
+-
+- /*
+- * Are we at least inside braces, then?
+- */
+ else
+ {
+ trypos = tryposBrace;
+-
+ ourscope = trypos->lnum;
+ start = ml_get(ourscope);
+
+--- 7527,7539 ----
+ if (cin_iscomment(theline))
+ amount += curbuf->b_ind_comment;
+ }
+ else
+ {
++ /*
++ * We are inside braces, there is a { before this line at the position
++ * stored in tryposBrace.
++ */
+ trypos = tryposBrace;
+ ourscope = trypos->lnum;
+ start = ml_get(ourscope);
+
+***************
+*** 7502,7525 ****
+ }
+ else
+ {
+! /*
+! * that opening brace might have been on a continuation
+! * line. if so, find the start of the line.
+! */
+ curwin->w_cursor.lnum = ourscope;
+
+! /*
+! * position the cursor over the rightmost paren, so that
+! * matching it will take us back to the start of the line.
+! */
+ lnum = ourscope;
+ if (find_last_paren(start, '(', ')')
+ && (trypos = find_match_paren(curbuf->b_ind_maxparen))
+ != NULL)
+ lnum = trypos->lnum;
+
+! /*
+! * It could have been something like
+ * case 1: if (asdf &&
+ * ldfd) {
+ * }
+--- 7555,7573 ----
+ }
+ else
+ {
+! /* That opening brace might have been on a continuation
+! * line. if so, find the start of the line. */
+ curwin->w_cursor.lnum = ourscope;
+
+! /* Position the cursor over the rightmost paren, so that
+! * matching it will take us back to the start of the line. */
+ lnum = ourscope;
+ if (find_last_paren(start, '(', ')')
+ && (trypos = find_match_paren(curbuf->b_ind_maxparen))
+ != NULL)
+ lnum = trypos->lnum;
+
+! /* It could have been something like
+ * case 1: if (asdf &&
+ * ldfd) {
+ * }
+***************
+*** 7535,7542 ****
+ start_brace = BRACE_AT_END;
+ }
+
+ /*
+! * if we're looking at a closing brace, that's where
+ * we want to be. otherwise, add the amount of room
+ * that an indent is supposed to be.
+ */
+--- 7583,7594 ----
+ start_brace = BRACE_AT_END;
+ }
+
++ /* For Javascript check if the line starts with "key:". */
++ if (curbuf->b_ind_js)
++ js_cur_has_key = cin_has_js_key(theline);
++
+ /*
+! * If we're looking at a closing brace, that's where
+ * we want to be. otherwise, add the amount of room
+ * that an indent is supposed to be.
+ */
+***************
+*** 7643,7649 ****
+ * Search backwards. If we find something we recognize, line up
+ * with that.
+ *
+! * if we're looking at an open brace, indent
+ * the usual amount relative to the conditional
+ * that opens the block.
+ */
+--- 7695,7701 ----
+ * Search backwards. If we find something we recognize, line up
+ * with that.
+ *
+! * If we're looking at an open brace, indent
+ * the usual amount relative to the conditional
+ * that opens the block.
+ */
+***************
+*** 8051,8056 ****
+--- 8103,8143 ----
+ */
+ terminated = cin_isterminated(l, FALSE, TRUE);
+
++ if (js_cur_has_key)
++ {
++ js_cur_has_key = 0; /* only check the first line */
++ if (curbuf->b_ind_js && terminated == ',')
++ {
++ /* For Javascript we might be inside an object:
++ * key: something, <- align with this
++ * key: something
++ * or:
++ * key: something + <- align with this
++ * something,
++ * key: something
++ */
++ lookfor = LOOKFOR_JS_KEY;
++ }
++ }
++ if (lookfor == LOOKFOR_JS_KEY && cin_has_js_key(l))
++ {
++ amount = get_indent();
++ break;
++ }
++ if (lookfor == LOOKFOR_NO_COMMA)
++ {
++ if (terminated != ',')
++ /* line below current line is the one that starts a
++ * (possibly broken) line ending in a comma. */
++ break;
++ amount = get_indent();
++ if (curwin->w_cursor.lnum - 1 == ourscope)
++ /* line above is start of the scope, thus current line
++ * is the one that stars a (possibly broken) line
++ * ending in a comma. */
++ break;
++ }
++
+ if (terminated == 0 || (lookfor != LOOKFOR_UNTERM
+ && terminated == ','))
+ {
+***************
+*** 8062,8072 ****
+ * bar )
+ */
+ /*
+! * position the cursor over the rightmost paren, so that
+ * matching it will take us back to the start of the line.
+ */
+ (void)find_last_paren(l, '(', ')');
+ trypos = find_match_paren(corr_ind_maxparen(&cur_curpos));
+
+ /*
+ * If we are looking for ',', we also look for matching
+--- 8149,8164 ----
+ * bar )
+ */
+ /*
+! * Position the cursor over the rightmost paren, so that
+ * matching it will take us back to the start of the line.
++ * Ignore a match before the start of the block.
+ */
+ (void)find_last_paren(l, '(', ')');
+ trypos = find_match_paren(corr_ind_maxparen(&cur_curpos));
++ if (trypos != NULL && (trypos->lnum < tryposBrace->lnum
++ || (trypos->lnum == tryposBrace->lnum
++ && trypos->col < tryposBrace->col)))
++ trypos = NULL;
+
+ /*
+ * If we are looking for ',', we also look for matching
+***************
+*** 8117,8126 ****
+ * Get indent and pointer to text for current line,
+ * ignoring any jump label. XXX
+ */
+! if (!curbuf->b_ind_js)
+! cur_amount = skip_label(curwin->w_cursor.lnum, &l);
+! else
+ cur_amount = get_indent();
+ /*
+ * If this is just above the line we are indenting, and it
+ * starts with a '{', line it up with this line.
+--- 8209,8218 ----
+ * Get indent and pointer to text for current line,
+ * ignoring any jump label. XXX
+ */
+! if (curbuf->b_ind_js)
+ cur_amount = get_indent();
++ else
++ cur_amount = skip_label(curwin->w_cursor.lnum, &l);
+ /*
+ * If this is just above the line we are indenting, and it
+ * starts with a '{', line it up with this line.
+***************
+*** 8142,8148 ****
+ if (*skipwhite(l) != '{')
+ amount += curbuf->b_ind_open_extra;
+
+! if (curbuf->b_ind_cpp_baseclass)
+ {
+ /* have to look back, whether it is a cpp base
+ * class declaration or initialization */
+--- 8234,8240 ----
+ if (*skipwhite(l) != '{')
+ amount += curbuf->b_ind_open_extra;
+
+! if (curbuf->b_ind_cpp_baseclass && !curbuf->b_ind_js)
+ {
+ /* have to look back, whether it is a cpp base
+ * class declaration or initialization */
+***************
+*** 8302,8309 ****
+ */
+ if (lookfor == LOOKFOR_INITIAL && terminated == ',')
+ {
+! lookfor = LOOKFOR_ENUM_OR_INIT;
+! cont_amount = cin_first_id_amount();
+ }
+ else
+ {
+--- 8394,8434 ----
+ */
+ if (lookfor == LOOKFOR_INITIAL && terminated == ',')
+ {
+! if (curbuf->b_ind_js)
+! {
+! /* Search for a line ending in a comma
+! * and line up with the line below it
+! * (could be the current line).
+! * some = [
+! * 1, <- line up here
+! * 2,
+! * some = [
+! * 3 + <- line up here
+! * 4 *
+! * 5,
+! * 6,
+! */
+! lookfor = LOOKFOR_NO_COMMA;
+! amount = get_indent(); /* XXX */
+! trypos = find_match_char('[',
+! curbuf->b_ind_maxparen);
+! if (trypos != NULL)
+! {
+! if (trypos->lnum
+! == curwin->w_cursor.lnum - 1)
+! {
+! /* Current line is first inside
+! * [], line up with it. */
+! break;
+! }
+! ourscope = trypos->lnum;
+! }
+! }
+! else
+! {
+! lookfor = LOOKFOR_ENUM_OR_INIT;
+! cont_amount = cin_first_id_amount();
+! }
+ }
+ else
+ {
+***************
+*** 8313,8319 ****
+ /* XXX */
+ cont_amount = cin_get_equal_amount(
+ curwin->w_cursor.lnum);
+! if (lookfor != LOOKFOR_TERM)
+ lookfor = LOOKFOR_UNTERM;
+ }
+ }
+--- 8438,8445 ----
+ /* XXX */
+ cont_amount = cin_get_equal_amount(
+ curwin->w_cursor.lnum);
+! if (lookfor != LOOKFOR_TERM
+! && lookfor != LOOKFOR_JS_KEY)
+ lookfor = LOOKFOR_UNTERM;
+ }
+ }
+***************
+*** 8324,8331 ****
+ * Check if we are after a while (cond);
+ * If so: Ignore until the matching "do".
+ */
+! /* XXX */
+! else if (cin_iswhileofdo_end(terminated))
+ {
+ /*
+ * Found an unterminated line after a while ();, line up
+--- 8450,8456 ----
+ * Check if we are after a while (cond);
+ * If so: Ignore until the matching "do".
+ */
+! else if (cin_iswhileofdo_end(terminated)) /* XXX */
+ {
+ /*
+ * Found an unterminated line after a while ();, line up
+***************
+*** 8538,8555 ****
+ if (curbuf->b_ind_jump_label > 0 && original_line_islabel)
+ amount -= curbuf->b_ind_jump_label;
+ }
+-
+- /*
+- * ok -- we're not inside any sort of structure at all!
+- *
+- * this means we're at the top level, and everything should
+- * basically just match where the previous line is, except
+- * for the lines immediately following a function declaration,
+- * which are K&R-style parameters and need to be indented.
+- */
+ else
+ {
+ /*
+ * if our line starts with an open brace, forget about any
+ * prevailing indent and make sure it looks like the start
+ * of a function
+--- 8663,8678 ----
+ if (curbuf->b_ind_jump_label > 0 && original_line_islabel)
+ amount -= curbuf->b_ind_jump_label;
+ }
+ else
+ {
+ /*
++ * ok -- we're not inside any sort of structure at all!
++ *
++ * This means we're at the top level, and everything should
++ * basically just match where the previous line is, except
++ * for the lines immediately following a function declaration,
++ * which are K&R-style parameters and need to be indented.
++ *
+ * if our line starts with an open brace, forget about any
+ * prevailing indent and make sure it looks like the start
+ * of a function
+***************
+*** 8700,8705 ****
+--- 8823,8840 ----
+ break;
+
+ /*
++ * If the previous line ends on '[' we are probably in an
++ * array constant:
++ * something = [
++ * 234, <- extra indent
++ */
++ if (cin_ends_in(l, (char_u *)"[", NULL))
++ {
++ amount = get_indent() + ind_continuation;
++ break;
++ }
++
++ /*
+ * Find a line only has a semicolon that belongs to a previous
+ * line ending in '}', e.g. before an #endif. Don't increase
+ * indent then.
+*** ../vim-7.4.354/src/testdir/test3.in 2014-07-02 18:27:44.662290695 +0200
+--- src/testdir/test3.in 2014-07-03 22:41:38.743848025 +0200
+***************
+*** 1432,1438 ****
+
+ STARTTEST
+ :set cino=(0,ts
+! 2kdd=][
+ ENDTEST
+
+ void func(int a
+--- 1432,1438 ----
+
+ STARTTEST
+ :set cino=(0,ts
+! 2kdd2j=][
+ ENDTEST
+
+ void func(int a
+***************
+*** 1446,1452 ****
+
+ STARTTEST
+ :set cino=(0
+! 2kdd=][
+ ENDTEST
+
+ void
+--- 1446,1452 ----
+
+ STARTTEST
+ :set cino=(0
+! 2kdd2j=][
+ ENDTEST
+
+ void
+***************
+*** 1461,1467 ****
+
+ STARTTEST
+ :set cino&
+! 2kdd=7][
+ ENDTEST
+
+ void func(void)
+--- 1461,1467 ----
+
+ STARTTEST
+ :set cino&
+! 2kdd2j=7][
+ ENDTEST
+
+ void func(void)
+***************
+*** 1538,1544 ****
+ STARTTEST
+ :set cino&
+ :set cino+=l1
+! 2kdd=][
+ ENDTEST
+
+ void func(void)
+--- 1538,1544 ----
+ STARTTEST
+ :set cino&
+ :set cino+=l1
+! 2kdd2j=][
+ ENDTEST
+
+ void func(void)
+***************
+*** 1567,1573 ****
+
+ STARTTEST
+ :set cino&
+! 2kdd=][
+ ENDTEST
+
+ void func(void)
+--- 1567,1573 ----
+
+ STARTTEST
+ :set cino&
+! 2kdd2j=][
+ ENDTEST
+
+ void func(void)
+***************
+*** 1592,1598 ****
+
+ STARTTEST
+ :set cino&
+! 2kdd=][
+ ENDTEST
+
+ void func(void)
+--- 1592,1598 ----
+
+ STARTTEST
+ :set cino&
+! 2kdd2j=][
+ ENDTEST
+
+ void func(void)
+***************
+*** 1919,1928 ****
+
+ JSSTART
+ var foo = [
+! 1, // indent 8 more
+ 2,
+ 3
+! ]; // indent 8 less
+ JSEND
+
+ STARTTEST
+--- 1919,1928 ----
+
+ JSSTART
+ var foo = [
+! 1,
+ 2,
+ 3
+! ];
+ JSEND
+
+ STARTTEST
+***************
+*** 1937,1943 ****
+ 1,
+ 2,
+ 3
+! ]; // indent 16 less
+ }
+ JSEND
+
+--- 1937,1943 ----
+ 1,
+ 2,
+ 3
+! ];
+ }
+ JSEND
+
+***************
+*** 1954,1959 ****
+--- 1954,1961 ----
+ cond) {
+ stmt;
+ }
++ window.something.left =
++ (width - 50 + offset) + "px";
+ var class_name='myclass';
+
+ function private_method() {
+***************
+*** 1969,1983 ****
+
+ $(this).data(class_name+'_public',$.extend({},{
+ foo: 'bar',
+! bar: 2, // indent 8 more
+! foobar: [ // indent 8 more
+! 1, // indent 8 more
+! 2, // indent 16 more
+! 3 // indent 16 more
+ ],
+! callback: function(){ // indent 8 more
+! return true; // indent 8 more
+! } // indent 8 more
+ }, options||{}));
+ }
+
+--- 1971,1985 ----
+
+ $(this).data(class_name+'_public',$.extend({},{
+ foo: 'bar',
+! bar: 2,
+! foobar: [
+! 1,
+! 2,
+! 3
+ ],
+! callback: function(){
+! return true;
+! }
+ }, options||{}));
+ }
+
+***************
+*** 2018,2026 ****
+ foo: 'bar',
+ bar: 2,
+ foobar: [
+! 1, // indent 8 more
+! 2, // indent 8 more
+! 3 // indent 8 more
+ ],
+ callback: function(){
+ return true;
+--- 2020,2028 ----
+ foo: 'bar',
+ bar: 2,
+ foobar: [
+! 1,
+! 2,
+! 3
+ ],
+ callback: function(){
+ return true;
+***************
+*** 2040,2054 ****
+ function init(options) {
+ $(this).data(class_name+'_public',$.extend({},{
+ foo: 'bar',
+! bar: 2, // indent 8 more
+! foobar: [ // indent 8 more
+! 1, // indent 8 more
+! 2, // indent 16 more
+! 3 // indent 16 more
+ ],
+! callback: function(){ // indent 8 more
+! return true; // indent 8 more
+! } // indent 8 more
+ }, options||{}));
+ }
+ })(jQuery);
+--- 2042,2056 ----
+ function init(options) {
+ $(this).data(class_name+'_public',$.extend({},{
+ foo: 'bar',
+! bar: 2,
+! foobar: [
+! 1,
+! 2,
+! 3
+ ],
+! callback: function(){
+! return true;
+! }
+ }, options||{}));
+ }
+ })(jQuery);
+*** ../vim-7.4.354/src/testdir/test3.ok 2014-07-02 18:27:44.662290695 +0200
+--- src/testdir/test3.ok 2014-07-03 22:18:58.167827177 +0200
+***************
+*** 1707,1716 ****
+
+ JSSTART
+ var foo = [
+! 1, // indent 8 more
+ 2,
+ 3
+! ]; // indent 8 less
+ JSEND
+
+
+--- 1707,1716 ----
+
+ JSSTART
+ var foo = [
+! 1,
+ 2,
+ 3
+! ];
+ JSEND
+
+
+***************
+*** 1720,1726 ****
+ 1,
+ 2,
+ 3
+! ]; // indent 16 less
+ }
+ JSEND
+
+--- 1720,1726 ----
+ 1,
+ 2,
+ 3
+! ];
+ }
+ JSEND
+
+***************
+*** 1732,1737 ****
+--- 1732,1739 ----
+ cond) {
+ stmt;
+ }
++ window.something.left =
++ (width - 50 + offset) + "px";
+ var class_name='myclass';
+
+ function private_method() {
+***************
+*** 1747,1761 ****
+
+ $(this).data(class_name+'_public',$.extend({},{
+ foo: 'bar',
+! bar: 2, // indent 8 more
+! foobar: [ // indent 8 more
+! 1, // indent 8 more
+! 2, // indent 16 more
+! 3 // indent 16 more
+ ],
+! callback: function(){ // indent 8 more
+! return true; // indent 8 more
+! } // indent 8 more
+ }, options||{}));
+ }
+
+--- 1749,1763 ----
+
+ $(this).data(class_name+'_public',$.extend({},{
+ foo: 'bar',
+! bar: 2,
+! foobar: [
+! 1,
+! 2,
+! 3
+ ],
+! callback: function(){
+! return true;
+! }
+ }, options||{}));
+ }
+
+***************
+*** 1791,1799 ****
+ foo: 'bar',
+ bar: 2,
+ foobar: [
+! 1, // indent 8 more
+! 2, // indent 8 more
+! 3 // indent 8 more
+ ],
+ callback: function(){
+ return true;
+--- 1793,1801 ----
+ foo: 'bar',
+ bar: 2,
+ foobar: [
+! 1,
+! 2,
+! 3
+ ],
+ callback: function(){
+ return true;
+***************
+*** 1808,1822 ****
+ function init(options) {
+ $(this).data(class_name+'_public',$.extend({},{
+ foo: 'bar',
+! bar: 2, // indent 8 more
+! foobar: [ // indent 8 more
+! 1, // indent 8 more
+! 2, // indent 16 more
+! 3 // indent 16 more
+ ],
+! callback: function(){ // indent 8 more
+! return true; // indent 8 more
+! } // indent 8 more
+ }, options||{}));
+ }
+ })(jQuery);
+--- 1810,1824 ----
+ function init(options) {
+ $(this).data(class_name+'_public',$.extend({},{
+ foo: 'bar',
+! bar: 2,
+! foobar: [
+! 1,
+! 2,
+! 3
+ ],
+! callback: function(){
+! return true;
+! }
+ }, options||{}));
+ }
+ })(jQuery);
+*** ../vim-7.4.354/src/version.c 2014-07-03 22:54:04.911859458 +0200
+--- src/version.c 2014-07-03 22:54:40.971860011 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 355,
+ /**/
+
+--
+MESKIMEN'S LAW
+ There's never time to do it right, but always time to do it over.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.356 b/patches/source/vim/patches/7.4.356
new file mode 100644
index 000000000..58af03830
--- /dev/null
+++ b/patches/source/vim/patches/7.4.356
@@ -0,0 +1,38 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.356
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.356
+Problem: Mercurial does not ignore memfile_test. (Daniel Hahler)
+Solution: Add memfile_test to ignored files, remove trailing spaces.
+Files: .hgignore
+
+
+Note: This patch was made empty, because .hgignore is not part of the
+distributed files.
+
+
+*** ../vim-7.4.355/src/version.c 2014-07-03 22:57:51.299862927 +0200
+--- src/version.c 2014-07-09 13:41:39.855060005 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 356,
+ /**/
+
+--
+In Africa some of the native tribes have a custom of beating the ground
+with clubs and uttering spine chilling cries. Anthropologists call
+this a form of primitive self-expression. In America we call it golf.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.357 b/patches/source/vim/patches/7.4.357
new file mode 100644
index 000000000..e1d638f6c
--- /dev/null
+++ b/patches/source/vim/patches/7.4.357
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.357
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.357
+Problem: After completion some characters are not redrawn.
+Solution: Clear the command line unconditionally. (Jacob Niehus)
+Files: src/edit.c
+
+
+*** ../vim-7.4.356/src/edit.c 2014-06-25 14:39:35.102348584 +0200
+--- src/edit.c 2014-07-09 13:22:22.747075922 +0200
+***************
+*** 3854,3861 ****
+ ins_compl_free();
+ compl_started = FALSE;
+ compl_matches = 0;
+! if (!shortmess(SHM_COMPLETIONMENU))
+! msg_clr_cmdline(); /* necessary for "noshowmode" */
+ ctrl_x_mode = 0;
+ compl_enter_selects = FALSE;
+ if (edit_submode != NULL)
+--- 3854,3860 ----
+ ins_compl_free();
+ compl_started = FALSE;
+ compl_matches = 0;
+! msg_clr_cmdline(); /* necessary for "noshowmode" */
+ ctrl_x_mode = 0;
+ compl_enter_selects = FALSE;
+ if (edit_submode != NULL)
+*** ../vim-7.4.356/src/version.c 2014-07-09 13:43:18.399058649 +0200
+--- src/version.c 2014-07-09 13:58:35.483046034 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 357,
+ /**/
+
+--
+Why isn't there mouse-flavored cat food?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.358 b/patches/source/vim/patches/7.4.358
new file mode 100644
index 000000000..a36803dd8
--- /dev/null
+++ b/patches/source/vim/patches/7.4.358
@@ -0,0 +1,290 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.358
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.358 (after 7.4.351)
+Problem: Sort is not always stable.
+Solution: Add an index instead of relying on the pointer to remain the same.
+ Idea by Jun Takimoto.
+Files: src/eval.c
+
+
+*** ../vim-7.4.357/src/eval.c 2014-07-02 19:06:14.686326091 +0200
+--- src/eval.c 2014-07-09 17:42:05.699813489 +0200
+***************
+*** 17329,17334 ****
+--- 17329,17341 ----
+ #endif
+ item_compare2 __ARGS((const void *s1, const void *s2));
+
++ /* struct used in the array that's given to qsort() */
++ typedef struct
++ {
++ listitem_T *item;
++ int idx;
++ } sortItem_T;
++
+ static int item_compare_ic;
+ static int item_compare_numeric;
+ static char_u *item_compare_func;
+***************
+*** 17349,17362 ****
+ const void *s1;
+ const void *s2;
+ {
+ char_u *p1, *p2;
+ char_u *tofree1, *tofree2;
+ int res;
+ char_u numbuf1[NUMBUFLEN];
+ char_u numbuf2[NUMBUFLEN];
+
+! p1 = tv2string(&(*(listitem_T **)s1)->li_tv, &tofree1, numbuf1, 0);
+! p2 = tv2string(&(*(listitem_T **)s2)->li_tv, &tofree2, numbuf2, 0);
+ if (p1 == NULL)
+ p1 = (char_u *)"";
+ if (p2 == NULL)
+--- 17356,17372 ----
+ const void *s1;
+ const void *s2;
+ {
++ sortItem_T *si1, *si2;
+ char_u *p1, *p2;
+ char_u *tofree1, *tofree2;
+ int res;
+ char_u numbuf1[NUMBUFLEN];
+ char_u numbuf2[NUMBUFLEN];
+
+! si1 = (sortItem_T *)s1;
+! si2 = (sortItem_T *)s2;
+! p1 = tv2string(&si1->item->li_tv, &tofree1, numbuf1, 0);
+! p2 = tv2string(&si2->item->li_tv, &tofree2, numbuf2, 0);
+ if (p1 == NULL)
+ p1 = (char_u *)"";
+ if (p2 == NULL)
+***************
+*** 17379,17385 ****
+ /* When the result would be zero, compare the pointers themselves. Makes
+ * the sort stable. */
+ if (res == 0 && !item_compare_keep_zero)
+! res = s1 > s2 ? 1 : -1;
+
+ vim_free(tofree1);
+ vim_free(tofree2);
+--- 17389,17395 ----
+ /* When the result would be zero, compare the pointers themselves. Makes
+ * the sort stable. */
+ if (res == 0 && !item_compare_keep_zero)
+! res = si1->idx > si2->idx ? 1 : -1;
+
+ vim_free(tofree1);
+ vim_free(tofree2);
+***************
+*** 17394,17399 ****
+--- 17404,17410 ----
+ const void *s1;
+ const void *s2;
+ {
++ sortItem_T *si1, *si2;
+ int res;
+ typval_T rettv;
+ typval_T argv[3];
+***************
+*** 17403,17412 ****
+ if (item_compare_func_err)
+ return 0;
+
+ /* Copy the values. This is needed to be able to set v_lock to VAR_FIXED
+ * in the copy without changing the original list items. */
+! copy_tv(&(*(listitem_T **)s1)->li_tv, &argv[0]);
+! copy_tv(&(*(listitem_T **)s2)->li_tv, &argv[1]);
+
+ rettv.v_type = VAR_UNKNOWN; /* clear_tv() uses this */
+ res = call_func(item_compare_func, (int)STRLEN(item_compare_func),
+--- 17414,17426 ----
+ if (item_compare_func_err)
+ return 0;
+
++ si1 = (sortItem_T *)s1;
++ si2 = (sortItem_T *)s2;
++
+ /* Copy the values. This is needed to be able to set v_lock to VAR_FIXED
+ * in the copy without changing the original list items. */
+! copy_tv(&si1->item->li_tv, &argv[0]);
+! copy_tv(&si2->item->li_tv, &argv[1]);
+
+ rettv.v_type = VAR_UNKNOWN; /* clear_tv() uses this */
+ res = call_func(item_compare_func, (int)STRLEN(item_compare_func),
+***************
+*** 17426,17432 ****
+ /* When the result would be zero, compare the pointers themselves. Makes
+ * the sort stable. */
+ if (res == 0 && !item_compare_keep_zero)
+! res = s1 > s2 ? 1 : -1;
+
+ return res;
+ }
+--- 17440,17446 ----
+ /* When the result would be zero, compare the pointers themselves. Makes
+ * the sort stable. */
+ if (res == 0 && !item_compare_keep_zero)
+! res = si1->idx > si2->idx ? 1 : -1;
+
+ return res;
+ }
+***************
+*** 17442,17448 ****
+ {
+ list_T *l;
+ listitem_T *li;
+! listitem_T **ptrs;
+ long len;
+ long i;
+
+--- 17456,17462 ----
+ {
+ list_T *l;
+ listitem_T *li;
+! sortItem_T *ptrs;
+ long len;
+ long i;
+
+***************
+*** 17510,17516 ****
+ }
+
+ /* Make an array with each entry pointing to an item in the List. */
+! ptrs = (listitem_T **)alloc((int)(len * sizeof(listitem_T *)));
+ if (ptrs == NULL)
+ return;
+
+--- 17524,17530 ----
+ }
+
+ /* Make an array with each entry pointing to an item in the List. */
+! ptrs = (sortItem_T *)alloc((int)(len * sizeof(sortItem_T)));
+ if (ptrs == NULL)
+ return;
+
+***************
+*** 17519,17525 ****
+ {
+ /* sort(): ptrs will be the list to sort */
+ for (li = l->lv_first; li != NULL; li = li->li_next)
+! ptrs[i++] = li;
+
+ item_compare_func_err = FALSE;
+ item_compare_keep_zero = FALSE;
+--- 17533,17543 ----
+ {
+ /* sort(): ptrs will be the list to sort */
+ for (li = l->lv_first; li != NULL; li = li->li_next)
+! {
+! ptrs[i].item = li;
+! ptrs[i].idx = i;
+! ++i;
+! }
+
+ item_compare_func_err = FALSE;
+ item_compare_keep_zero = FALSE;
+***************
+*** 17531,17537 ****
+ else
+ {
+ /* Sort the array with item pointers. */
+! qsort((void *)ptrs, (size_t)len, sizeof(listitem_T *),
+ item_compare_func == NULL ? item_compare : item_compare2);
+
+ if (!item_compare_func_err)
+--- 17549,17555 ----
+ else
+ {
+ /* Sort the array with item pointers. */
+! qsort((void *)ptrs, (size_t)len, sizeof(sortItem_T),
+ item_compare_func == NULL ? item_compare : item_compare2);
+
+ if (!item_compare_func_err)
+***************
+*** 17540,17546 ****
+ l->lv_first = l->lv_last = l->lv_idx_item = NULL;
+ l->lv_len = 0;
+ for (i = 0; i < len; ++i)
+! list_append(l, ptrs[i]);
+ }
+ }
+ }
+--- 17558,17564 ----
+ l->lv_first = l->lv_last = l->lv_idx_item = NULL;
+ l->lv_len = 0;
+ for (i = 0; i < len; ++i)
+! list_append(l, ptrs[i].item);
+ }
+ }
+ }
+***************
+*** 17559,17565 ****
+ {
+ if (item_compare_func_ptr((void *)&li, (void *)&li->li_next)
+ == 0)
+! ptrs[i++] = li;
+ if (item_compare_func_err)
+ {
+ EMSG(_("E882: Uniq compare function failed"));
+--- 17577,17583 ----
+ {
+ if (item_compare_func_ptr((void *)&li, (void *)&li->li_next)
+ == 0)
+! ptrs[i++].item = li;
+ if (item_compare_func_err)
+ {
+ EMSG(_("E882: Uniq compare function failed"));
+***************
+*** 17571,17582 ****
+ {
+ while (--i >= 0)
+ {
+! li = ptrs[i]->li_next;
+! ptrs[i]->li_next = li->li_next;
+ if (li->li_next != NULL)
+! li->li_next->li_prev = ptrs[i];
+ else
+! l->lv_last = ptrs[i];
+ list_fix_watch(l, li);
+ listitem_free(li);
+ l->lv_len--;
+--- 17589,17600 ----
+ {
+ while (--i >= 0)
+ {
+! li = ptrs[i].item->li_next;
+! ptrs[i].item->li_next = li->li_next;
+ if (li->li_next != NULL)
+! li->li_next->li_prev = ptrs[i].item;
+ else
+! l->lv_last = ptrs[i].item;
+ list_fix_watch(l, li);
+ listitem_free(li);
+ l->lv_len--;
+*** ../vim-7.4.357/src/version.c 2014-07-09 14:00:45.175044250 +0200
+--- src/version.c 2014-07-09 17:23:12.791836515 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 358,
+ /**/
+
+--
+An indication you must be a manager:
+You can explain to somebody the difference between "re-engineering",
+"down-sizing", "right-sizing", and "firing people's asses".
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.359 b/patches/source/vim/patches/7.4.359
new file mode 100644
index 000000000..ab695d57f
--- /dev/null
+++ b/patches/source/vim/patches/7.4.359
@@ -0,0 +1,103 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.359
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.359
+Problem: When 'ttymouse' is set to 'uxterm' the xterm version is not
+ requested. (Tomas Janousek)
+Solution: Do not mark uxterm as a conflict mouse and add
+ resume_get_esc_sequence().
+Files: src/term.c, src/os_unix.c, src/proto/term.pro
+
+
+*** ../vim-7.4.358/src/term.c 2014-05-22 21:22:15.361995652 +0200
+--- src/term.c 2014-07-09 18:49:57.127730739 +0200
+***************
+*** 3330,3335 ****
+--- 3330,3348 ----
+ return crv_status == CRV_SENT || u7_status == U7_SENT
+ || xt_index_out > xt_index_in;
+ }
++
++ /*
++ * If requesting the version was disabled in did_request_esc_sequence(),
++ * enable it again.
++ */
++ void
++ resume_get_esc_sequence()
++ {
++ if (crv_status == 0)
++ crv_status = CRV_GET;
++ if (u7_status == 0)
++ u7_status = U7_GET;
++ }
+ # endif
+
+
+*** ../vim-7.4.358/src/os_unix.c 2014-05-22 21:22:15.361995652 +0200
+--- src/os_unix.c 2014-07-09 18:56:58.483722175 +0200
+***************
+*** 3780,3788 ****
+ # ifdef FEAT_MOUSE_URXVT
+ /* same as the dec mouse */
+ if (use_xterm_mouse() == 3
+- # ifdef FEAT_TERMRESPONSE
+- && !did_request_esc_sequence()
+- # endif
+ # ifdef FEAT_GUI
+ && !gui.in_use
+ # endif
+--- 3780,3785 ----
+***************
+*** 3797,3803 ****
+ mch_setmouse(FALSE);
+ setmouse();
+ }
+! xterm_conflict_mouse = TRUE;
+ }
+ else
+ del_mouse_termcode(KS_URXVT_MOUSE);
+--- 3794,3801 ----
+ mch_setmouse(FALSE);
+ setmouse();
+ }
+! /* It's OK to request the xterm version for uxterm. */
+! resume_get_esc_sequence();
+ }
+ else
+ del_mouse_termcode(KS_URXVT_MOUSE);
+*** ../vim-7.4.358/src/proto/term.pro 2014-05-22 18:14:27.570224664 +0200
+--- src/proto/term.pro 2014-07-09 18:53:31.827726375 +0200
+***************
+*** 35,40 ****
+--- 35,41 ----
+ void starttermcap __ARGS((void));
+ void stoptermcap __ARGS((void));
+ int did_request_esc_sequence __ARGS((void));
++ void resume_get_esc_sequence __ARGS((void));
+ void may_req_termresponse __ARGS((void));
+ void may_req_ambiguous_char_width __ARGS((void));
+ int swapping_screen __ARGS((void));
+*** ../vim-7.4.358/src/version.c 2014-07-09 17:51:46.075801693 +0200
+--- src/version.c 2014-07-09 18:50:55.515729552 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 359,
+ /**/
+
+--
+An indication you must be a manager:
+You give constructive feedback to your dog.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.360 b/patches/source/vim/patches/7.4.360
new file mode 100644
index 000000000..9bd5212f0
--- /dev/null
+++ b/patches/source/vim/patches/7.4.360
@@ -0,0 +1,80 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.360
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.360
+Problem: In a regexp pattern a "$" followed by \v or \V is not seen as the
+ end-of-line.
+Solution: Handle the situation. (Ozaki Kiichi)
+Files: src/regexp.c
+
+
+*** ../vim-7.4.359/src/regexp.c 2014-05-13 19:37:19.489786520 +0200
+--- src/regexp.c 2014-07-09 19:28:51.871683287 +0200
+***************
+*** 3109,3123 ****
+ if (reg_magic >= MAGIC_OFF)
+ {
+ char_u *p = regparse + 1;
+
+! /* ignore \c \C \m and \M after '$' */
+ while (p[0] == '\\' && (p[1] == 'c' || p[1] == 'C'
+! || p[1] == 'm' || p[1] == 'M' || p[1] == 'Z'))
+ p += 2;
+ if (p[0] == NUL
+ || (p[0] == '\\'
+ && (p[1] == '|' || p[1] == '&' || p[1] == ')'
+ || p[1] == 'n'))
+ || reg_magic == MAGIC_ALL)
+ curchr = Magic('$');
+ }
+--- 3109,3133 ----
+ if (reg_magic >= MAGIC_OFF)
+ {
+ char_u *p = regparse + 1;
++ int is_magic_all = (reg_magic == MAGIC_ALL);
+
+! /* ignore \c \C \m \M \v \V and \Z after '$' */
+ while (p[0] == '\\' && (p[1] == 'c' || p[1] == 'C'
+! || p[1] == 'm' || p[1] == 'M'
+! || p[1] == 'v' || p[1] == 'V' || p[1] == 'Z'))
+! {
+! if (p[1] == 'v')
+! is_magic_all = TRUE;
+! else if (p[1] == 'm' || p[1] == 'M' || p[1] == 'V')
+! is_magic_all = FALSE;
+ p += 2;
++ }
+ if (p[0] == NUL
+ || (p[0] == '\\'
+ && (p[1] == '|' || p[1] == '&' || p[1] == ')'
+ || p[1] == 'n'))
++ || (is_magic_all
++ && (p[0] == '|' || p[0] == '&' || p[0] == ')'))
+ || reg_magic == MAGIC_ALL)
+ curchr = Magic('$');
+ }
+*** ../vim-7.4.359/src/version.c 2014-07-09 19:13:45.007701718 +0200
+--- src/version.c 2014-07-09 19:18:36.599695792 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 360,
+ /**/
+
+--
+An indication you must be a manager:
+You believe you never have any problems in your life, just
+"issues" and "improvement opportunities".
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.361 b/patches/source/vim/patches/7.4.361
new file mode 100644
index 000000000..7629b1208
--- /dev/null
+++ b/patches/source/vim/patches/7.4.361
@@ -0,0 +1,48 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.361
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.361
+Problem: Lots of flickering when filling the preview window for 'omnifunc'.
+Solution: Disable redrawing. (Hirohito Higashi)
+Files: src/popupmnu.c
+
+
+*** ../vim-7.4.360/src/popupmnu.c 2013-11-06 04:04:29.000000000 +0100
+--- src/popupmnu.c 2014-07-09 19:56:25.663649674 +0200
+***************
+*** 567,573 ****
+--- 567,575 ----
+ g_do_tagpreview = 3;
+ if (p_pvh > 0 && p_pvh < g_do_tagpreview)
+ g_do_tagpreview = p_pvh;
++ ++RedrawingDisabled;
+ resized = prepare_tagpreview(FALSE);
++ --RedrawingDisabled;
+ g_do_tagpreview = 0;
+
+ if (curwin->w_p_pvw)
+*** ../vim-7.4.360/src/version.c 2014-07-09 19:32:30.939678834 +0200
+--- src/version.c 2014-07-09 19:55:48.995650419 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 361,
+ /**/
+
+--
+Lose weight, NEVER Diet again with
+ The "Invisible Weight Loss Patch"
+ (spam e-mail)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.362 b/patches/source/vim/patches/7.4.362
new file mode 100644
index 000000000..beeb6ddcf
--- /dev/null
+++ b/patches/source/vim/patches/7.4.362
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.362
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.362
+Problem: When matchaddpos() uses a length smaller than the number of bytes
+ in the (last) character the highlight continues until the end of
+ the line.
+Solution: Change condition from equal to larger-or-equal.
+Files: src/screen.c
+
+
+*** ../vim-7.4.361/src/screen.c 2014-07-03 22:54:04.911859458 +0200
+--- src/screen.c 2014-07-09 20:14:46.611627298 +0200
+***************
+*** 3852,3858 ****
+ {
+ shl->attr_cur = shl->attr;
+ }
+! else if (v == (long)shl->endcol)
+ {
+ shl->attr_cur = 0;
+ next_search_hl(wp, shl, lnum, (colnr_T)v, cur);
+--- 3852,3858 ----
+ {
+ shl->attr_cur = shl->attr;
+ }
+! else if (v >= (long)shl->endcol)
+ {
+ shl->attr_cur = 0;
+ next_search_hl(wp, shl, lnum, (colnr_T)v, cur);
+*** ../vim-7.4.361/src/version.c 2014-07-09 19:58:21.115647328 +0200
+--- src/version.c 2014-07-09 20:20:14.423620635 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 362,
+ /**/
+
+--
+Compilation process failed successfully.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.363 b/patches/source/vim/patches/7.4.363
new file mode 100644
index 000000000..d225cdb97
--- /dev/null
+++ b/patches/source/vim/patches/7.4.363
@@ -0,0 +1,160 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.363
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.363
+Problem: In Windows console typing 0xCE does not work.
+Solution: Convert 0xCE to K_NUL 3. (Nobuhiro Takasaki et al.)
+Files: src/os_win32.c, src/term.c
+
+
+*** ../vim-7.4.362/src/os_win32.c 2014-04-01 21:00:45.436733663 +0200
+--- src/os_win32.c 2014-07-09 20:29:30.787609327 +0200
+***************
+*** 619,625 ****
+ return FALSE;
+ }
+
+! tokenPrivileges.PrivilegeCount = 1;
+ tokenPrivileges.Privileges[0].Luid = luid;
+ tokenPrivileges.Privileges[0].Attributes = bEnable ?
+ SE_PRIVILEGE_ENABLED : 0;
+--- 619,625 ----
+ return FALSE;
+ }
+
+! tokenPrivileges.PrivilegeCount = 1;
+ tokenPrivileges.Privileges[0].Luid = luid;
+ tokenPrivileges.Privileges[0].Attributes = bEnable ?
+ SE_PRIVILEGE_ENABLED : 0;
+***************
+*** 1785,1797 ****
+ #endif
+ {
+ int n = 1;
+
+- /* A key may have one or two bytes. */
+ typeahead[typeaheadlen] = c;
+ if (ch2 != NUL)
+ {
+! typeahead[typeaheadlen + 1] = ch2;
+! ++n;
+ }
+ #ifdef FEAT_MBYTE
+ /* Only convert normal characters, not special keys. Need to
+--- 1785,1798 ----
+ #endif
+ {
+ int n = 1;
++ int conv = FALSE;
+
+ typeahead[typeaheadlen] = c;
+ if (ch2 != NUL)
+ {
+! typeahead[typeaheadlen + 1] = 3;
+! typeahead[typeaheadlen + 2] = ch2;
+! n += 2;
+ }
+ #ifdef FEAT_MBYTE
+ /* Only convert normal characters, not special keys. Need to
+***************
+*** 1800,1805 ****
+--- 1801,1807 ----
+ if (input_conv.vc_type != CONV_NONE
+ && (ch2 == NUL || c != K_NUL))
+ {
++ conv = TRUE;
+ typeaheadlen -= unconverted;
+ n = convert_input_safe(typeahead + typeaheadlen,
+ n + unconverted, TYPEAHEADLEN - typeaheadlen,
+***************
+*** 1807,1812 ****
+--- 1809,1832 ----
+ }
+ #endif
+
++ if (conv)
++ {
++ char_u *p = typeahead + typeaheadlen;
++ char_u *e = typeahead + TYPEAHEADLEN;
++
++ while (*p && p < e)
++ {
++ if (*p == K_NUL)
++ {
++ ++p;
++ mch_memmove(p + 1, p, ((size_t)(e - p)) - 1);
++ *p = 3;
++ ++n;
++ }
++ ++p;
++ }
++ }
++
+ /* Use the ALT key to set the 8th bit of the character
+ * when it's one byte, the 8th bit isn't set yet and not
+ * using a double-byte encoding (would become a lead
+*** ../vim-7.4.362/src/term.c 2014-07-09 19:13:45.003701718 +0200
+--- src/term.c 2014-07-09 20:26:28.655613029 +0200
+***************
+*** 3724,3730 ****
+--- 3724,3734 ----
+ return;
+ }
+
++ #if defined(WIN3264) && !defined(FEAT_GUI)
++ s = vim_strnsave(string, (int)STRLEN(string) + 1);
++ #else
+ s = vim_strsave(string);
++ #endif
+ if (s == NULL)
+ return;
+
+***************
+*** 3734,3739 ****
+--- 3738,3752 ----
+ STRMOVE(s, s + 1);
+ s[0] = term_7to8bit(string);
+ }
++
++ #if defined(WIN3264) && !defined(FEAT_GUI)
++ if (s[0] == K_NUL)
++ {
++ STRMOVE(s + 1, s);
++ s[1] = 3;
++ }
++ #endif
++
+ len = (int)STRLEN(s);
+
+ need_gather = TRUE; /* need to fill termleader[] */
+*** ../vim-7.4.362/src/version.c 2014-07-09 20:20:40.359620108 +0200
+--- src/version.c 2014-07-09 20:26:38.903612821 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 363,
+ /**/
+
+--
+BROTHER MAYNARD: Armaments Chapter Two Verses Nine to Twenty One.
+ANOTHER MONK: And St. Attila raised his hand grenade up on high saying "O
+ Lord bless this thy hand grenade that with it thou mayest
+ blow thine enemies to tiny bits, in thy mercy. "and the Lord
+ did grin and people did feast upon the lambs and sloths and
+ carp and anchovies and orang-utans and breakfast cereals and
+ fruit bats and...
+BROTHER MAYNARD: Skip a bit brother ...
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.364 b/patches/source/vim/patches/7.4.364
new file mode 100644
index 000000000..493056c98
--- /dev/null
+++ b/patches/source/vim/patches/7.4.364
@@ -0,0 +1,70 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.364
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.364
+Problem: When the viminfo file can't be renamed there is no error message.
+ (Vladimir Berezhnoy)
+Solution: Check for the rename to fail.
+Files: src/ex_cmds.c
+
+
+*** ../vim-7.4.363/src/ex_cmds.c 2014-05-22 14:00:12.694534712 +0200
+--- src/ex_cmds.c 2014-07-09 21:11:44.531557830 +0200
+***************
+*** 2004,2014 ****
+ {
+ fclose(fp_in);
+
+! /*
+! * In case of an error keep the original viminfo file.
+! * Otherwise rename the newly written file.
+! */
+! if (viminfo_errcnt || vim_rename(tempname, fname) == -1)
+ mch_remove(tempname);
+
+ #ifdef WIN3264
+--- 2004,2017 ----
+ {
+ fclose(fp_in);
+
+! /* In case of an error keep the original viminfo file. Otherwise
+! * rename the newly written file. Give an error if that fails. */
+! if (viminfo_errcnt == 0 && vim_rename(tempname, fname) == -1)
+! {
+! ++viminfo_errcnt;
+! EMSG2(_("E886: Can't rename viminfo file to %s!"), fname);
+! }
+! if (viminfo_errcnt > 0)
+ mch_remove(tempname);
+
+ #ifdef WIN3264
+*** ../vim-7.4.363/src/version.c 2014-07-09 20:51:04.519583033 +0200
+--- src/version.c 2014-07-09 21:13:18.575555919 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 364,
+ /**/
+
+--
+MONK: ... and the Lord spake, saying, "First shalt thou take out the Holy Pin,
+ then shalt thou count to three, no more, no less. Three shalt be the
+ number thou shalt count, and the number of the counting shalt be three.
+ Four shalt thou not count, neither count thou two, excepting that thou
+ then proceed to three. Five is right out. Once the number three, being
+ the third number, be reached, then lobbest thou thy Holy Hand Grenade of
+ Antioch towards thou foe, who being naughty in my sight, shall snuff it.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.365 b/patches/source/vim/patches/7.4.365
new file mode 100644
index 000000000..196e66e39
--- /dev/null
+++ b/patches/source/vim/patches/7.4.365
@@ -0,0 +1,159 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.365
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.365
+Problem: Crash when using ":botright split" when there isn't much space.
+Solution: Add a check for the minimum width/height. (Yukihiro Nakadaira)
+Files: src/window.c
+
+
+*** ../vim-7.4.364/src/window.c 2014-07-02 17:16:51.334225522 +0200
+--- src/window.c 2014-07-16 14:14:37.751774230 +0200
+***************
+*** 686,691 ****
+--- 686,693 ----
+ int layout;
+ frame_T *frp, *curfrp;
+ int before;
++ int minwidth;
++ int minheight;
+
+ if (flags & WSP_TOP)
+ oldwin = firstwin;
+***************
+*** 725,735 ****
+ needed += p_wiw - p_wmw;
+ if (p_ea || (flags & (WSP_BOT | WSP_TOP)))
+ {
+ available = topframe->fr_width;
+! needed += frame_minwidth(topframe, NULL);
+ }
+ else
+ available = oldwin->w_width;
+ if (available < needed && new_wp == NULL)
+ {
+ EMSG(_(e_noroom));
+--- 727,741 ----
+ needed += p_wiw - p_wmw;
+ if (p_ea || (flags & (WSP_BOT | WSP_TOP)))
+ {
++ minwidth = frame_minwidth(topframe, NULL);
+ available = topframe->fr_width;
+! needed += minwidth;
+ }
+ else
++ {
++ minwidth = frame_minwidth(oldwin->w_frame, NULL);
+ available = oldwin->w_width;
++ }
+ if (available < needed && new_wp == NULL)
+ {
+ EMSG(_(e_noroom));
+***************
+*** 739,744 ****
+--- 745,752 ----
+ new_size = oldwin->w_width / 2;
+ if (new_size > oldwin->w_width - p_wmw - 1)
+ new_size = oldwin->w_width - p_wmw - 1;
++ if (new_size > available - minwidth - 1)
++ new_size = available - minwidth - 1;
+ if (new_size < p_wmw)
+ new_size = p_wmw;
+
+***************
+*** 786,796 ****
+ needed += p_wh - p_wmh;
+ if (p_ea || (flags & (WSP_BOT | WSP_TOP)))
+ {
+ available = topframe->fr_height;
+! needed += frame_minheight(topframe, NULL);
+ }
+ else
+ {
+ available = oldwin->w_height;
+ needed += p_wmh;
+ }
+--- 794,806 ----
+ needed += p_wh - p_wmh;
+ if (p_ea || (flags & (WSP_BOT | WSP_TOP)))
+ {
++ minheight = frame_minheight(topframe, NULL);
+ available = topframe->fr_height;
+! needed += minheight;
+ }
+ else
+ {
++ minheight = frame_minheight(oldwin->w_frame, NULL);
+ available = oldwin->w_height;
+ needed += p_wmh;
+ }
+***************
+*** 810,815 ****
+--- 820,827 ----
+
+ if (new_size > oldwin_height - p_wmh - STATUS_HEIGHT)
+ new_size = oldwin_height - p_wmh - STATUS_HEIGHT;
++ if (new_size > available - minheight - STATUS_HEIGHT)
++ new_size = available - minheight - STATUS_HEIGHT;
+ if (new_size < p_wmh)
+ new_size = p_wmh;
+
+***************
+*** 5732,5738 ****
+ --wp->w_wrow;
+ }
+ }
+! set_topline(wp, lnum);
+ }
+ else if (sline > 0)
+ {
+--- 5744,5750 ----
+ --wp->w_wrow;
+ }
+ }
+! set_topline(wp, lnum);
+ }
+ else if (sline > 0)
+ {
+***************
+*** 5778,5784 ****
+ wp->w_wrow -= sline;
+ }
+
+! set_topline(wp, lnum);
+ }
+ }
+
+--- 5790,5796 ----
+ wp->w_wrow -= sline;
+ }
+
+! set_topline(wp, lnum);
+ }
+ }
+
+*** ../vim-7.4.364/src/version.c 2014-07-09 21:17:59.755550204 +0200
+--- src/version.c 2014-07-16 14:10:41.191779038 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 365,
+ /**/
+
+--
+"Software is like sex... it's better when it's free."
+ -- Linus Torvalds, initiator of the free Linux OS
+Makes me wonder what FSF stands for...?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.366 b/patches/source/vim/patches/7.4.366
new file mode 100644
index 000000000..76097bede
--- /dev/null
+++ b/patches/source/vim/patches/7.4.366
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.366
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.366
+Problem: Can't run the linebreak test on MS-Windows.
+Solution: Fix the output file name. (Taro Muraoka)
+Files: src/testdir/Make_dos.mak
+
+
+*** ../vim-7.4.365/src/testdir/Make_dos.mak 2014-07-02 19:59:35.454375136 +0200
+--- src/testdir/Make_dos.mak 2014-07-16 14:19:39.719768093 +0200
+***************
+*** 37,43 ****
+ test105.out test106.out test107.out\
+ test_autoformat_join.out \
+ test_breakindent.out \
+! test_listlbr \
+ test_eval.out \
+ test_options.out
+
+--- 37,43 ----
+ test105.out test106.out test107.out\
+ test_autoformat_join.out \
+ test_breakindent.out \
+! test_listlbr.out \
+ test_eval.out \
+ test_options.out
+
+*** ../vim-7.4.365/src/version.c 2014-07-16 14:16:41.519771715 +0200
+--- src/version.c 2014-07-16 14:18:43.307769239 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 366,
+ /**/
+
+--
+<Beeth> Girls are like internet domain names,
+ the ones I like are already taken.
+<honx> Well, you can stil get one from a strange country :-P
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.367 b/patches/source/vim/patches/7.4.367
new file mode 100644
index 000000000..c184192e4
--- /dev/null
+++ b/patches/source/vim/patches/7.4.367
@@ -0,0 +1,67 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.367
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.367 (after 7.4.357)
+Problem: Other solution for redrawing after completion.
+Solution: Schedule a window redraw instead of just clearing the command
+ line. (Jacob Niehus)
+Files: src/edit.c
+
+
+*** ../vim-7.4.366/src/edit.c 2014-07-09 14:00:45.175044250 +0200
+--- src/edit.c 2014-07-16 14:36:00.679748155 +0200
+***************
+*** 3854,3860 ****
+ ins_compl_free();
+ compl_started = FALSE;
+ compl_matches = 0;
+! msg_clr_cmdline(); /* necessary for "noshowmode" */
+ ctrl_x_mode = 0;
+ compl_enter_selects = FALSE;
+ if (edit_submode != NULL)
+--- 3854,3861 ----
+ ins_compl_free();
+ compl_started = FALSE;
+ compl_matches = 0;
+! if (!shortmess(SHM_COMPLETIONMENU))
+! msg_clr_cmdline(); /* necessary for "noshowmode" */
+ ctrl_x_mode = 0;
+ compl_enter_selects = FALSE;
+ if (edit_submode != NULL)
+***************
+*** 4591,4597 ****
+--- 4592,4601 ----
+ */
+ i = compl_col + (compl_cont_status & CONT_ADDING ? compl_length : 0);
+ backspace_until_column(i);
++
++ /* Not sure what is still valid, better redraw everything. */
+ changed_cline_bef_curs();
++ redraw_curbuf_later(NOT_VALID);
+ }
+
+ /* Insert the new text being completed. */
+*** ../vim-7.4.366/src/version.c 2014-07-16 14:20:38.255766903 +0200
+--- src/version.c 2014-07-16 14:42:23.059740384 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 367,
+ /**/
+
+--
+No children may attend school with their breath smelling of "wild onions."
+ [real standing law in West Virginia, United States of America]
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.368 b/patches/source/vim/patches/7.4.368
new file mode 100644
index 000000000..0dd85e350
--- /dev/null
+++ b/patches/source/vim/patches/7.4.368
@@ -0,0 +1,79 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.368
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.368
+Problem: Restoring the window sizes after closing the command line window
+ doesn't work properly if there are nested splits.
+Solution: Restore the sizes twice. (Hirohito Higashi)
+Files: src/window.c
+
+
+*** ../vim-7.4.367/src/window.c 2014-07-16 14:16:41.519771715 +0200
+--- src/window.c 2014-07-16 15:13:52.895701974 +0200
+***************
+*** 4848,4862 ****
+ garray_T *gap;
+ {
+ win_T *wp;
+! int i;
+
+ if (win_count() * 2 == gap->ga_len)
+ {
+! i = 0;
+! for (wp = firstwin; wp != NULL; wp = wp->w_next)
+ {
+! frame_setwidth(wp->w_frame, ((int *)gap->ga_data)[i++]);
+! win_setheight_win(((int *)gap->ga_data)[i++], wp);
+ }
+ /* recompute the window positions */
+ (void)win_comp_pos();
+--- 4848,4867 ----
+ garray_T *gap;
+ {
+ win_T *wp;
+! int i, j;
+
+ if (win_count() * 2 == gap->ga_len)
+ {
+! /* The order matters, because frames contain other frames, but it's
+! * difficult to get right. The easy way out is to do it twice. */
+! for (j = 0; j < 2; ++j)
+ {
+! i = 0;
+! for (wp = firstwin; wp != NULL; wp = wp->w_next)
+! {
+! frame_setwidth(wp->w_frame, ((int *)gap->ga_data)[i++]);
+! win_setheight_win(((int *)gap->ga_data)[i++], wp);
+! }
+ }
+ /* recompute the window positions */
+ (void)win_comp_pos();
+*** ../vim-7.4.367/src/version.c 2014-07-16 14:42:37.923740082 +0200
+--- src/version.c 2014-07-16 15:14:46.035700894 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 368,
+ /**/
+
+--
+FROG: How you English say: I one more time, mac, I unclog my nose towards
+ you, sons of a window-dresser, so, you think you could out-clever us
+ French fellows with your silly knees-bent creeping about advancing
+ behaviour. (blows a raspberry) I wave my private parts at your aunties,
+ you brightly-coloured, mealy-templed, cranberry-smelling, electric
+ donkey-bottom biters.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.369 b/patches/source/vim/patches/7.4.369
new file mode 100644
index 000000000..c501c64ac
--- /dev/null
+++ b/patches/source/vim/patches/7.4.369
@@ -0,0 +1,70 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.369
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.369
+Problem: Using freed memory when exiting while compiled with EXITFREE.
+Solution: Set curwin to NULL and check for that. (Dominique Pelle)
+Files: src/buffer.c, src/window.c
+
+
+*** ../vim-7.4.368/src/buffer.c 2014-06-12 14:01:27.571769788 +0200
+--- src/buffer.c 2014-07-16 16:20:04.443621254 +0200
+***************
+*** 5702,5709 ****
+ signlist_T *next;
+
+ /* When deleting the last sign need to redraw the windows to remove the
+! * sign column. */
+! if (buf->b_signlist != NULL)
+ {
+ redraw_buf_later(buf, NOT_VALID);
+ changed_cline_bef_curs();
+--- 5702,5709 ----
+ signlist_T *next;
+
+ /* When deleting the last sign need to redraw the windows to remove the
+! * sign column. Not when curwin is NULL (this means we're exiting). */
+! if (buf->b_signlist != NULL && curwin != NULL)
+ {
+ redraw_buf_later(buf, NOT_VALID);
+ changed_cline_bef_curs();
+*** ../vim-7.4.368/src/window.c 2014-07-16 15:18:22.903696486 +0200
+--- src/window.c 2014-07-16 16:15:41.063626607 +0200
+***************
+*** 2489,2494 ****
+--- 2489,2498 ----
+
+ while (firstwin != NULL)
+ (void)win_free_mem(firstwin, &dummy, NULL);
++
++ /* No window should be used after this. Set curwin to NULL to crash
++ * instead of using freed memory. */
++ curwin = NULL;
+ }
+ #endif
+
+*** ../vim-7.4.368/src/version.c 2014-07-16 15:18:22.907696486 +0200
+--- src/version.c 2014-07-16 16:18:36.827623035 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 369,
+ /**/
+
+--
+ARTHUR: If you do not open these doors, we will take this castle by force ...
+ [A bucket of slops land on ARTHUR. He tries to retain his dignity.]
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.370 b/patches/source/vim/patches/7.4.370
new file mode 100644
index 000000000..5da13f467
--- /dev/null
+++ b/patches/source/vim/patches/7.4.370
@@ -0,0 +1,316 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.370
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.370
+Problem: Linebreak test fails when encoding is not utf-8. (Danek Duvall)
+Solution: Split the test in a single byte one and a utf-8 one. (Christian
+ Brabandt)
+Files: src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
+ src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
+ src/testdir/Make_vms.mms, src/testdir/Makefile,
+ src/testdir/test_listlbr.in, src/testdir/test_listlbr.ok,
+ src/testdir/test_listlbr_utf8.in, src/testdir/test_listlbr_utf8.ok
+
+
+*** ../vim-7.4.369/src/testdir/Make_amiga.mak 2014-07-02 19:59:35.454375136 +0200
+--- src/testdir/Make_amiga.mak 2014-07-16 16:55:15.311578352 +0200
+***************
+*** 39,44 ****
+--- 39,45 ----
+ test_autoformat_join.out \
+ test_breakindent.out \
+ test_listlbr.out \
++ test_listlbr_utf8.out \
+ test_eval.out \
+ test_options.out
+
+***************
+*** 167,171 ****
+--- 168,173 ----
+ test_autoformat_join.out: test_autoformat_join.in
+ test_breakindent.out: test_breakindent.in
+ test_listlbr.out: test_listlbr.in
++ test_listlbr_utf8.out: test_listlbr_utf8.in
+ test_eval.out: test_eval.in
+ test_options.out: test_options.in
+*** ../vim-7.4.369/src/testdir/Make_dos.mak 2014-07-16 14:20:38.255766903 +0200
+--- src/testdir/Make_dos.mak 2014-07-16 16:56:02.423577394 +0200
+***************
+*** 38,43 ****
+--- 38,44 ----
+ test_autoformat_join.out \
+ test_breakindent.out \
+ test_listlbr.out \
++ test_listlbr_utf8.out \
+ test_eval.out \
+ test_options.out
+
+*** ../vim-7.4.369/src/testdir/Make_ming.mak 2014-07-02 19:59:35.454375136 +0200
+--- src/testdir/Make_ming.mak 2014-07-16 16:55:15.311578352 +0200
+***************
+*** 58,63 ****
+--- 58,64 ----
+ test_autoformat_join.out \
+ test_breakindent.out \
+ test_listlbr.out \
++ test_listlbr_utf8.out \
+ test_eval.out \
+ test_options.out
+
+*** ../vim-7.4.369/src/testdir/Make_os2.mak 2014-07-02 19:59:35.454375136 +0200
+--- src/testdir/Make_os2.mak 2014-07-16 16:55:15.311578352 +0200
+***************
+*** 40,45 ****
+--- 40,46 ----
+ test_autoformat_join.out \
+ test_eval.out \
+ test_breakindent.out \
++ test_listlbr_utf8.out \
+ test_listlbr.out \
+ test_options.out
+
+*** ../vim-7.4.369/src/testdir/Make_vms.mms 2014-07-02 19:59:35.454375136 +0200
+--- src/testdir/Make_vms.mms 2014-07-16 16:55:15.311578352 +0200
+***************
+*** 99,104 ****
+--- 99,105 ----
+ test_autoformat_join.out \
+ test_breakindent.out \
+ test_listlbr.out \
++ test_listlbr_utf8.out \
+ test_eval.out \
+ test_options.out
+
+*** ../vim-7.4.369/src/testdir/Makefile 2014-07-02 19:59:35.454375136 +0200
+--- src/testdir/Makefile 2014-07-16 16:55:15.311578352 +0200
+***************
+*** 36,41 ****
+--- 36,42 ----
+ test_autoformat_join.out \
+ test_breakindent.out \
+ test_listlbr.out \
++ test_listlbr_utf8.out \
+ test_eval.out \
+ test_options.out
+
+*** ../vim-7.4.369/src/testdir/test_listlbr.in 2014-07-02 19:59:35.454375136 +0200
+--- src/testdir/test_listlbr.in 2014-07-16 16:55:15.311578352 +0200
+***************
+*** 1,10 ****
+! Test for linebreak and list option
+
+ STARTTEST
+ :so small.vim
+ :if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif
+ :10new|:vsp|:vert resize 20
+! :put =\"\tabcdef hijklmn\tpqrstuvwxyz\u00a01060ABCDEFGHIJKLMNOP \"
+ :norm! zt
+ :set ts=4 sw=4 sts=4 linebreak sbr=+ wrap
+ :fu! ScreenChar(width)
+--- 1,10 ----
+! Test for linebreak and list option (non-utf8)
+
+ STARTTEST
+ :so small.vim
+ :if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif
+ :10new|:vsp|:vert resize 20
+! :put =\"\tabcdef hijklmn\tpqrstuvwxyz_1060ABCDEFGHIJKLMNOP \"
+ :norm! zt
+ :set ts=4 sw=4 sts=4 linebreak sbr=+ wrap
+ :fu! ScreenChar(width)
+***************
+*** 32,53 ****
+ :redraw!
+ :let line=ScreenChar(winwidth(0))
+ :call DoRecordScreen()
+! :let g:test ="Test 3: set linebreak + set list + fancy listchars"
+! :exe "set linebreak list listchars=nbsp:\u2423,tab:\u2595\u2014,trail:\u02d1,eol:\ub6"
+! :redraw!
+! :let line=ScreenChar(winwidth(0))
+! :call DoRecordScreen()
+! :let g:test ="Test 4: set linebreak nolist"
+ :set nolist linebreak
+ :redraw!
+ :let line=ScreenChar(winwidth(0))
+ :call DoRecordScreen()
+! :let g:test ="Test 5: set nolinebreak list"
+! :set list nolinebreak
+! :redraw!
+! :let line=ScreenChar(winwidth(0))
+! :call DoRecordScreen()
+! :let g:test ="Test 6: set linebreak with tab and 1 line as long as screen: should break!"
+ :set nolist linebreak ts=8
+ :let line="1\t".repeat('a', winwidth(0)-2)
+ :$put =line
+--- 32,43 ----
+ :redraw!
+ :let line=ScreenChar(winwidth(0))
+ :call DoRecordScreen()
+! :let g:test ="Test 3: set linebreak nolist"
+ :set nolist linebreak
+ :redraw!
+ :let line=ScreenChar(winwidth(0))
+ :call DoRecordScreen()
+! :let g:test ="Test 4: set linebreak with tab and 1 line as long as screen: should break!"
+ :set nolist linebreak ts=8
+ :let line="1\t".repeat('a', winwidth(0)-2)
+ :$put =line
+*** ../vim-7.4.369/src/testdir/test_listlbr.ok 2014-07-02 19:59:35.454375136 +0200
+--- src/testdir/test_listlbr.ok 2014-07-16 16:55:15.315578352 +0200
+***************
+*** 1,38 ****
+
+! abcdef hijklmn pqrstuvwxyz 1060ABCDEFGHIJKLMNOP
+
+ Test 1: set linebreak
+ abcdef
+ +hijklmn
+! +pqrstuvwxyz 1060ABC
+ +DEFGHIJKLMNOP
+
+ Test 2: set linebreak + set list
+ ^Iabcdef hijklmn^I
+! +pqrstuvwxyz 1060ABC
+ +DEFGHIJKLMNOP
+
+
+! Test 3: set linebreak + set list + fancy listchars
+! ▕———abcdef
+! +hijklmn▕———
+! +pqrstuvwxyzâ£1060ABC
+! +DEFGHIJKLMNOPˑ¶
+!
+! Test 4: set linebreak nolist
+ abcdef
+ +hijklmn
+! +pqrstuvwxyz 1060ABC
+ +DEFGHIJKLMNOP
+-
+- Test 5: set nolinebreak list
+- ▕———abcdef hijklmn▕—
+- +pqrstuvwxyzâ£1060ABC
+- +DEFGHIJKLMNOPˑ¶
+- ¶
+ 1 aaaaaaaaaaaaaaaaaa
+
+! Test 6: set linebreak with tab and 1 line as long as screen: should break!
+ 1
+ +aaaaaaaaaaaaaaaaaa
+ ~
+--- 1,26 ----
+
+! abcdef hijklmn pqrstuvwxyz_1060ABCDEFGHIJKLMNOP
+
+ Test 1: set linebreak
+ abcdef
+ +hijklmn
+! +pqrstuvwxyz_1060ABC
+ +DEFGHIJKLMNOP
+
+ Test 2: set linebreak + set list
+ ^Iabcdef hijklmn^I
+! +pqrstuvwxyz_1060ABC
+ +DEFGHIJKLMNOP
+
+
+! Test 3: set linebreak nolist
+ abcdef
+ +hijklmn
+! +pqrstuvwxyz_1060ABC
+ +DEFGHIJKLMNOP
+ 1 aaaaaaaaaaaaaaaaaa
+
+! Test 4: set linebreak with tab and 1 line as long as screen: should break!
+ 1
+ +aaaaaaaaaaaaaaaaaa
+ ~
+*** ../vim-7.4.369/src/testdir/test_listlbr_utf8.in 2014-07-16 17:01:25.415570829 +0200
+--- src/testdir/test_listlbr_utf8.in 2014-07-16 16:55:15.315578352 +0200
+***************
+*** 0 ****
+--- 1,41 ----
++ Test for linebreak and list option in utf-8 mode
++
++ STARTTEST
++ :so small.vim
++ :if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif
++ :so mbyte.vim
++ :if &enc !=? 'utf-8'|:e! test.ok|:w! test.out|qa!|endif
++ :10new|:vsp|:vert resize 20
++ :put =\"\tabcdef hijklmn\tpqrstuvwxyz\u00a01060ABCDEFGHIJKLMNOP \"
++ :norm! zt
++ :set ts=4 sw=4 sts=4 linebreak sbr=+ wrap
++ :fu! ScreenChar(width)
++ : let c=''
++ : for j in range(1,4)
++ : for i in range(1,a:width)
++ : let c.=nr2char(screenchar(j, i))
++ : endfor
++ : let c.="\n"
++ : endfor
++ : return c
++ :endfu
++ :fu! DoRecordScreen()
++ : wincmd l
++ : $put =printf(\"\n%s\", g:test)
++ : $put =g:line
++ : wincmd p
++ :endfu
++ :let g:test ="Test 1: set linebreak + set list + fancy listchars"
++ :exe "set linebreak list listchars=nbsp:\u2423,tab:\u2595\u2014,trail:\u02d1,eol:\ub6"
++ :redraw!
++ :let line=ScreenChar(winwidth(0))
++ :call DoRecordScreen()
++ :let g:test ="Test 2: set nolinebreak list"
++ :set list nolinebreak
++ :redraw!
++ :let line=ScreenChar(winwidth(0))
++ :call DoRecordScreen()
++ :%w! test.out
++ :qa!
++ ENDTEST
++ dummy text
+*** ../vim-7.4.369/src/testdir/test_listlbr_utf8.ok 2014-07-16 17:01:25.419570829 +0200
+--- src/testdir/test_listlbr_utf8.ok 2014-07-16 16:55:15.315578352 +0200
+***************
+*** 0 ****
+--- 1,14 ----
++
++ abcdef hijklmn pqrstuvwxyz 1060ABCDEFGHIJKLMNOP
++
++ Test 1: set linebreak + set list + fancy listchars
++ ▕———abcdef
++ +hijklmn▕———
++ +pqrstuvwxyzâ£1060ABC
++ +DEFGHIJKLMNOPˑ¶
++
++ Test 2: set nolinebreak list
++ ▕———abcdef hijklmn▕—
++ +pqrstuvwxyzâ£1060ABC
++ +DEFGHIJKLMNOPˑ¶
++ ¶
+*** ../vim-7.4.369/src/version.c 2014-07-16 16:30:21.647608710 +0200
+--- src/version.c 2014-07-16 16:56:38.755576656 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 370,
+ /**/
+
+--
+ Another bucket of what can only be described as human ordure hits ARTHUR.
+ARTHUR: ... Right! (to the KNIGHTS) That settles it!
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.371 b/patches/source/vim/patches/7.4.371
new file mode 100644
index 000000000..f915a8f4b
--- /dev/null
+++ b/patches/source/vim/patches/7.4.371
@@ -0,0 +1,59 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.371
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.371
+Problem: When 'linebreak' is set control characters are not correctly
+ displayed. (Kimmy Lindvall)
+Solution: Set n_extra. (Christian Brabandt)
+Files: src/screen.c
+
+
+*** ../vim-7.4.370/src/screen.c 2014-07-09 20:20:40.359620108 +0200
+--- src/screen.c 2014-07-16 17:12:38.599557147 +0200
+***************
+*** 4646,4651 ****
+--- 4646,4653 ----
+ else if (c != NUL)
+ {
+ p_extra = transchar(c);
++ if (n_extra == 0)
++ n_extra = byte2cells(c) - 1;
+ #ifdef FEAT_RIGHTLEFT
+ if ((dy_flags & DY_UHEX) && wp->w_p_rl)
+ rl_mirror(p_extra); /* reverse "<12>" */
+*** ../vim-7.4.370/src/version.c 2014-07-16 17:01:38.279570568 +0200
+--- src/version.c 2014-07-16 17:13:21.815556269 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 371,
+ /**/
+
+--
+LETTERS TO THE EDITOR (The Times of London)
+
+Dear Sir,
+
+I am firmly opposed to the spread of microchips either to the home or
+to the office.  We have more than enough of them foisted upon us in
+public places.  They are a disgusting Americanism, and can only result
+in the farmers being forced to grow smaller potatoes, which in turn
+will cause massive unemployment in the already severely depressed
+agricultural industry.
+
+Yours faithfully,
+        Capt. Quinton D'Arcy, J. P.
+        Sevenoaks
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.372 b/patches/source/vim/patches/7.4.372
new file mode 100644
index 000000000..11d0254d4
--- /dev/null
+++ b/patches/source/vim/patches/7.4.372
@@ -0,0 +1,188 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.372
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.372
+Problem: When 'winminheight' is zero there might not be one line for the
+ current window.
+Solution: Change the size computations. (Yukihiro Nakadaira)
+Files: src/window.c
+
+
+*** ../vim-7.4.371/src/window.c 2014-07-16 16:30:21.647608710 +0200
+--- src/window.c 2014-07-16 18:06:53.123491001 +0200
+***************
+*** 688,693 ****
+--- 688,695 ----
+ int before;
+ int minwidth;
+ int minheight;
++ int wmw1;
++ int wmh1;
+
+ if (flags & WSP_TOP)
+ oldwin = firstwin;
+***************
+*** 722,740 ****
+ * Check if we are able to split the current window and compute its
+ * width.
+ */
+! needed = p_wmw + 1;
+ if (flags & WSP_ROOM)
+! needed += p_wiw - p_wmw;
+ if (p_ea || (flags & (WSP_BOT | WSP_TOP)))
+ {
+! minwidth = frame_minwidth(topframe, NULL);
+ available = topframe->fr_width;
+ needed += minwidth;
+ }
+ else
+ {
+! minwidth = frame_minwidth(oldwin->w_frame, NULL);
+! available = oldwin->w_width;
+ }
+ if (available < needed && new_wp == NULL)
+ {
+--- 724,745 ----
+ * Check if we are able to split the current window and compute its
+ * width.
+ */
+! /* Current window requires at least 1 space. */
+! wmw1 = (p_wmw == 0 ? 1 : p_wmw);
+! needed = wmw1 + 1;
+ if (flags & WSP_ROOM)
+! needed += p_wiw - wmw1;
+ if (p_ea || (flags & (WSP_BOT | WSP_TOP)))
+ {
+! minwidth = frame_minwidth(topframe, NOWIN);
+ available = topframe->fr_width;
+ needed += minwidth;
+ }
+ else
+ {
+! minwidth = frame_minwidth(oldwin->w_frame, NOWIN);
+! available = oldwin->w_frame->fr_width;
+! needed += minwidth;
+ }
+ if (available < needed && new_wp == NULL)
+ {
+***************
+*** 743,754 ****
+ }
+ if (new_size == 0)
+ new_size = oldwin->w_width / 2;
+- if (new_size > oldwin->w_width - p_wmw - 1)
+- new_size = oldwin->w_width - p_wmw - 1;
+ if (new_size > available - minwidth - 1)
+ new_size = available - minwidth - 1;
+! if (new_size < p_wmw)
+! new_size = p_wmw;
+
+ /* if it doesn't fit in the current window, need win_equal() */
+ if (oldwin->w_width - new_size - 1 < p_wmw)
+--- 748,757 ----
+ }
+ if (new_size == 0)
+ new_size = oldwin->w_width / 2;
+ if (new_size > available - minwidth - 1)
+ new_size = available - minwidth - 1;
+! if (new_size < wmw1)
+! new_size = wmw1;
+
+ /* if it doesn't fit in the current window, need win_equal() */
+ if (oldwin->w_width - new_size - 1 < p_wmw)
+***************
+*** 789,808 ****
+ * Check if we are able to split the current window and compute its
+ * height.
+ */
+! needed = p_wmh + STATUS_HEIGHT + need_status;
+ if (flags & WSP_ROOM)
+! needed += p_wh - p_wmh;
+ if (p_ea || (flags & (WSP_BOT | WSP_TOP)))
+ {
+! minheight = frame_minheight(topframe, NULL);
+ available = topframe->fr_height;
+ needed += minheight;
+ }
+ else
+ {
+! minheight = frame_minheight(oldwin->w_frame, NULL);
+! available = oldwin->w_height;
+! needed += p_wmh;
+ }
+ if (available < needed && new_wp == NULL)
+ {
+--- 792,813 ----
+ * Check if we are able to split the current window and compute its
+ * height.
+ */
+! /* Current window requires at least 1 space. */
+! wmh1 = (p_wmh == 0 ? 1 : p_wmh);
+! needed = wmh1 + STATUS_HEIGHT;
+ if (flags & WSP_ROOM)
+! needed += p_wh - wmh1;
+ if (p_ea || (flags & (WSP_BOT | WSP_TOP)))
+ {
+! minheight = frame_minheight(topframe, NOWIN) + need_status;
+ available = topframe->fr_height;
+ needed += minheight;
+ }
+ else
+ {
+! minheight = frame_minheight(oldwin->w_frame, NOWIN) + need_status;
+! available = oldwin->w_frame->fr_height;
+! needed += minheight;
+ }
+ if (available < needed && new_wp == NULL)
+ {
+***************
+*** 817,829 ****
+ }
+ if (new_size == 0)
+ new_size = oldwin_height / 2;
+-
+- if (new_size > oldwin_height - p_wmh - STATUS_HEIGHT)
+- new_size = oldwin_height - p_wmh - STATUS_HEIGHT;
+ if (new_size > available - minheight - STATUS_HEIGHT)
+ new_size = available - minheight - STATUS_HEIGHT;
+! if (new_size < p_wmh)
+! new_size = p_wmh;
+
+ /* if it doesn't fit in the current window, need win_equal() */
+ if (oldwin_height - new_size - STATUS_HEIGHT < p_wmh)
+--- 822,831 ----
+ }
+ if (new_size == 0)
+ new_size = oldwin_height / 2;
+ if (new_size > available - minheight - STATUS_HEIGHT)
+ new_size = available - minheight - STATUS_HEIGHT;
+! if (new_size < wmh1)
+! new_size = wmh1;
+
+ /* if it doesn't fit in the current window, need win_equal() */
+ if (oldwin_height - new_size - STATUS_HEIGHT < p_wmh)
+*** ../vim-7.4.371/src/version.c 2014-07-16 17:29:46.691536252 +0200
+--- src/version.c 2014-07-16 17:34:14.795530803 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 372,
+ /**/
+
+--
+ [The rest of the ARMY stand around looking at a loss.]
+INSPECTOR END OF FILM: (picks up megaphone) All right! Clear off! Go on!
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.373 b/patches/source/vim/patches/7.4.373
new file mode 100644
index 000000000..0d2841d6c
--- /dev/null
+++ b/patches/source/vim/patches/7.4.373
@@ -0,0 +1,98 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.373
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.373
+Problem: Compiler warning for unused argument and unused variable.
+Solution: Add UNUSED. Move variable inside #ifdef.
+Files: src/charset.c, src/window.c
+
+
+*** ../vim-7.4.372/src/charset.c 2014-07-02 19:59:35.450375136 +0200
+--- src/charset.c 2014-07-16 23:36:51.211088615 +0200
+***************
+*** 1024,1030 ****
+ */
+ int
+ lbr_chartabsize(line, s, col)
+! char_u *line; /* start of the line */
+ unsigned char *s;
+ colnr_T col;
+ {
+--- 1024,1030 ----
+ */
+ int
+ lbr_chartabsize(line, s, col)
+! char_u *line UNUSED; /* start of the line */
+ unsigned char *s;
+ colnr_T col;
+ {
+***************
+*** 1069,1075 ****
+ int
+ win_lbr_chartabsize(wp, line, s, col, headp)
+ win_T *wp;
+! char_u *line; /* start of the line */
+ char_u *s;
+ colnr_T col;
+ int *headp UNUSED;
+--- 1069,1075 ----
+ int
+ win_lbr_chartabsize(wp, line, s, col, headp)
+ win_T *wp;
+! char_u *line UNUSED; /* start of the line */
+ char_u *s;
+ colnr_T col;
+ int *headp UNUSED;
+*** ../vim-7.4.372/src/window.c 2014-07-16 18:19:22.911475762 +0200
+--- src/window.c 2014-07-16 23:38:31.567086575 +0200
+***************
+*** 686,694 ****
+ int layout;
+ frame_T *frp, *curfrp;
+ int before;
+- int minwidth;
+ int minheight;
+- int wmw1;
+ int wmh1;
+
+ if (flags & WSP_TOP)
+--- 686,692 ----
+***************
+*** 718,723 ****
+--- 716,724 ----
+ #ifdef FEAT_VERTSPLIT
+ if (flags & WSP_VERT)
+ {
++ int wmw1;
++ int minwidth;
++
+ layout = FR_ROW;
+
+ /*
+*** ../vim-7.4.372/src/version.c 2014-07-16 18:19:22.915475762 +0200
+--- src/version.c 2014-07-16 23:36:20.775089233 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 373,
+ /**/
+
+--
+INSPECTOR END OF FILM: Move along. There's nothing to see! Keep moving!
+ [Suddenly he notices the cameras.]
+INSPECTOR END OF FILM: (to Camera) All right, put that away sonny.
+ [He walks over to it and puts his hand over the lens.]
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.374 b/patches/source/vim/patches/7.4.374
new file mode 100644
index 000000000..1657477ff
--- /dev/null
+++ b/patches/source/vim/patches/7.4.374
@@ -0,0 +1,71 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.374
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.374
+Problem: Character after "fb" command not mapped if it might be a composing
+ character.
+Solution: Don't disable mapping when looking for a composing character.
+ (Jacob Niehus)
+Files: src/normal.c
+
+
+*** ../vim-7.4.373/src/normal.c 2014-04-29 12:15:22.856032651 +0200
+--- src/normal.c 2014-07-23 12:26:26.811992854 +0200
+***************
+*** 1076,1082 ****
+ #ifdef FEAT_MBYTE
+ /* When getting a text character and the next character is a
+ * multi-byte character, it could be a composing character.
+! * However, don't wait for it to arrive. */
+ while (enc_utf8 && lang && (c = vpeekc()) > 0
+ && (c >= 0x100 || MB_BYTE2LEN(vpeekc()) > 1))
+ {
+--- 1076,1085 ----
+ #ifdef FEAT_MBYTE
+ /* When getting a text character and the next character is a
+ * multi-byte character, it could be a composing character.
+! * However, don't wait for it to arrive. Also, do enable mapping,
+! * because if it's put back with vungetc() it's too late to apply
+! * mapping. */
+! --no_mapping;
+ while (enc_utf8 && lang && (c = vpeekc()) > 0
+ && (c >= 0x100 || MB_BYTE2LEN(vpeekc()) > 1))
+ {
+***************
+*** 1091,1096 ****
+--- 1094,1100 ----
+ else
+ ca.ncharC2 = c;
+ }
++ ++no_mapping;
+ #endif
+ }
+ --no_mapping;
+*** ../vim-7.4.373/src/version.c 2014-07-16 23:39:50.251084976 +0200
+--- src/version.c 2014-07-23 12:27:50.483992253 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 374,
+ /**/
+
+--
+CART DRIVER: Bring out your dead!
+ There are legs stick out of windows and doors. Two MEN are fighting in the
+ mud - covered from head to foot in it. Another MAN is on his hands in
+ knees shovelling mud into his mouth. We just catch sight of a MAN falling
+ into a well.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.375 b/patches/source/vim/patches/7.4.375
new file mode 100644
index 000000000..5ccfecf5b
--- /dev/null
+++ b/patches/source/vim/patches/7.4.375
@@ -0,0 +1,59 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.375
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.375
+Problem: Test 63 fails when run with GUI-only Vim.
+Solution: Add guibg attributes. (suggested by Mike Soyka)
+Files: src/testdir/test63.in
+
+
+*** ../vim-7.4.374/src/testdir/test63.in 2014-06-17 17:48:21.784628008 +0200
+--- src/testdir/test63.in 2014-07-23 13:12:20.727973060 +0200
+***************
+*** 6,14 ****
+ :" --- Check that "matcharg()" returns the correct group and pattern if a match
+ :" --- is defined.
+ :let @r = "*** Test 1: "
+! :highlight MyGroup1 ctermbg=red
+! :highlight MyGroup2 ctermbg=green
+! :highlight MyGroup3 ctermbg=blue
+ :match MyGroup1 /TODO/
+ :2match MyGroup2 /FIXME/
+ :3match MyGroup3 /XXX/
+--- 6,14 ----
+ :" --- Check that "matcharg()" returns the correct group and pattern if a match
+ :" --- is defined.
+ :let @r = "*** Test 1: "
+! :highlight MyGroup1 ctermbg=red guibg=red
+! :highlight MyGroup2 ctermbg=green guibg=green
+! :highlight MyGroup3 ctermbg=blue guibg=blue
+ :match MyGroup1 /TODO/
+ :2match MyGroup2 /FIXME/
+ :3match MyGroup3 /XXX/
+*** ../vim-7.4.374/src/version.c 2014-07-23 12:31:17.207990767 +0200
+--- src/version.c 2014-07-23 13:13:15.167972669 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 375,
+ /**/
+
+--
+BODY: I'm not dead!
+CART DRIVER: 'Ere. He says he's not dead.
+LARGE MAN: Yes he is.
+BODY: I'm not!
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.376 b/patches/source/vim/patches/7.4.376
new file mode 100644
index 000000000..93098cb92
--- /dev/null
+++ b/patches/source/vim/patches/7.4.376
@@ -0,0 +1,57 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.376
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.376 (after 7.4.367)
+Problem: Popup menu flickers too much.
+Solution: Remove the forced redraw. (Hirohito Higashi)
+Files: src/edit.c
+
+
+*** ../vim-7.4.375/src/edit.c 2014-07-16 14:42:37.923740082 +0200
+--- src/edit.c 2014-07-23 13:49:03.535957228 +0200
+***************
+*** 4593,4601 ****
+ i = compl_col + (compl_cont_status & CONT_ADDING ? compl_length : 0);
+ backspace_until_column(i);
+
+! /* Not sure what is still valid, better redraw everything. */
+ changed_cline_bef_curs();
+- redraw_curbuf_later(NOT_VALID);
+ }
+
+ /* Insert the new text being completed. */
+--- 4593,4601 ----
+ i = compl_col + (compl_cont_status & CONT_ADDING ? compl_length : 0);
+ backspace_until_column(i);
+
+! /* TODO: is this sufficient for redrawing? Redrawing everything causes
+! * flicker, thus we can't do that. */
+ changed_cline_bef_curs();
+ }
+
+ /* Insert the new text being completed. */
+*** ../vim-7.4.375/src/version.c 2014-07-23 13:16:26.727971292 +0200
+--- src/version.c 2014-07-23 13:48:02.031957670 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 376,
+ /**/
+
+--
+Why I like vim:
+> I like VIM because, when I ask a question in this newsgroup, I get a
+> one-line answer. With xemacs, I get a 1Kb lisp script with bugs in it ;-)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.377 b/patches/source/vim/patches/7.4.377
new file mode 100644
index 000000000..e5d86bd6c
--- /dev/null
+++ b/patches/source/vim/patches/7.4.377
@@ -0,0 +1,144 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.377
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.377
+Problem: When 'equalalways' is set a split may report "no room" even though
+ there is plenty of room.
+Solution: Compute the available room properly. (Yukihiro Nakadaira)
+Files: src/window.c
+
+
+*** ../vim-7.4.376/src/window.c 2014-07-16 23:39:50.251084976 +0200
+--- src/window.c 2014-07-23 15:19:10.491918366 +0200
+***************
+*** 684,690 ****
+ int available;
+ int oldwin_height = 0;
+ int layout;
+! frame_T *frp, *curfrp;
+ int before;
+ int minheight;
+ int wmh1;
+--- 684,690 ----
+ int available;
+ int oldwin_height = 0;
+ int layout;
+! frame_T *frp, *curfrp, *frp2, *prevfrp;
+ int before;
+ int minheight;
+ int wmh1;
+***************
+*** 730,741 ****
+ needed = wmw1 + 1;
+ if (flags & WSP_ROOM)
+ needed += p_wiw - wmw1;
+! if (p_ea || (flags & (WSP_BOT | WSP_TOP)))
+ {
+ minwidth = frame_minwidth(topframe, NOWIN);
+ available = topframe->fr_width;
+ needed += minwidth;
+ }
+ else
+ {
+ minwidth = frame_minwidth(oldwin->w_frame, NOWIN);
+--- 730,758 ----
+ needed = wmw1 + 1;
+ if (flags & WSP_ROOM)
+ needed += p_wiw - wmw1;
+! if (flags & (WSP_BOT | WSP_TOP))
+ {
+ minwidth = frame_minwidth(topframe, NOWIN);
+ available = topframe->fr_width;
+ needed += minwidth;
+ }
++ else if (p_ea)
++ {
++ minwidth = frame_minwidth(oldwin->w_frame, NOWIN);
++ prevfrp = oldwin->w_frame;
++ for (frp = oldwin->w_frame->fr_parent; frp != NULL;
++ frp = frp->fr_parent)
++ {
++ if (frp->fr_layout == FR_ROW)
++ for (frp2 = frp->fr_child; frp2 != NULL;
++ frp2 = frp2->fr_next)
++ if (frp2 != prevfrp)
++ minwidth += frame_minwidth(frp2, NOWIN);
++ prevfrp = frp;
++ }
++ available = topframe->fr_width;
++ needed += minwidth;
++ }
+ else
+ {
+ minwidth = frame_minwidth(oldwin->w_frame, NOWIN);
+***************
+*** 798,809 ****
+ needed = wmh1 + STATUS_HEIGHT;
+ if (flags & WSP_ROOM)
+ needed += p_wh - wmh1;
+! if (p_ea || (flags & (WSP_BOT | WSP_TOP)))
+ {
+ minheight = frame_minheight(topframe, NOWIN) + need_status;
+ available = topframe->fr_height;
+ needed += minheight;
+ }
+ else
+ {
+ minheight = frame_minheight(oldwin->w_frame, NOWIN) + need_status;
+--- 815,843 ----
+ needed = wmh1 + STATUS_HEIGHT;
+ if (flags & WSP_ROOM)
+ needed += p_wh - wmh1;
+! if (flags & (WSP_BOT | WSP_TOP))
+ {
+ minheight = frame_minheight(topframe, NOWIN) + need_status;
+ available = topframe->fr_height;
+ needed += minheight;
+ }
++ else if (p_ea)
++ {
++ minheight = frame_minheight(oldwin->w_frame, NOWIN) + need_status;
++ prevfrp = oldwin->w_frame;
++ for (frp = oldwin->w_frame->fr_parent; frp != NULL;
++ frp = frp->fr_parent)
++ {
++ if (frp->fr_layout == FR_COL)
++ for (frp2 = frp->fr_child; frp2 != NULL;
++ frp2 = frp2->fr_next)
++ if (frp2 != prevfrp)
++ minheight += frame_minheight(frp2, NOWIN);
++ prevfrp = frp;
++ }
++ available = topframe->fr_height;
++ needed += minheight;
++ }
+ else
+ {
+ minheight = frame_minheight(oldwin->w_frame, NOWIN) + need_status;
+*** ../vim-7.4.376/src/version.c 2014-07-23 13:50:41.839956521 +0200
+--- src/version.c 2014-07-23 15:20:33.227917771 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 377,
+ /**/
+
+--
+LARGE MAN: Who's that then?
+CART DRIVER: (Grudgingly) I dunno, Must be a king.
+LARGE MAN: Why?
+CART DRIVER: He hasn't got shit all over him.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.378 b/patches/source/vim/patches/7.4.378
new file mode 100644
index 000000000..659f18f51
--- /dev/null
+++ b/patches/source/vim/patches/7.4.378
@@ -0,0 +1,336 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.378
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.378
+Problem: Title of quickfist list is not kept for setqflist(list, 'r').
+Solution: Keep the title. Add a test. (Lcd)
+Files: src/quickfix.c, src/testdir/Make_amiga.mak,
+ src/testdir/Make_dos.mak, src/testdir/Make_ming.mak,
+ src/testdir/Make_os2.mak, src/testdir/Make_vms.mms,
+ src/testdir/Makefile, src/testdir/test_qf_title.in,
+ src/testdir/test_qf_title.ok
+
+
+*** ../vim-7.4.377/src/quickfix.c 2014-03-27 17:02:22.080660944 +0100
+--- src/quickfix.c 2014-07-23 15:37:30.551910459 +0200
+***************
+*** 107,112 ****
+--- 107,113 ----
+ };
+
+ static int qf_init_ext __ARGS((qf_info_T *qi, char_u *efile, buf_T *buf, typval_T *tv, char_u *errorformat, int newlist, linenr_T lnumfirst, linenr_T lnumlast, char_u *qf_title));
++ static void qf_store_title __ARGS((qf_info_T *qi, char_u *title));
+ static void qf_new_list __ARGS((qf_info_T *qi, char_u *qf_title));
+ static void ll_free_all __ARGS((qf_info_T **pqi));
+ static int qf_add_entry __ARGS((qf_info_T *qi, qfline_T **prevp, char_u *dir, char_u *fname, int bufnum, char_u *mesg, long lnum, int col, int vis_col, char_u *pattern, int nr, int type, int valid));
+***************
+*** 126,132 ****
+ static win_T *qf_find_win __ARGS((qf_info_T *qi));
+ static buf_T *qf_find_buf __ARGS((qf_info_T *qi));
+ static void qf_update_buffer __ARGS((qf_info_T *qi));
+! static void qf_set_title __ARGS((qf_info_T *qi));
+ static void qf_fill_buffer __ARGS((qf_info_T *qi));
+ #endif
+ static char_u *get_mef_name __ARGS((void));
+--- 127,133 ----
+ static win_T *qf_find_win __ARGS((qf_info_T *qi));
+ static buf_T *qf_find_buf __ARGS((qf_info_T *qi));
+ static void qf_update_buffer __ARGS((qf_info_T *qi));
+! static void qf_set_title_var __ARGS((qf_info_T *qi));
+ static void qf_fill_buffer __ARGS((qf_info_T *qi));
+ #endif
+ static char_u *get_mef_name __ARGS((void));
+***************
+*** 884,889 ****
+--- 885,905 ----
+ return retval;
+ }
+
++ static void
++ qf_store_title(qi, title)
++ qf_info_T *qi;
++ char_u *title;
++ {
++ if (title != NULL)
++ {
++ char_u *p = alloc((int)STRLEN(title) + 2);
++
++ qi->qf_lists[qi->qf_curlist].qf_title = p;
++ if (p != NULL)
++ sprintf((char *)p, ":%s", (char *)title);
++ }
++ }
++
+ /*
+ * Prepare for adding a new quickfix list.
+ */
+***************
+*** 895,901 ****
+ int i;
+
+ /*
+! * If the current entry is not the last entry, delete entries below
+ * the current entry. This makes it possible to browse in a tree-like
+ * way with ":grep'.
+ */
+--- 911,917 ----
+ int i;
+
+ /*
+! * If the current entry is not the last entry, delete entries beyond
+ * the current entry. This makes it possible to browse in a tree-like
+ * way with ":grep'.
+ */
+***************
+*** 916,929 ****
+ else
+ qi->qf_curlist = qi->qf_listcount++;
+ vim_memset(&qi->qf_lists[qi->qf_curlist], 0, (size_t)(sizeof(qf_list_T)));
+! if (qf_title != NULL)
+! {
+! char_u *p = alloc((int)STRLEN(qf_title) + 2);
+!
+! qi->qf_lists[qi->qf_curlist].qf_title = p;
+! if (p != NULL)
+! sprintf((char *)p, ":%s", (char *)qf_title);
+! }
+ }
+
+ /*
+--- 932,938 ----
+ else
+ qi->qf_curlist = qi->qf_listcount++;
+ vim_memset(&qi->qf_lists[qi->qf_curlist], 0, (size_t)(sizeof(qf_list_T)));
+! qf_store_title(qi, qf_title);
+ }
+
+ /*
+***************
+*** 2444,2450 ****
+ qf_fill_buffer(qi);
+
+ if (qi->qf_lists[qi->qf_curlist].qf_title != NULL)
+! qf_set_title(qi);
+
+ curwin->w_cursor.lnum = qi->qf_lists[qi->qf_curlist].qf_index;
+ curwin->w_cursor.col = 0;
+--- 2453,2459 ----
+ qf_fill_buffer(qi);
+
+ if (qi->qf_lists[qi->qf_curlist].qf_title != NULL)
+! qf_set_title_var(qi);
+
+ curwin->w_cursor.lnum = qi->qf_lists[qi->qf_curlist].qf_index;
+ curwin->w_cursor.col = 0;
+***************
+*** 2599,2605 ****
+ {
+ curwin_save = curwin;
+ curwin = win;
+! qf_set_title(qi);
+ curwin = curwin_save;
+
+ }
+--- 2608,2614 ----
+ {
+ curwin_save = curwin;
+ curwin = win;
+! qf_set_title_var(qi);
+ curwin = curwin_save;
+
+ }
+***************
+*** 2612,2618 ****
+ }
+
+ static void
+! qf_set_title(qi)
+ qf_info_T *qi;
+ {
+ set_internal_string_var((char_u *)"w:quickfix_title",
+--- 2621,2627 ----
+ }
+
+ static void
+! qf_set_title_var(qi)
+ qf_info_T *qi;
+ {
+ set_internal_string_var((char_u *)"w:quickfix_title",
+***************
+*** 3845,3851 ****
+--- 3854,3863 ----
+ prevp->qf_next != prevp; prevp = prevp->qf_next)
+ ;
+ else if (action == 'r')
++ {
+ qf_free(qi, qi->qf_curlist);
++ qf_store_title(qi, title);
++ }
+
+ for (li = list->lv_first; li != NULL; li = li->li_next)
+ {
+*** ../vim-7.4.377/src/testdir/Make_amiga.mak 2014-07-16 17:01:38.275570568 +0200
+--- src/testdir/Make_amiga.mak 2014-07-23 15:26:51.455915053 +0200
+***************
+*** 40,45 ****
+--- 40,46 ----
+ test_breakindent.out \
+ test_listlbr.out \
+ test_listlbr_utf8.out \
++ test_qf_title.out \
+ test_eval.out \
+ test_options.out
+
+***************
+*** 169,173 ****
+--- 170,175 ----
+ test_breakindent.out: test_breakindent.in
+ test_listlbr.out: test_listlbr.in
+ test_listlbr_utf8.out: test_listlbr_utf8.in
++ test_qf_title.out: test_qf_title.in
+ test_eval.out: test_eval.in
+ test_options.out: test_options.in
+*** ../vim-7.4.377/src/testdir/Make_dos.mak 2014-07-16 17:01:38.279570568 +0200
+--- src/testdir/Make_dos.mak 2014-07-23 15:27:01.231914983 +0200
+***************
+*** 39,44 ****
+--- 39,45 ----
+ test_breakindent.out \
+ test_listlbr.out \
+ test_listlbr_utf8.out \
++ test_qf_title.out \
+ test_eval.out \
+ test_options.out
+
+*** ../vim-7.4.377/src/testdir/Make_ming.mak 2014-07-16 17:01:38.279570568 +0200
+--- src/testdir/Make_ming.mak 2014-07-23 15:27:13.163914897 +0200
+***************
+*** 59,64 ****
+--- 59,65 ----
+ test_breakindent.out \
+ test_listlbr.out \
+ test_listlbr_utf8.out \
++ test_qf_title.out \
+ test_eval.out \
+ test_options.out
+
+*** ../vim-7.4.377/src/testdir/Make_os2.mak 2014-07-16 17:01:38.279570568 +0200
+--- src/testdir/Make_os2.mak 2014-07-23 15:27:25.999914805 +0200
+***************
+*** 40,47 ****
+ test_autoformat_join.out \
+ test_eval.out \
+ test_breakindent.out \
+- test_listlbr_utf8.out \
+ test_listlbr.out \
+ test_options.out
+
+ .SUFFIXES: .in .out
+--- 40,48 ----
+ test_autoformat_join.out \
+ test_eval.out \
+ test_breakindent.out \
+ test_listlbr.out \
++ test_listlbr_utf8.out \
++ test_qf_title.out \
+ test_options.out
+
+ .SUFFIXES: .in .out
+*** ../vim-7.4.377/src/testdir/Make_vms.mms 2014-07-16 17:01:38.279570568 +0200
+--- src/testdir/Make_vms.mms 2014-07-23 15:27:34.787914741 +0200
+***************
+*** 4,10 ****
+ # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
+ # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
+ #
+! # Last change: 2014 May 28
+ #
+ # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
+ # Edit the lines in the Configuration section below to select.
+--- 4,10 ----
+ # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
+ # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
+ #
+! # Last change: 2014 Jul 23
+ #
+ # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
+ # Edit the lines in the Configuration section below to select.
+***************
+*** 100,105 ****
+--- 100,106 ----
+ test_breakindent.out \
+ test_listlbr.out \
+ test_listlbr_utf8.out \
++ test_qf_title.out \
+ test_eval.out \
+ test_options.out
+
+*** ../vim-7.4.377/src/testdir/Makefile 2014-07-16 17:01:38.279570568 +0200
+--- src/testdir/Makefile 2014-07-23 15:27:46.947914654 +0200
+***************
+*** 37,42 ****
+--- 37,43 ----
+ test_breakindent.out \
+ test_listlbr.out \
+ test_listlbr_utf8.out \
++ test_qf_title.out \
+ test_eval.out \
+ test_options.out
+
+*** ../vim-7.4.377/src/testdir/test_qf_title.in 2014-07-23 15:53:26.279903590 +0200
+--- src/testdir/test_qf_title.in 2014-07-23 15:26:02.495915405 +0200
+***************
+*** 0 ****
+--- 1,18 ----
++ Tests for quickfix window's title vim: set ft=vim :
++
++ STARTTEST
++ :so small.vim
++ :if !has('quickfix') | e! test.ok | wq! test.out | endif
++ :set efm=%E%f:%l:%c:%m
++ :cgetexpr ['file:1:1:message']
++ :let qflist=getqflist()
++ :call setqflist(qflist, 'r')
++ :copen
++ :let g:quickfix_title=w:quickfix_title
++ :wincmd p
++ :$put =g:quickfix_title
++ :/^Results/,$w test.out
++ :qa!
++ ENDTEST
++
++ Results of test_qf_title:
+*** ../vim-7.4.377/src/testdir/test_qf_title.ok 2014-07-23 15:53:26.283903590 +0200
+--- src/testdir/test_qf_title.ok 2014-07-23 15:25:55.303915456 +0200
+***************
+*** 0 ****
+--- 1,2 ----
++ Results of test_qf_title:
++ :setqflist()
+*** ../vim-7.4.377/src/version.c 2014-07-23 15:21:16.247917462 +0200
+--- src/version.c 2014-07-23 15:28:57.251914149 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 378,
+ /**/
+
+--
+ARTHUR: Old woman!
+DENNIS: Man!
+ARTHUR: Man. I'm sorry. Old man, What knight live in that castle over there?
+DENNIS: I'm thirty-seven.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.379 b/patches/source/vim/patches/7.4.379
new file mode 100644
index 000000000..79d859320
--- /dev/null
+++ b/patches/source/vim/patches/7.4.379
@@ -0,0 +1,45 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.379
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.379
+Problem: Accessing freed memory after using setqflist(list, 'r'). (Lcd)
+Solution: Reset qf_index.
+Files: src/quickfix.c
+
+
+*** ../vim-7.4.378/src/quickfix.c 2014-07-23 15:54:43.443903036 +0200
+--- src/quickfix.c 2014-07-23 16:11:59.915895586 +0200
+***************
+*** 2173,2178 ****
+--- 2173,2179 ----
+ }
+ vim_free(qi->qf_lists[idx].qf_title);
+ qi->qf_lists[idx].qf_title = NULL;
++ qi->qf_lists[idx].qf_index = 0;
+ }
+
+ /*
+*** ../vim-7.4.378/src/version.c 2014-07-23 15:54:43.443903036 +0200
+--- src/version.c 2014-07-23 16:14:43.995894407 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 379,
+ /**/
+
+--
+"Lisp has all the visual appeal of oatmeal with nail clippings thrown in."
+ -- Larry Wall
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.380 b/patches/source/vim/patches/7.4.380
new file mode 100644
index 000000000..8c93e0772
--- /dev/null
+++ b/patches/source/vim/patches/7.4.380
@@ -0,0 +1,115 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.380
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.380
+Problem: Loading python may cause Vim to exit.
+Solution: Avoid loading the "site" module. (Taro Muraoka)
+Files: src/if_python.c
+
+
+*** ../vim-7.4.379/src/if_python.c 2014-03-30 16:11:37.176530823 +0200
+--- src/if_python.c 2014-07-23 16:46:42.863880615 +0200
+***************
+*** 295,300 ****
+--- 295,303 ----
+ # define PyCObject_FromVoidPtr dll_PyCObject_FromVoidPtr
+ # define PyCObject_AsVoidPtr dll_PyCObject_AsVoidPtr
+ # endif
++ # if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02070000
++ # define Py_NoSiteFlag (*dll_Py_NoSiteFlag)
++ # endif
+
+ /*
+ * Pointers for dynamic link
+***************
+*** 440,445 ****
+--- 443,451 ----
+ static PyObject* (*dll_PyCObject_FromVoidPtr)(void *cobj, void (*destr)(void *));
+ static void* (*dll_PyCObject_AsVoidPtr)(PyObject *);
+ # endif
++ # if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02070000
++ static int* dll_Py_NoSiteFlag;
++ # endif
+
+ static HINSTANCE hinstPython = 0; /* Instance of python.dll */
+
+***************
+*** 633,638 ****
+--- 639,647 ----
+ {"PyCObject_FromVoidPtr", (PYTHON_PROC*)&dll_PyCObject_FromVoidPtr},
+ {"PyCObject_AsVoidPtr", (PYTHON_PROC*)&dll_PyCObject_AsVoidPtr},
+ # endif
++ # if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02070000
++ {"Py_NoSiteFlag", (PYTHON_PROC*)&dll_Py_NoSiteFlag},
++ # endif
+ {"", NULL},
+ };
+
+***************
+*** 901,906 ****
+--- 910,919 ----
+ {
+ if (!initialised)
+ {
++ #if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02070000
++ PyObject *site;
++ #endif
++
+ #ifdef DYNAMIC_PYTHON
+ if (!python_enabled(TRUE))
+ {
+***************
+*** 915,925 ****
+--- 928,956 ----
+
+ init_structs();
+
++ #if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02070000
++ /* Disable implicit 'import site', because it may cause Vim to exit
++ * when it can't be found. */
++ Py_NoSiteFlag++;
++ #endif
++
+ #if !defined(MACOS) || defined(MACOS_X_UNIX)
+ Py_Initialize();
+ #else
+ PyMac_Initialize();
+ #endif
++
++ #if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02070000
++ /* 'import site' explicitly. */
++ site = PyImport_ImportModule("site");
++ if (site == NULL)
++ {
++ EMSG(_("E887: Sorry, this command is disabled, the Python's site module could not be loaded."));
++ goto fail;
++ }
++ Py_DECREF(site);
++ #endif
++
+ /* Initialise threads, and below save the state using
+ * PyEval_SaveThread. Without the call to PyEval_SaveThread, thread
+ * specific state (such as the system trace hook), will be lost
+*** ../vim-7.4.379/src/version.c 2014-07-23 16:33:04.079886500 +0200
+--- src/version.c 2014-07-23 16:43:47.939881872 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 380,
+ /**/
+
+--
+Looking at Perl through Lisp glasses, Perl looks atrocious.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.381 b/patches/source/vim/patches/7.4.381
new file mode 100644
index 000000000..188124e77
--- /dev/null
+++ b/patches/source/vim/patches/7.4.381
@@ -0,0 +1,45 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.381
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.381
+Problem: Get u_undo error when backspacing in Insert mode deletes more than
+ one line break. (Ayberk Ozgur)
+Solution: Also decrement Insstart.lnum.
+Files: src/edit.c
+
+
+*** ../vim-7.4.380/src/edit.c 2014-07-23 13:50:41.839956521 +0200
+--- src/edit.c 2014-07-23 17:35:05.747859751 +0200
+***************
+*** 8833,8838 ****
+--- 8833,8839 ----
+ return FALSE;
+ --Insstart_orig.lnum;
+ Insstart_orig.col = MAXCOL;
++ Insstart = Insstart_orig;
+ }
+ /*
+ * In replace mode:
+*** ../vim-7.4.380/src/version.c 2014-07-23 16:56:56.587876204 +0200
+--- src/version.c 2014-07-23 17:38:54.467858107 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 381,
+ /**/
+
+--
+Friends? I have lots of friends! In fact, I have all episodes ever made.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.382 b/patches/source/vim/patches/7.4.382
new file mode 100644
index 000000000..e1ca90b7e
--- /dev/null
+++ b/patches/source/vim/patches/7.4.382
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.382
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.382
+Problem: Mapping characters may not work after typing Esc in Insert mode.
+Solution: Fix the noremap flags for inserted characters. (Jacob Niehus)
+Files: src/getchar.c
+
+
+*** ../vim-7.4.381/src/getchar.c 2014-06-25 14:39:35.102348584 +0200
+--- src/getchar.c 2014-07-23 20:10:25.651792765 +0200
+***************
+*** 2731,2736 ****
+--- 2731,2741 ----
+ }
+ if (c < 0)
+ continue; /* end of input script reached */
++
++ /* Allow mapping for just typed characters. When we get here c
++ * is the number of extra bytes and typebuf.tb_len is 1. */
++ for (n = 1; n <= c; ++n)
++ typebuf.tb_noremap[typebuf.tb_off + n] = RM_YES;
+ typebuf.tb_len += c;
+
+ /* buffer full, don't map */
+*** ../vim-7.4.381/src/version.c 2014-07-23 17:39:21.815857910 +0200
+--- src/version.c 2014-07-23 18:26:42.663837492 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 382,
+ /**/
+
+--
+DENNIS: Oh, very nice. King, eh! I expect you've got a palace and fine
+ clothes and courtiers and plenty of food. And how d'you get that? By
+ exploiting the workers! By hanging on to outdated imperialist dogma
+ which perpetuates the social and economic differences in our society!
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.383 b/patches/source/vim/patches/7.4.383
new file mode 100644
index 000000000..f02281221
--- /dev/null
+++ b/patches/source/vim/patches/7.4.383
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.383
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.383
+Problem: Bad interaction between preview window and omnifunc.
+Solution: Avoid redrawing the status line. (Hirohito Higashi)
+Files: src/popupmnu.c
+
+
+*** ../vim-7.4.382/src/popupmnu.c 2014-07-09 19:58:21.111647328 +0200
+--- src/popupmnu.c 2014-07-23 20:56:17.131772989 +0200
+***************
+*** 643,648 ****
+--- 643,654 ----
+
+ if (curwin != curwin_save && win_valid(curwin_save))
+ {
++ /* When the first completion is done and the preview
++ * window is not resized, skip the preview window's
++ * status line redrawing. */
++ if (ins_compl_active() && !resized)
++ curwin->w_redr_status = FALSE;
++
+ /* Return cursor to where we were */
+ validate_cursor();
+ redraw_later(SOME_VALID);
+*** ../vim-7.4.382/src/version.c 2014-07-23 20:41:09.895779510 +0200
+--- src/version.c 2014-07-23 20:58:12.079772163 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 383,
+ /**/
+
+--
+ARTHUR: ... and I am your king ....
+OLD WOMAN: Ooooh! I didn't know we had a king. I thought we were an
+ autonomous collective ...
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.384 b/patches/source/vim/patches/7.4.384
new file mode 100644
index 000000000..6c2b046cb
--- /dev/null
+++ b/patches/source/vim/patches/7.4.384
@@ -0,0 +1,47 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.384
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.384
+Problem: Test 102 fails when compiled with small features.
+Solution: Source small.vim. (Jacob Niehus)
+Files: src/testdir/test102.in
+
+
+*** ../vim-7.4.383/src/testdir/test102.in 2013-11-12 05:28:08.000000000 +0100
+--- src/testdir/test102.in 2014-07-27 21:10:34.881282860 +0200
+***************
+*** 1,6 ****
+--- 1,7 ----
+ Test if fnameescape is correct for special chars like !
+
+ STARTTEST
++ :so small.vim
+ :%d
+ :let fname = 'Xspa ce'
+ :try | exe "w! " . fnameescape(fname) | put='Space' | endtry
+*** ../vim-7.4.383/src/version.c 2014-07-23 21:10:39.867766788 +0200
+--- src/version.c 2014-07-30 13:15:18.047624849 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 384,
+ /**/
+
+--
+An easy way to determine if you have enough teamwork to be doomed is simply to
+measure how long it takes from the time you decide to go to lunch together
+until the time you actually eat.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.385 b/patches/source/vim/patches/7.4.385
new file mode 100644
index 000000000..8cfe09846
--- /dev/null
+++ b/patches/source/vim/patches/7.4.385
@@ -0,0 +1,76 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.385
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.385
+Problem: When building with tiny or small features building the .mo files
+ fails.
+Solution: In autoconf do not setup for building the .mo files when it would
+ fail.
+Files: src/configure.in, src/auto/configure
+
+
+*** ../vim-7.4.384/src/configure.in 2014-05-22 14:44:08.094481148 +0200
+--- src/configure.in 2014-07-27 21:26:39.349275928 +0200
+***************
+*** 3818,3824 ****
+ else
+ AC_MSG_RESULT([msgfmt not found - disabled]);
+ fi
+! if test $have_gettext = "yes"; then
+ AC_DEFINE(HAVE_GETTEXT)
+ MAKEMO=yes
+ AC_SUBST(MAKEMO)
+--- 3818,3824 ----
+ else
+ AC_MSG_RESULT([msgfmt not found - disabled]);
+ fi
+! if test $have_gettext = "yes" -a "x$features" != "xtiny" -a "x$features" != "xsmall"; then
+ AC_DEFINE(HAVE_GETTEXT)
+ MAKEMO=yes
+ AC_SUBST(MAKEMO)
+*** ../vim-7.4.384/src/auto/configure 2014-05-22 14:44:08.098481148 +0200
+--- src/auto/configure 2014-07-27 21:26:41.969275909 +0200
+***************
+*** 12966,12972 ****
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: msgfmt not found - disabled" >&5
+ $as_echo "msgfmt not found - disabled" >&6; };
+ fi
+! if test $have_gettext = "yes"; then
+ $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
+
+ MAKEMO=yes
+--- 12966,12972 ----
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: msgfmt not found - disabled" >&5
+ $as_echo "msgfmt not found - disabled" >&6; };
+ fi
+! if test $have_gettext = "yes" -a "x$features" != "xtiny" -a "x$features" != "xsmall"; then
+ $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
+
+ MAKEMO=yes
+*** ../vim-7.4.384/src/version.c 2014-07-30 13:20:35.719622565 +0200
+--- src/version.c 2014-07-30 13:22:07.295621907 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 385,
+ /**/
+
+--
+"You're fired." (1980)
+"You're laid off." (1985)
+"You're downsized." (1990)
+"You're rightsized." (1992)
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.386 b/patches/source/vim/patches/7.4.386
new file mode 100644
index 000000000..2b0db1fa2
--- /dev/null
+++ b/patches/source/vim/patches/7.4.386
@@ -0,0 +1,186 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.386
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.386
+Problem: When splitting a window the changelist position is wrong.
+Solution: Copy the changelist position. (Jacob Niehus)
+Files: src/window.c, src/testdir/Make_amiga.mak,
+ src/testdir/Make_dos.mak, src/testdir/Make_ming.mak,
+ src/testdir/Make_os2.mak, src/testdir/Make_vms.mms,
+ src/testdir/Makefile, src/testdir/test_changelist.in,
+ src/testdir/test_changelist.ok
+
+
+*** ../vim-7.4.385/src/window.c 2014-07-23 15:21:16.247917462 +0200
+--- src/window.c 2014-07-30 13:55:49.275607374 +0200
+***************
+*** 1178,1183 ****
+--- 1178,1188 ----
+ p_wh = size;
+ }
+
++ #ifdef FEAT_JUMPLIST
++ /* Keep same changelist position in new window. */
++ wp->w_changelistidx = oldwin->w_changelistidx;
++ #endif
++
+ /*
+ * make the new window the current window
+ */
+*** ../vim-7.4.385/src/testdir/Make_amiga.mak 2014-07-23 15:54:43.443903036 +0200
+--- src/testdir/Make_amiga.mak 2014-07-30 13:54:06.871608110 +0200
+***************
+*** 41,46 ****
+--- 41,47 ----
+ test_listlbr.out \
+ test_listlbr_utf8.out \
+ test_qf_title.out \
++ test_changelist.out \
+ test_eval.out \
+ test_options.out
+
+***************
+*** 171,175 ****
+--- 172,177 ----
+ test_listlbr.out: test_listlbr.in
+ test_listlbr_utf8.out: test_listlbr_utf8.in
+ test_qf_title.out: test_qf_title.in
++ test_changelist.out: test_changelist.in
+ test_eval.out: test_eval.in
+ test_options.out: test_options.in
+*** ../vim-7.4.385/src/testdir/Make_dos.mak 2014-07-23 15:54:43.443903036 +0200
+--- src/testdir/Make_dos.mak 2014-07-30 13:54:16.091608044 +0200
+***************
+*** 40,45 ****
+--- 40,46 ----
+ test_listlbr.out \
+ test_listlbr_utf8.out \
+ test_qf_title.out \
++ test_changelist.out \
+ test_eval.out \
+ test_options.out
+
+*** ../vim-7.4.385/src/testdir/Make_ming.mak 2014-07-23 15:54:43.443903036 +0200
+--- src/testdir/Make_ming.mak 2014-07-30 13:54:19.775608018 +0200
+***************
+*** 60,65 ****
+--- 60,66 ----
+ test_listlbr.out \
+ test_listlbr_utf8.out \
+ test_qf_title.out \
++ test_changelist.out \
+ test_eval.out \
+ test_options.out
+
+*** ../vim-7.4.385/src/testdir/Make_os2.mak 2014-07-23 15:54:43.443903036 +0200
+--- src/testdir/Make_os2.mak 2014-07-30 13:54:24.207607986 +0200
+***************
+*** 38,43 ****
+--- 38,44 ----
+ test100.out test101.out test102.out test103.out test104.out \
+ test105.out test106.out test107.out \
+ test_autoformat_join.out \
++ test_changelist.out \
+ test_eval.out \
+ test_breakindent.out \
+ test_listlbr.out \
+*** ../vim-7.4.385/src/testdir/Make_vms.mms 2014-07-23 15:54:43.443903036 +0200
+--- src/testdir/Make_vms.mms 2014-07-30 13:54:31.151607936 +0200
+***************
+*** 4,10 ****
+ # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
+ # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
+ #
+! # Last change: 2014 Jul 23
+ #
+ # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
+ # Edit the lines in the Configuration section below to select.
+--- 4,10 ----
+ # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
+ # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
+ #
+! # Last change: 2014 Jul 30
+ #
+ # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
+ # Edit the lines in the Configuration section below to select.
+***************
+*** 101,106 ****
+--- 101,107 ----
+ test_listlbr.out \
+ test_listlbr_utf8.out \
+ test_qf_title.out \
++ test_changelist.out \
+ test_eval.out \
+ test_options.out
+
+*** ../vim-7.4.385/src/testdir/Makefile 2014-07-23 15:54:43.443903036 +0200
+--- src/testdir/Makefile 2014-07-30 13:54:45.291607834 +0200
+***************
+*** 38,43 ****
+--- 38,44 ----
+ test_listlbr.out \
+ test_listlbr_utf8.out \
+ test_qf_title.out \
++ test_changelist.out \
+ test_eval.out \
+ test_options.out
+
+*** ../vim-7.4.385/src/testdir/test_changelist.in 2014-07-30 14:04:27.507603650 +0200
+--- src/testdir/test_changelist.in 2014-07-30 13:52:21.363608869 +0200
+***************
+*** 0 ****
+--- 1,22 ----
++ Test changelist position after splitting window
++ Set 'undolevels' to make changelist for sourced file
++
++ STARTTEST
++ :so small.vim
++ Gkylp:set ul=100
++ Gylp:set ul=100
++ gg
++ :vsplit
++ :try
++ : normal g;
++ : normal ggVGcpass
++ :catch
++ : normal ggVGcfail
++ :finally
++ : %w! test.out
++ :endtry
++ :qa!
++ ENDTEST
++
++ 1
++ 2
+*** ../vim-7.4.385/src/testdir/test_changelist.ok 2014-07-30 14:04:27.515603650 +0200
+--- src/testdir/test_changelist.ok 2014-07-30 13:53:41.991608289 +0200
+***************
+*** 0 ****
+--- 1 ----
++ pass
+*** ../vim-7.4.385/src/version.c 2014-07-30 13:22:48.271621613 +0200
+--- src/version.c 2014-07-30 13:56:49.951606938 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 386,
+ /**/
+
+--
+Our job was to build a computer information system for the branch banks. We
+were the perfect people for the job: Dean had seen a computer once, and I had
+heard Dean talk about it.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.387 b/patches/source/vim/patches/7.4.387
new file mode 100644
index 000000000..ff0b2a0eb
--- /dev/null
+++ b/patches/source/vim/patches/7.4.387
@@ -0,0 +1,199 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.387
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.387
+Problem: "4gro" replaces one character then executes "ooo". (Urtica Dioica)
+Solution: Write the ESC in the second stuff buffer.
+Files: src/getchar.c, src/proto/getchar.pro, src/edit.c,
+ src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
+ src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
+ src/testdir/Make_vms.mms, src/testdir/Makefile,
+ src/testdir/test_insertcount.in, src/testdir/test_insertcount.ok
+
+
+*** ../vim-7.4.386/src/getchar.c 2014-07-23 20:41:09.891779510 +0200
+--- src/getchar.c 2014-07-30 14:35:08.831590415 +0200
+***************
+*** 678,683 ****
+--- 678,694 ----
+ add_buff(&readbuf1, s, -1L);
+ }
+
++ /*
++ * Append string "s" to the redo stuff buffer.
++ * CSI and K_SPECIAL must already have been escaped.
++ */
++ void
++ stuffRedoReadbuff(s)
++ char_u *s;
++ {
++ add_buff(&readbuf2, s, -1L);
++ }
++
+ void
+ stuffReadbuffLen(s, len)
+ char_u *s;
+*** ../vim-7.4.386/src/proto/getchar.pro 2014-02-11 15:10:38.134111836 +0100
+--- src/proto/getchar.pro 2014-07-30 14:36:18.851589912 +0200
+***************
+*** 15,20 ****
+--- 15,21 ----
+ void AppendCharToRedobuff __ARGS((int c));
+ void AppendNumberToRedobuff __ARGS((long n));
+ void stuffReadbuff __ARGS((char_u *s));
++ void stuffRedoReadbuff __ARGS((char_u *s));
+ void stuffReadbuffLen __ARGS((char_u *s, long len));
+ void stuffReadbuffSpec __ARGS((char_u *s));
+ void stuffcharReadbuff __ARGS((int c));
+*** ../vim-7.4.386/src/edit.c 2014-07-23 17:39:21.815857910 +0200
+--- src/edit.c 2014-07-30 14:47:56.875584895 +0200
+***************
+*** 8389,8395 ****
+
+ (void)start_redo_ins();
+ if (cmdchar == 'r' || cmdchar == 'v')
+! stuffReadbuff(ESC_STR); /* no ESC in redo buffer */
+ ++RedrawingDisabled;
+ disabled_redraw = TRUE;
+ return FALSE; /* repeat the insert */
+--- 8389,8395 ----
+
+ (void)start_redo_ins();
+ if (cmdchar == 'r' || cmdchar == 'v')
+! stuffRedoReadbuff(ESC_STR); /* no ESC in redo buffer */
+ ++RedrawingDisabled;
+ disabled_redraw = TRUE;
+ return FALSE; /* repeat the insert */
+*** ../vim-7.4.386/src/testdir/Make_amiga.mak 2014-07-30 14:04:49.131603494 +0200
+--- src/testdir/Make_amiga.mak 2014-07-30 15:57:52.819554737 +0200
+***************
+*** 43,48 ****
+--- 43,49 ----
+ test_qf_title.out \
+ test_changelist.out \
+ test_eval.out \
++ test_insertcount.out \
+ test_options.out
+
+ .SUFFIXES: .in .out
+***************
+*** 174,177 ****
+--- 175,179 ----
+ test_qf_title.out: test_qf_title.in
+ test_changelist.out: test_changelist.in
+ test_eval.out: test_eval.in
++ test_insertcount.out: test_insertcount.in
+ test_options.out: test_options.in
+*** ../vim-7.4.386/src/testdir/Make_dos.mak 2014-07-30 14:04:49.131603494 +0200
+--- src/testdir/Make_dos.mak 2014-07-30 15:57:59.071554692 +0200
+***************
+*** 42,47 ****
+--- 42,48 ----
+ test_qf_title.out \
+ test_changelist.out \
+ test_eval.out \
++ test_insertcount.out \
+ test_options.out
+
+ SCRIPTS32 = test50.out test70.out
+*** ../vim-7.4.386/src/testdir/Make_ming.mak 2014-07-30 14:04:49.131603494 +0200
+--- src/testdir/Make_ming.mak 2014-07-30 15:58:02.351554669 +0200
+***************
+*** 62,67 ****
+--- 62,68 ----
+ test_qf_title.out \
+ test_changelist.out \
+ test_eval.out \
++ test_insertcount.out \
+ test_options.out
+
+ SCRIPTS32 = test50.out test70.out
+*** ../vim-7.4.386/src/testdir/Make_os2.mak 2014-07-30 14:04:49.131603494 +0200
+--- src/testdir/Make_os2.mak 2014-07-30 15:58:05.975554643 +0200
+***************
+*** 40,45 ****
+--- 40,46 ----
+ test_autoformat_join.out \
+ test_changelist.out \
+ test_eval.out \
++ test_insertcount.out \
+ test_breakindent.out \
+ test_listlbr.out \
+ test_listlbr_utf8.out \
+*** ../vim-7.4.386/src/testdir/Make_vms.mms 2014-07-30 14:04:49.131603494 +0200
+--- src/testdir/Make_vms.mms 2014-07-30 15:58:10.099554613 +0200
+***************
+*** 103,108 ****
+--- 103,109 ----
+ test_qf_title.out \
+ test_changelist.out \
+ test_eval.out \
++ test_insertcount.out \
+ test_options.out
+
+ # Known problems:
+*** ../vim-7.4.386/src/testdir/Makefile 2014-07-30 14:04:49.131603494 +0200
+--- src/testdir/Makefile 2014-07-30 15:58:16.539554567 +0200
+***************
+*** 40,45 ****
+--- 40,46 ----
+ test_qf_title.out \
+ test_changelist.out \
+ test_eval.out \
++ test_insertcount.out \
+ test_options.out
+
+ SCRIPTS_GUI = test16.out
+*** ../vim-7.4.386/src/testdir/test_insertcount.in 2014-07-30 15:56:12.087555461 +0200
+--- src/testdir/test_insertcount.in 2014-07-30 14:47:36.335585043 +0200
+***************
+*** 0 ****
+--- 1,14 ----
++ Tests for repeating insert and replace.
++
++ STARTTEST
++ :so small.vim
++ :/Second
++ 4gro
++ :/^First/,$wq! test.out
++ :" get here when failed and in Insert mode
++ :.wq! test.out
++ ENDTEST
++
++ First line
++ Second line
++ Last line
+*** ../vim-7.4.386/src/testdir/test_insertcount.ok 2014-07-30 15:56:12.091555461 +0200
+--- src/testdir/test_insertcount.ok 2014-07-30 14:45:43.491585854 +0200
+***************
+*** 0 ****
+--- 1,3 ----
++ First line
++ ooooecond line
++ Last line
+*** ../vim-7.4.386/src/version.c 2014-07-30 14:04:49.131603494 +0200
+--- src/version.c 2014-07-30 14:48:45.039584549 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 387,
+ /**/
+
+--
+If your company is not involved in something called "ISO 9000" you probably
+have no idea what it is. If your company _is_ involved in ISO 9000 then you
+definitely have no idea what it is.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.388 b/patches/source/vim/patches/7.4.388
new file mode 100644
index 000000000..21db642a6
--- /dev/null
+++ b/patches/source/vim/patches/7.4.388
@@ -0,0 +1,98 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.388
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.388
+Problem: With 'linebreak' set and 'list' unset a Tab is not counted
+ properly. (Kent Sibilev)
+Solution: Check the 'list' option. (Christian Brabandt)
+Files: src/screen.c, src/testdir/test_listlbr_utf8.in,
+ src/testdir/test_listlbr_utf8.ok
+
+
+*** ../vim-7.4.387/src/screen.c 2014-07-16 17:29:46.691536252 +0200
+--- src/screen.c 2014-07-30 16:41:15.167536033 +0200
+***************
+*** 4494,4500 ****
+ tab_len = (int)wp->w_buffer->b_p_ts
+ - vcol % (int)wp->w_buffer->b_p_ts - 1;
+ #ifdef FEAT_LINEBREAK
+! if (!wp->w_p_lbr)
+ #endif
+ /* tab amount depends on current column */
+ n_extra = tab_len;
+--- 4494,4500 ----
+ tab_len = (int)wp->w_buffer->b_p_ts
+ - vcol % (int)wp->w_buffer->b_p_ts - 1;
+ #ifdef FEAT_LINEBREAK
+! if (!wp->w_p_lbr || !wp->w_p_list)
+ #endif
+ /* tab amount depends on current column */
+ n_extra = tab_len;
+*** ../vim-7.4.387/src/testdir/test_listlbr_utf8.in 2014-07-16 17:01:38.279570568 +0200
+--- src/testdir/test_listlbr_utf8.in 2014-07-30 16:37:26.703537675 +0200
+***************
+*** 30,40 ****
+--- 30,51 ----
+ :redraw!
+ :let line=ScreenChar(winwidth(0))
+ :call DoRecordScreen()
++ :"
+ :let g:test ="Test 2: set nolinebreak list"
+ :set list nolinebreak
+ :redraw!
+ :let line=ScreenChar(winwidth(0))
+ :call DoRecordScreen()
++ :"
++ :let g:test ="Test 3: set linebreak nolist"
++ :$put =\"\t*mask = nil;\"
++ :$
++ :norm! zt
++ :set nolist linebreak
++ :redraw!
++ :let line=ScreenChar(winwidth(0))
++ :call DoRecordScreen()
++ :"
+ :%w! test.out
+ :qa!
+ ENDTEST
+*** ../vim-7.4.387/src/testdir/test_listlbr_utf8.ok 2014-07-16 17:01:38.279570568 +0200
+--- src/testdir/test_listlbr_utf8.ok 2014-07-30 16:40:17.043536451 +0200
+***************
+*** 12,14 ****
+--- 12,21 ----
+ +pqrstuvwxyzâ£1060ABC
+ +DEFGHIJKLMNOPˑ¶
+ ¶
++ *mask = nil;
++
++ Test 3: set linebreak nolist
++ *mask = nil;
++ ~
++ ~
++ ~
+*** ../vim-7.4.387/src/version.c 2014-07-30 16:00:45.551553496 +0200
+--- src/version.c 2014-07-30 16:40:57.659536159 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 388,
+ /**/
+
+--
+You can test a person's importance in the organization by asking how much RAM
+his computer has. Anybody who knows the answer to that question is not a
+decision-maker.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.389 b/patches/source/vim/patches/7.4.389
new file mode 100644
index 000000000..6778941a1
--- /dev/null
+++ b/patches/source/vim/patches/7.4.389
@@ -0,0 +1,490 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.389
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.389
+Problem: Still sometimes Vim enters Replace mode when starting up.
+Solution: Use a different solution in detecting the termresponse and
+ location response. (Hayaki Saito)
+Files: src/globals.h, src/os_unix.c, src/term.c, src/proto/term.pro
+
+
+*** ../vim-7.4.388/src/globals.h 2014-06-12 14:01:27.575769788 +0200
+--- src/globals.h 2014-07-30 17:02:57.711526671 +0200
+***************
+*** 1336,1344 ****
+ #if defined(UNIX) || defined(VMS)
+ EXTERN int term_is_xterm INIT(= FALSE); /* xterm-like 'term' */
+ #endif
+- #if defined(UNIX)
+- EXTERN int xterm_conflict_mouse INIT(= FALSE);
+- #endif
+
+ #ifdef BACKSLASH_IN_FILENAME
+ EXTERN char psepc INIT(= '\\'); /* normal path separator character */
+--- 1336,1341 ----
+*** ../vim-7.4.388/src/os_unix.c 2014-07-09 19:13:45.007701718 +0200
+--- src/os_unix.c 2014-07-30 17:06:02.375525344 +0200
+***************
+*** 3667,3674 ****
+ void
+ check_mouse_termcode()
+ {
+- xterm_conflict_mouse = FALSE;
+-
+ # ifdef FEAT_MOUSE_XTERM
+ if (use_xterm_mouse()
+ # ifdef FEAT_MOUSE_URXVT
+--- 3667,3672 ----
+***************
+*** 3713,3719 ****
+ # endif
+
+ # ifdef FEAT_MOUSE_JSB
+! /* There is no conflict, but it was disabled for xterm before. */
+ if (!use_xterm_mouse()
+ # ifdef FEAT_GUI
+ && !gui.in_use
+--- 3711,3717 ----
+ # endif
+
+ # ifdef FEAT_MOUSE_JSB
+! /* Conflicts with xterm mouse: "\033[" and "\033[M" ??? */
+ if (!use_xterm_mouse()
+ # ifdef FEAT_GUI
+ && !gui.in_use
+***************
+*** 3740,3784 ****
+ # endif
+
+ # ifdef FEAT_MOUSE_DEC
+! /* Conflicts with xterm mouse: "\033[" and "\033[M".
+! * Also conflicts with the xterm termresponse, skip this if it was
+! * requested already. */
+ if (!use_xterm_mouse()
+- # ifdef FEAT_TERMRESPONSE
+- && !did_request_esc_sequence()
+- # endif
+ # ifdef FEAT_GUI
+ && !gui.in_use
+ # endif
+ )
+- {
+ set_mouse_termcode(KS_DEC_MOUSE, (char_u *)(term_is_8bit(T_NAME)
+ ? IF_EB("\233", CSI_STR) : IF_EB("\033[", ESC_STR "[")));
+- xterm_conflict_mouse = TRUE;
+- }
+ else
+ del_mouse_termcode(KS_DEC_MOUSE);
+ # endif
+ # ifdef FEAT_MOUSE_PTERM
+! /* same as the dec mouse */
+ if (!use_xterm_mouse()
+- # ifdef FEAT_TERMRESPONSE
+- && !did_request_esc_sequence()
+- # endif
+ # ifdef FEAT_GUI
+ && !gui.in_use
+ # endif
+ )
+- {
+ set_mouse_termcode(KS_PTERM_MOUSE,
+ (char_u *) IF_EB("\033[", ESC_STR "["));
+- xterm_conflict_mouse = TRUE;
+- }
+ else
+ del_mouse_termcode(KS_PTERM_MOUSE);
+ # endif
+ # ifdef FEAT_MOUSE_URXVT
+! /* same as the dec mouse */
+ if (use_xterm_mouse() == 3
+ # ifdef FEAT_GUI
+ && !gui.in_use
+--- 3738,3768 ----
+ # endif
+
+ # ifdef FEAT_MOUSE_DEC
+! /* Conflicts with xterm mouse: "\033[" and "\033[M" */
+ if (!use_xterm_mouse()
+ # ifdef FEAT_GUI
+ && !gui.in_use
+ # endif
+ )
+ set_mouse_termcode(KS_DEC_MOUSE, (char_u *)(term_is_8bit(T_NAME)
+ ? IF_EB("\233", CSI_STR) : IF_EB("\033[", ESC_STR "[")));
+ else
+ del_mouse_termcode(KS_DEC_MOUSE);
+ # endif
+ # ifdef FEAT_MOUSE_PTERM
+! /* same conflict as the dec mouse */
+ if (!use_xterm_mouse()
+ # ifdef FEAT_GUI
+ && !gui.in_use
+ # endif
+ )
+ set_mouse_termcode(KS_PTERM_MOUSE,
+ (char_u *) IF_EB("\033[", ESC_STR "["));
+ else
+ del_mouse_termcode(KS_PTERM_MOUSE);
+ # endif
+ # ifdef FEAT_MOUSE_URXVT
+! /* same conflict as the dec mouse */
+ if (use_xterm_mouse() == 3
+ # ifdef FEAT_GUI
+ && !gui.in_use
+***************
+*** 3794,3801 ****
+ mch_setmouse(FALSE);
+ setmouse();
+ }
+- /* It's OK to request the xterm version for uxterm. */
+- resume_get_esc_sequence();
+ }
+ else
+ del_mouse_termcode(KS_URXVT_MOUSE);
+--- 3778,3783 ----
+*** ../vim-7.4.388/src/term.c 2014-07-09 20:51:04.519583033 +0200
+--- src/term.c 2014-07-30 17:20:54.915518929 +0200
+***************
+*** 153,163 ****
+ static char_u *vim_tgetstr __ARGS((char *s, char_u **pp));
+ #endif /* HAVE_TGETENT */
+
+- #if defined(FEAT_TERMRESPONSE)
+- static int xt_index_in = 0;
+- static int xt_index_out = 0;
+- #endif
+-
+ static int detected_8bit = FALSE; /* detected 8-bit terminal */
+
+ static struct builtin_term builtin_termcaps[] =
+--- 153,158 ----
+***************
+*** 3312,3351 ****
+ }
+
+ #if defined(FEAT_TERMRESPONSE) || defined(PROTO)
+- # if defined(UNIX) || defined(PROTO)
+- /*
+- * Return TRUE when the xterm version was requested or anything else that
+- * would send an ESC sequence back to Vim.
+- * If not sent yet, prevent it from being sent soon.
+- * Used to check whether it is OK to enable checking for DEC mouse codes,
+- * which conflict with may xterm ESC sequences.
+- */
+- int
+- did_request_esc_sequence()
+- {
+- if (crv_status == CRV_GET)
+- crv_status = 0;
+- if (u7_status == U7_GET)
+- u7_status = 0;
+- return crv_status == CRV_SENT || u7_status == U7_SENT
+- || xt_index_out > xt_index_in;
+- }
+-
+- /*
+- * If requesting the version was disabled in did_request_esc_sequence(),
+- * enable it again.
+- */
+- void
+- resume_get_esc_sequence()
+- {
+- if (crv_status == 0)
+- crv_status = CRV_GET;
+- if (u7_status == 0)
+- u7_status = U7_GET;
+- }
+- # endif
+-
+-
+ /*
+ * Request version string (for xterm) when needed.
+ * Only do this after switching to raw mode, otherwise the result will be
+--- 3307,3312 ----
+***************
+*** 3358,3365 ****
+ * Insert mode.
+ * On Unix only do it when both output and input are a tty (avoid writing
+ * request to terminal while reading from a file).
+- * Do not do this when a mouse is being detected that starts with the same ESC
+- * sequence as the termresponse.
+ * The result is caught in check_termcode().
+ */
+ void
+--- 3319,3324 ----
+***************
+*** 3373,3379 ****
+ # ifdef UNIX
+ && isatty(1)
+ && isatty(read_cmd_fd)
+- && !xterm_conflict_mouse
+ # endif
+ && *T_CRV != NUL)
+ {
+--- 3332,3337 ----
+***************
+*** 3742,3749 ****
+ #if defined(WIN3264) && !defined(FEAT_GUI)
+ if (s[0] == K_NUL)
+ {
+! STRMOVE(s + 1, s);
+! s[1] = 3;
+ }
+ #endif
+
+--- 3700,3707 ----
+ #if defined(WIN3264) && !defined(FEAT_GUI)
+ if (s[0] == K_NUL)
+ {
+! STRMOVE(s + 1, s);
+! s[1] = 3;
+ }
+ #endif
+
+***************
+*** 4212,4235 ****
+
+ #ifdef FEAT_TERMRESPONSE
+ if (key_name[0] == NUL
+! /* URXVT mouse uses <ESC>[#;#;#M, but we are matching <ESC>[ */
+ || key_name[0] == KS_URXVT_MOUSE
+- # ifdef FEAT_MBYTE
+- || u7_status == U7_SENT
+ # endif
+! )
+ {
+! /* Check for some responses from terminal start with "<Esc>[" or
+! * CSI.
+ *
+! * - xterm version string: <Esc>[>{x};{vers};{y}c
+ * Also eat other possible responses to t_RV, rxvt returns
+ * "<Esc>[?1;2c". Also accept CSI instead of <Esc>[.
+ * mrxvt has been reported to have "+" in the version. Assume
+ * the escape sequence ends with a letter or one of "{|}~".
+ *
+! * - cursor position report: <Esc>[{row};{col}R
+! * The final byte is 'R'. now it is only used for checking for
+ * ambiguous-width character state.
+ */
+ p = tp[0] == CSI ? tp + 1 : tp + 2;
+--- 4170,4200 ----
+
+ #ifdef FEAT_TERMRESPONSE
+ if (key_name[0] == NUL
+! /* Mouse codes of DEC, pterm, and URXVT start with <ESC>[. When
+! * detecting the start of these mouse codes they might as well be
+! * another key code or terminal response. */
+! # ifdef FEAT_MOUSE_DEC
+! || key_name[0] == KS_DEC_MOUSE
+! # endif
+! # ifdef FEAT_MOUSE_PTERM
+! || key_name[0] == KS_PTERM_MOUSE
+! # endif
+! # ifdef FEAT_MOUSE_URXVT
+ || key_name[0] == KS_URXVT_MOUSE
+ # endif
+! )
+ {
+! /* Check for some responses from the terminal starting with
+! * "<Esc>[" or CSI:
+ *
+! * - Xterm version string: <Esc>[>{x};{vers};{y}c
+ * Also eat other possible responses to t_RV, rxvt returns
+ * "<Esc>[?1;2c". Also accept CSI instead of <Esc>[.
+ * mrxvt has been reported to have "+" in the version. Assume
+ * the escape sequence ends with a letter or one of "{|}~".
+ *
+! * - Cursor position report: <Esc>[{row};{col}R
+! * The final byte must be 'R'. It is used for checking the
+ * ambiguous-width character state.
+ */
+ p = tp[0] == CSI ? tp + 1 : tp + 2;
+***************
+*** 4269,4304 ****
+ * u7_status is not "sent", it may be from a previous Vim that
+ * just exited. But not for <S-F3>, it sends something
+ * similar, check for row and column to make sense. */
+! if (j == 1 && tp[i] == 'R' && row_char == '2' && col >= 2)
+ {
+! char *aw = NULL;
+
+! LOG_TR("Received U7 status");
+! u7_status = U7_GOT;
+ # ifdef FEAT_AUTOCMD
+! did_cursorhold = TRUE;
+ # endif
+! if (col == 2)
+! aw = "single";
+! else if (col == 3)
+! aw = "double";
+! if (aw != NULL && STRCMP(aw, p_ambw) != 0)
+! {
+! /* Setting the option causes a screen redraw. Do that
+! * right away if possible, keeping any messages. */
+! set_option_value((char_u *)"ambw", 0L, (char_u *)aw, 0);
+! # ifdef DEBUG_TERMRESPONSE
+ {
+! char buf[100];
+! int r = redraw_asap(CLEAR);
+
+! sprintf(buf, "set 'ambiwidth', redraw_asap(): %d",
+! r);
+! log_tr(buf);
+! }
+ # else
+! redraw_asap(CLEAR);
+ # endif
+ }
+ key_name[0] = (int)KS_EXTRA;
+ key_name[1] = (int)KE_IGNORE;
+--- 4234,4275 ----
+ * u7_status is not "sent", it may be from a previous Vim that
+ * just exited. But not for <S-F3>, it sends something
+ * similar, check for row and column to make sense. */
+! if (j == 1 && tp[i] == 'R')
+ {
+! if (row_char == '2' && col >= 2)
+! {
+! char *aw = NULL;
+
+! LOG_TR("Received U7 status");
+! u7_status = U7_GOT;
+ # ifdef FEAT_AUTOCMD
+! did_cursorhold = TRUE;
+ # endif
+! if (col == 2)
+! aw = "single";
+! else if (col == 3)
+! aw = "double";
+! if (aw != NULL && STRCMP(aw, p_ambw) != 0)
+ {
+! /* Setting the option causes a screen redraw. Do
+! * that right away if possible, keeping any
+! * messages. */
+! set_option_value((char_u *)"ambw", 0L,
+! (char_u *)aw, 0);
+! # ifdef DEBUG_TERMRESPONSE
+! {
+! char buf[100];
+! int r = redraw_asap(CLEAR);
+
+! sprintf(buf,
+! "set 'ambiwidth', redraw_asap(): %d",
+! r);
+! log_tr(buf);
+! }
+ # else
+! redraw_asap(CLEAR);
+ # endif
++ }
+ }
+ key_name[0] = (int)KS_EXTRA;
+ key_name[1] = (int)KE_IGNORE;
+***************
+*** 4563,4581 ****
+ return -1;
+
+ /* when mouse reporting is SGR, add 32 to mouse code */
+! if (key_name[0] == KS_SGR_MOUSE)
+! mouse_code += 32;
+
+ mouse_col = getdigits(&p) - 1;
+ if (*p++ != ';')
+ return -1;
+
+ mouse_row = getdigits(&p) - 1;
+! if (key_name[0] == KS_SGR_MOUSE && *p == 'm')
+ mouse_code |= MOUSE_RELEASE;
+! else if (*p != 'M')
+ return -1;
+! p++;
+
+ slen += (int)(p - (tp + slen));
+
+--- 4534,4552 ----
+ return -1;
+
+ /* when mouse reporting is SGR, add 32 to mouse code */
+! if (key_name[0] == KS_SGR_MOUSE)
+! mouse_code += 32;
+
+ mouse_col = getdigits(&p) - 1;
+ if (*p++ != ';')
+ return -1;
+
+ mouse_row = getdigits(&p) - 1;
+! if (key_name[0] == KS_SGR_MOUSE && *p == 'm')
+ mouse_code |= MOUSE_RELEASE;
+! else if (*p != 'M')
+ return -1;
+! p++;
+
+ slen += (int)(p - (tp + slen));
+
+***************
+*** 4592,4598 ****
+ for (slen2 = slen; slen2 < len; slen2++)
+ {
+ if (tp[slen2] == 'M'
+! || (key_name[0] == KS_SGR_MOUSE
+ && tp[slen2] == 'm'))
+ {
+ cmd_complete = 1;
+--- 4563,4569 ----
+ for (slen2 = slen; slen2 < len; slen2++)
+ {
+ if (tp[slen2] == 'M'
+! || (key_name[0] == KS_SGR_MOUSE
+ && tp[slen2] == 'm'))
+ {
+ cmd_complete = 1;
+***************
+*** 5769,5774 ****
+--- 5740,5748 ----
+ * termcap codes from the terminal itself.
+ * We get them one by one to avoid a very long response string.
+ */
++ static int xt_index_in = 0;
++ static int xt_index_out = 0;
++
+ static void
+ req_codes_from_term()
+ {
+*** ../vim-7.4.388/src/proto/term.pro 2014-07-09 19:13:45.007701718 +0200
+--- src/proto/term.pro 2014-07-30 17:04:40.791525930 +0200
+***************
+*** 34,41 ****
+ void settmode __ARGS((int tmode));
+ void starttermcap __ARGS((void));
+ void stoptermcap __ARGS((void));
+- int did_request_esc_sequence __ARGS((void));
+- void resume_get_esc_sequence __ARGS((void));
+ void may_req_termresponse __ARGS((void));
+ void may_req_ambiguous_char_width __ARGS((void));
+ int swapping_screen __ARGS((void));
+--- 34,39 ----
+*** ../vim-7.4.388/src/version.c 2014-07-30 16:44:17.503534723 +0200
+--- src/version.c 2014-07-30 17:03:13.715526556 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 389,
+ /**/
+
+--
+The only way the average employee can speak to an executive is by taking a
+second job as a golf caddie.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.390 b/patches/source/vim/patches/7.4.390
new file mode 100644
index 000000000..5dcc9c5c6
--- /dev/null
+++ b/patches/source/vim/patches/7.4.390
@@ -0,0 +1,51 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.390
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.390
+Problem: Advancing pointer over end of a string.
+Solution: Init quote character to -1 instead of zero. (Dominique Pelle)
+Files: src/misc1.c
+
+
+*** ../vim-7.4.389/src/misc1.c 2014-07-03 22:57:51.299862927 +0200
+--- src/misc1.c 2014-08-06 12:43:33.191291602 +0200
+***************
+*** 5503,5509 ****
+ char_u *text;
+ {
+ char_u *s = skipwhite(text);
+! int quote = 0;
+
+ if (*s == '\'' || *s == '"')
+ {
+--- 5503,5509 ----
+ char_u *text;
+ {
+ char_u *s = skipwhite(text);
+! int quote = -1;
+
+ if (*s == '\'' || *s == '"')
+ {
+*** ../vim-7.4.389/src/version.c 2014-07-30 17:21:53.819518506 +0200
+--- src/version.c 2014-08-06 12:44:31.643291182 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 390,
+ /**/
+
+--
+A radioactive cat has eighteen half-lives.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.391 b/patches/source/vim/patches/7.4.391
new file mode 100644
index 000000000..e2edae0e7
--- /dev/null
+++ b/patches/source/vim/patches/7.4.391
@@ -0,0 +1,118 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.391
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.391
+Problem: No 'cursorline' highlighting when the cursor is on a line with
+ diff highlighting. (Benjamin Fritz)
+Solution: Combine the highlight attributes. (Christian Brabandt)
+Files: src/screen.c
+
+
+*** ../vim-7.4.390/src/screen.c 2014-07-30 16:44:17.499534723 +0200
+--- src/screen.c 2014-08-06 13:14:02.163278457 +0200
+***************
+*** 3702,3708 ****
+--- 3702,3713 ----
+ char_attr = 0; /* was: hl_attr(HLF_AT); */
+ #ifdef FEAT_DIFF
+ if (diff_hlf != (hlf_T)0)
++ {
+ char_attr = hl_attr(diff_hlf);
++ if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
++ char_attr = hl_combine_attr(char_attr,
++ hl_attr(HLF_CUL));
++ }
+ #endif
+ p_extra = NULL;
+ c_extra = ' ';
+***************
+*** 3753,3759 ****
+ #ifdef FEAT_SYN_HL
+ /* combine 'showbreak' with 'cursorline' */
+ if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
+! char_attr = hl_combine_attr(char_attr, HLF_CLN);
+ #endif
+ }
+ # endif
+--- 3758,3765 ----
+ #ifdef FEAT_SYN_HL
+ /* combine 'showbreak' with 'cursorline' */
+ if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
+! char_attr = hl_combine_attr(char_attr,
+! hl_attr(HLF_CUL));
+ #endif
+ }
+ # endif
+***************
+*** 3931,3936 ****
+--- 3937,3944 ----
+ && n_extra == 0)
+ diff_hlf = HLF_CHD; /* changed line */
+ line_attr = hl_attr(diff_hlf);
++ if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
++ line_attr = hl_combine_attr(line_attr, hl_attr(HLF_CUL));
+ }
+ #endif
+
+***************
+*** 4729,4735 ****
+--- 4737,4748 ----
+ {
+ diff_hlf = HLF_CHD;
+ if (attr == 0 || char_attr != attr)
++ {
+ char_attr = hl_attr(diff_hlf);
++ if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
++ char_attr = hl_combine_attr(char_attr,
++ hl_attr(HLF_CUL));
++ }
+ }
+ # endif
+ }
+***************
+*** 10174,10182 ****
+ break;
+ screen_puts_len(NameBuff, len, 0, col,
+ #if defined(FEAT_SYN_HL)
+! hl_combine_attr(attr, hl_attr(HLF_T))
+ #else
+! attr
+ #endif
+ );
+ col += len;
+--- 10187,10195 ----
+ break;
+ screen_puts_len(NameBuff, len, 0, col,
+ #if defined(FEAT_SYN_HL)
+! hl_combine_attr(attr, hl_attr(HLF_T))
+ #else
+! attr
+ #endif
+ );
+ col += len;
+*** ../vim-7.4.390/src/version.c 2014-08-06 12:49:06.711289205 +0200
+--- src/version.c 2014-08-06 13:19:19.135276179 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 391,
+ /**/
+
+--
+It's totally unfair to suggest - as many have - that engineers are socially
+inept. Engineers simply have different objectives when it comes to social
+interaction.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.392 b/patches/source/vim/patches/7.4.392
new file mode 100644
index 000000000..48a73285f
--- /dev/null
+++ b/patches/source/vim/patches/7.4.392
@@ -0,0 +1,86 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.392
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.392
+Problem: Not easy to detect type of command line window.
+Solution: Add the getcmdwintype() function. (Jacob Niehus)
+Files: src/eval.c
+
+
+*** ../vim-7.4.391/src/eval.c 2014-07-09 17:51:46.075801693 +0200
+--- src/eval.c 2014-08-06 13:35:59.303268990 +0200
+***************
+*** 554,559 ****
+--- 554,560 ----
+ static void f_getcmdline __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_getcmdpos __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_getcmdtype __ARGS((typval_T *argvars, typval_T *rettv));
++ static void f_getcmdwintype __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_getcwd __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_getfontname __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_getfperm __ARGS((typval_T *argvars, typval_T *rettv));
+***************
+*** 7984,7989 ****
+--- 7985,7991 ----
+ {"getcmdline", 0, 0, f_getcmdline},
+ {"getcmdpos", 0, 0, f_getcmdpos},
+ {"getcmdtype", 0, 0, f_getcmdtype},
++ {"getcmdwintype", 0, 0, f_getcmdwintype},
+ {"getcurpos", 0, 0, f_getcurpos},
+ {"getcwd", 0, 0, f_getcwd},
+ {"getfontname", 0, 1, f_getfontname},
+***************
+*** 11503,11508 ****
+--- 11505,11530 ----
+ }
+
+ /*
++ * "getcmdwintype()" function
++ */
++ static void
++ f_getcmdwintype(argvars, rettv)
++ typval_T *argvars UNUSED;
++ typval_T *rettv;
++ {
++ rettv->v_type = VAR_STRING;
++ rettv->vval.v_string = NULL;
++ #ifdef FEAT_CMDWIN
++ rettv->vval.v_string = alloc(2);
++ if (rettv->vval.v_string != NULL)
++ {
++ rettv->vval.v_string[0] = cmdwin_type;
++ rettv->vval.v_string[1] = NUL;
++ }
++ #endif
++ }
++
++ /*
+ * "getcwd()" function
+ */
+ static void
+*** ../vim-7.4.391/src/version.c 2014-08-06 13:20:51.799275513 +0200
+--- src/version.c 2014-08-06 13:34:42.903269539 +0200
+***************
+*** 736,737 ****
+--- 736,739 ----
+ { /* Add new patch number below this line */
++ /**/
++ 392,
+ /**/
+
+--
+I learned the customs and mannerisms of engineers by observing them, much the
+way Jane Goodall learned about the great apes, but without the hassle of
+grooming.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.393 b/patches/source/vim/patches/7.4.393
new file mode 100644
index 000000000..957ce2460
--- /dev/null
+++ b/patches/source/vim/patches/7.4.393
@@ -0,0 +1,1946 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.393
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.393
+Problem: Text drawing on newer MS-Windows systems is suboptimal. Some
+ multi-byte characters are not displayed, even though the same font
+ in Notepad can display them. (Srinath Avadhanula)
+Solution: Add the 'renderoptions' option to enable Direct-X drawing. (Taro
+ Muraoka)
+Files: runtime/doc/eval.txt, runtime/doc/options.txt,
+ runtime/doc/various.txt, src/Make_cyg.mak, src/Make_ming.mak,
+ src/Make_mvc.mak, src/eval.c, src/gui_dwrite.cpp,
+ src/gui_dwrite.h, src/gui_w32.c, src/gui_w48.c, src/option.c,
+ src/option.h, src/version.c, src/vim.h, src/proto/gui_w32.pro
+
+
+*** ../vim-7.4.392/runtime/doc/eval.txt 2014-06-25 18:15:18.442838249 +0200
+--- runtime/doc/eval.txt 2014-08-06 14:35:24.871243363 +0200
+***************
+*** 6606,6611 ****
+--- 6622,6628 ----
+ dialog_gui Compiled with GUI dialog support.
+ diff Compiled with |vimdiff| and 'diff' support.
+ digraphs Compiled with support for digraphs.
++ directx Compiled with support for Direct-X and 'renderoptions'.
+ dnd Compiled with support for the "~ register |quote_~|.
+ dos16 16 bits DOS version of Vim.
+ dos32 32 bits DOS (DJGPP) version of Vim.
+***************
+*** 6744,6750 ****
+ writebackup Compiled with 'writebackup' default on.
+ xfontset Compiled with X fontset support |xfontset|.
+ xim Compiled with X input method support |xim|.
+! xpm_w32 Compiled with pixmap support for Win32.
+ xsmp Compiled with X session management support.
+ xsmp_interact Compiled with interactive X session management support.
+ xterm_clipboard Compiled with support for xterm clipboard.
+--- 6761,6769 ----
+ writebackup Compiled with 'writebackup' default on.
+ xfontset Compiled with X fontset support |xfontset|.
+ xim Compiled with X input method support |xim|.
+! xpm Compiled with pixmap support.
+! xpm_w32 Compiled with pixmap support for Win32. (Only for
+! backward compatibility. Use "xpm" instead.)
+ xsmp Compiled with X session management support.
+ xsmp_interact Compiled with interactive X session management support.
+ xterm_clipboard Compiled with support for xterm clipboard.
+*** ../vim-7.4.392/runtime/doc/options.txt 2014-07-02 19:59:35.446375136 +0200
+--- runtime/doc/options.txt 2014-08-06 14:36:59.591242682 +0200
+***************
+*** 5647,5652 ****
+--- 5650,5726 ----
+ this option at the default "on". Only switch it off when working with
+ old Vi scripts.
+
++ *'renderoptions'* *'rop'*
++ 'renderoptions' 'rop' string (default: empty)
++ global
++ {not in Vi}
++ {only available when compiled with GUI and DIRECTX on
++ MS-Windows}
++ Select a text renderer and set its options. The options depend on the
++ renderer.
++
++ Syntax: >
++ set rop=type:{renderer}(,{name}:{value})*
++ <
++ Currently, only one optional renderer is available.
++
++ render behavior ~
++ directx Vim will draw text using DirectX (DirectWrite). It makes
++ drawn glyphs more beautiful than default GDI.
++ It requires 'encoding' is "utf-8", and only works on
++ MS-Windows Vista or newer version.
++
++ Options:
++ name meaning type value ~
++ gamma gamma float 1.0 - 2.2 (maybe)
++ contrast enhancedContrast float (unknown)
++ level clearTypeLevel float (unknown)
++ geom pixelGeometry int 0 - 2 (see below)
++ renmode renderingMode int 0 - 6 (see below)
++ taamode textAntialiasMode int 0 - 3 (see below)
++
++ See this URL for detail:
++ http://msdn.microsoft.com/en-us/library/dd368190.aspx
++
++ For geom: structure of a device pixel.
++ 0 - DWRITE_PIXEL_GEOMETRY_FLAT
++ 1 - DWRITE_PIXEL_GEOMETRY_RGB
++ 2 - DWRITE_PIXEL_GEOMETRY_BGR
++
++ See this URL for detail:
++ http://msdn.microsoft.com/en-us/library/dd368114.aspx
++
++ For renmode: method of rendering glyphs.
++ 0 - DWRITE_RENDERING_MODE_DEFAULT
++ 1 - DWRITE_RENDERING_MODE_ALIASED
++ 2 - DWRITE_RENDERING_MODE_GDI_CLASSIC
++ 3 - DWRITE_RENDERING_MODE_GDI_NATURAL
++ 4 - DWRITE_RENDERING_MODE_NATURAL
++ 5 - DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC
++ 6 - DWRITE_RENDERING_MODE_OUTLINE
++
++ See this URL for detail:
++ http://msdn.microsoft.com/en-us/library/dd368118.aspx
++
++ For taamode: antialiasing mode used for drawing text.
++ 0 - D2D1_TEXT_ANTIALIAS_MODE_DEFAULT
++ 1 - D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE
++ 2 - D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE
++ 3 - D2D1_TEXT_ANTIALIAS_MODE_ALIASED
++
++ See this URL for detail:
++ http://msdn.microsoft.com/en-us/library/dd368170.aspx
++
++ Example: >
++ set encoding=utf-8
++ set gfn=Ricty_Diminished:h12:cSHIFTJIS
++ set rop=type:directx
++ <
++ If select a raster font (Courier, Terminal or FixedSys) to
++ 'guifont', it fallbacks to be drawn by GDI automatically.
++
++ Other render types are currently not supported.
++
+ *'report'*
+ 'report' number (default 2)
+ global
+*** ../vim-7.4.392/runtime/doc/various.txt 2013-08-10 13:25:06.000000000 +0200
+--- runtime/doc/various.txt 2014-08-06 14:37:28.843242472 +0200
+***************
+*** 320,325 ****
+--- 337,343 ----
+ N *+dialog_con_gui* Support for |:confirm| with GUI and console dialog.
+ N *+diff* |vimdiff| and 'diff'
+ N *+digraphs* |digraphs| *E196*
++ m *+directx* Win32 GUI only: DirectX and |'renderoptions'|
+ *+dnd* Support for DnD into the "~ register |quote_~|.
+ B *+emacs_tags* |emacs-tags| files
+ N *+eval* expression evaluation |eval.txt|
+***************
+*** 426,431 ****
+--- 445,451 ----
+ m *+writebackup* |'writebackup'| is default on
+ m *+xim* X input method |xim|
+ *+xfontset* X fontset support |xfontset|
++ *+xpm* pixmap support
+ m *+xpm_w32* Win32 GUI only: pixmap support |w32-xpm-support|
+ *+xsmp* XSMP (X session management) support
+ *+xsmp_interact* interactive XSMP (X session management) support
+*** ../vim-7.4.392/src/Make_cyg.mak 2013-12-11 15:06:36.000000000 +0100
+--- src/Make_cyg.mak 2014-08-06 14:21:57.455249166 +0200
+***************
+*** 8,13 ****
+--- 8,14 ----
+ # Cygwin application use the Makefile (just like on Unix).
+ #
+ # GUI no or yes: set to yes if you want the GUI version (yes)
++ # DIRECTX no or yes: set to yes if you want use DirectWrite (no)
+ # PERL define to path to Perl dir to get Perl support (not defined)
+ # PERL_VER define to version of Perl being used (56)
+ # DYNAMIC_PERL no or yes: set to yes to load the Perl DLL dynamically (yes)
+***************
+*** 88,93 ****
+--- 89,98 ----
+ ARCH = i386
+ endif
+
++ ifndef DIRECTX
++ DIRECTX = no
++ endif
++
+ ifndef WINVER
+ WINVER = 0x0500
+ endif
+***************
+*** 470,475 ****
+--- 475,489 ----
+ endif
+
+ ##############################
++ ifeq (yes, $(DIRECTX))
++ # Only allow DIRECTX for a GUI build.
++ DEFINES += -DFEAT_DIRECTX -DDYNAMIC_DIRECTX
++ EXTRA_OBJS += $(OUTDIR)/gui_dwrite.o
++ EXTRA_LIBS += -ld2d1 -ldwrite
++ USE_STDCPLUS = yes
++ endif
++
++ ##############################
+ ifdef XPM
+ # Only allow XPM for a GUI build.
+ DEFINES += -DFEAT_XPM_W32
+***************
+*** 495,505 ****
+ DEFINES += -DFEAT_OLE
+ EXTRA_OBJS += $(OUTDIR)/if_ole.o
+ EXTRA_LIBS += -loleaut32
+! ifeq (yes, $(STATIC_STDCPLUS))
+! EXTRA_LIBS += -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic
+! else
+! EXTRA_LIBS += -lstdc++
+! endif
+ endif
+
+ ##############################
+--- 509,515 ----
+ DEFINES += -DFEAT_OLE
+ EXTRA_OBJS += $(OUTDIR)/if_ole.o
+ EXTRA_LIBS += -loleaut32
+! USE_STDCPLUS = yes
+ endif
+
+ ##############################
+***************
+*** 513,518 ****
+--- 523,537 ----
+ DIRSLASH = \\
+ endif
+
++ ##############################
++ ifeq (yes, $(USE_STDCPLUS))
++ ifeq (yes, $(STATIC_STDCPLUS))
++ EXTRA_LIBS += -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic
++ else
++ EXTRA_LIBS += -lstdc++
++ endif
++ endif
++
+ #>>>>> end of choices
+ ###########################################################################
+
+***************
+*** 643,648 ****
+--- 662,670 ----
+ $(OUTDIR)/gui_w32.o: gui_w32.c gui_w48.c $(INCL)
+ $(CC) -c $(CFLAGS) gui_w32.c -o $(OUTDIR)/gui_w32.o
+
++ $(OUTDIR)/gui_dwrite.o: gui_dwrite.cpp $(INCL) gui_dwrite.h
++ $(CC) -c $(CFLAGS) gui_dwrite.cpp -o $(OUTDIR)/gui_dwrite.o
++
+ $(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h
+ $(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o
+
+*** ../vim-7.4.392/src/Make_ming.mak 2014-01-06 15:44:59.000000000 +0100
+--- src/Make_ming.mak 2014-08-06 14:21:57.455249166 +0200
+***************
+*** 31,36 ****
+--- 31,38 ----
+ OPTIMIZE=MAXSPEED
+ # set to yes to make gvim, no for vim
+ GUI=yes
++ # set to yes if you want to use DirectWrite (DirectX)
++ DIRECTX=no
+ # FEATURES=[TINY | SMALL | NORMAL | BIG | HUGE]
+ # Set to TINY to make minimal version (few features).
+ FEATURES=BIG
+***************
+*** 456,461 ****
+--- 458,471 ----
+ endif
+ endif
+
++ # DirectWrite (DirectX)
++ ifeq ($(DIRECTX),yes)
++ # Only allow DirectWrite for a GUI build.
++ ifeq (yes, $(GUI))
++ DEFINES += -DFEAT_DIRECTX -DDYNAMIC_DIRECTX
++ endif
++ endif
++
+ # Only allow XPM for a GUI build.
+ ifeq (yes, $(GUI))
+
+***************
+*** 593,598 ****
+--- 603,616 ----
+ LIB += -lwsock32
+ endif
+ endif
++ ifeq ($(DIRECTX),yes)
++ # Only allow DIRECTX for a GUI build.
++ ifeq (yes, $(GUI))
++ OBJ += $(OUTDIR)/gui_dwrite.o
++ LIB += -ld2d1 -ldwrite
++ USE_STDCPLUS = yes
++ endif
++ endif
+ ifdef XPM
+ # Only allow XPM for a GUI build.
+ ifeq (yes, $(GUI))
+***************
+*** 650,660 ****
+ ifeq (yes, $(OLE))
+ LIB += -loleaut32
+ OBJ += $(OUTDIR)/if_ole.o
+! ifeq (yes, $(STATIC_STDCPLUS))
+! LIB += -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic
+! else
+! LIB += -lstdc++
+! endif
+ endif
+
+ ifeq (yes, $(MBYTE))
+--- 668,674 ----
+ ifeq (yes, $(OLE))
+ LIB += -loleaut32
+ OBJ += $(OUTDIR)/if_ole.o
+! USE_STDCPLUS = yes
+ endif
+
+ ifeq (yes, $(MBYTE))
+***************
+*** 678,683 ****
+--- 692,705 ----
+ DEFINES+=-DDYNAMIC_ICONV
+ endif
+
++ ifeq (yes, $(USE_STDCPLUS))
++ ifeq (yes, $(STATIC_STDCPLUS))
++ LIB += -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic
++ else
++ LIB += -lstdc++
++ endif
++ endif
++
+ all: $(TARGET) vimrun.exe xxd/xxd.exe install.exe uninstal.exe GvimExt/gvimext.dll
+
+ vimrun.exe: vimrun.c
+***************
+*** 751,756 ****
+--- 773,781 ----
+ $(OUTDIR)/gui_w32.o: gui_w32.c gui_w48.c $(INCL)
+ $(CC) -c $(CFLAGS) gui_w32.c -o $(OUTDIR)/gui_w32.o
+
++ $(OUTDIR)/gui_dwrite.o: gui_dwrite.cpp $(INCL) gui_dwrite.h
++ $(CC) -c $(CFLAGS) gui_dwrite.cpp -o $(OUTDIR)/gui_dwrite.o
++
+ $(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h
+ $(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o
+
+*** ../vim-7.4.392/src/Make_mvc.mak 2014-05-22 16:29:03.374353200 +0200
+--- src/Make_mvc.mak 2014-08-06 14:21:57.455249166 +0200
+***************
+*** 24,29 ****
+--- 24,32 ----
+ #
+ # GUI interface: GUI=yes (default is no)
+ #
++ # GUI with DirectWrite(DirectX): DIRECTX=yes
++ # (default is no, requires GUI=yes)
++ #
+ # OLE interface: OLE=yes (usually with GUI=yes)
+ #
+ # Multibyte support: MBYTE=yes (default is no)
+***************
+*** 168,173 ****
+--- 171,179 ----
+ !else
+ OBJDIR = .\ObjC
+ !endif
++ !if "$(DIRECTX)" == "yes"
++ OBJDIR = $(OBJDIR)X
++ !endif
+ !if "$(OLE)" == "yes"
+ OBJDIR = $(OBJDIR)O
+ !endif
+***************
+*** 292,297 ****
+--- 298,310 ----
+ NETBEANS_LIB = WSock32.lib
+ !endif
+
++ # DirectWrite(DirectX)
++ !if "$(DIRECTX)" == "yes"
++ DIRECTX_DEFS = -DFEAT_DIRECTX -DDYNAMIC_DIRECTX
++ DIRECTX_INCL = gui_dwrite.h
++ DIRECTX_OBJ = $(OUTDIR)\gui_dwrite.obj
++ !endif
++
+ !ifndef XPM
+ # XPM is not set, use the included xpm files, depending on the architecture.
+ !if "$(CPU)" == "AMD64"
+***************
+*** 642,647 ****
+--- 655,666 ----
+ SUBSYSTEM = console
+ !endif
+
++ !if "$(GUI)" == "yes" && "$(DIRECTX)" == "yes"
++ CFLAGS = $(CFLAGS) $(DIRECTX_DEFS)
++ GUI_INCL = $(GUI_INCL) $(DIRECTX_INCL)
++ GUI_OBJ = $(GUI_OBJ) $(DIRECTX_OBJ)
++ !endif
++
+ # iconv.dll library (dynamically loaded)
+ !ifndef ICONV
+ ICONV = yes
+***************
+*** 1107,1112 ****
+--- 1126,1133 ----
+
+ $(OUTDIR)/gui_w32.obj: $(OUTDIR) gui_w32.c gui_w48.c $(INCL) $(GUI_INCL)
+
++ $(OUTDIR)/gui_dwrite.obj: $(OUTDIR) gui_dwrite.cpp $(INCL) $(GUI_INCL)
++
+ $(OUTDIR)/if_cscope.obj: $(OUTDIR) if_cscope.c $(INCL)
+
+ $(OUTDIR)/if_lua.obj: $(OUTDIR) if_lua.c $(INCL)
+*** ../vim-7.4.392/src/eval.c 2014-08-06 13:36:56.091268582 +0200
+--- src/eval.c 2014-08-06 14:21:57.459249166 +0200
+***************
+*** 12464,12469 ****
+--- 12464,12472 ----
+ #ifdef FEAT_DIGRAPHS
+ "digraphs",
+ #endif
++ #ifdef FEAT_DIRECTX
++ "directx",
++ #endif
+ #ifdef FEAT_DND
+ "dnd",
+ #endif
+*** ../vim-7.4.392/src/gui_dwrite.cpp 2014-08-06 14:49:19.663237363 +0200
+--- src/gui_dwrite.cpp 2014-08-06 14:39:48.775241466 +0200
+***************
+*** 0 ****
+--- 1,901 ----
++ /* vi:set ts=8 sts=4 sw=4 noet: */
++ /*
++ * Author: MURAOKA Taro <koron.kaoriya@gmail.com>
++ *
++ * Contributors:
++ * - Ken Takata
++ *
++ * Copyright (C) 2013 MURAOKA Taro <koron.kaoriya@gmail.com>
++ * THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
++ */
++
++ #define WIN32_LEAN_AND_MEAN
++
++ #ifndef DYNAMIC_DIRECTX
++ # if WINVER < 0x0600
++ # error WINVER must be 0x0600 or above to use DirectWrite(DirectX)
++ # endif
++ #endif
++
++ #include <windows.h>
++ #include <crtdbg.h>
++ #include <assert.h>
++ #include <math.h>
++ #include <d2d1.h>
++ #include <d2d1helper.h>
++ #include <dwrite.h>
++
++ #include "gui_dwrite.h"
++
++ #ifdef __MINGW32__
++ # define __maybenull SAL__maybenull
++ # define __in SAL__in
++ # define __out SAL__out
++ #endif
++
++ #ifdef DYNAMIC_DIRECTX
++ extern "C" HINSTANCE vimLoadLib(char *name);
++
++ typedef int (WINAPI *PGETUSERDEFAULTLOCALENAME)(LPWSTR, int);
++ typedef HRESULT (WINAPI *PD2D1CREATEFACTORY)(D2D1_FACTORY_TYPE,
++ REFIID, const D2D1_FACTORY_OPTIONS *, void **);
++ typedef HRESULT (WINAPI *PDWRITECREATEFACTORY)(DWRITE_FACTORY_TYPE,
++ REFIID, IUnknown **);
++
++ static HINSTANCE hD2D1DLL = NULL;
++ static HINSTANCE hDWriteDLL = NULL;
++
++ static PGETUSERDEFAULTLOCALENAME pGetUserDefaultLocaleName = NULL;
++ static PD2D1CREATEFACTORY pD2D1CreateFactory = NULL;
++ static PDWRITECREATEFACTORY pDWriteCreateFactory = NULL;
++
++ #define GetUserDefaultLocaleName (*pGetUserDefaultLocaleName)
++ #define D2D1CreateFactory (*pD2D1CreateFactory)
++ #define DWriteCreateFactory (*pDWriteCreateFactory)
++
++ static void
++ unload(HINSTANCE &hinst)
++ {
++ if (hinst != NULL)
++ {
++ FreeLibrary(hinst);
++ hinst = NULL;
++ }
++ }
++ #endif // DYNAMIC_DIRECTX
++
++ template <class T> inline void SafeRelease(T **ppT)
++ {
++ if (*ppT)
++ {
++ (*ppT)->Release();
++ *ppT = NULL;
++ }
++ }
++
++ struct GdiTextRendererContext
++ {
++ // const fields.
++ COLORREF color;
++ FLOAT cellWidth;
++
++ // working fields.
++ FLOAT offsetX;
++ };
++
++ static DWRITE_PIXEL_GEOMETRY
++ ToPixelGeometry(int value)
++ {
++ switch (value)
++ {
++ default:
++ case 0:
++ return DWRITE_PIXEL_GEOMETRY_FLAT;
++ case 1:
++ return DWRITE_PIXEL_GEOMETRY_RGB;
++ case 2:
++ return DWRITE_PIXEL_GEOMETRY_BGR;
++ }
++ }
++
++ static int
++ ToInt(DWRITE_PIXEL_GEOMETRY value)
++ {
++ switch (value)
++ {
++ case DWRITE_PIXEL_GEOMETRY_FLAT:
++ return 0;
++ case DWRITE_PIXEL_GEOMETRY_RGB:
++ return 1;
++ case DWRITE_PIXEL_GEOMETRY_BGR:
++ return 2;
++ default:
++ return -1;
++ }
++ }
++
++ static DWRITE_RENDERING_MODE
++ ToRenderingMode(int value)
++ {
++ switch (value)
++ {
++ default:
++ case 0:
++ return DWRITE_RENDERING_MODE_DEFAULT;
++ case 1:
++ return DWRITE_RENDERING_MODE_ALIASED;
++ case 2:
++ return DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC;
++ case 3:
++ return DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL;
++ case 4:
++ return DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL;
++ case 5:
++ return DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC;
++ case 6:
++ return DWRITE_RENDERING_MODE_OUTLINE;
++ }
++ }
++
++ static D2D1_TEXT_ANTIALIAS_MODE
++ ToTextAntialiasMode(int value)
++ {
++ switch (value)
++ {
++ default:
++ case 0:
++ return D2D1_TEXT_ANTIALIAS_MODE_DEFAULT;
++ case 1:
++ return D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE;
++ case 2:
++ return D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE;
++ case 3:
++ return D2D1_TEXT_ANTIALIAS_MODE_ALIASED;
++ }
++ }
++
++ static int
++ ToInt(DWRITE_RENDERING_MODE value)
++ {
++ switch (value)
++ {
++ case DWRITE_RENDERING_MODE_DEFAULT:
++ return 0;
++ case DWRITE_RENDERING_MODE_ALIASED:
++ return 1;
++ case DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC:
++ return 2;
++ case DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL:
++ return 3;
++ case DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL:
++ return 4;
++ case DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC:
++ return 5;
++ case DWRITE_RENDERING_MODE_OUTLINE:
++ return 6;
++ default:
++ return -1;
++ }
++ }
++
++ class AdjustedGlyphRun : public DWRITE_GLYPH_RUN
++ {
++ private:
++ FLOAT mDelta;
++ FLOAT *mAdjustedAdvances;
++
++ public:
++ AdjustedGlyphRun(
++ const DWRITE_GLYPH_RUN *glyphRun,
++ FLOAT cellWidth) :
++ DWRITE_GLYPH_RUN(*glyphRun),
++ mDelta(0.0f),
++ mAdjustedAdvances(new FLOAT[glyphRun->glyphCount])
++ {
++ assert(cellWidth != 0.0f);
++ for (UINT32 i = 0; i < glyphRun->glyphCount; ++i)
++ {
++ FLOAT orig = glyphRun->glyphAdvances[i];
++ FLOAT adjusted = adjustToCell(orig, cellWidth);
++ mAdjustedAdvances[i] = adjusted;
++ mDelta += adjusted - orig;
++ }
++ glyphAdvances = mAdjustedAdvances;
++ }
++
++ ~AdjustedGlyphRun(void)
++ {
++ delete[] mAdjustedAdvances;
++ }
++
++ FLOAT getDelta(void) const
++ {
++ return mDelta;
++ }
++
++ static FLOAT adjustToCell(FLOAT value, FLOAT cellWidth)
++ {
++ int cellCount = (int)floor(value / cellWidth + 0.5f);
++ if (cellCount < 1)
++ cellCount = 1;
++ return cellCount * cellWidth;
++ }
++ };
++
++ class GdiTextRenderer : public IDWriteTextRenderer
++ {
++ public:
++ GdiTextRenderer(
++ IDWriteBitmapRenderTarget* bitmapRenderTarget,
++ IDWriteRenderingParams* renderingParams) :
++ cRefCount_(0),
++ pRenderTarget_(bitmapRenderTarget),
++ pRenderingParams_(renderingParams)
++ {
++ pRenderTarget_->AddRef();
++ pRenderingParams_->AddRef();
++ AddRef();
++ }
++
++ ~GdiTextRenderer()
++ {
++ SafeRelease(&pRenderTarget_);
++ SafeRelease(&pRenderingParams_);
++ }
++
++ IFACEMETHOD(IsPixelSnappingDisabled)(
++ __maybenull void* clientDrawingContext,
++ __out BOOL* isDisabled)
++ {
++ *isDisabled = FALSE;
++ return S_OK;
++ }
++
++ IFACEMETHOD(GetCurrentTransform)(
++ __maybenull void* clientDrawingContext,
++ __out DWRITE_MATRIX* transform)
++ {
++ //forward the render target's transform
++ pRenderTarget_->GetCurrentTransform(transform);
++ return S_OK;
++ }
++
++ IFACEMETHOD(GetPixelsPerDip)(
++ __maybenull void* clientDrawingContext,
++ __out FLOAT* pixelsPerDip)
++ {
++ *pixelsPerDip = pRenderTarget_->GetPixelsPerDip();
++ return S_OK;
++ }
++
++ IFACEMETHOD(DrawGlyphRun)(
++ __maybenull void* clientDrawingContext,
++ FLOAT baselineOriginX,
++ FLOAT baselineOriginY,
++ DWRITE_MEASURING_MODE measuringMode,
++ __in DWRITE_GLYPH_RUN const* glyphRun,
++ __in DWRITE_GLYPH_RUN_DESCRIPTION const* glyphRunDescription,
++ IUnknown* clientDrawingEffect)
++ {
++ HRESULT hr = S_OK;
++
++ GdiTextRendererContext *context =
++ reinterpret_cast<GdiTextRendererContext*>(clientDrawingContext);
++
++ AdjustedGlyphRun adjustedGlyphRun(glyphRun, context->cellWidth);
++
++ // Pass on the drawing call to the render target to do the real work.
++ RECT dirtyRect = {0};
++
++ hr = pRenderTarget_->DrawGlyphRun(
++ baselineOriginX + context->offsetX,
++ baselineOriginY,
++ measuringMode,
++ &adjustedGlyphRun,
++ pRenderingParams_,
++ context->color,
++ &dirtyRect);
++
++ context->offsetX += adjustedGlyphRun.getDelta();
++
++ return hr;
++ }
++
++ IFACEMETHOD(DrawUnderline)(
++ __maybenull void* clientDrawingContext,
++ FLOAT baselineOriginX,
++ FLOAT baselineOriginY,
++ __in DWRITE_UNDERLINE const* underline,
++ IUnknown* clientDrawingEffect)
++ {
++ return E_NOTIMPL;
++ }
++
++ IFACEMETHOD(DrawStrikethrough)(
++ __maybenull void* clientDrawingContext,
++ FLOAT baselineOriginX,
++ FLOAT baselineOriginY,
++ __in DWRITE_STRIKETHROUGH const* strikethrough,
++ IUnknown* clientDrawingEffect)
++ {
++ return E_NOTIMPL;
++ }
++
++ IFACEMETHOD(DrawInlineObject)(
++ __maybenull void* clientDrawingContext,
++ FLOAT originX,
++ FLOAT originY,
++ IDWriteInlineObject* inlineObject,
++ BOOL isSideways,
++ BOOL isRightToLeft,
++ IUnknown* clientDrawingEffect)
++ {
++ return E_NOTIMPL;
++ }
++
++ public:
++ IFACEMETHOD_(unsigned long, AddRef) ()
++ {
++ return InterlockedIncrement(&cRefCount_);
++ }
++
++ IFACEMETHOD_(unsigned long, Release) ()
++ {
++ long newCount = InterlockedDecrement(&cRefCount_);
++
++ if (newCount == 0)
++ {
++ delete this;
++ return 0;
++ }
++ return newCount;
++ }
++
++ IFACEMETHOD(QueryInterface)(
++ IID const& riid,
++ void** ppvObject)
++ {
++ if (__uuidof(IDWriteTextRenderer) == riid)
++ {
++ *ppvObject = this;
++ }
++ else if (__uuidof(IDWritePixelSnapping) == riid)
++ {
++ *ppvObject = this;
++ }
++ else if (__uuidof(IUnknown) == riid)
++ {
++ *ppvObject = this;
++ }
++ else
++ {
++ *ppvObject = NULL;
++ return E_FAIL;
++ }
++
++ return S_OK;
++ }
++
++ private:
++ unsigned long cRefCount_;
++ IDWriteBitmapRenderTarget* pRenderTarget_;
++ IDWriteRenderingParams* pRenderingParams_;
++ };
++
++ struct DWriteContext {
++ FLOAT mDpiScaleX;
++ FLOAT mDpiScaleY;
++ bool mDrawing;
++
++ ID2D1Factory *mD2D1Factory;
++
++ ID2D1DCRenderTarget *mRT;
++ ID2D1SolidColorBrush *mBrush;
++
++ IDWriteFactory *mDWriteFactory;
++ IDWriteGdiInterop *mGdiInterop;
++ IDWriteRenderingParams *mRenderingParams;
++ IDWriteTextFormat *mTextFormat;
++
++ HFONT mLastHFont;
++ DWRITE_FONT_WEIGHT mFontWeight;
++ DWRITE_FONT_STYLE mFontStyle;
++
++ D2D1_TEXT_ANTIALIAS_MODE mTextAntialiasMode;
++
++ // METHODS
++
++ DWriteContext();
++
++ virtual ~DWriteContext();
++
++ HRESULT SetLOGFONT(const LOGFONTW &logFont, float fontSize);
++
++ void SetFont(HFONT hFont);
++
++ void SetFont(const LOGFONTW &logFont);
++
++ void DrawText(HDC hdc, const WCHAR* text, int len,
++ int x, int y, int w, int h, int cellWidth, COLORREF color);
++
++ float PixelsToDipsX(int x);
++
++ float PixelsToDipsY(int y);
++
++ void SetRenderingParams(
++ const DWriteRenderingParams *params);
++
++ DWriteRenderingParams *GetRenderingParams(
++ DWriteRenderingParams *params);
++ };
++
++ DWriteContext::DWriteContext() :
++ mDpiScaleX(1.f),
++ mDpiScaleY(1.f),
++ mDrawing(false),
++ mD2D1Factory(NULL),
++ mRT(NULL),
++ mBrush(NULL),
++ mDWriteFactory(NULL),
++ mGdiInterop(NULL),
++ mRenderingParams(NULL),
++ mTextFormat(NULL),
++ mLastHFont(NULL),
++ mFontWeight(DWRITE_FONT_WEIGHT_NORMAL),
++ mFontStyle(DWRITE_FONT_STYLE_NORMAL),
++ mTextAntialiasMode(D2D1_TEXT_ANTIALIAS_MODE_DEFAULT)
++ {
++ HRESULT hr;
++
++ HDC screen = ::GetDC(0);
++ mDpiScaleX = ::GetDeviceCaps(screen, LOGPIXELSX) / 96.0f;
++ mDpiScaleY = ::GetDeviceCaps(screen, LOGPIXELSY) / 96.0f;
++ ::ReleaseDC(0, screen);
++
++ hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED,
++ __uuidof(ID2D1Factory), NULL,
++ reinterpret_cast<void**>(&mD2D1Factory));
++ _RPT2(_CRT_WARN, "D2D1CreateFactory: hr=%p p=%p\n", hr, mD2D1Factory);
++
++ if (SUCCEEDED(hr))
++ {
++ D2D1_RENDER_TARGET_PROPERTIES props = {
++ D2D1_RENDER_TARGET_TYPE_DEFAULT,
++ { DXGI_FORMAT_B8G8R8A8_UNORM, D2D1_ALPHA_MODE_IGNORE },
++ 0, 0,
++ D2D1_RENDER_TARGET_USAGE_NONE,
++ D2D1_FEATURE_LEVEL_DEFAULT
++ };
++ hr = mD2D1Factory->CreateDCRenderTarget(&props, &mRT);
++ _RPT2(_CRT_WARN, "CreateDCRenderTarget: hr=%p p=%p\n", hr, mRT);
++ }
++
++ if (SUCCEEDED(hr))
++ {
++ hr = mRT->CreateSolidColorBrush(
++ D2D1::ColorF(D2D1::ColorF::Black),
++ &mBrush);
++ _RPT2(_CRT_WARN, "CreateSolidColorBrush: hr=%p p=%p\n", hr, mBrush);
++ }
++
++ if (SUCCEEDED(hr))
++ {
++ hr = DWriteCreateFactory(
++ DWRITE_FACTORY_TYPE_SHARED,
++ __uuidof(IDWriteFactory),
++ reinterpret_cast<IUnknown**>(&mDWriteFactory));
++ _RPT2(_CRT_WARN, "DWriteCreateFactory: hr=%p p=%p\n", hr,
++ mDWriteFactory);
++ }
++
++ if (SUCCEEDED(hr))
++ {
++ hr = mDWriteFactory->GetGdiInterop(&mGdiInterop);
++ _RPT2(_CRT_WARN, "GetGdiInterop: hr=%p p=%p\n", hr, mGdiInterop);
++ }
++
++ if (SUCCEEDED(hr))
++ {
++ hr = mDWriteFactory->CreateRenderingParams(&mRenderingParams);
++ _RPT2(_CRT_WARN, "CreateRenderingParams: hr=%p p=%p\n", hr,
++ mRenderingParams);
++ }
++ }
++
++ DWriteContext::~DWriteContext()
++ {
++ SafeRelease(&mTextFormat);
++ SafeRelease(&mRenderingParams);
++ SafeRelease(&mGdiInterop);
++ SafeRelease(&mDWriteFactory);
++ SafeRelease(&mBrush);
++ SafeRelease(&mRT);
++ SafeRelease(&mD2D1Factory);
++ }
++
++ HRESULT
++ DWriteContext::SetLOGFONT(const LOGFONTW &logFont, float fontSize)
++ {
++ // Most of this function is copy from: http://msdn.microsoft.com/en-us/library/windows/desktop/dd941783(v=vs.85).aspx
++ HRESULT hr = S_OK;
++
++ IDWriteFont *font = NULL;
++ IDWriteFontFamily *fontFamily = NULL;
++ IDWriteLocalizedStrings *localizedFamilyNames = NULL;
++
++ if (SUCCEEDED(hr))
++ {
++ hr = mGdiInterop->CreateFontFromLOGFONT(&logFont, &font);
++ }
++
++ // Get the font family to which this font belongs.
++ if (SUCCEEDED(hr))
++ {
++ hr = font->GetFontFamily(&fontFamily);
++ }
++
++ // Get the family names. This returns an object that encapsulates one or
++ // more names with the same meaning but in different languages.
++ if (SUCCEEDED(hr))
++ {
++ hr = fontFamily->GetFamilyNames(&localizedFamilyNames);
++ }
++
++ // Get the family name at index zero. If we were going to display the name
++ // we'd want to try to find one that matched the use locale, but for
++ // purposes of creating a text format object any language will do.
++
++ wchar_t familyName[100];
++ if (SUCCEEDED(hr))
++ {
++ hr = localizedFamilyNames->GetString(0, familyName,
++ ARRAYSIZE(familyName));
++ }
++
++ if (SUCCEEDED(hr))
++ {
++ // If no font size was passed in use the lfHeight of the LOGFONT.
++ if (fontSize == 0)
++ {
++ // Convert from pixels to DIPs.
++ fontSize = PixelsToDipsY(logFont.lfHeight);
++ if (fontSize < 0)
++ {
++ // Negative lfHeight represents the size of the em unit.
++ fontSize = -fontSize;
++ }
++ else
++ {
++ // Positive lfHeight represents the cell height (ascent +
++ // descent).
++ DWRITE_FONT_METRICS fontMetrics;
++ font->GetMetrics(&fontMetrics);
++
++ // Convert the cell height (ascent + descent) from design units
++ // to ems.
++ float cellHeight = static_cast<float>(
++ fontMetrics.ascent + fontMetrics.descent)
++ / fontMetrics.designUnitsPerEm;
++
++ // Divide the font size by the cell height to get the font em
++ // size.
++ fontSize /= cellHeight;
++ }
++ }
++ }
++
++ // The text format includes a locale name. Ideally, this would be the
++ // language of the text, which may or may not be the same as the primary
++ // language of the user. However, for our purposes the user locale will do.
++ wchar_t localeName[LOCALE_NAME_MAX_LENGTH];
++ if (SUCCEEDED(hr))
++ {
++ if (GetUserDefaultLocaleName(localeName, LOCALE_NAME_MAX_LENGTH) == 0)
++ hr = HRESULT_FROM_WIN32(GetLastError());
++ }
++
++ if (SUCCEEDED(hr))
++ {
++ // Create the text format object.
++ hr = mDWriteFactory->CreateTextFormat(
++ familyName,
++ NULL, // no custom font collection
++ font->GetWeight(),
++ font->GetStyle(),
++ font->GetStretch(),
++ fontSize,
++ localeName,
++ &mTextFormat);
++ }
++
++ if (SUCCEEDED(hr))
++ {
++ mFontWeight = static_cast<DWRITE_FONT_WEIGHT>(logFont.lfWeight);
++ mFontStyle = logFont.lfItalic ? DWRITE_FONT_STYLE_ITALIC
++ : DWRITE_FONT_STYLE_NORMAL;
++ }
++
++ SafeRelease(&localizedFamilyNames);
++ SafeRelease(&fontFamily);
++ SafeRelease(&font);
++
++ return hr;
++ }
++
++ void
++ DWriteContext::SetFont(HFONT hFont)
++ {
++ if (mLastHFont != hFont)
++ {
++ LOGFONTW lf;
++ if (GetObjectW(hFont, sizeof(lf), &lf))
++ {
++ SetFont(lf);
++ mLastHFont = hFont;
++ }
++ }
++ }
++
++ void
++ DWriteContext::SetFont(const LOGFONTW &logFont)
++ {
++ SafeRelease(&mTextFormat);
++ mLastHFont = NULL;
++
++ HRESULT hr = SetLOGFONT(logFont, 0.f);
++
++ if (SUCCEEDED(hr))
++ hr = mTextFormat->SetTextAlignment(DWRITE_TEXT_ALIGNMENT_LEADING);
++
++ if (SUCCEEDED(hr))
++ hr = mTextFormat->SetParagraphAlignment(
++ DWRITE_PARAGRAPH_ALIGNMENT_CENTER);
++
++ if (SUCCEEDED(hr))
++ hr = mTextFormat->SetWordWrapping(DWRITE_WORD_WRAPPING_NO_WRAP);
++ }
++
++ void
++ DWriteContext::DrawText(HDC hdc, const WCHAR* text, int len,
++ int x, int y, int w, int h, int cellWidth, COLORREF color)
++ {
++ HRESULT hr = S_OK;
++ IDWriteBitmapRenderTarget *bmpRT = NULL;
++
++ // Skip when any fonts are not set.
++ if (mTextFormat == NULL)
++ return;
++
++ // Check possibility of zero divided error.
++ if (cellWidth == 0 || mDpiScaleX == 0.0f || mDpiScaleY == 0.0f)
++ return;
++
++ if (SUCCEEDED(hr))
++ hr = mGdiInterop->CreateBitmapRenderTarget(hdc, w, h, &bmpRT);
++
++ if (SUCCEEDED(hr))
++ {
++ IDWriteTextLayout *textLayout = NULL;
++
++ HDC memdc = bmpRT->GetMemoryDC();
++ BitBlt(memdc, 0, 0, w, h, hdc, x, y, SRCCOPY);
++
++ hr = mDWriteFactory->CreateGdiCompatibleTextLayout(
++ text, len, mTextFormat, PixelsToDipsX(w),
++ PixelsToDipsY(h), mDpiScaleX, NULL, TRUE, &textLayout);
++
++ if (SUCCEEDED(hr))
++ {
++ DWRITE_TEXT_RANGE textRange = { 0, len };
++ textLayout->SetFontWeight(mFontWeight, textRange);
++ textLayout->SetFontStyle(mFontStyle, textRange);
++ }
++
++ if (SUCCEEDED(hr))
++ {
++ GdiTextRenderer *renderer = new GdiTextRenderer(bmpRT,
++ mRenderingParams);
++ GdiTextRendererContext data = {
++ color,
++ PixelsToDipsX(cellWidth),
++ 0.0f
++ };
++ textLayout->Draw(&data, renderer, 0, 0);
++ SafeRelease(&renderer);
++ }
++
++ BitBlt(hdc, x, y, w, h, memdc, 0, 0, SRCCOPY);
++
++ SafeRelease(&textLayout);
++ }
++
++ SafeRelease(&bmpRT);
++ }
++
++ float
++ DWriteContext::PixelsToDipsX(int x)
++ {
++ return x / mDpiScaleX;
++ }
++
++ float
++ DWriteContext::PixelsToDipsY(int y)
++ {
++ return y / mDpiScaleY;
++ }
++
++ void
++ DWriteContext::SetRenderingParams(
++ const DWriteRenderingParams *params)
++ {
++ if (mDWriteFactory == NULL)
++ return;
++
++ IDWriteRenderingParams *renderingParams = NULL;
++ D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode =
++ D2D1_TEXT_ANTIALIAS_MODE_DEFAULT;
++ HRESULT hr;
++ if (params != NULL)
++ {
++ hr = mDWriteFactory->CreateCustomRenderingParams(params->gamma,
++ params->enhancedContrast, params->clearTypeLevel,
++ ToPixelGeometry(params->pixelGeometry),
++ ToRenderingMode(params->renderingMode), &renderingParams);
++ textAntialiasMode = ToTextAntialiasMode(params->textAntialiasMode);
++ }
++ else
++ hr = mDWriteFactory->CreateRenderingParams(&renderingParams);
++ if (SUCCEEDED(hr) && renderingParams != NULL)
++ {
++ SafeRelease(&mRenderingParams);
++ mRenderingParams = renderingParams;
++ mTextAntialiasMode = textAntialiasMode;
++ }
++ }
++
++ DWriteRenderingParams *
++ DWriteContext::GetRenderingParams(
++ DWriteRenderingParams *params)
++ {
++ if (params != NULL && mRenderingParams != NULL)
++ {
++ params->gamma = mRenderingParams->GetGamma();
++ params->enhancedContrast = mRenderingParams->GetEnhancedContrast();
++ params->clearTypeLevel = mRenderingParams->GetClearTypeLevel();
++ params->pixelGeometry = ToInt(mRenderingParams->GetPixelGeometry());
++ params->renderingMode = ToInt(mRenderingParams->GetRenderingMode());
++ params->textAntialiasMode = mTextAntialiasMode;
++ }
++ return params;
++ }
++
++ ////////////////////////////////////////////////////////////////////////////
++ // PUBLIC C INTERFACES
++
++ void
++ DWrite_Init(void)
++ {
++ #ifdef DYNAMIC_DIRECTX
++ // Load libraries.
++ hD2D1DLL = vimLoadLib(const_cast<char*>("d2d1.dll"));
++ hDWriteDLL = vimLoadLib(const_cast<char*>("dwrite.dll"));
++ if (hD2D1DLL == NULL || hDWriteDLL == NULL)
++ {
++ DWrite_Final();
++ return;
++ }
++ // Get address of procedures.
++ pGetUserDefaultLocaleName = (PGETUSERDEFAULTLOCALENAME)GetProcAddress(
++ GetModuleHandle("kernel32.dll"), "GetUserDefaultLocaleName");
++ pD2D1CreateFactory = (PD2D1CREATEFACTORY)GetProcAddress(hD2D1DLL,
++ "D2D1CreateFactory");
++ pDWriteCreateFactory = (PDWRITECREATEFACTORY)GetProcAddress(hDWriteDLL,
++ "DWriteCreateFactory");
++ #endif
++ }
++
++ void
++ DWrite_Final(void)
++ {
++ #ifdef DYNAMIC_DIRECTX
++ pGetUserDefaultLocaleName = NULL;
++ pD2D1CreateFactory = NULL;
++ pDWriteCreateFactory = NULL;
++ unload(hDWriteDLL);
++ unload(hD2D1DLL);
++ #endif
++ }
++
++ DWriteContext *
++ DWriteContext_Open(void)
++ {
++ #ifdef DYNAMIC_DIRECTX
++ if (pGetUserDefaultLocaleName == NULL || pD2D1CreateFactory == NULL
++ || pDWriteCreateFactory == NULL)
++ return NULL;
++ #endif
++ return new DWriteContext();
++ }
++
++ void
++ DWriteContext_BeginDraw(DWriteContext *ctx)
++ {
++ if (ctx != NULL && ctx->mRT != NULL)
++ {
++ ctx->mRT->BeginDraw();
++ ctx->mRT->SetTransform(D2D1::IdentityMatrix());
++ ctx->mDrawing = true;
++ }
++ }
++
++ void
++ DWriteContext_BindDC(DWriteContext *ctx, HDC hdc, RECT *rect)
++ {
++ if (ctx != NULL && ctx->mRT != NULL)
++ {
++ ctx->mRT->BindDC(hdc, rect);
++ ctx->mRT->SetTextAntialiasMode(ctx->mTextAntialiasMode);
++ }
++ }
++
++ void
++ DWriteContext_SetFont(DWriteContext *ctx, HFONT hFont)
++ {
++ if (ctx != NULL)
++ {
++ ctx->SetFont(hFont);
++ }
++ }
++
++ void
++ DWriteContext_DrawText(
++ DWriteContext *ctx,
++ HDC hdc,
++ const WCHAR* text,
++ int len,
++ int x,
++ int y,
++ int w,
++ int h,
++ int cellWidth,
++ COLORREF color)
++ {
++ if (ctx != NULL)
++ ctx->DrawText(hdc, text, len, x, y, w, h, cellWidth, color);
++ }
++
++ void
++ DWriteContext_EndDraw(DWriteContext *ctx)
++ {
++ if (ctx != NULL && ctx->mRT != NULL)
++ {
++ ctx->mRT->EndDraw();
++ ctx->mDrawing = false;
++ }
++ }
++
++ void
++ DWriteContext_Close(DWriteContext *ctx)
++ {
++ delete ctx;
++ }
++
++ void
++ DWriteContext_SetRenderingParams(
++ DWriteContext *ctx,
++ const DWriteRenderingParams *params)
++ {
++ if (ctx != NULL)
++ ctx->SetRenderingParams(params);
++ }
++
++ DWriteRenderingParams *
++ DWriteContext_GetRenderingParams(
++ DWriteContext *ctx,
++ DWriteRenderingParams *params)
++ {
++ if (ctx != NULL)
++ return ctx->GetRenderingParams(params);
++ else
++ return NULL;
++ }
+*** ../vim-7.4.392/src/gui_dwrite.h 2014-08-06 14:49:19.667237363 +0200
+--- src/gui_dwrite.h 2014-08-06 14:21:57.459249166 +0200
+***************
+*** 0 ****
+--- 1,85 ----
++ /* vi:set ts=8 sts=4 sw=4 noet: */
++ /*
++ * Author: MURAOKA Taro <koron.kaoriya@gmail.com>
++ *
++ * Contributors:
++ * - Ken Takata
++ *
++ * Copyright (C) 2013 MURAOKA Taro <koron.kaoriya@gmail.com>
++ * THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
++ */
++
++ #ifndef GUI_DWRITE_H
++ #define GUI_DWRITE_H
++
++ #ifdef __cplusplus
++ extern "C" {
++ #endif
++
++ typedef struct DWriteContext DWriteContext;
++
++ typedef struct DWriteRenderingParams {
++ float gamma;
++ float enhancedContrast;
++ float clearTypeLevel;
++ /*
++ * pixelGeometry:
++ * 0 - DWRITE_PIXEL_GEOMETRY_FLAT
++ * 1 - DWRITE_PIXEL_GEOMETRY_RGB
++ * 2 - DWRITE_PIXEL_GEOMETRY_BGR
++ */
++ int pixelGeometry;
++ /*
++ * renderingMode:
++ * 0 - DWRITE_RENDERING_MODE_DEFAULT
++ * 1 - DWRITE_RENDERING_MODE_ALIASED
++ * 2 - DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC
++ * 3 - DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL
++ * 4 - DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL
++ * 5 - DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC
++ * 6 - DWRITE_RENDERING_MODE_OUTLINE
++ */
++ int renderingMode;
++ /*
++ * antialiasMode:
++ * 0 - D2D1_TEXT_ANTIALIAS_MODE_DEFAULT
++ * 1 - D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE
++ * 2 - D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE
++ * 3 - D2D1_TEXT_ANTIALIAS_MODE_ALIASED
++ */
++ int textAntialiasMode;
++ } DWriteRenderingParams;
++
++ void DWrite_Init(void);
++ void DWrite_Final(void);
++
++ DWriteContext *DWriteContext_Open(void);
++ void DWriteContext_BeginDraw(DWriteContext *ctx);
++ void DWriteContext_BindDC(DWriteContext *ctx, HDC hdc, RECT *rect);
++ void DWriteContext_SetFont(DWriteContext *ctx, HFONT hFont);
++ void DWriteContext_DrawText(
++ DWriteContext *ctx,
++ HDC hdc,
++ const WCHAR* text,
++ int len,
++ int x,
++ int y,
++ int w,
++ int h,
++ int cellWidth,
++ COLORREF color);
++ void DWriteContext_EndDraw(DWriteContext *ctx);
++ void DWriteContext_Close(DWriteContext *ctx);
++
++ void DWriteContext_SetRenderingParams(
++ DWriteContext *ctx,
++ const DWriteRenderingParams *params);
++
++ DWriteRenderingParams *DWriteContext_GetRenderingParams(
++ DWriteContext *ctx,
++ DWriteRenderingParams *params);
++
++ #ifdef __cplusplus
++ }
++ #endif
++ #endif/*GUI_DWRITE_H*/
+*** ../vim-7.4.392/src/gui_w32.c 2013-08-04 16:15:37.000000000 +0200
+--- src/gui_w32.c 2014-08-06 14:45:43.495238916 +0200
+***************
+*** 25,30 ****
+--- 25,169 ----
+
+ #include "vim.h"
+
++ #if defined(FEAT_DIRECTX)
++ # include "gui_dwrite.h"
++ #endif
++
++ #if defined(FEAT_DIRECTX) || defined(PROTO)
++ static DWriteContext *s_dwc = NULL;
++ static int s_directx_enabled = 0;
++ static int s_directx_load_attempted = 0;
++ # define IS_ENABLE_DIRECTX() (s_directx_enabled && s_dwc != NULL)
++
++ int
++ directx_enabled(void)
++ {
++ if (s_dwc != NULL)
++ return 1;
++ else if (s_directx_load_attempted)
++ return 0;
++ /* load DirectX */
++ DWrite_Init();
++ s_directx_load_attempted = 1;
++ s_dwc = DWriteContext_Open();
++ return s_dwc != NULL ? 1 : 0;
++ }
++ #endif
++
++ #if defined(FEAT_RENDER_OPTIONS) || defined(PROTO)
++ int
++ gui_mch_set_rendering_options(char_u *s)
++ {
++ #ifdef FEAT_DIRECTX
++ int retval = FAIL;
++ char_u *p, *q;
++
++ int dx_enable = 0;
++ int dx_flags = 0;
++ float dx_gamma = 0.0f;
++ float dx_contrast = 0.0f;
++ float dx_level = 0.0f;
++ int dx_geom = 0;
++ int dx_renmode = 0;
++ int dx_taamode = 0;
++
++ /* parse string as rendering options. */
++ for (p = s; p != NULL && *p != NUL; )
++ {
++ char_u item[256];
++ char_u name[128];
++ char_u value[128];
++
++ copy_option_part(&p, item, sizeof(item), ",");
++ if (p == NULL)
++ break;
++ q = &item[0];
++ copy_option_part(&q, name, sizeof(name), ":");
++ if (q == NULL)
++ return FAIL;
++ copy_option_part(&q, value, sizeof(value), ":");
++
++ if (STRCMP(name, "type") == 0)
++ {
++ if (STRCMP(value, "directx") == 0)
++ dx_enable = 1;
++ else
++ return FAIL;
++ }
++ else if (STRCMP(name, "gamma") == 0)
++ {
++ dx_flags |= 1 << 0;
++ dx_gamma = (float)atof(value);
++ }
++ else if (STRCMP(name, "contrast") == 0)
++ {
++ dx_flags |= 1 << 1;
++ dx_contrast = (float)atof(value);
++ }
++ else if (STRCMP(name, "level") == 0)
++ {
++ dx_flags |= 1 << 2;
++ dx_level = (float)atof(value);
++ }
++ else if (STRCMP(name, "geom") == 0)
++ {
++ dx_flags |= 1 << 3;
++ dx_geom = atoi(value);
++ if (dx_geom < 0 || dx_geom > 2)
++ return FAIL;
++ }
++ else if (STRCMP(name, "renmode") == 0)
++ {
++ dx_flags |= 1 << 4;
++ dx_renmode = atoi(value);
++ if (dx_renmode < 0 || dx_renmode > 6)
++ return FAIL;
++ }
++ else if (STRCMP(name, "taamode") == 0)
++ {
++ dx_flags |= 1 << 5;
++ dx_taamode = atoi(value);
++ if (dx_taamode < 0 || dx_taamode > 3)
++ return FAIL;
++ }
++ else
++ return FAIL;
++ }
++
++ /* Enable DirectX/DirectWrite */
++ if (dx_enable)
++ {
++ if (!directx_enabled())
++ return FAIL;
++ DWriteContext_SetRenderingParams(s_dwc, NULL);
++ if (dx_flags)
++ {
++ DWriteRenderingParams param;
++ DWriteContext_GetRenderingParams(s_dwc, &param);
++ if (dx_flags & (1 << 0))
++ param.gamma = dx_gamma;
++ if (dx_flags & (1 << 1))
++ param.enhancedContrast = dx_contrast;
++ if (dx_flags & (1 << 2))
++ param.clearTypeLevel = dx_level;
++ if (dx_flags & (1 << 3))
++ param.pixelGeometry = dx_geom;
++ if (dx_flags & (1 << 4))
++ param.renderingMode = dx_renmode;
++ if (dx_flags & (1 << 5))
++ param.textAntialiasMode = dx_taamode;
++ DWriteContext_SetRenderingParams(s_dwc, &param);
++ }
++ }
++ s_directx_enabled = dx_enable;
++
++ return OK;
++ #else
++ return FAIL;
++ #endif
++ }
++ #endif
++
+ /*
+ * These are new in Windows ME/XP, only defined in recent compilers.
+ */
+***************
+*** 1624,1629 ****
+--- 1763,1773 ----
+ set_vim_var_nr(VV_WINDOWID, HandleToLong(s_hwnd));
+ #endif
+
++ #ifdef FEAT_RENDER_OPTIONS
++ if (p_rop)
++ (void)gui_mch_set_rendering_options(p_rop);
++ #endif
++
+ theend:
+ /* Display any pending error messages */
+ display_errors();
+***************
+*** 1695,1703 ****
+
+ /* compute the size of the outside of the window */
+ win_width = width + (GetSystemMetrics(SM_CXFRAME) +
+! GetSystemMetrics(SM_CXPADDEDBORDER)) * 2;
+ win_height = height + (GetSystemMetrics(SM_CYFRAME) +
+! GetSystemMetrics(SM_CXPADDEDBORDER)) * 2
+ + GetSystemMetrics(SM_CYCAPTION)
+ #ifdef FEAT_MENU
+ + gui_mswin_get_menu_height(FALSE)
+--- 1839,1847 ----
+
+ /* compute the size of the outside of the window */
+ win_width = width + (GetSystemMetrics(SM_CXFRAME) +
+! GetSystemMetrics(SM_CXPADDEDBORDER)) * 2;
+ win_height = height + (GetSystemMetrics(SM_CYFRAME) +
+! GetSystemMetrics(SM_CXPADDEDBORDER)) * 2
+ + GetSystemMetrics(SM_CYCAPTION)
+ #ifdef FEAT_MENU
+ + gui_mswin_get_menu_height(FALSE)
+***************
+*** 2239,2244 ****
+--- 2383,2391 ----
+ #endif
+ HPEN hpen, old_pen;
+ int y;
++ #ifdef FEAT_DIRECTX
++ int font_is_ttf_or_vector = 0;
++ #endif
+
+ #ifndef MSWIN16_FASTTEXT
+ /*
+***************
+*** 2326,2331 ****
+--- 2473,2492 ----
+ SetTextColor(s_hdc, gui.currFgColor);
+ SelectFont(s_hdc, gui.currFont);
+
++ #ifdef FEAT_DIRECTX
++ if (IS_ENABLE_DIRECTX())
++ {
++ TEXTMETRIC tm;
++
++ GetTextMetrics(s_hdc, &tm);
++ if (tm.tmPitchAndFamily & (TMPF_TRUETYPE | TMPF_VECTOR))
++ {
++ font_is_ttf_or_vector = 1;
++ DWriteContext_SetFont(s_dwc, (HFONT)gui.currFont);
++ }
++ }
++ #endif
++
+ if (pad_size != Columns || padding == NULL || padding[0] != gui.char_width)
+ {
+ vim_free(padding);
+***************
+*** 2360,2365 ****
+--- 2521,2534 ----
+ if (text[n] >= 0x80)
+ break;
+
++ #if defined(FEAT_DIRECTX)
++ /* Quick hack to enable DirectWrite. To use DirectWrite (antialias), it is
++ * required that unicode drawing routine, currently. So this forces it
++ * enabled. */
++ if (enc_utf8 && IS_ENABLE_DIRECTX())
++ n = 0; /* Keep n < len, to enter block for unicode. */
++ #endif
++
+ /* Check if the Unicode buffer exists and is big enough. Create it
+ * with the same length as the multi-byte string, the number of wide
+ * characters is always equal or smaller. */
+***************
+*** 2418,2425 ****
+ i += utfc_ptr2len_len(text + i, len - i);
+ ++clen;
+ }
+! ExtTextOutW(s_hdc, TEXT_X(col), TEXT_Y(row),
+! foptions, pcliprect, unicodebuf, wlen, unicodepdy);
+ len = cells; /* used for underlining */
+ }
+ else if ((enc_codepage > 0 && (int)GetACP() != enc_codepage) || enc_latin9)
+--- 2587,2603 ----
+ i += utfc_ptr2len_len(text + i, len - i);
+ ++clen;
+ }
+! #if defined(FEAT_DIRECTX)
+! if (IS_ENABLE_DIRECTX() && font_is_ttf_or_vector)
+! {
+! DWriteContext_DrawText(s_dwc, s_hdc, unicodebuf, wlen,
+! TEXT_X(col), TEXT_Y(row), FILL_X(cells), FILL_Y(1),
+! gui.char_width, gui.currFgColor);
+! }
+! else
+! #endif
+! ExtTextOutW(s_hdc, TEXT_X(col), TEXT_Y(row),
+! foptions, pcliprect, unicodebuf, wlen, unicodepdy);
+ len = cells; /* used for underlining */
+ }
+ else if ((enc_codepage > 0 && (int)GetACP() != enc_codepage) || enc_latin9)
+***************
+*** 2549,2562 ****
+
+ *screen_w = workarea_rect.right - workarea_rect.left
+ - (GetSystemMetrics(SM_CXFRAME) +
+! GetSystemMetrics(SM_CXPADDEDBORDER)) * 2;
+
+ /* FIXME: dirty trick: Because the gui_get_base_height() doesn't include
+ * the menubar for MSwin, we subtract it from the screen height, so that
+ * the window size can be made to fit on the screen. */
+ *screen_h = workarea_rect.bottom - workarea_rect.top
+ - (GetSystemMetrics(SM_CYFRAME) +
+! GetSystemMetrics(SM_CXPADDEDBORDER)) * 2
+ - GetSystemMetrics(SM_CYCAPTION)
+ #ifdef FEAT_MENU
+ - gui_mswin_get_menu_height(FALSE)
+--- 2727,2740 ----
+
+ *screen_w = workarea_rect.right - workarea_rect.left
+ - (GetSystemMetrics(SM_CXFRAME) +
+! GetSystemMetrics(SM_CXPADDEDBORDER)) * 2;
+
+ /* FIXME: dirty trick: Because the gui_get_base_height() doesn't include
+ * the menubar for MSwin, we subtract it from the screen height, so that
+ * the window size can be made to fit on the screen. */
+ *screen_h = workarea_rect.bottom - workarea_rect.top
+ - (GetSystemMetrics(SM_CYFRAME) +
+! GetSystemMetrics(SM_CXPADDEDBORDER)) * 2
+ - GetSystemMetrics(SM_CYCAPTION)
+ #ifdef FEAT_MENU
+ - gui_mswin_get_menu_height(FALSE)
+***************
+*** 3188,3200 ****
+ GetWindowRect(s_hwnd, &rect);
+ maxDialogWidth = rect.right - rect.left
+ - (GetSystemMetrics(SM_CXFRAME) +
+! GetSystemMetrics(SM_CXPADDEDBORDER)) * 2;
+ if (maxDialogWidth < DLG_MIN_MAX_WIDTH)
+ maxDialogWidth = DLG_MIN_MAX_WIDTH;
+
+ maxDialogHeight = rect.bottom - rect.top
+ - (GetSystemMetrics(SM_CYFRAME) +
+! GetSystemMetrics(SM_CXPADDEDBORDER)) * 4
+ - GetSystemMetrics(SM_CYCAPTION);
+ if (maxDialogHeight < DLG_MIN_MAX_HEIGHT)
+ maxDialogHeight = DLG_MIN_MAX_HEIGHT;
+--- 3366,3378 ----
+ GetWindowRect(s_hwnd, &rect);
+ maxDialogWidth = rect.right - rect.left
+ - (GetSystemMetrics(SM_CXFRAME) +
+! GetSystemMetrics(SM_CXPADDEDBORDER)) * 2;
+ if (maxDialogWidth < DLG_MIN_MAX_WIDTH)
+ maxDialogWidth = DLG_MIN_MAX_WIDTH;
+
+ maxDialogHeight = rect.bottom - rect.top
+ - (GetSystemMetrics(SM_CYFRAME) +
+! GetSystemMetrics(SM_CXPADDEDBORDER)) * 4
+ - GetSystemMetrics(SM_CYCAPTION);
+ if (maxDialogHeight < DLG_MIN_MAX_HEIGHT)
+ maxDialogHeight = DLG_MIN_MAX_HEIGHT;
+***************
+*** 3351,3361 ****
+ /* Restrict the size to a maximum. Causes a scrollbar to show up. */
+ if (dlgheight > maxDialogHeight)
+ {
+! msgheight = msgheight - (dlgheight - maxDialogHeight);
+! dlgheight = maxDialogHeight;
+! scroll_flag = WS_VSCROLL;
+! /* Make sure scrollbar doesn't appear in the middle of the dialog */
+! messageWidth = dlgwidth - DLG_ICON_WIDTH - 3 * dlgPaddingX;
+ }
+
+ add_word(PixelToDialogY(dlgheight));
+--- 3529,3539 ----
+ /* Restrict the size to a maximum. Causes a scrollbar to show up. */
+ if (dlgheight > maxDialogHeight)
+ {
+! msgheight = msgheight - (dlgheight - maxDialogHeight);
+! dlgheight = maxDialogHeight;
+! scroll_flag = WS_VSCROLL;
+! /* Make sure scrollbar doesn't appear in the middle of the dialog */
+! messageWidth = dlgwidth - DLG_ICON_WIDTH - 3 * dlgPaddingX;
+ }
+
+ add_word(PixelToDialogY(dlgheight));
+*** ../vim-7.4.392/src/gui_w48.c 2014-03-23 15:12:29.923264336 +0100
+--- src/gui_w48.c 2014-08-06 14:21:57.463249166 +0200
+***************
+*** 2785,2790 ****
+--- 2785,2794 ----
+
+ out_flush(); /* make sure all output has been processed */
+ (void)BeginPaint(hwnd, &ps);
++ #if defined(FEAT_DIRECTX)
++ if (IS_ENABLE_DIRECTX())
++ DWriteContext_BeginDraw(s_dwc);
++ #endif
+
+ #ifdef FEAT_MBYTE
+ /* prevent multi-byte characters from misprinting on an invalid
+***************
+*** 2800,2808 ****
+--- 2804,2823 ----
+ #endif
+
+ if (!IsRectEmpty(&ps.rcPaint))
++ {
++ #if defined(FEAT_DIRECTX)
++ if (IS_ENABLE_DIRECTX())
++ DWriteContext_BindDC(s_dwc, s_hdc, &ps.rcPaint);
++ #endif
+ gui_redraw(ps.rcPaint.left, ps.rcPaint.top,
+ ps.rcPaint.right - ps.rcPaint.left + 1,
+ ps.rcPaint.bottom - ps.rcPaint.top + 1);
++ }
++
++ #if defined(FEAT_DIRECTX)
++ if (IS_ENABLE_DIRECTX())
++ DWriteContext_EndDraw(s_dwc);
++ #endif
+ EndPaint(hwnd, &ps);
+ }
+ }
+***************
+*** 3043,3048 ****
+--- 3058,3069 ----
+ void
+ gui_mch_exit(int rc)
+ {
++ #if defined(FEAT_DIRECTX)
++ DWriteContext_Close(s_dwc);
++ DWrite_Final();
++ s_dwc = NULL;
++ #endif
++
+ ReleaseDC(s_textArea, s_hdc);
+ DeleteObject(s_brush);
+
+*** ../vim-7.4.392/src/option.c 2014-06-25 14:44:04.458358774 +0200
+--- src/option.c 2014-08-06 14:33:24.503244228 +0200
+***************
+*** 2124,2129 ****
+--- 2124,2138 ----
+ {"remap", NULL, P_BOOL|P_VI_DEF,
+ (char_u *)&p_remap, PV_NONE,
+ {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
++ {"renderoptions", "rop", P_STRING|P_COMMA|P_RCLR|P_VI_DEF,
++ #ifdef FEAT_RENDER_OPTIONS
++ (char_u *)&p_rop, PV_NONE,
++ {(char_u *)"", (char_u *)0L}
++ #else
++ (char_u *)NULL, PV_NONE,
++ {(char_u *)NULL, (char_u *)0L}
++ #endif
++ SCRIPTID_INIT},
+ {"report", NULL, P_NUM|P_VI_DEF,
+ (char_u *)&p_report, PV_NONE,
+ {(char_u *)2L, (char_u *)0L} SCRIPTID_INIT},
+***************
+*** 6999,7004 ****
+--- 7008,7021 ----
+ }
+ #endif
+
++ #if defined(FEAT_RENDER_OPTIONS)
++ else if (varp == &p_rop && gui.in_use)
++ {
++ if (!gui_mch_set_rendering_options(p_rop))
++ errmsg = e_invarg;
++ }
++ #endif
++
+ /* Options that are a list of flags. */
+ else
+ {
+*** ../vim-7.4.392/src/option.h 2014-06-25 14:39:35.110348584 +0200
+--- src/option.h 2014-08-06 14:23:25.419248534 +0200
+***************
+*** 655,660 ****
+--- 655,663 ----
+ #endif
+ EXTERN int p_remap; /* 'remap' */
+ EXTERN long p_re; /* 'regexpengine' */
++ #ifdef FEAT_RENDER_OPTIONS
++ EXTERN char_u *p_rop; /* 'renderoptions' */
++ #endif
+ EXTERN long p_report; /* 'report' */
+ #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+ EXTERN long p_pvh; /* 'previewheight' */
+*** ../vim-7.4.392/src/version.c 2014-08-06 13:36:56.091268582 +0200
+--- src/version.c 2014-08-06 14:29:39.183245847 +0200
+***************
+*** 189,194 ****
+--- 189,201 ----
+ #else
+ "-digraphs",
+ #endif
++ #ifdef FEAT_GUI_W32
++ # ifdef FEAT_DIRECTX
++ "+directx",
++ # else
++ "-directx",
++ # endif
++ #endif
+ #ifdef FEAT_DND
+ "+dnd",
+ #else
+*** ../vim-7.4.392/src/vim.h 2014-04-02 19:54:58.275599459 +0200
+--- src/vim.h 2014-08-06 14:21:57.467249166 +0200
+***************
+*** 134,139 ****
+--- 134,146 ----
+ # endif
+ #endif
+
++ /* Check support for rendering options */
++ #ifdef FEAT_GUI
++ # if defined(FEAT_DIRECTX)
++ # define FEAT_RENDER_OPTIONS
++ # endif
++ #endif
++
+ /* Visual Studio 2005 has 'deprecated' many of the standard CRT functions */
+ #if _MSC_VER >= 1400
+ # define _CRT_SECURE_NO_DEPRECATE
+*** ../vim-7.4.392/src/proto/gui_w32.pro 2013-08-10 13:37:36.000000000 +0200
+--- src/proto/gui_w32.pro 2014-08-06 14:33:04.155244374 +0200
+***************
+*** 1,4 ****
+--- 1,6 ----
+ /* gui_w32.c */
++ int directx_enabled __ARGS((void));
++ int gui_mch_set_rendering_options __ARGS((char_u *s));
+ void gui_mch_set_blinking __ARGS((long wait, long on, long off));
+ void gui_mch_stop_blink __ARGS((void));
+ void gui_mch_start_blink __ARGS((void));
+*** ../vim-7.4.392/src/version.c 2014-08-06 13:36:56.091268582 +0200
+--- src/version.c 2014-08-06 14:29:39.183245847 +0200
+***************
+*** 736,737 ****
+--- 743,746 ----
+ { /* Add new patch number below this line */
++ /**/
++ 393,
+ /**/
+
+--
+A consultant is a person who takes your money and annoys your employees while
+tirelessly searching for the best way to extend the consulting contract.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.394 b/patches/source/vim/patches/7.4.394
new file mode 100644
index 000000000..fbe199c94
--- /dev/null
+++ b/patches/source/vim/patches/7.4.394
@@ -0,0 +1,56 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.394
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.394 (after 7.4.393)
+Problem: When using DirectX last italic character is incomplete.
+Solution: Add one to the number of cells. (Ken Takata)
+Files: src/gui_w32.c
+
+
+*** ../vim-7.4.393/src/gui_w32.c 2014-08-06 14:52:05.043236174 +0200
+--- src/gui_w32.c 2014-08-06 16:45:56.927187071 +0200
+***************
+*** 2590,2597 ****
+ #if defined(FEAT_DIRECTX)
+ if (IS_ENABLE_DIRECTX() && font_is_ttf_or_vector)
+ {
+ DWriteContext_DrawText(s_dwc, s_hdc, unicodebuf, wlen,
+! TEXT_X(col), TEXT_Y(row), FILL_X(cells), FILL_Y(1),
+ gui.char_width, gui.currFgColor);
+ }
+ else
+--- 2590,2598 ----
+ #if defined(FEAT_DIRECTX)
+ if (IS_ENABLE_DIRECTX() && font_is_ttf_or_vector)
+ {
++ /* Add one to "cells" for italics. */
+ DWriteContext_DrawText(s_dwc, s_hdc, unicodebuf, wlen,
+! TEXT_X(col), TEXT_Y(row), FILL_X(cells + 1), FILL_Y(1),
+ gui.char_width, gui.currFgColor);
+ }
+ else
+*** ../vim-7.4.393/src/version.c 2014-08-06 14:52:05.047236174 +0200
+--- src/version.c 2014-08-06 16:46:54.279186658 +0200
+***************
+*** 743,744 ****
+--- 743,746 ----
+ { /* Add new patch number below this line */
++ /**/
++ 394,
+ /**/
+
+--
+The average life of an organization chart is six months. You can safely
+ignore any order from your boss that would take six months to complete.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.395 b/patches/source/vim/patches/7.4.395
new file mode 100644
index 000000000..943b44e9e
--- /dev/null
+++ b/patches/source/vim/patches/7.4.395
@@ -0,0 +1,99 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.395
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.395 (after 7.4.355)
+Problem: C indent is wrong below an if with wrapped condition followed by
+ curly braces. (Trevor Powell)
+Solution: Make a copy of tryposBrace.
+Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok
+
+
+*** ../vim-7.4.394/src/misc1.c 2014-08-06 12:49:06.711289205 +0200
+--- src/misc1.c 2014-08-06 17:35:45.003165594 +0200
+***************
+*** 6995,7000 ****
+--- 6995,7001 ----
+ char_u *linecopy;
+ pos_T *trypos;
+ pos_T *tryposBrace = NULL;
++ pos_T tryposBraceCopy;
+ pos_T our_paren_pos;
+ char_u *start;
+ int start_brace;
+***************
+*** 7532,7538 ****
+--- 7533,7543 ----
+ /*
+ * We are inside braces, there is a { before this line at the position
+ * stored in tryposBrace.
++ * Make a copy of tryposBrace, it may point to pos_copy inside
++ * find_start_brace(), which may be changed somewhere.
+ */
++ tryposBraceCopy = *tryposBrace;
++ tryposBrace = &tryposBraceCopy;
+ trypos = tryposBrace;
+ ourscope = trypos->lnum;
+ start = ml_get(ourscope);
+*** ../vim-7.4.394/src/testdir/test3.in 2014-07-03 22:57:51.299862927 +0200
+--- src/testdir/test3.in 2014-08-06 17:19:41.099172522 +0200
+***************
+*** 464,469 ****
+--- 464,477 ----
+ asdfasdf
+ }
+
++ {
++ for ( int i = 0;
++ i < 10; i++ )
++ {
++ }
++ i = 0;
++ }
++
+ class bob
+ {
+ int foo() {return 1;}
+*** ../vim-7.4.394/src/testdir/test3.ok 2014-07-03 22:57:51.299862927 +0200
+--- src/testdir/test3.ok 2014-08-06 17:20:11.867172301 +0200
+***************
+*** 452,457 ****
+--- 452,465 ----
+ asdfasdf
+ }
+
++ {
++ for ( int i = 0;
++ i < 10; i++ )
++ {
++ }
++ i = 0;
++ }
++
+ class bob
+ {
+ int foo() {return 1;}
+*** ../vim-7.4.394/src/version.c 2014-08-06 16:49:51.203185387 +0200
+--- src/version.c 2014-08-06 17:43:44.243162150 +0200
+***************
+*** 743,744 ****
+--- 743,746 ----
+ { /* Add new patch number below this line */
++ /**/
++ 395,
+ /**/
+
+--
+An operatingsystem is just a name you give to the rest of bloating
+idiosyncratic machine-based-features you left out of your editor.
+ (author unknown)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.396 b/patches/source/vim/patches/7.4.396
new file mode 100644
index 000000000..47b9a0c69
--- /dev/null
+++ b/patches/source/vim/patches/7.4.396
@@ -0,0 +1,291 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.396
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.396
+Problem: When 'clipboard' is "unnamed", :g/pat/d is very slow. (Praful)
+Solution: Only set the clipboard after the last delete. (Christian Brabandt)
+Files: src/ex_cmds.c, src/ex_cmds2.c, src/ex_docmd.c, src/globals.h,
+ src/ops.c, src/proto/ui.pro, src/ui.c
+
+
+*** ../vim-7.4.395/src/ex_cmds.c 2014-07-09 21:17:59.755550204 +0200
+--- src/ex_cmds.c 2014-08-06 18:06:37.931152276 +0200
+***************
+*** 5514,5520 ****
+--- 5514,5528 ----
+ smsg((char_u *)_("Pattern not found: %s"), pat);
+ }
+ else
++ {
++ #ifdef FEAT_CLIPBOARD
++ start_global_changes();
++ #endif
+ global_exe(cmd);
++ #ifdef FEAT_CLIPBOARD
++ end_global_changes();
++ #endif
++ }
+
+ ml_clearmarked(); /* clear rest of the marks */
+ vim_regfree(regmatch.regprog);
+*** ../vim-7.4.395/src/ex_cmds2.c 2014-04-05 19:44:36.903160723 +0200
+--- src/ex_cmds2.c 2014-08-06 18:05:07.563152926 +0200
+***************
+*** 2464,2469 ****
+--- 2464,2472 ----
+ * great speed improvement. */
+ save_ei = au_event_disable(",Syntax");
+ #endif
++ #ifdef FEAT_CLIPBOARD
++ start_global_changes();
++ #endif
+
+ if (eap->cmdidx == CMD_windo
+ || eap->cmdidx == CMD_tabdo
+***************
+*** 2591,2596 ****
+--- 2594,2602 ----
+ curbuf->b_fname, TRUE, curbuf);
+ }
+ #endif
++ #ifdef FEAT_CLIPBOARD
++ end_global_changes();
++ #endif
+ }
+
+ /*
+***************
+*** 2750,2757 ****
+ * used.
+ * Returns OK when at least one match found, FAIL otherwise.
+ *
+! * If "name" is NULL calls callback for each entry in runtimepath. Cookie is
+! * passed by reference in this case, setting it to NULL indicates that callback
+ * has done its job.
+ */
+ int
+--- 2756,2763 ----
+ * used.
+ * Returns OK when at least one match found, FAIL otherwise.
+ *
+! * If "name" is NULL calls callback for each entry in runtimepath. Cookie is
+! * passed by reference in this case, setting it to NULL indicates that callback
+ * has done its job.
+ */
+ int
+*** ../vim-7.4.395/src/ex_docmd.c 2014-06-17 17:48:21.780628008 +0200
+--- src/ex_docmd.c 2014-08-06 18:05:07.563152926 +0200
+***************
+*** 11534,11539 ****
+--- 11534,11543 ----
+ {
+ linenr_T lnum;
+
++ #ifdef FEAT_CLIPBOARD
++ start_global_changes();
++ #endif
++
+ /* First set the marks for all lines closed/open. */
+ for (lnum = eap->line1; lnum <= eap->line2; ++lnum)
+ if (hasFolding(lnum, NULL, NULL) == (eap->cmdidx == CMD_folddoclosed))
+***************
+*** 11542,11546 ****
+--- 11546,11553 ----
+ /* Execute the command on the marked lines. */
+ global_exe(eap->arg);
+ ml_clearmarked(); /* clear rest of the marks */
++ #ifdef FEAT_CLIPBOARD
++ end_global_changes();
++ #endif
+ }
+ #endif
+*** ../vim-7.4.395/src/globals.h 2014-07-30 17:21:53.815518506 +0200
+--- src/globals.h 2014-08-06 18:05:07.563152926 +0200
+***************
+*** 533,538 ****
+--- 533,540 ----
+ EXTERN int clip_autoselectml INIT(= FALSE);
+ EXTERN int clip_html INIT(= FALSE);
+ EXTERN regprog_T *clip_exclude_prog INIT(= NULL);
++ EXTERN int clip_did_set_selection INIT(= TRUE);
++ EXTERN int clip_unnamed_saved INIT(= 0);
+ #endif
+
+ /*
+*** ../vim-7.4.395/src/ops.c 2014-06-25 14:39:35.106348584 +0200
+--- src/ops.c 2014-08-06 18:05:07.563152926 +0200
+***************
+*** 1597,1605 ****
+ {
+ /* If no reg. specified, and "unnamed" or "unnamedplus" is in 'clipboard',
+ * use '*' or '+' reg, respectively. "unnamedplus" prevails. */
+! if (*rp == 0 && clip_unnamed != 0)
+! *rp = ((clip_unnamed & CLIP_UNNAMED_PLUS) && clip_plus.available)
+ ? '+' : '*';
+ if (!clip_star.available && *rp == '*')
+ *rp = 0;
+ if (!clip_plus.available && *rp == '+')
+--- 1597,1611 ----
+ {
+ /* If no reg. specified, and "unnamed" or "unnamedplus" is in 'clipboard',
+ * use '*' or '+' reg, respectively. "unnamedplus" prevails. */
+! if (*rp == 0 && (clip_unnamed != 0 || clip_unnamed_saved != 0))
+! {
+! if (clip_unnamed != 0)
+! *rp = ((clip_unnamed & CLIP_UNNAMED_PLUS) && clip_plus.available)
+! ? '+' : '*';
+! else
+! *rp = ((clip_unnamed_saved & CLIP_UNNAMED_PLUS) && clip_plus.available)
+ ? '+' : '*';
++ }
+ if (!clip_star.available && *rp == '*')
+ *rp = 0;
+ if (!clip_plus.available && *rp == '+')
+***************
+*** 3203,3209 ****
+ if (clip_star.available
+ && (curr == &(y_regs[STAR_REGISTER])
+ || (!deleting && oap->regname == 0
+! && (clip_unnamed & CLIP_UNNAMED))))
+ {
+ if (curr != &(y_regs[STAR_REGISTER]))
+ /* Copy the text from register 0 to the clipboard register. */
+--- 3209,3215 ----
+ if (clip_star.available
+ && (curr == &(y_regs[STAR_REGISTER])
+ || (!deleting && oap->regname == 0
+! && ((clip_unnamed | clip_unnamed_saved) & CLIP_UNNAMED))))
+ {
+ if (curr != &(y_regs[STAR_REGISTER]))
+ /* Copy the text from register 0 to the clipboard register. */
+***************
+*** 3224,3230 ****
+ if (clip_plus.available
+ && (curr == &(y_regs[PLUS_REGISTER])
+ || (!deleting && oap->regname == 0
+! && (clip_unnamed & CLIP_UNNAMED_PLUS))))
+ {
+ if (curr != &(y_regs[PLUS_REGISTER]))
+ /* Copy the text from register 0 to the clipboard register. */
+--- 3230,3237 ----
+ if (clip_plus.available
+ && (curr == &(y_regs[PLUS_REGISTER])
+ || (!deleting && oap->regname == 0
+! && ((clip_unnamed | clip_unnamed_saved) &
+! CLIP_UNNAMED_PLUS))))
+ {
+ if (curr != &(y_regs[PLUS_REGISTER]))
+ /* Copy the text from register 0 to the clipboard register. */
+*** ../vim-7.4.395/src/proto/ui.pro 2013-08-10 13:37:29.000000000 +0200
+--- src/proto/ui.pro 2014-08-06 18:05:07.563152926 +0200
+***************
+*** 14,19 ****
+--- 14,21 ----
+ void clip_update_selection __ARGS((VimClipboard *clip));
+ void clip_own_selection __ARGS((VimClipboard *cbd));
+ void clip_lose_selection __ARGS((VimClipboard *cbd));
++ void start_global_changes __ARGS((void));
++ void end_global_changes __ARGS((void));
+ void clip_auto_select __ARGS((void));
+ int clip_isautosel_star __ARGS((void));
+ int clip_isautosel_plus __ARGS((void));
+*** ../vim-7.4.395/src/ui.c 2014-06-25 14:39:35.114348584 +0200
+--- src/ui.c 2014-08-06 18:13:13.475149434 +0200
+***************
+*** 558,563 ****
+--- 558,608 ----
+ }
+
+ /*
++ * Save and restore clip_unnamed before doing possibly many changes. This
++ * prevents accessing the clipboard very often which might slow down Vim
++ * considerably.
++ */
++
++ /*
++ * Save clip_unnamed and reset it.
++ */
++ void
++ start_global_changes()
++ {
++ clip_unnamed_saved = clip_unnamed;
++
++ if (clip_did_set_selection)
++ {
++ clip_unnamed = FALSE;
++ clip_did_set_selection = FALSE;
++ }
++ }
++
++ /*
++ * Restore clip_unnamed and set the selection when needed.
++ */
++ void
++ end_global_changes()
++ {
++ if (!clip_did_set_selection)
++ {
++ clip_did_set_selection = TRUE;
++ clip_unnamed = clip_unnamed_saved;
++ if (clip_unnamed & CLIP_UNNAMED)
++ {
++ clip_own_selection(&clip_star);
++ clip_gen_set_selection(&clip_star);
++ }
++ if (clip_unnamed & CLIP_UNNAMED_PLUS)
++ {
++ clip_own_selection(&clip_plus);
++ clip_gen_set_selection(&clip_plus);
++ }
++ }
++ clip_unnamed_saved = FALSE;
++ }
++
++ /*
+ * Called when Visual mode is ended: update the selection.
+ */
+ void
+***************
+*** 1428,1433 ****
+--- 1473,1487 ----
+ clip_gen_set_selection(cbd)
+ VimClipboard *cbd;
+ {
++ if (!clip_did_set_selection)
++ {
++ /* Updating postponed, so that accessing the system clipboard won't
++ * hang Vim when accessing it many times (e.g. on a :g comand). */
++ if (cbd == &clip_plus && (clip_unnamed_saved & CLIP_UNNAMED_PLUS))
++ return;
++ else if (cbd == &clip_star && (clip_unnamed_saved & CLIP_UNNAMED))
++ return;
++ }
+ #ifdef FEAT_XCLIPBOARD
+ # ifdef FEAT_GUI
+ if (gui.in_use)
+*** ../vim-7.4.395/src/version.c 2014-08-06 17:44:09.867161966 +0200
+--- src/version.c 2014-08-06 18:04:47.359153071 +0200
+***************
+*** 743,744 ****
+--- 743,746 ----
+ { /* Add new patch number below this line */
++ /**/
++ 396,
+ /**/
+
+--
+You have heard the saying that if you put a thousand monkeys in a room with a
+thousand typewriters and waited long enough, eventually you would have a room
+full of dead monkeys.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.397 b/patches/source/vim/patches/7.4.397
new file mode 100644
index 000000000..4d70ca635
--- /dev/null
+++ b/patches/source/vim/patches/7.4.397
@@ -0,0 +1,150 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.397
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.397
+Problem: Matchparen only uses the topmost syntax item.
+Solution: Go through the syntax stack to find items. (James McCoy)
+ Also use getcurpos() when possible.
+Files: runtime/plugin/matchparen.vim
+
+
+*** ../vim-7.4.396/runtime/plugin/matchparen.vim 2014-06-17 17:48:21.772628007 +0200
+--- runtime/plugin/matchparen.vim 2014-08-06 19:02:04.967128364 +0200
+***************
+*** 1,6 ****
+ " Vim plugin for showing matching parens
+ " Maintainer: Bram Moolenaar <Bram@vim.org>
+! " Last Change: 2014 Jun 17
+
+ " Exit quickly when:
+ " - this plugin was already loaded (or disabled)
+--- 1,6 ----
+ " Vim plugin for showing matching parens
+ " Maintainer: Bram Moolenaar <Bram@vim.org>
+! " Last Change: 2014 Jul 19
+
+ " Exit quickly when:
+ " - this plugin was already loaded (or disabled)
+***************
+*** 54,67 ****
+ let c_col = col('.')
+ let before = 0
+
+! let c = getline(c_lnum)[c_col - 1]
+ let plist = split(&matchpairs, '.\zs[:,]')
+ let i = index(plist, c)
+ if i < 0
+ " not found, in Insert mode try character before the cursor
+ if c_col > 1 && (mode() == 'i' || mode() == 'R')
+ let before = 1
+! let c = getline(c_lnum)[c_col - 2]
+ let i = index(plist, c)
+ endif
+ if i < 0
+--- 54,68 ----
+ let c_col = col('.')
+ let before = 0
+
+! let text = getline(c_lnum)
+! let c = text[c_col - 1]
+ let plist = split(&matchpairs, '.\zs[:,]')
+ let i = index(plist, c)
+ if i < 0
+ " not found, in Insert mode try character before the cursor
+ if c_col > 1 && (mode() == 'i' || mode() == 'R')
+ let before = 1
+! let c = text[c_col - 2]
+ let i = index(plist, c)
+ endif
+ if i < 0
+***************
+*** 87,100 ****
+ " Find the match. When it was just before the cursor move it there for a
+ " moment.
+ if before > 0
+! let save_cursor = winsaveview()
+ call cursor(c_lnum, c_col - before)
+ endif
+
+! " When not in a string or comment ignore matches inside them.
+ " We match "escape" for special items, such as lispEscapeSpecial.
+! let s_skip ='synIDattr(synID(line("."), col("."), 0), "name") ' .
+! \ '=~? "string\\|character\\|singlequote\\|escape\\|comment"'
+ execute 'if' s_skip '| let s_skip = 0 | endif'
+
+ " Limit the search to lines visible in the window.
+--- 88,114 ----
+ " Find the match. When it was just before the cursor move it there for a
+ " moment.
+ if before > 0
+! let has_getcurpos = exists("*getcurpos")
+! if has_getcurpos
+! " getcurpos() is more efficient but doesn't exist before 7.4.313.
+! let save_cursor = getcurpos()
+! else
+! let save_cursor = winsaveview()
+! endif
+ call cursor(c_lnum, c_col - before)
+ endif
+
+! " Build an expression that detects whether the current cursor position is in
+! " certain syntax types (string, comment, etc.), for use as searchpairpos()'s
+! " skip argument.
+ " We match "escape" for special items, such as lispEscapeSpecial.
+! let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' .
+! \ '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))'
+! " If executing the expression determines that the cursor is currently in
+! " one of the syntax types, then we want searchpairpos() to find the pair
+! " within those syntax types (i.e., not skip). Otherwise, the cursor is
+! " outside of the syntax types and s_skip should keep its value so we skip any
+! " matching pair inside the syntax types.
+ execute 'if' s_skip '| let s_skip = 0 | endif'
+
+ " Limit the search to lines visible in the window.
+***************
+*** 147,153 ****
+ endtry
+
+ if before > 0
+! call winrestview(save_cursor)
+ endif
+
+ " If a match is found setup match highlighting.
+--- 161,171 ----
+ endtry
+
+ if before > 0
+! if has_getcurpos
+! call setpos('.', save_cursor)
+! else
+! call winrestview(save_cursor)
+! endif
+ endif
+
+ " If a match is found setup match highlighting.
+*** ../vim-7.4.396/src/version.c 2014-08-06 18:17:03.475147780 +0200
+--- src/version.c 2014-08-06 19:06:44.627126354 +0200
+***************
+*** 743,744 ****
+--- 743,746 ----
+ { /* Add new patch number below this line */
++ /**/
++ 397,
+ /**/
+
+--
+Often you're less important than your furniture. If you think about it, you
+can get fired but your furniture stays behind, gainfully employed at the
+company that didn't need _you_ anymore.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.398 b/patches/source/vim/patches/7.4.398
new file mode 100644
index 000000000..e710505e5
--- /dev/null
+++ b/patches/source/vim/patches/7.4.398
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.398
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.398 (after 7.4.393)
+Problem: Gcc error for the argument of InterlockedIncrement() and
+ InterlockedDecrement(). (Axel Bender)
+Solution: Remove "unsigned" from the cRefCount_ declaration.
+Files: src/gui_dwrite.cpp
+
+
+*** ../vim-7.4.397/src/gui_dwrite.cpp 2014-08-06 14:52:05.043236174 +0200
+--- src/gui_dwrite.cpp 2014-08-06 18:39:01.611138306 +0200
+***************
+*** 377,383 ****
+ }
+
+ private:
+! unsigned long cRefCount_;
+ IDWriteBitmapRenderTarget* pRenderTarget_;
+ IDWriteRenderingParams* pRenderingParams_;
+ };
+--- 377,383 ----
+ }
+
+ private:
+! long cRefCount_;
+ IDWriteBitmapRenderTarget* pRenderTarget_;
+ IDWriteRenderingParams* pRenderingParams_;
+ };
+*** ../vim-7.4.397/src/version.c 2014-08-06 19:08:33.563125571 +0200
+--- src/version.c 2014-08-07 13:54:40.162639943 +0200
+***************
+*** 743,744 ****
+--- 743,746 ----
+ { /* Add new patch number below this line */
++ /**/
++ 398,
+ /**/
+
+--
+A)bort, R)etry, D)o it right this time
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/patches/7.4.399 b/patches/source/vim/patches/7.4.399
new file mode 100644
index 000000000..d50b610de
--- /dev/null
+++ b/patches/source/vim/patches/7.4.399
@@ -0,0 +1,5059 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.399
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.399
+Problem: Encryption implementation is messy. Blowfish encryption has a
+ weakness.
+Solution: Refactor the encryption, store the state in an allocated struct
+ instead of using a save/restore mechanism. Introduce the
+ "blowfish2" method, which does not have the weakness and encrypts
+ the whole undo file. (largely by David Leadbeater)
+Files: runtime/doc/editing.txt, runtime/doc/options.txt, src/Makefile,
+ src/blowfish.c, src/crypt.c, src/crypt_zip.c, src/ex_docmd.c,
+ src/fileio.c, src/globals.h, src/main.c, src/memline.c,
+ src/misc2.c, src/option.c, src/proto.h, src/proto/blowfish.pro,
+ src/proto/crypt.pro, src/proto/crypt_zip.pro,
+ src/proto/fileio.pro, src/proto/misc2.pro, src/structs.h,
+ src/undo.c, src/testdir/test71.in, src/testdir/test71.ok,
+ src/testdir/test71a.in, src/testdir/test72.in,
+ src/testdir/test72.ok
+
+
+*** ../vim-7.4.398/runtime/doc/editing.txt 2013-08-10 13:24:53.000000000 +0200
+--- runtime/doc/editing.txt 2014-08-09 15:35:40.101354406 +0200
+***************
+*** 1361,1371 ****
+ {only available when compiled with the |+cryptv| feature} *E833*
+
+ The text in the swap file and the undo file is also encrypted. *E843*
+
+ Note: The text in memory is not encrypted. A system administrator may be able
+ to see your text while you are editing it. When filtering text with
+! ":!filter" or using ":w !command" the text is not encrypted, this may reveal
+! it to others. The 'viminfo' file is not encrypted.
+
+ WARNING: If you make a typo when entering the key and then write the file and
+ exit, the text will be lost!
+--- 1362,1382 ----
+ {only available when compiled with the |+cryptv| feature} *E833*
+
+ The text in the swap file and the undo file is also encrypted. *E843*
++ However, this is done block-by-block and may reduce the time needed to crack a
++ password. You can disable the swap file, but then a crash will cause you to
++ lose your work. The undo file can be disabled without much disadvantage. >
++ :set noundofile
++ :noswapfile edit secrets
+
+ Note: The text in memory is not encrypted. A system administrator may be able
+ to see your text while you are editing it. When filtering text with
+! ":!filter" or using ":w !command" the text is also not encrypted, this may
+! reveal it to others. The 'viminfo' file is not encrypted.
+!
+! You could do this to edit very secret text: >
+! :set noundofile viminfo=
+! :noswapfile edit secrets.txt
+! Keep in mind that without a swap file you risk loosing your work in a crash.
+
+ WARNING: If you make a typo when entering the key and then write the file and
+ exit, the text will be lost!
+***************
+*** 1392,1409 ****
+ :set key=
+
+ You can use the 'cryptmethod' option to select the type of encryption, use one
+! of these two: >
+! :setlocal cm=zip " weak method, backwards compatible
+! :setlocal cm=blowfish " strong method
+ Do this before writing the file. When reading an encrypted file it will be
+ set automatically to the method used when that file was written. You can
+ change 'cryptmethod' before writing that file to change the method.
+ To set the default method, used for new files, use one of these in your
+ |vimrc| file: >
+ set cm=zip
+! set cm=blowfish
+ The message given for reading and writing a file will show "[crypted]" when
+! using zip, "[blowfish]" when using blowfish.
+
+ When writing an undo file, the same key and method will be used for the text
+ in the undo file. |persistent-undo|.
+--- 1403,1427 ----
+ :set key=
+
+ You can use the 'cryptmethod' option to select the type of encryption, use one
+! of these: >
+! :setlocal cm=zip " weak method, backwards compatible
+! :setlocal cm=blowfish " method with flaws
+! :setlocal cm=blowfish2 " medium strong method
+!
+ Do this before writing the file. When reading an encrypted file it will be
+ set automatically to the method used when that file was written. You can
+ change 'cryptmethod' before writing that file to change the method.
++
+ To set the default method, used for new files, use one of these in your
+ |vimrc| file: >
+ set cm=zip
+! set cm=blowfish2
+! Use the first one if you need to be compatible with Vim 7.2 and older. Using
+! "blowfish2" is highly recommended if you can use a Vim version that supports
+! it.
+!
+ The message given for reading and writing a file will show "[crypted]" when
+! using zip, "[blowfish]" when using blowfish, etc.
+
+ When writing an undo file, the same key and method will be used for the text
+ in the undo file. |persistent-undo|.
+***************
+*** 1438,1444 ****
+ 0 string VimCrypt~ Vim encrypted file
+ >9 string 01 - "zip" cryptmethod
+ >9 string 02 - "blowfish" cryptmethod
+!
+
+ Notes:
+ - Encryption is not possible when doing conversion with 'charconvert'.
+--- 1456,1462 ----
+ 0 string VimCrypt~ Vim encrypted file
+ >9 string 01 - "zip" cryptmethod
+ >9 string 02 - "blowfish" cryptmethod
+! >9 string 03 - "blowfish2" cryptmethod
+
+ Notes:
+ - Encryption is not possible when doing conversion with 'charconvert'.
+***************
+*** 1462,1481 ****
+ - Pkzip uses the same encryption as 'cryptmethod' "zip", and US Govt has no
+ objection to its export. Pkzip's public file APPNOTE.TXT describes this
+ algorithm in detail.
+ - Vim originates from the Netherlands. That is where the sources come from.
+ Thus the encryption code is not exported from the USA.
+
+ ==============================================================================
+ 10. Timestamps *timestamp* *timestamps*
+
+! Vim remembers the modification timestamp of a file when you begin editing it.
+! This is used to avoid that you have two different versions of the same file
+! (without you knowing this).
+!
+! After a shell command is run (|:!cmd| |suspend| |:read!| |K|) timestamps are
+! compared for all buffers in a window. Vim will run any associated
+! |FileChangedShell| autocommands or display a warning for any files that have
+! changed. In the GUI this happens when Vim regains input focus.
+
+ *E321* *E462*
+ If you want to automatically reload a file when it has been changed outside of
+--- 1480,1504 ----
+ - Pkzip uses the same encryption as 'cryptmethod' "zip", and US Govt has no
+ objection to its export. Pkzip's public file APPNOTE.TXT describes this
+ algorithm in detail.
++ - The implmentation of 'cryptmethod' "blowfish" has a flaw. It is possible to
++ crack the first 64 bytes of a file and in some circumstances more of the
++ file. Use of it is not recommended, but it's still the strongest method
++ supported by Vim 7.3 and 7.4. The "zip" method is even weaker.
+ - Vim originates from the Netherlands. That is where the sources come from.
+ Thus the encryption code is not exported from the USA.
+
+ ==============================================================================
+ 10. Timestamps *timestamp* *timestamps*
+
+! Vim remembers the modification timestamp, mode and size of a file when you
+! begin editing it. This is used to avoid that you have two different versions
+! of the same file (without you knowing this).
+!
+! After a shell command is run (|:!cmd| |suspend| |:read!| |K|) timestamps,
+! file modes and file sizes are compared for all buffers in a window. Vim will
+! run any associated |FileChangedShell| autocommands or display a warning for
+! any files that have changed. In the GUI this happens when Vim regains input
+! focus.
+
+ *E321* *E462*
+ If you want to automatically reload a file when it has been changed outside of
+*** ../vim-7.4.398/runtime/doc/options.txt 2014-08-06 14:52:05.039236174 +0200
+--- runtime/doc/options.txt 2014-08-09 15:36:48.165353916 +0200
+***************
+*** 2229,2238 ****
+ zip PkZip compatible method. A weak kind of encryption.
+ Backwards compatible with Vim 7.2 and older.
+ *blowfish*
+! blowfish Blowfish method. Strong encryption. Requires Vim 7.3
+! or later, files can NOT be read by Vim 7.2 and older.
+! This adds a "seed" to the file, every time you write
+! the file the encrypted bytes will be different.
+
+ When reading an encrypted file 'cryptmethod' will be set automatically
+ to the detected method of the file being read. Thus if you write it
+--- 2229,2246 ----
+ zip PkZip compatible method. A weak kind of encryption.
+ Backwards compatible with Vim 7.2 and older.
+ *blowfish*
+! blowfish Blowfish method. Medium strong encryption but it has
+! an implementation flaw. Requires Vim 7.3 or later,
+! files can NOT be read by Vim 7.2 and older. This adds
+! a "seed" to the file, every time you write the file
+! the encrypted bytes will be different.
+! *blowfish2*
+! blowfish2 Blowfish method. Medium strong encryption. Requires
+! Vim 7.4.399 or later, files can NOT be read by Vim 7.3
+! and older. This adds a "seed" to the file, every time
+! you write the file the encrypted bytes will be
+! different. The whole undo file is encrypted, not just
+! the pieces of text.
+
+ When reading an encrypted file 'cryptmethod' will be set automatically
+ to the detected method of the file being read. Thus if you write it
+*** ../vim-7.4.398/src/Makefile 2014-05-22 14:54:22.850468654 +0200
+--- src/Makefile 2014-08-09 15:37:19.689353690 +0200
+***************
+*** 1431,1436 ****
+--- 1431,1438 ----
+ blowfish.c \
+ buffer.c \
+ charset.c \
++ crypt.c \
++ crypt_zip.c \
+ diff.c \
+ digraph.c \
+ edit.c \
+***************
+*** 1520,1525 ****
+--- 1522,1529 ----
+ objects/buffer.o \
+ objects/blowfish.o \
+ objects/charset.o \
++ objects/crypt.o \
++ objects/crypt_zip.o \
+ objects/diff.o \
+ objects/digraph.o \
+ objects/edit.o \
+***************
+*** 1589,1594 ****
+--- 1593,1600 ----
+ blowfish.pro \
+ buffer.pro \
+ charset.pro \
++ crypt.pro \
++ crypt_zip.pro \
+ diff.pro \
+ digraph.pro \
+ edit.pro \
+***************
+*** 1753,1762 ****
+ languages:
+ @if test -n "$(MAKEMO)" -a -f $(PODIR)/Makefile; then \
+ cd $(PODIR); \
+! CC="$(CC)" $(MAKE) prefix=$(DESTDIR)$(prefix); \
+ fi
+ -@if test -n "$(MAKEMO)" -a -f $(PODIR)/Makefile; then \
+! cd $(PODIR); CC="$(CC)" $(MAKE) prefix=$(DESTDIR)$(prefix) converted; \
+ fi
+
+ # Update the *.po files for changes in the sources. Only run manually.
+--- 1759,1769 ----
+ languages:
+ @if test -n "$(MAKEMO)" -a -f $(PODIR)/Makefile; then \
+ cd $(PODIR); \
+! CC="$(CC)" $(MAKE) prefix=$(DESTDIR)$(prefix); \
+ fi
+ -@if test -n "$(MAKEMO)" -a -f $(PODIR)/Makefile; then \
+! cd $(PODIR); \
+! CC="$(CC)" $(MAKE) prefix=$(DESTDIR)$(prefix) converted; \
+ fi
+
+ # Update the *.po files for changes in the sources. Only run manually.
+***************
+*** 1883,1890 ****
+--- 1890,1903 ----
+ # Run individual test, assuming that Vim was already compiled.
+ test1 test2 test3 test4 test5 test6 test7 test8 test9 \
+ test_autoformat_join \
++ test_breakindent \
++ test_changelist \
+ test_eval \
++ test_insertcount \
++ test_listlbr \
++ test_listlbr_utf8 \
+ test_options \
++ test_qf_title \
+ test10 test11 test12 test13 test14 test15 test16 test17 test18 test19 \
+ test20 test21 test22 test23 test24 test25 test26 test27 test28 test29 \
+ test30 test31 test32 test33 test34 test35 test36 test37 test38 test39 \
+***************
+*** 2506,2511 ****
+--- 2519,2530 ----
+ objects/charset.o: charset.c
+ $(CCC) -o $@ charset.c
+
++ objects/crypt.o: crypt.c
++ $(CCC) -o $@ crypt.c
++
++ objects/crypt_zip.o: crypt_zip.c
++ $(CCC) -o $@ crypt_zip.c
++
+ objects/diff.o: diff.c
+ $(CCC) -o $@ diff.c
+
+***************
+*** 2855,2860 ****
+--- 2874,2887 ----
+ ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
+ gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h globals.h farsi.h \
+ arabic.h
++ objects/crypt.o: crypt.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
++ ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
++ gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h globals.h farsi.h \
++ arabic.h
++ objects/crypt_zip.o: crypt_zip.c vim.h auto/config.h feature.h os_unix.h \
++ auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
++ regexp.h gui.h gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h \
++ globals.h farsi.h arabic.h
+ objects/diff.o: diff.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+ ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
+ gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h globals.h farsi.h \
+*** ../vim-7.4.398/src/blowfish.c 2014-02-11 15:23:27.930123631 +0100
+--- src/blowfish.c 2014-08-09 15:31:32.493356185 +0200
+***************
+*** 9,25 ****
+ * Blowfish encryption for Vim; in Blowfish cipher feedback mode.
+ * Contributed by Mohsin Ahmed, http://www.cs.albany.edu/~mosh
+ * Based on http://www.schneier.com/blowfish.html by Bruce Schneier.
+ */
+
+ #include "vim.h"
+
+! #if defined(FEAT_CRYPT)
+
+ #define ARRAY_LENGTH(A) (sizeof(A)/sizeof(A[0]))
+
+ #define BF_BLOCK 8
+ #define BF_BLOCK_MASK 7
+! #define BF_CFB_LEN (8*(BF_BLOCK))
+
+ typedef union {
+ UINT32_T ul[2];
+--- 9,33 ----
+ * Blowfish encryption for Vim; in Blowfish cipher feedback mode.
+ * Contributed by Mohsin Ahmed, http://www.cs.albany.edu/~mosh
+ * Based on http://www.schneier.com/blowfish.html by Bruce Schneier.
++ *
++ * There are two variants:
++ * - The old one "blowfish" has a flaw which makes it much easier to crack the
++ * key. To see this, make a text file with one line of 1000 "x" characters
++ * and write it encrypted. Use "xxd" to inspect the bytes in the file. You
++ * will see that a block of 8 bytes repeats 8 times.
++ * - The new one "blowfish2" is better. It uses an 8 byte CFB to avoid the
++ * repeats.
+ */
+
+ #include "vim.h"
+
+! #if defined(FEAT_CRYPT) || defined(PROTO)
+
+ #define ARRAY_LENGTH(A) (sizeof(A)/sizeof(A[0]))
+
+ #define BF_BLOCK 8
+ #define BF_BLOCK_MASK 7
+! #define BF_MAX_CFB_LEN (8 * BF_BLOCK)
+
+ typedef union {
+ UINT32_T ul[2];
+***************
+*** 37,50 ****
+ # endif
+ #endif
+
+! static void bf_e_block __ARGS((UINT32_T *p_xl, UINT32_T *p_xr));
+! static void bf_e_cblock __ARGS((char_u *block));
+! static int bf_check_tables __ARGS((UINT32_T a_ipa[18], UINT32_T a_sbi[4][256], UINT32_T val));
+ static int bf_self_test __ARGS((void));
+
+ /* Blowfish code */
+! static UINT32_T pax[18];
+! static UINT32_T ipa[18] = {
+ 0x243f6a88u, 0x85a308d3u, 0x13198a2eu,
+ 0x03707344u, 0xa4093822u, 0x299f31d0u,
+ 0x082efa98u, 0xec4e6c89u, 0x452821e6u,
+--- 45,70 ----
+ # endif
+ #endif
+
+! /* The state of encryption, referenced by cryptstate_T. */
+! typedef struct {
+! UINT32_T pax[18]; /* P-array */
+! UINT32_T sbx[4][256]; /* S-boxes */
+! int randbyte_offset;
+! int update_offset;
+! char_u cfb_buffer[BF_MAX_CFB_LEN]; /* up to 64 bytes used */
+! int cfb_len; /* size of cfb_buffer actually used */
+! } bf_state_T;
+!
+!
+! static void bf_e_block __ARGS((bf_state_T *state, UINT32_T *p_xl, UINT32_T *p_xr));
+! static void bf_e_cblock __ARGS((bf_state_T *state, char_u *block));
+! static int bf_check_tables __ARGS((UINT32_T pax[18], UINT32_T sbx[4][256], UINT32_T val));
+ static int bf_self_test __ARGS((void));
++ static void bf_key_init __ARGS((bf_state_T *state, char_u *password, char_u *salt, int salt_len));
++ static void bf_cfb_init __ARGS((bf_state_T *state, char_u *seed, int seed_len));
+
+ /* Blowfish code */
+! static UINT32_T pax_init[18] = {
+ 0x243f6a88u, 0x85a308d3u, 0x13198a2eu,
+ 0x03707344u, 0xa4093822u, 0x299f31d0u,
+ 0x082efa98u, 0xec4e6c89u, 0x452821e6u,
+***************
+*** 53,60 ****
+ 0xb5470917u, 0x9216d5d9u, 0x8979fb1bu
+ };
+
+! static UINT32_T sbx[4][256];
+! static UINT32_T sbi[4][256] = {
+ {0xd1310ba6u, 0x98dfb5acu, 0x2ffd72dbu, 0xd01adfb7u,
+ 0xb8e1afedu, 0x6a267e96u, 0xba7c9045u, 0xf12c7f99u,
+ 0x24a19947u, 0xb3916cf7u, 0x0801f2e2u, 0x858efc16u,
+--- 73,79 ----
+ 0xb5470917u, 0x9216d5d9u, 0x8979fb1bu
+ };
+
+! static UINT32_T sbx_init[4][256] = {
+ {0xd1310ba6u, 0x98dfb5acu, 0x2ffd72dbu, 0xd01adfb7u,
+ 0xb8e1afedu, 0x6a267e96u, 0xba7c9045u, 0xf12c7f99u,
+ 0x24a19947u, 0xb3916cf7u, 0x0801f2e2u, 0x858efc16u,
+***************
+*** 314,346 ****
+ }
+ };
+
+-
+ #define F1(i) \
+! xl ^= pax[i]; \
+! xr ^= ((sbx[0][xl >> 24] + \
+! sbx[1][(xl & 0xFF0000) >> 16]) ^ \
+! sbx[2][(xl & 0xFF00) >> 8]) + \
+! sbx[3][xl & 0xFF];
+
+ #define F2(i) \
+! xr ^= pax[i]; \
+! xl ^= ((sbx[0][xr >> 24] + \
+! sbx[1][(xr & 0xFF0000) >> 16]) ^ \
+! sbx[2][(xr & 0xFF00) >> 8]) + \
+! sbx[3][xr & 0xFF];
+!
+
+ static void
+! bf_e_block(p_xl, p_xr)
+ UINT32_T *p_xl;
+ UINT32_T *p_xr;
+ {
+! UINT32_T temp, xl = *p_xl, xr = *p_xr;
+!
+! F1(0) F2(1) F1(2) F2(3) F1(4) F2(5) F1(6) F2(7)
+! F1(8) F2(9) F1(10) F2(11) F1(12) F2(13) F1(14) F2(15)
+! xl ^= pax[16];
+! xr ^= pax[17];
+ temp = xl;
+ xl = xr;
+ xr = temp;
+--- 333,372 ----
+ }
+ };
+
+ #define F1(i) \
+! xl ^= bfs->pax[i]; \
+! xr ^= ((bfs->sbx[0][xl >> 24] + \
+! bfs->sbx[1][(xl & 0xFF0000) >> 16]) ^ \
+! bfs->sbx[2][(xl & 0xFF00) >> 8]) + \
+! bfs->sbx[3][xl & 0xFF];
+
+ #define F2(i) \
+! xr ^= bfs->pax[i]; \
+! xl ^= ((bfs->sbx[0][xr >> 24] + \
+! bfs->sbx[1][(xr & 0xFF0000) >> 16]) ^ \
+! bfs->sbx[2][(xr & 0xFF00) >> 8]) + \
+! bfs->sbx[3][xr & 0xFF];
+
+ static void
+! bf_e_block(bfs, p_xl, p_xr)
+! bf_state_T *bfs;
+ UINT32_T *p_xl;
+ UINT32_T *p_xr;
+ {
+! UINT32_T temp;
+! UINT32_T xl = *p_xl;
+! UINT32_T xr = *p_xr;
+!
+! F1(0) F2(1)
+! F1(2) F2(3)
+! F1(4) F2(5)
+! F1(6) F2(7)
+! F1(8) F2(9)
+! F1(10) F2(11)
+! F1(12) F2(13)
+! F1(14) F2(15)
+! xl ^= bfs->pax[16];
+! xr ^= bfs->pax[17];
+ temp = xl;
+ xl = xr;
+ xr = temp;
+***************
+*** 348,369 ****
+ *p_xr = xr;
+ }
+
+- #if 0 /* not used */
+- static void
+- bf_d_block(p_xl, p_xr)
+- UINT32_T *p_xl;
+- UINT32_T *p_xr;
+- {
+- UINT32_T temp, xl = *p_xl, xr = *p_xr;
+- F1(17) F2(16) F1(15) F2(14) F1(13) F2(12) F1(11) F2(10)
+- F1(9) F2(8) F1(7) F2(6) F1(5) F2(4) F1(3) F2(2)
+- xl ^= pax[1];
+- xr ^= pax[0];
+- temp = xl; xl = xr; xr = temp;
+- *p_xl = xl; *p_xr = xr;
+- }
+- #endif
+-
+
+ #ifdef WORDS_BIGENDIAN
+ # define htonl2(x) \
+--- 374,379 ----
+***************
+*** 374,380 ****
+ #endif
+
+ static void
+! bf_e_cblock(block)
+ char_u *block;
+ {
+ block8 bk;
+--- 384,391 ----
+ #endif
+
+ static void
+! bf_e_cblock(bfs, block)
+! bf_state_T *bfs;
+ char_u *block;
+ {
+ block8 bk;
+***************
+*** 382,416 ****
+ memcpy(bk.uc, block, 8);
+ htonl2(bk.ul[0]);
+ htonl2(bk.ul[1]);
+! bf_e_block(&bk.ul[0], &bk.ul[1]);
+ htonl2(bk.ul[0]);
+ htonl2(bk.ul[1]);
+ memcpy(block, bk.uc, 8);
+ }
+
+- #if 0 /* not used */
+- void
+- bf_d_cblock(block)
+- char_u *block;
+- {
+- block8 bk;
+- memcpy(bk.uc, block, 8);
+- htonl2(bk.ul[0]); htonl2(bk.ul[1]);
+- bf_d_block(&bk.ul[0], &bk.ul[1]);
+- htonl2(bk.ul[0]); htonl2(bk.ul[1]);
+- memcpy(block, bk.uc, 8);
+- }
+- #endif
+-
+ /*
+ * Initialize the crypt method using "password" as the encryption key and
+ * "salt[salt_len]" as the salt.
+ */
+! void
+! bf_key_init(password, salt, salt_len)
+! char_u *password;
+! char_u *salt;
+! int salt_len;
+ {
+ int i, j, keypos = 0;
+ unsigned u;
+--- 393,414 ----
+ memcpy(bk.uc, block, 8);
+ htonl2(bk.ul[0]);
+ htonl2(bk.ul[1]);
+! bf_e_block(bfs, &bk.ul[0], &bk.ul[1]);
+ htonl2(bk.ul[0]);
+ htonl2(bk.ul[1]);
+ memcpy(block, bk.uc, 8);
+ }
+
+ /*
+ * Initialize the crypt method using "password" as the encryption key and
+ * "salt[salt_len]" as the salt.
+ */
+! static void
+! bf_key_init(bfs, password, salt, salt_len)
+! bf_state_T *bfs;
+! char_u *password;
+! char_u *salt;
+! int salt_len;
+ {
+ int i, j, keypos = 0;
+ unsigned u;
+***************
+*** 418,424 ****
+ char_u *key;
+ int keylen;
+
+! /* Process the key 1000 times.
+ * See http://en.wikipedia.org/wiki/Key_strengthening. */
+ key = sha256_key(password, salt, salt_len);
+ for (i = 0; i < 1000; i++)
+--- 416,422 ----
+ char_u *key;
+ int keylen;
+
+! /* Process the key 1001 times.
+ * See http://en.wikipedia.org/wiki/Key_strengthening. */
+ key = sha256_key(password, salt, salt_len);
+ for (i = 0; i < 1000; i++)
+***************
+*** 437,488 ****
+ key[i] = u;
+ }
+
+! mch_memmove(sbx, sbi, 4 * 4 * 256);
+
+ for (i = 0; i < 18; ++i)
+ {
+ val = 0;
+ for (j = 0; j < 4; ++j)
+ val = (val << 8) | key[keypos++ % keylen];
+! pax[i] = ipa[i] ^ val;
+ }
+
+ data_l = data_r = 0;
+ for (i = 0; i < 18; i += 2)
+ {
+! bf_e_block(&data_l, &data_r);
+! pax[i + 0] = data_l;
+! pax[i + 1] = data_r;
+ }
+
+ for (i = 0; i < 4; ++i)
+ {
+ for (j = 0; j < 256; j += 2)
+ {
+! bf_e_block(&data_l, &data_r);
+! sbx[i][j + 0] = data_l;
+! sbx[i][j + 1] = data_r;
+ }
+ }
+ }
+
+ /*
+! * BF Self test for corrupted tables or instructions
+ */
+ static int
+! bf_check_tables(a_ipa, a_sbi, val)
+! UINT32_T a_ipa[18];
+! UINT32_T a_sbi[4][256];
+ UINT32_T val;
+ {
+ int i, j;
+ UINT32_T c = 0;
+
+ for (i = 0; i < 18; i++)
+! c ^= a_ipa[i];
+ for (i = 0; i < 4; i++)
+ for (j = 0; j < 256; j++)
+! c ^= a_sbi[i][j];
+ return c == val;
+ }
+
+--- 435,488 ----
+ key[i] = u;
+ }
+
+! /* Use "key" to initialize the P-array ("pax") and S-boxes ("sbx") of
+! * Blowfish. */
+! mch_memmove(bfs->sbx, sbx_init, 4 * 4 * 256);
+
+ for (i = 0; i < 18; ++i)
+ {
+ val = 0;
+ for (j = 0; j < 4; ++j)
+ val = (val << 8) | key[keypos++ % keylen];
+! bfs->pax[i] = pax_init[i] ^ val;
+ }
+
+ data_l = data_r = 0;
+ for (i = 0; i < 18; i += 2)
+ {
+! bf_e_block(bfs, &data_l, &data_r);
+! bfs->pax[i + 0] = data_l;
+! bfs->pax[i + 1] = data_r;
+ }
+
+ for (i = 0; i < 4; ++i)
+ {
+ for (j = 0; j < 256; j += 2)
+ {
+! bf_e_block(bfs, &data_l, &data_r);
+! bfs->sbx[i][j + 0] = data_l;
+! bfs->sbx[i][j + 1] = data_r;
+ }
+ }
+ }
+
+ /*
+! * Blowfish self-test for corrupted tables or instructions.
+ */
+ static int
+! bf_check_tables(pax, sbx, val)
+! UINT32_T pax[18];
+! UINT32_T sbx[4][256];
+ UINT32_T val;
+ {
+ int i, j;
+ UINT32_T c = 0;
+
+ for (i = 0; i < 18; i++)
+! c ^= pax[i];
+ for (i = 0; i < 4; i++)
+ for (j = 0; j < 256; j++)
+! c ^= sbx[i][j];
+ return c == val;
+ }
+
+***************
+*** 520,525 ****
+--- 520,529 ----
+ int err = 0;
+ block8 bk;
+ UINT32_T ui = 0xffffffffUL;
++ bf_state_T state;
++
++ vim_memset(&state, 0, sizeof(bf_state_T));
++ state.cfb_len = BF_MAX_CFB_LEN;
+
+ /* We can't simply use sizeof(UINT32_T), it would generate a compiler
+ * warning. */
+***************
+*** 528,548 ****
+ EMSG(_("E820: sizeof(uint32_t) != 4"));
+ }
+
+! if (!bf_check_tables(ipa, sbi, 0x6ffa520a))
+ err++;
+
+ bn = ARRAY_LENGTH(bf_test_data);
+ for (i = 0; i < bn; i++)
+ {
+! bf_key_init((char_u *)(bf_test_data[i].password),
+ bf_test_data[i].salt,
+ (int)STRLEN(bf_test_data[i].salt));
+! if (!bf_check_tables(pax, sbx, bf_test_data[i].keysum))
+ err++;
+
+ /* Don't modify bf_test_data[i].plaintxt, self test is idempotent. */
+ memcpy(bk.uc, bf_test_data[i].plaintxt, 8);
+! bf_e_cblock(bk.uc);
+ if (memcmp(bk.uc, bf_test_data[i].cryptxt, 8) != 0)
+ {
+ if (err == 0 && memcmp(bk.uc, bf_test_data[i].badcryptxt, 8) == 0)
+--- 532,552 ----
+ EMSG(_("E820: sizeof(uint32_t) != 4"));
+ }
+
+! if (!bf_check_tables(pax_init, sbx_init, 0x6ffa520a))
+ err++;
+
+ bn = ARRAY_LENGTH(bf_test_data);
+ for (i = 0; i < bn; i++)
+ {
+! bf_key_init(&state, (char_u *)(bf_test_data[i].password),
+ bf_test_data[i].salt,
+ (int)STRLEN(bf_test_data[i].salt));
+! if (!bf_check_tables(state.pax, state.sbx, bf_test_data[i].keysum))
+ err++;
+
+ /* Don't modify bf_test_data[i].plaintxt, self test is idempotent. */
+ memcpy(bk.uc, bf_test_data[i].plaintxt, 8);
+! bf_e_cblock(&state, bk.uc);
+ if (memcmp(bk.uc, bf_test_data[i].cryptxt, 8) != 0)
+ {
+ if (err == 0 && memcmp(bk.uc, bf_test_data[i].badcryptxt, 8) == 0)
+***************
+*** 554,596 ****
+ return err > 0 ? FAIL : OK;
+ }
+
+! /* Cipher feedback mode. */
+! static int randbyte_offset = 0;
+! static int update_offset = 0;
+! static char_u cfb_buffer[BF_CFB_LEN]; /* 64 bytes */
+
+ /*
+! * Initialize with seed "iv[iv_len]".
+ */
+! void
+! bf_cfb_init(iv, iv_len)
+! char_u *iv;
+! int iv_len;
+ {
+ int i, mi;
+
+! randbyte_offset = update_offset = 0;
+! vim_memset(cfb_buffer, 0, BF_CFB_LEN);
+! if (iv_len > 0)
+ {
+! mi = iv_len > BF_CFB_LEN ? iv_len : BF_CFB_LEN;
+ for (i = 0; i < mi; i++)
+! cfb_buffer[i % BF_CFB_LEN] ^= iv[i % iv_len];
+ }
+ }
+
+! #define BF_CFB_UPDATE(c) { \
+! cfb_buffer[update_offset] ^= (char_u)c; \
+! if (++update_offset == BF_CFB_LEN) \
+! update_offset = 0; \
+ }
+
+! #define BF_RANBYTE(t) { \
+! if ((randbyte_offset & BF_BLOCK_MASK) == 0) \
+! bf_e_cblock(&cfb_buffer[randbyte_offset]); \
+! t = cfb_buffer[randbyte_offset]; \
+! if (++randbyte_offset == BF_CFB_LEN) \
+! randbyte_offset = 0; \
+ }
+
+ /*
+--- 558,600 ----
+ return err > 0 ? FAIL : OK;
+ }
+
+! /*
+! * CFB: Cipher Feedback Mode.
+! */
+
+ /*
+! * Initialize with seed "seed[seed_len]".
+ */
+! static void
+! bf_cfb_init(bfs, seed, seed_len)
+! bf_state_T *bfs;
+! char_u *seed;
+! int seed_len;
+ {
+ int i, mi;
+
+! bfs->randbyte_offset = bfs->update_offset = 0;
+! vim_memset(bfs->cfb_buffer, 0, bfs->cfb_len);
+! if (seed_len > 0)
+ {
+! mi = seed_len > bfs->cfb_len ? seed_len : bfs->cfb_len;
+ for (i = 0; i < mi; i++)
+! bfs->cfb_buffer[i % bfs->cfb_len] ^= seed[i % seed_len];
+ }
+ }
+
+! #define BF_CFB_UPDATE(bfs, c) { \
+! bfs->cfb_buffer[bfs->update_offset] ^= (char_u)c; \
+! if (++bfs->update_offset == bfs->cfb_len) \
+! bfs->update_offset = 0; \
+ }
+
+! #define BF_RANBYTE(bfs, t) { \
+! if ((bfs->randbyte_offset & BF_BLOCK_MASK) == 0) \
+! bf_e_cblock(bfs, &(bfs->cfb_buffer[bfs->randbyte_offset])); \
+! t = bfs->cfb_buffer[bfs->randbyte_offset]; \
+! if (++bfs->randbyte_offset == bfs->cfb_len) \
+! bfs->randbyte_offset = 0; \
+ }
+
+ /*
+***************
+*** 598,687 ****
+ * "from" and "to" can be equal to encrypt in place.
+ */
+ void
+! bf_crypt_encode(from, len, to)
+ char_u *from;
+ size_t len;
+ char_u *to;
+ {
+ size_t i;
+ int ztemp, t;
+
+ for (i = 0; i < len; ++i)
+ {
+ ztemp = from[i];
+! BF_RANBYTE(t);
+! BF_CFB_UPDATE(ztemp);
+ to[i] = t ^ ztemp;
+ }
+ }
+
+ /*
+! * Decrypt "ptr[len]" in place.
+ */
+ void
+! bf_crypt_decode(ptr, len)
+! char_u *ptr;
+! long len;
+ {
+! char_u *p;
+ int t;
+
+! for (p = ptr; p < ptr + len; ++p)
+ {
+! BF_RANBYTE(t);
+! *p ^= t;
+! BF_CFB_UPDATE(*p);
+ }
+ }
+
+- /*
+- * Initialize the encryption keys and the random header according to
+- * the given password.
+- */
+ void
+! bf_crypt_init_keys(passwd)
+! char_u *passwd; /* password string with which to modify keys */
+! {
+! char_u *p;
+!
+! for (p = passwd; *p != NUL; ++p)
+! {
+! BF_CFB_UPDATE(*p);
+! }
+! }
+
+! static int save_randbyte_offset;
+! static int save_update_offset;
+! static char_u save_cfb_buffer[BF_CFB_LEN];
+! static UINT32_T save_pax[18];
+! static UINT32_T save_sbx[4][256];
+!
+! /*
+! * Save the current crypt state. Can only be used once before
+! * bf_crypt_restore().
+! */
+! void
+! bf_crypt_save()
+! {
+! save_randbyte_offset = randbyte_offset;
+! save_update_offset = update_offset;
+! mch_memmove(save_cfb_buffer, cfb_buffer, BF_CFB_LEN);
+! mch_memmove(save_pax, pax, 4 * 18);
+! mch_memmove(save_sbx, sbx, 4 * 4 * 256);
+! }
+
+! /*
+! * Restore the current crypt state. Can only be used after
+! * bf_crypt_save().
+! */
+! void
+! bf_crypt_restore()
+! {
+! randbyte_offset = save_randbyte_offset;
+! update_offset = save_update_offset;
+! mch_memmove(cfb_buffer, save_cfb_buffer, BF_CFB_LEN);
+! mch_memmove(pax, save_pax, 4 * 18);
+! mch_memmove(sbx, save_sbx, 4 * 4 * 256);
+ }
+
+ /*
+--- 602,670 ----
+ * "from" and "to" can be equal to encrypt in place.
+ */
+ void
+! crypt_blowfish_encode(state, from, len, to)
+! cryptstate_T *state;
+ char_u *from;
+ size_t len;
+ char_u *to;
+ {
++ bf_state_T *bfs = state->method_state;
+ size_t i;
+ int ztemp, t;
+
+ for (i = 0; i < len; ++i)
+ {
+ ztemp = from[i];
+! BF_RANBYTE(bfs, t);
+! BF_CFB_UPDATE(bfs, ztemp);
+ to[i] = t ^ ztemp;
+ }
+ }
+
+ /*
+! * Decrypt "from[len]" into "to[len]".
+ */
+ void
+! crypt_blowfish_decode(state, from, len, to)
+! cryptstate_T *state;
+! char_u *from;
+! size_t len;
+! char_u *to;
+ {
+! bf_state_T *bfs = state->method_state;
+! size_t i;
+ int t;
+
+! for (i = 0; i < len; ++i)
+ {
+! BF_RANBYTE(bfs, t);
+! to[i] = from[i] ^ t;
+! BF_CFB_UPDATE(bfs, to[i]);
+ }
+ }
+
+ void
+! crypt_blowfish_init(state, key, salt, salt_len, seed, seed_len)
+! cryptstate_T *state;
+! char_u* key;
+! char_u* salt;
+! int salt_len;
+! char_u* seed;
+! int seed_len;
+! {
+! bf_state_T *bfs = (bf_state_T *)alloc_clear(sizeof(bf_state_T));
+!
+! state->method_state = bfs;
+!
+! /* "blowfish" uses a 64 byte buffer, causing it to repeat 8 byte groups 8
+! * times. "blowfish2" uses a 8 byte buffer to avoid repeating. */
+! bfs->cfb_len = state->method_nr == CRYPT_M_BF ? BF_MAX_CFB_LEN : BF_BLOCK;
+
+! if (blowfish_self_test() == FAIL)
+! return;
+
+! bf_key_init(bfs, key, salt, salt_len);
+! bf_cfb_init(bfs, seed, seed_len);
+ }
+
+ /*
+*** ../vim-7.4.398/src/crypt.c 2014-08-10 13:30:43.816787293 +0200
+--- src/crypt.c 2014-08-09 15:37:46.189353499 +0200
+***************
+*** 0 ****
+--- 1,585 ----
++ /* vi:set ts=8 sts=4 sw=4:
++ *
++ * VIM - Vi IMproved by Bram Moolenaar
++ *
++ * Do ":help uganda" in Vim to read copying and usage conditions.
++ * Do ":help credits" in Vim to see a list of people who contributed.
++ * See README.txt for an overview of the Vim source code.
++ */
++
++ /*
++ * crypt.c: Generic encryption support.
++ */
++ #include "vim.h"
++
++ #if defined(FEAT_CRYPT) || defined(PROTO)
++ /*
++ * Optional encryption support.
++ * Mohsin Ahmed, mosh@sasi.com, 1998-09-24
++ * Based on zip/crypt sources.
++ * Refactored by David Leadbeater, 2014.
++ *
++ * NOTE FOR USA: Since 2000 exporting this code from the USA is allowed to
++ * most countries. There are a few exceptions, but that still should not be a
++ * problem since this code was originally created in Europe and India.
++ *
++ * Blowfish addition originally made by Mohsin Ahmed,
++ * http://www.cs.albany.edu/~mosh 2010-03-14
++ * Based on blowfish by Bruce Schneier (http://www.schneier.com/blowfish.html)
++ * and sha256 by Christophe Devine.
++ */
++
++ typedef struct {
++ char *name; /* encryption name as used in 'cryptmethod' */
++ char *magic; /* magic bytes stored in file header */
++ int salt_len; /* length of salt, or 0 when not using salt */
++ int seed_len; /* length of seed, or 0 when not using salt */
++ int works_inplace; /* encryption/decryption can be done in-place */
++ int whole_undofile; /* whole undo file is encrypted */
++
++ /* Optional function pointer for a self-test. */
++ int (* self_test_fn)();
++
++ /* Function pointer for initializing encryption/decription. */
++ void (* init_fn)(cryptstate_T *state, char_u *key,
++ char_u *salt, int salt_len, char_u *seed, int seed_len);
++
++ /* Function pointers for encoding/decoding from one buffer into another.
++ * Optional, however, these or the _buffer ones should be configured. */
++ void (*encode_fn)(cryptstate_T *state, char_u *from, size_t len,
++ char_u *to);
++ void (*decode_fn)(cryptstate_T *state, char_u *from, size_t len,
++ char_u *to);
++
++ /* Function pointers for encoding and decoding, can buffer data if needed.
++ * Optional (however, these or the above should be configured). */
++ long (*encode_buffer_fn)(cryptstate_T *state, char_u *from, size_t len,
++ char_u **newptr);
++ long (*decode_buffer_fn)(cryptstate_T *state, char_u *from, size_t len,
++ char_u **newptr);
++
++ /* Function pointers for in-place encoding and decoding, used for
++ * crypt_*_inplace(). "from" and "to" arguments will be equal.
++ * These may be the same as decode_fn and encode_fn above, however an
++ * algorithm may implement them in a way that is not interchangeable with
++ * the crypt_(en|de)code() interface (for example because it wishes to add
++ * padding to files).
++ * This method is used for swap and undo files which have a rigid format.
++ */
++ void (*encode_inplace_fn)(cryptstate_T *state, char_u *p1, size_t len,
++ char_u *p2);
++ void (*decode_inplace_fn)(cryptstate_T *state, char_u *p1, size_t len,
++ char_u *p2);
++ } cryptmethod_T;
++
++ /* index is method_nr of cryptstate_T, CRYPT_M_* */
++ static cryptmethod_T cryptmethods[CRYPT_M_COUNT] = {
++ /* PK_Zip; very weak */
++ {
++ "zip",
++ "VimCrypt~01!",
++ 0,
++ 0,
++ TRUE,
++ FALSE,
++ NULL,
++ crypt_zip_init,
++ crypt_zip_encode, crypt_zip_decode,
++ NULL, NULL,
++ crypt_zip_encode, crypt_zip_decode,
++ },
++
++ /* Blowfish/CFB + SHA-256 custom key derivation; implementation issues. */
++ {
++ "blowfish",
++ "VimCrypt~02!",
++ 8,
++ 8,
++ TRUE,
++ FALSE,
++ blowfish_self_test,
++ crypt_blowfish_init,
++ crypt_blowfish_encode, crypt_blowfish_decode,
++ NULL, NULL,
++ crypt_blowfish_encode, crypt_blowfish_decode,
++ },
++
++ /* Blowfish/CFB + SHA-256 custom key derivation; fixed. */
++ {
++ "blowfish2",
++ "VimCrypt~03!",
++ 8,
++ 8,
++ TRUE,
++ TRUE,
++ blowfish_self_test,
++ crypt_blowfish_init,
++ crypt_blowfish_encode, crypt_blowfish_decode,
++ NULL, NULL,
++ crypt_blowfish_encode, crypt_blowfish_decode,
++ },
++ };
++
++ #define CRYPT_MAGIC_LEN 12 /* cannot change */
++ static char crypt_magic_head[] = "VimCrypt~";
++
++ /*
++ * Return int value for crypt method name.
++ * 0 for "zip", the old method. Also for any non-valid value.
++ * 1 for "blowfish".
++ * 2 for "blowfish2".
++ */
++ int
++ crypt_method_nr_from_name(name)
++ char_u *name;
++ {
++ int i;
++
++ for (i = 0; i < CRYPT_M_COUNT; ++i)
++ if (STRCMP(name, cryptmethods[i].name) == 0)
++ return i;
++ return 0;
++ }
++
++ /*
++ * Get the crypt method used for a file from "ptr[len]", the magic text at the
++ * start of the file.
++ * Returns -1 when no encryption used.
++ */
++ int
++ crypt_method_nr_from_magic(ptr, len)
++ char *ptr;
++ int len;
++ {
++ int i;
++
++ if (len < CRYPT_MAGIC_LEN)
++ return -1;
++
++ for (i = 0; i < CRYPT_M_COUNT; i++)
++ if (memcmp(ptr, cryptmethods[i].magic, CRYPT_MAGIC_LEN) == 0)
++ return i;
++
++ i = (int)STRLEN(crypt_magic_head);
++ if (len >= i && memcmp(ptr, crypt_magic_head, i) == 0)
++ EMSG(_("E821: File is encrypted with unknown method"));
++
++ return -1;
++ }
++
++ /*
++ * Return TRUE if the crypt method for "method_nr" can be done in-place.
++ */
++ int
++ crypt_works_inplace(state)
++ cryptstate_T *state;
++ {
++ return cryptmethods[state->method_nr].works_inplace;
++ }
++
++ /*
++ * Get the crypt method for buffer "buf" as a number.
++ */
++ int
++ crypt_get_method_nr(buf)
++ buf_T *buf;
++ {
++ return crypt_method_nr_from_name(*buf->b_p_cm == NUL ? p_cm : buf->b_p_cm);
++ }
++
++ /*
++ * Return TRUE when the buffer uses an encryption method that encrypts the
++ * whole undo file, not only the text.
++ */
++ int
++ crypt_whole_undofile(method_nr)
++ int method_nr;
++ {
++ return cryptmethods[method_nr].whole_undofile;
++ }
++
++ /*
++ * Get crypt method specifc length of the file header in bytes.
++ */
++ int
++ crypt_get_header_len(method_nr)
++ int method_nr;
++ {
++ return CRYPT_MAGIC_LEN
++ + cryptmethods[method_nr].salt_len
++ + cryptmethods[method_nr].seed_len;
++ }
++
++ /*
++ * Set the crypt method for buffer "buf" to "method_nr" using the int value as
++ * returned by crypt_method_nr_from_name().
++ */
++ void
++ crypt_set_cm_option(buf, method_nr)
++ buf_T *buf;
++ int method_nr;
++ {
++ free_string_option(buf->b_p_cm);
++ buf->b_p_cm = vim_strsave((char_u *)cryptmethods[method_nr].name);
++ }
++
++ /*
++ * If the crypt method for the current buffer has a self-test, run it and
++ * return OK/FAIL.
++ */
++ int
++ crypt_self_test()
++ {
++ int method_nr = crypt_get_method_nr(curbuf);
++
++ if (cryptmethods[method_nr].self_test_fn == NULL)
++ return OK;
++ return cryptmethods[method_nr].self_test_fn();
++ }
++
++ /*
++ * Allocate a crypt state and initialize it.
++ */
++ cryptstate_T *
++ crypt_create(method_nr, key, salt, salt_len, seed, seed_len)
++ int method_nr;
++ char_u *key;
++ char_u *salt;
++ int salt_len;
++ char_u *seed;
++ int seed_len;
++ {
++ cryptstate_T *state = (cryptstate_T *)alloc((int)sizeof(cryptstate_T));
++
++ state->method_nr = method_nr;
++ cryptmethods[method_nr].init_fn(state, key, salt, salt_len, seed, seed_len);
++ return state;
++ }
++
++ /*
++ * Allocate a crypt state from a file header and initialize it.
++ * Assumes that header contains at least the number of bytes that
++ * crypt_get_header_len() returns for "method_nr".
++ */
++ cryptstate_T *
++ crypt_create_from_header(method_nr, key, header)
++ int method_nr;
++ char_u *key;
++ char_u *header;
++ {
++ char_u *salt = NULL;
++ char_u *seed = NULL;
++ int salt_len = cryptmethods[method_nr].salt_len;
++ int seed_len = cryptmethods[method_nr].seed_len;
++
++ if (salt_len > 0)
++ salt = header + CRYPT_MAGIC_LEN;
++ if (seed_len > 0)
++ seed = header + CRYPT_MAGIC_LEN + salt_len;
++
++ return crypt_create(method_nr, key, salt, salt_len, seed, seed_len);
++ }
++
++ /*
++ * Read the crypt method specific header data from "fp".
++ * Return an allocated cryptstate_T or NULL on error.
++ */
++ cryptstate_T *
++ crypt_create_from_file(fp, key)
++ FILE *fp;
++ char_u *key;
++ {
++ int method_nr;
++ int header_len;
++ char magic_buffer[CRYPT_MAGIC_LEN];
++ char_u *buffer;
++ cryptstate_T *state;
++
++ if (fread(magic_buffer, CRYPT_MAGIC_LEN, 1, fp) != 1)
++ return NULL;
++ method_nr = crypt_method_nr_from_magic(magic_buffer, CRYPT_MAGIC_LEN);
++ if (method_nr < 0)
++ return NULL;
++
++ header_len = crypt_get_header_len(method_nr);
++ if ((buffer = alloc(header_len)) == NULL)
++ return NULL;
++ mch_memmove(buffer, magic_buffer, CRYPT_MAGIC_LEN);
++ if (header_len > CRYPT_MAGIC_LEN
++ && fread(buffer + CRYPT_MAGIC_LEN,
++ header_len - CRYPT_MAGIC_LEN, 1, fp) != 1)
++ {
++ vim_free(buffer);
++ return NULL;
++ }
++
++ state = crypt_create_from_header(method_nr, key, buffer);
++ vim_free(buffer);
++ return state;
++ }
++
++ /*
++ * Allocate a cryptstate_T for writing and initialize it with "key".
++ * Allocates and fills in the header and stores it in "header", setting
++ * "header_len". The header may include salt and seed, depending on
++ * cryptmethod. Caller must free header.
++ * Returns the state or NULL on failure.
++ */
++ cryptstate_T *
++ crypt_create_for_writing(method_nr, key, header, header_len)
++ int method_nr;
++ char_u *key;
++ char_u **header;
++ int *header_len;
++ {
++ int len = crypt_get_header_len(method_nr);
++ char_u *salt = NULL;
++ char_u *seed = NULL;
++ int salt_len = cryptmethods[method_nr].salt_len;
++ int seed_len = cryptmethods[method_nr].seed_len;
++ cryptstate_T *state;
++
++ *header_len = len;
++ *header = alloc(len);
++ if (*header == NULL)
++ return NULL;
++
++ mch_memmove(*header, cryptmethods[method_nr].magic, CRYPT_MAGIC_LEN);
++ if (salt_len > 0 || seed_len > 0)
++ {
++ if (salt_len > 0)
++ salt = *header + CRYPT_MAGIC_LEN;
++ if (seed_len > 0)
++ seed = *header + CRYPT_MAGIC_LEN + salt_len;
++
++ /* TODO: Should this be crypt method specific? (Probably not worth
++ * it). sha2_seed is pretty bad for large amounts of entropy, so make
++ * that into something which is suitable for anything. */
++ sha2_seed(salt, salt_len, seed, seed_len);
++ }
++
++ state = crypt_create(method_nr, key, salt, salt_len, seed, seed_len);
++ if (state == NULL)
++ {
++ vim_free(*header);
++ *header = NULL;
++ }
++ return state;
++ }
++
++ /*
++ * Free the crypt state.
++ */
++ void
++ crypt_free_state(state)
++ cryptstate_T *state;
++ {
++ vim_free(state->method_state);
++ vim_free(state);
++ }
++
++ /*
++ * Encode "from[len]" and store the result in a newly allocated buffer, which
++ * is stored in "newptr".
++ * Return number of bytes in "newptr", 0 for need more or -1 on error.
++ */
++ long
++ crypt_encode_alloc(state, from, len, newptr)
++ cryptstate_T *state;
++ char_u *from;
++ size_t len;
++ char_u **newptr;
++ {
++ cryptmethod_T *method = &cryptmethods[state->method_nr];
++
++ if (method->encode_buffer_fn != NULL)
++ /* Has buffer function, pass through. */
++ return method->encode_buffer_fn(state, from, len, newptr);
++ if (len == 0)
++ /* Not buffering, just return EOF. */
++ return len;
++
++ *newptr = alloc(len);
++ if (*newptr == NULL)
++ return -1;
++ method->encode_fn(state, from, len, *newptr);
++ return len;
++ }
++
++ /*
++ * Decrypt "ptr[len]" and store the result in a newly allocated buffer, which
++ * is stored in "newptr".
++ * Return number of bytes in "newptr", 0 for need more or -1 on error.
++ */
++ long
++ crypt_decode_alloc(state, ptr, len, newptr)
++ cryptstate_T *state;
++ char_u *ptr;
++ long len;
++ char_u **newptr;
++ {
++ cryptmethod_T *method = &cryptmethods[state->method_nr];
++
++ if (method->decode_buffer_fn != NULL)
++ /* Has buffer function, pass through. */
++ return method->decode_buffer_fn(state, ptr, len, newptr);
++
++ if (len == 0)
++ /* Not buffering, just return EOF. */
++ return len;
++
++ *newptr = alloc(len);
++ if (*newptr == NULL)
++ return -1;
++ method->decode_fn(state, ptr, len, *newptr);
++ return len;
++ }
++
++ /*
++ * Encrypting "from[len]" into "to[len]".
++ */
++ void
++ crypt_encode(state, from, len, to)
++ cryptstate_T *state;
++ char_u *from;
++ size_t len;
++ char_u *to;
++ {
++ cryptmethods[state->method_nr].encode_fn(state, from, len, to);
++ }
++
++ /*
++ * decrypting "from[len]" into "to[len]".
++ */
++ void
++ crypt_decode(state, from, len, to)
++ cryptstate_T *state;
++ char_u *from;
++ size_t len;
++ char_u *to;
++ {
++ cryptmethods[state->method_nr].decode_fn(state, from, len, to);
++ }
++
++ /*
++ * Simple inplace encryption, modifies "buf[len]" in place.
++ */
++ void
++ crypt_encode_inplace(state, buf, len)
++ cryptstate_T *state;
++ char_u *buf;
++ size_t len;
++ {
++ cryptmethods[state->method_nr].encode_inplace_fn(state, buf, len, buf);
++ }
++
++ /*
++ * Simple inplace decryption, modifies "buf[len]" in place.
++ */
++ void
++ crypt_decode_inplace(state, buf, len)
++ cryptstate_T *state;
++ char_u *buf;
++ size_t len;
++ {
++ cryptmethods[state->method_nr].decode_inplace_fn(state, buf, len, buf);
++ }
++
++ /*
++ * Free an allocated crypt key. Clear the text to make sure it doesn't stay
++ * in memory anywhere.
++ */
++ void
++ crypt_free_key(key)
++ char_u *key;
++ {
++ char_u *p;
++
++ if (key != NULL)
++ {
++ for (p = key; *p != NUL; ++p)
++ *p = 0;
++ vim_free(key);
++ }
++ }
++
++ /*
++ * Ask the user for a crypt key.
++ * When "store" is TRUE, the new key is stored in the 'key' option, and the
++ * 'key' option value is returned: Don't free it.
++ * When "store" is FALSE, the typed key is returned in allocated memory.
++ * Returns NULL on failure.
++ */
++ char_u *
++ crypt_get_key(store, twice)
++ int store;
++ int twice; /* Ask for the key twice. */
++ {
++ char_u *p1, *p2 = NULL;
++ int round;
++
++ for (round = 0; ; ++round)
++ {
++ cmdline_star = TRUE;
++ cmdline_row = msg_row;
++ p1 = getcmdline_prompt(NUL, round == 0
++ ? (char_u *)_("Enter encryption key: ")
++ : (char_u *)_("Enter same key again: "), 0, EXPAND_NOTHING,
++ NULL);
++ cmdline_star = FALSE;
++
++ if (p1 == NULL)
++ break;
++
++ if (round == twice)
++ {
++ if (p2 != NULL && STRCMP(p1, p2) != 0)
++ {
++ MSG(_("Keys don't match!"));
++ crypt_free_key(p1);
++ crypt_free_key(p2);
++ p2 = NULL;
++ round = -1; /* do it again */
++ continue;
++ }
++
++ if (store)
++ {
++ set_option_value((char_u *)"key", 0L, p1, OPT_LOCAL);
++ crypt_free_key(p1);
++ p1 = curbuf->b_p_key;
++ }
++ break;
++ }
++ p2 = p1;
++ }
++
++ /* since the user typed this, no need to wait for return */
++ if (msg_didout)
++ msg_putchar('\n');
++ need_wait_return = FALSE;
++ msg_didout = FALSE;
++
++ crypt_free_key(p2);
++ return p1;
++ }
++
++
++ /*
++ * Append a message to IObuff for the encryption/decryption method being used.
++ */
++ void
++ crypt_append_msg(buf)
++ buf_T *buf;
++ {
++ if (crypt_get_method_nr(buf) == 0)
++ STRCAT(IObuff, _("[crypted]"));
++ else
++ {
++ STRCAT(IObuff, "[");
++ STRCAT(IObuff, *buf->b_p_cm == NUL ? p_cm : buf->b_p_cm);
++ STRCAT(IObuff, "]");
++ }
++ }
++
++ #endif /* FEAT_CRYPT */
+*** ../vim-7.4.398/src/crypt_zip.c 2014-08-10 13:30:43.824787293 +0200
+--- src/crypt_zip.c 2014-08-09 15:31:32.493356185 +0200
+***************
+*** 0 ****
+--- 1,158 ----
++ /* vi:set ts=8 sts=4 sw=4:
++ *
++ * VIM - Vi IMproved by Bram Moolenaar
++ *
++ * Do ":help uganda" in Vim to read copying and usage conditions.
++ * Do ":help credits" in Vim to see a list of people who contributed.
++ * See README.txt for an overview of the Vim source code.
++ */
++
++ /*
++ * crypt_zip.c: Zip encryption support.
++ */
++ #include "vim.h"
++
++ #if defined(FEAT_CRYPT) || defined(PROTO)
++ /*
++ * Optional encryption support.
++ * Mohsin Ahmed, mosh@sasi.com, 98-09-24
++ * Based on zip/crypt sources.
++ *
++ * NOTE FOR USA: Since 2000 exporting this code from the USA is allowed to
++ * most countries. There are a few exceptions, but that still should not be a
++ * problem since this code was originally created in Europe and India.
++ */
++
++ /* Need a type that should be 32 bits. 64 also works but wastes space. */
++ # if VIM_SIZEOF_INT >= 4
++ typedef unsigned int u32_T; /* int is at least 32 bits */
++ # else
++ typedef unsigned long u32_T; /* long should be 32 bits or more */
++ # endif
++
++ /* The state of encryption, referenced by cryptstate_T. */
++ typedef struct {
++ u32_T keys[3];
++ } zip_state_T;
++
++
++ static void make_crc_tab __ARGS((void));
++
++ static u32_T crc_32_table[256];
++
++ /*
++ * Fill the CRC table, if not done already.
++ */
++ static void
++ make_crc_tab()
++ {
++ u32_T s, t, v;
++ static int done = FALSE;
++
++ if (done)
++ return;
++ for (t = 0; t < 256; t++)
++ {
++ v = t;
++ for (s = 0; s < 8; s++)
++ v = (v >> 1) ^ ((v & 1) * (u32_T)0xedb88320L);
++ crc_32_table[t] = v;
++ }
++ done = TRUE;
++ }
++
++ #define CRC32(c, b) (crc_32_table[((int)(c) ^ (b)) & 0xff] ^ ((c) >> 8))
++
++ /*
++ * Return the next byte in the pseudo-random sequence.
++ */
++ #define DECRYPT_BYTE_ZIP(keys, t) { \
++ short_u temp = (short_u)keys[2] | 2; \
++ t = (int)(((unsigned)(temp * (temp ^ 1U)) >> 8) & 0xff); \
++ }
++
++ /*
++ * Update the encryption keys with the next byte of plain text.
++ */
++ #define UPDATE_KEYS_ZIP(keys, c) { \
++ keys[0] = CRC32(keys[0], (c)); \
++ keys[1] += keys[0] & 0xff; \
++ keys[1] = keys[1] * 134775813L + 1; \
++ keys[2] = CRC32(keys[2], (int)(keys[1] >> 24)); \
++ }
++
++ /*
++ * Initialize for encryption/decryption.
++ */
++ void
++ crypt_zip_init(state, key, salt, salt_len, seed, seed_len)
++ cryptstate_T *state;
++ char_u *key;
++ char_u *salt UNUSED;
++ int salt_len UNUSED;
++ char_u *seed UNUSED;
++ int seed_len UNUSED;
++ {
++ char_u *p;
++ zip_state_T *zs;
++
++ zs = (zip_state_T *)alloc(sizeof(zip_state_T));
++ state->method_state = zs;
++
++ make_crc_tab();
++ zs->keys[0] = 305419896L;
++ zs->keys[1] = 591751049L;
++ zs->keys[2] = 878082192L;
++ for (p = key; *p != NUL; ++p)
++ {
++ UPDATE_KEYS_ZIP(zs->keys, (int)*p);
++ }
++ }
++
++ /*
++ * Encrypt "from[len]" into "to[len]".
++ * "from" and "to" can be equal to encrypt in place.
++ */
++ void
++ crypt_zip_encode(state, from, len, to)
++ cryptstate_T *state;
++ char_u *from;
++ size_t len;
++ char_u *to;
++ {
++ zip_state_T *zs = state->method_state;
++ size_t i;
++ int ztemp, t;
++
++ for (i = 0; i < len; ++i)
++ {
++ ztemp = from[i];
++ DECRYPT_BYTE_ZIP(zs->keys, t);
++ UPDATE_KEYS_ZIP(zs->keys, ztemp);
++ to[i] = t ^ ztemp;
++ }
++ }
++
++ /*
++ * Decrypt "from[len]" into "to[len]".
++ */
++ void
++ crypt_zip_decode(state, from, len, to)
++ cryptstate_T *state;
++ char_u *from;
++ size_t len;
++ char_u *to;
++ {
++ zip_state_T *zs = state->method_state;
++ size_t i;
++ short_u temp;
++
++ for (i = 0; i < len; ++i)
++ {
++ temp = (short_u)zs->keys[2] | 2;
++ temp = (int)(((unsigned)(temp * (temp ^ 1U)) >> 8) & 0xff);
++ UPDATE_KEYS_ZIP(zs->keys, to[i] = from[i] ^ temp);
++ }
++ }
++
++ #endif /* FEAT_CRYPT */
+*** ../vim-7.4.398/src/ex_docmd.c 2014-08-06 18:17:03.475147780 +0200
+--- src/ex_docmd.c 2014-08-09 15:31:32.493356185 +0200
+***************
+*** 11506,11513 ****
+ ex_X(eap)
+ exarg_T *eap UNUSED;
+ {
+! if (get_crypt_method(curbuf) == 0 || blowfish_self_test() == OK)
+! (void)get_crypt_key(TRUE, TRUE);
+ }
+ #endif
+
+--- 11506,11512 ----
+ ex_X(eap)
+ exarg_T *eap UNUSED;
+ {
+! (void)crypt_get_key(TRUE, TRUE);
+ }
+ #endif
+
+*** ../vim-7.4.398/src/fileio.c 2014-06-12 14:01:27.575769788 +0200
+--- src/fileio.c 2014-08-09 15:31:32.497356185 +0200
+***************
+*** 24,43 ****
+ #define BUFSIZE 8192 /* size of normal write buffer */
+ #define SMBUFSIZE 256 /* size of emergency write buffer */
+
+- #ifdef FEAT_CRYPT
+- /* crypt_magic[0] is pkzip crypt, crypt_magic[1] is sha2+blowfish */
+- static char *crypt_magic[] = {"VimCrypt~01!", "VimCrypt~02!"};
+- static char crypt_magic_head[] = "VimCrypt~";
+- # define CRYPT_MAGIC_LEN 12 /* must be multiple of 4! */
+-
+- /* For blowfish, after the magic header, we store 8 bytes of salt and then 8
+- * bytes of seed (initialisation vector). */
+- static int crypt_salt_len[] = {0, 8};
+- static int crypt_seed_len[] = {0, 8};
+- #define CRYPT_SALT_LEN_MAX 8
+- #define CRYPT_SEED_LEN_MAX 8
+- #endif
+-
+ /* Is there any system that doesn't have access()? */
+ #define USE_MCH_ACCESS
+
+--- 24,29 ----
+***************
+*** 55,61 ****
+ static void check_marks_read __ARGS((void));
+ #endif
+ #ifdef FEAT_CRYPT
+- static int crypt_method_from_magic __ARGS((char *ptr, int len));
+ static char_u *check_for_cryptkey __ARGS((char_u *cryptkey, char_u *ptr, long *sizep, off_t *filesizep, int newfile, char_u *fname, int *did_ask));
+ #endif
+ #ifdef UNIX
+--- 41,46 ----
+***************
+*** 116,121 ****
+--- 101,109 ----
+ #ifdef HAS_BW_FLAGS
+ int bw_flags; /* FIO_ flags */
+ #endif
++ #ifdef FEAT_CRYPT
++ buf_T *bw_buffer; /* buffer being written */
++ #endif
+ #ifdef FEAT_MBYTE
+ char_u bw_rest[CONV_RESTLEN]; /* not converted bytes */
+ int bw_restlen; /* nr of bytes in bw_rest[] */
+***************
+*** 250,256 ****
+ #ifdef FEAT_CRYPT
+ char_u *cryptkey = NULL;
+ int did_ask_for_key = FALSE;
+- int crypt_method_used;
+ #endif
+ #ifdef FEAT_PERSISTENT_UNDO
+ context_sha256_T sha_ctx;
+--- 238,243 ----
+***************
+*** 966,978 ****
+ #endif
+ }
+
+- #ifdef FEAT_CRYPT
+- if (cryptkey != NULL)
+- /* Need to reset the state, but keep the key, don't want to ask for it
+- * again. */
+- crypt_pop_state();
+- #endif
+-
+ /*
+ * When retrying with another "fenc" and the first time "fileformat"
+ * will be reset.
+--- 953,958 ----
+***************
+*** 1175,1180 ****
+--- 1155,1169 ----
+ if (read_undo_file)
+ sha256_start(&sha_ctx);
+ #endif
++ #ifdef FEAT_CRYPT
++ if (curbuf->b_cryptstate != NULL)
++ {
++ /* Need to free the state, but keep the key, don't want to ask for
++ * it again. */
++ crypt_free_state(curbuf->b_cryptstate);
++ curbuf->b_cryptstate = NULL;
++ }
++ #endif
+ }
+
+ while (!error && !got_int)
+***************
+*** 1339,1344 ****
+--- 1328,1403 ----
+ size = read_eintr(fd, ptr, size);
+ }
+
++ #ifdef FEAT_CRYPT
++ /*
++ * At start of file: Check for magic number of encryption.
++ */
++ if (filesize == 0 && size > 0)
++ cryptkey = check_for_cryptkey(cryptkey, ptr, &size,
++ &filesize, newfile, sfname,
++ &did_ask_for_key);
++ /*
++ * Decrypt the read bytes. This is done before checking for
++ * EOF because the crypt layer may be buffering.
++ */
++ if (cryptkey != NULL && size > 0)
++ {
++ if (crypt_works_inplace(curbuf->b_cryptstate))
++ {
++ crypt_decode_inplace(curbuf->b_cryptstate, ptr, size);
++ }
++ else
++ {
++ char_u *newptr = NULL;
++ int decrypted_size;
++
++ decrypted_size = crypt_decode_alloc(
++ curbuf->b_cryptstate, ptr, size, &newptr);
++
++ /* If the crypt layer is buffering, not producing
++ * anything yet, need to read more. */
++ if (size > 0 && decrypted_size == 0)
++ continue;
++
++ if (linerest == 0)
++ {
++ /* Simple case: reuse returned buffer (may be
++ * NULL, checked later). */
++ new_buffer = newptr;
++ }
++ else
++ {
++ long_u new_size;
++
++ /* Need new buffer to add bytes carried over. */
++ new_size = (long_u)(decrypted_size + linerest + 1);
++ new_buffer = lalloc(new_size, FALSE);
++ if (new_buffer == NULL)
++ {
++ do_outofmem_msg(new_size);
++ error = TRUE;
++ break;
++ }
++
++ mch_memmove(new_buffer, buffer, linerest);
++ if (newptr != NULL)
++ mch_memmove(new_buffer + linerest, newptr,
++ decrypted_size);
++ }
++
++ if (new_buffer != NULL)
++ {
++ vim_free(buffer);
++ buffer = new_buffer;
++ new_buffer = NULL;
++ line_start = buffer;
++ ptr = buffer + linerest;
++ }
++ size = decrypted_size;
++ }
++ }
++ #endif
++
+ if (size <= 0)
+ {
+ if (size < 0) /* read error */
+***************
+*** 1403,1423 ****
+ }
+ #endif
+ }
+-
+- #ifdef FEAT_CRYPT
+- /*
+- * At start of file: Check for magic number of encryption.
+- */
+- if (filesize == 0)
+- cryptkey = check_for_cryptkey(cryptkey, ptr, &size,
+- &filesize, newfile, sfname,
+- &did_ask_for_key);
+- /*
+- * Decrypt the read bytes.
+- */
+- if (cryptkey != NULL && size > 0)
+- crypt_decode(ptr, size);
+- #endif
+ }
+ skip_read = FALSE;
+
+--- 1462,1467 ----
+***************
+*** 1430,1439 ****
+ */
+ if ((filesize == 0
+ # ifdef FEAT_CRYPT
+! || (filesize == (CRYPT_MAGIC_LEN
+! + crypt_salt_len[use_crypt_method]
+! + crypt_seed_len[use_crypt_method])
+! && cryptkey != NULL)
+ # endif
+ )
+ && (fio_flags == FIO_UCSBOM
+--- 1474,1482 ----
+ */
+ if ((filesize == 0
+ # ifdef FEAT_CRYPT
+! || (cryptkey != NULL
+! && filesize == crypt_get_header_len(
+! crypt_get_method_nr(curbuf)))
+ # endif
+ )
+ && (fio_flags == FIO_UCSBOM
+***************
+*** 2262,2276 ****
+ save_file_ff(curbuf); /* remember the current file format */
+
+ #ifdef FEAT_CRYPT
+! crypt_method_used = use_crypt_method;
+! if (cryptkey != NULL)
+ {
+! crypt_pop_state();
+! if (cryptkey != curbuf->b_p_key)
+! free_crypt_key(cryptkey);
+! /* don't set cryptkey to NULL, it's used below as a flag that
+! * encryption was used */
+ }
+ #endif
+
+ #ifdef FEAT_MBYTE
+--- 2305,2319 ----
+ save_file_ff(curbuf); /* remember the current file format */
+
+ #ifdef FEAT_CRYPT
+! if (curbuf->b_cryptstate != NULL)
+ {
+! crypt_free_state(curbuf->b_cryptstate);
+! curbuf->b_cryptstate = NULL;
+ }
++ if (cryptkey != NULL && cryptkey != curbuf->b_p_key)
++ crypt_free_key(cryptkey);
++ /* Don't set cryptkey to NULL, it's used below as a flag that
++ * encryption was used. */
+ #endif
+
+ #ifdef FEAT_MBYTE
+***************
+*** 2457,2466 ****
+ #ifdef FEAT_CRYPT
+ if (cryptkey != NULL)
+ {
+! if (crypt_method_used == 1)
+! STRCAT(IObuff, _("[blowfish]"));
+! else
+! STRCAT(IObuff, _("[crypted]"));
+ c = TRUE;
+ }
+ #endif
+--- 2500,2506 ----
+ #ifdef FEAT_CRYPT
+ if (cryptkey != NULL)
+ {
+! crypt_append_msg(curbuf);
+ c = TRUE;
+ }
+ #endif
+***************
+*** 2489,2497 ****
+ #ifdef FEAT_CRYPT
+ if (cryptkey != NULL)
+ msg_add_lines(c, (long)linecnt, filesize
+! - CRYPT_MAGIC_LEN
+! - crypt_salt_len[use_crypt_method]
+! - crypt_seed_len[use_crypt_method]);
+ else
+ #endif
+ msg_add_lines(c, (long)linecnt, filesize);
+--- 2529,2535 ----
+ #ifdef FEAT_CRYPT
+ if (cryptkey != NULL)
+ msg_add_lines(c, (long)linecnt, filesize
+! - crypt_get_header_len(crypt_get_method_nr(curbuf)));
+ else
+ #endif
+ msg_add_lines(c, (long)linecnt, filesize);
+***************
+*** 2882,2914 ****
+
+ #if defined(FEAT_CRYPT) || defined(PROTO)
+ /*
+- * Get the crypt method used for a file from "ptr[len]", the magic text at the
+- * start of the file.
+- * Returns -1 when no encryption used.
+- */
+- static int
+- crypt_method_from_magic(ptr, len)
+- char *ptr;
+- int len;
+- {
+- int i;
+-
+- for (i = 0; i < (int)(sizeof(crypt_magic) / sizeof(crypt_magic[0])); i++)
+- {
+- if (len < (CRYPT_MAGIC_LEN + crypt_salt_len[i] + crypt_seed_len[i]))
+- continue;
+- if (memcmp(ptr, crypt_magic[i], CRYPT_MAGIC_LEN) == 0)
+- return i;
+- }
+-
+- i = (int)STRLEN(crypt_magic_head);
+- if (len >= i && memcmp(ptr, crypt_magic_head, i) == 0)
+- EMSG(_("E821: File is encrypted with unknown method"));
+-
+- return -1;
+- }
+-
+- /*
+ * Check for magic number used for encryption. Applies to the current buffer.
+ * If found, the magic number is removed from ptr[*sizep] and *sizep and
+ * *filesizep are updated.
+--- 2920,2925 ----
+***************
+*** 2924,2930 ****
+ char_u *fname; /* file name to display */
+ int *did_ask; /* flag: whether already asked for key */
+ {
+! int method = crypt_method_from_magic((char *)ptr, *sizep);
+ int b_p_ro = curbuf->b_p_ro;
+
+ if (method >= 0)
+--- 2935,2941 ----
+ char_u *fname; /* file name to display */
+ int *did_ask; /* flag: whether already asked for key */
+ {
+! int method = crypt_method_nr_from_magic((char *)ptr, *sizep);
+ int b_p_ro = curbuf->b_p_ro;
+
+ if (method >= 0)
+***************
+*** 2933,2941 ****
+ * Avoids accidentally overwriting the file with garbage. */
+ curbuf->b_p_ro = TRUE;
+
+! set_crypt_method(curbuf, method);
+! if (method > 0)
+! (void)blowfish_self_test();
+ if (cryptkey == NULL && !*did_ask)
+ {
+ if (*curbuf->b_p_key)
+--- 2944,2950 ----
+ * Avoids accidentally overwriting the file with garbage. */
+ curbuf->b_p_ro = TRUE;
+
+! crypt_set_cm_option(curbuf, method);
+ if (cryptkey == NULL && !*did_ask)
+ {
+ if (*curbuf->b_p_key)
+***************
+*** 2948,2954 ****
+ * Happens when retrying to detect encoding. */
+ smsg((char_u *)_(need_key_msg), fname);
+ msg_scroll = TRUE;
+! cryptkey = get_crypt_key(newfile, FALSE);
+ *did_ask = TRUE;
+
+ /* check if empty key entered */
+--- 2957,2963 ----
+ * Happens when retrying to detect encoding. */
+ smsg((char_u *)_(need_key_msg), fname);
+ msg_scroll = TRUE;
+! cryptkey = crypt_get_key(newfile, FALSE);
+ *did_ask = TRUE;
+
+ /* check if empty key entered */
+***************
+*** 2963,2986 ****
+
+ if (cryptkey != NULL)
+ {
+! int seed_len = crypt_seed_len[method];
+! int salt_len = crypt_salt_len[method];
+
+! crypt_push_state();
+! use_crypt_method = method;
+! if (method == 0)
+! crypt_init_keys(cryptkey);
+! else
+! {
+! bf_key_init(cryptkey, ptr + CRYPT_MAGIC_LEN, salt_len);
+! bf_cfb_init(ptr + CRYPT_MAGIC_LEN + salt_len, seed_len);
+! }
+
+- /* Remove magic number from the text */
+- *filesizep += CRYPT_MAGIC_LEN + salt_len + seed_len;
+- *sizep -= CRYPT_MAGIC_LEN + salt_len + seed_len;
+- mch_memmove(ptr, ptr + CRYPT_MAGIC_LEN + salt_len + seed_len,
+- (size_t)*sizep);
+ /* Restore the read-only flag. */
+ curbuf->b_p_ro = b_p_ro;
+ }
+--- 2972,2989 ----
+
+ if (cryptkey != NULL)
+ {
+! int header_len;
+
+! curbuf->b_cryptstate = crypt_create_from_header(
+! method, cryptkey, ptr);
+! crypt_set_cm_option(curbuf, method);
+!
+! /* Remove cryptmethod specific header from the text. */
+! header_len = crypt_get_header_len(method);
+! *filesizep += header_len;
+! *sizep -= header_len;
+! mch_memmove(ptr, ptr + header_len, (size_t)*sizep);
+
+ /* Restore the read-only flag. */
+ curbuf->b_p_ro = b_p_ro;
+ }
+***************
+*** 2992,3076 ****
+
+ return cryptkey;
+ }
+-
+- /*
+- * Check for magic number used for encryption. Applies to the current buffer.
+- * If found and decryption is possible returns OK;
+- */
+- int
+- prepare_crypt_read(fp)
+- FILE *fp;
+- {
+- int method;
+- char_u buffer[CRYPT_MAGIC_LEN + CRYPT_SALT_LEN_MAX
+- + CRYPT_SEED_LEN_MAX + 2];
+-
+- if (fread(buffer, CRYPT_MAGIC_LEN, 1, fp) != 1)
+- return FAIL;
+- method = crypt_method_from_magic((char *)buffer,
+- CRYPT_MAGIC_LEN +
+- CRYPT_SEED_LEN_MAX +
+- CRYPT_SALT_LEN_MAX);
+- if (method < 0 || method != get_crypt_method(curbuf))
+- return FAIL;
+-
+- crypt_push_state();
+- if (method == 0)
+- crypt_init_keys(curbuf->b_p_key);
+- else
+- {
+- int salt_len = crypt_salt_len[method];
+- int seed_len = crypt_seed_len[method];
+-
+- if (fread(buffer, salt_len + seed_len, 1, fp) != 1)
+- return FAIL;
+- bf_key_init(curbuf->b_p_key, buffer, salt_len);
+- bf_cfb_init(buffer + salt_len, seed_len);
+- }
+- return OK;
+- }
+-
+- /*
+- * Prepare for writing encrypted bytes for buffer "buf".
+- * Returns a pointer to an allocated header of length "*lenp".
+- * When out of memory returns NULL.
+- * Otherwise calls crypt_push_state(), call crypt_pop_state() later.
+- */
+- char_u *
+- prepare_crypt_write(buf, lenp)
+- buf_T *buf;
+- int *lenp;
+- {
+- char_u *header;
+- int seed_len = crypt_seed_len[get_crypt_method(buf)];
+- int salt_len = crypt_salt_len[get_crypt_method(buf)];
+- char_u *salt;
+- char_u *seed;
+-
+- header = alloc_clear(CRYPT_MAGIC_LEN + CRYPT_SALT_LEN_MAX
+- + CRYPT_SEED_LEN_MAX + 2);
+- if (header != NULL)
+- {
+- crypt_push_state();
+- use_crypt_method = get_crypt_method(buf); /* select zip or blowfish */
+- vim_strncpy(header, (char_u *)crypt_magic[use_crypt_method],
+- CRYPT_MAGIC_LEN);
+- if (use_crypt_method == 0)
+- crypt_init_keys(buf->b_p_key);
+- else
+- {
+- /* Using blowfish, add salt and seed. */
+- salt = header + CRYPT_MAGIC_LEN;
+- seed = salt + salt_len;
+- sha2_seed(salt, salt_len, seed, seed_len);
+- bf_key_init(buf->b_p_key, salt, salt_len);
+- bf_cfb_init(seed, seed_len);
+- }
+- }
+- *lenp = CRYPT_MAGIC_LEN + salt_len + seed_len;
+- return header;
+- }
+-
+ #endif /* FEAT_CRYPT */
+
+ #ifdef UNIX
+--- 2995,3000 ----
+***************
+*** 3224,3232 ****
+ int write_undo_file = FALSE;
+ context_sha256_T sha_ctx;
+ #endif
+- #ifdef FEAT_CRYPT
+- int crypt_method_used;
+- #endif
+
+ if (fname == NULL || *fname == NUL) /* safety check */
+ return FAIL;
+--- 3148,3153 ----
+***************
+*** 3262,3267 ****
+--- 3183,3191 ----
+ write_info.bw_iconv_fd = (iconv_t)-1;
+ # endif
+ #endif
++ #ifdef FEAT_CRYPT
++ write_info.bw_buffer = buf;
++ #endif
+
+ /* After writing a file changedtick changes but we don't want to display
+ * the line. */
+***************
+*** 4505,4521 ****
+ #ifdef FEAT_CRYPT
+ if (*buf->b_p_key != NUL && !filtering)
+ {
+! char_u *header;
+! int header_len;
+
+! header = prepare_crypt_write(buf, &header_len);
+! if (header == NULL)
+ end = 0;
+ else
+ {
+! /* Write magic number, so that Vim knows that this file is
+! * encrypted when reading it again. This also undergoes utf-8 to
+! * ucs-2/4 conversion when needed. */
+ write_info.bw_buf = header;
+ write_info.bw_len = header_len;
+ write_info.bw_flags = FIO_NOCONVERT;
+--- 4429,4445 ----
+ #ifdef FEAT_CRYPT
+ if (*buf->b_p_key != NUL && !filtering)
+ {
+! char_u *header;
+! int header_len;
+
+! buf->b_cryptstate = crypt_create_for_writing(crypt_get_method_nr(buf),
+! buf->b_p_key, &header, &header_len);
+! if (buf->b_cryptstate == NULL || header == NULL)
+ end = 0;
+ else
+ {
+! /* Write magic number, so that Vim knows how this file is
+! * encrypted when reading it back. */
+ write_info.bw_buf = header;
+ write_info.bw_len = header_len;
+ write_info.bw_flags = FIO_NOCONVERT;
+***************
+*** 4769,4780 ****
+ mch_set_acl(wfname, acl);
+ #endif
+ #ifdef FEAT_CRYPT
+! crypt_method_used = use_crypt_method;
+! if (wb_flags & FIO_ENCRYPTED)
+! crypt_pop_state();
+ #endif
+
+-
+ #if defined(FEAT_MBYTE) && defined(FEAT_EVAL)
+ if (wfname != fname)
+ {
+--- 4693,4705 ----
+ mch_set_acl(wfname, acl);
+ #endif
+ #ifdef FEAT_CRYPT
+! if (buf->b_cryptstate != NULL)
+! {
+! crypt_free_state(buf->b_cryptstate);
+! buf->b_cryptstate = NULL;
+! }
+ #endif
+
+ #if defined(FEAT_MBYTE) && defined(FEAT_EVAL)
+ if (wfname != fname)
+ {
+***************
+*** 4924,4933 ****
+ #ifdef FEAT_CRYPT
+ if (wb_flags & FIO_ENCRYPTED)
+ {
+! if (crypt_method_used == 1)
+! STRCAT(IObuff, _("[blowfish]"));
+! else
+! STRCAT(IObuff, _("[crypted]"));
+ c = TRUE;
+ }
+ #endif
+--- 4849,4855 ----
+ #ifdef FEAT_CRYPT
+ if (wb_flags & FIO_ENCRYPTED)
+ {
+! crypt_append_msg(buf);
+ c = TRUE;
+ }
+ #endif
+***************
+*** 5740,5747 ****
+ #endif /* FEAT_MBYTE */
+
+ #ifdef FEAT_CRYPT
+! if (flags & FIO_ENCRYPTED) /* encrypt the data */
+! crypt_encode(buf, len, buf);
+ #endif
+
+ wlen = write_eintr(ip->bw_fd, buf, len);
+--- 5662,5687 ----
+ #endif /* FEAT_MBYTE */
+
+ #ifdef FEAT_CRYPT
+! if (flags & FIO_ENCRYPTED)
+! {
+! /* Encrypt the data. Do it in-place if possible, otherwise use an
+! * allocated buffer. */
+! if (crypt_works_inplace(ip->bw_buffer->b_cryptstate))
+! {
+! crypt_encode_inplace(ip->bw_buffer->b_cryptstate, buf, len);
+! }
+! else
+! {
+! char_u *outbuf;
+!
+! len = crypt_encode_alloc(curbuf->b_cryptstate, buf, len, &outbuf);
+! if (len == 0)
+! return OK; /* Crypt layer is buffering, will flush later. */
+! wlen = write_eintr(ip->bw_fd, outbuf, len);
+! vim_free(outbuf);
+! return (wlen < len) ? FAIL : OK;
+! }
+! }
+ #endif
+
+ wlen = write_eintr(ip->bw_fd, buf, len);
+*** ../vim-7.4.398/src/globals.h 2014-08-06 18:17:03.475147780 +0200
+--- src/globals.h 2014-08-09 15:31:32.497356185 +0200
+***************
+*** 105,114 ****
+
+ EXTERN int screen_cleared INIT(= FALSE); /* screen has been cleared */
+
+- #ifdef FEAT_CRYPT
+- EXTERN int use_crypt_method INIT(= 0);
+- #endif
+-
+ /*
+ * When '$' is included in 'cpoptions' option set:
+ * When a change command is given that deletes only part of a line, a dollar
+--- 105,110 ----
+*** ../vim-7.4.398/src/main.c 2014-05-28 18:22:37.876225054 +0200
+--- src/main.c 2014-08-09 15:31:32.497356185 +0200
+***************
+*** 846,853 ****
+ #ifdef FEAT_CRYPT
+ if (params.ask_for_key)
+ {
+! (void)blowfish_self_test();
+! (void)get_crypt_key(TRUE, TRUE);
+ TIME_MSG("getting crypt key");
+ }
+ #endif
+--- 846,852 ----
+ #ifdef FEAT_CRYPT
+ if (params.ask_for_key)
+ {
+! (void)crypt_get_key(TRUE, TRUE);
+ TIME_MSG("getting crypt key");
+ }
+ #endif
+*** ../vim-7.4.398/src/memline.c 2014-03-23 16:03:56.171311627 +0100
+--- src/memline.c 2014-08-09 15:39:22.629352806 +0200
+***************
+*** 63,68 ****
+--- 63,77 ----
+ #define BLOCK0_ID1 '0' /* block 0 id 1 */
+ #define BLOCK0_ID1_C0 'c' /* block 0 id 1 'cm' 0 */
+ #define BLOCK0_ID1_C1 'C' /* block 0 id 1 'cm' 1 */
++ #define BLOCK0_ID1_C2 'd' /* block 0 id 1 'cm' 2 */
++
++ #if defined(FEAT_CRYPT)
++ static int id1_codes[] = {
++ BLOCK0_ID1_C0, /* CRYPT_M_ZIP */
++ BLOCK0_ID1_C1, /* CRYPT_M_BF */
++ BLOCK0_ID1_C2, /* CRYPT_M_BF2 */
++ };
++ #endif
+
+ /*
+ * pointer to a block, used in a pointer block
+***************
+*** 151,157 ****
+ struct block0
+ {
+ char_u b0_id[2]; /* id for block 0: BLOCK0_ID0 and BLOCK0_ID1,
+! * BLOCK0_ID1_C0, BLOCK0_ID1_C1 */
+ char_u b0_version[10]; /* Vim version string */
+ char_u b0_page_size[4];/* number of bytes per page */
+ char_u b0_mtime[4]; /* last modification time of file */
+--- 160,166 ----
+ struct block0
+ {
+ char_u b0_id[2]; /* id for block 0: BLOCK0_ID0 and BLOCK0_ID1,
+! * BLOCK0_ID1_C0, BLOCK0_ID1_C1, etc. */
+ char_u b0_version[10]; /* Vim version string */
+ char_u b0_page_size[4];/* number of bytes per page */
+ char_u b0_mtime[4]; /* last modification time of file */
+***************
+*** 256,262 ****
+ static char_u *make_percent_swname __ARGS((char_u *dir, char_u *name));
+ #endif
+ #ifdef FEAT_CRYPT
+! static void ml_crypt_prepare __ARGS((memfile_T *mfp, off_t offset, int reading));
+ #endif
+ #ifdef FEAT_BYTEOFF
+ static void ml_updatechunk __ARGS((buf_T *buf, long line, long len, int updtype));
+--- 265,271 ----
+ static char_u *make_percent_swname __ARGS((char_u *dir, char_u *name));
+ #endif
+ #ifdef FEAT_CRYPT
+! static cryptstate_T *ml_crypt_prepare __ARGS((memfile_T *mfp, off_t offset, int reading));
+ #endif
+ #ifdef FEAT_BYTEOFF
+ static void ml_updatechunk __ARGS((buf_T *buf, long line, long len, int updtype));
+***************
+*** 359,366 ****
+ b0p->b0_hname[B0_HNAME_SIZE - 1] = NUL;
+ long_to_char(mch_get_pid(), b0p->b0_pid);
+ #ifdef FEAT_CRYPT
+! if (*buf->b_p_key != NUL)
+! ml_set_b0_crypt(buf, b0p);
+ #endif
+ }
+
+--- 368,374 ----
+ b0p->b0_hname[B0_HNAME_SIZE - 1] = NUL;
+ long_to_char(mch_get_pid(), b0p->b0_pid);
+ #ifdef FEAT_CRYPT
+! ml_set_b0_crypt(buf, b0p);
+ #endif
+ }
+
+***************
+*** 436,446 ****
+ b0p->b0_id[1] = BLOCK0_ID1;
+ else
+ {
+! if (get_crypt_method(buf) == 0)
+! b0p->b0_id[1] = BLOCK0_ID1_C0;
+! else
+ {
+- b0p->b0_id[1] = BLOCK0_ID1_C1;
+ /* Generate a seed and store it in block 0 and in the memfile. */
+ sha2_seed(&b0p->b0_seed, MF_SEED_LEN, NULL, 0);
+ mch_memmove(buf->b_ml.ml_mfp->mf_seed, &b0p->b0_seed, MF_SEED_LEN);
+--- 444,454 ----
+ b0p->b0_id[1] = BLOCK0_ID1;
+ else
+ {
+! int method_nr = crypt_get_method_nr(buf);
+!
+! b0p->b0_id[1] = id1_codes[method_nr];
+! if (method_nr > CRYPT_M_ZIP)
+ {
+ /* Generate a seed and store it in block 0 and in the memfile. */
+ sha2_seed(&b0p->b0_seed, MF_SEED_LEN, NULL, 0);
+ mch_memmove(buf->b_ml.ml_mfp->mf_seed, &b0p->b0_seed, MF_SEED_LEN);
+***************
+*** 887,893 ****
+ if (b0p->b0_id[0] != BLOCK0_ID0
+ || (b0p->b0_id[1] != BLOCK0_ID1
+ && b0p->b0_id[1] != BLOCK0_ID1_C0
+! && b0p->b0_id[1] != BLOCK0_ID1_C1)
+ )
+ return FAIL;
+ return OK;
+--- 895,902 ----
+ if (b0p->b0_id[0] != BLOCK0_ID0
+ || (b0p->b0_id[1] != BLOCK0_ID1
+ && b0p->b0_id[1] != BLOCK0_ID1_C0
+! && b0p->b0_id[1] != BLOCK0_ID1_C1
+! && b0p->b0_id[1] != BLOCK0_ID1_C2)
+ )
+ return FAIL;
+ return OK;
+***************
+*** 1255,1268 ****
+ }
+
+ #ifdef FEAT_CRYPT
+! if (b0p->b0_id[1] == BLOCK0_ID1_C0)
+! b0_cm = 0;
+! else if (b0p->b0_id[1] == BLOCK0_ID1_C1)
+! {
+! b0_cm = 1;
+ mch_memmove(mfp->mf_seed, &b0p->b0_seed, MF_SEED_LEN);
+! }
+! set_crypt_method(buf, b0_cm);
+ #else
+ if (b0p->b0_id[1] != BLOCK0_ID1)
+ {
+--- 1264,1275 ----
+ }
+
+ #ifdef FEAT_CRYPT
+! for (i = 0; i < (int)(sizeof(id1_codes) / sizeof(int)); ++i)
+! if (id1_codes[i] == b0p->b0_id[1])
+! b0_cm = i;
+! if (b0_cm > 0)
+ mch_memmove(mfp->mf_seed, &b0p->b0_seed, MF_SEED_LEN);
+! crypt_set_cm_option(buf, b0_cm < 0 ? 0 : b0_cm);
+ #else
+ if (b0p->b0_id[1] != BLOCK0_ID1)
+ {
+***************
+*** 1389,1395 ****
+ }
+ else
+ smsg((char_u *)_(need_key_msg), fname_used);
+! buf->b_p_key = get_crypt_key(FALSE, FALSE);
+ if (buf->b_p_key == NULL)
+ buf->b_p_key = curbuf->b_p_key;
+ else if (*buf->b_p_key == NUL)
+--- 1396,1402 ----
+ }
+ else
+ smsg((char_u *)_(need_key_msg), fname_used);
+! buf->b_p_key = crypt_get_key(FALSE, FALSE);
+ if (buf->b_p_key == NULL)
+ buf->b_p_key = curbuf->b_p_key;
+ else if (*buf->b_p_key == NUL)
+***************
+*** 4816,4821 ****
+--- 4823,4829 ----
+ char_u *text_start;
+ char_u *new_data;
+ int text_len;
++ cryptstate_T *state;
+
+ if (dp->db_id != DATA_ID)
+ return data;
+***************
+*** 4831,4840 ****
+ mch_memmove(new_data, dp, head_end - (char_u *)dp);
+
+ /* Encrypt the text. */
+! crypt_push_state();
+! ml_crypt_prepare(mfp, offset, FALSE);
+! crypt_encode(text_start, text_len, new_data + dp->db_txt_start);
+! crypt_pop_state();
+
+ /* Clear the gap. */
+ if (head_end < text_start)
+--- 4839,4847 ----
+ mch_memmove(new_data, dp, head_end - (char_u *)dp);
+
+ /* Encrypt the text. */
+! state = ml_crypt_prepare(mfp, offset, FALSE);
+! crypt_encode(state, text_start, text_len, new_data + dp->db_txt_start);
+! crypt_free_state(state);
+
+ /* Clear the gap. */
+ if (head_end < text_start)
+***************
+*** 4857,4862 ****
+--- 4864,4870 ----
+ char_u *head_end;
+ char_u *text_start;
+ int text_len;
++ cryptstate_T *state;
+
+ if (dp->db_id == DATA_ID)
+ {
+***************
+*** 4869,4885 ****
+ return; /* data was messed up */
+
+ /* Decrypt the text in place. */
+! crypt_push_state();
+! ml_crypt_prepare(mfp, offset, TRUE);
+! crypt_decode(text_start, text_len);
+! crypt_pop_state();
+ }
+ }
+
+ /*
+ * Prepare for encryption/decryption, using the key, seed and offset.
+ */
+! static void
+ ml_crypt_prepare(mfp, offset, reading)
+ memfile_T *mfp;
+ off_t offset;
+--- 4877,4893 ----
+ return; /* data was messed up */
+
+ /* Decrypt the text in place. */
+! state = ml_crypt_prepare(mfp, offset, TRUE);
+! crypt_decode_inplace(state, text_start, text_len);
+! crypt_free_state(state);
+ }
+ }
+
+ /*
+ * Prepare for encryption/decryption, using the key, seed and offset.
++ * Return an allocated cryptstate_T *.
+ */
+! static cryptstate_T *
+ ml_crypt_prepare(mfp, offset, reading)
+ memfile_T *mfp;
+ off_t offset;
+***************
+*** 4887,4924 ****
+ {
+ buf_T *buf = mfp->mf_buffer;
+ char_u salt[50];
+! int method;
+ char_u *key;
+ char_u *seed;
+
+ if (reading && mfp->mf_old_key != NULL)
+ {
+ /* Reading back blocks with the previous key/method/seed. */
+! method = mfp->mf_old_cm;
+ key = mfp->mf_old_key;
+ seed = mfp->mf_old_seed;
+ }
+ else
+ {
+! method = get_crypt_method(buf);
+ key = buf->b_p_key;
+ seed = mfp->mf_seed;
+ }
+
+! use_crypt_method = method; /* select pkzip or blowfish */
+! if (method == 0)
+ {
+ vim_snprintf((char *)salt, sizeof(salt), "%s%ld", key, (long)offset);
+! crypt_init_keys(salt);
+! }
+! else
+! {
+! /* Using blowfish, add salt and seed. We use the byte offset of the
+! * block for the salt. */
+! vim_snprintf((char *)salt, sizeof(salt), "%ld", (long)offset);
+! bf_key_init(key, salt, (int)STRLEN(salt));
+! bf_cfb_init(seed, MF_SEED_LEN);
+ }
+ }
+
+ #endif
+--- 4895,4931 ----
+ {
+ buf_T *buf = mfp->mf_buffer;
+ char_u salt[50];
+! int method_nr;
+ char_u *key;
+ char_u *seed;
+
+ if (reading && mfp->mf_old_key != NULL)
+ {
+ /* Reading back blocks with the previous key/method/seed. */
+! method_nr = mfp->mf_old_cm;
+ key = mfp->mf_old_key;
+ seed = mfp->mf_old_seed;
+ }
+ else
+ {
+! method_nr = crypt_get_method_nr(buf);
+ key = buf->b_p_key;
+ seed = mfp->mf_seed;
+ }
+
+! if (method_nr == CRYPT_M_ZIP)
+ {
++ /* For PKzip: Append the offset to the key, so that we use a different
++ * key for every block. */
+ vim_snprintf((char *)salt, sizeof(salt), "%s%ld", key, (long)offset);
+! return crypt_create(method_nr, salt, NULL, 0, NULL, 0);
+ }
++
++ /* Using blowfish or better: add salt and seed. We use the byte offset
++ * of the block for the salt. */
++ vim_snprintf((char *)salt, sizeof(salt), "%ld", (long)offset);
++ return crypt_create(method_nr, key, salt, (int)STRLEN(salt),
++ seed, MF_SEED_LEN);
+ }
+
+ #endif
+*** ../vim-7.4.398/src/misc2.c 2014-06-25 14:39:35.106348584 +0200
+--- src/misc2.c 2014-08-09 15:31:32.501356185 +0200
+***************
+*** 3803,4124 ****
+ #endif /* CURSOR_SHAPE */
+
+
+- #ifdef FEAT_CRYPT
+- /*
+- * Optional encryption support.
+- * Mohsin Ahmed, mosh@sasi.com, 98-09-24
+- * Based on zip/crypt sources.
+- *
+- * NOTE FOR USA: Since 2000 exporting this code from the USA is allowed to
+- * most countries. There are a few exceptions, but that still should not be a
+- * problem since this code was originally created in Europe and India.
+- *
+- * Blowfish addition originally made by Mohsin Ahmed,
+- * http://www.cs.albany.edu/~mosh 2010-03-14
+- * Based on blowfish by Bruce Schneier (http://www.schneier.com/blowfish.html)
+- * and sha256 by Christophe Devine.
+- */
+-
+- /* from zip.h */
+-
+- typedef unsigned short ush; /* unsigned 16-bit value */
+- typedef unsigned long ulg; /* unsigned 32-bit value */
+-
+- static void make_crc_tab __ARGS((void));
+-
+- static ulg crc_32_tab[256];
+-
+- /*
+- * Fill the CRC table.
+- */
+- static void
+- make_crc_tab()
+- {
+- ulg s,t,v;
+- static int done = FALSE;
+-
+- if (done)
+- return;
+- for (t = 0; t < 256; t++)
+- {
+- v = t;
+- for (s = 0; s < 8; s++)
+- v = (v >> 1) ^ ((v & 1) * (ulg)0xedb88320L);
+- crc_32_tab[t] = v;
+- }
+- done = TRUE;
+- }
+-
+- #define CRC32(c, b) (crc_32_tab[((int)(c) ^ (b)) & 0xff] ^ ((c) >> 8))
+-
+- static ulg keys[3]; /* keys defining the pseudo-random sequence */
+-
+- /*
+- * Return the next byte in the pseudo-random sequence.
+- */
+- #define DECRYPT_BYTE_ZIP(t) { \
+- ush temp; \
+- \
+- temp = (ush)keys[2] | 2; \
+- t = (int)(((unsigned)(temp * (temp ^ 1U)) >> 8) & 0xff); \
+- }
+-
+- /*
+- * Update the encryption keys with the next byte of plain text.
+- */
+- #define UPDATE_KEYS_ZIP(c) { \
+- keys[0] = CRC32(keys[0], (c)); \
+- keys[1] += keys[0] & 0xff; \
+- keys[1] = keys[1] * 134775813L + 1; \
+- keys[2] = CRC32(keys[2], (int)(keys[1] >> 24)); \
+- }
+-
+- static int crypt_busy = 0;
+- static ulg saved_keys[3];
+- static int saved_crypt_method;
+-
+- /*
+- * Return int value for crypt method string:
+- * 0 for "zip", the old method. Also for any non-valid value.
+- * 1 for "blowfish".
+- */
+- int
+- crypt_method_from_string(s)
+- char_u *s;
+- {
+- return *s == 'b' ? 1 : 0;
+- }
+-
+- /*
+- * Get the crypt method for buffer "buf" as a number.
+- */
+- int
+- get_crypt_method(buf)
+- buf_T *buf;
+- {
+- return crypt_method_from_string(*buf->b_p_cm == NUL ? p_cm : buf->b_p_cm);
+- }
+-
+- /*
+- * Set the crypt method for buffer "buf" to "method" using the int value as
+- * returned by crypt_method_from_string().
+- */
+- void
+- set_crypt_method(buf, method)
+- buf_T *buf;
+- int method;
+- {
+- free_string_option(buf->b_p_cm);
+- buf->b_p_cm = vim_strsave((char_u *)(method == 0 ? "zip" : "blowfish"));
+- }
+-
+- /*
+- * Prepare for initializing encryption. If already doing encryption then save
+- * the state.
+- * Must always be called symmetrically with crypt_pop_state().
+- */
+- void
+- crypt_push_state()
+- {
+- if (crypt_busy == 1)
+- {
+- /* save the state */
+- if (use_crypt_method == 0)
+- {
+- saved_keys[0] = keys[0];
+- saved_keys[1] = keys[1];
+- saved_keys[2] = keys[2];
+- }
+- else
+- bf_crypt_save();
+- saved_crypt_method = use_crypt_method;
+- }
+- else if (crypt_busy > 1)
+- EMSG2(_(e_intern2), "crypt_push_state()");
+- ++crypt_busy;
+- }
+-
+- /*
+- * End encryption. If doing encryption before crypt_push_state() then restore
+- * the saved state.
+- * Must always be called symmetrically with crypt_push_state().
+- */
+- void
+- crypt_pop_state()
+- {
+- --crypt_busy;
+- if (crypt_busy == 1)
+- {
+- use_crypt_method = saved_crypt_method;
+- if (use_crypt_method == 0)
+- {
+- keys[0] = saved_keys[0];
+- keys[1] = saved_keys[1];
+- keys[2] = saved_keys[2];
+- }
+- else
+- bf_crypt_restore();
+- }
+- }
+-
+- /*
+- * Encrypt "from[len]" into "to[len]".
+- * "from" and "to" can be equal to encrypt in place.
+- */
+- void
+- crypt_encode(from, len, to)
+- char_u *from;
+- size_t len;
+- char_u *to;
+- {
+- size_t i;
+- int ztemp, t;
+-
+- if (use_crypt_method == 0)
+- for (i = 0; i < len; ++i)
+- {
+- ztemp = from[i];
+- DECRYPT_BYTE_ZIP(t);
+- UPDATE_KEYS_ZIP(ztemp);
+- to[i] = t ^ ztemp;
+- }
+- else
+- bf_crypt_encode(from, len, to);
+- }
+-
+- /*
+- * Decrypt "ptr[len]" in place.
+- */
+- void
+- crypt_decode(ptr, len)
+- char_u *ptr;
+- long len;
+- {
+- char_u *p;
+-
+- if (use_crypt_method == 0)
+- for (p = ptr; p < ptr + len; ++p)
+- {
+- ush temp;
+-
+- temp = (ush)keys[2] | 2;
+- temp = (int)(((unsigned)(temp * (temp ^ 1U)) >> 8) & 0xff);
+- UPDATE_KEYS_ZIP(*p ^= temp);
+- }
+- else
+- bf_crypt_decode(ptr, len);
+- }
+-
+- /*
+- * Initialize the encryption keys and the random header according to
+- * the given password.
+- * If "passwd" is NULL or empty, don't do anything.
+- */
+- void
+- crypt_init_keys(passwd)
+- char_u *passwd; /* password string with which to modify keys */
+- {
+- if (passwd != NULL && *passwd != NUL)
+- {
+- if (use_crypt_method == 0)
+- {
+- char_u *p;
+-
+- make_crc_tab();
+- keys[0] = 305419896L;
+- keys[1] = 591751049L;
+- keys[2] = 878082192L;
+- for (p = passwd; *p!= NUL; ++p)
+- {
+- UPDATE_KEYS_ZIP((int)*p);
+- }
+- }
+- else
+- bf_crypt_init_keys(passwd);
+- }
+- }
+-
+- /*
+- * Free an allocated crypt key. Clear the text to make sure it doesn't stay
+- * in memory anywhere.
+- */
+- void
+- free_crypt_key(key)
+- char_u *key;
+- {
+- char_u *p;
+-
+- if (key != NULL)
+- {
+- for (p = key; *p != NUL; ++p)
+- *p = 0;
+- vim_free(key);
+- }
+- }
+-
+- /*
+- * Ask the user for a crypt key.
+- * When "store" is TRUE, the new key is stored in the 'key' option, and the
+- * 'key' option value is returned: Don't free it.
+- * When "store" is FALSE, the typed key is returned in allocated memory.
+- * Returns NULL on failure.
+- */
+- char_u *
+- get_crypt_key(store, twice)
+- int store;
+- int twice; /* Ask for the key twice. */
+- {
+- char_u *p1, *p2 = NULL;
+- int round;
+-
+- for (round = 0; ; ++round)
+- {
+- cmdline_star = TRUE;
+- cmdline_row = msg_row;
+- p1 = getcmdline_prompt(NUL, round == 0
+- ? (char_u *)_("Enter encryption key: ")
+- : (char_u *)_("Enter same key again: "), 0, EXPAND_NOTHING,
+- NULL);
+- cmdline_star = FALSE;
+-
+- if (p1 == NULL)
+- break;
+-
+- if (round == twice)
+- {
+- if (p2 != NULL && STRCMP(p1, p2) != 0)
+- {
+- MSG(_("Keys don't match!"));
+- free_crypt_key(p1);
+- free_crypt_key(p2);
+- p2 = NULL;
+- round = -1; /* do it again */
+- continue;
+- }
+-
+- if (store)
+- {
+- set_option_value((char_u *)"key", 0L, p1, OPT_LOCAL);
+- free_crypt_key(p1);
+- p1 = curbuf->b_p_key;
+- }
+- break;
+- }
+- p2 = p1;
+- }
+-
+- /* since the user typed this, no need to wait for return */
+- if (msg_didout)
+- msg_putchar('\n');
+- need_wait_return = FALSE;
+- msg_didout = FALSE;
+-
+- free_crypt_key(p2);
+- return p1;
+- }
+-
+- #endif /* FEAT_CRYPT */
+-
+ /* TODO: make some #ifdef for this */
+ /*--------[ file searching ]-------------------------------------------------*/
+ /*
+--- 3803,3808 ----
+***************
+*** 6588,6595 ****
+--- 6272,6294 ----
+ FILE *fd;
+ time_t the_time;
+ {
++ char_u buf[8];
++
++ time_to_bytes(the_time, buf);
++ fwrite(buf, (size_t)8, (size_t)1, fd);
++ }
++
++ /*
++ * Write time_t to "buf[8]".
++ */
++ void
++ time_to_bytes(the_time, buf)
++ time_t the_time;
++ char_u *buf;
++ {
+ int c;
+ int i;
++ int bi = 0;
+ time_t wtime = the_time;
+
+ /* time_t can be up to 8 bytes in size, more than long_u, thus we
+***************
+*** 6603,6609 ****
+ {
+ if (i + 1 > (int)sizeof(time_t))
+ /* ">>" doesn't work well when shifting more bits than avail */
+! putc(0, fd);
+ else
+ {
+ #if defined(SIZEOF_TIME_T) && SIZEOF_TIME_T > 4
+--- 6302,6308 ----
+ {
+ if (i + 1 > (int)sizeof(time_t))
+ /* ">>" doesn't work well when shifting more bits than avail */
+! buf[bi++] = 0;
+ else
+ {
+ #if defined(SIZEOF_TIME_T) && SIZEOF_TIME_T > 4
+***************
+*** 6611,6617 ****
+ #else
+ c = (int)((long_u)wtime >> (i * 8));
+ #endif
+! putc(c, fd);
+ }
+ }
+ }
+--- 6310,6316 ----
+ #else
+ c = (int)((long_u)wtime >> (i * 8));
+ #endif
+! buf[bi++] = c;
+ }
+ }
+ }
+*** ../vim-7.4.398/src/option.c 2014-08-06 14:52:05.047236174 +0200
+--- src/option.c 2014-08-09 15:39:29.741352755 +0200
+***************
+*** 2989,2995 ****
+ static char *(p_nf_values[]) = {"octal", "hex", "alpha", NULL};
+ static char *(p_ff_values[]) = {FF_UNIX, FF_DOS, FF_MAC, NULL};
+ #ifdef FEAT_CRYPT
+! static char *(p_cm_values[]) = {"zip", "blowfish", NULL};
+ #endif
+ #ifdef FEAT_CMDL_COMPL
+ static char *(p_wop_values[]) = {"tagfile", NULL};
+--- 2989,2995 ----
+ static char *(p_nf_values[]) = {"octal", "hex", "alpha", NULL};
+ static char *(p_ff_values[]) = {FF_UNIX, FF_DOS, FF_MAC, NULL};
+ #ifdef FEAT_CRYPT
+! static char *(p_cm_values[]) = {"zip", "blowfish", "blowfish2", NULL};
+ #endif
+ #ifdef FEAT_CMDL_COMPL
+ static char *(p_wop_values[]) = {"tagfile", NULL};
+***************
+*** 6140,6146 ****
+ # endif
+ if (STRCMP(curbuf->b_p_key, oldval) != 0)
+ /* Need to update the swapfile. */
+! ml_set_crypt_key(curbuf, oldval, get_crypt_method(curbuf));
+ }
+
+ else if (gvarp == &p_cm)
+--- 6140,6146 ----
+ # endif
+ if (STRCMP(curbuf->b_p_key, oldval) != 0)
+ /* Need to update the swapfile. */
+! ml_set_crypt_key(curbuf, oldval, crypt_get_method_nr(curbuf));
+ }
+
+ else if (gvarp == &p_cm)
+***************
+*** 6151,6157 ****
+ p = p_cm;
+ if (check_opt_strings(p, p_cm_values, TRUE) != OK)
+ errmsg = e_invarg;
+! else if (get_crypt_method(curbuf) > 0 && blowfish_self_test() == FAIL)
+ errmsg = e_invarg;
+ else
+ {
+--- 6151,6157 ----
+ p = p_cm;
+ if (check_opt_strings(p, p_cm_values, TRUE) != OK)
+ errmsg = e_invarg;
+! else if (crypt_self_test() == FAIL)
+ errmsg = e_invarg;
+ else
+ {
+***************
+*** 6177,6183 ****
+ p = curbuf->b_p_cm;
+ if (STRCMP(s, p) != 0)
+ ml_set_crypt_key(curbuf, curbuf->b_p_key,
+! crypt_method_from_string(s));
+
+ /* If the global value changes need to update the swapfile for all
+ * buffers using that value. */
+--- 6177,6183 ----
+ p = curbuf->b_p_cm;
+ if (STRCMP(s, p) != 0)
+ ml_set_crypt_key(curbuf, curbuf->b_p_key,
+! crypt_method_nr_from_name(s));
+
+ /* If the global value changes need to update the swapfile for all
+ * buffers using that value. */
+***************
+*** 6188,6194 ****
+ for (buf = firstbuf; buf != NULL; buf = buf->b_next)
+ if (buf != curbuf && *buf->b_p_cm == NUL)
+ ml_set_crypt_key(buf, buf->b_p_key,
+! crypt_method_from_string(oldval));
+ }
+ }
+ }
+--- 6188,6194 ----
+ for (buf = firstbuf; buf != NULL; buf = buf->b_next)
+ if (buf != curbuf && *buf->b_p_cm == NUL)
+ ml_set_crypt_key(buf, buf->b_p_key,
+! crypt_method_nr_from_name(oldval));
+ }
+ }
+ }
+*** ../vim-7.4.398/src/proto.h 2013-02-26 14:18:19.000000000 +0100
+--- src/proto.h 2014-08-09 15:39:39.333352686 +0200
+***************
+*** 70,75 ****
+--- 70,77 ----
+
+ # ifdef FEAT_CRYPT
+ # include "blowfish.pro"
++ # include "crypt.pro"
++ # include "crypt_zip.pro"
+ # endif
+ # include "buffer.pro"
+ # include "charset.pro"
+*** ../vim-7.4.398/src/proto/blowfish.pro 2014-02-11 15:23:27.938123631 +0100
+--- src/proto/blowfish.pro 2014-08-09 15:31:32.501356185 +0200
+***************
+*** 1,10 ****
+ /* blowfish.c */
+! void bf_key_init __ARGS((char_u *password, char_u *salt, int salt_len));
+! void bf_cfb_init __ARGS((char_u *iv, int iv_len));
+! void bf_crypt_encode __ARGS((char_u *from, size_t len, char_u *to));
+! void bf_crypt_decode __ARGS((char_u *ptr, long len));
+! void bf_crypt_init_keys __ARGS((char_u *passwd));
+! void bf_crypt_save __ARGS((void));
+! void bf_crypt_restore __ARGS((void));
+ int blowfish_self_test __ARGS((void));
+ /* vim: set ft=c : */
+--- 1,6 ----
+ /* blowfish.c */
+! void crypt_blowfish_encode __ARGS((cryptstate_T *state, char_u *from, size_t len, char_u *to));
+! void crypt_blowfish_decode __ARGS((cryptstate_T *state, char_u *from, size_t len, char_u *to));
+! void crypt_blowfish_init __ARGS((cryptstate_T *state, char_u *key, char_u *salt, int salt_len, char_u *seed, int seed_len));
+ int blowfish_self_test __ARGS((void));
+ /* vim: set ft=c : */
+*** ../vim-7.4.398/src/proto/crypt.pro 2014-08-10 13:30:43.880787293 +0200
+--- src/proto/crypt.pro 2014-08-09 15:31:32.501356185 +0200
+***************
+*** 0 ****
+--- 1,24 ----
++ /* crypt.c */
++ int crypt_method_nr_from_name __ARGS((char_u *name));
++ int crypt_method_nr_from_magic __ARGS((char *ptr, int len));
++ int crypt_works_inplace __ARGS((cryptstate_T *state));
++ int crypt_get_method_nr __ARGS((buf_T *buf));
++ int crypt_whole_undofile __ARGS((int method_nr));
++ int crypt_get_header_len __ARGS((int method_nr));
++ void crypt_set_cm_option __ARGS((buf_T *buf, int method_nr));
++ int crypt_self_test __ARGS((void));
++ cryptstate_T *crypt_create __ARGS((int method_nr, char_u *key, char_u *salt, int salt_len, char_u *seed, int seed_len));
++ cryptstate_T *crypt_create_from_header __ARGS((int method_nr, char_u *key, char_u *header));
++ cryptstate_T *crypt_create_from_file __ARGS((FILE *fp, char_u *key));
++ cryptstate_T *crypt_create_for_writing __ARGS((int method_nr, char_u *key, char_u **header, int *header_len));
++ void crypt_free_state __ARGS((cryptstate_T *state));
++ long crypt_encode_alloc __ARGS((cryptstate_T *state, char_u *from, size_t len, char_u **newptr));
++ long crypt_decode_alloc __ARGS((cryptstate_T *state, char_u *ptr, long len, char_u **newptr));
++ void crypt_encode __ARGS((cryptstate_T *state, char_u *from, size_t len, char_u *to));
++ void crypt_decode __ARGS((cryptstate_T *state, char_u *from, size_t len, char_u *to));
++ void crypt_encode_inplace __ARGS((cryptstate_T *state, char_u *buf, size_t len));
++ void crypt_decode_inplace __ARGS((cryptstate_T *state, char_u *buf, size_t len));
++ void crypt_free_key __ARGS((char_u *key));
++ char_u *crypt_get_key __ARGS((int store, int twice));
++ void crypt_append_msg __ARGS((buf_T *buf));
++ /* vim: set ft=c : */
+*** ../vim-7.4.398/src/proto/crypt_zip.pro 2014-08-10 13:30:43.884787293 +0200
+--- src/proto/crypt_zip.pro 2014-08-09 15:31:32.501356185 +0200
+***************
+*** 0 ****
+--- 1,5 ----
++ /* crypt_zip.c */
++ void crypt_zip_init __ARGS((cryptstate_T *state, char_u *key, char_u *salt, int salt_len, char_u *seed, int seed_len));
++ void crypt_zip_encode __ARGS((cryptstate_T *state, char_u *from, size_t len, char_u *to));
++ void crypt_zip_decode __ARGS((cryptstate_T *state, char_u *from, size_t len, char_u *to));
++ /* vim: set ft=c : */
+*** ../vim-7.4.398/src/proto/fileio.pro 2013-08-10 13:37:11.000000000 +0200
+--- src/proto/fileio.pro 2014-08-09 15:31:32.501356185 +0200
+***************
+*** 4,11 ****
+ int prep_exarg __ARGS((exarg_T *eap, buf_T *buf));
+ void set_file_options __ARGS((int set_options, exarg_T *eap));
+ void set_forced_fenc __ARGS((exarg_T *eap));
+- int prepare_crypt_read __ARGS((FILE *fp));
+- char_u *prepare_crypt_write __ARGS((buf_T *buf, int *lenp));
+ int check_file_readonly __ARGS((char_u *fname, int perm));
+ int buf_write __ARGS((buf_T *buf, char_u *fname, char_u *sfname, linenr_T start, linenr_T end, exarg_T *eap, int append, int forceit, int reset_changed, int filtering));
+ void msg_add_fname __ARGS((buf_T *buf, char_u *fname));
+--- 4,9 ----
+*** ../vim-7.4.398/src/proto/misc2.pro 2014-05-07 18:35:25.669216052 +0200
+--- src/proto/misc2.pro 2014-08-09 15:31:32.501356185 +0200
+***************
+*** 84,99 ****
+ char_u *parse_shape_opt __ARGS((int what));
+ int get_shape_idx __ARGS((int mouse));
+ void update_mouseshape __ARGS((int shape_idx));
+- int crypt_method_from_string __ARGS((char_u *s));
+- int get_crypt_method __ARGS((buf_T *buf));
+- void set_crypt_method __ARGS((buf_T *buf, int method));
+- void crypt_push_state __ARGS((void));
+- void crypt_pop_state __ARGS((void));
+- void crypt_encode __ARGS((char_u *from, size_t len, char_u *to));
+- void crypt_decode __ARGS((char_u *ptr, long len));
+- void crypt_init_keys __ARGS((char_u *passwd));
+- void free_crypt_key __ARGS((char_u *key));
+- char_u *get_crypt_key __ARGS((int store, int twice));
+ void *vim_findfile_init __ARGS((char_u *path, char_u *filename, char_u *stopdirs, int level, int free_visited, int find_what, void *search_ctx_arg, int tagfile, char_u *rel_fname));
+ char_u *vim_findfile_stopdir __ARGS((char_u *buf));
+ void vim_findfile_cleanup __ARGS((void *ctx));
+--- 84,89 ----
+***************
+*** 116,120 ****
+--- 106,111 ----
+ char_u *read_string __ARGS((FILE *fd, int cnt));
+ int put_bytes __ARGS((FILE *fd, long_u nr, int len));
+ void put_time __ARGS((FILE *fd, time_t the_time));
++ void time_to_bytes __ARGS((time_t the_time, char_u *buf));
+ int has_non_ascii __ARGS((char_u *s));
+ /* vim: set ft=c : */
+*** ../vim-7.4.398/src/structs.h 2014-06-25 14:39:35.110348584 +0200
+--- src/structs.h 2014-08-09 15:40:08.501352476 +0200
+***************
+*** 1251,1256 ****
+--- 1251,1274 ----
+ } syn_time_T;
+ #endif
+
++ #ifdef FEAT_CRYPT
++ /*
++ * Structure to hold the type of encryption and the state of encryption or
++ * decryption.
++ */
++ typedef struct {
++ int method_nr;
++ void *method_state; /* method-specific state information */
++ } cryptstate_T;
++
++ /* values for method_nr */
++ # define CRYPT_M_ZIP 0
++ # define CRYPT_M_BF 1
++ # define CRYPT_M_BF2 2
++ # define CRYPT_M_COUNT 3 /* number of crypt methods */
++ #endif
++
++
+ /*
+ * These are items normally related to a buffer. But when using ":ownsyntax"
+ * a window may have its own instance.
+***************
+*** 1778,1784 ****
+ int b_was_netbeans_file;/* TRUE if b_netbeans_file was once set */
+ #endif
+
+! };
+
+
+ #ifdef FEAT_DIFF
+--- 1796,1807 ----
+ int b_was_netbeans_file;/* TRUE if b_netbeans_file was once set */
+ #endif
+
+! #ifdef FEAT_CRYPT
+! cryptstate_T *b_cryptstate; /* Encryption state while reading or writing
+! * the file. NULL when not using encryption. */
+! #endif
+!
+! }; /* file_buffer */
+
+
+ #ifdef FEAT_DIFF
+*** ../vim-7.4.398/src/undo.c 2014-04-02 14:05:33.999887839 +0200
+--- src/undo.c 2014-08-09 16:55:40.541319903 +0200
+***************
+*** 81,88 ****
+--- 81,105 ----
+ #define UH_MAGIC 0x18dade /* value for uh_magic when in use */
+ #define UE_MAGIC 0xabc123 /* value for ue_magic when in use */
+
++ /* Size of buffer used for encryption. */
++ #define CRYPT_BUF_SIZE 8192
++
+ #include "vim.h"
+
++ /* Structure passed around between functions.
++ * Avoids passing cryptstate_T when encryption not available. */
++ typedef struct {
++ buf_T *bi_buf;
++ FILE *bi_fp;
++ #ifdef FEAT_CRYPT
++ cryptstate_T *bi_state;
++ char_u *bi_buffer; /* CRYPT_BUF_SIZE, NULL when not buffering */
++ size_t bi_used; /* bytes written to/read from bi_buffer */
++ size_t bi_avail; /* bytes available in bi_buffer */
++ #endif
++ } bufinfo_T;
++
++
+ static long get_undolevel __ARGS((void));
+ static void u_unch_branch __ARGS((u_header_T *uhp));
+ static u_entry_T *u_get_headentry __ARGS((void));
+***************
+*** 98,115 ****
+ #ifdef FEAT_PERSISTENT_UNDO
+ static void corruption_error __ARGS((char *mesg, char_u *file_name));
+ static void u_free_uhp __ARGS((u_header_T *uhp));
+! static size_t fwrite_crypt __ARGS((buf_T *buf UNUSED, char_u *ptr, size_t len, FILE *fp));
+! static char_u *read_string_decrypt __ARGS((buf_T *buf UNUSED, FILE *fd, int len));
+! static int serialize_header __ARGS((FILE *fp, buf_T *buf, char_u *hash));
+! static int serialize_uhp __ARGS((FILE *fp, buf_T *buf, u_header_T *uhp));
+! static u_header_T *unserialize_uhp __ARGS((FILE *fp, char_u *file_name));
+! static int serialize_uep __ARGS((FILE *fp, buf_T *buf, u_entry_T *uep));
+! static u_entry_T *unserialize_uep __ARGS((FILE *fp, int *error, char_u *file_name));
+! static void serialize_pos __ARGS((pos_T pos, FILE *fp));
+! static void unserialize_pos __ARGS((pos_T *pos, FILE *fp));
+! static void serialize_visualinfo __ARGS((visualinfo_T *info, FILE *fp));
+! static void unserialize_visualinfo __ARGS((visualinfo_T *info, FILE *fp));
+! static void put_header_ptr __ARGS((FILE *fp, u_header_T *uhp));
+ #endif
+
+ #define U_ALLOC_LINE(size) lalloc((long_u)(size), FALSE)
+--- 115,140 ----
+ #ifdef FEAT_PERSISTENT_UNDO
+ static void corruption_error __ARGS((char *mesg, char_u *file_name));
+ static void u_free_uhp __ARGS((u_header_T *uhp));
+! static int undo_write __ARGS((bufinfo_T *bi, char_u *ptr, size_t len));
+! static int undo_flush __ARGS((bufinfo_T *bi));
+! static int fwrite_crypt __ARGS((bufinfo_T *bi, char_u *ptr, size_t len));
+! static int undo_write_bytes __ARGS((bufinfo_T *bi, long_u nr, int len));
+! static void put_header_ptr __ARGS((bufinfo_T *bi, u_header_T *uhp));
+! static int undo_read_4c __ARGS((bufinfo_T *bi));
+! static int undo_read_2c __ARGS((bufinfo_T *bi));
+! static int undo_read_byte __ARGS((bufinfo_T *bi));
+! static time_t undo_read_time __ARGS((bufinfo_T *bi));
+! static int undo_read __ARGS((bufinfo_T *bi, char_u *buffer, size_t size));
+! static char_u *read_string_decrypt __ARGS((bufinfo_T *bi, int len));
+! static int serialize_header __ARGS((bufinfo_T *bi, char_u *hash));
+! static int serialize_uhp __ARGS((bufinfo_T *bi, u_header_T *uhp));
+! static u_header_T *unserialize_uhp __ARGS((bufinfo_T *bi, char_u *file_name));
+! static int serialize_uep __ARGS((bufinfo_T *bi, u_entry_T *uep));
+! static u_entry_T *unserialize_uep __ARGS((bufinfo_T *bi, int *error, char_u *file_name));
+! static void serialize_pos __ARGS((bufinfo_T *bi, pos_T pos));
+! static void unserialize_pos __ARGS((bufinfo_T *bi, pos_T *pos));
+! static void serialize_visualinfo __ARGS((bufinfo_T *bi, visualinfo_T *info));
+! static void unserialize_visualinfo __ARGS((bufinfo_T *bi, visualinfo_T *info));
+ #endif
+
+ #define U_ALLOC_LINE(size) lalloc((long_u)(size), FALSE)
+***************
+*** 859,926 ****
+ }
+
+ /*
+! * Like fwrite() but crypt the bytes when 'key' is set.
+! * Returns 1 if successful.
+ */
+! static size_t
+! fwrite_crypt(buf, ptr, len, fp)
+! buf_T *buf UNUSED;
+ char_u *ptr;
+ size_t len;
+- FILE *fp;
+ {
+ #ifdef FEAT_CRYPT
+ char_u *copy;
+ char_u small_buf[100];
+ size_t i;
+
+! if (*buf->b_p_key == NUL)
+! return fwrite(ptr, len, (size_t)1, fp);
+! if (len < 100)
+! copy = small_buf; /* no malloc()/free() for short strings */
+! else
+ {
+! copy = lalloc(len, FALSE);
+! if (copy == NULL)
+! return 0;
+! }
+! crypt_encode(ptr, len, copy);
+! i = fwrite(copy, len, (size_t)1, fp);
+! if (copy != small_buf)
+! vim_free(copy);
+! return i;
+! #else
+! return fwrite(ptr, len, (size_t)1, fp);
+ #endif
+ }
+
+ /*
+! * Read a string of length "len" from "fd".
+! * When 'key' is set decrypt the bytes.
+ */
+! static char_u *
+! read_string_decrypt(buf, fd, len)
+! buf_T *buf UNUSED;
+! FILE *fd;
+ int len;
+ {
+! char_u *ptr;
+
+! ptr = read_string(fd, len);
+ #ifdef FEAT_CRYPT
+! if (ptr != NULL && *buf->b_p_key != NUL)
+! crypt_decode(ptr, len);
+ #endif
+ return ptr;
+ }
+
+ static int
+! serialize_header(fp, buf, hash)
+! FILE *fp;
+! buf_T *buf;
+ char_u *hash;
+ {
+! int len;
+
+ /* Start writing, first the magic marker and undo info version. */
+ if (fwrite(UF_START_MAGIC, (size_t)UF_START_MAGIC_LEN, (size_t)1, fp) != 1)
+--- 884,1177 ----
+ }
+
+ /*
+! * Write a sequence of bytes to the undo file.
+! * Buffers and encrypts as needed.
+! * Returns OK or FAIL.
+ */
+! static int
+! undo_write(bi, ptr, len)
+! bufinfo_T *bi;
+! char_u *ptr;
+! size_t len;
+! {
+! #ifdef FEAT_CRYPT
+! if (bi->bi_buffer != NULL)
+! {
+! size_t len_todo = len;
+! char_u *p = ptr;
+!
+! while (bi->bi_used + len_todo >= CRYPT_BUF_SIZE)
+! {
+! size_t n = CRYPT_BUF_SIZE - bi->bi_used;
+!
+! mch_memmove(bi->bi_buffer + bi->bi_used, p, n);
+! len_todo -= n;
+! p += n;
+! bi->bi_used = CRYPT_BUF_SIZE;
+! if (undo_flush(bi) == FAIL)
+! return FAIL;
+! }
+! if (len_todo > 0)
+! {
+! mch_memmove(bi->bi_buffer + bi->bi_used, p, len_todo);
+! bi->bi_used += len_todo;
+! }
+! return OK;
+! }
+! #endif
+! if (fwrite(ptr, len, (size_t)1, bi->bi_fp) != 1)
+! return FAIL;
+! return OK;
+! }
+!
+! #ifdef FEAT_CRYPT
+! static int
+! undo_flush(bi)
+! bufinfo_T *bi;
+! {
+! if (bi->bi_used > 0)
+! {
+! crypt_encode_inplace(bi->bi_state, bi->bi_buffer, bi->bi_used);
+! if (fwrite(bi->bi_buffer, bi->bi_used, (size_t)1, bi->bi_fp) != 1)
+! return FAIL;
+! bi->bi_used = 0;
+! }
+! return OK;
+! }
+! #endif
+!
+! /*
+! * Write "ptr[len]" and crypt the bytes when needed.
+! * Returns OK or FAIL.
+! */
+! static int
+! fwrite_crypt(bi, ptr, len)
+! bufinfo_T *bi;
+ char_u *ptr;
+ size_t len;
+ {
+ #ifdef FEAT_CRYPT
+ char_u *copy;
+ char_u small_buf[100];
+ size_t i;
+
+! if (bi->bi_state != NULL && bi->bi_buffer == NULL)
+ {
+! /* crypting every piece of text separately */
+! if (len < 100)
+! copy = small_buf; /* no malloc()/free() for short strings */
+! else
+! {
+! copy = lalloc(len, FALSE);
+! if (copy == NULL)
+! return 0;
+! }
+! crypt_encode(bi->bi_state, ptr, len, copy);
+! i = fwrite(copy, len, (size_t)1, bi->bi_fp);
+! if (copy != small_buf)
+! vim_free(copy);
+! return i == 1 ? OK : FAIL;
+! }
+ #endif
++ return undo_write(bi, ptr, len);
+ }
+
+ /*
+! * Write a number, MSB first, in "len" bytes.
+! * Must match with undo_read_?c() functions.
+! * Returns OK or FAIL.
+ */
+! static int
+! undo_write_bytes(bi, nr, len)
+! bufinfo_T *bi;
+! long_u nr;
+ int len;
+ {
+! char_u buf[8];
+! int i;
+! int bufi = 0;
+!
+! for (i = len - 1; i >= 0; --i)
+! buf[bufi++] = nr >> (i * 8);
+! return undo_write(bi, buf, (size_t)len);
+! }
+!
+! /*
+! * Write the pointer to an undo header. Instead of writing the pointer itself
+! * we use the sequence number of the header. This is converted back to
+! * pointers when reading. */
+! static void
+! put_header_ptr(bi, uhp)
+! bufinfo_T *bi;
+! u_header_T *uhp;
+! {
+! undo_write_bytes(bi, (long_u)(uhp != NULL ? uhp->uh_seq : 0), 4);
+! }
+!
+! static int
+! undo_read_4c(bi)
+! bufinfo_T *bi;
+! {
+! #ifdef FEAT_CRYPT
+! if (bi->bi_buffer != NULL)
+! {
+! char_u buf[4];
+! int n;
+!
+! undo_read(bi, buf, (size_t)4);
+! n = (buf[0] << 24) + (buf[1] << 16) + (buf[2] << 8) + buf[3];
+! return n;
+! }
+! #endif
+! return get4c(bi->bi_fp);
+! }
+!
+! static int
+! undo_read_2c(bi)
+! bufinfo_T *bi;
+! {
+! #ifdef FEAT_CRYPT
+! if (bi->bi_buffer != NULL)
+! {
+! char_u buf[2];
+! int n;
+!
+! undo_read(bi, buf, (size_t)2);
+! n = (buf[0] << 8) + buf[1];
+! return n;
+! }
+! #endif
+! return get2c(bi->bi_fp);
+! }
+!
+! static int
+! undo_read_byte(bi)
+! bufinfo_T *bi;
+! {
+! #ifdef FEAT_CRYPT
+! if (bi->bi_buffer != NULL)
+! {
+! char_u buf[1];
+!
+! undo_read(bi, buf, (size_t)1);
+! return buf[0];
+! }
+! #endif
+! return getc(bi->bi_fp);
+! }
+!
+! static time_t
+! undo_read_time(bi)
+! bufinfo_T *bi;
+! {
+! #ifdef FEAT_CRYPT
+! if (bi->bi_buffer != NULL)
+! {
+! char_u buf[8];
+! time_t n = 0;
+! int i;
+!
+! undo_read(bi, buf, (size_t)8);
+! for (i = 0; i < 8; ++i)
+! n = (n << 8) + buf[i];
+! return n;
+! }
+! #endif
+! return get8ctime(bi->bi_fp);
+! }
+!
+! /*
+! * Read "buffer[size]" from the undo file.
+! * Return OK or FAIL.
+! */
+! static int
+! undo_read(bi, buffer, size)
+! bufinfo_T *bi;
+! char_u *buffer;
+! size_t size;
+! {
+! #ifdef FEAT_CRYPT
+! if (bi->bi_buffer != NULL)
+! {
+! int size_todo = size;
+! char_u *p = buffer;
+!
+! while (size_todo > 0)
+! {
+! size_t n;
+!
+! if (bi->bi_used >= bi->bi_avail)
+! {
+! n = fread(bi->bi_buffer, 1, (size_t)CRYPT_BUF_SIZE, bi->bi_fp);
+! if (n <= 0)
+! {
+! /* Error may be checked for only later. Fill with zeros,
+! * so that the reader won't use garbage. */
+! vim_memset(p, 0, size_todo);
+! return FAIL;
+! }
+! bi->bi_avail = n;
+! bi->bi_used = 0;
+! crypt_decode_inplace(bi->bi_state, bi->bi_buffer, bi->bi_avail);
+! }
+! n = size_todo;
+! if (n > bi->bi_avail - bi->bi_used)
+! n = bi->bi_avail - bi->bi_used;
+! mch_memmove(p, bi->bi_buffer + bi->bi_used, n);
+! bi->bi_used += n;
+! size_todo -= n;
+! p += n;
+! }
+! return OK;
+! }
+! #endif
+! if (fread(buffer, (size_t)size, 1, bi->bi_fp) != 1)
+! return FAIL;
+! return OK;
+! }
+!
+! /*
+! * Read a string of length "len" from "bi->bi_fd".
+! * "len" can be zero to allocate an empty line.
+! * Decrypt the bytes if needed.
+! * Append a NUL.
+! * Returns a pointer to allocated memory or NULL for failure.
+! */
+! static char_u *
+! read_string_decrypt(bi, len)
+! bufinfo_T *bi;
+! int len;
+! {
+! char_u *ptr = alloc((unsigned)len + 1);
+
+! if (ptr != NULL)
+! {
+! if (len > 0 && undo_read(bi, ptr, len) == FAIL)
+! {
+! vim_free(ptr);
+! return NULL;
+! }
+! ptr[len] = NUL;
+ #ifdef FEAT_CRYPT
+! if (bi->bi_state != NULL && bi->bi_buffer == NULL)
+! crypt_decode_inplace(bi->bi_state, ptr, len);
+ #endif
++ }
+ return ptr;
+ }
+
++ /*
++ * Writes the (not encrypted) header and initializes encryption if needed.
++ */
+ static int
+! serialize_header(bi, hash)
+! bufinfo_T *bi;
+ char_u *hash;
+ {
+! int len;
+! buf_T *buf = bi->bi_buf;
+! FILE *fp = bi->bi_fp;
+! char_u time_buf[8];
+
+ /* Start writing, first the magic marker and undo info version. */
+ if (fwrite(UF_START_MAGIC, (size_t)UF_START_MAGIC_LEN, (size_t)1, fp) != 1)
+***************
+*** 934,1041 ****
+ char_u *header;
+ int header_len;
+
+! put_bytes(fp, (long_u)UF_VERSION_CRYPT, 2);
+! header = prepare_crypt_write(buf, &header_len);
+! if (header == NULL)
+ return FAIL;
+ len = (int)fwrite(header, (size_t)header_len, (size_t)1, fp);
+ vim_free(header);
+ if (len != 1)
+ {
+! crypt_pop_state();
+ return FAIL;
+ }
+ }
+ else
+ #endif
+! put_bytes(fp, (long_u)UF_VERSION, 2);
+
+
+ /* Write a hash of the buffer text, so that we can verify it is still the
+ * same when reading the buffer text. */
+! if (fwrite(hash, (size_t)UNDO_HASH_SIZE, (size_t)1, fp) != 1)
+ return FAIL;
+
+ /* buffer-specific data */
+! put_bytes(fp, (long_u)buf->b_ml.ml_line_count, 4);
+ len = buf->b_u_line_ptr != NULL ? (int)STRLEN(buf->b_u_line_ptr) : 0;
+! put_bytes(fp, (long_u)len, 4);
+! if (len > 0 && fwrite_crypt(buf, buf->b_u_line_ptr, (size_t)len, fp) != 1)
+ return FAIL;
+! put_bytes(fp, (long_u)buf->b_u_line_lnum, 4);
+! put_bytes(fp, (long_u)buf->b_u_line_colnr, 4);
+
+ /* Undo structures header data */
+! put_header_ptr(fp, buf->b_u_oldhead);
+! put_header_ptr(fp, buf->b_u_newhead);
+! put_header_ptr(fp, buf->b_u_curhead);
+!
+! put_bytes(fp, (long_u)buf->b_u_numhead, 4);
+! put_bytes(fp, (long_u)buf->b_u_seq_last, 4);
+! put_bytes(fp, (long_u)buf->b_u_seq_cur, 4);
+! put_time(fp, buf->b_u_time_cur);
+
+ /* Optional fields. */
+! putc(4, fp);
+! putc(UF_LAST_SAVE_NR, fp);
+! put_bytes(fp, (long_u)buf->b_u_save_nr_last, 4);
+
+! putc(0, fp); /* end marker */
+
+ return OK;
+ }
+
+ static int
+! serialize_uhp(fp, buf, uhp)
+! FILE *fp;
+! buf_T *buf;
+ u_header_T *uhp;
+ {
+ int i;
+ u_entry_T *uep;
+
+! if (put_bytes(fp, (long_u)UF_HEADER_MAGIC, 2) == FAIL)
+ return FAIL;
+
+! put_header_ptr(fp, uhp->uh_next.ptr);
+! put_header_ptr(fp, uhp->uh_prev.ptr);
+! put_header_ptr(fp, uhp->uh_alt_next.ptr);
+! put_header_ptr(fp, uhp->uh_alt_prev.ptr);
+! put_bytes(fp, uhp->uh_seq, 4);
+! serialize_pos(uhp->uh_cursor, fp);
+ #ifdef FEAT_VIRTUALEDIT
+! put_bytes(fp, (long_u)uhp->uh_cursor_vcol, 4);
+ #else
+! put_bytes(fp, (long_u)0, 4);
+ #endif
+! put_bytes(fp, (long_u)uhp->uh_flags, 2);
+ /* Assume NMARKS will stay the same. */
+ for (i = 0; i < NMARKS; ++i)
+! serialize_pos(uhp->uh_namedm[i], fp);
+! serialize_visualinfo(&uhp->uh_visual, fp);
+! put_time(fp, uhp->uh_time);
+
+ /* Optional fields. */
+! putc(4, fp);
+! putc(UHP_SAVE_NR, fp);
+! put_bytes(fp, (long_u)uhp->uh_save_nr, 4);
+
+! putc(0, fp); /* end marker */
+
+ /* Write all the entries. */
+ for (uep = uhp->uh_entry; uep != NULL; uep = uep->ue_next)
+ {
+! put_bytes(fp, (long_u)UF_ENTRY_MAGIC, 2);
+! if (serialize_uep(fp, buf, uep) == FAIL)
+ return FAIL;
+ }
+! put_bytes(fp, (long_u)UF_ENTRY_END_MAGIC, 2);
+ return OK;
+ }
+
+ static u_header_T *
+! unserialize_uhp(fp, file_name)
+! FILE *fp;
+ char_u *file_name;
+ {
+ u_header_T *uhp;
+--- 1185,1308 ----
+ char_u *header;
+ int header_len;
+
+! undo_write_bytes(bi, (long_u)UF_VERSION_CRYPT, 2);
+! bi->bi_state = crypt_create_for_writing(crypt_get_method_nr(buf),
+! buf->b_p_key, &header, &header_len);
+! if (bi->bi_state == NULL)
+ return FAIL;
+ len = (int)fwrite(header, (size_t)header_len, (size_t)1, fp);
+ vim_free(header);
+ if (len != 1)
+ {
+! crypt_free_state(bi->bi_state);
+! bi->bi_state = NULL;
+ return FAIL;
+ }
++
++ if (crypt_whole_undofile(crypt_get_method_nr(buf)))
++ {
++ bi->bi_buffer = alloc(CRYPT_BUF_SIZE);
++ if (bi->bi_buffer == NULL)
++ {
++ crypt_free_state(bi->bi_state);
++ bi->bi_state = NULL;
++ return FAIL;
++ }
++ bi->bi_used = 0;
++ }
+ }
+ else
+ #endif
+! undo_write_bytes(bi, (long_u)UF_VERSION, 2);
+
+
+ /* Write a hash of the buffer text, so that we can verify it is still the
+ * same when reading the buffer text. */
+! if (undo_write(bi, hash, (size_t)UNDO_HASH_SIZE) == FAIL)
+ return FAIL;
+
+ /* buffer-specific data */
+! undo_write_bytes(bi, (long_u)buf->b_ml.ml_line_count, 4);
+ len = buf->b_u_line_ptr != NULL ? (int)STRLEN(buf->b_u_line_ptr) : 0;
+! undo_write_bytes(bi, (long_u)len, 4);
+! if (len > 0 && fwrite_crypt(bi, buf->b_u_line_ptr, (size_t)len) == FAIL)
+ return FAIL;
+! undo_write_bytes(bi, (long_u)buf->b_u_line_lnum, 4);
+! undo_write_bytes(bi, (long_u)buf->b_u_line_colnr, 4);
+
+ /* Undo structures header data */
+! put_header_ptr(bi, buf->b_u_oldhead);
+! put_header_ptr(bi, buf->b_u_newhead);
+! put_header_ptr(bi, buf->b_u_curhead);
+!
+! undo_write_bytes(bi, (long_u)buf->b_u_numhead, 4);
+! undo_write_bytes(bi, (long_u)buf->b_u_seq_last, 4);
+! undo_write_bytes(bi, (long_u)buf->b_u_seq_cur, 4);
+! time_to_bytes(buf->b_u_time_cur, time_buf);
+! undo_write(bi, time_buf, 8);
+
+ /* Optional fields. */
+! undo_write_bytes(bi, 4, 1);
+! undo_write_bytes(bi, UF_LAST_SAVE_NR, 1);
+! undo_write_bytes(bi, (long_u)buf->b_u_save_nr_last, 4);
+
+! undo_write_bytes(bi, 0, 1); /* end marker */
+
+ return OK;
+ }
+
+ static int
+! serialize_uhp(bi, uhp)
+! bufinfo_T *bi;
+ u_header_T *uhp;
+ {
+ int i;
+ u_entry_T *uep;
++ char_u time_buf[8];
+
+! if (undo_write_bytes(bi, (long_u)UF_HEADER_MAGIC, 2) == FAIL)
+ return FAIL;
+
+! put_header_ptr(bi, uhp->uh_next.ptr);
+! put_header_ptr(bi, uhp->uh_prev.ptr);
+! put_header_ptr(bi, uhp->uh_alt_next.ptr);
+! put_header_ptr(bi, uhp->uh_alt_prev.ptr);
+! undo_write_bytes(bi, uhp->uh_seq, 4);
+! serialize_pos(bi, uhp->uh_cursor);
+ #ifdef FEAT_VIRTUALEDIT
+! undo_write_bytes(bi, (long_u)uhp->uh_cursor_vcol, 4);
+ #else
+! undo_write_bytes(bi, (long_u)0, 4);
+ #endif
+! undo_write_bytes(bi, (long_u)uhp->uh_flags, 2);
+ /* Assume NMARKS will stay the same. */
+ for (i = 0; i < NMARKS; ++i)
+! serialize_pos(bi, uhp->uh_namedm[i]);
+! serialize_visualinfo(bi, &uhp->uh_visual);
+! time_to_bytes(uhp->uh_time, time_buf);
+! undo_write(bi, time_buf, 8);
+
+ /* Optional fields. */
+! undo_write_bytes(bi, 4, 1);
+! undo_write_bytes(bi, UHP_SAVE_NR, 1);
+! undo_write_bytes(bi, (long_u)uhp->uh_save_nr, 4);
+
+! undo_write_bytes(bi, 0, 1); /* end marker */
+
+ /* Write all the entries. */
+ for (uep = uhp->uh_entry; uep != NULL; uep = uep->ue_next)
+ {
+! undo_write_bytes(bi, (long_u)UF_ENTRY_MAGIC, 2);
+! if (serialize_uep(bi, uep) == FAIL)
+ return FAIL;
+ }
+! undo_write_bytes(bi, (long_u)UF_ENTRY_END_MAGIC, 2);
+ return OK;
+ }
+
+ static u_header_T *
+! unserialize_uhp(bi, file_name)
+! bufinfo_T *bi;
+ char_u *file_name;
+ {
+ u_header_T *uhp;
+***************
+*** 1051,1106 ****
+ #ifdef U_DEBUG
+ uhp->uh_magic = UH_MAGIC;
+ #endif
+! uhp->uh_next.seq = get4c(fp);
+! uhp->uh_prev.seq = get4c(fp);
+! uhp->uh_alt_next.seq = get4c(fp);
+! uhp->uh_alt_prev.seq = get4c(fp);
+! uhp->uh_seq = get4c(fp);
+ if (uhp->uh_seq <= 0)
+ {
+ corruption_error("uh_seq", file_name);
+ vim_free(uhp);
+ return NULL;
+ }
+! unserialize_pos(&uhp->uh_cursor, fp);
+ #ifdef FEAT_VIRTUALEDIT
+! uhp->uh_cursor_vcol = get4c(fp);
+ #else
+! (void)get4c(fp);
+ #endif
+! uhp->uh_flags = get2c(fp);
+ for (i = 0; i < NMARKS; ++i)
+! unserialize_pos(&uhp->uh_namedm[i], fp);
+! unserialize_visualinfo(&uhp->uh_visual, fp);
+! uhp->uh_time = get8ctime(fp);
+
+ /* Optional fields. */
+ for (;;)
+ {
+! int len = getc(fp);
+ int what;
+
+ if (len == 0)
+ break;
+! what = getc(fp);
+ switch (what)
+ {
+ case UHP_SAVE_NR:
+! uhp->uh_save_nr = get4c(fp);
+ break;
+ default:
+ /* field not supported, skip */
+ while (--len >= 0)
+! (void)getc(fp);
+ }
+ }
+
+ /* Unserialize the uep list. */
+ last_uep = NULL;
+! while ((c = get2c(fp)) == UF_ENTRY_MAGIC)
+ {
+ error = FALSE;
+! uep = unserialize_uep(fp, &error, file_name);
+ if (last_uep == NULL)
+ uhp->uh_entry = uep;
+ else
+--- 1318,1373 ----
+ #ifdef U_DEBUG
+ uhp->uh_magic = UH_MAGIC;
+ #endif
+! uhp->uh_next.seq = undo_read_4c(bi);
+! uhp->uh_prev.seq = undo_read_4c(bi);
+! uhp->uh_alt_next.seq = undo_read_4c(bi);
+! uhp->uh_alt_prev.seq = undo_read_4c(bi);
+! uhp->uh_seq = undo_read_4c(bi);
+ if (uhp->uh_seq <= 0)
+ {
+ corruption_error("uh_seq", file_name);
+ vim_free(uhp);
+ return NULL;
+ }
+! unserialize_pos(bi, &uhp->uh_cursor);
+ #ifdef FEAT_VIRTUALEDIT
+! uhp->uh_cursor_vcol = undo_read_4c(bi);
+ #else
+! (void)undo_read_4c(bi);
+ #endif
+! uhp->uh_flags = undo_read_2c(bi);
+ for (i = 0; i < NMARKS; ++i)
+! unserialize_pos(bi, &uhp->uh_namedm[i]);
+! unserialize_visualinfo(bi, &uhp->uh_visual);
+! uhp->uh_time = undo_read_time(bi);
+
+ /* Optional fields. */
+ for (;;)
+ {
+! int len = undo_read_byte(bi);
+ int what;
+
+ if (len == 0)
+ break;
+! what = undo_read_byte(bi);
+ switch (what)
+ {
+ case UHP_SAVE_NR:
+! uhp->uh_save_nr = undo_read_4c(bi);
+ break;
+ default:
+ /* field not supported, skip */
+ while (--len >= 0)
+! (void)undo_read_byte(bi);
+ }
+ }
+
+ /* Unserialize the uep list. */
+ last_uep = NULL;
+! while ((c = undo_read_2c(bi)) == UF_ENTRY_MAGIC)
+ {
+ error = FALSE;
+! uep = unserialize_uep(bi, &error, file_name);
+ if (last_uep == NULL)
+ uhp->uh_entry = uep;
+ else
+***************
+*** 1123,1157 ****
+ }
+
+ /*
+! * Serialize "uep" to "fp".
+ */
+ static int
+! serialize_uep(fp, buf, uep)
+! FILE *fp;
+! buf_T *buf;
+ u_entry_T *uep;
+ {
+ int i;
+ size_t len;
+
+! put_bytes(fp, (long_u)uep->ue_top, 4);
+! put_bytes(fp, (long_u)uep->ue_bot, 4);
+! put_bytes(fp, (long_u)uep->ue_lcount, 4);
+! put_bytes(fp, (long_u)uep->ue_size, 4);
+ for (i = 0; i < uep->ue_size; ++i)
+ {
+ len = STRLEN(uep->ue_array[i]);
+! if (put_bytes(fp, (long_u)len, 4) == FAIL)
+ return FAIL;
+! if (len > 0 && fwrite_crypt(buf, uep->ue_array[i], len, fp) != 1)
+ return FAIL;
+ }
+ return OK;
+ }
+
+ static u_entry_T *
+! unserialize_uep(fp, error, file_name)
+! FILE *fp;
+ int *error;
+ char_u *file_name;
+ {
+--- 1390,1423 ----
+ }
+
+ /*
+! * Serialize "uep".
+ */
+ static int
+! serialize_uep(bi, uep)
+! bufinfo_T *bi;
+ u_entry_T *uep;
+ {
+ int i;
+ size_t len;
+
+! undo_write_bytes(bi, (long_u)uep->ue_top, 4);
+! undo_write_bytes(bi, (long_u)uep->ue_bot, 4);
+! undo_write_bytes(bi, (long_u)uep->ue_lcount, 4);
+! undo_write_bytes(bi, (long_u)uep->ue_size, 4);
+ for (i = 0; i < uep->ue_size; ++i)
+ {
+ len = STRLEN(uep->ue_array[i]);
+! if (undo_write_bytes(bi, (long_u)len, 4) == FAIL)
+ return FAIL;
+! if (len > 0 && fwrite_crypt(bi, uep->ue_array[i], len) == FAIL)
+ return FAIL;
+ }
+ return OK;
+ }
+
+ static u_entry_T *
+! unserialize_uep(bi, error, file_name)
+! bufinfo_T *bi;
+ int *error;
+ char_u *file_name;
+ {
+***************
+*** 1168,1177 ****
+ #ifdef U_DEBUG
+ uep->ue_magic = UE_MAGIC;
+ #endif
+! uep->ue_top = get4c(fp);
+! uep->ue_bot = get4c(fp);
+! uep->ue_lcount = get4c(fp);
+! uep->ue_size = get4c(fp);
+ if (uep->ue_size > 0)
+ {
+ array = (char_u **)U_ALLOC_LINE(sizeof(char_u *) * uep->ue_size);
+--- 1434,1443 ----
+ #ifdef U_DEBUG
+ uep->ue_magic = UE_MAGIC;
+ #endif
+! uep->ue_top = undo_read_4c(bi);
+! uep->ue_bot = undo_read_4c(bi);
+! uep->ue_lcount = undo_read_4c(bi);
+! uep->ue_size = undo_read_4c(bi);
+ if (uep->ue_size > 0)
+ {
+ array = (char_u **)U_ALLOC_LINE(sizeof(char_u *) * uep->ue_size);
+***************
+*** 1188,1196 ****
+
+ for (i = 0; i < uep->ue_size; ++i)
+ {
+! line_len = get4c(fp);
+ if (line_len >= 0)
+! line = read_string_decrypt(curbuf, fp, line_len);
+ else
+ {
+ line = NULL;
+--- 1454,1462 ----
+
+ for (i = 0; i < uep->ue_size; ++i)
+ {
+! line_len = undo_read_4c(bi);
+ if (line_len >= 0)
+! line = read_string_decrypt(bi, line_len);
+ else
+ {
+ line = NULL;
+***************
+*** 1207,1289 ****
+ }
+
+ /*
+! * Serialize "pos" to "fp".
+ */
+ static void
+! serialize_pos(pos, fp)
+ pos_T pos;
+- FILE *fp;
+ {
+! put_bytes(fp, (long_u)pos.lnum, 4);
+! put_bytes(fp, (long_u)pos.col, 4);
+ #ifdef FEAT_VIRTUALEDIT
+! put_bytes(fp, (long_u)pos.coladd, 4);
+ #else
+! put_bytes(fp, (long_u)0, 4);
+ #endif
+ }
+
+ /*
+! * Unserialize the pos_T at the current position in fp.
+ */
+ static void
+! unserialize_pos(pos, fp)
+ pos_T *pos;
+- FILE *fp;
+ {
+! pos->lnum = get4c(fp);
+ if (pos->lnum < 0)
+ pos->lnum = 0;
+! pos->col = get4c(fp);
+ if (pos->col < 0)
+ pos->col = 0;
+ #ifdef FEAT_VIRTUALEDIT
+! pos->coladd = get4c(fp);
+ if (pos->coladd < 0)
+ pos->coladd = 0;
+ #else
+! (void)get4c(fp);
+ #endif
+ }
+
+ /*
+! * Serialize "info" to "fp".
+ */
+ static void
+! serialize_visualinfo(info, fp)
+ visualinfo_T *info;
+- FILE *fp;
+ {
+! serialize_pos(info->vi_start, fp);
+! serialize_pos(info->vi_end, fp);
+! put_bytes(fp, (long_u)info->vi_mode, 4);
+! put_bytes(fp, (long_u)info->vi_curswant, 4);
+ }
+
+ /*
+! * Unserialize the visualinfo_T at the current position in fp.
+ */
+ static void
+! unserialize_visualinfo(info, fp)
+ visualinfo_T *info;
+- FILE *fp;
+- {
+- unserialize_pos(&info->vi_start, fp);
+- unserialize_pos(&info->vi_end, fp);
+- info->vi_mode = get4c(fp);
+- info->vi_curswant = get4c(fp);
+- }
+-
+- /*
+- * Write the pointer to an undo header. Instead of writing the pointer itself
+- * we use the sequence number of the header. This is converted back to
+- * pointers when reading. */
+- static void
+- put_header_ptr(fp, uhp)
+- FILE *fp;
+- u_header_T *uhp;
+ {
+! put_bytes(fp, (long_u)(uhp != NULL ? uhp->uh_seq : 0), 4);
+ }
+
+ /*
+--- 1473,1543 ----
+ }
+
+ /*
+! * Serialize "pos".
+ */
+ static void
+! serialize_pos(bi, pos)
+! bufinfo_T *bi;
+ pos_T pos;
+ {
+! undo_write_bytes(bi, (long_u)pos.lnum, 4);
+! undo_write_bytes(bi, (long_u)pos.col, 4);
+ #ifdef FEAT_VIRTUALEDIT
+! undo_write_bytes(bi, (long_u)pos.coladd, 4);
+ #else
+! undo_write_bytes(bi, (long_u)0, 4);
+ #endif
+ }
+
+ /*
+! * Unserialize the pos_T at the current position.
+ */
+ static void
+! unserialize_pos(bi, pos)
+! bufinfo_T *bi;
+ pos_T *pos;
+ {
+! pos->lnum = undo_read_4c(bi);
+ if (pos->lnum < 0)
+ pos->lnum = 0;
+! pos->col = undo_read_4c(bi);
+ if (pos->col < 0)
+ pos->col = 0;
+ #ifdef FEAT_VIRTUALEDIT
+! pos->coladd = undo_read_4c(bi);
+ if (pos->coladd < 0)
+ pos->coladd = 0;
+ #else
+! (void)undo_read_4c(bi);
+ #endif
+ }
+
+ /*
+! * Serialize "info".
+ */
+ static void
+! serialize_visualinfo(bi, info)
+! bufinfo_T *bi;
+ visualinfo_T *info;
+ {
+! serialize_pos(bi, info->vi_start);
+! serialize_pos(bi, info->vi_end);
+! undo_write_bytes(bi, (long_u)info->vi_mode, 4);
+! undo_write_bytes(bi, (long_u)info->vi_curswant, 4);
+ }
+
+ /*
+! * Unserialize the visualinfo_T at the current position.
+ */
+ static void
+! unserialize_visualinfo(bi, info)
+! bufinfo_T *bi;
+ visualinfo_T *info;
+ {
+! unserialize_pos(bi, &info->vi_start);
+! unserialize_pos(bi, &info->vi_end);
+! info->vi_mode = undo_read_4c(bi);
+! info->vi_curswant = undo_read_4c(bi);
+ }
+
+ /*
+***************
+*** 1317,1324 ****
+ struct stat st_old;
+ struct stat st_new;
+ #endif
+ #ifdef FEAT_CRYPT
+! int do_crypt = FALSE;
+ #endif
+
+ if (name == NULL)
+--- 1571,1581 ----
+ struct stat st_old;
+ struct stat st_new;
+ #endif
++ bufinfo_T bi;
++
+ #ifdef FEAT_CRYPT
+! bi.bi_state = NULL;
+! bi.bi_buffer = NULL;
+ #endif
+
+ if (name == NULL)
+***************
+*** 1474,1487 ****
+ u_sync(TRUE);
+
+ /*
+! * Write the header.
+ */
+! if (serialize_header(fp, buf, hash) == FAIL)
+ goto write_error;
+- #ifdef FEAT_CRYPT
+- if (*buf->b_p_key != NUL)
+- do_crypt = TRUE;
+- #endif
+
+ /*
+ * Iteratively serialize UHPs and their UEPs from the top down.
+--- 1731,1742 ----
+ u_sync(TRUE);
+
+ /*
+! * Write the header. Initializes encryption, if enabled.
+ */
+! bi.bi_buf = buf;
+! bi.bi_fp = fp;
+! if (serialize_header(&bi, hash) == FAIL)
+ goto write_error;
+
+ /*
+ * Iteratively serialize UHPs and their UEPs from the top down.
+***************
+*** 1497,1503 ****
+ #ifdef U_DEBUG
+ ++headers_written;
+ #endif
+! if (serialize_uhp(fp, buf, uhp) == FAIL)
+ goto write_error;
+ }
+
+--- 1752,1758 ----
+ #ifdef U_DEBUG
+ ++headers_written;
+ #endif
+! if (serialize_uhp(&bi, uhp) == FAIL)
+ goto write_error;
+ }
+
+***************
+*** 1516,1522 ****
+ uhp = uhp->uh_next.ptr;
+ }
+
+! if (put_bytes(fp, (long_u)UF_HEADER_END_MAGIC, 2) == OK)
+ write_ok = TRUE;
+ #ifdef U_DEBUG
+ if (headers_written != buf->b_u_numhead)
+--- 1771,1777 ----
+ uhp = uhp->uh_next.ptr;
+ }
+
+! if (undo_write_bytes(&bi, (long_u)UF_HEADER_END_MAGIC, 2) == OK)
+ write_ok = TRUE;
+ #ifdef U_DEBUG
+ if (headers_written != buf->b_u_numhead)
+***************
+*** 1526,1531 ****
+--- 1781,1791 ----
+ }
+ #endif
+
++ #ifdef FEAT_CRYPT
++ if (bi.bi_state != NULL && undo_flush(&bi) == FAIL)
++ write_ok = FALSE;
++ #endif
++
+ write_error:
+ fclose(fp);
+ if (!write_ok)
+***************
+*** 1551,1558 ****
+
+ theend:
+ #ifdef FEAT_CRYPT
+! if (do_crypt)
+! crypt_pop_state();
+ #endif
+ if (file_name != name)
+ vim_free(file_name);
+--- 1811,1819 ----
+
+ theend:
+ #ifdef FEAT_CRYPT
+! if (bi.bi_state != NULL)
+! crypt_free_state(bi.bi_state);
+! vim_free(bi.bi_buffer);
+ #endif
+ if (file_name != name)
+ vim_free(file_name);
+***************
+*** 1598,1606 ****
+ struct stat st_orig;
+ struct stat st_undo;
+ #endif
+! #ifdef FEAT_CRYPT
+! int do_decrypt = FALSE;
+! #endif
+
+ if (name == NULL)
+ {
+--- 1859,1865 ----
+ struct stat st_orig;
+ struct stat st_undo;
+ #endif
+! bufinfo_T bi;
+
+ if (name == NULL)
+ {
+***************
+*** 1644,1649 ****
+--- 1903,1914 ----
+ EMSG2(_("E822: Cannot open undo file for reading: %s"), file_name);
+ goto error;
+ }
++ bi.bi_buf = curbuf;
++ bi.bi_fp = fp;
++ #ifdef FEAT_CRYPT
++ bi.bi_state = NULL;
++ bi.bi_buffer = NULL;
++ #endif
+
+ /*
+ * Read the undo file header.
+***************
+*** 1664,1675 ****
+ file_name);
+ goto error;
+ }
+! if (prepare_crypt_read(fp) == FAIL)
+ {
+ EMSG2(_("E826: Undo file decryption failed: %s"), file_name);
+ goto error;
+ }
+! do_decrypt = TRUE;
+ #else
+ EMSG2(_("E827: Undo file is encrypted: %s"), file_name);
+ goto error;
+--- 1929,1952 ----
+ file_name);
+ goto error;
+ }
+! bi.bi_state = crypt_create_from_file(fp, curbuf->b_p_key);
+! if (bi.bi_state == NULL)
+ {
+ EMSG2(_("E826: Undo file decryption failed: %s"), file_name);
+ goto error;
+ }
+! if (crypt_whole_undofile(bi.bi_state->method_nr))
+! {
+! bi.bi_buffer = alloc(CRYPT_BUF_SIZE);
+! if (bi.bi_buffer == NULL)
+! {
+! crypt_free_state(bi.bi_state);
+! bi.bi_state = NULL;
+! goto error;
+! }
+! bi.bi_avail = 0;
+! bi.bi_used = 0;
+! }
+ #else
+ EMSG2(_("E827: Undo file is encrypted: %s"), file_name);
+ goto error;
+***************
+*** 1681,1692 ****
+ goto error;
+ }
+
+! if (fread(read_hash, UNDO_HASH_SIZE, 1, fp) != 1)
+ {
+ corruption_error("hash", file_name);
+ goto error;
+ }
+! line_count = (linenr_T)get4c(fp);
+ if (memcmp(hash, read_hash, UNDO_HASH_SIZE) != 0
+ || line_count != curbuf->b_ml.ml_line_count)
+ {
+--- 1958,1969 ----
+ goto error;
+ }
+
+! if (undo_read(&bi, read_hash, (size_t)UNDO_HASH_SIZE) == FAIL)
+ {
+ corruption_error("hash", file_name);
+ goto error;
+ }
+! line_count = (linenr_T)undo_read_4c(&bi);
+ if (memcmp(hash, read_hash, UNDO_HASH_SIZE) != 0
+ || line_count != curbuf->b_ml.ml_line_count)
+ {
+***************
+*** 1703,1715 ****
+ }
+
+ /* Read undo data for "U" command. */
+! str_len = get4c(fp);
+ if (str_len < 0)
+ goto error;
+ if (str_len > 0)
+! line_ptr = read_string_decrypt(curbuf, fp, str_len);
+! line_lnum = (linenr_T)get4c(fp);
+! line_colnr = (colnr_T)get4c(fp);
+ if (line_lnum < 0 || line_colnr < 0)
+ {
+ corruption_error("line lnum/col", file_name);
+--- 1980,1992 ----
+ }
+
+ /* Read undo data for "U" command. */
+! str_len = undo_read_4c(&bi);
+ if (str_len < 0)
+ goto error;
+ if (str_len > 0)
+! line_ptr = read_string_decrypt(&bi, str_len);
+! line_lnum = (linenr_T)undo_read_4c(&bi);
+! line_colnr = (colnr_T)undo_read_4c(&bi);
+ if (line_lnum < 0 || line_colnr < 0)
+ {
+ corruption_error("line lnum/col", file_name);
+***************
+*** 1717,1748 ****
+ }
+
+ /* Begin general undo data */
+! old_header_seq = get4c(fp);
+! new_header_seq = get4c(fp);
+! cur_header_seq = get4c(fp);
+! num_head = get4c(fp);
+! seq_last = get4c(fp);
+! seq_cur = get4c(fp);
+! seq_time = get8ctime(fp);
+
+ /* Optional header fields. */
+ for (;;)
+ {
+! int len = getc(fp);
+ int what;
+
+ if (len == 0 || len == EOF)
+ break;
+! what = getc(fp);
+ switch (what)
+ {
+ case UF_LAST_SAVE_NR:
+! last_save_nr = get4c(fp);
+ break;
+ default:
+ /* field not supported, skip */
+ while (--len >= 0)
+! (void)getc(fp);
+ }
+ }
+
+--- 1994,2025 ----
+ }
+
+ /* Begin general undo data */
+! old_header_seq = undo_read_4c(&bi);
+! new_header_seq = undo_read_4c(&bi);
+! cur_header_seq = undo_read_4c(&bi);
+! num_head = undo_read_4c(&bi);
+! seq_last = undo_read_4c(&bi);
+! seq_cur = undo_read_4c(&bi);
+! seq_time = undo_read_time(&bi);
+
+ /* Optional header fields. */
+ for (;;)
+ {
+! int len = undo_read_byte(&bi);
+ int what;
+
+ if (len == 0 || len == EOF)
+ break;
+! what = undo_read_byte(&bi);
+ switch (what)
+ {
+ case UF_LAST_SAVE_NR:
+! last_save_nr = undo_read_4c(&bi);
+ break;
+ default:
+ /* field not supported, skip */
+ while (--len >= 0)
+! (void)undo_read_byte(&bi);
+ }
+ }
+
+***************
+*** 1758,1764 ****
+ goto error;
+ }
+
+! while ((c = get2c(fp)) == UF_HEADER_MAGIC)
+ {
+ if (num_read_uhps >= num_head)
+ {
+--- 2035,2041 ----
+ goto error;
+ }
+
+! while ((c = undo_read_2c(&bi)) == UF_HEADER_MAGIC)
+ {
+ if (num_read_uhps >= num_head)
+ {
+***************
+*** 1766,1772 ****
+ goto error;
+ }
+
+! uhp = unserialize_uhp(fp, file_name);
+ if (uhp == NULL)
+ goto error;
+ uhp_table[num_read_uhps++] = uhp;
+--- 2043,2049 ----
+ goto error;
+ }
+
+! uhp = unserialize_uhp(&bi, file_name);
+ if (uhp == NULL)
+ goto error;
+ uhp_table[num_read_uhps++] = uhp;
+***************
+*** 1898,1905 ****
+
+ theend:
+ #ifdef FEAT_CRYPT
+! if (do_decrypt)
+! crypt_pop_state();
+ #endif
+ if (fp != NULL)
+ fclose(fp);
+--- 2175,2183 ----
+
+ theend:
+ #ifdef FEAT_CRYPT
+! if (bi.bi_state != NULL)
+! crypt_free_state(bi.bi_state);
+! vim_free(bi.bi_buffer);
+ #endif
+ if (fp != NULL)
+ fclose(fp);
+*** ../vim-7.4.398/src/testdir/test71.in 2013-07-01 20:47:58.000000000 +0200
+--- src/testdir/test71.in 2014-08-09 15:12:57.997364196 +0200
+***************
+*** 13,18 ****
+--- 13,20 ----
+ :let cm0_bytes = getline('.', '.')
+ :/^start of cm=blowfish bytes/+1
+ :let cm1_bytes = getline('.', '.')
++ :/^start of cm=blowfish2 bytes/+1
++ :let cm2_bytes = getline('.', '.')
+ :bwipe!
+ :call append(0, text_lines)
+ :$d
+***************
+*** 36,41 ****
+--- 38,55 ----
+ :e Xtestfile
+ barfoo
+ :let cm1_read_back = getline('.', '$')
++ :set key=
++ :set cryptmethod=blowfish2
++ :" If the blowfish test fails 'cryptmethod' will be 'zip' now.
++ :%s/^/\=&cryptmethod == 'blowfish2' ? "OK " : "blowfish test failed "/
++ :X
++ bar2foo
++ bar2foo
++ :w! Xtestfile
++ :bwipe!
++ :e Xtestfile
++ bar2foo
++ :let cm2_read_back = getline('.', '$')
+ :bwipe!
+ :set bin noeol key=
+ :call append(0, cm0_bytes)
+***************
+*** 57,63 ****
+--- 71,90 ----
+ :set nobin
+ :e Xtestfile
+ barbar
++ :let cm1_read_bin = getline('.', '$')
++ :bwipe!
++ :set bin noeol key=
++ :call append(0, cm2_bytes)
++ :$d
++ :set fenc=latin1
++ :w! Xtestfile
++ :bwipe!
++ :set nobin
++ :e Xtestfile
++ barburp
++ :call append(0, cm1_read_bin)
+ :call append(0, cm0_read_bin)
++ :call append(0, cm2_read_back)
+ :call append(0, cm1_read_back)
+ :call append(0, cm0_read_back)
+ :set key= fenc=latin1
+*** ../vim-7.4.398/src/testdir/test71.ok 2010-05-21 15:21:48.000000000 +0200
+--- src/testdir/test71.ok 2014-08-09 15:28:07.349357660 +0200
+***************
+*** 4,10 ****
+--- 4,15 ----
+ OK 01234567890123456789012345678901234567
+ OK line 2 foo bar blah
+ OK line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
++ OK OK 01234567890123456789012345678901234567
++ OK OK line 2 foo bar blah
++ OK OK line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ 1234567890
+ aábbccddeëff
+ asdfasdfasdf
+ 0001112223333
++ abcdefghijklmnopqrstuvwxyz
++ !@#$%^&*()_+=-`~
+*** ../vim-7.4.398/src/testdir/test71a.in 2013-07-01 20:45:58.000000000 +0200
+--- src/testdir/test71a.in 2014-08-09 15:49:07.125348605 +0200
+***************
+*** 12,14 ****
+--- 12,18 ----
+ start of cm=blowfish bytes
+ VimCrypt~02!k)¾—#ÝSœõ=ºàÈ#¥M´†JÃAÍ¥M´†!€›õáÒ‚˜÷ Ú
+ end of cm=blowfish bytes
++
++ start of cm=blowfish2 bytes
++ VimCrypt~03!ÑNã;ÓÀ ^C)÷.¶«FSà‹6Ò[T˧…ؾ9 2 Q³Ì@—ßš­Ivª.ØÉîž`½$¯%Ð
++ end of cm=blowfish2 bytes
+*** ../vim-7.4.398/src/testdir/test72.in 2014-03-12 16:51:35.060792541 +0100
+--- src/testdir/test72.in 2014-08-09 15:12:58.001364196 +0200
+***************
+*** 81,86 ****
+--- 81,87 ----
+ :"
+ :" With encryption, cryptmethod=blowfish
+ :e! Xtestfile
++ rubbish
+ :set undofile cm=blowfish
+ ggdGijan
+ feb
+***************
+*** 100,105 ****
+--- 101,132 ----
+ :set key=
+ /bar
+ :.w >>test.out
++ u:.w >>test.out
++ u:.w >>test.out
++ u:.w >>test.out
++ :"
++ :" With encryption, cryptmethod=blowfish2
++ :e! Xtestfile
++ rubbish
++ :set undofile cm=blowfish2
++ ggdGijan
++ feb
++ mar
++ apr
++ jun:set ul=100
++ kk0ifoo :set ul=100
++ dd:set ul=100
++ ibar :set ul=100
++ :X
++ foo2bar
++ foo2bar
++ :w!
++ :bwipe!
++ :e Xtestfile
++ foo2bar
++ :set key=
++ /bar
++ :.w >>test.out
+ u:.w >>test.out
+ u:.w >>test.out
+ u:.w >>test.out
+*** ../vim-7.4.398/src/testdir/test72.ok 2012-01-04 19:04:17.000000000 +0100
+--- src/testdir/test72.ok 2014-08-09 15:12:58.001364196 +0200
+***************
+*** 25,27 ****
+--- 25,31 ----
+ apr
+ foo mar
+ mar
++ bar apr
++ apr
++ foo mar
++ mar
+*** ../vim-7.4.398/src/version.c 2014-08-07 13:55:05.898639758 +0200
+--- src/version.c 2014-08-09 15:11:28.665364838 +0200
+***************
+*** 743,744 ****
+--- 743,746 ----
+ { /* Add new patch number below this line */
++ /**/
++ 399,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+16. You step out of your room and realize that your parents have moved and
+ you don't have a clue when it happened.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff --git a/patches/source/vim/slack-desc.vim b/patches/source/vim/slack-desc.vim
new file mode 100644
index 000000000..04b1d5eb4
--- /dev/null
+++ b/patches/source/vim/slack-desc.vim
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+vim: vim (Vi IMproved)
+vim:
+vim: Vim is an almost compatible version of the UNIX editor vi. Many new
+vim: features have been added: multi level undo, command line history,
+vim: filename completion, block operations, and more.
+vim:
+vim: Vim's development is led by Bram Moolenaar.
+vim:
+vim: This package also contains the Exuberant Ctags program
+vim: written by Darren Hiebert.
+vim:
diff --git a/patches/source/vim/slack-desc.vim-gvim b/patches/source/vim/slack-desc.vim-gvim
new file mode 100644
index 000000000..27efae73c
--- /dev/null
+++ b/patches/source/vim/slack-desc.vim-gvim
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+vim-gvim: vim-gvim (gvim, the X/GTK2 enabled version of vim)
+vim-gvim:
+vim-gvim: Gvim is a graphical version of vim. Vim is an almost compatible
+vim-gvim: version of the UNIX editor vi. Many new features have been added,
+vim-gvim: such as multi level undo, command line history, filename completion,
+vim-gvim: block operations, and more.
+vim-gvim:
+vim-gvim: The main vim package in the AP series is required to use this package.
+vim-gvim:
+vim-gvim: Vim's development is led by Bram Moolenaar.
+vim-gvim:
diff --git a/patches/source/vim/vim-gvim.SlackBuild b/patches/source/vim/vim-gvim.SlackBuild
new file mode 100755
index 000000000..ddd555acd
--- /dev/null
+++ b/patches/source/vim/vim-gvim.SlackBuild
@@ -0,0 +1,222 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+VIMVER=7.4
+# This is the directory in the VIM source archive to cd into.
+DIRVER=74
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+PYVER=$(python -V 2>&1 | cut -f 2 -d' ' | cut -f 1-2 -d.)
+
+if [ "$ARCH" = "x86_64" ]; then
+ export SLKCFLAGS="-O2 -fPIC"
+ export LIBDIRSUFFIX="64"
+else
+ export SLKCFLAGS="-O2"
+ export LIBDIRSUFFIX=""
+fi
+export SLKLDFLAGS="-L/usr/lib${LIBDIRSUFFIX}"
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-vim-gvim
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+# Determine VIM patchlevel:
+if [ -d $CWD/patches ] ; then
+ cd $CWD/patches
+ PATCHLEVEL=$(/bin/ls ?.?.????.gz 2> /dev/null | tail -1 | cut -f 3 -d . )
+ if [ "$PATCHLEVEL" = "" ]; then
+ PATCHLEVEL=$(/bin/ls ?.?.???.gz 2> /dev/null | tail -1 | cut -f 3 -d . )
+ if [ "$PATCHLEVEL" = "" ]; then
+ PATCHLEVEL=000
+ fi
+ fi
+ cd $CWD
+fi
+
+cd $TMP
+rm -rf vim$DIRVER
+tar xvf $CWD/vim-$VIMVER.tar.?z* || exit 1
+
+config_vim() {
+CFLAGS="$SLKCFLAGS" LDFLAGS="$SLKLDFLAGS" \
+./configure \
+ $* \
+ --prefix=/usr \
+ --enable-pythoninterp \
+ --with-python-config-dir=/usr/lib${LIBDIRSUFFIX}/python$PYVER/config \
+ --enable-perlinterp \
+ --disable-tclinterp \
+ --enable-multibyte \
+ --enable-cscope \
+ --with-features=huge \
+ --with-compiledby="<volkerdi@slackware.com>" \
+ --build=$ARCH-slackware-linux
+
+ # I had been adding this, but got 100% complaints and 0% kudos:
+ # --enable-rubyinterp
+
+}
+
+cd $TMP/vim$DIRVER
+
+# If there's no syntax update, create one:
+if ! ls $CWD/vim-runtime-syntax-* 1> /dev/null 2> /dev/null ; then
+ rm -rf runtime/syntax.orig
+ cp -a runtime/syntax runtime/syntax.orig
+ echo "Fetching vim syntax updates from ftp.nluug.nl..."
+ rsync -avzcP ftp.nluug.nl::Vim/runtime/syntax/ runtime/syntax/
+ diff -u -r --new-file runtime/syntax.orig runtime/syntax | gzip -9c > $CWD/vim-runtime-syntax-$(date +%Y%m%d).diff.gz
+ rm -rf runtime/syntax
+ mv runtime/syntax.orig runtime/syntax
+fi
+
+# Apply the syntax update:
+zcat $CWD/vim-runtime-syntax-*.diff.gz | patch -p0 --verbose || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+for file in $CWD/patches/?.?.???.gz $CWD/patches/?.?.????.gz ; do
+ if [ -f $file ]; then
+ zcat $file | patch -p0 --verbose || exit 1
+ fi
+done
+
+config_vim --with-x --enable-gui=gtk2
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+rsync -lprvt $PKG/usr/share/man/ $PKG/usr/man/
+rm -r $PKG/usr/share/man
+
+# Fix manpage symlinks:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# Legacy binary links:
+( cd $PKG/usr/bin ; rm -rf ex )
+( cd $PKG/usr/bin ; ln -sf vim ex )
+( cd $PKG/usr/bin ; rm -rf rview )
+( cd $PKG/usr/bin ; ln -sf vim rview )
+( cd $PKG/usr/bin ; rm -rf rvim )
+( cd $PKG/usr/bin ; ln -sf vim rvim )
+( cd $PKG/usr/bin ; rm -rf view )
+( cd $PKG/usr/bin ; ln -sf vim view )
+( cd $PKG/usr/bin ; rm -rf eview )
+( cd $PKG/usr/bin ; ln -sf vim eview )
+( cd $PKG/usr/bin ; rm -rf evim )
+( cd $PKG/usr/bin ; ln -sf vim evim )
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc.vim-gvim > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# You'll have to run "gvim" to get the graphical version.
+# Seems like this is the common way for console and gui versions
+# of vim to co-exist. If your "vi" symlink isn't pointed in a
+# way that suits you, it is fully user serviceable. :-)
+( cd $PKG/usr/bin
+ rm -f gvim
+ mv vim gvim
+ for programlink in $(find . -type l | cut -b3-) ; do
+ rm $programlink
+ ln -sf gvim $programlink
+ done
+)
+rm -f vimtutor xxd
+
+# Perfect!
+# Now we get rid of everything that's not in the other vim package.
+# Let's assume (dangerous ;-) that we just built that in $TMP
+# and use it as a reference:
+if ! /bin/ls $TMP/vim-${VIMVER}*txz 1> /dev/null 2> /dev/null ; then
+ echo "FATAL: VIM package needed in $TMP"
+ exit 1
+fi
+mkdir $PKG/vim
+( cd $PKG
+ ( cd vim
+ echo "Extracting reference package $TMP/vim-${VIMVER}*txz:"
+ explodepkg $TMP/vim-${VIMVER}*txz 1> /dev/null
+ sh install/doinst.sh
+ )
+)
+rm -r $PKG/vim/install
+( cd $PKG
+ find vim | cut -b4- | while read sharedfile ; do
+ if [ ! -d $sharedfile ]; then
+ rm --verbose $PKG/$sharedfile
+ fi
+ done
+)
+
+# Finally, reference purge:
+rm -rf $PKG/vim
+
+# Perhaps we would be better off without this - forcing folks to run kappfinder
+# or something. It seems better than starting with nothing, but might force
+# people into defaults they don't want. Another nifty catch-22...
+mkdir -p $PKG/usr/share/applications
+cp -a $CWD/gvim.desktop $PKG/usr/share/applications
+mkdir -p $PKG/usr/share/pixmaps
+cp -a $CWD/gvim.png $PKG/usr/share/pixmaps
+
+# Remove empty directories:
+find $PKG -type d -exec rmdir -p {} \; 2> /dev/null
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/vim-gvim-$VIMVER.$PATCHLEVEL-$ARCH-$BUILD.txz
+
diff --git a/patches/source/vim/vim-runtime-syntax-20131002.diff b/patches/source/vim/vim-runtime-syntax-20131002.diff
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/patches/source/vim/vim-runtime-syntax-20131002.diff
diff --git a/patches/source/vim/vim.SlackBuild b/patches/source/vim/vim.SlackBuild
new file mode 100755
index 000000000..91eeb4444
--- /dev/null
+++ b/patches/source/vim/vim.SlackBuild
@@ -0,0 +1,228 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+VIMVER=7.4
+CTAGSVER=5.8
+# This is the directory in the VIM source archive to cd into.
+DIRVER=74
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+PYVER=$(python -V 2>&1 | cut -f 2 -d' ' | cut -f 1-2 -d.)
+
+if [ "$ARCH" = "x86_64" ]; then
+ export SLKCFLAGS="-O2 -fPIC"
+ export LIBDIRSUFFIX="64"
+else
+ export SLKCFLAGS="-O2"
+ export LIBDIRSUFFIX=""
+fi
+export SLKLDFLAGS="-L/usr/lib${LIBDIRSUFFIX}"
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-vim
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+# Determine VIM patchlevel:
+if [ -d $CWD/patches ] ; then
+ cd $CWD/patches
+ PATCHLEVEL=$(/bin/ls ?.?.????.gz 2> /dev/null | tail -1 | cut -f 3 -d . )
+ if [ "$PATCHLEVEL" = "" ]; then
+ PATCHLEVEL=$(/bin/ls ?.?.???.gz 2> /dev/null | tail -1 | cut -f 3 -d . )
+ if [ "$PATCHLEVEL" = "" ]; then
+ PATCHLEVEL=000
+ fi
+ fi
+ cd $CWD
+fi
+
+# ctags was once a part of vim,
+# but now we have to bundle it in
+cd $TMP
+rm -rf ctags-$CTAGSVER
+tar xvf $CWD/ctags-$CTAGSVER.tar.gz || exit 1
+cd ctags-$CTAGSVER
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+CFLAGS="$SLKCFLAGS" LDFLAGS="$SLKLDFLAGS" \
+./configure \
+ --prefix=/usr \
+ --build=$ARCH-slackware-linux
+make $NUMJOBS || make || exit 1
+mkdir -p $PKG/usr/bin
+cat ctags > $PKG/usr/bin/ctags
+chmod 755 $PKG/usr/bin/ctags
+mkdir -p $PKG/usr/man/man1
+cat ctags.1 | gzip -9c > $PKG/usr/man/man1/ctags.1.gz
+mkdir -p $PKG/usr/doc/ctags-$CTAGSVER
+cp -a \
+ COPYING EXTENDING.html FAQ INSTALL INSTALL.oth NEWS README \
+ $PKG/usr/doc/ctags-$CTAGSVER
+chmod 644 $PKG/usr/doc/ctags-$CTAGSVER/*
+
+cd $TMP
+rm -rf vim$DIRVER
+tar xvf $CWD/vim-$VIMVER.tar.?z* || exit 1
+
+config_vim() {
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ $* \
+ --prefix=/usr \
+ --enable-pythoninterp \
+ --with-python-config-dir=/usr/lib${LIBDIRSUFFIX}/python$PYVER/config \
+ --enable-perlinterp \
+ --disable-tclinterp \
+ --enable-multibyte \
+ --enable-cscope \
+ --with-features=huge \
+ --with-compiledby="<volkerdi@slackware.com>" \
+ --build=$ARCH-slackware-linux
+
+ # I had been adding this, but got 100% complaints and 0% kudos:
+ # --enable-rubyinterp
+}
+
+cd $TMP/vim$DIRVER
+
+# If there's no syntax update, create one:
+if ! ls $CWD/vim-runtime-syntax-* 1> /dev/null 2> /dev/null ; then
+ rm -rf runtime/syntax.orig
+ cp -a runtime/syntax runtime/syntax.orig
+ echo "Fetching vim syntax updates from ftp.nluug.nl..."
+ rsync -avzcP ftp.nluug.nl::Vim/runtime/syntax/ runtime/syntax/
+ diff -u -r --new-file runtime/syntax.orig runtime/syntax | gzip -9c > $CWD/vim-runtime-syntax-$(date +%Y%m%d).diff.gz
+ rm -rf runtime/syntax
+ mv runtime/syntax.orig runtime/syntax
+fi
+
+# Apply the syntax update:
+zcat $CWD/vim-runtime-syntax-*.diff.gz | patch -p0 --verbose || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+for file in $CWD/patches/?.?.???.gz $CWD/patches/?.?.????.gz ; do
+ if [ -f $file ]; then
+ zcat $file | patch -p0 --verbose || exit 1
+ fi
+done
+
+config_vim --without-x --disable-gui
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+rsync -lprvt $PKG/usr/share/man/ $PKG/usr/man/
+rm -r $PKG/usr/share/man
+
+cp -a runtime/vimrc_example.vim runtime/vimrc.new
+
+# Don't make backups in /var/spool/cron/*, which fixes "crontab -e":
+zcat $CWD/vim.vimrc.diff.gz | patch -p1 --verbose || exit 1
+
+# Add patched vimrc to the package:
+cat runtime/vimrc.new > $PKG/usr/share/vim/vimrc.new
+
+# Fix manpage symlinks:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# Legacy binary links:
+( cd $PKG/usr/bin ; rm -rf ex )
+( cd $PKG/usr/bin ; ln -sf vim ex )
+( cd $PKG/usr/bin ; rm -rf rview )
+( cd $PKG/usr/bin ; ln -sf vim rview )
+( cd $PKG/usr/bin ; rm -rf rvim )
+( cd $PKG/usr/bin ; ln -sf vim rvim )
+( cd $PKG/usr/bin ; rm -rf view )
+( cd $PKG/usr/bin ; ln -sf vim view )
+( cd $PKG/usr/bin ; rm -rf eview )
+( cd $PKG/usr/bin ; ln -sf vim eview )
+( cd $PKG/usr/bin ; rm -rf evim )
+( cd $PKG/usr/bin ; ln -sf vim evim )
+
+mkdir -p $PKG/usr/doc/vim-$VIMVER.$PATCHLEVEL
+cp -a README.txt $PKG/usr/doc/vim-$VIMVER.$PATCHLEVEL
+find $PKG/usr/doc/vim-$VIMVER.$PATCHLEVEL -type f | xargs chmod 644
+( cd $PKG/usr/doc/vim-$VIMVER.$PATCHLEVEL ; rm -rf doc )
+( cd $PKG/usr/doc/vim-$VIMVER.$PATCHLEVEL ; ln -sf /usr/share/vim/vim$DIRVER doc )
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc.vim > $PKG/install/slack-desc
+cat << EOF > $PKG/install/doinst.sh
+#!/bin/sh
+config() {
+ NEW="\$1"
+ OLD="\$(dirname \$NEW)/\$(basename \$NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r \$OLD ]; then
+ mv \$NEW \$OLD
+ elif [ "\$(cat \$OLD | md5sum)" = "\$(cat \$NEW | md5sum)" ]; then # toss the redundant copy
+ rm \$NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+config usr/share/vim/vimrc.new
+EOF
+zcat $CWD/doinst.sh.gz >> $PKG/install/doinst.sh
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/vim-$VIMVER.$PATCHLEVEL-$ARCH-$BUILD.txz
+
+# Needed to build both packages in one shot for /patches:
+cd $CWD
+./vim-gvim.SlackBuild
diff --git a/patches/source/vim/vim.vimrc.diff b/patches/source/vim/vim.vimrc.diff
new file mode 100644
index 000000000..c94104a5f
--- /dev/null
+++ b/patches/source/vim/vim.vimrc.diff
@@ -0,0 +1,12 @@
+--- ./runtime/vimrc.new.orig 2008-07-02 15:11:53.000000000 -0500
++++ ./runtime/vimrc.new 2009-05-28 13:19:24.000000000 -0500
+@@ -87,6 +87,9 @@
+
+ endif " has("autocmd")
+
++" Make vim work with the 'crontab -e' command
++set backupskip+=/var/spool/cron/*
++
+ " Convenient command to see the difference between the current buffer and the
+ " file it was loaded from, thus the changes you made.
+ " Only define it when not defined already.
diff --git a/patches/source/wget/doinst.sh b/patches/source/wget/doinst.sh
new file mode 100644
index 000000000..dd81eb507
--- /dev/null
+++ b/patches/source/wget/doinst.sh
@@ -0,0 +1,14 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/wgetrc.new
+
diff --git a/patches/source/wget/slack-desc b/patches/source/wget/slack-desc
new file mode 100644
index 000000000..d023ea373
--- /dev/null
+++ b/patches/source/wget/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+wget: wget (a non-interactive network retriever)
+wget:
+wget: GNU Wget is a free network utility to retrieve files from the
+wget: World Wide Web using HTTP and FTP, the two most widely used Internet
+wget: protocols. It works non-interactively, thus enabling work in the
+wget: background after having logged off.
+wget:
+wget: The author of Wget is Hrvoje Niksic <hniksic@srce.hr>.
+wget:
+wget:
+wget:
diff --git a/patches/source/wget/wget.SlackBuild b/patches/source/wget/wget.SlackBuild
new file mode 100755
index 000000000..3704aa95e
--- /dev/null
+++ b/patches/source/wget/wget.SlackBuild
@@ -0,0 +1,109 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2012, 2013, 2014, 2015 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+VERSION=${VERSION:-$(echo wget-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-wget
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf wget-$VERSION
+tar xvf $CWD/wget-$VERSION.tar.?z || exit 1
+cd wget-$VERSION
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --docdir=/usr/doc/wget-$VERSION \
+ --with-ssl=openssl \
+ --build=${ARCH}-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+mv $PKG/etc/wgetrc $PKG/etc/wgetrc.new
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+rm -f $PKG/usr/info/dir
+gzip -9 $PKG/usr/info/* $PKG/usr/man/man?/*
+
+mkdir -p $PKG/usr/doc/wget-$VERSION
+cp -a \
+ AUTHORS COPYING* MAILING-LIST NEWS PATCHES README* TODO \
+ $PKG/usr/doc/wget-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/wget-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch
new file mode 100644
index 000000000..727684865
--- /dev/null
+++ b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch
@@ -0,0 +1,174 @@
+From cf4cab804c7afd5c45505528a8d16e46163243a2 Mon Sep 17 00:00:00 2001
+From: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
+Date: Fri, 14 Jul 2017 15:15:35 +0200
+Subject: [PATCH 1/8] hostapd: Avoid key reinstallation in FT handshake
+
+Do not reinstall TK to the driver during Reassociation Response frame
+processing if the first attempt of setting the TK succeeded. This avoids
+issues related to clearing the TX/RX PN that could result in reusing
+same PN values for transmitted frames (e.g., due to CCM nonce reuse and
+also hitting replay protection on the receiver) and accepting replayed
+frames on RX side.
+
+This issue was introduced by the commit
+0e84c25434e6a1f283c7b4e62e483729085b78d2 ('FT: Fix PTK configuration in
+authenticator') which allowed wpa_ft_install_ptk() to be called multiple
+times with the same PTK. While the second configuration attempt is
+needed with some drivers, it must be done only if the first attempt
+failed.
+
+Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
+---
+ src/ap/ieee802_11.c | 16 +++++++++++++---
+ src/ap/wpa_auth.c | 11 +++++++++++
+ src/ap/wpa_auth.h | 3 ++-
+ src/ap/wpa_auth_ft.c | 10 ++++++++++
+ src/ap/wpa_auth_i.h | 1 +
+ 5 files changed, 37 insertions(+), 4 deletions(-)
+
+diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
+index 4e04169..333035f 100644
+--- a/src/ap/ieee802_11.c
++++ b/src/ap/ieee802_11.c
+@@ -1841,6 +1841,7 @@ static int add_associated_sta(struct hostapd_data *hapd,
+ {
+ struct ieee80211_ht_capabilities ht_cap;
+ struct ieee80211_vht_capabilities vht_cap;
++ int set = 1;
+
+ /*
+ * Remove the STA entry to ensure the STA PS state gets cleared and
+@@ -1848,9 +1849,18 @@ static int add_associated_sta(struct hostapd_data *hapd,
+ * FT-over-the-DS, where a station re-associates back to the same AP but
+ * skips the authentication flow, or if working with a driver that
+ * does not support full AP client state.
++ *
++ * Skip this if the STA has already completed FT reassociation and the
++ * TK has been configured since the TX/RX PN must not be reset to 0 for
++ * the same key.
+ */
+- if (!sta->added_unassoc)
++ if (!sta->added_unassoc &&
++ (!(sta->flags & WLAN_STA_AUTHORIZED) ||
++ !wpa_auth_sta_ft_tk_already_set(sta->wpa_sm))) {
+ hostapd_drv_sta_remove(hapd, sta->addr);
++ wpa_auth_sm_event(sta->wpa_sm, WPA_DRV_STA_REMOVED);
++ set = 0;
++ }
+
+ #ifdef CONFIG_IEEE80211N
+ if (sta->flags & WLAN_STA_HT)
+@@ -1873,11 +1883,11 @@ static int add_associated_sta(struct hostapd_data *hapd,
+ sta->flags & WLAN_STA_VHT ? &vht_cap : NULL,
+ sta->flags | WLAN_STA_ASSOC, sta->qosinfo,
+ sta->vht_opmode, sta->p2p_ie ? 1 : 0,
+- sta->added_unassoc)) {
++ set)) {
+ hostapd_logger(hapd, sta->addr,
+ HOSTAPD_MODULE_IEEE80211, HOSTAPD_LEVEL_NOTICE,
+ "Could not %s STA to kernel driver",
+- sta->added_unassoc ? "set" : "add");
++ set ? "set" : "add");
+
+ if (sta->added_unassoc) {
+ hostapd_drv_sta_remove(hapd, sta->addr);
+diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c
+index 3587086..707971d 100644
+--- a/src/ap/wpa_auth.c
++++ b/src/ap/wpa_auth.c
+@@ -1745,6 +1745,9 @@ int wpa_auth_sm_event(struct wpa_state_machine *sm, enum wpa_event event)
+ #else /* CONFIG_IEEE80211R */
+ break;
+ #endif /* CONFIG_IEEE80211R */
++ case WPA_DRV_STA_REMOVED:
++ sm->tk_already_set = FALSE;
++ return 0;
+ }
+
+ #ifdef CONFIG_IEEE80211R
+@@ -3250,6 +3253,14 @@ int wpa_auth_sta_wpa_version(struct wpa_state_machine *sm)
+ }
+
+
++int wpa_auth_sta_ft_tk_already_set(struct wpa_state_machine *sm)
++{
++ if (!sm || !wpa_key_mgmt_ft(sm->wpa_key_mgmt))
++ return 0;
++ return sm->tk_already_set;
++}
++
++
+ int wpa_auth_sta_clear_pmksa(struct wpa_state_machine *sm,
+ struct rsn_pmksa_cache_entry *entry)
+ {
+diff --git a/src/ap/wpa_auth.h b/src/ap/wpa_auth.h
+index 0de8d97..97461b0 100644
+--- a/src/ap/wpa_auth.h
++++ b/src/ap/wpa_auth.h
+@@ -267,7 +267,7 @@ void wpa_receive(struct wpa_authenticator *wpa_auth,
+ u8 *data, size_t data_len);
+ enum wpa_event {
+ WPA_AUTH, WPA_ASSOC, WPA_DISASSOC, WPA_DEAUTH, WPA_REAUTH,
+- WPA_REAUTH_EAPOL, WPA_ASSOC_FT
++ WPA_REAUTH_EAPOL, WPA_ASSOC_FT, WPA_DRV_STA_REMOVED
+ };
+ void wpa_remove_ptk(struct wpa_state_machine *sm);
+ int wpa_auth_sm_event(struct wpa_state_machine *sm, enum wpa_event event);
+@@ -280,6 +280,7 @@ int wpa_auth_pairwise_set(struct wpa_state_machine *sm);
+ int wpa_auth_get_pairwise(struct wpa_state_machine *sm);
+ int wpa_auth_sta_key_mgmt(struct wpa_state_machine *sm);
+ int wpa_auth_sta_wpa_version(struct wpa_state_machine *sm);
++int wpa_auth_sta_ft_tk_already_set(struct wpa_state_machine *sm);
+ int wpa_auth_sta_clear_pmksa(struct wpa_state_machine *sm,
+ struct rsn_pmksa_cache_entry *entry);
+ struct rsn_pmksa_cache_entry *
+diff --git a/src/ap/wpa_auth_ft.c b/src/ap/wpa_auth_ft.c
+index 42242a5..e63b99a 100644
+--- a/src/ap/wpa_auth_ft.c
++++ b/src/ap/wpa_auth_ft.c
+@@ -780,6 +780,14 @@ void wpa_ft_install_ptk(struct wpa_state_machine *sm)
+ return;
+ }
+
++ if (sm->tk_already_set) {
++ /* Must avoid TK reconfiguration to prevent clearing of TX/RX
++ * PN in the driver */
++ wpa_printf(MSG_DEBUG,
++ "FT: Do not re-install same PTK to the driver");
++ return;
++ }
++
+ /* FIX: add STA entry to kernel/driver here? The set_key will fail
+ * most likely without this.. At the moment, STA entry is added only
+ * after association has been completed. This function will be called
+@@ -792,6 +800,7 @@ void wpa_ft_install_ptk(struct wpa_state_machine *sm)
+
+ /* FIX: MLME-SetProtection.Request(TA, Tx_Rx) */
+ sm->pairwise_set = TRUE;
++ sm->tk_already_set = TRUE;
+ }
+
+
+@@ -898,6 +907,7 @@ static int wpa_ft_process_auth_req(struct wpa_state_machine *sm,
+
+ sm->pairwise = pairwise;
+ sm->PTK_valid = TRUE;
++ sm->tk_already_set = FALSE;
+ wpa_ft_install_ptk(sm);
+
+ buflen = 2 + sizeof(struct rsn_mdie) + 2 + sizeof(struct rsn_ftie) +
+diff --git a/src/ap/wpa_auth_i.h b/src/ap/wpa_auth_i.h
+index 72b7eb3..7fd8f05 100644
+--- a/src/ap/wpa_auth_i.h
++++ b/src/ap/wpa_auth_i.h
+@@ -65,6 +65,7 @@ struct wpa_state_machine {
+ struct wpa_ptk PTK;
+ Boolean PTK_valid;
+ Boolean pairwise_set;
++ Boolean tk_already_set;
+ int keycount;
+ Boolean Pair;
+ struct wpa_key_replay_counter {
+--
+2.7.4
+
diff --git a/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch
new file mode 100644
index 000000000..1802d664a
--- /dev/null
+++ b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch
@@ -0,0 +1,250 @@
+From 927f891007c402fefd1ff384645b3f07597c3ede Mon Sep 17 00:00:00 2001
+From: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
+Date: Wed, 12 Jul 2017 16:03:24 +0200
+Subject: [PATCH 2/8] Prevent reinstallation of an already in-use group key
+
+Track the current GTK and IGTK that is in use and when receiving a
+(possibly retransmitted) Group Message 1 or WNM-Sleep Mode Response, do
+not install the given key if it is already in use. This prevents an
+attacker from trying to trick the client into resetting or lowering the
+sequence counter associated to the group key.
+
+Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
+---
+ src/common/wpa_common.h | 11 +++++
+ src/rsn_supp/wpa.c | 116 ++++++++++++++++++++++++++++++------------------
+ src/rsn_supp/wpa_i.h | 4 ++
+ 3 files changed, 87 insertions(+), 44 deletions(-)
+
+diff --git a/src/common/wpa_common.h b/src/common/wpa_common.h
+index af1d0f0..d200285 100644
+--- a/src/common/wpa_common.h
++++ b/src/common/wpa_common.h
+@@ -217,6 +217,17 @@ struct wpa_ptk {
+ size_t tk_len;
+ };
+
++struct wpa_gtk {
++ u8 gtk[WPA_GTK_MAX_LEN];
++ size_t gtk_len;
++};
++
++#ifdef CONFIG_IEEE80211W
++struct wpa_igtk {
++ u8 igtk[WPA_IGTK_MAX_LEN];
++ size_t igtk_len;
++};
++#endif /* CONFIG_IEEE80211W */
+
+ /* WPA IE version 1
+ * 00-50-f2:1 (OUI:OUI type)
+diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
+index 3c47879..95bd7be 100644
+--- a/src/rsn_supp/wpa.c
++++ b/src/rsn_supp/wpa.c
+@@ -714,6 +714,15 @@ static int wpa_supplicant_install_gtk(struct wpa_sm *sm,
+ const u8 *_gtk = gd->gtk;
+ u8 gtk_buf[32];
+
++ /* Detect possible key reinstallation */
++ if (sm->gtk.gtk_len == (size_t) gd->gtk_len &&
++ os_memcmp(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len) == 0) {
++ wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
++ "WPA: Not reinstalling already in-use GTK to the driver (keyidx=%d tx=%d len=%d)",
++ gd->keyidx, gd->tx, gd->gtk_len);
++ return 0;
++ }
++
+ wpa_hexdump_key(MSG_DEBUG, "WPA: Group Key", gd->gtk, gd->gtk_len);
+ wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
+ "WPA: Installing GTK to the driver (keyidx=%d tx=%d len=%d)",
+@@ -748,6 +757,9 @@ static int wpa_supplicant_install_gtk(struct wpa_sm *sm,
+ }
+ os_memset(gtk_buf, 0, sizeof(gtk_buf));
+
++ sm->gtk.gtk_len = gd->gtk_len;
++ os_memcpy(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len);
++
+ return 0;
+ }
+
+@@ -854,6 +866,48 @@ static int wpa_supplicant_pairwise_gtk(struct wpa_sm *sm,
+ }
+
+
++#ifdef CONFIG_IEEE80211W
++static int wpa_supplicant_install_igtk(struct wpa_sm *sm,
++ const struct wpa_igtk_kde *igtk)
++{
++ size_t len = wpa_cipher_key_len(sm->mgmt_group_cipher);
++ u16 keyidx = WPA_GET_LE16(igtk->keyid);
++
++ /* Detect possible key reinstallation */
++ if (sm->igtk.igtk_len == len &&
++ os_memcmp(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len) == 0) {
++ wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
++ "WPA: Not reinstalling already in-use IGTK to the driver (keyidx=%d)",
++ keyidx);
++ return 0;
++ }
++
++ wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
++ "WPA: IGTK keyid %d pn %02x%02x%02x%02x%02x%02x",
++ keyidx, MAC2STR(igtk->pn));
++ wpa_hexdump_key(MSG_DEBUG, "WPA: IGTK", igtk->igtk, len);
++ if (keyidx > 4095) {
++ wpa_msg(sm->ctx->msg_ctx, MSG_WARNING,
++ "WPA: Invalid IGTK KeyID %d", keyidx);
++ return -1;
++ }
++ if (wpa_sm_set_key(sm, wpa_cipher_to_alg(sm->mgmt_group_cipher),
++ broadcast_ether_addr,
++ keyidx, 0, igtk->pn, sizeof(igtk->pn),
++ igtk->igtk, len) < 0) {
++ wpa_msg(sm->ctx->msg_ctx, MSG_WARNING,
++ "WPA: Failed to configure IGTK to the driver");
++ return -1;
++ }
++
++ sm->igtk.igtk_len = len;
++ os_memcpy(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len);
++
++ return 0;
++}
++#endif /* CONFIG_IEEE80211W */
++
++
+ static int ieee80211w_set_keys(struct wpa_sm *sm,
+ struct wpa_eapol_ie_parse *ie)
+ {
+@@ -864,30 +918,14 @@ static int ieee80211w_set_keys(struct wpa_sm *sm,
+ if (ie->igtk) {
+ size_t len;
+ const struct wpa_igtk_kde *igtk;
+- u16 keyidx;
++
+ len = wpa_cipher_key_len(sm->mgmt_group_cipher);
+ if (ie->igtk_len != WPA_IGTK_KDE_PREFIX_LEN + len)
+ return -1;
++
+ igtk = (const struct wpa_igtk_kde *) ie->igtk;
+- keyidx = WPA_GET_LE16(igtk->keyid);
+- wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, "WPA: IGTK keyid %d "
+- "pn %02x%02x%02x%02x%02x%02x",
+- keyidx, MAC2STR(igtk->pn));
+- wpa_hexdump_key(MSG_DEBUG, "WPA: IGTK",
+- igtk->igtk, len);
+- if (keyidx > 4095) {
+- wpa_msg(sm->ctx->msg_ctx, MSG_WARNING,
+- "WPA: Invalid IGTK KeyID %d", keyidx);
+- return -1;
+- }
+- if (wpa_sm_set_key(sm, wpa_cipher_to_alg(sm->mgmt_group_cipher),
+- broadcast_ether_addr,
+- keyidx, 0, igtk->pn, sizeof(igtk->pn),
+- igtk->igtk, len) < 0) {
+- wpa_msg(sm->ctx->msg_ctx, MSG_WARNING,
+- "WPA: Failed to configure IGTK to the driver");
++ if (wpa_supplicant_install_igtk(sm, igtk) < 0)
+ return -1;
+- }
+ }
+
+ return 0;
+@@ -2307,7 +2345,7 @@ void wpa_sm_deinit(struct wpa_sm *sm)
+ */
+ void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid)
+ {
+- int clear_ptk = 1;
++ int clear_keys = 1;
+
+ if (sm == NULL)
+ return;
+@@ -2333,11 +2371,11 @@ void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid)
+ /* Prepare for the next transition */
+ wpa_ft_prepare_auth_request(sm, NULL);
+
+- clear_ptk = 0;
++ clear_keys = 0;
+ }
+ #endif /* CONFIG_IEEE80211R */
+
+- if (clear_ptk) {
++ if (clear_keys) {
+ /*
+ * IEEE 802.11, 8.4.10: Delete PTK SA on (re)association if
+ * this is not part of a Fast BSS Transition.
+@@ -2347,6 +2385,10 @@ void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid)
+ os_memset(&sm->ptk, 0, sizeof(sm->ptk));
+ sm->tptk_set = 0;
+ os_memset(&sm->tptk, 0, sizeof(sm->tptk));
++ os_memset(&sm->gtk, 0, sizeof(sm->gtk));
++#ifdef CONFIG_IEEE80211W
++ os_memset(&sm->igtk, 0, sizeof(sm->igtk));
++#endif /* CONFIG_IEEE80211W */
+ }
+
+ #ifdef CONFIG_TDLS
+@@ -2877,6 +2919,10 @@ void wpa_sm_drop_sa(struct wpa_sm *sm)
+ os_memset(sm->pmk, 0, sizeof(sm->pmk));
+ os_memset(&sm->ptk, 0, sizeof(sm->ptk));
+ os_memset(&sm->tptk, 0, sizeof(sm->tptk));
++ os_memset(&sm->gtk, 0, sizeof(sm->gtk));
++#ifdef CONFIG_IEEE80211W
++ os_memset(&sm->igtk, 0, sizeof(sm->igtk));
++#endif /* CONFIG_IEEE80211W */
+ #ifdef CONFIG_IEEE80211R
+ os_memset(sm->xxkey, 0, sizeof(sm->xxkey));
+ os_memset(sm->pmk_r0, 0, sizeof(sm->pmk_r0));
+@@ -2949,29 +2995,11 @@ int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 subelem_id, u8 *buf)
+ os_memset(&gd, 0, sizeof(gd));
+ #ifdef CONFIG_IEEE80211W
+ } else if (subelem_id == WNM_SLEEP_SUBELEM_IGTK) {
+- struct wpa_igtk_kde igd;
+- u16 keyidx;
+-
+- os_memset(&igd, 0, sizeof(igd));
+- keylen = wpa_cipher_key_len(sm->mgmt_group_cipher);
+- os_memcpy(igd.keyid, buf + 2, 2);
+- os_memcpy(igd.pn, buf + 4, 6);
+-
+- keyidx = WPA_GET_LE16(igd.keyid);
+- os_memcpy(igd.igtk, buf + 10, keylen);
+-
+- wpa_hexdump_key(MSG_DEBUG, "Install IGTK (WNM SLEEP)",
+- igd.igtk, keylen);
+- if (wpa_sm_set_key(sm, wpa_cipher_to_alg(sm->mgmt_group_cipher),
+- broadcast_ether_addr,
+- keyidx, 0, igd.pn, sizeof(igd.pn),
+- igd.igtk, keylen) < 0) {
+- wpa_printf(MSG_DEBUG, "Failed to install the IGTK in "
+- "WNM mode");
+- os_memset(&igd, 0, sizeof(igd));
++ const struct wpa_igtk_kde *igtk;
++
++ igtk = (const struct wpa_igtk_kde *) (buf + 2);
++ if (wpa_supplicant_install_igtk(sm, igtk) < 0)
+ return -1;
+- }
+- os_memset(&igd, 0, sizeof(igd));
+ #endif /* CONFIG_IEEE80211W */
+ } else {
+ wpa_printf(MSG_DEBUG, "Unknown element id");
+diff --git a/src/rsn_supp/wpa_i.h b/src/rsn_supp/wpa_i.h
+index f653ba6..afc9e37 100644
+--- a/src/rsn_supp/wpa_i.h
++++ b/src/rsn_supp/wpa_i.h
+@@ -31,6 +31,10 @@ struct wpa_sm {
+ u8 rx_replay_counter[WPA_REPLAY_COUNTER_LEN];
+ int rx_replay_counter_set;
+ u8 request_counter[WPA_REPLAY_COUNTER_LEN];
++ struct wpa_gtk gtk;
++#ifdef CONFIG_IEEE80211W
++ struct wpa_igtk igtk;
++#endif /* CONFIG_IEEE80211W */
+
+ struct eapol_sm *eapol; /* EAPOL state machine from upper level code */
+
+--
+2.7.4
+
diff --git a/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch
new file mode 100644
index 000000000..e2937b851
--- /dev/null
+++ b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch
@@ -0,0 +1,184 @@
+From 8280294e74846ea342389a0cd17215050fa5afe8 Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Sun, 1 Oct 2017 12:12:24 +0300
+Subject: [PATCH 3/8] Extend protection of GTK/IGTK reinstallation of WNM-Sleep
+ Mode cases
+
+This extends the protection to track last configured GTK/IGTK value
+separately from EAPOL-Key frames and WNM-Sleep Mode frames to cover a
+corner case where these two different mechanisms may get used when the
+GTK/IGTK has changed and tracking a single value is not sufficient to
+detect a possible key reconfiguration.
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+---
+ src/rsn_supp/wpa.c | 53 +++++++++++++++++++++++++++++++++++++---------------
+ src/rsn_supp/wpa_i.h | 2 ++
+ 2 files changed, 40 insertions(+), 15 deletions(-)
+
+diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
+index 95bd7be..7a2c68d 100644
+--- a/src/rsn_supp/wpa.c
++++ b/src/rsn_supp/wpa.c
+@@ -709,14 +709,17 @@ struct wpa_gtk_data {
+
+ static int wpa_supplicant_install_gtk(struct wpa_sm *sm,
+ const struct wpa_gtk_data *gd,
+- const u8 *key_rsc)
++ const u8 *key_rsc, int wnm_sleep)
+ {
+ const u8 *_gtk = gd->gtk;
+ u8 gtk_buf[32];
+
+ /* Detect possible key reinstallation */
+- if (sm->gtk.gtk_len == (size_t) gd->gtk_len &&
+- os_memcmp(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len) == 0) {
++ if ((sm->gtk.gtk_len == (size_t) gd->gtk_len &&
++ os_memcmp(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len) == 0) ||
++ (sm->gtk_wnm_sleep.gtk_len == (size_t) gd->gtk_len &&
++ os_memcmp(sm->gtk_wnm_sleep.gtk, gd->gtk,
++ sm->gtk_wnm_sleep.gtk_len) == 0)) {
+ wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
+ "WPA: Not reinstalling already in-use GTK to the driver (keyidx=%d tx=%d len=%d)",
+ gd->keyidx, gd->tx, gd->gtk_len);
+@@ -757,8 +760,14 @@ static int wpa_supplicant_install_gtk(struct wpa_sm *sm,
+ }
+ os_memset(gtk_buf, 0, sizeof(gtk_buf));
+
+- sm->gtk.gtk_len = gd->gtk_len;
+- os_memcpy(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len);
++ if (wnm_sleep) {
++ sm->gtk_wnm_sleep.gtk_len = gd->gtk_len;
++ os_memcpy(sm->gtk_wnm_sleep.gtk, gd->gtk,
++ sm->gtk_wnm_sleep.gtk_len);
++ } else {
++ sm->gtk.gtk_len = gd->gtk_len;
++ os_memcpy(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len);
++ }
+
+ return 0;
+ }
+@@ -852,7 +861,7 @@ static int wpa_supplicant_pairwise_gtk(struct wpa_sm *sm,
+ (wpa_supplicant_check_group_cipher(sm, sm->group_cipher,
+ gtk_len, gtk_len,
+ &gd.key_rsc_len, &gd.alg) ||
+- wpa_supplicant_install_gtk(sm, &gd, key_rsc))) {
++ wpa_supplicant_install_gtk(sm, &gd, key_rsc, 0))) {
+ wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
+ "RSN: Failed to install GTK");
+ os_memset(&gd, 0, sizeof(gd));
+@@ -868,14 +877,18 @@ static int wpa_supplicant_pairwise_gtk(struct wpa_sm *sm,
+
+ #ifdef CONFIG_IEEE80211W
+ static int wpa_supplicant_install_igtk(struct wpa_sm *sm,
+- const struct wpa_igtk_kde *igtk)
++ const struct wpa_igtk_kde *igtk,
++ int wnm_sleep)
+ {
+ size_t len = wpa_cipher_key_len(sm->mgmt_group_cipher);
+ u16 keyidx = WPA_GET_LE16(igtk->keyid);
+
+ /* Detect possible key reinstallation */
+- if (sm->igtk.igtk_len == len &&
+- os_memcmp(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len) == 0) {
++ if ((sm->igtk.igtk_len == len &&
++ os_memcmp(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len) == 0) ||
++ (sm->igtk_wnm_sleep.igtk_len == len &&
++ os_memcmp(sm->igtk_wnm_sleep.igtk, igtk->igtk,
++ sm->igtk_wnm_sleep.igtk_len) == 0)) {
+ wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
+ "WPA: Not reinstalling already in-use IGTK to the driver (keyidx=%d)",
+ keyidx);
+@@ -900,8 +913,14 @@ static int wpa_supplicant_install_igtk(struct wpa_sm *sm,
+ return -1;
+ }
+
+- sm->igtk.igtk_len = len;
+- os_memcpy(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len);
++ if (wnm_sleep) {
++ sm->igtk_wnm_sleep.igtk_len = len;
++ os_memcpy(sm->igtk_wnm_sleep.igtk, igtk->igtk,
++ sm->igtk_wnm_sleep.igtk_len);
++ } else {
++ sm->igtk.igtk_len = len;
++ os_memcpy(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len);
++ }
+
+ return 0;
+ }
+@@ -924,7 +943,7 @@ static int ieee80211w_set_keys(struct wpa_sm *sm,
+ return -1;
+
+ igtk = (const struct wpa_igtk_kde *) ie->igtk;
+- if (wpa_supplicant_install_igtk(sm, igtk) < 0)
++ if (wpa_supplicant_install_igtk(sm, igtk, 0) < 0)
+ return -1;
+ }
+
+@@ -1574,7 +1593,7 @@ static void wpa_supplicant_process_1_of_2(struct wpa_sm *sm,
+ if (wpa_supplicant_rsc_relaxation(sm, key->key_rsc))
+ key_rsc = null_rsc;
+
+- if (wpa_supplicant_install_gtk(sm, &gd, key_rsc) ||
++ if (wpa_supplicant_install_gtk(sm, &gd, key_rsc, 0) ||
+ wpa_supplicant_send_2_of_2(sm, key, ver, key_info) < 0)
+ goto failed;
+ os_memset(&gd, 0, sizeof(gd));
+@@ -2386,8 +2405,10 @@ void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid)
+ sm->tptk_set = 0;
+ os_memset(&sm->tptk, 0, sizeof(sm->tptk));
+ os_memset(&sm->gtk, 0, sizeof(sm->gtk));
++ os_memset(&sm->gtk_wnm_sleep, 0, sizeof(sm->gtk_wnm_sleep));
+ #ifdef CONFIG_IEEE80211W
+ os_memset(&sm->igtk, 0, sizeof(sm->igtk));
++ os_memset(&sm->igtk_wnm_sleep, 0, sizeof(sm->igtk_wnm_sleep));
+ #endif /* CONFIG_IEEE80211W */
+ }
+
+@@ -2920,8 +2941,10 @@ void wpa_sm_drop_sa(struct wpa_sm *sm)
+ os_memset(&sm->ptk, 0, sizeof(sm->ptk));
+ os_memset(&sm->tptk, 0, sizeof(sm->tptk));
+ os_memset(&sm->gtk, 0, sizeof(sm->gtk));
++ os_memset(&sm->gtk_wnm_sleep, 0, sizeof(sm->gtk_wnm_sleep));
+ #ifdef CONFIG_IEEE80211W
+ os_memset(&sm->igtk, 0, sizeof(sm->igtk));
++ os_memset(&sm->igtk_wnm_sleep, 0, sizeof(sm->igtk_wnm_sleep));
+ #endif /* CONFIG_IEEE80211W */
+ #ifdef CONFIG_IEEE80211R
+ os_memset(sm->xxkey, 0, sizeof(sm->xxkey));
+@@ -2986,7 +3009,7 @@ int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 subelem_id, u8 *buf)
+
+ wpa_hexdump_key(MSG_DEBUG, "Install GTK (WNM SLEEP)",
+ gd.gtk, gd.gtk_len);
+- if (wpa_supplicant_install_gtk(sm, &gd, key_rsc)) {
++ if (wpa_supplicant_install_gtk(sm, &gd, key_rsc, 1)) {
+ os_memset(&gd, 0, sizeof(gd));
+ wpa_printf(MSG_DEBUG, "Failed to install the GTK in "
+ "WNM mode");
+@@ -2998,7 +3021,7 @@ int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 subelem_id, u8 *buf)
+ const struct wpa_igtk_kde *igtk;
+
+ igtk = (const struct wpa_igtk_kde *) (buf + 2);
+- if (wpa_supplicant_install_igtk(sm, igtk) < 0)
++ if (wpa_supplicant_install_igtk(sm, igtk, 1) < 0)
+ return -1;
+ #endif /* CONFIG_IEEE80211W */
+ } else {
+diff --git a/src/rsn_supp/wpa_i.h b/src/rsn_supp/wpa_i.h
+index afc9e37..9a54631 100644
+--- a/src/rsn_supp/wpa_i.h
++++ b/src/rsn_supp/wpa_i.h
+@@ -32,8 +32,10 @@ struct wpa_sm {
+ int rx_replay_counter_set;
+ u8 request_counter[WPA_REPLAY_COUNTER_LEN];
+ struct wpa_gtk gtk;
++ struct wpa_gtk gtk_wnm_sleep;
+ #ifdef CONFIG_IEEE80211W
+ struct wpa_igtk igtk;
++ struct wpa_igtk igtk_wnm_sleep;
+ #endif /* CONFIG_IEEE80211W */
+
+ struct eapol_sm *eapol; /* EAPOL state machine from upper level code */
+--
+2.7.4
+
diff --git a/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0004-Prevent-installation-of-an-all-zero-TK.patch b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0004-Prevent-installation-of-an-all-zero-TK.patch
new file mode 100644
index 000000000..22ee21794
--- /dev/null
+++ b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0004-Prevent-installation-of-an-all-zero-TK.patch
@@ -0,0 +1,79 @@
+From 8f82bc94e8697a9d47fa8774dfdaaede1084912c Mon Sep 17 00:00:00 2001
+From: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
+Date: Fri, 29 Sep 2017 04:22:51 +0200
+Subject: [PATCH 4/8] Prevent installation of an all-zero TK
+
+Properly track whether a PTK has already been installed to the driver
+and the TK part cleared from memory. This prevents an attacker from
+trying to trick the client into installing an all-zero TK.
+
+This fixes the earlier fix in commit
+ad00d64e7d8827b3cebd665a0ceb08adabf15e1e ('Fix TK configuration to the
+driver in EAPOL-Key 3/4 retry case') which did not take into account
+possibility of an extra message 1/4 showing up between retries of
+message 3/4.
+
+Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
+---
+ src/common/wpa_common.h | 1 +
+ src/rsn_supp/wpa.c | 5 ++---
+ src/rsn_supp/wpa_i.h | 1 -
+ 3 files changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/src/common/wpa_common.h b/src/common/wpa_common.h
+index d200285..1021ccb 100644
+--- a/src/common/wpa_common.h
++++ b/src/common/wpa_common.h
+@@ -215,6 +215,7 @@ struct wpa_ptk {
+ size_t kck_len;
+ size_t kek_len;
+ size_t tk_len;
++ int installed; /* 1 if key has already been installed to driver */
+ };
+
+ struct wpa_gtk {
+diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
+index 7a2c68d..0550a41 100644
+--- a/src/rsn_supp/wpa.c
++++ b/src/rsn_supp/wpa.c
+@@ -510,7 +510,6 @@ static void wpa_supplicant_process_1_of_4(struct wpa_sm *sm,
+ os_memset(buf, 0, sizeof(buf));
+ }
+ sm->tptk_set = 1;
+- sm->tk_to_set = 1;
+
+ kde = sm->assoc_wpa_ie;
+ kde_len = sm->assoc_wpa_ie_len;
+@@ -615,7 +614,7 @@ static int wpa_supplicant_install_ptk(struct wpa_sm *sm,
+ enum wpa_alg alg;
+ const u8 *key_rsc;
+
+- if (!sm->tk_to_set) {
++ if (sm->ptk.installed) {
+ wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
+ "WPA: Do not re-install same PTK to the driver");
+ return 0;
+@@ -659,7 +658,7 @@ static int wpa_supplicant_install_ptk(struct wpa_sm *sm,
+
+ /* TK is not needed anymore in supplicant */
+ os_memset(sm->ptk.tk, 0, WPA_TK_MAX_LEN);
+- sm->tk_to_set = 0;
++ sm->ptk.installed = 1;
+
+ if (sm->wpa_ptk_rekey) {
+ eloop_cancel_timeout(wpa_sm_rekey_ptk, sm, NULL);
+diff --git a/src/rsn_supp/wpa_i.h b/src/rsn_supp/wpa_i.h
+index 9a54631..41f371f 100644
+--- a/src/rsn_supp/wpa_i.h
++++ b/src/rsn_supp/wpa_i.h
+@@ -24,7 +24,6 @@ struct wpa_sm {
+ struct wpa_ptk ptk, tptk;
+ int ptk_set, tptk_set;
+ unsigned int msg_3_of_4_ok:1;
+- unsigned int tk_to_set:1;
+ u8 snonce[WPA_NONCE_LEN];
+ u8 anonce[WPA_NONCE_LEN]; /* ANonce from the last 1/4 msg */
+ int renew_snonce;
+--
+2.7.4
+
diff --git a/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch
new file mode 100644
index 000000000..c19c4c710
--- /dev/null
+++ b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch
@@ -0,0 +1,64 @@
+From 12fac09b437a1dc8a0f253e265934a8aaf4d2f8b Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Sun, 1 Oct 2017 12:32:57 +0300
+Subject: [PATCH 5/8] Fix PTK rekeying to generate a new ANonce
+
+The Authenticator state machine path for PTK rekeying ended up bypassing
+the AUTHENTICATION2 state where a new ANonce is generated when going
+directly to the PTKSTART state since there is no need to try to
+determine the PMK again in such a case. This is far from ideal since the
+new PTK would depend on a new nonce only from the supplicant.
+
+Fix this by generating a new ANonce when moving to the PTKSTART state
+for the purpose of starting new 4-way handshake to rekey PTK.
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+---
+ src/ap/wpa_auth.c | 24 +++++++++++++++++++++---
+ 1 file changed, 21 insertions(+), 3 deletions(-)
+
+diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c
+index 707971d..bf10cc1 100644
+--- a/src/ap/wpa_auth.c
++++ b/src/ap/wpa_auth.c
+@@ -1901,6 +1901,21 @@ SM_STATE(WPA_PTK, AUTHENTICATION2)
+ }
+
+
++static int wpa_auth_sm_ptk_update(struct wpa_state_machine *sm)
++{
++ if (random_get_bytes(sm->ANonce, WPA_NONCE_LEN)) {
++ wpa_printf(MSG_ERROR,
++ "WPA: Failed to get random data for ANonce");
++ sm->Disconnect = TRUE;
++ return -1;
++ }
++ wpa_hexdump(MSG_DEBUG, "WPA: Assign new ANonce", sm->ANonce,
++ WPA_NONCE_LEN);
++ sm->TimeoutCtr = 0;
++ return 0;
++}
++
++
+ SM_STATE(WPA_PTK, INITPMK)
+ {
+ u8 msk[2 * PMK_LEN];
+@@ -2458,9 +2473,12 @@ SM_STEP(WPA_PTK)
+ SM_ENTER(WPA_PTK, AUTHENTICATION);
+ else if (sm->ReAuthenticationRequest)
+ SM_ENTER(WPA_PTK, AUTHENTICATION2);
+- else if (sm->PTKRequest)
+- SM_ENTER(WPA_PTK, PTKSTART);
+- else switch (sm->wpa_ptk_state) {
++ else if (sm->PTKRequest) {
++ if (wpa_auth_sm_ptk_update(sm) < 0)
++ SM_ENTER(WPA_PTK, DISCONNECTED);
++ else
++ SM_ENTER(WPA_PTK, PTKSTART);
++ } else switch (sm->wpa_ptk_state) {
+ case WPA_PTK_INITIALIZE:
+ break;
+ case WPA_PTK_DISCONNECT:
+--
+2.7.4
+
diff --git a/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0006-TDLS-Reject-TPK-TK-reconfiguration.patch b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0006-TDLS-Reject-TPK-TK-reconfiguration.patch
new file mode 100644
index 000000000..e1bd5a572
--- /dev/null
+++ b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0006-TDLS-Reject-TPK-TK-reconfiguration.patch
@@ -0,0 +1,132 @@
+From 6c4bed4f47d1960ec04981a9d50e5076aea5223d Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Fri, 22 Sep 2017 11:03:15 +0300
+Subject: [PATCH 6/8] TDLS: Reject TPK-TK reconfiguration
+
+Do not try to reconfigure the same TPK-TK to the driver after it has
+been successfully configured. This is an explicit check to avoid issues
+related to resetting the TX/RX packet number. There was already a check
+for this for TPK M2 (retries of that message are ignored completely), so
+that behavior does not get modified.
+
+For TPK M3, the TPK-TK could have been reconfigured, but that was
+followed by immediate teardown of the link due to an issue in updating
+the STA entry. Furthermore, for TDLS with any real security (i.e.,
+ignoring open/WEP), the TPK message exchange is protected on the AP path
+and simple replay attacks are not feasible.
+
+As an additional corner case, make sure the local nonce gets updated if
+the peer uses a very unlikely "random nonce" of all zeros.
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+---
+ src/rsn_supp/tdls.c | 38 ++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 36 insertions(+), 2 deletions(-)
+
+diff --git a/src/rsn_supp/tdls.c b/src/rsn_supp/tdls.c
+index e424168..9eb9738 100644
+--- a/src/rsn_supp/tdls.c
++++ b/src/rsn_supp/tdls.c
+@@ -112,6 +112,7 @@ struct wpa_tdls_peer {
+ u8 tk[16]; /* TPK-TK; assuming only CCMP will be used */
+ } tpk;
+ int tpk_set;
++ int tk_set; /* TPK-TK configured to the driver */
+ int tpk_success;
+ int tpk_in_progress;
+
+@@ -192,6 +193,20 @@ static int wpa_tdls_set_key(struct wpa_sm *sm, struct wpa_tdls_peer *peer)
+ u8 rsc[6];
+ enum wpa_alg alg;
+
++ if (peer->tk_set) {
++ /*
++ * This same TPK-TK has already been configured to the driver
++ * and this new configuration attempt (likely due to an
++ * unexpected retransmitted frame) would result in clearing
++ * the TX/RX sequence number which can break security, so must
++ * not allow that to happen.
++ */
++ wpa_printf(MSG_INFO, "TDLS: TPK-TK for the peer " MACSTR
++ " has already been configured to the driver - do not reconfigure",
++ MAC2STR(peer->addr));
++ return -1;
++ }
++
+ os_memset(rsc, 0, 6);
+
+ switch (peer->cipher) {
+@@ -209,12 +224,15 @@ static int wpa_tdls_set_key(struct wpa_sm *sm, struct wpa_tdls_peer *peer)
+ return -1;
+ }
+
++ wpa_printf(MSG_DEBUG, "TDLS: Configure pairwise key for peer " MACSTR,
++ MAC2STR(peer->addr));
+ if (wpa_sm_set_key(sm, alg, peer->addr, -1, 1,
+ rsc, sizeof(rsc), peer->tpk.tk, key_len) < 0) {
+ wpa_printf(MSG_WARNING, "TDLS: Failed to set TPK to the "
+ "driver");
+ return -1;
+ }
++ peer->tk_set = 1;
+ return 0;
+ }
+
+@@ -696,7 +714,7 @@ static void wpa_tdls_peer_clear(struct wpa_sm *sm, struct wpa_tdls_peer *peer)
+ peer->cipher = 0;
+ peer->qos_info = 0;
+ peer->wmm_capable = 0;
+- peer->tpk_set = peer->tpk_success = 0;
++ peer->tk_set = peer->tpk_set = peer->tpk_success = 0;
+ peer->chan_switch_enabled = 0;
+ os_memset(&peer->tpk, 0, sizeof(peer->tpk));
+ os_memset(peer->inonce, 0, WPA_NONCE_LEN);
+@@ -1159,6 +1177,7 @@ skip_rsnie:
+ wpa_tdls_peer_free(sm, peer);
+ return -1;
+ }
++ peer->tk_set = 0; /* A new nonce results in a new TK */
+ wpa_hexdump(MSG_DEBUG, "TDLS: Initiator Nonce for TPK handshake",
+ peer->inonce, WPA_NONCE_LEN);
+ os_memcpy(ftie->Snonce, peer->inonce, WPA_NONCE_LEN);
+@@ -1751,6 +1770,19 @@ static int wpa_tdls_addset_peer(struct wpa_sm *sm, struct wpa_tdls_peer *peer,
+ }
+
+
++static int tdls_nonce_set(const u8 *nonce)
++{
++ int i;
++
++ for (i = 0; i < WPA_NONCE_LEN; i++) {
++ if (nonce[i])
++ return 1;
++ }
++
++ return 0;
++}
++
++
+ static int wpa_tdls_process_tpk_m1(struct wpa_sm *sm, const u8 *src_addr,
+ const u8 *buf, size_t len)
+ {
+@@ -2004,7 +2036,8 @@ skip_rsn:
+ peer->rsnie_i_len = kde.rsn_ie_len;
+ peer->cipher = cipher;
+
+- if (os_memcmp(peer->inonce, ftie->Snonce, WPA_NONCE_LEN) != 0) {
++ if (os_memcmp(peer->inonce, ftie->Snonce, WPA_NONCE_LEN) != 0 ||
++ !tdls_nonce_set(peer->inonce)) {
+ /*
+ * There is no point in updating the RNonce for every obtained
+ * TPK M1 frame (e.g., retransmission due to timeout) with the
+@@ -2020,6 +2053,7 @@ skip_rsn:
+ "TDLS: Failed to get random data for responder nonce");
+ goto error;
+ }
++ peer->tk_set = 0; /* A new nonce results in a new TK */
+ }
+
+ #if 0
+--
+2.7.4
+
diff --git a/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0007-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0007-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch
new file mode 100644
index 000000000..85ea1d62b
--- /dev/null
+++ b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0007-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch
@@ -0,0 +1,43 @@
+From 53c5eb58e95004f86e65ee9fbfccbc291b139057 Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Fri, 22 Sep 2017 11:25:02 +0300
+Subject: [PATCH 7/8] WNM: Ignore WNM-Sleep Mode Response without pending
+ request
+
+Commit 03ed0a52393710be6bdae657d1b36efa146520e5 ('WNM: Ignore WNM-Sleep
+Mode Response if WNM-Sleep Mode has not been used') started ignoring the
+response when no WNM-Sleep Mode Request had been used during the
+association. This can be made tighter by clearing the used flag when
+successfully processing a response. This adds an additional layer of
+protection against unexpected retransmissions of the response frame.
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+---
+ wpa_supplicant/wnm_sta.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c
+index 1b3409c..67a07ff 100644
+--- a/wpa_supplicant/wnm_sta.c
++++ b/wpa_supplicant/wnm_sta.c
+@@ -260,7 +260,7 @@ static void ieee802_11_rx_wnmsleep_resp(struct wpa_supplicant *wpa_s,
+
+ if (!wpa_s->wnmsleep_used) {
+ wpa_printf(MSG_DEBUG,
+- "WNM: Ignore WNM-Sleep Mode Response frame since WNM-Sleep Mode has not been used in this association");
++ "WNM: Ignore WNM-Sleep Mode Response frame since WNM-Sleep Mode operation has not been requested");
+ return;
+ }
+
+@@ -299,6 +299,8 @@ static void ieee802_11_rx_wnmsleep_resp(struct wpa_supplicant *wpa_s,
+ return;
+ }
+
++ wpa_s->wnmsleep_used = 0;
++
+ if (wnmsleep_ie->status == WNM_STATUS_SLEEP_ACCEPT ||
+ wnmsleep_ie->status == WNM_STATUS_SLEEP_EXIT_ACCEPT_GTK_UPDATE) {
+ wpa_printf(MSG_DEBUG, "Successfully recv WNM-Sleep Response "
+--
+2.7.4
+
diff --git a/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0008-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0008-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch
new file mode 100644
index 000000000..b9678f681
--- /dev/null
+++ b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0008-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch
@@ -0,0 +1,82 @@
+From b372ab0b7daea719749194dc554b26e6367603f2 Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Fri, 22 Sep 2017 12:06:37 +0300
+Subject: [PATCH 8/8] FT: Do not allow multiple Reassociation Response frames
+
+The driver is expected to not report a second association event without
+the station having explicitly request a new association. As such, this
+case should not be reachable. However, since reconfiguring the same
+pairwise or group keys to the driver could result in nonce reuse issues,
+be extra careful here and do an additional state check to avoid this
+even if the local driver ends up somehow accepting an unexpected
+Reassociation Response frame.
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+---
+ src/rsn_supp/wpa.c | 3 +++
+ src/rsn_supp/wpa_ft.c | 8 ++++++++
+ src/rsn_supp/wpa_i.h | 1 +
+ 3 files changed, 12 insertions(+)
+
+diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
+index 0550a41..2a53c6f 100644
+--- a/src/rsn_supp/wpa.c
++++ b/src/rsn_supp/wpa.c
+@@ -2440,6 +2440,9 @@ void wpa_sm_notify_disassoc(struct wpa_sm *sm)
+ #ifdef CONFIG_TDLS
+ wpa_tdls_disassoc(sm);
+ #endif /* CONFIG_TDLS */
++#ifdef CONFIG_IEEE80211R
++ sm->ft_reassoc_completed = 0;
++#endif /* CONFIG_IEEE80211R */
+
+ /* Keys are not needed in the WPA state machine anymore */
+ wpa_sm_drop_sa(sm);
+diff --git a/src/rsn_supp/wpa_ft.c b/src/rsn_supp/wpa_ft.c
+index 205793e..d45bb45 100644
+--- a/src/rsn_supp/wpa_ft.c
++++ b/src/rsn_supp/wpa_ft.c
+@@ -153,6 +153,7 @@ static u8 * wpa_ft_gen_req_ies(struct wpa_sm *sm, size_t *len,
+ u16 capab;
+
+ sm->ft_completed = 0;
++ sm->ft_reassoc_completed = 0;
+
+ buf_len = 2 + sizeof(struct rsn_mdie) + 2 + sizeof(struct rsn_ftie) +
+ 2 + sm->r0kh_id_len + ric_ies_len + 100;
+@@ -681,6 +682,11 @@ int wpa_ft_validate_reassoc_resp(struct wpa_sm *sm, const u8 *ies,
+ return -1;
+ }
+
++ if (sm->ft_reassoc_completed) {
++ wpa_printf(MSG_DEBUG, "FT: Reassociation has already been completed for this FT protocol instance - ignore unexpected retransmission");
++ return 0;
++ }
++
+ if (wpa_ft_parse_ies(ies, ies_len, &parse) < 0) {
+ wpa_printf(MSG_DEBUG, "FT: Failed to parse IEs");
+ return -1;
+@@ -781,6 +787,8 @@ int wpa_ft_validate_reassoc_resp(struct wpa_sm *sm, const u8 *ies,
+ return -1;
+ }
+
++ sm->ft_reassoc_completed = 1;
++
+ if (wpa_ft_process_gtk_subelem(sm, parse.gtk, parse.gtk_len) < 0)
+ return -1;
+
+diff --git a/src/rsn_supp/wpa_i.h b/src/rsn_supp/wpa_i.h
+index 41f371f..56f88dc 100644
+--- a/src/rsn_supp/wpa_i.h
++++ b/src/rsn_supp/wpa_i.h
+@@ -128,6 +128,7 @@ struct wpa_sm {
+ size_t r0kh_id_len;
+ u8 r1kh_id[FT_R1KH_ID_LEN];
+ int ft_completed;
++ int ft_reassoc_completed;
+ int over_the_ds_in_progress;
+ u8 target_ap[ETH_ALEN]; /* over-the-DS target AP */
+ int set_ptk_after_assoc;
+--
+2.7.4
+
diff --git a/patches/source/wpa_supplicant/2017-1/wpa-packet-number-reuse-with-replayed-messages.txt b/patches/source/wpa_supplicant/2017-1/wpa-packet-number-reuse-with-replayed-messages.txt
new file mode 100644
index 000000000..5ccb5098c
--- /dev/null
+++ b/patches/source/wpa_supplicant/2017-1/wpa-packet-number-reuse-with-replayed-messages.txt
@@ -0,0 +1,226 @@
+WPA packet number reuse with replayed messages and key reinstallation
+
+Published: October 16, 2017
+Identifiers:
+- CERT case ID: VU#228519
+- CVE-2017-13077
+- CVE-2017-13078
+- CVE-2017-13079
+- CVE-2017-13080
+- CVE-2017-13081
+- CVE-2017-13082
+- CVE-2017-13084 (not applicable)
+- CVE-2017-13086
+- CVE-2017-13087
+- CVE-2017-13088
+Latest version available from: https://w1.fi/security/2017-1/
+
+
+Vulnerability
+
+A vulnerability was found in how a number of implementations can be
+triggered to reconfigure WPA/WPA2/RSN keys (TK, GTK, or IGTK) by
+replaying a specific frame that is used to manage the keys. Such
+reinstallation of the encryption key can result in two different types
+of vulnerabilities: disabling replay protection and significantly
+reducing the security of encryption to the point of allowing frames to
+be decrypted or some parts of the keys to be determined by an attacker
+depending on which cipher is used.
+
+This document focuses on the cases that apply to systems using hostapd
+(AP) or wpa_supplicant (station), but it should be noted that the
+generic vulnerability itself is applicable to other implementations and
+may have different impact in other cases.
+
+This vulnerability can in theory apply to any case where a TK (the
+pairwise/unicast encryption key used with TKIP, CCMP, GCMP), a GTK
+(group/multicast encryption key), or an IGTK (group management frame
+integrity protection key) is configured by the Authentication/Supplicant
+component to the WLAN driver/firmware taking care of the TX/RX path and
+encryption/decryption of frames.
+
+If the same key is configured multiple times, it is likely that the
+transmit and receive packet numbers (PN, IPN, RSC/TSC, etc.) are cleared
+to a smaller value (zero in case of pairwise keys, zero or at least a
+smaller value than the last used value in case of group keys). When this
+happens with the same key, this breaks replay protection on RX side and
+can result in reuse of packet numbers on TX side. The former may allow
+replaying of previously delivered packets (without the attacker being
+able to decrypt them or modify their contents) while the latter may
+result in more severe issues on the TX side due to resulting CCM nonce
+replay and related issues with GCMP and TKIP. The TX side issue may make
+it significantly easier for the attacker to decrypt frames and determine
+some parts of the keys (e.g., a Michael MIC key in case of TKIP).
+
+Impact on AP/hostapd
+
+On the AP side, this generic issue has been determined to be applicable
+in the case where hostapd is used to operate an RSN/WPA2 network with FT
+(Fast BSS Transition from IEEE 802.11r) enabled. Replaying of the
+Reassociation Request frame can be used to get the AP reinstalling the
+TK which results in the AP accepting previously delivered unicast frames
+from the station and the AP reusing previously used packet numbers
+(local TX packet number gets reset to zero). This latter issue on the TX
+side can result in CCM nonce reuse which invalidates CCMP security
+properties. In case of TKIP this can result in the attacker being able
+to determine part of the TK more easily and with GCMP, result in similar
+issues.
+
+It should be noted that the AP side issue with FT would be close to
+applying to FILS authentication (from IEEE 802.11ai) in hostapd with
+replaying of (Re)Association Request frames. However, due to a different
+handling of the repeated association processing with FILS, this would
+actually result in the station getting immediately disconnected which
+prevents this attack in practice. In addition, the FILS implementation
+in the current hostapd version is still experimental and documented as
+being discouraged in production use cases.
+
+Another area of potentially reduced security was identified when looking
+into these issues. When AP/Authenticator implementation in hostapd is
+requested to rekey the PTK without performing EAP reauthentication
+(either through local periodic rekeying or due to a request from an
+association station), the ANonce value does not get updated. This
+results in the new 4-way handshake depending on the station/supplicant
+side generating a new, unique (for the current PMK/PSK) SNonce for the
+PTK derivation to result in a new key. While a properly working
+supplicant would do so, if there is a supplicant implementation that
+does not, this combination could result in deriving the same PTK
+again. When the TK from that PTK gets configured in the driver, this
+would result in reinstalling the same key and the same issues as
+described above for the FT protocol case.
+
+Impact on station/wpa_supplicant
+
+On the station side, this generic issue has been determined to be
+applicable in the cases where wpa_supplicant processes a group key (GTK
+or IGTK) update from the AP. An attacker that is able to limit access
+to frame delivery may be able to extract two update messages and deliver
+those to the station with significant time delay between them. When
+wpa_supplicant processes the second message, it may end up reinstalling
+the same key to the driver and when doing this, clear the RX packet
+number to an old value. This would allow the attacker to replay all
+group-addressed frames that the AP sent between the time the key update
+message was originally sent and the time when the attacker forwarded the
+second frame to the station. The attacker would not be able to decrypt
+or modify the frames based on this vulnerability, though. There is an
+exception to this with older wpa_supplicant versions as noted below in
+version specific notes.
+
+For the current wpa_supplicant version (v2.6), there is also an
+additional EAPOL-Key replay sequence where an additional forged
+EAPOL-Key message can be used to bypass the existing protection for the
+pairwise key reconfiguration in a manner that ends up configuring a
+known TK that an attacker could use to decrypt any frame sent by the
+station and to inject arbitrary unicast frames. Similar issues are
+reachable in older versions as noted below.
+
+PeerKey / TDLS PeerKey
+
+As far as the related CVE-2017-13084 (reinstallation of the STK key in
+the PeerKey handshake) is concerned, it should be noted that PeerKey
+implementation in wpa_supplicant is not fully functional and the actual
+installation of the key into the driver does not work. As such, this
+item is not applicable in practice. Furthermore, the PeerKey handshake
+for IEEE 802.11e DLS is obsolete and not known to have been deployed.
+
+As far as the TDLS PeerKey handshake is concerned (CVE-2017-13086),
+wpa_supplicant implementation is already rejecting TPK M2 retries, so
+the reconfiguration issue cannot apply for it. For TPK M3, there is a
+theoretical impact. However, if that frame is replayed, the current
+wpa_supplicant implementation ends up tearing down the TDLS link
+immediately and as such, there is no real window for performing the
+attack. Furthermore, TPK M3 goes through the AP path and if RSN is used
+there, that frame has replay protection, so the attacker could not
+perform the attack. If the AP path were to use WEP, the frame could be
+replayed, though. That said, if WEP is used on the AP path, it would be
+fair to assume that there is no security in the network, so a new attack
+vector would be of small additional value.
+
+With older wpa_supplicant versions, it may be possible for an attacker
+to cause TPK M2 to be retransmitted with delay that would be able to
+trigger reinstallation of TK on the peer receiving TPK M2
+(CVE-2017-13086). This may open a short window for the attack with v2.3,
+v2.4, and v2.5; and a longer window with older versions.
+
+Vulnerable versions/configurations
+
+For the AP/Authenticator TK (unicast) reinstallation in FT protocol
+(CVE-2017-13082):
+
+hostapd v0.7.2 and newer with FT enabled (i.e., practically all versions
+that include full FT implementation). FT needs to be enabled in the
+runtime configuration to make this applicable.
+
+For the AP/Authenticator missing ANonce during PTK rekeying:
+
+All hostapd versions.
+
+For the station/Supplicant side GTK/IGTK reinstallation and TK
+configuration:
+
+All wpa_supplicant versions. The impact on older versions can be more
+severe due to earlier changes in this area: v2.3 and older can also
+reinstall the pairwise key and as such have similar impact as the AP FT
+case (CVE-2017-13077); v2.4 and v2.5 end up configuring an all-zero TK
+which breaks the normal data path, but could allow an attacker to
+decrypt all following frames from the station and to inject arbitrary
+frames to the station. In addition, a different message sequence
+involving 4-way handshake can result in configuration of an all-zero TK
+in v2.6 and the current snapshot of the development repository as of the
+publication of this advisory.
+
+
+Acknowledgments
+
+Thanks to Mathy Vanhoef of the imec-DistriNet research group of KU
+Leuven for discovering and reporting this issue. Thanks to John A. Van
+Boxtel for finding additional issues related to this topic.
+
+
+Possible mitigation steps
+
+- For AP/hostapd and FT replay issue (CVE-2017-13082), it is possible to
+ prevent the issue temporarily by disabling FT in runtime
+ configuration, if needed before being able to update the
+ implementations.
+
+- Merge the following commits to hostapd/wpa_supplicant and rebuild them:
+
+ hostapd and replayed FT reassociation request frame (CVE-2017-13082):
+ hostapd: Avoid key reinstallation in FT handshake
+
+ hostapd PTK rekeying and ANonce update:
+ Fix PTK rekeying to generate a new ANonce
+
+ wpa_supplicant and GTK/IGTK rekeying (CVE-2017-13078, CVE-2017-13079,
+ CVE-2017-13080, CVE-2017-13081, CVE-2017-13087, CVE-2017-13088):
+ Prevent reinstallation of an already in-use group key
+ Extend protection of GTK/IGTK reinstallation of WNM-Sleep Mode cases
+
+ wpa_supplicant (v2.6 or newer snapshot) and known TK issue:
+ Prevent installation of an all-zero TK
+
+ Additional protection steps for wpa_supplicant:
+ TDLS: Reject TPK-TK reconfiguration
+ WNM: Ignore WNM-Sleep Mode Response without pending request
+ FT: Do not allow multiple Reassociation Response frames
+
+ These patches are available from https://w1.fi/security/2017-1/
+ (both against the snapshot of hostap.git master branch and rebased on
+ top of the v2.6 release)
+
+ For the TDLS TPK M2 retransmission issue (CVE-2017-13086) with older
+ wpa_supplicant versions, consider updating to the latest version or
+ merge in a commit that is present in v2.6:
+ https://w1.fi/cgit/hostap/commit/?id=dabdef9e048b17b22b1c025ad592922eab30dda8
+ ('TDLS: Ignore incoming TDLS Setup Response retries')
+
+- Update to hostapd/wpa_supplicant v2.7 or newer, once available
+ * it should be noted that there are number of additional changes in
+ the related areas of the implementation to provide extra layer of
+ protection for potential unknown issues; these changes are not
+ included in this advisory as they have not been identified to be
+ critical for preventing any of the identified security
+ vulnerabilities; however, users of hostapd/wpa_supplicant are
+ encouraged to consider merging such changes even if not fully
+ moving to v2.7
diff --git a/patches/source/wpa_supplicant/README.slackware b/patches/source/wpa_supplicant/README.slackware
new file mode 100644
index 000000000..7ab40a289
--- /dev/null
+++ b/patches/source/wpa_supplicant/README.slackware
@@ -0,0 +1,55 @@
+=================================================
+How do I get my card to use WPA-PSK in Slackware?
+=================================================
+
+First off: wpa_supplicant REQUIRES the AP to broadcast the SSID. When the AP
+hides its SSID, all you will get out of wpa_supplicant is the message:
+"No suitable AP found"
+
+Also, read the MADwifi FAQ (http://madwifi.sourceforge.net/dokuwiki/doku.php)
+since it contains a wealth of information.
+
+This being said, you'll have to do the following (as root):
+Edit the file named /etc/wpa_supplicant.conf and add these lines:
+
+network={
+ scan_ssid=0
+ proto=WPA
+ key_mgmt=WPA-PSK
+ pairwise=CCMP TKIP
+ group=CCMP TKIP WEP104 WEP40
+}
+
+Then execute:
+
+/usr/sbin/wpa_passphrase YOURSSID passphrase
+
+with the SSID of your AP and the passphrase you've entered in its WPA-PSK configuration. You'll receive an output, which looks like this:
+
+network={
+ ssid="YOURSSID"
+ #psk="passphrase"
+
+psk=66a4bfb03de5656cf26cfa03a116097546046f4aea11ee044b841171207d8308
+}
+
+Copy the three lines within the network-tag into your own entry in wpa_supplicant.conf and change the permissions after you've finished editing:
+
+chmod 640 /etc/wpa_supplicant.conf
+
+To get your network device up and running, execute:
+
+### /usr/sbin/wpa_supplicant -Bw -c/etc/wpa_supplicant.conf -iath0 -Dmadwifi ###
+### you don't have to run the above command by hand, because it will ###
+### be executed by the rc.inet1 command that you run: ###
+
+/etc/rc.d/rc.inet1 ath0_start
+
+In case you want to see the wpa_supplicant in action, start it on the command line before enabling the wireless device, by running:
+/usr/sbin/wpa_supplicant -dw -c/etc/wpa_supplicant.conf -iath0 -Dmadwifi
+The terminal where you've started the wpa_supplicant should now show the communication between your wlan card and the AP. If you got everything up and running you can let Slackware's init script take over by killing wpa_supplicant and running:
+
+/etc/rc.d/rc.inet1 ath0_restart
+
+Studying the wpa_supplicant README is also highly recommended for further insight!
+
diff --git a/patches/source/wpa_supplicant/config/dot.config b/patches/source/wpa_supplicant/config/dot.config
new file mode 100644
index 000000000..45593ac6f
--- /dev/null
+++ b/patches/source/wpa_supplicant/config/dot.config
@@ -0,0 +1,37 @@
+CONFIG_AP=y
+CONFIG_BACKEND=file
+CONFIG_BGSCAN_SIMPLE=y
+CONFIG_CTRL_IFACE=y
+CONFIG_CTRL_IFACE_DBUS=y
+CONFIG_CTRL_IFACE_DBUS_INTRO=y
+CONFIG_CTRL_IFACE_DBUS_NEW=y
+CONFIG_DEBUG_FILE=y
+CONFIG_DRIVER_NL80211=y
+CONFIG_DRIVER_WEXT=y
+CONFIG_DRIVER_WIRED=y
+CONFIG_EAP_AKA=y
+CONFIG_EAP_FAST=y
+CONFIG_EAP_GPSK=y
+CONFIG_EAP_GPSK_SHA256=y
+CONFIG_EAP_GTC=y
+CONFIG_EAP_IKEV2=y
+CONFIG_EAP_LEAP=y
+CONFIG_EAP_MD5=y
+CONFIG_EAP_MSCHAPV2=y
+CONFIG_EAP_OTP=y
+CONFIG_EAP_PAX=y
+CONFIG_EAP_PEAP=y
+CONFIG_EAP_SAKE=y
+CONFIG_EAP_TLS=y
+CONFIG_EAP_TNC=y
+CONFIG_EAP_TTLS=y
+CONFIG_IBSS_RSN=y
+CONFIG_IEEE8021X_EAPOL=y
+CONFIG_LIBNL32=y
+CONFIG_P2P=y
+CONFIG_PEERKEY=y
+CONFIG_PKCS12=y
+CONFIG_READLINE=y
+CONFIG_SMARTCARD=y
+CONFIG_WPS=y
+
diff --git a/patches/source/wpa_supplicant/config/wpa_gui.desktop b/patches/source/wpa_supplicant/config/wpa_gui.desktop
new file mode 100644
index 000000000..31b8b6b01
--- /dev/null
+++ b/patches/source/wpa_supplicant/config/wpa_gui.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Name=wpa_gui
+Comment[en]=Wpa_supplicant management
+Exec=kdesu wpa_gui
+Icon=wpa_gui
+Type=Application
+Categories=Qt;Network;
diff --git a/patches/source/wpa_supplicant/config/wpa_gui.png b/patches/source/wpa_supplicant/config/wpa_gui.png
new file mode 100644
index 000000000..a72f35691
--- /dev/null
+++ b/patches/source/wpa_supplicant/config/wpa_gui.png
Binary files differ
diff --git a/patches/source/wpa_supplicant/config/wpa_supplicant.conf b/patches/source/wpa_supplicant/config/wpa_supplicant.conf
new file mode 100644
index 000000000..4dbbf96a1
--- /dev/null
+++ b/patches/source/wpa_supplicant/config/wpa_supplicant.conf
@@ -0,0 +1,2 @@
+ctrl_interface=/var/run/wpa_supplicant
+ctrl_interface_group=root
diff --git a/patches/source/wpa_supplicant/config/wpa_supplicant.logrotate b/patches/source/wpa_supplicant/config/wpa_supplicant.logrotate
new file mode 100644
index 000000000..bd7ef91cc
--- /dev/null
+++ b/patches/source/wpa_supplicant/config/wpa_supplicant.logrotate
@@ -0,0 +1,6 @@
+/var/log/wpa_supplicant.log {
+ missingok
+ notifempty
+ size 30k
+ create 0600 root root
+}
diff --git a/patches/source/wpa_supplicant/doinst.sh b/patches/source/wpa_supplicant/doinst.sh
new file mode 100644
index 000000000..6052fca4a
--- /dev/null
+++ b/patches/source/wpa_supplicant/doinst.sh
@@ -0,0 +1,15 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/wpa_supplicant.conf.new
+config etc/logrotate.d/wpa_supplicant.new
diff --git a/patches/source/wpa_supplicant/patches/assoc-timeout.diff b/patches/source/wpa_supplicant/patches/assoc-timeout.diff
new file mode 100644
index 000000000..8be4d2cdf
--- /dev/null
+++ b/patches/source/wpa_supplicant/patches/assoc-timeout.diff
@@ -0,0 +1,16 @@
+diff -Nur wpa_supplicant-2.0.orig/wpa_supplicant/wpa_supplicant.c wpa_supplicant-2.0/wpa_supplicant/wpa_supplicant.c
+--- wpa_supplicant-2.0.orig/wpa_supplicant/wpa_supplicant.c 2013-01-12 09:42:53.000000000 -0600
++++ wpa_supplicant-2.0/wpa_supplicant/wpa_supplicant.c 2013-05-11 14:09:34.586718122 -0500
+@@ -1666,10 +1666,10 @@
+
+ if (assoc_failed) {
+ /* give IBSS a bit more time */
+- timeout = ssid->mode == WPAS_MODE_IBSS ? 10 : 5;
++ timeout = ssid->mode == WPAS_MODE_IBSS ? 20 : 10;
+ } else if (wpa_s->conf->ap_scan == 1) {
+ /* give IBSS a bit more time */
+- timeout = ssid->mode == WPAS_MODE_IBSS ? 20 : 10;
++ timeout = ssid->mode == WPAS_MODE_IBSS ? 20 : 20;
+ }
+ wpa_supplicant_req_auth_timeout(wpa_s, timeout, 0);
+ }
diff --git a/patches/source/wpa_supplicant/patches/dbus-service-file-args.diff b/patches/source/wpa_supplicant/patches/dbus-service-file-args.diff
new file mode 100644
index 000000000..7e2449f2e
--- /dev/null
+++ b/patches/source/wpa_supplicant/patches/dbus-service-file-args.diff
@@ -0,0 +1,20 @@
+diff -Nur wpa_supplicant-1.0-rc3.orig/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service.in wpa_supplicant-1.0-rc3/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service.in
+--- wpa_supplicant-1.0-rc3.orig/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service.in 2012-04-16 15:15:40.000000000 -0500
++++ wpa_supplicant-1.0-rc3/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service.in 2012-05-06 01:07:44.523999837 -0500
+@@ -1,5 +1,5 @@
+ [D-BUS Service]
+ Name=fi.epitest.hostap.WPASupplicant
+-Exec=@BINDIR@/wpa_supplicant -u
++Exec=@BINDIR@/wpa_supplicant -B -u -f /var/log/wpa_supplicant.log -P /var/run/wpa_supplicant.pid
+ User=root
+ SystemdService=wpa_supplicant.service
+diff -Nur wpa_supplicant-1.0-rc3.orig/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.in wpa_supplicant-1.0-rc3/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.in
+--- wpa_supplicant-1.0-rc3.orig/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.in 2012-04-16 15:15:40.000000000 -0500
++++ wpa_supplicant-1.0-rc3/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.in 2012-05-06 01:06:59.528589953 -0500
+@@ -1,5 +1,5 @@
+ [D-BUS Service]
+ Name=fi.w1.wpa_supplicant1
+-Exec=@BINDIR@/wpa_supplicant -u
++Exec=@BINDIR@/wpa_supplicant -B -u -f /var/log/wpa_supplicant.log -P /var/run/wpa_supplicant.pid
+ User=root
+ SystemdService=wpa_supplicant.service
diff --git a/patches/source/wpa_supplicant/patches/flush-debug-output.diff b/patches/source/wpa_supplicant/patches/flush-debug-output.diff
new file mode 100644
index 000000000..7d6af7b39
--- /dev/null
+++ b/patches/source/wpa_supplicant/patches/flush-debug-output.diff
@@ -0,0 +1,50 @@
+diff -Nur wpa_supplicant-2.0.orig/src/utils/wpa_debug.c wpa_supplicant-2.0/src/utils/wpa_debug.c
+--- wpa_supplicant-2.0.orig/src/utils/wpa_debug.c 2013-01-12 09:42:53.000000000 -0600
++++ wpa_supplicant-2.0/src/utils/wpa_debug.c 2013-05-11 14:10:37.886101742 -0500
+@@ -75,6 +75,7 @@
+ if (out_file) {
+ fprintf(out_file, "%ld.%06u: ", (long) tv.sec,
+ (unsigned int) tv.usec);
++ fflush(out_file);
+ } else
+ #endif /* CONFIG_DEBUG_FILE */
+ printf("%ld.%06u: ", (long) tv.sec, (unsigned int) tv.usec);
+@@ -221,6 +222,7 @@
+ if (out_file) {
+ vfprintf(out_file, fmt, ap);
+ fprintf(out_file, "\n");
++ fflush(out_file);
+ } else {
+ #endif /* CONFIG_DEBUG_FILE */
+ vprintf(fmt, ap);
+@@ -357,6 +359,7 @@
+ fprintf(out_file, " [REMOVED]");
+ }
+ fprintf(out_file, "\n");
++ fflush(out_file);
+ } else {
+ #endif /* CONFIG_DEBUG_FILE */
+ printf("%s - hexdump(len=%lu):", title, (unsigned long) len);
+@@ -425,12 +428,14 @@
+ fprintf(out_file,
+ "%s - hexdump_ascii(len=%lu): [REMOVED]\n",
+ title, (unsigned long) len);
++ fflush(out_file);
+ return;
+ }
+ if (buf == NULL) {
+ fprintf(out_file,
+ "%s - hexdump_ascii(len=%lu): [NULL]\n",
+ title, (unsigned long) len);
++ fflush(out_file);
+ return;
+ }
+ fprintf(out_file, "%s - hexdump_ascii(len=%lu):\n",
+@@ -455,6 +460,7 @@
+ pos += llen;
+ len -= llen;
+ }
++ fflush(out_file);
+ } else {
+ #endif /* CONFIG_DEBUG_FILE */
+ if (!show) {
diff --git a/patches/source/wpa_supplicant/patches/quiet-scan-results-message.diff b/patches/source/wpa_supplicant/patches/quiet-scan-results-message.diff
new file mode 100644
index 000000000..7f85e8102
--- /dev/null
+++ b/patches/source/wpa_supplicant/patches/quiet-scan-results-message.diff
@@ -0,0 +1,16 @@
+--- ./wpa_supplicant/events.c.orig 2017-01-05 11:29:16.968898845 -0600
++++ ./wpa_supplicant/events.c 2017-01-05 11:31:13.515907254 -0600
+@@ -1555,11 +1555,11 @@
+ if (wpa_s->last_scan_req == MANUAL_SCAN_REQ &&
+ wpa_s->manual_scan_use_id && wpa_s->own_scan_running &&
+ own_request && !(data && data->scan_info.external_scan)) {
+- wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_SCAN_RESULTS "id=%u",
++ wpa_msg_ctrl(wpa_s, MSG_DEBUG, WPA_EVENT_SCAN_RESULTS "id=%u",
+ wpa_s->manual_scan_id);
+ wpa_s->manual_scan_use_id = 0;
+ } else {
+- wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_SCAN_RESULTS);
++ wpa_msg_ctrl(wpa_s, MSG_DEBUG, WPA_EVENT_SCAN_RESULTS);
+ }
+ wpas_notify_scan_results(wpa_s);
+
diff --git a/patches/source/wpa_supplicant/slack-desc b/patches/source/wpa_supplicant/slack-desc
new file mode 100644
index 000000000..4313b3783
--- /dev/null
+++ b/patches/source/wpa_supplicant/slack-desc
@@ -0,0 +1,18 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+ |-----handy-ruler------------------------------------------------------|
+wpa_supplicant: wpa_supplicant (WPA/WPA2/IEEE 802.1X Supplicant)
+wpa_supplicant:
+wpa_supplicant: wpa_supplicant is a WPA Supplicant for Linux with support for WPA and
+wpa_supplicant: WPA2 (IEEE 802.11i / RSN). Supplicant is the IEEE 802.1X/WPA
+wpa_supplicant: component that is used in the client stations. It implements key
+wpa_supplicant: negotiation with a WPA Authenticator and it controls the roaming and
+wpa_supplicant: IEEE 802.11 authentication/association of the wlan driver.
+wpa_supplicant:
+wpa_supplicant: More info: http://hostap.epitest.fi/wpa_supplicant/
+wpa_supplicant:
+wpa_supplicant:
diff --git a/patches/source/wpa_supplicant/wpa_supplicant.SlackBuild b/patches/source/wpa_supplicant/wpa_supplicant.SlackBuild
new file mode 100755
index 000000000..2547bc89b
--- /dev/null
+++ b/patches/source/wpa_supplicant/wpa_supplicant.SlackBuild
@@ -0,0 +1,181 @@
+#!/bin/sh
+
+# Copyright 2004-2008 Eric Hameleers, Eindhoven, NL
+# Copyright 2008-2015 Patrick J. Volkerding, Sebeka, MN, USA
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# -----------------------------------------------------------------------------
+
+PKGNAM=wpa_supplicant
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+SRCVERSION=$(printf $VERSION | tr _ -)
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2 -march=armv4 -mtune=xscale"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "armel" ]; then
+ SLKCFLAGS="-O2 -march=armv4t"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf ${PKGNAM}-${SRCVERSION}
+tar xvf $CWD/${PKGNAM}-${SRCVERSION}.tar.?z* || exit 1
+cd ${PKGNAM}-${SRCVERSION}
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+
+zcat $CWD/2017-1/rebased-v2.6-0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch.gz | patch -p1 || exit 1
+zcat $CWD/2017-1/rebased-v2.6-0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch.gz | patch -p1 || exit 1
+zcat $CWD/2017-1/rebased-v2.6-0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch.gz | patch -p1 || exit 1
+zcat $CWD/2017-1/rebased-v2.6-0004-Prevent-installation-of-an-all-zero-TK.patch.gz | patch -p1 || exit 1
+zcat $CWD/2017-1/rebased-v2.6-0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch.gz | patch -p1 || exit 1
+zcat $CWD/2017-1/rebased-v2.6-0006-TDLS-Reject-TPK-TK-reconfiguration.patch.gz | patch -p1 || exit 1
+zcat $CWD/2017-1/rebased-v2.6-0007-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch.gz | patch -p1 || exit 1
+zcat $CWD/2017-1/rebased-v2.6-0008-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch.gz | patch -p1 || exit 1
+
+# Fixup various paths in the dbus service file
+cat $CWD/patches/dbus-service-file-args.diff | patch -p1 --verbose || exit 1
+
+# Eliminate some logspam
+cat $CWD/patches/quiet-scan-results-message.diff | patch -p1 --verbose || exit 1
+
+# Apply a couple of other patches from Fedora
+cat $CWD/patches/assoc-timeout.diff | patch -p1 --verbose || exit 1
+cat $CWD/patches/flush-debug-output.diff | patch -p1 --verbose || exit 1
+
+cd wpa_supplicant
+
+# Create the configuration file for building wpa_supplicant:
+cat $CWD/config/dot.config > .config
+
+# Build the usual binaries
+CFLAGS="$SLKCFLAGS" \
+make $NUMJOBS \
+ BINDIR=/usr/sbin \
+ LIBDIR=/usr/lib${LIBDIRSUFFIX} || exit 1
+
+# Build the Qt4 GUI client
+CFLAGS="$SLKCFLAGS" \
+make $NUMJOBS \
+ wpa_gui-qt4 \
+ BINDIR=/usr/sbin \
+ LIBDIR=/usr/lib${LIBDIRSUFFIX} || exit 1
+
+# Make sure man pages are built
+make -C doc/docbook man
+
+# This goes into the doc directory later on:
+mv wpa_supplicant.conf wpa_supplicant.conf.sample
+
+# Install binaries:
+mkdir -p $PKG/usr/sbin $PKG/usr/bin
+cp wpa_supplicant wpa_passphrase wpa_cli $PKG/usr/sbin/
+cp wpa_gui-qt4/wpa_gui $PKG/usr/bin/
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Install dbus configuration file:
+mkdir -p $PKG/etc/dbus-1/system.d/
+cp dbus/dbus-wpa_supplicant.conf \
+ $PKG/etc/dbus-1/system.d/dbus-wpa_supplicant.conf
+
+mkdir -p $PKG/usr/share/dbus-1/system-services
+install -m644 dbus/*.service $PKG/usr/share/dbus-1/system-services/
+
+# Install a .desktop file and icon for wpa_gui:
+# (converted from the wpa_gui.svg in the source)
+mkdir -p $PKG/usr/share/{applications,pixmaps}
+cat $CWD/config/wpa_gui.desktop > $PKG/usr/share/applications/wpa_gui.desktop
+cat $CWD/config/wpa_gui.png > $PKG/usr/share/pixmaps/wpa_gui.png
+
+# Install a logrotate config
+mkdir -p $PKG/etc/logrotate.d
+cat $CWD/config/wpa_supplicant.logrotate > $PKG/etc/logrotate.d/wpa_supplicant.new
+
+# Install man pages:
+for m in 5 8; do
+ mkdir -p $PKG/usr/man/man${m}
+ cp doc/docbook/*.${m} $PKG/usr/man/man${m}/
+done
+find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
+
+# Install a default configuration file (only readable by root):
+mkdir -p $PKG/etc
+cat $CWD/config/wpa_supplicant.conf > $PKG/etc/wpa_supplicant.conf.new
+chmod 600 $PKG/etc/wpa_supplicant.conf.new
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ ChangeLog ../COPYING README README-{P2P,WPS} examples *.txt *.sample $CWD/README.slackware \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+chown -R root:root $PKG/usr/doc/$PKGNAM-$VERSION/*
+chmod -R a-w $PKG/usr/doc/$PKGNAM-$VERSION/*
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz >> $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/${PKGNAM}-${VERSION}-${ARCH}-${BUILD}.txz
diff --git a/patches/source/xcb-proto/arch.use.flags b/patches/source/xcb-proto/arch.use.flags
new file mode 100644
index 000000000..11087c884
--- /dev/null
+++ b/patches/source/xcb-proto/arch.use.flags
@@ -0,0 +1,9 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/xcb-proto/build/xcb-proto b/patches/source/xcb-proto/build/xcb-proto
new file mode 100644
index 000000000..a55e8cfcf
--- /dev/null
+++ b/patches/source/xcb-proto/build/xcb-proto
@@ -0,0 +1 @@
+1_slack14.1
diff --git a/patches/source/xcb-proto/configure/configure b/patches/source/xcb-proto/configure/configure
new file mode 100644
index 000000000..dcb1109bd
--- /dev/null
+++ b/patches/source/xcb-proto/configure/configure
@@ -0,0 +1,13 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --with-udev-rules-dir=/lib/udev/rules.d \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/xcb-proto/modularize b/patches/source/xcb-proto/modularize
new file mode 100644
index 000000000..8a28ed93e
--- /dev/null
+++ b/patches/source/xcb-proto/modularize
@@ -0,0 +1,279 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+dri3proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glamor-egl
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXpresent
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+libxshmfence
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+presentproto
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-errors
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-amdgpu
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/xcb-proto/noarch b/patches/source/xcb-proto/noarch
new file mode 100644
index 000000000..8785ee527
--- /dev/null
+++ b/patches/source/xcb-proto/noarch
@@ -0,0 +1,75 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/xcb-proto/package-blacklist b/patches/source/xcb-proto/package-blacklist
new file mode 100644
index 000000000..603b8c31f
--- /dev/null
+++ b/patches/source/xcb-proto/package-blacklist
@@ -0,0 +1,44 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+xf86-video-modesetting
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/xcb-proto/post-install/xcb-proto.post-install b/patches/source/xcb-proto/post-install/xcb-proto.post-install
new file mode 100644
index 000000000..eb341027a
--- /dev/null
+++ b/patches/source/xcb-proto/post-install/xcb-proto.post-install
@@ -0,0 +1,5 @@
+# Add documentation:
+mkdir -p $PKG/usr/doc/xcb-proto-$MODULAR_PACKAGE_VERSION
+cp -a \
+ COPYING README \
+ $PKG/usr/doc/xcb-proto-$MODULAR_PACKAGE_VERSION
diff --git a/patches/source/xcb-proto/slack-desc/xcb-proto b/patches/source/xcb-proto/slack-desc/xcb-proto
new file mode 100644
index 000000000..c66b71404
--- /dev/null
+++ b/patches/source/xcb-proto/slack-desc/xcb-proto
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+xcb-proto: xcb-proto (X protocol C-language Binding protocol descriptions)
+xcb-proto:
+xcb-proto: xcb-proto provides the XML-XCB protocol descriptions that libxcb
+xcb-proto: uses to generate the majority of its code and API. We provide them
+xcb-proto: separately from libxcb to allow reuse by other projects, such as
+xcb-proto: additional language bindings, protocol dissectors, or documentation
+xcb-proto: generators.
+xcb-proto:
+xcb-proto:
+xcb-proto:
+xcb-proto:
diff --git a/patches/source/xcb-proto/x11.SlackBuild b/patches/source/xcb-proto/x11.SlackBuild
new file mode 100755
index 000000000..c3887dff2
--- /dev/null
+++ b/patches/source/xcb-proto/x11.SlackBuild
@@ -0,0 +1,381 @@
+#!/bin/sh
+# Copyright 2007-2014 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ chown -R root:root .
+ find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.*
+ )
+ done
+ )
+ fi
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+
+ # If there's a ChangeLog, installing at least part of the recent history
+ # is useful, but don't let it get totally out of control:
+ if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # Strip binaries:
+ ( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/xcb-proto/xcb-proto.SlackBuild b/patches/source/xcb-proto/xcb-proto.SlackBuild
new file mode 100755
index 000000000..84fbe97bb
--- /dev/null
+++ b/patches/source/xcb-proto/xcb-proto.SlackBuild
@@ -0,0 +1,2 @@
+UPGRADE_PACKAGES=no ./x11.SlackBuild xcb xcb-proto
+mv /tmp/x11-build/xcb-proto*txz /tmp
diff --git a/patches/source/xextproto/arch.use.flags b/patches/source/xextproto/arch.use.flags
new file mode 100644
index 000000000..11087c884
--- /dev/null
+++ b/patches/source/xextproto/arch.use.flags
@@ -0,0 +1,9 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/xextproto/build/xextproto b/patches/source/xextproto/build/xextproto
new file mode 100644
index 000000000..a55e8cfcf
--- /dev/null
+++ b/patches/source/xextproto/build/xextproto
@@ -0,0 +1 @@
+1_slack14.1
diff --git a/patches/source/xextproto/configure/configure b/patches/source/xextproto/configure/configure
new file mode 100644
index 000000000..dcb1109bd
--- /dev/null
+++ b/patches/source/xextproto/configure/configure
@@ -0,0 +1,13 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --with-udev-rules-dir=/lib/udev/rules.d \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/xextproto/modularize b/patches/source/xextproto/modularize
new file mode 100644
index 000000000..8a28ed93e
--- /dev/null
+++ b/patches/source/xextproto/modularize
@@ -0,0 +1,279 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+dri3proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glamor-egl
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXpresent
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+libxshmfence
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+presentproto
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-errors
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-amdgpu
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/xextproto/noarch b/patches/source/xextproto/noarch
new file mode 100644
index 000000000..8785ee527
--- /dev/null
+++ b/patches/source/xextproto/noarch
@@ -0,0 +1,75 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/xextproto/package-blacklist b/patches/source/xextproto/package-blacklist
new file mode 100644
index 000000000..603b8c31f
--- /dev/null
+++ b/patches/source/xextproto/package-blacklist
@@ -0,0 +1,44 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+xf86-video-modesetting
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/xextproto/slack-desc/xextproto b/patches/source/xextproto/slack-desc/xextproto
new file mode 100644
index 000000000..6ea870d03
--- /dev/null
+++ b/patches/source/xextproto/slack-desc/xextproto
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+xextproto: xextproto (C prototypes for X Protocol Extensions)
+xextproto:
+xextproto: xextproto is part of X11.
+xextproto:
+xextproto: For more information about the X.Org Foundation (the providers of the
+xextproto: X.Org implementation of the X Window System), see their website:
+xextproto:
+xextproto: http://www.x.org
+xextproto:
+xextproto:
+xextproto:
diff --git a/patches/source/xextproto/x11.SlackBuild b/patches/source/xextproto/x11.SlackBuild
new file mode 100755
index 000000000..c3887dff2
--- /dev/null
+++ b/patches/source/xextproto/x11.SlackBuild
@@ -0,0 +1,381 @@
+#!/bin/sh
+# Copyright 2007-2014 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ chown -R root:root .
+ find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.*
+ )
+ done
+ )
+ fi
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+
+ # If there's a ChangeLog, installing at least part of the recent history
+ # is useful, but don't let it get totally out of control:
+ if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # Strip binaries:
+ ( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/xextproto/xextproto.SlackBuild b/patches/source/xextproto/xextproto.SlackBuild
new file mode 100755
index 000000000..a61c5c383
--- /dev/null
+++ b/patches/source/xextproto/xextproto.SlackBuild
@@ -0,0 +1,2 @@
+UPGRADE_PACKAGES=no ./x11.SlackBuild proto xextproto
+mv /tmp/x11-build/xextproto*txz /tmp
diff --git a/patches/source/xfce4-weather-plugin/slack-desc b/patches/source/xfce4-weather-plugin/slack-desc
new file mode 100644
index 000000000..7d9b0675f
--- /dev/null
+++ b/patches/source/xfce4-weather-plugin/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+xfce4-weather-plugin: xfce4-weather-plugin (weather plugin for the Xfce panel)
+xfce4-weather-plugin:
+xfce4-weather-plugin: The weather plugin displays current weather conditions and forecasts.
+xfce4-weather-plugin:
+xfce4-weather-plugin:
+xfce4-weather-plugin:
+xfce4-weather-plugin:
+xfce4-weather-plugin:
+xfce4-weather-plugin:
+xfce4-weather-plugin:
+xfce4-weather-plugin:
diff --git a/patches/source/xfce4-weather-plugin/xfce4-weather-plugin.SlackBuild b/patches/source/xfce4-weather-plugin/xfce4-weather-plugin.SlackBuild
new file mode 100755
index 000000000..bbe884b5d
--- /dev/null
+++ b/patches/source/xfce4-weather-plugin/xfce4-weather-plugin.SlackBuild
@@ -0,0 +1,107 @@
+#!/bin/sh
+
+# Slackware build script for xfce4-weather-plugin
+
+# Copyright 2006-2012 Robby Workman, Northport, Alabama, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=xfce4-weather-plugin
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
+cd $PKGNAM-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+GEONAMES_USERNAME="slackware" \
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc/xfce \
+ --enable-shared=yes \
+ --enable-static=no \
+ --enable-debug=no \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING* INSTALL NEWS README* TODO \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/patches/source/xfce4-weather-plugin/xfce4-weather-plugin.url b/patches/source/xfce4-weather-plugin/xfce4-weather-plugin.url
new file mode 100644
index 000000000..9ee0ef010
--- /dev/null
+++ b/patches/source/xfce4-weather-plugin/xfce4-weather-plugin.url
@@ -0,0 +1 @@
+http://archive.xfce.org/src/panel-plugins/xfce4-weather-plugin/
diff --git a/patches/source/xorg-server/arch.use.flags b/patches/source/xorg-server/arch.use.flags
new file mode 100644
index 000000000..f28a6ccab
--- /dev/null
+++ b/patches/source/xorg-server/arch.use.flags
@@ -0,0 +1,7 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/xorg-server/build/xorg-server b/patches/source/xorg-server/build/xorg-server
new file mode 100644
index 000000000..c87b15022
--- /dev/null
+++ b/patches/source/xorg-server/build/xorg-server
@@ -0,0 +1 @@
+6_slack14.1
diff --git a/patches/source/xorg-server/configure/xorg-server b/patches/source/xorg-server/configure/xorg-server
new file mode 100644
index 000000000..6f273ad98
--- /dev/null
+++ b/patches/source/xorg-server/configure/xorg-server
@@ -0,0 +1,50 @@
+# Servers to build:
+BUILD_SERVERS="--enable-xorg \
+ --enable-dmx \
+ --enable-xvfb \
+ --enable-xnest \
+ --enable-kdrive \
+ --enable-xephyr \
+ --enable-xfbdev \
+ --enable-config-udev \
+ --enable-kdrive-evdev \
+ --enable-kdrive-kbd \
+ --enable-kdrive-mouse \
+ --disable-config-hal"
+
+#MESA_VERSION=${MESA_VERSION:-7.5} # unused in 1.7+
+
+# Default font paths to be used by the X server
+DEF_FONTPATH="/usr/share/fonts/local,/usr/share/fonts/TTF,/usr/share/fonts/OTF,/usr/share/fonts/Type1,/usr/share/fonts/misc,/usr/share/fonts/CID,/usr/share/fonts/75dpi/:unscaled,/usr/share/fonts/100dpi/:unscaled,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/cyrillic"
+
+# Reconf (needed after some security patches 12/2014):
+autoreconf -vif
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --disable-static \
+ --with-pic \
+ --with-int10=x86emu \
+ --with-default-font-path="${DEF_FONTPATH}" \
+ --with-module-dir=/usr/lib${LIBDIRSUFFIX}/xorg/modules \
+ --with-os-name="Slackware 14.2" \
+ --with-os-vendor="Slackware Linux Project" \
+ --with-xkb-path=/etc/X11/xkb \
+ --with-xkb-output=/var/lib/xkb \
+ $BUILD_SERVERS \
+ --build=$ARCH-slackware-linux
+
+# --with-dri-driver-path=/usr/lib${LIBDIRSUFFIX}/xorg/modules/dri
+
+if [ "$ARCH" = "x86_64" ]; then
+ # To prevent the error "No rule to make target `-ldl'"
+ sed -i -e 's#-ldl##' hw/xfree86/Makefile
+ sed -i -e 's#-lm#-lm -ldl#' hw/xfree86/Makefile
+fi
+
diff --git a/patches/source/xorg-server/makepkg/xorg-server b/patches/source/xorg-server/makepkg/xorg-server
new file mode 100644
index 000000000..13d601edc
--- /dev/null
+++ b/patches/source/xorg-server/makepkg/xorg-server
@@ -0,0 +1,47 @@
+
+rm -r ${SLACK_X_BUILD_DIR}/package-xorg-server-xnest
+mkdir -p ${SLACK_X_BUILD_DIR}/package-xorg-server-xnest/usr/bin
+mv $PKG/usr/bin/Xnest ${SLACK_X_BUILD_DIR}/package-xorg-server-xnest/usr/bin
+mkdir -p ${SLACK_X_BUILD_DIR}/package-xorg-server-xnest/usr/man/man1
+mv $PKG/usr/man/man1/Xnest.1.gz ${SLACK_X_BUILD_DIR}/package-xorg-server-xnest/usr/man/man1
+mkdir -p ${SLACK_X_BUILD_DIR}/package-xorg-server-xnest/install
+cat $CWD/slack-desc/xorg-server-xnest > ${SLACK_X_BUILD_DIR}/package-xorg-server-xnest/install/slack-desc
+cd ${SLACK_X_BUILD_DIR}/package-xorg-server-xnest
+/sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/xorg-server-xnest-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+
+rm -r ${SLACK_X_BUILD_DIR}/package-xorg-server-xvfb
+mkdir -p ${SLACK_X_BUILD_DIR}/package-xorg-server-xvfb/usr/bin
+mv $PKG/usr/bin/Xvfb ${SLACK_X_BUILD_DIR}/package-xorg-server-xvfb/usr/bin
+mkdir -p ${SLACK_X_BUILD_DIR}/package-xorg-server-xvfb/usr/man/man1
+mv $PKG/usr/man/man1/Xvfb.1.gz ${SLACK_X_BUILD_DIR}/package-xorg-server-xvfb/usr/man/man1
+mkdir -p ${SLACK_X_BUILD_DIR}/package-xorg-server-xvfb/install
+cat $CWD/slack-desc/xorg-server-xvfb > ${SLACK_X_BUILD_DIR}/package-xorg-server-xvfb/install/slack-desc
+cd ${SLACK_X_BUILD_DIR}/package-xorg-server-xvfb
+/sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/xorg-server-xvfb-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+
+rm -r ${SLACK_X_BUILD_DIR}/package-xorg-server-xephyr
+mkdir -p ${SLACK_X_BUILD_DIR}/package-xorg-server-xephyr/usr/bin
+mv $PKG/usr/bin/Xephyr ${SLACK_X_BUILD_DIR}/package-xorg-server-xephyr/usr/bin
+mkdir -p ${SLACK_X_BUILD_DIR}/package-xorg-server-xephyr/usr/man/man1
+mv $PKG/usr/man/man1/Xephyr.1.gz ${SLACK_X_BUILD_DIR}/package-xorg-server-xephyr/usr/man/man1
+mkdir -p ${SLACK_X_BUILD_DIR}/package-xorg-server-xephyr/install
+cat $CWD/slack-desc/xorg-server-xephyr > ${SLACK_X_BUILD_DIR}/package-xorg-server-xephyr/install/slack-desc
+cd ${SLACK_X_BUILD_DIR}/package-xorg-server-xephyr
+/sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/xorg-server-xephyr-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+
+# Build the main xorg-server package:
+cd $PKG
+/sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/xorg-server-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+
+if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/xorg-server-xnest-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/xorg-server-xvfb-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/xorg-server-xephyr-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/xorg-server-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/xorg-server-xnest-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/xorg-server-xvfb-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/xorg-server-xephyr-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/xorg-server-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+fi
+
diff --git a/patches/source/xorg-server/modularize b/patches/source/xorg-server/modularize
new file mode 100644
index 000000000..d6eb2f68a
--- /dev/null
+++ b/patches/source/xorg-server/modularize
@@ -0,0 +1,265 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/xorg-server/noarch b/patches/source/xorg-server/noarch
new file mode 100644
index 000000000..480ffc26c
--- /dev/null
+++ b/patches/source/xorg-server/noarch
@@ -0,0 +1,76 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-cf-files
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/xorg-server/package-blacklist b/patches/source/xorg-server/package-blacklist
new file mode 100644
index 000000000..377624999
--- /dev/null
+++ b/patches/source/xorg-server/package-blacklist
@@ -0,0 +1,39 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/xorg-server/patch/xorg-server.patch b/patches/source/xorg-server/patch/xorg-server.patch
new file mode 100644
index 000000000..1ce3d36ed
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server.patch
@@ -0,0 +1,43 @@
+zcat $CWD/patch/xorg-server/x11.startwithblackscreen.diff.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+# 12/2014 security patches:
+zcat $CWD/patch/xorg-server/0001-glx-check-return-from-__glXGetAnswerBuffer.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0001-unchecked-malloc-may-allow-unauthed-client-to-crash-.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0002-dix-integer-overflow-in-ProcPutImage-CVE-2014-8092-1.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0003-dix-integer-overflow-in-GetHosts-CVE-2014-8092-2-4.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0004-dix-integer-overflow-in-RegionSizeof-CVE-2014-8092-3.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0005-dix-integer-overflow-in-REQUEST_FIXED_SIZE-CVE-2014-.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0006-dri2-integer-overflow-in-ProcDRI2GetBuffers-CVE-2014.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0007-dbe-unvalidated-lengths-in-DbeSwapBuffers-calls-CVE-.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0008-Xi-unvalidated-lengths-in-Xinput-extension-CVE-2014-.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0009-xcmisc-unvalidated-length-in-SProcXCMiscGetXIDList-C.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0010-Xv-unvalidated-lengths-in-XVideo-extension-swapped-p.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0011-randr-unvalidated-lengths-in-RandR-extension-swapped.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0012-render-check-request-size-before-reading-it-CVE-2014.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0013-render-unvalidated-lengths-in-Render-extn.-swapped-p.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0014-xfixes-unvalidated-length-in-SProcXFixesSelectSelect.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0015-Add-request-length-checking-test-cases-for-some-Xinp.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0016-Add-request-length-checking-test-cases-for-some-Xinp.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0017-Add-REQUEST_FIXED_SIZE-testcases-to-test-misc.c.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0018-glx-Be-more-paranoid-about-variable-length-requests-.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0019-glx-Be-more-strict-about-rejecting-invalid-image-siz.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0020-glx-Additional-paranoia-in-__glXGetAnswerBuffer-__GL.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0021-glx-Fix-image-size-computation-for-EXT_texture_integ.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0022-glx-Add-safe_-add-mul-pad-v3-CVE-2014-8093-4-6.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0023-glx-Length-checking-for-GLXRender-requests-v2-CVE-20.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0024-glx-Integer-overflow-protection-for-non-generated-re.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0025-glx-Top-level-length-checking-for-swapped-VendorPriv.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0026-glx-Request-length-checks-for-SetClientInfoARB-CVE-2.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0027-glx-Length-checking-for-non-generated-vendor-private.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0028-glx-Length-checking-for-non-generated-single-request.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0029-glx-Fix-mask-truncation-in-__glXGetAnswerBuffer-CVE-.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0030-glx-Length-checking-for-RenderLarge-requests-v2-CVE-.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0031-glx-Pass-remaining-request-length-into-varsize-v2-CV.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0001-Missing-parens-in-REQUEST_FIXED_SIZE-macro-CVE-2014-.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/0002-dix-GetHosts-bounds-check-using-wrong-pointer-value-.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/xorg-server.CVE-2017-10971.diff.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/xorg-server.CVE-2017-10972.diff.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/xorg-server.CVE-2017-13723.diff.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/xorg-server.CVE-2017-12176.diff.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/xorg-server.CVE-2017-12179_p1.diff.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/xorg-server.CVE-2017-12179_p2.diff.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/xorg-server.CVE-2017-12183.diff.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
diff --git a/patches/source/xorg-server/patch/xorg-server/0001-Missing-parens-in-REQUEST_FIXED_SIZE-macro-CVE-2014-.patch b/patches/source/xorg-server/patch/xorg-server/0001-Missing-parens-in-REQUEST_FIXED_SIZE-macro-CVE-2014-.patch
new file mode 100644
index 000000000..ea5a3a30d
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0001-Missing-parens-in-REQUEST_FIXED_SIZE-macro-CVE-2014-.patch
@@ -0,0 +1,32 @@
+From 9802a0162f738de03585ca3f3b8a8266494f7d45 Mon Sep 17 00:00:00 2001
+From: Keith Packard <keithp@keithp.com>
+Date: Tue, 9 Dec 2014 09:30:59 -0800
+Subject: [PATCH 1/2] Missing parens in REQUEST_FIXED_SIZE macro [CVE-2014-8092
+ pt. 5]
+
+The 'n' parameter must be surrounded by parens in both places to
+prevent precedence from mis-computing things.
+
+Signed-off-by: Keith Packard <keithp@keithp.com>
+Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+---
+ include/dix.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/dix.h b/include/dix.h
+index 21176a8..921156b 100644
+--- a/include/dix.h
++++ b/include/dix.h
+@@ -80,7 +80,7 @@ SOFTWARE.
+
+ #define REQUEST_FIXED_SIZE(req, n)\
+ if (((sizeof(req) >> 2) > client->req_len) || \
+- ((n >> 2) >= client->req_len) || \
++ (((n) >> 2) >= client->req_len) || \
+ ((((uint64_t) sizeof(req) + (n) + 3) >> 2) != (uint64_t) client->req_len)) \
+ return(BadLength)
+
+--
+2.1.0
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0001-glx-check-return-from-__glXGetAnswerBuffer.patch b/patches/source/xorg-server/patch/xorg-server/0001-glx-check-return-from-__glXGetAnswerBuffer.patch
new file mode 100644
index 000000000..bbe3e85da
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0001-glx-check-return-from-__glXGetAnswerBuffer.patch
@@ -0,0 +1,173 @@
+From 5e5f30641b07e40d9ba98210b92e38383594b328 Mon Sep 17 00:00:00 2001
+From: Keith Packard <keithp@keithp.com>
+Date: Thu, 9 Oct 2014 15:17:17 +0200
+Subject: [PATCH] glx: check return from __glXGetAnswerBuffer
+
+This function can return NULL; make sure every caller tests for that.
+
+Reviewed-by: Adam Jackson <ajax@redhat.com>
+Signed-off-by: Keith Packard <keithp@keithp.com>
+---
+ glx/indirect_dispatch.c | 18 ++++++++++++++++++
+ glx/indirect_dispatch_swap.c | 18 ++++++++++++++++++
+ 2 files changed, 36 insertions(+)
+
+diff --git a/glx/indirect_dispatch.c b/glx/indirect_dispatch.c
+index 0a7623c..f290790 100644
+--- a/glx/indirect_dispatch.c
++++ b/glx/indirect_dispatch.c
+@@ -2705,6 +2705,9 @@ __glXDisp_AreTexturesResident(__GLXclientState * cl, GLbyte * pc)
+ GLboolean answerBuffer[200];
+ GLboolean *residences =
+ __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
++
++ if (residences == NULL)
++ return BadAlloc;
+ retval =
+ CALL_AreTexturesResident(GET_DISPATCH(),
+ (n, (const GLuint *) (pc + 4),
+@@ -2731,6 +2734,9 @@ __glXDisp_AreTexturesResidentEXT(__GLXclientState * cl, GLbyte * pc)
+ GLboolean answerBuffer[200];
+ GLboolean *residences =
+ __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
++
++ if (residences == NULL)
++ return BadAlloc;
+ retval =
+ CALL_AreTexturesResident(GET_DISPATCH(),
+ (n, (const GLuint *) (pc + 4),
+@@ -2848,6 +2854,8 @@ __glXDisp_GenTextures(__GLXclientState * cl, GLbyte * pc)
+ GLuint *textures =
+ __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
+ 4);
++ if (textures == NULL)
++ return BadAlloc;
+ CALL_GenTextures(GET_DISPATCH(), (n, textures));
+ __glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0);
+ error = Success;
+@@ -2871,6 +2879,8 @@ __glXDisp_GenTexturesEXT(__GLXclientState * cl, GLbyte * pc)
+ GLuint *textures =
+ __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
+ 4);
++ if (textures == NULL)
++ return BadAlloc;
+ CALL_GenTextures(GET_DISPATCH(), (n, textures));
+ __glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0);
+ error = Success;
+@@ -4598,6 +4608,8 @@ __glXDisp_GenQueriesARB(__GLXclientState * cl, GLbyte * pc)
+ GLuint *ids =
+ __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
+ 4);
++ if (ids == NULL)
++ return BadAlloc;
+ CALL_GenQueriesARB(GET_DISPATCH(), (n, ids));
+ __glXSendReply(cl->client, ids, n, 4, GL_TRUE, 0);
+ error = Success;
+@@ -4956,6 +4968,8 @@ __glXDisp_GenProgramsNV(__GLXclientState * cl, GLbyte * pc)
+ GLuint *programs =
+ __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
+ 4);
++ if (programs == NULL)
++ return BadAlloc;
+ CALL_GenProgramsNV(GET_DISPATCH(), (n, programs));
+ __glXSendReply(cl->client, programs, n, 4, GL_TRUE, 0);
+ error = Success;
+@@ -5765,6 +5779,8 @@ __glXDisp_GenFramebuffersEXT(__GLXclientState * cl, GLbyte * pc)
+ GLuint *framebuffers =
+ __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
+ 4);
++ if (framebuffers == NULL)
++ return BadAlloc;
+ CALL_GenFramebuffersEXT(GET_DISPATCH(), (n, framebuffers));
+ __glXSendReply(cl->client, framebuffers, n, 4, GL_TRUE, 0);
+ error = Success;
+@@ -5788,6 +5804,8 @@ __glXDisp_GenRenderbuffersEXT(__GLXclientState * cl, GLbyte * pc)
+ GLuint *renderbuffers =
+ __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
+ 4);
++ if (renderbuffers == NULL)
++ return BadAlloc;
+ CALL_GenRenderbuffersEXT(GET_DISPATCH(), (n, renderbuffers));
+ __glXSendReply(cl->client, renderbuffers, n, 4, GL_TRUE, 0);
+ error = Success;
+diff --git a/glx/indirect_dispatch_swap.c b/glx/indirect_dispatch_swap.c
+index 80010b3..57b6c3c 100644
+--- a/glx/indirect_dispatch_swap.c
++++ b/glx/indirect_dispatch_swap.c
+@@ -3076,6 +3076,9 @@ __glXDispSwap_AreTexturesResident(__GLXclientState * cl, GLbyte * pc)
+ GLboolean answerBuffer[200];
+ GLboolean *residences =
+ __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
++
++ if (residences == NULL)
++ return BadAlloc;
+ retval =
+ CALL_AreTexturesResident(GET_DISPATCH(),
+ (n,
+@@ -3105,6 +3108,9 @@ __glXDispSwap_AreTexturesResidentEXT(__GLXclientState * cl, GLbyte * pc)
+ GLboolean answerBuffer[200];
+ GLboolean *residences =
+ __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
++
++ if (residences == NULL)
++ return BadAlloc;
+ retval =
+ CALL_AreTexturesResident(GET_DISPATCH(),
+ (n,
+@@ -3233,6 +3239,8 @@ __glXDispSwap_GenTextures(__GLXclientState * cl, GLbyte * pc)
+ GLuint *textures =
+ __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
+ 4);
++ if (textures == NULL)
++ return BadAlloc;
+ CALL_GenTextures(GET_DISPATCH(), (n, textures));
+ (void) bswap_32_array((uint32_t *) textures, n);
+ __glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0);
+@@ -3258,6 +3266,8 @@ __glXDispSwap_GenTexturesEXT(__GLXclientState * cl, GLbyte * pc)
+ GLuint *textures =
+ __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
+ 4);
++ if (textures == NULL)
++ return BadAlloc;
+ CALL_GenTextures(GET_DISPATCH(), (n, textures));
+ (void) bswap_32_array((uint32_t *) textures, n);
+ __glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0);
+@@ -5259,6 +5269,8 @@ __glXDispSwap_GenQueriesARB(__GLXclientState * cl, GLbyte * pc)
+ GLuint *ids =
+ __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
+ 4);
++ if (ids == NULL)
++ return BadAlloc;
+ CALL_GenQueriesARB(GET_DISPATCH(), (n, ids));
+ (void) bswap_32_array((uint32_t *) ids, n);
+ __glXSendReplySwap(cl->client, ids, n, 4, GL_TRUE, 0);
+@@ -5672,6 +5684,8 @@ __glXDispSwap_GenProgramsNV(__GLXclientState * cl, GLbyte * pc)
+ GLuint *programs =
+ __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
+ 4);
++ if (programs == NULL)
++ return BadAlloc;
+ CALL_GenProgramsNV(GET_DISPATCH(), (n, programs));
+ (void) bswap_32_array((uint32_t *) programs, n);
+ __glXSendReplySwap(cl->client, programs, n, 4, GL_TRUE, 0);
+@@ -6610,6 +6624,8 @@ __glXDispSwap_GenFramebuffersEXT(__GLXclientState * cl, GLbyte * pc)
+ GLuint *framebuffers =
+ __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
+ 4);
++ if (framebuffers == NULL)
++ return BadAlloc;
+ CALL_GenFramebuffersEXT(GET_DISPATCH(), (n, framebuffers));
+ (void) bswap_32_array((uint32_t *) framebuffers, n);
+ __glXSendReplySwap(cl->client, framebuffers, n, 4, GL_TRUE, 0);
+@@ -6635,6 +6651,8 @@ __glXDispSwap_GenRenderbuffersEXT(__GLXclientState * cl, GLbyte * pc)
+ GLuint *renderbuffers =
+ __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
+ 4);
++ if (renderbuffers == NULL)
++ return BadAlloc;
+ CALL_GenRenderbuffersEXT(GET_DISPATCH(), (n, renderbuffers));
+ (void) bswap_32_array((uint32_t *) renderbuffers, n);
+ __glXSendReplySwap(cl->client, renderbuffers, n, 4, GL_TRUE, 0);
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0001-unchecked-malloc-may-allow-unauthed-client-to-crash-.patch b/patches/source/xorg-server/patch/xorg-server/0001-unchecked-malloc-may-allow-unauthed-client-to-crash-.patch
new file mode 100644
index 000000000..483bd74f9
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0001-unchecked-malloc-may-allow-unauthed-client-to-crash-.patch
@@ -0,0 +1,41 @@
+From 2ecba31ddb5f4b953a0a811fec7fb7470b668f13 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri, 17 Jan 2014 18:54:03 -0800
+Subject: [PATCH 01/31] unchecked malloc may allow unauthed client to crash
+ Xserver [CVE-2014-8091]
+
+authdes_ezdecode() calls malloc() using a length provided by the
+connection handshake sent by a newly connected client in order
+to authenticate to the server, so should be treated as untrusted.
+
+It didn't check if malloc() failed before writing to the newly
+allocated buffer, so could lead to a server crash if the server
+fails to allocate memory (up to UINT16_MAX bytes, since the len
+field is a CARD16 in the X protocol).
+
+Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ os/rpcauth.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/os/rpcauth.c b/os/rpcauth.c
+index bd219ac..c5bf787 100644
+--- a/os/rpcauth.c
++++ b/os/rpcauth.c
+@@ -66,6 +66,10 @@ authdes_ezdecode(const char *inmsg, int len)
+ SVCXPRT xprt;
+
+ temp_inmsg = malloc(len);
++ if (temp_inmsg == NULL) {
++ why = AUTH_FAILED; /* generic error, since there is no AUTH_BADALLOC */
++ return NULL;
++ }
+ memmove(temp_inmsg, inmsg, len);
+
+ memset((char *) &msg, 0, sizeof(msg));
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0002-dix-GetHosts-bounds-check-using-wrong-pointer-value-.patch b/patches/source/xorg-server/patch/xorg-server/0002-dix-GetHosts-bounds-check-using-wrong-pointer-value-.patch
new file mode 100644
index 000000000..c75c0a8f4
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0002-dix-GetHosts-bounds-check-using-wrong-pointer-value-.patch
@@ -0,0 +1,35 @@
+From 1559a94395258fd73e369f1a2c98a44bfe21a486 Mon Sep 17 00:00:00 2001
+From: Keith Packard <keithp@keithp.com>
+Date: Tue, 9 Dec 2014 09:31:00 -0800
+Subject: [PATCH 2/2] dix: GetHosts bounds check using wrong pointer value
+ [CVE-2014-8092 pt. 6]
+
+GetHosts saves the pointer to allocated memory in *data, and then
+wants to bounds-check writes to that region, but was mistakenly using
+a bare 'data' instead of '*data'. Also, data is declared as void **,
+so we need a cast to turn it into a byte pointer so we can actually do
+pointer comparisons.
+
+Signed-off-by: Keith Packard <keithp@keithp.com>
+Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+---
+ os/access.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/os/access.c b/os/access.c
+index f393c8d..28f2d32 100644
+--- a/os/access.c
++++ b/os/access.c
+@@ -1308,7 +1308,7 @@ GetHosts(void **data, int *pnHosts, int *pLen, BOOL * pEnabled)
+ }
+ for (host = validhosts; host; host = host->next) {
+ len = host->len;
+- if ((ptr + sizeof(xHostEntry) + len) > (data + n))
++ if ((ptr + sizeof(xHostEntry) + len) > ((unsigned char *) *data + n))
+ break;
+ ((xHostEntry *) ptr)->family = host->family;
+ ((xHostEntry *) ptr)->length = len;
+--
+2.1.0
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0002-dix-integer-overflow-in-ProcPutImage-CVE-2014-8092-1.patch b/patches/source/xorg-server/patch/xorg-server/0002-dix-integer-overflow-in-ProcPutImage-CVE-2014-8092-1.patch
new file mode 100644
index 000000000..151a59aa5
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0002-dix-integer-overflow-in-ProcPutImage-CVE-2014-8092-1.patch
@@ -0,0 +1,38 @@
+From 37dd6285cdfc2129a49f26d09addb27cb017ae61 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Wed, 22 Jan 2014 21:11:16 -0800
+Subject: [PATCH 02/31] dix: integer overflow in ProcPutImage() [CVE-2014-8092
+ 1/4]
+
+ProcPutImage() calculates a length field from a width, left pad and depth
+specified by the client (if the specified format is XYPixmap).
+
+The calculations for the total amount of memory the server needs for the
+pixmap can overflow a 32-bit number, causing out-of-bounds memory writes
+on 32-bit systems (since the length is stored in a long int variable).
+
+Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ dix/dispatch.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/dix/dispatch.c b/dix/dispatch.c
+index 979ba48..8cb23d1 100644
+--- a/dix/dispatch.c
++++ b/dix/dispatch.c
+@@ -1955,6 +1955,9 @@ ProcPutImage(ClientPtr client)
+ tmpImage = (char *) &stuff[1];
+ lengthProto = length;
+
++ if (lengthProto >= (INT32_MAX / stuff->height))
++ return BadLength;
++
+ if ((bytes_to_int32(lengthProto * stuff->height) +
+ bytes_to_int32(sizeof(xPutImageReq))) != client->req_len)
+ return BadLength;
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0003-dix-integer-overflow-in-GetHosts-CVE-2014-8092-2-4.patch b/patches/source/xorg-server/patch/xorg-server/0003-dix-integer-overflow-in-GetHosts-CVE-2014-8092-2-4.patch
new file mode 100644
index 000000000..2034f285c
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0003-dix-integer-overflow-in-GetHosts-CVE-2014-8092-2-4.patch
@@ -0,0 +1,50 @@
+From 7909f70e73f40113608fba3ddb657c05c3276da1 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Mon, 6 Jan 2014 23:30:14 -0800
+Subject: [PATCH 03/31] dix: integer overflow in GetHosts() [CVE-2014-8092 2/4]
+
+GetHosts() iterates over all the hosts it has in memory, and copies
+them to a buffer. The buffer length is calculated by iterating over
+all the hosts and adding up all of their combined length. There is a
+potential integer overflow, if there are lots and lots of hosts (with
+a combined length of > ~4 gig). This should be possible by repeatedly
+calling ProcChangeHosts() on 64bit machines with enough memory.
+
+This patch caps the list at 1mb, because multi-megabyte hostname
+lists for X access control are insane.
+
+Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ os/access.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/os/access.c b/os/access.c
+index 88a44d9..e7d668a 100644
+--- a/os/access.c
++++ b/os/access.c
+@@ -1323,6 +1323,10 @@ GetHosts(pointer *data, int *pnHosts, int *pLen, BOOL * pEnabled)
+ for (host = validhosts; host; host = host->next) {
+ nHosts++;
+ n += pad_to_int32(host->len) + sizeof(xHostEntry);
++ /* Could check for INT_MAX, but in reality having more than 1mb of
++ hostnames in the access list is ridiculous */
++ if (n >= 1048576)
++ break;
+ }
+ if (n) {
+ *data = ptr = malloc(n);
+@@ -1331,6 +1335,8 @@ GetHosts(pointer *data, int *pnHosts, int *pLen, BOOL * pEnabled)
+ }
+ for (host = validhosts; host; host = host->next) {
+ len = host->len;
++ if ((ptr + sizeof(xHostEntry) + len) > (data + n))
++ break;
+ ((xHostEntry *) ptr)->family = host->family;
+ ((xHostEntry *) ptr)->length = len;
+ ptr += sizeof(xHostEntry);
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0004-dix-integer-overflow-in-RegionSizeof-CVE-2014-8092-3.patch b/patches/source/xorg-server/patch/xorg-server/0004-dix-integer-overflow-in-RegionSizeof-CVE-2014-8092-3.patch
new file mode 100644
index 000000000..8023f93eb
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0004-dix-integer-overflow-in-RegionSizeof-CVE-2014-8092-3.patch
@@ -0,0 +1,129 @@
+From 8f82f69e9e4b76b01b9f5fe06d1ea86851d951c4 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Wed, 22 Jan 2014 22:37:15 -0800
+Subject: [PATCH 04/31] dix: integer overflow in RegionSizeof() [CVE-2014-8092
+ 3/4]
+
+RegionSizeof contains several integer overflows if a large length
+value is passed in. Once we fix it to return 0 on overflow, we
+also have to fix the callers to handle this error condition
+
+v2: Fixed limit calculation in RegionSizeof as pointed out by jcristau.
+
+Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Reviewed-by: Julien Cristau <jcristau@debian.org>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ dix/region.c | 20 +++++++++++++-------
+ include/regionstr.h | 10 +++++++---
+ 2 files changed, 20 insertions(+), 10 deletions(-)
+
+diff --git a/dix/region.c b/dix/region.c
+index 737d2a8..76c4e29 100644
+--- a/dix/region.c
++++ b/dix/region.c
+@@ -169,7 +169,6 @@ Equipment Corporation.
+ ((r1)->y1 <= (r2)->y1) && \
+ ((r1)->y2 >= (r2)->y2) )
+
+-#define xallocData(n) malloc(RegionSizeof(n))
+ #define xfreeData(reg) if ((reg)->data && (reg)->data->size) free((reg)->data)
+
+ #define RECTALLOC_BAIL(pReg,n,bail) \
+@@ -205,8 +204,9 @@ if (!(pReg)->data || (((pReg)->data->numRects + (n)) > (pReg)->data->size)) \
+ #define DOWNSIZE(reg,numRects) \
+ if (((numRects) < ((reg)->data->size >> 1)) && ((reg)->data->size > 50)) \
+ { \
+- RegDataPtr NewData; \
+- NewData = (RegDataPtr)realloc((reg)->data, RegionSizeof(numRects)); \
++ size_t NewSize = RegionSizeof(numRects); \
++ RegDataPtr NewData = \
++ (NewSize > 0) ? realloc((reg)->data, NewSize) : NULL ; \
+ if (NewData) \
+ { \
+ NewData->size = (numRects); \
+@@ -330,17 +330,20 @@ Bool
+ RegionRectAlloc(RegionPtr pRgn, int n)
+ {
+ RegDataPtr data;
++ size_t rgnSize;
+
+ if (!pRgn->data) {
+ n++;
+- pRgn->data = xallocData(n);
++ rgnSize = RegionSizeof(n);
++ pRgn->data = (rgnSize > 0) ? malloc(rgnSize) : NULL;
+ if (!pRgn->data)
+ return RegionBreak(pRgn);
+ pRgn->data->numRects = 1;
+ *RegionBoxptr(pRgn) = pRgn->extents;
+ }
+ else if (!pRgn->data->size) {
+- pRgn->data = xallocData(n);
++ rgnSize = RegionSizeof(n);
++ pRgn->data = (rgnSize > 0) ? malloc(rgnSize) : NULL;
+ if (!pRgn->data)
+ return RegionBreak(pRgn);
+ pRgn->data->numRects = 0;
+@@ -352,7 +355,8 @@ RegionRectAlloc(RegionPtr pRgn, int n)
+ n = 250;
+ }
+ n += pRgn->data->numRects;
+- data = (RegDataPtr) realloc(pRgn->data, RegionSizeof(n));
++ rgnSize = RegionSizeof(n);
++ data = (rgnSize > 0) ? realloc(pRgn->data, rgnSize) : NULL;
+ if (!data)
+ return RegionBreak(pRgn);
+ pRgn->data = data;
+@@ -1297,6 +1301,7 @@ RegionFromRects(int nrects, xRectangle *prect, int ctype)
+ {
+
+ RegionPtr pRgn;
++ size_t rgnSize;
+ RegDataPtr pData;
+ BoxPtr pBox;
+ int i;
+@@ -1323,7 +1328,8 @@ RegionFromRects(int nrects, xRectangle *prect, int ctype)
+ }
+ return pRgn;
+ }
+- pData = xallocData(nrects);
++ rgnSize = RegionSizeof(nrects);
++ pData = (rgnSize > 0) ? malloc(rgnSize) : NULL;
+ if (!pData) {
+ RegionBreak(pRgn);
+ return pRgn;
+diff --git a/include/regionstr.h b/include/regionstr.h
+index 805257b..5006207 100644
+--- a/include/regionstr.h
++++ b/include/regionstr.h
+@@ -127,7 +127,10 @@ RegionEnd(RegionPtr reg)
+ static inline size_t
+ RegionSizeof(int n)
+ {
+- return (sizeof(RegDataRec) + ((n) * sizeof(BoxRec)));
++ if (n < ((INT_MAX - sizeof(RegDataRec)) / sizeof(BoxRec)))
++ return (sizeof(RegDataRec) + ((n) * sizeof(BoxRec)));
++ else
++ return 0;
+ }
+
+ static inline void
+@@ -138,9 +141,10 @@ RegionInit(RegionPtr _pReg, BoxPtr _rect, int _size)
+ (_pReg)->data = (RegDataPtr) NULL;
+ }
+ else {
++ size_t rgnSize;
+ (_pReg)->extents = RegionEmptyBox;
+- if (((_size) > 1) && ((_pReg)->data =
+- (RegDataPtr) malloc(RegionSizeof(_size)))) {
++ if (((_size) > 1) && ((rgnSize = RegionSizeof(_size)) > 0) &&
++ (((_pReg)->data = malloc(rgnSize)) != NULL)) {
+ (_pReg)->data->size = (_size);
+ (_pReg)->data->numRects = 0;
+ }
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0005-dix-integer-overflow-in-REQUEST_FIXED_SIZE-CVE-2014-.patch b/patches/source/xorg-server/patch/xorg-server/0005-dix-integer-overflow-in-REQUEST_FIXED_SIZE-CVE-2014-.patch
new file mode 100644
index 000000000..33c141cc1
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0005-dix-integer-overflow-in-REQUEST_FIXED_SIZE-CVE-2014-.patch
@@ -0,0 +1,35 @@
+From b59388b04da1a27882ca19e0737a0903b2896740 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Wed, 22 Jan 2014 23:44:46 -0800
+Subject: [PATCH 05/31] dix: integer overflow in REQUEST_FIXED_SIZE()
+ [CVE-2014-8092 4/4]
+
+Force use of 64-bit integers when evaluating data provided by clients
+in 32-bit fields which can overflow when added or multiplied during
+checks.
+
+Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ include/dix.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/include/dix.h b/include/dix.h
+index fa7ccd4..7c36932 100644
+--- a/include/dix.h
++++ b/include/dix.h
+@@ -76,7 +76,8 @@ SOFTWARE.
+
+ #define REQUEST_FIXED_SIZE(req, n)\
+ if (((sizeof(req) >> 2) > client->req_len) || \
+- (((sizeof(req) + (n) + 3) >> 2) != client->req_len)) \
++ ((n >> 2) >= client->req_len) || \
++ ((((uint64_t) sizeof(req) + (n) + 3) >> 2) != (uint64_t) client->req_len)) \
+ return(BadLength)
+
+ #define LEGAL_NEW_RESOURCE(id,client)\
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0006-dri2-integer-overflow-in-ProcDRI2GetBuffers-CVE-2014.patch b/patches/source/xorg-server/patch/xorg-server/0006-dri2-integer-overflow-in-ProcDRI2GetBuffers-CVE-2014.patch
new file mode 100644
index 000000000..9688802e0
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0006-dri2-integer-overflow-in-ProcDRI2GetBuffers-CVE-2014.patch
@@ -0,0 +1,36 @@
+From 26ef0a52797e8c3acd00c7a2bcb272abae73ca5e Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Wed, 22 Jan 2014 23:40:18 -0800
+Subject: [PATCH 06/31] dri2: integer overflow in ProcDRI2GetBuffers()
+ [CVE-2014-8094]
+
+ProcDRI2GetBuffers() tries to validate a length field (count).
+There is an integer overflow in the validation. This can cause
+out of bound reads and memory corruption later on.
+
+Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Reviewed-by: Julien Cristau <jcristau@debian.org>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ hw/xfree86/dri2/dri2ext.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c
+index 4ab0186..c3dbb2f 100644
+--- a/hw/xfree86/dri2/dri2ext.c
++++ b/hw/xfree86/dri2/dri2ext.c
+@@ -281,6 +281,9 @@ ProcDRI2GetBuffers(ClientPtr client)
+ unsigned int *attachments;
+
+ REQUEST_FIXED_SIZE(xDRI2GetBuffersReq, stuff->count * 4);
++ if (stuff->count > (INT_MAX / 4))
++ return BadLength;
++
+ if (!validDrawable(client, stuff->drawable, DixReadAccess | DixWriteAccess,
+ &pDrawable, &status))
+ return status;
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0007-dbe-unvalidated-lengths-in-DbeSwapBuffers-calls-CVE-.patch b/patches/source/xorg-server/patch/xorg-server/0007-dbe-unvalidated-lengths-in-DbeSwapBuffers-calls-CVE-.patch
new file mode 100644
index 000000000..5d018b1c8
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0007-dbe-unvalidated-lengths-in-DbeSwapBuffers-calls-CVE-.patch
@@ -0,0 +1,74 @@
+From ffd61dce4f10aba286ede4143c7763fda315fc49 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Wed, 22 Jan 2014 23:12:04 -0800
+Subject: [PATCH 07/31] dbe: unvalidated lengths in DbeSwapBuffers calls
+ [CVE-2014-8097]
+
+ProcDbeSwapBuffers() has a 32bit (n) length value that it uses to read
+from a buffer. The length is never validated, which can lead to out of
+bound reads, and possibly returning the data read from out of bounds to
+the misbehaving client via an X Error packet.
+
+SProcDbeSwapBuffers() swaps data (for correct endianness) before
+handing it off to the real proc. While doing the swapping, the
+length field is not validated, which can cause memory corruption.
+
+v2: reorder checks to avoid compilers optimizing out checks for overflow
+that happen after we'd already have done the overflowing multiplications.
+
+Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ dbe/dbe.c | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/dbe/dbe.c b/dbe/dbe.c
+index 379feb1..f5a1940 100644
+--- a/dbe/dbe.c
++++ b/dbe/dbe.c
+@@ -454,18 +454,20 @@ ProcDbeSwapBuffers(ClientPtr client)
+ DbeSwapInfoPtr swapInfo;
+ xDbeSwapInfo *dbeSwapInfo;
+ int error;
+- register int i, j;
+- int nStuff;
++ unsigned int i, j;
++ unsigned int nStuff;
+
+ REQUEST_AT_LEAST_SIZE(xDbeSwapBuffersReq);
+ nStuff = stuff->n; /* use local variable for performance. */
+
+ if (nStuff == 0) {
++ REQUEST_SIZE_MATCH(xDbeSwapBuffersReq);
+ return Success;
+ }
+
+ if (nStuff > UINT32_MAX / sizeof(DbeSwapInfoRec))
+ return BadAlloc;
++ REQUEST_FIXED_SIZE(xDbeSwapBuffersReq, nStuff * sizeof(xDbeSwapInfo));
+
+ /* Get to the swap info appended to the end of the request. */
+ dbeSwapInfo = (xDbeSwapInfo *) & stuff[1];
+@@ -956,13 +958,16 @@ static int
+ SProcDbeSwapBuffers(ClientPtr client)
+ {
+ REQUEST(xDbeSwapBuffersReq);
+- register int i;
++ unsigned int i;
+ xDbeSwapInfo *pSwapInfo;
+
+ swaps(&stuff->length);
+ REQUEST_AT_LEAST_SIZE(xDbeSwapBuffersReq);
+
+ swapl(&stuff->n);
++ if (stuff->n > UINT32_MAX / sizeof(DbeSwapInfoRec))
++ return BadAlloc;
++ REQUEST_FIXED_SIZE(xDbeSwapBuffersReq, stuff->n * sizeof(xDbeSwapInfo));
+
+ if (stuff->n != 0) {
+ pSwapInfo = (xDbeSwapInfo *) stuff + 1;
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0008-Xi-unvalidated-lengths-in-Xinput-extension-CVE-2014-.patch b/patches/source/xorg-server/patch/xorg-server/0008-Xi-unvalidated-lengths-in-Xinput-extension-CVE-2014-.patch
new file mode 100644
index 000000000..4e432d2ab
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0008-Xi-unvalidated-lengths-in-Xinput-extension-CVE-2014-.patch
@@ -0,0 +1,552 @@
+From 078a38f9e9a83e171a266e5bc60a722a0d525528 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sun, 26 Jan 2014 10:54:41 -0800
+Subject: [PATCH 08/31] Xi: unvalidated lengths in Xinput extension
+ [CVE-2014-8095]
+
+Multiple functions in the Xinput extension handling of requests from
+clients failed to check that the length of the request sent by the
+client was large enough to perform all the required operations and
+thus could read or write to memory outside the bounds of the request
+buffer.
+
+This commit includes the creation of a new REQUEST_AT_LEAST_EXTRA_SIZE
+macro in include/dix.h for the common case of needing to ensure a
+request is large enough to include both the request itself and a
+minimum amount of extra data following the request header.
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ Xi/chgdctl.c | 8 ++++++--
+ Xi/chgfctl.c | 2 ++
+ Xi/sendexev.c | 3 +++
+ Xi/xiallowev.c | 2 ++
+ Xi/xichangecursor.c | 2 +-
+ Xi/xichangehierarchy.c | 35 ++++++++++++++++++++++++++++++++---
+ Xi/xigetclientpointer.c | 1 +
+ Xi/xigrabdev.c | 9 ++++++++-
+ Xi/xipassivegrab.c | 12 ++++++++++--
+ Xi/xiproperty.c | 14 ++++++--------
+ Xi/xiquerydevice.c | 1 +
+ Xi/xiquerypointer.c | 2 ++
+ Xi/xiselectev.c | 8 ++++++++
+ Xi/xisetclientpointer.c | 3 ++-
+ Xi/xisetdevfocus.c | 4 ++++
+ Xi/xiwarppointer.c | 2 ++
+ include/dix.h | 4 ++++
+ 17 files changed, 94 insertions(+), 18 deletions(-)
+
+diff --git a/Xi/chgdctl.c b/Xi/chgdctl.c
+index 31d3a57..2dfc54c 100644
+--- a/Xi/chgdctl.c
++++ b/Xi/chgdctl.c
+@@ -78,7 +78,7 @@ SProcXChangeDeviceControl(ClientPtr client)
+
+ REQUEST(xChangeDeviceControlReq);
+ swaps(&stuff->length);
+- REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq);
++ REQUEST_AT_LEAST_EXTRA_SIZE(xChangeDeviceControlReq, sizeof(xDeviceCtl));
+ swaps(&stuff->control);
+ ctl = (xDeviceCtl *) &stuff[1];
+ swaps(&ctl->control);
+@@ -115,7 +115,7 @@ ProcXChangeDeviceControl(ClientPtr client)
+ xDeviceEnableCtl *e;
+
+ REQUEST(xChangeDeviceControlReq);
+- REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq);
++ REQUEST_AT_LEAST_EXTRA_SIZE(xChangeDeviceControlReq, sizeof(xDeviceCtl));
+
+ len = stuff->length - bytes_to_int32(sizeof(xChangeDeviceControlReq));
+ ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess);
+@@ -186,6 +186,10 @@ ProcXChangeDeviceControl(ClientPtr client)
+ break;
+ case DEVICE_ENABLE:
+ e = (xDeviceEnableCtl *) &stuff[1];
++ if ((len != bytes_to_int32(sizeof(xDeviceEnableCtl)))) {
++ ret = BadLength;
++ goto out;
++ }
+
+ if (IsXTestDevice(dev, NULL))
+ status = !Success;
+diff --git a/Xi/chgfctl.c b/Xi/chgfctl.c
+index 6dcf60c..224c2ba 100644
+--- a/Xi/chgfctl.c
++++ b/Xi/chgfctl.c
+@@ -467,6 +467,8 @@ ProcXChangeFeedbackControl(ClientPtr client)
+ xStringFeedbackCtl *f = ((xStringFeedbackCtl *) &stuff[1]);
+
+ if (client->swapped) {
++ if (len < bytes_to_int32(sizeof(xStringFeedbackCtl)))
++ return BadLength;
+ swaps(&f->num_keysyms);
+ }
+ if (len !=
+diff --git a/Xi/sendexev.c b/Xi/sendexev.c
+index 3c21386..183f88d 100644
+--- a/Xi/sendexev.c
++++ b/Xi/sendexev.c
+@@ -135,6 +135,9 @@ ProcXSendExtensionEvent(ClientPtr client)
+ if (ret != Success)
+ return ret;
+
++ if (stuff->num_events == 0)
++ return ret;
++
+ /* The client's event type must be one defined by an extension. */
+
+ first = ((xEvent *) &stuff[1]);
+diff --git a/Xi/xiallowev.c b/Xi/xiallowev.c
+index ebef233..ca263ef 100644
+--- a/Xi/xiallowev.c
++++ b/Xi/xiallowev.c
+@@ -48,6 +48,7 @@ int
+ SProcXIAllowEvents(ClientPtr client)
+ {
+ REQUEST(xXIAllowEventsReq);
++ REQUEST_AT_LEAST_SIZE(xXIAllowEventsReq);
+
+ swaps(&stuff->length);
+ swaps(&stuff->deviceid);
+@@ -55,6 +56,7 @@ SProcXIAllowEvents(ClientPtr client)
+ if (stuff->length > 3) {
+ xXI2_2AllowEventsReq *req_xi22 = (xXI2_2AllowEventsReq *) stuff;
+
++ REQUEST_AT_LEAST_SIZE(xXI2_2AllowEventsReq);
+ swapl(&req_xi22->touchid);
+ swapl(&req_xi22->grab_window);
+ }
+diff --git a/Xi/xichangecursor.c b/Xi/xichangecursor.c
+index 0be6bc0..33e9e9c 100644
+--- a/Xi/xichangecursor.c
++++ b/Xi/xichangecursor.c
+@@ -57,11 +57,11 @@ int
+ SProcXIChangeCursor(ClientPtr client)
+ {
+ REQUEST(xXIChangeCursorReq);
++ REQUEST_SIZE_MATCH(xXIChangeCursorReq);
+ swaps(&stuff->length);
+ swapl(&stuff->win);
+ swapl(&stuff->cursor);
+ swaps(&stuff->deviceid);
+- REQUEST_SIZE_MATCH(xXIChangeCursorReq);
+ return (ProcXIChangeCursor(client));
+ }
+
+diff --git a/Xi/xichangehierarchy.c b/Xi/xichangehierarchy.c
+index e2f4b8a..8e3415b 100644
+--- a/Xi/xichangehierarchy.c
++++ b/Xi/xichangehierarchy.c
+@@ -407,7 +407,7 @@ int
+ ProcXIChangeHierarchy(ClientPtr client)
+ {
+ xXIAnyHierarchyChangeInfo *any;
+- int required_len = sizeof(xXIChangeHierarchyReq);
++ size_t len; /* length of data remaining in request */
+ int rc = Success;
+ int flags[MAXDEVICES] = { 0 };
+
+@@ -417,21 +417,46 @@ ProcXIChangeHierarchy(ClientPtr client)
+ if (!stuff->num_changes)
+ return rc;
+
++ if (stuff->length > (INT_MAX >> 2))
++ return BadAlloc;
++ len = (stuff->length << 2) - sizeof(xXIAnyHierarchyChangeInfo);
++
+ any = (xXIAnyHierarchyChangeInfo *) &stuff[1];
+ while (stuff->num_changes--) {
++ if (len < sizeof(xXIAnyHierarchyChangeInfo)) {
++ rc = BadLength;
++ goto unwind;
++ }
++
+ SWAPIF(swaps(&any->type));
+ SWAPIF(swaps(&any->length));
+
+- required_len += any->length;
+- if ((stuff->length * 4) < required_len)
++ if ((any->length > (INT_MAX >> 2)) || (len < (any->length << 2)))
+ return BadLength;
+
++#define CHANGE_SIZE_MATCH(type) \
++ do { \
++ if ((len < sizeof(type)) || (any->length != (sizeof(type) >> 2))) { \
++ rc = BadLength; \
++ goto unwind; \
++ } \
++ } while(0)
++
+ switch (any->type) {
+ case XIAddMaster:
+ {
+ xXIAddMasterInfo *c = (xXIAddMasterInfo *) any;
+
++ /* Variable length, due to appended name string */
++ if (len < sizeof(xXIAddMasterInfo)) {
++ rc = BadLength;
++ goto unwind;
++ }
+ SWAPIF(swaps(&c->name_len));
++ if (c->name_len > (len - sizeof(xXIAddMasterInfo))) {
++ rc = BadLength;
++ goto unwind;
++ }
+
+ rc = add_master(client, c, flags);
+ if (rc != Success)
+@@ -442,6 +467,7 @@ ProcXIChangeHierarchy(ClientPtr client)
+ {
+ xXIRemoveMasterInfo *r = (xXIRemoveMasterInfo *) any;
+
++ CHANGE_SIZE_MATCH(xXIRemoveMasterInfo);
+ rc = remove_master(client, r, flags);
+ if (rc != Success)
+ goto unwind;
+@@ -451,6 +477,7 @@ ProcXIChangeHierarchy(ClientPtr client)
+ {
+ xXIDetachSlaveInfo *c = (xXIDetachSlaveInfo *) any;
+
++ CHANGE_SIZE_MATCH(xXIDetachSlaveInfo);
+ rc = detach_slave(client, c, flags);
+ if (rc != Success)
+ goto unwind;
+@@ -460,6 +487,7 @@ ProcXIChangeHierarchy(ClientPtr client)
+ {
+ xXIAttachSlaveInfo *c = (xXIAttachSlaveInfo *) any;
+
++ CHANGE_SIZE_MATCH(xXIAttachSlaveInfo);
+ rc = attach_slave(client, c, flags);
+ if (rc != Success)
+ goto unwind;
+@@ -467,6 +495,7 @@ ProcXIChangeHierarchy(ClientPtr client)
+ break;
+ }
+
++ len -= any->length * 4;
+ any = (xXIAnyHierarchyChangeInfo *) ((char *) any + any->length * 4);
+ }
+
+diff --git a/Xi/xigetclientpointer.c b/Xi/xigetclientpointer.c
+index 3c90d58..306dd39 100644
+--- a/Xi/xigetclientpointer.c
++++ b/Xi/xigetclientpointer.c
+@@ -50,6 +50,7 @@ int
+ SProcXIGetClientPointer(ClientPtr client)
+ {
+ REQUEST(xXIGetClientPointerReq);
++ REQUEST_SIZE_MATCH(xXIGetClientPointerReq);
+
+ swaps(&stuff->length);
+ swapl(&stuff->win);
+diff --git a/Xi/xigrabdev.c b/Xi/xigrabdev.c
+index 63d95bc..e2a2ae3 100644
+--- a/Xi/xigrabdev.c
++++ b/Xi/xigrabdev.c
+@@ -47,6 +47,11 @@ int
+ SProcXIGrabDevice(ClientPtr client)
+ {
+ REQUEST(xXIGrabDeviceReq);
++ /*
++ * Check here for at least the length of the struct we swap, then
++ * let ProcXIGrabDevice check the full size after we swap mask_len.
++ */
++ REQUEST_AT_LEAST_SIZE(xXIGrabDeviceReq);
+
+ swaps(&stuff->length);
+ swaps(&stuff->deviceid);
+@@ -71,7 +76,7 @@ ProcXIGrabDevice(ClientPtr client)
+ unsigned int pointer_mode;
+
+ REQUEST(xXIGrabDeviceReq);
+- REQUEST_AT_LEAST_SIZE(xXIGrabDeviceReq);
++ REQUEST_FIXED_SIZE(xXIGrabDeviceReq, ((size_t) stuff->mask_len) * 4);
+
+ ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess);
+ if (ret != Success)
+@@ -131,6 +136,7 @@ int
+ SProcXIUngrabDevice(ClientPtr client)
+ {
+ REQUEST(xXIUngrabDeviceReq);
++ REQUEST_SIZE_MATCH(xXIUngrabDeviceReq);
+
+ swaps(&stuff->length);
+ swaps(&stuff->deviceid);
+@@ -148,6 +154,7 @@ ProcXIUngrabDevice(ClientPtr client)
+ TimeStamp time;
+
+ REQUEST(xXIUngrabDeviceReq);
++ REQUEST_SIZE_MATCH(xXIUngrabDeviceReq);
+
+ ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess);
+ if (ret != Success)
+diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
+index eccec0a..a714a44 100644
+--- a/Xi/xipassivegrab.c
++++ b/Xi/xipassivegrab.c
+@@ -53,6 +53,7 @@ SProcXIPassiveGrabDevice(ClientPtr client)
+ uint32_t *mods;
+
+ REQUEST(xXIPassiveGrabDeviceReq);
++ REQUEST_AT_LEAST_SIZE(xXIPassiveGrabDeviceReq);
+
+ swaps(&stuff->length);
+ swaps(&stuff->deviceid);
+@@ -63,6 +64,8 @@ SProcXIPassiveGrabDevice(ClientPtr client)
+ swaps(&stuff->mask_len);
+ swaps(&stuff->num_modifiers);
+
++ REQUEST_FIXED_SIZE(xXIPassiveGrabDeviceReq,
++ ((uint32_t) stuff->mask_len + stuff->num_modifiers) *4);
+ mods = (uint32_t *) &stuff[1];
+
+ for (i = 0; i < stuff->num_modifiers; i++, mods++) {
+@@ -92,7 +95,8 @@ ProcXIPassiveGrabDevice(ClientPtr client)
+ int mask_len;
+
+ REQUEST(xXIPassiveGrabDeviceReq);
+- REQUEST_AT_LEAST_SIZE(xXIPassiveGrabDeviceReq);
++ REQUEST_FIXED_SIZE(xXIPassiveGrabDeviceReq,
++ ((uint32_t) stuff->mask_len + stuff->num_modifiers) * 4);
+
+ if (stuff->deviceid == XIAllDevices)
+ dev = inputInfo.all_devices;
+@@ -248,6 +252,7 @@ SProcXIPassiveUngrabDevice(ClientPtr client)
+ uint32_t *modifiers;
+
+ REQUEST(xXIPassiveUngrabDeviceReq);
++ REQUEST_AT_LEAST_SIZE(xXIPassiveUngrabDeviceReq);
+
+ swaps(&stuff->length);
+ swapl(&stuff->grab_window);
+@@ -255,6 +260,8 @@ SProcXIPassiveUngrabDevice(ClientPtr client)
+ swapl(&stuff->detail);
+ swaps(&stuff->num_modifiers);
+
++ REQUEST_FIXED_SIZE(xXIPassiveUngrabDeviceReq,
++ ((uint32_t) stuff->num_modifiers) << 2);
+ modifiers = (uint32_t *) &stuff[1];
+
+ for (i = 0; i < stuff->num_modifiers; i++, modifiers++)
+@@ -273,7 +280,8 @@ ProcXIPassiveUngrabDevice(ClientPtr client)
+ int i, rc;
+
+ REQUEST(xXIPassiveUngrabDeviceReq);
+- REQUEST_AT_LEAST_SIZE(xXIPassiveUngrabDeviceReq);
++ REQUEST_FIXED_SIZE(xXIPassiveUngrabDeviceReq,
++ ((uint32_t) stuff->num_modifiers) << 2);
+
+ if (stuff->deviceid == XIAllDevices)
+ dev = inputInfo.all_devices;
+diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
+index 796ba09..c99e282 100644
+--- a/Xi/xiproperty.c
++++ b/Xi/xiproperty.c
+@@ -1013,10 +1013,9 @@ int
+ SProcXListDeviceProperties(ClientPtr client)
+ {
+ REQUEST(xListDevicePropertiesReq);
++ REQUEST_SIZE_MATCH(xListDevicePropertiesReq);
+
+ swaps(&stuff->length);
+-
+- REQUEST_SIZE_MATCH(xListDevicePropertiesReq);
+ return (ProcXListDeviceProperties(client));
+ }
+
+@@ -1037,10 +1036,10 @@ int
+ SProcXDeleteDeviceProperty(ClientPtr client)
+ {
+ REQUEST(xDeleteDevicePropertyReq);
++ REQUEST_SIZE_MATCH(xDeleteDevicePropertyReq);
+
+ swaps(&stuff->length);
+ swapl(&stuff->property);
+- REQUEST_SIZE_MATCH(xDeleteDevicePropertyReq);
+ return (ProcXDeleteDeviceProperty(client));
+ }
+
+@@ -1048,13 +1047,13 @@ int
+ SProcXGetDeviceProperty(ClientPtr client)
+ {
+ REQUEST(xGetDevicePropertyReq);
++ REQUEST_SIZE_MATCH(xGetDevicePropertyReq);
+
+ swaps(&stuff->length);
+ swapl(&stuff->property);
+ swapl(&stuff->type);
+ swapl(&stuff->longOffset);
+ swapl(&stuff->longLength);
+- REQUEST_SIZE_MATCH(xGetDevicePropertyReq);
+ return (ProcXGetDeviceProperty(client));
+ }
+
+@@ -1253,11 +1252,10 @@ int
+ SProcXIListProperties(ClientPtr client)
+ {
+ REQUEST(xXIListPropertiesReq);
++ REQUEST_SIZE_MATCH(xXIListPropertiesReq);
+
+ swaps(&stuff->length);
+ swaps(&stuff->deviceid);
+-
+- REQUEST_SIZE_MATCH(xXIListPropertiesReq);
+ return (ProcXIListProperties(client));
+ }
+
+@@ -1279,11 +1277,11 @@ int
+ SProcXIDeleteProperty(ClientPtr client)
+ {
+ REQUEST(xXIDeletePropertyReq);
++ REQUEST_SIZE_MATCH(xXIDeletePropertyReq);
+
+ swaps(&stuff->length);
+ swaps(&stuff->deviceid);
+ swapl(&stuff->property);
+- REQUEST_SIZE_MATCH(xXIDeletePropertyReq);
+ return (ProcXIDeleteProperty(client));
+ }
+
+@@ -1291,6 +1289,7 @@ int
+ SProcXIGetProperty(ClientPtr client)
+ {
+ REQUEST(xXIGetPropertyReq);
++ REQUEST_SIZE_MATCH(xXIGetPropertyReq);
+
+ swaps(&stuff->length);
+ swaps(&stuff->deviceid);
+@@ -1298,7 +1297,6 @@ SProcXIGetProperty(ClientPtr client)
+ swapl(&stuff->type);
+ swapl(&stuff->offset);
+ swapl(&stuff->len);
+- REQUEST_SIZE_MATCH(xXIGetPropertyReq);
+ return (ProcXIGetProperty(client));
+ }
+
+diff --git a/Xi/xiquerydevice.c b/Xi/xiquerydevice.c
+index 4e544f0..67a9a4f 100644
+--- a/Xi/xiquerydevice.c
++++ b/Xi/xiquerydevice.c
+@@ -54,6 +54,7 @@ int
+ SProcXIQueryDevice(ClientPtr client)
+ {
+ REQUEST(xXIQueryDeviceReq);
++ REQUEST_SIZE_MATCH(xXIQueryDeviceReq);
+
+ swaps(&stuff->length);
+ swaps(&stuff->deviceid);
+diff --git a/Xi/xiquerypointer.c b/Xi/xiquerypointer.c
+index e9bdd42..7ec0c85 100644
+--- a/Xi/xiquerypointer.c
++++ b/Xi/xiquerypointer.c
+@@ -63,6 +63,8 @@ int
+ SProcXIQueryPointer(ClientPtr client)
+ {
+ REQUEST(xXIQueryPointerReq);
++ REQUEST_SIZE_MATCH(xXIQueryPointerReq);
++
+ swaps(&stuff->length);
+ swaps(&stuff->deviceid);
+ swapl(&stuff->win);
+diff --git a/Xi/xiselectev.c b/Xi/xiselectev.c
+index 45a996e..168579f 100644
+--- a/Xi/xiselectev.c
++++ b/Xi/xiselectev.c
+@@ -114,6 +114,7 @@ int
+ SProcXISelectEvents(ClientPtr client)
+ {
+ int i;
++ int len;
+ xXIEventMask *evmask;
+
+ REQUEST(xXISelectEventsReq);
+@@ -122,10 +123,17 @@ SProcXISelectEvents(ClientPtr client)
+ swapl(&stuff->win);
+ swaps(&stuff->num_masks);
+
++ len = stuff->length - bytes_to_int32(sizeof(xXISelectEventsReq));
+ evmask = (xXIEventMask *) &stuff[1];
+ for (i = 0; i < stuff->num_masks; i++) {
++ if (len < bytes_to_int32(sizeof(xXIEventMask)))
++ return BadLength;
++ len -= bytes_to_int32(sizeof(xXIEventMask));
+ swaps(&evmask->deviceid);
+ swaps(&evmask->mask_len);
++ if (len < evmask->mask_len)
++ return BadLength;
++ len -= evmask->mask_len;
+ evmask =
+ (xXIEventMask *) (((char *) &evmask[1]) + evmask->mask_len * 4);
+ }
+diff --git a/Xi/xisetclientpointer.c b/Xi/xisetclientpointer.c
+index 38ff51e..24d4a53 100644
+--- a/Xi/xisetclientpointer.c
++++ b/Xi/xisetclientpointer.c
+@@ -51,10 +51,11 @@ int
+ SProcXISetClientPointer(ClientPtr client)
+ {
+ REQUEST(xXISetClientPointerReq);
++ REQUEST_SIZE_MATCH(xXISetClientPointerReq);
++
+ swaps(&stuff->length);
+ swapl(&stuff->win);
+ swaps(&stuff->deviceid);
+- REQUEST_SIZE_MATCH(xXISetClientPointerReq);
+ return (ProcXISetClientPointer(client));
+ }
+
+diff --git a/Xi/xisetdevfocus.c b/Xi/xisetdevfocus.c
+index 372ec24..96a9a16 100644
+--- a/Xi/xisetdevfocus.c
++++ b/Xi/xisetdevfocus.c
+@@ -44,6 +44,8 @@ int
+ SProcXISetFocus(ClientPtr client)
+ {
+ REQUEST(xXISetFocusReq);
++ REQUEST_AT_LEAST_SIZE(xXISetFocusReq);
++
+ swaps(&stuff->length);
+ swaps(&stuff->deviceid);
+ swapl(&stuff->focus);
+@@ -56,6 +58,8 @@ int
+ SProcXIGetFocus(ClientPtr client)
+ {
+ REQUEST(xXIGetFocusReq);
++ REQUEST_AT_LEAST_SIZE(xXIGetFocusReq);
++
+ swaps(&stuff->length);
+ swaps(&stuff->deviceid);
+
+diff --git a/Xi/xiwarppointer.c b/Xi/xiwarppointer.c
+index 3f051f7..780758a 100644
+--- a/Xi/xiwarppointer.c
++++ b/Xi/xiwarppointer.c
+@@ -56,6 +56,8 @@ int
+ SProcXIWarpPointer(ClientPtr client)
+ {
+ REQUEST(xXIWarpPointerReq);
++ REQUEST_SIZE_MATCH(xXIWarpPointerReq);
++
+ swaps(&stuff->length);
+ swapl(&stuff->src_win);
+ swapl(&stuff->dst_win);
+diff --git a/include/dix.h b/include/dix.h
+index 7c36932..72adad3 100644
+--- a/include/dix.h
++++ b/include/dix.h
+@@ -74,6 +74,10 @@ SOFTWARE.
+ if ((sizeof(req) >> 2) > client->req_len )\
+ return(BadLength)
+
++#define REQUEST_AT_LEAST_EXTRA_SIZE(req, extra) \
++ if (((sizeof(req) + ((uint64_t) extra)) >> 2) > client->req_len ) \
++ return(BadLength)
++
+ #define REQUEST_FIXED_SIZE(req, n)\
+ if (((sizeof(req) >> 2) > client->req_len) || \
+ ((n >> 2) >= client->req_len) || \
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0009-xcmisc-unvalidated-length-in-SProcXCMiscGetXIDList-C.patch b/patches/source/xorg-server/patch/xorg-server/0009-xcmisc-unvalidated-length-in-SProcXCMiscGetXIDList-C.patch
new file mode 100644
index 000000000..a5acca741
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0009-xcmisc-unvalidated-length-in-SProcXCMiscGetXIDList-C.patch
@@ -0,0 +1,28 @@
+From c097f07147409a4d6e60a7676fbc79c72307fd5f Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sun, 26 Jan 2014 17:18:54 -0800
+Subject: [PATCH 09/31] xcmisc: unvalidated length in SProcXCMiscGetXIDList()
+ [CVE-2014-8096]
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ Xext/xcmisc.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Xext/xcmisc.c b/Xext/xcmisc.c
+index 034bfb6..1e91010 100644
+--- a/Xext/xcmisc.c
++++ b/Xext/xcmisc.c
+@@ -167,6 +167,7 @@ static int
+ SProcXCMiscGetXIDList(ClientPtr client)
+ {
+ REQUEST(xXCMiscGetXIDListReq);
++ REQUEST_SIZE_MATCH(xXCMiscGetXIDListReq);
+
+ swaps(&stuff->length);
+ swapl(&stuff->count);
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0010-Xv-unvalidated-lengths-in-XVideo-extension-swapped-p.patch b/patches/source/xorg-server/patch/xorg-server/0010-Xv-unvalidated-lengths-in-XVideo-extension-swapped-p.patch
new file mode 100644
index 000000000..6e5111c68
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0010-Xv-unvalidated-lengths-in-XVideo-extension-swapped-p.patch
@@ -0,0 +1,180 @@
+From 70127f3e8ee7cdf57e775720a642c0cbe8b8a140 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sun, 26 Jan 2014 19:23:17 -0800
+Subject: [PATCH 10/31] Xv: unvalidated lengths in XVideo extension swapped
+ procs [CVE-2014-8099]
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ Xext/xvdisp.c | 20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c
+index 31b7783..6ac2366 100644
+--- a/Xext/xvdisp.c
++++ b/Xext/xvdisp.c
+@@ -1218,6 +1218,7 @@ static int
+ SProcXvQueryExtension(ClientPtr client)
+ {
+ REQUEST(xvQueryExtensionReq);
++ REQUEST_SIZE_MATCH(xvQueryExtensionReq);
+ swaps(&stuff->length);
+ return XvProcVector[xv_QueryExtension] (client);
+ }
+@@ -1226,6 +1227,7 @@ static int
+ SProcXvQueryAdaptors(ClientPtr client)
+ {
+ REQUEST(xvQueryAdaptorsReq);
++ REQUEST_SIZE_MATCH(xvQueryAdaptorsReq);
+ swaps(&stuff->length);
+ swapl(&stuff->window);
+ return XvProcVector[xv_QueryAdaptors] (client);
+@@ -1235,6 +1237,7 @@ static int
+ SProcXvQueryEncodings(ClientPtr client)
+ {
+ REQUEST(xvQueryEncodingsReq);
++ REQUEST_SIZE_MATCH(xvQueryEncodingsReq);
+ swaps(&stuff->length);
+ swapl(&stuff->port);
+ return XvProcVector[xv_QueryEncodings] (client);
+@@ -1244,6 +1247,7 @@ static int
+ SProcXvGrabPort(ClientPtr client)
+ {
+ REQUEST(xvGrabPortReq);
++ REQUEST_SIZE_MATCH(xvGrabPortReq);
+ swaps(&stuff->length);
+ swapl(&stuff->port);
+ swapl(&stuff->time);
+@@ -1254,6 +1258,7 @@ static int
+ SProcXvUngrabPort(ClientPtr client)
+ {
+ REQUEST(xvUngrabPortReq);
++ REQUEST_SIZE_MATCH(xvUngrabPortReq);
+ swaps(&stuff->length);
+ swapl(&stuff->port);
+ swapl(&stuff->time);
+@@ -1264,6 +1269,7 @@ static int
+ SProcXvPutVideo(ClientPtr client)
+ {
+ REQUEST(xvPutVideoReq);
++ REQUEST_SIZE_MATCH(xvPutVideoReq);
+ swaps(&stuff->length);
+ swapl(&stuff->port);
+ swapl(&stuff->drawable);
+@@ -1283,6 +1289,7 @@ static int
+ SProcXvPutStill(ClientPtr client)
+ {
+ REQUEST(xvPutStillReq);
++ REQUEST_SIZE_MATCH(xvPutStillReq);
+ swaps(&stuff->length);
+ swapl(&stuff->port);
+ swapl(&stuff->drawable);
+@@ -1302,6 +1309,7 @@ static int
+ SProcXvGetVideo(ClientPtr client)
+ {
+ REQUEST(xvGetVideoReq);
++ REQUEST_SIZE_MATCH(xvGetVideoReq);
+ swaps(&stuff->length);
+ swapl(&stuff->port);
+ swapl(&stuff->drawable);
+@@ -1321,6 +1329,7 @@ static int
+ SProcXvGetStill(ClientPtr client)
+ {
+ REQUEST(xvGetStillReq);
++ REQUEST_SIZE_MATCH(xvGetStillReq);
+ swaps(&stuff->length);
+ swapl(&stuff->port);
+ swapl(&stuff->drawable);
+@@ -1340,6 +1349,7 @@ static int
+ SProcXvPutImage(ClientPtr client)
+ {
+ REQUEST(xvPutImageReq);
++ REQUEST_AT_LEAST_SIZE(xvPutImageReq);
+ swaps(&stuff->length);
+ swapl(&stuff->port);
+ swapl(&stuff->drawable);
+@@ -1363,6 +1373,7 @@ static int
+ SProcXvShmPutImage(ClientPtr client)
+ {
+ REQUEST(xvShmPutImageReq);
++ REQUEST_SIZE_MATCH(xvShmPutImageReq);
+ swaps(&stuff->length);
+ swapl(&stuff->port);
+ swapl(&stuff->drawable);
+@@ -1390,6 +1401,7 @@ static int
+ SProcXvSelectVideoNotify(ClientPtr client)
+ {
+ REQUEST(xvSelectVideoNotifyReq);
++ REQUEST_SIZE_MATCH(xvSelectVideoNotifyReq);
+ swaps(&stuff->length);
+ swapl(&stuff->drawable);
+ return XvProcVector[xv_SelectVideoNotify] (client);
+@@ -1399,6 +1411,7 @@ static int
+ SProcXvSelectPortNotify(ClientPtr client)
+ {
+ REQUEST(xvSelectPortNotifyReq);
++ REQUEST_SIZE_MATCH(xvSelectPortNotifyReq);
+ swaps(&stuff->length);
+ swapl(&stuff->port);
+ return XvProcVector[xv_SelectPortNotify] (client);
+@@ -1408,6 +1421,7 @@ static int
+ SProcXvStopVideo(ClientPtr client)
+ {
+ REQUEST(xvStopVideoReq);
++ REQUEST_SIZE_MATCH(xvStopVideoReq);
+ swaps(&stuff->length);
+ swapl(&stuff->port);
+ swapl(&stuff->drawable);
+@@ -1418,6 +1432,7 @@ static int
+ SProcXvSetPortAttribute(ClientPtr client)
+ {
+ REQUEST(xvSetPortAttributeReq);
++ REQUEST_SIZE_MATCH(xvSetPortAttributeReq);
+ swaps(&stuff->length);
+ swapl(&stuff->port);
+ swapl(&stuff->attribute);
+@@ -1429,6 +1444,7 @@ static int
+ SProcXvGetPortAttribute(ClientPtr client)
+ {
+ REQUEST(xvGetPortAttributeReq);
++ REQUEST_SIZE_MATCH(xvGetPortAttributeReq);
+ swaps(&stuff->length);
+ swapl(&stuff->port);
+ swapl(&stuff->attribute);
+@@ -1439,6 +1455,7 @@ static int
+ SProcXvQueryBestSize(ClientPtr client)
+ {
+ REQUEST(xvQueryBestSizeReq);
++ REQUEST_SIZE_MATCH(xvQueryBestSizeReq);
+ swaps(&stuff->length);
+ swapl(&stuff->port);
+ swaps(&stuff->vid_w);
+@@ -1452,6 +1469,7 @@ static int
+ SProcXvQueryPortAttributes(ClientPtr client)
+ {
+ REQUEST(xvQueryPortAttributesReq);
++ REQUEST_SIZE_MATCH(xvQueryPortAttributesReq);
+ swaps(&stuff->length);
+ swapl(&stuff->port);
+ return XvProcVector[xv_QueryPortAttributes] (client);
+@@ -1461,6 +1479,7 @@ static int
+ SProcXvQueryImageAttributes(ClientPtr client)
+ {
+ REQUEST(xvQueryImageAttributesReq);
++ REQUEST_SIZE_MATCH(xvQueryImageAttributesReq);
+ swaps(&stuff->length);
+ swapl(&stuff->port);
+ swapl(&stuff->id);
+@@ -1473,6 +1492,7 @@ static int
+ SProcXvListImageFormats(ClientPtr client)
+ {
+ REQUEST(xvListImageFormatsReq);
++ REQUEST_SIZE_MATCH(xvListImageFormatsReq);
+ swaps(&stuff->length);
+ swapl(&stuff->port);
+ return XvProcVector[xv_ListImageFormats] (client);
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0011-randr-unvalidated-lengths-in-RandR-extension-swapped.patch b/patches/source/xorg-server/patch/xorg-server/0011-randr-unvalidated-lengths-in-RandR-extension-swapped.patch
new file mode 100644
index 000000000..08f4f6000
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0011-randr-unvalidated-lengths-in-RandR-extension-swapped.patch
@@ -0,0 +1,52 @@
+From 1e8e04d843fd97cfdbb3b83bd44de7493a3f7d83 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sun, 26 Jan 2014 19:38:09 -0800
+Subject: [PATCH 11/31] randr: unvalidated lengths in RandR extension swapped
+ procs [CVE-2014-8101]
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ randr/rrsdispatch.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/randr/rrsdispatch.c b/randr/rrsdispatch.c
+index 9968c7f..5af8fec 100644
+--- a/randr/rrsdispatch.c
++++ b/randr/rrsdispatch.c
+@@ -27,6 +27,7 @@ SProcRRQueryVersion(ClientPtr client)
+ {
+ REQUEST(xRRQueryVersionReq);
+
++ REQUEST_SIZE_MATCH(xRRQueryVersionReq);
+ swaps(&stuff->length);
+ swapl(&stuff->majorVersion);
+ swapl(&stuff->minorVersion);
+@@ -38,6 +39,7 @@ SProcRRGetScreenInfo(ClientPtr client)
+ {
+ REQUEST(xRRGetScreenInfoReq);
+
++ REQUEST_SIZE_MATCH(xRRGetScreenInfoReq);
+ swaps(&stuff->length);
+ swapl(&stuff->window);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+@@ -69,6 +71,7 @@ SProcRRSelectInput(ClientPtr client)
+ {
+ REQUEST(xRRSelectInputReq);
+
++ REQUEST_SIZE_MATCH(xRRSelectInputReq);
+ swaps(&stuff->length);
+ swapl(&stuff->window);
+ swaps(&stuff->enable);
+@@ -152,6 +155,7 @@ SProcRRConfigureOutputProperty(ClientPtr client)
+ {
+ REQUEST(xRRConfigureOutputPropertyReq);
+
++ REQUEST_AT_LEAST_SIZE(xRRConfigureOutputPropertyReq);
+ swaps(&stuff->length);
+ swapl(&stuff->output);
+ swapl(&stuff->property);
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0012-render-check-request-size-before-reading-it-CVE-2014.patch b/patches/source/xorg-server/patch/xorg-server/0012-render-check-request-size-before-reading-it-CVE-2014.patch
new file mode 100644
index 000000000..5984f54eb
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0012-render-check-request-size-before-reading-it-CVE-2014.patch
@@ -0,0 +1,37 @@
+From ae07a61a956c1f0ec57502cc50fbab50c78fc675 Mon Sep 17 00:00:00 2001
+From: Julien Cristau <jcristau@debian.org>
+Date: Tue, 28 Oct 2014 10:30:04 +0100
+Subject: [PATCH 12/31] render: check request size before reading it
+ [CVE-2014-8100 1/2]
+
+Otherwise we may be reading outside of the client request.
+
+Signed-off-by: Julien Cristau <jcristau@debian.org>
+Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ render/render.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/render/render.c b/render/render.c
+index 51f75ae..ce03b13 100644
+--- a/render/render.c
++++ b/render/render.c
+@@ -276,11 +276,11 @@ ProcRenderQueryVersion(ClientPtr client)
+
+ REQUEST(xRenderQueryVersionReq);
+
++ REQUEST_SIZE_MATCH(xRenderQueryVersionReq);
++
+ pRenderClient->major_version = stuff->majorVersion;
+ pRenderClient->minor_version = stuff->minorVersion;
+
+- REQUEST_SIZE_MATCH(xRenderQueryVersionReq);
+-
+ if ((stuff->majorVersion * 1000 + stuff->minorVersion) <
+ (SERVER_RENDER_MAJOR_VERSION * 1000 + SERVER_RENDER_MINOR_VERSION)) {
+ rep.majorVersion = stuff->majorVersion;
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0013-render-unvalidated-lengths-in-Render-extn.-swapped-p.patch b/patches/source/xorg-server/patch/xorg-server/0013-render-unvalidated-lengths-in-Render-extn.-swapped-p.patch
new file mode 100644
index 000000000..71e487f7a
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0013-render-unvalidated-lengths-in-Render-extn.-swapped-p.patch
@@ -0,0 +1,141 @@
+From 15b22df9df2006d752ce756e6529af47697d0bb8 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sun, 26 Jan 2014 19:51:29 -0800
+Subject: [PATCH 13/31] render: unvalidated lengths in Render extn. swapped
+ procs [CVE-2014-8100 2/2]
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ render/render.c | 16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
+
+diff --git a/render/render.c b/render/render.c
+index ce03b13..4e47efd 100644
+--- a/render/render.c
++++ b/render/render.c
+@@ -1995,7 +1995,7 @@ static int
+ SProcRenderQueryVersion(ClientPtr client)
+ {
+ REQUEST(xRenderQueryVersionReq);
+-
++ REQUEST_SIZE_MATCH(xRenderQueryVersionReq);
+ swaps(&stuff->length);
+ swapl(&stuff->majorVersion);
+ swapl(&stuff->minorVersion);
+@@ -2006,6 +2006,7 @@ static int
+ SProcRenderQueryPictFormats(ClientPtr client)
+ {
+ REQUEST(xRenderQueryPictFormatsReq);
++ REQUEST_SIZE_MATCH(xRenderQueryPictFormatsReq);
+ swaps(&stuff->length);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+ }
+@@ -2014,6 +2015,7 @@ static int
+ SProcRenderQueryPictIndexValues(ClientPtr client)
+ {
+ REQUEST(xRenderQueryPictIndexValuesReq);
++ REQUEST_AT_LEAST_SIZE(xRenderQueryPictIndexValuesReq);
+ swaps(&stuff->length);
+ swapl(&stuff->format);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+@@ -2029,6 +2031,7 @@ static int
+ SProcRenderCreatePicture(ClientPtr client)
+ {
+ REQUEST(xRenderCreatePictureReq);
++ REQUEST_AT_LEAST_SIZE(xRenderCreatePictureReq);
+ swaps(&stuff->length);
+ swapl(&stuff->pid);
+ swapl(&stuff->drawable);
+@@ -2042,6 +2045,7 @@ static int
+ SProcRenderChangePicture(ClientPtr client)
+ {
+ REQUEST(xRenderChangePictureReq);
++ REQUEST_AT_LEAST_SIZE(xRenderChangePictureReq);
+ swaps(&stuff->length);
+ swapl(&stuff->picture);
+ swapl(&stuff->mask);
+@@ -2053,6 +2057,7 @@ static int
+ SProcRenderSetPictureClipRectangles(ClientPtr client)
+ {
+ REQUEST(xRenderSetPictureClipRectanglesReq);
++ REQUEST_AT_LEAST_SIZE(xRenderSetPictureClipRectanglesReq);
+ swaps(&stuff->length);
+ swapl(&stuff->picture);
+ swaps(&stuff->xOrigin);
+@@ -2065,6 +2070,7 @@ static int
+ SProcRenderFreePicture(ClientPtr client)
+ {
+ REQUEST(xRenderFreePictureReq);
++ REQUEST_SIZE_MATCH(xRenderFreePictureReq);
+ swaps(&stuff->length);
+ swapl(&stuff->picture);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+@@ -2074,6 +2080,7 @@ static int
+ SProcRenderComposite(ClientPtr client)
+ {
+ REQUEST(xRenderCompositeReq);
++ REQUEST_SIZE_MATCH(xRenderCompositeReq);
+ swaps(&stuff->length);
+ swapl(&stuff->src);
+ swapl(&stuff->mask);
+@@ -2093,6 +2100,7 @@ static int
+ SProcRenderScale(ClientPtr client)
+ {
+ REQUEST(xRenderScaleReq);
++ REQUEST_SIZE_MATCH(xRenderScaleReq);
+ swaps(&stuff->length);
+ swapl(&stuff->src);
+ swapl(&stuff->dst);
+@@ -2193,6 +2201,7 @@ static int
+ SProcRenderCreateGlyphSet(ClientPtr client)
+ {
+ REQUEST(xRenderCreateGlyphSetReq);
++ REQUEST_SIZE_MATCH(xRenderCreateGlyphSetReq);
+ swaps(&stuff->length);
+ swapl(&stuff->gsid);
+ swapl(&stuff->format);
+@@ -2203,6 +2212,7 @@ static int
+ SProcRenderReferenceGlyphSet(ClientPtr client)
+ {
+ REQUEST(xRenderReferenceGlyphSetReq);
++ REQUEST_SIZE_MATCH(xRenderReferenceGlyphSetReq);
+ swaps(&stuff->length);
+ swapl(&stuff->gsid);
+ swapl(&stuff->existing);
+@@ -2213,6 +2223,7 @@ static int
+ SProcRenderFreeGlyphSet(ClientPtr client)
+ {
+ REQUEST(xRenderFreeGlyphSetReq);
++ REQUEST_SIZE_MATCH(xRenderFreeGlyphSetReq);
+ swaps(&stuff->length);
+ swapl(&stuff->glyphset);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+@@ -2227,6 +2238,7 @@ SProcRenderAddGlyphs(ClientPtr client)
+ xGlyphInfo *gi;
+
+ REQUEST(xRenderAddGlyphsReq);
++ REQUEST_AT_LEAST_SIZE(xRenderAddGlyphsReq);
+ swaps(&stuff->length);
+ swapl(&stuff->glyphset);
+ swapl(&stuff->nglyphs);
+@@ -2261,6 +2273,7 @@ static int
+ SProcRenderFreeGlyphs(ClientPtr client)
+ {
+ REQUEST(xRenderFreeGlyphsReq);
++ REQUEST_AT_LEAST_SIZE(xRenderFreeGlyphsReq);
+ swaps(&stuff->length);
+ swapl(&stuff->glyphset);
+ SwapRestL(stuff);
+@@ -2278,6 +2291,7 @@ SProcRenderCompositeGlyphs(ClientPtr client)
+ int size;
+
+ REQUEST(xRenderCompositeGlyphsReq);
++ REQUEST_AT_LEAST_SIZE(xRenderCompositeGlyphsReq);
+
+ switch (stuff->renderReqType) {
+ default:
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0014-xfixes-unvalidated-length-in-SProcXFixesSelectSelect.patch b/patches/source/xorg-server/patch/xorg-server/0014-xfixes-unvalidated-length-in-SProcXFixesSelectSelect.patch
new file mode 100644
index 000000000..b7264a127
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0014-xfixes-unvalidated-length-in-SProcXFixesSelectSelect.patch
@@ -0,0 +1,28 @@
+From a0564982917d62aaf1e12c76fb8f42b3f458dcc9 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sun, 26 Jan 2014 20:02:20 -0800
+Subject: [PATCH 14/31] xfixes: unvalidated length in
+ SProcXFixesSelectSelectionInput [CVE-2014-8102]
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ xfixes/select.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/xfixes/select.c b/xfixes/select.c
+index ee8ed6f..c5a68ca 100644
+--- a/xfixes/select.c
++++ b/xfixes/select.c
+@@ -201,6 +201,7 @@ SProcXFixesSelectSelectionInput(ClientPtr client)
+ {
+ REQUEST(xXFixesSelectSelectionInputReq);
+
++ REQUEST_SIZE_MATCH(xXFixesSelectSelectionInputReq);
+ swaps(&stuff->length);
+ swapl(&stuff->window);
+ swapl(&stuff->selection);
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0015-Add-request-length-checking-test-cases-for-some-Xinp.patch b/patches/source/xorg-server/patch/xorg-server/0015-Add-request-length-checking-test-cases-for-some-Xinp.patch
new file mode 100644
index 000000000..db80930ba
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0015-Add-request-length-checking-test-cases-for-some-Xinp.patch
@@ -0,0 +1,214 @@
+From cf226ef53fb26adf4860b52a713d47fd72ec8b26 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sun, 9 Feb 2014 21:27:27 -0800
+Subject: [PATCH 15/31] Add request length checking test cases for some Xinput
+ 1.x requests
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ configure.ac | 1 +
+ test/Makefile.am | 2 +-
+ test/xi1/Makefile.am | 34 +++++++++
+ test/xi1/protocol-xchangedevicecontrol.c | 122 +++++++++++++++++++++++++++++++
+ 4 files changed, 158 insertions(+), 1 deletion(-)
+ create mode 100644 test/xi1/Makefile.am
+ create mode 100644 test/xi1/protocol-xchangedevicecontrol.c
+
+diff --git a/configure.ac b/configure.ac
+index 6d92bca..02830dd 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2341,6 +2341,7 @@ hw/kdrive/fbdev/Makefile
+ hw/kdrive/linux/Makefile
+ hw/kdrive/src/Makefile
+ test/Makefile
++test/xi1/Makefile
+ test/xi2/Makefile
+ xserver.ent
+ xorg-server.pc
+diff --git a/test/Makefile.am b/test/Makefile.am
+index 6b96789..8cbcd9f 100644
+--- a/test/Makefile.am
++++ b/test/Makefile.am
+@@ -4,7 +4,7 @@ noinst_PROGRAMS = list string
+ if XORG
+ # Tests that require at least some DDX functions in order to fully link
+ # For now, requires xf86 ddx, could be adjusted to use another
+-SUBDIRS += xi2
++SUBDIRS += xi1 xi2
+ noinst_PROGRAMS += xkb input xtest misc fixes xfree86 hashtabletest os signal-logging
+ endif
+ check_LTLIBRARIES = libxservertest.la
+diff --git a/test/xi1/Makefile.am b/test/xi1/Makefile.am
+new file mode 100644
+index 0000000..907fa7a
+--- /dev/null
++++ b/test/xi1/Makefile.am
+@@ -0,0 +1,34 @@
++if ENABLE_UNIT_TESTS
++if HAVE_LD_WRAP
++noinst_PROGRAMS = \
++ protocol-xchangedevicecontrol
++
++TESTS=$(noinst_PROGRAMS)
++TESTS_ENVIRONMENT = $(XORG_MALLOC_DEBUG_ENV)
++
++AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@
++AM_CPPFLAGS = @XORG_INCS@ -I$(srcdir)/../xi2
++TEST_LDADD=../libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLX_SYS_LIBS)
++COMMON_SOURCES=$(srcdir)/../xi2/protocol-common.c
++
++if SPECIAL_DTRACE_OBJECTS
++TEST_LDADD += $(OS_LIB) $(DIX_LIB)
++endif
++
++protocol_xchangedevicecontrol_LDADD=$(TEST_LDADD)
++
++protocol_xchangedevicecontrol_LDFLAGS=$(AM_LDFLAGS) -Wl,-wrap,WriteToClient
++
++protocol_xchangedevicecontrol_SOURCES=$(COMMON_SOURCES) protocol-xchangedevicecontrol.c
++
++else
++# Print that xi1-tests were skipped (exit code 77 for automake test harness)
++TESTS = xi1-tests
++CLEANFILES = $(TESTS)
++
++xi1-tests:
++ @echo 'echo "ld -wrap support required for xi1 unit tests, skipping"' > $@
++ @echo 'exit 77' >> $@
++ $(AM_V_GEN)chmod +x $@
++endif
++endif
+diff --git a/test/xi1/protocol-xchangedevicecontrol.c b/test/xi1/protocol-xchangedevicecontrol.c
+new file mode 100644
+index 0000000..8e638b2
+--- /dev/null
++++ b/test/xi1/protocol-xchangedevicecontrol.c
+@@ -0,0 +1,122 @@
++/**
++ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this software and associated documentation files (the "Software"),
++ * to deal in the Software without restriction, including without limitation
++ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
++ * and/or sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice (including the next
++ * paragraph) shall be included in all copies or substantial portions of the
++ * Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++ * DEALINGS IN THE SOFTWARE.
++ */
++
++#ifdef HAVE_DIX_CONFIG_H
++#include <dix-config.h>
++#endif
++
++/*
++ * Protocol testing for ChangeDeviceControl request.
++ */
++#include <stdint.h>
++#include <X11/X.h>
++#include <X11/Xproto.h>
++#include <X11/extensions/XIproto.h>
++#include "inputstr.h"
++#include "chgdctl.h"
++
++#include "protocol-common.h"
++
++static ClientRec client_request;
++
++static void
++reply_ChangeDeviceControl(ClientPtr client, int len, char *data, void *userdata)
++{
++ xChangeDeviceControlReply *rep = (xChangeDeviceControlReply *) data;
++
++ if (client->swapped) {
++ swapl(&rep->length);
++ swaps(&rep->sequenceNumber);
++ }
++
++ reply_check_defaults(rep, len, ChangeDeviceControl);
++
++ /* XXX: check status code in reply */
++}
++
++static void
++request_ChangeDeviceControl(ClientPtr client, xChangeDeviceControlReq * req,
++ xDeviceCtl *ctl, int error)
++{
++ int rc;
++
++ client_request.req_len = req->length;
++ rc = ProcXChangeDeviceControl(&client_request);
++ assert(rc == error);
++
++ /* XXX: ChangeDeviceControl doesn't seem to fill in errorValue to check */
++
++ client_request.swapped = TRUE;
++ swaps(&req->length);
++ swaps(&req->control);
++ swaps(&ctl->length);
++ swaps(&ctl->control);
++ /* XXX: swap other contents of ctl, depending on type */
++ rc = SProcXChangeDeviceControl(&client_request);
++ assert(rc == error);
++}
++
++static unsigned char *data[4096]; /* the request buffer */
++
++static void
++test_ChangeDeviceControl(void)
++{
++ xChangeDeviceControlReq *request = (xChangeDeviceControlReq *) data;
++ xDeviceCtl *control = (xDeviceCtl *) (&request[1]);
++
++ request_init(request, ChangeDeviceControl);
++
++ reply_handler = reply_ChangeDeviceControl;
++
++ client_request = init_client(request->length, request);
++
++ printf("Testing invalid lengths:\n");
++ printf(" -- no control struct\n");
++ request_ChangeDeviceControl(&client_request, request, control, BadLength);
++
++ printf(" -- xDeviceResolutionCtl\n");
++ request_init(request, ChangeDeviceControl);
++ request->control = DEVICE_RESOLUTION;
++ control->length = (sizeof(xDeviceResolutionCtl) >> 2);
++ request->length += control->length - 2;
++ request_ChangeDeviceControl(&client_request, request, control, BadLength);
++
++ printf(" -- xDeviceEnableCtl\n");
++ request_init(request, ChangeDeviceControl);
++ request->control = DEVICE_ENABLE;
++ control->length = (sizeof(xDeviceEnableCtl) >> 2);
++ request->length += control->length - 2;
++ request_ChangeDeviceControl(&client_request, request, control, BadLength);
++
++ /* XXX: Test functionality! */
++}
++
++int
++main(int argc, char **argv)
++{
++ init_simple();
++
++ test_ChangeDeviceControl();
++
++ return 0;
++}
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0016-Add-request-length-checking-test-cases-for-some-Xinp.patch b/patches/source/xorg-server/patch/xorg-server/0016-Add-request-length-checking-test-cases-for-some-Xinp.patch
new file mode 100644
index 000000000..03740a169
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0016-Add-request-length-checking-test-cases-for-some-Xinp.patch
@@ -0,0 +1,90 @@
+From 6aec61444897d54260df597785c9b215ac70a734 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sun, 9 Feb 2014 21:28:05 -0800
+Subject: [PATCH 16/31] Add request length checking test cases for some Xinput
+ 2.x requests
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ test/xi2/protocol-xigetclientpointer.c | 5 +++++
+ test/xi2/protocol-xipassivegrabdevice.c | 8 ++++++++
+ test/xi2/protocol-xiquerypointer.c | 4 ++++
+ test/xi2/protocol-xiwarppointer.c | 3 +++
+ 4 files changed, 20 insertions(+)
+
+diff --git a/test/xi2/protocol-xigetclientpointer.c b/test/xi2/protocol-xigetclientpointer.c
+index 28eb8d3..570c53e 100644
+--- a/test/xi2/protocol-xigetclientpointer.c
++++ b/test/xi2/protocol-xigetclientpointer.c
+@@ -124,6 +124,11 @@ test_XIGetClientPointer(void)
+ request.win = INVALID_WINDOW_ID;
+ request_XIGetClientPointer(&client_request, &request, BadWindow);
+
++ printf("Testing invalid length\n");
++ client_request.req_len -= 4;
++ request_XIGetClientPointer(&client_request, &request, BadLength);
++ client_request.req_len += 4;
++
+ test_data.cp_is_set = FALSE;
+
+ printf("Testing window None, unset ClientPointer.\n");
+diff --git a/test/xi2/protocol-xipassivegrabdevice.c b/test/xi2/protocol-xipassivegrabdevice.c
+index 84b386b..d0b9004 100644
+--- a/test/xi2/protocol-xipassivegrabdevice.c
++++ b/test/xi2/protocol-xipassivegrabdevice.c
+@@ -138,6 +138,7 @@ request_XIPassiveGrabDevice(ClientPtr client, xXIPassiveGrabDeviceReq * req,
+ int rc;
+ int modifiers;
+
++ client_request.req_len = req->length;
+ rc = ProcXIPassiveGrabDevice(&client_request);
+ assert(rc == error);
+
+@@ -188,6 +189,13 @@ test_XIPassiveGrabDevice(void)
+ request_XIPassiveGrabDevice(&client_request, request, BadDevice,
+ request->deviceid);
+
++ printf("Testing invalid length\n");
++ request->length -= 2;
++ request_XIPassiveGrabDevice(&client_request, request, BadLength,
++ client_request.errorValue);
++ /* re-init request since swapped length test leaves some values swapped */
++ request_init(request, XIPassiveGrabDevice);
++ request->grab_window = CLIENT_WINDOW_ID;
+ request->deviceid = XIAllMasterDevices;
+
+ printf("Testing invalid grab types\n");
+diff --git a/test/xi2/protocol-xiquerypointer.c b/test/xi2/protocol-xiquerypointer.c
+index fc66b64..c0421f6 100644
+--- a/test/xi2/protocol-xiquerypointer.c
++++ b/test/xi2/protocol-xiquerypointer.c
+@@ -201,6 +201,10 @@ test_XIQueryPointer(void)
+ test_data.dev = devices.mouse;
+ request.deviceid = devices.mouse->id;
+ request_XIQueryPointer(&client_request, &request, Success);
++
++ /* test REQUEST_SIZE_MATCH */
++ client_request.req_len -= 4;
++ request_XIQueryPointer(&client_request, &request, BadLength);
+ }
+
+ int
+diff --git a/test/xi2/protocol-xiwarppointer.c b/test/xi2/protocol-xiwarppointer.c
+index f7986c1..3aaaae6 100644
+--- a/test/xi2/protocol-xiwarppointer.c
++++ b/test/xi2/protocol-xiwarppointer.c
+@@ -198,6 +198,9 @@ test_XIWarpPointer(void)
+ request_XIWarpPointer(&client_request, &request, Success);
+
+ /* FIXME: src_x/y checks */
++
++ client_request.req_len -= 2; /* invalid length */
++ request_XIWarpPointer(&client_request, &request, BadLength);
+ }
+
+ int
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0017-Add-REQUEST_FIXED_SIZE-testcases-to-test-misc.c.patch b/patches/source/xorg-server/patch/xorg-server/0017-Add-REQUEST_FIXED_SIZE-testcases-to-test-misc.c.patch
new file mode 100644
index 000000000..1e9580e63
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0017-Add-REQUEST_FIXED_SIZE-testcases-to-test-misc.c.patch
@@ -0,0 +1,75 @@
+From 04e6f8dff7e989f0181a1a8fb45c3bb918ee20d9 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sun, 9 Feb 2014 22:42:47 -0800
+Subject: [PATCH 17/31] Add REQUEST_FIXED_SIZE testcases to test/misc.c
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ test/misc.c | 37 +++++++++++++++++++++++++++++++++++++
+ 1 file changed, 37 insertions(+)
+
+diff --git a/test/misc.c b/test/misc.c
+index dd792e6..66330a1 100644
+--- a/test/misc.c
++++ b/test/misc.c
+@@ -28,6 +28,8 @@
+ #include <stdint.h>
+ #include "misc.h"
+ #include "scrnintstr.h"
++#include "dix.h"
++#include "dixstruct.h"
+
+ ScreenInfo screenInfo;
+
+@@ -155,11 +157,46 @@ dix_update_desktop_dimensions(void)
+ assert_dimensions(-w2, -h2, w2, h2);
+ }
+
++static int
++dix_request_fixed_size_overflow(ClientRec *client)
++{
++ xReq req = { 0 };
++
++ client->req_len = req.length = 1;
++ REQUEST_FIXED_SIZE(req, SIZE_MAX);
++ return Success;
++}
++
++static int
++dix_request_fixed_size_match(ClientRec *client)
++{
++ xReq req = { 0 };
++
++ client->req_len = req.length = 9;
++ REQUEST_FIXED_SIZE(req, 30);
++ return Success;
++}
++
++static void
++dix_request_size_checks(void)
++{
++ ClientRec client = { 0 };
++ int rc;
++
++ rc = dix_request_fixed_size_overflow(&client);
++ assert(rc == BadLength);
++
++ rc = dix_request_fixed_size_match(&client);
++ assert(rc == Success);
++}
++
++
+ int
+ main(int argc, char **argv)
+ {
+ dix_version_compare();
+ dix_update_desktop_dimensions();
++ dix_request_size_checks();
+
+ return 0;
+ }
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0018-glx-Be-more-paranoid-about-variable-length-requests-.patch b/patches/source/xorg-server/patch/xorg-server/0018-glx-Be-more-paranoid-about-variable-length-requests-.patch
new file mode 100644
index 000000000..a39ebd1bb
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0018-glx-Be-more-paranoid-about-variable-length-requests-.patch
@@ -0,0 +1,48 @@
+From 352687dcfcfc35fe3817c9baf1bc891401165605 Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Mon, 10 Nov 2014 12:13:36 -0500
+Subject: [PATCH 18/31] glx: Be more paranoid about variable-length requests
+ [CVE-2014-8093 1/6]
+
+If the size computation routine returns -1 we should just reject the
+request outright. Clamping it to zero could give an attacker the
+opportunity to also mangle cmdlen in such a way that the subsequent
+length check passes, and the request would get executed, thus passing
+data we wanted to reject to the renderer.
+
+Reviewed-by: Keith Packard <keithp@keithp.com>
+Reviewed-by: Julien Cristau <jcristau@debian.org>
+Reviewed-by: Michal Srb <msrb@suse.com>
+Reviewed-by: Andy Ritger <aritger@nvidia.com>
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ glx/glxcmds.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/glx/glxcmds.c b/glx/glxcmds.c
+index c1f4e22..5b50785 100644
+--- a/glx/glxcmds.c
++++ b/glx/glxcmds.c
+@@ -2008,7 +2008,7 @@ __glXDisp_Render(__GLXclientState * cl, GLbyte * pc)
+ extra = (*entry.varsize) (pc + __GLX_RENDER_HDR_SIZE,
+ client->swapped);
+ if (extra < 0) {
+- extra = 0;
++ return BadLength;
+ }
+ if (cmdlen != __GLX_PAD(entry.bytes + extra)) {
+ return BadLength;
+@@ -2125,7 +2125,7 @@ __glXDisp_RenderLarge(__GLXclientState * cl, GLbyte * pc)
+ extra = (*entry.varsize) (pc + __GLX_RENDER_LARGE_HDR_SIZE,
+ client->swapped);
+ if (extra < 0) {
+- extra = 0;
++ return BadLength;
+ }
+ /* large command's header is 4 bytes longer, so add 4 */
+ if (cmdlen != __GLX_PAD(entry.bytes + 4 + extra)) {
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0019-glx-Be-more-strict-about-rejecting-invalid-image-siz.patch b/patches/source/xorg-server/patch/xorg-server/0019-glx-Be-more-strict-about-rejecting-invalid-image-siz.patch
new file mode 100644
index 000000000..b91c6d674
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0019-glx-Be-more-strict-about-rejecting-invalid-image-siz.patch
@@ -0,0 +1,166 @@
+From 8580856661e09a5bdc9b9b44dd5304656d95666c Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Mon, 10 Nov 2014 12:13:37 -0500
+Subject: [PATCH 19/31] glx: Be more strict about rejecting invalid image sizes
+ [CVE-2014-8093 2/6]
+
+Before this we'd just clamp the image size to 0, which was just
+hideously stupid; if the parameters were such that they'd overflow an
+integer, you'd allocate a small buffer, then pass huge values into (say)
+ReadPixels, and now you're scribbling over arbitrary server memory.
+
+Reviewed-by: Keith Packard <keithp@keithp.com>
+Reviewed-by: Julien Cristau <jcristau@debian.org>
+Reviewed-by: Michal Srb <msrb@suse.com>
+Reviewed-by: Andy Ritger <aritger@nvidia.com>
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ glx/singlepix.c | 16 ++++++++--------
+ glx/singlepixswap.c | 16 ++++++++--------
+ 2 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/glx/singlepix.c b/glx/singlepix.c
+index fb6868d..4137798 100644
+--- a/glx/singlepix.c
++++ b/glx/singlepix.c
+@@ -69,7 +69,7 @@ __glXDisp_ReadPixels(__GLXclientState * cl, GLbyte * pc)
+ lsbFirst = *(GLboolean *) (pc + 25);
+ compsize = __glReadPixels_size(format, type, width, height);
+ if (compsize < 0)
+- compsize = 0;
++ return BadLength;
+
+ CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes));
+ CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_LSB_FIRST, lsbFirst));
+@@ -134,7 +134,7 @@ __glXDisp_GetTexImage(__GLXclientState * cl, GLbyte * pc)
+ compsize =
+ __glGetTexImage_size(target, level, format, type, width, height, depth);
+ if (compsize < 0)
+- compsize = 0;
++ return BadLength;
+
+ CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes));
+ __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
+@@ -232,9 +232,9 @@ GetSeparableFilter(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
+ compsize2 = __glGetTexImage_size(target, 1, format, type, height, 1, 1);
+
+ if (compsize < 0)
+- compsize = 0;
++ return BadLength;
+ if (compsize2 < 0)
+- compsize2 = 0;
++ return BadLength;
+ compsize = __GLX_PAD(compsize);
+ compsize2 = __GLX_PAD(compsize2);
+
+@@ -315,7 +315,7 @@ GetConvolutionFilter(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
+ */
+ compsize = __glGetTexImage_size(target, 1, format, type, width, height, 1);
+ if (compsize < 0)
+- compsize = 0;
++ return BadLength;
+
+ CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes));
+ __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
+@@ -386,7 +386,7 @@ GetHistogram(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
+ */
+ compsize = __glGetTexImage_size(target, 1, format, type, width, 1, 1);
+ if (compsize < 0)
+- compsize = 0;
++ return BadLength;
+
+ CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes));
+ __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
+@@ -447,7 +447,7 @@ GetMinmax(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
+
+ compsize = __glGetTexImage_size(target, 1, format, type, 2, 1, 1);
+ if (compsize < 0)
+- compsize = 0;
++ return BadLength;
+
+ CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes));
+ __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
+@@ -513,7 +513,7 @@ GetColorTable(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
+ */
+ compsize = __glGetTexImage_size(target, 1, format, type, width, 1, 1);
+ if (compsize < 0)
+- compsize = 0;
++ return BadLength;
+
+ CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes));
+ __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
+diff --git a/glx/singlepixswap.c b/glx/singlepixswap.c
+index c777cea..16ea408 100644
+--- a/glx/singlepixswap.c
++++ b/glx/singlepixswap.c
+@@ -79,7 +79,7 @@ __glXDispSwap_ReadPixels(__GLXclientState * cl, GLbyte * pc)
+ lsbFirst = *(GLboolean *) (pc + 25);
+ compsize = __glReadPixels_size(format, type, width, height);
+ if (compsize < 0)
+- compsize = 0;
++ return BadLength;
+
+ CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes));
+ CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_LSB_FIRST, lsbFirst));
+@@ -155,7 +155,7 @@ __glXDispSwap_GetTexImage(__GLXclientState * cl, GLbyte * pc)
+ compsize =
+ __glGetTexImage_size(target, level, format, type, width, height, depth);
+ if (compsize < 0)
+- compsize = 0;
++ return BadLength;
+
+ CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes));
+ __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
+@@ -267,9 +267,9 @@ GetSeparableFilter(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
+ compsize2 = __glGetTexImage_size(target, 1, format, type, height, 1, 1);
+
+ if (compsize < 0)
+- compsize = 0;
++ return BadLength;
+ if (compsize2 < 0)
+- compsize2 = 0;
++ return BadLength;
+ compsize = __GLX_PAD(compsize);
+ compsize2 = __GLX_PAD(compsize2);
+
+@@ -358,7 +358,7 @@ GetConvolutionFilter(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
+ */
+ compsize = __glGetTexImage_size(target, 1, format, type, width, height, 1);
+ if (compsize < 0)
+- compsize = 0;
++ return BadLength;
+
+ CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes));
+ __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
+@@ -437,7 +437,7 @@ GetHistogram(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
+ */
+ compsize = __glGetTexImage_size(target, 1, format, type, width, 1, 1);
+ if (compsize < 0)
+- compsize = 0;
++ return BadLength;
+
+ CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes));
+ __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
+@@ -505,7 +505,7 @@ GetMinmax(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
+
+ compsize = __glGetTexImage_size(target, 1, format, type, 2, 1, 1);
+ if (compsize < 0)
+- compsize = 0;
++ return BadLength;
+
+ CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes));
+ __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
+@@ -577,7 +577,7 @@ GetColorTable(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
+ */
+ compsize = __glGetTexImage_size(target, 1, format, type, width, 1, 1);
+ if (compsize < 0)
+- compsize = 0;
++ return BadLength;
+
+ CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes));
+ __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0020-glx-Additional-paranoia-in-__glXGetAnswerBuffer-__GL.patch b/patches/source/xorg-server/patch/xorg-server/0020-glx-Additional-paranoia-in-__glXGetAnswerBuffer-__GL.patch
new file mode 100644
index 000000000..d7ca0f388
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0020-glx-Additional-paranoia-in-__glXGetAnswerBuffer-__GL.patch
@@ -0,0 +1,60 @@
+From 9cf40ac3793ab273d9c6c94fca93daf17ebb8881 Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Mon, 10 Nov 2014 12:13:38 -0500
+Subject: [PATCH 20/31] glx: Additional paranoia in __glXGetAnswerBuffer /
+ __GLX_GET_ANSWER_BUFFER (v2) [CVE-2014-8093 3/6]
+
+If the computed reply size is negative, something went wrong, treat it
+as an error.
+
+v2: Be more careful about size_t being unsigned (Matthieu Herrb)
+v3: SIZE_MAX not SIZE_T_MAX (Alan Coopersmith)
+
+Reviewed-by: Julien Cristau <jcristau@debian.org>
+Reviewed-by: Michal Srb <msrb@suse.com>
+Reviewed-by: Andy Ritger <aritger@nvidia.com>
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ glx/indirect_util.c | 7 ++++++-
+ glx/unpack.h | 3 ++-
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/glx/indirect_util.c b/glx/indirect_util.c
+index a30b1f8..7431d43 100644
+--- a/glx/indirect_util.c
++++ b/glx/indirect_util.c
+@@ -81,9 +81,14 @@ __glXGetAnswerBuffer(__GLXclientState * cl, size_t required_size,
+ const unsigned mask = alignment - 1;
+
+ if (local_size < required_size) {
+- const size_t worst_case_size = required_size + alignment;
++ size_t worst_case_size;
+ intptr_t temp_buf;
+
++ if (required_size < SIZE_MAX - alignment)
++ worst_case_size = required_size + alignment;
++ else
++ return NULL;
++
+ if (cl->returnBufSize < worst_case_size) {
+ void *temp = realloc(cl->returnBuf, worst_case_size);
+
+diff --git a/glx/unpack.h b/glx/unpack.h
+index 52fba74..2b1ebcf 100644
+--- a/glx/unpack.h
++++ b/glx/unpack.h
+@@ -83,7 +83,8 @@ extern xGLXSingleReply __glXReply;
+ ** pointer.
+ */
+ #define __GLX_GET_ANSWER_BUFFER(res,cl,size,align) \
+- if ((size) > sizeof(answerBuffer)) { \
++ if (size < 0) return BadLength; \
++ else if ((size) > sizeof(answerBuffer)) { \
+ int bump; \
+ if ((cl)->returnBufSize < (size)+(align)) { \
+ (cl)->returnBuf = (GLbyte*)realloc((cl)->returnBuf, \
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0021-glx-Fix-image-size-computation-for-EXT_texture_integ.patch b/patches/source/xorg-server/patch/xorg-server/0021-glx-Fix-image-size-computation-for-EXT_texture_integ.patch
new file mode 100644
index 000000000..bfc8d4638
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0021-glx-Fix-image-size-computation-for-EXT_texture_integ.patch
@@ -0,0 +1,60 @@
+From bf0ab1bee4d590fbfaa2fd4e56857b019898e21a Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Mon, 10 Nov 2014 12:13:39 -0500
+Subject: [PATCH 21/31] glx: Fix image size computation for EXT_texture_integer
+ [CVE-2014-8098 1/8]
+
+Without this we'd reject the request with BadLength. Note that some old
+versions of Mesa had a bug in the same place, and would _send_ zero
+bytes of image data; these will now be rejected, correctly.
+
+Reviewed-by: Keith Packard <keithp@keithp.com>
+Reviewed-by: Julien Cristau <jcristau@debian.org>
+Reviewed-by: Michal Srb <msrb@suse.com>
+Reviewed-by: Andy Ritger <aritger@nvidia.com>
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ glx/rensize.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/glx/rensize.c b/glx/rensize.c
+index bcc3a53..10f76bc 100644
+--- a/glx/rensize.c
++++ b/glx/rensize.c
+@@ -224,6 +224,11 @@ __glXImageSize(GLenum format, GLenum type, GLenum target,
+ case GL_ALPHA:
+ case GL_LUMINANCE:
+ case GL_INTENSITY:
++ case GL_RED_INTEGER_EXT:
++ case GL_GREEN_INTEGER_EXT:
++ case GL_BLUE_INTEGER_EXT:
++ case GL_ALPHA_INTEGER_EXT:
++ case GL_LUMINANCE_INTEGER_EXT:
+ elementsPerGroup = 1;
+ break;
+ case GL_422_EXT:
+@@ -234,14 +239,19 @@ __glXImageSize(GLenum format, GLenum type, GLenum target,
+ case GL_DEPTH_STENCIL_MESA:
+ case GL_YCBCR_MESA:
+ case GL_LUMINANCE_ALPHA:
++ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
+ elementsPerGroup = 2;
+ break;
+ case GL_RGB:
+ case GL_BGR:
++ case GL_RGB_INTEGER_EXT:
++ case GL_BGR_INTEGER_EXT:
+ elementsPerGroup = 3;
+ break;
+ case GL_RGBA:
+ case GL_BGRA:
++ case GL_RGBA_INTEGER_EXT:
++ case GL_BGRA_INTEGER_EXT:
+ case GL_ABGR_EXT:
+ elementsPerGroup = 4;
+ break;
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0022-glx-Add-safe_-add-mul-pad-v3-CVE-2014-8093-4-6.patch b/patches/source/xorg-server/patch/xorg-server/0022-glx-Add-safe_-add-mul-pad-v3-CVE-2014-8093-4-6.patch
new file mode 100644
index 000000000..baeba4781
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0022-glx-Add-safe_-add-mul-pad-v3-CVE-2014-8093-4-6.patch
@@ -0,0 +1,83 @@
+From 8a5685c7abbcd5185974bb29d94420bf348960a2 Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Mon, 10 Nov 2014 12:13:40 -0500
+Subject: [PATCH 22/31] glx: Add safe_{add,mul,pad} (v3) [CVE-2014-8093 4/6]
+
+These are paranoid about integer overflow, and will return -1 if their
+operation would overflow a (signed) integer or if either argument is
+negative.
+
+Note that RenderLarge requests are sized with a uint32_t so in principle
+this could be sketchy there, but dix limits bigreqs to 128M so you
+shouldn't ever notice, and honestly if you're sending more than 2G of
+rendering commands you're already doing something very wrong.
+
+v2: Use INT_MAX for consistency with the rest of the server (jcristau)
+v3: Reject negative arguments (anholt)
+
+Reviewed-by: Keith Packard <keithp@keithp.com>
+Reviewed-by: Julien Cristau <jcristau@debian.org>
+Reviewed-by: Michal Srb <msrb@suse.com>
+Reviewed-by: Andy Ritger <aritger@nvidia.com>
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ glx/glxserver.h | 41 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 41 insertions(+)
+
+diff --git a/glx/glxserver.h b/glx/glxserver.h
+index 1021aec..1bc398b 100644
+--- a/glx/glxserver.h
++++ b/glx/glxserver.h
+@@ -214,6 +214,47 @@ extern void glxSwapQueryServerStringReply(ClientPtr client,
+ * Routines for computing the size of variably-sized rendering commands.
+ */
+
++static _X_INLINE int
++safe_add(int a, int b)
++{
++ if (a < 0 || b < 0)
++ return -1;
++
++ if (INT_MAX - a < b)
++ return -1;
++
++ return a + b;
++}
++
++static _X_INLINE int
++safe_mul(int a, int b)
++{
++ if (a < 0 || b < 0)
++ return -1;
++
++ if (a == 0 || b == 0)
++ return 0;
++
++ if (a > INT_MAX / b)
++ return -1;
++
++ return a * b;
++}
++
++static _X_INLINE int
++safe_pad(int a)
++{
++ int ret;
++
++ if (a < 0)
++ return -1;
++
++ if ((ret = safe_add(a, 3)) < 0)
++ return -1;
++
++ return ret & (GLuint)~3;
++}
++
+ extern int __glXTypeSize(GLenum enm);
+ extern int __glXImageSize(GLenum format, GLenum type,
+ GLenum target, GLsizei w, GLsizei h, GLsizei d,
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0023-glx-Length-checking-for-GLXRender-requests-v2-CVE-20.patch b/patches/source/xorg-server/patch/xorg-server/0023-glx-Length-checking-for-GLXRender-requests-v2-CVE-20.patch
new file mode 100644
index 000000000..96de637aa
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0023-glx-Length-checking-for-GLXRender-requests-v2-CVE-20.patch
@@ -0,0 +1,76 @@
+From bce43e2e287096be4c737105fa12459ff2e052b2 Mon Sep 17 00:00:00 2001
+From: Julien Cristau <jcristau@debian.org>
+Date: Mon, 10 Nov 2014 12:13:41 -0500
+Subject: [PATCH 23/31] glx: Length checking for GLXRender requests (v2)
+ [CVE-2014-8098 2/8]
+
+v2:
+Remove can't-happen comparison for cmdlen < 0 (Michal Srb)
+
+Reviewed-by: Adam Jackson <ajax@redhat.com>
+Reviewed-by: Michal Srb <msrb@suse.com>
+Reviewed-by: Andy Ritger <aritger@nvidia.com>
+Signed-off-by: Julien Cristau <jcristau@debian.org>
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ glx/glxcmds.c | 21 ++++++++++-----------
+ 1 file changed, 10 insertions(+), 11 deletions(-)
+
+diff --git a/glx/glxcmds.c b/glx/glxcmds.c
+index 5b50785..969bf01 100644
+--- a/glx/glxcmds.c
++++ b/glx/glxcmds.c
+@@ -1971,7 +1971,7 @@ __glXDisp_Render(__GLXclientState * cl, GLbyte * pc)
+ left = (req->length << 2) - sz_xGLXRenderReq;
+ while (left > 0) {
+ __GLXrenderSizeData entry;
+- int extra;
++ int extra = 0;
+ __GLXdispatchRenderProcPtr proc;
+ int err;
+
+@@ -1990,6 +1990,9 @@ __glXDisp_Render(__GLXclientState * cl, GLbyte * pc)
+ cmdlen = hdr->length;
+ opcode = hdr->opcode;
+
++ if (left < cmdlen)
++ return BadLength;
++
+ /*
+ ** Check for core opcodes and grab entry data.
+ */
+@@ -2003,6 +2006,10 @@ __glXDisp_Render(__GLXclientState * cl, GLbyte * pc)
+ return __glXError(GLXBadRenderRequest);
+ }
+
++ if (cmdlen < entry.bytes) {
++ return BadLength;
++ }
++
+ if (entry.varsize) {
+ /* variable size command */
+ extra = (*entry.varsize) (pc + __GLX_RENDER_HDR_SIZE,
+@@ -2010,17 +2017,9 @@ __glXDisp_Render(__GLXclientState * cl, GLbyte * pc)
+ if (extra < 0) {
+ return BadLength;
+ }
+- if (cmdlen != __GLX_PAD(entry.bytes + extra)) {
+- return BadLength;
+- }
+ }
+- else {
+- /* constant size command */
+- if (cmdlen != __GLX_PAD(entry.bytes)) {
+- return BadLength;
+- }
+- }
+- if (left < cmdlen) {
++
++ if (cmdlen != safe_pad(safe_add(entry.bytes, extra))) {
+ return BadLength;
+ }
+
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0024-glx-Integer-overflow-protection-for-non-generated-re.patch b/patches/source/xorg-server/patch/xorg-server/0024-glx-Integer-overflow-protection-for-non-generated-re.patch
new file mode 100644
index 000000000..d8dfa82a2
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0024-glx-Integer-overflow-protection-for-non-generated-re.patch
@@ -0,0 +1,226 @@
+From 47ec44325195ae0655aa12310094799c595a0da2 Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Mon, 10 Nov 2014 12:13:42 -0500
+Subject: [PATCH 24/31] glx: Integer overflow protection for non-generated
+ render requests (v3) [CVE-2014-8093 5/6]
+
+v2:
+Fix constants in __glXMap2fReqSize (Michal Srb)
+Validate w/h/d for proxy targets too (Keith Packard)
+
+v3:
+Fix Map[12]Size to correctly reject order == 0 (Julien Cristau)
+
+Reviewed-by: Keith Packard <keithp@keithp.com>
+Reviewed-by: Michal Srb <msrb@suse.com>
+Reviewed-by: Andy Ritger <aritger@nvidia.com>
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ glx/rensize.c | 77 +++++++++++++++++++++++++++++++----------------------------
+ 1 file changed, 41 insertions(+), 36 deletions(-)
+
+diff --git a/glx/rensize.c b/glx/rensize.c
+index 10f76bc..6ee0f9c 100644
+--- a/glx/rensize.c
++++ b/glx/rensize.c
+@@ -43,19 +43,11 @@
+ (((a & 0xff000000U)>>24) | ((a & 0xff0000U)>>8) | \
+ ((a & 0xff00U)<<8) | ((a & 0xffU)<<24))
+
+-static int
+-Map1Size(GLint k, GLint order)
+-{
+- if (order <= 0 || k < 0)
+- return -1;
+- return k * order;
+-}
+-
+ int
+ __glXMap1dReqSize(const GLbyte * pc, Bool swap)
+ {
+ GLenum target;
+- GLint order, k;
++ GLint order;
+
+ target = *(GLenum *) (pc + 16);
+ order = *(GLint *) (pc + 20);
+@@ -63,15 +55,16 @@ __glXMap1dReqSize(const GLbyte * pc, Bool swap)
+ target = SWAPL(target);
+ order = SWAPL(order);
+ }
+- k = __glMap1d_size(target);
+- return 8 * Map1Size(k, order);
++ if (order < 1)
++ return -1;
++ return safe_mul(8, safe_mul(__glMap1d_size(target), order));
+ }
+
+ int
+ __glXMap1fReqSize(const GLbyte * pc, Bool swap)
+ {
+ GLenum target;
+- GLint order, k;
++ GLint order;
+
+ target = *(GLenum *) (pc + 0);
+ order = *(GLint *) (pc + 12);
+@@ -79,23 +72,24 @@ __glXMap1fReqSize(const GLbyte * pc, Bool swap)
+ target = SWAPL(target);
+ order = SWAPL(order);
+ }
+- k = __glMap1f_size(target);
+- return 4 * Map1Size(k, order);
++ if (order < 1)
++ return -1;
++ return safe_mul(4, safe_mul(__glMap1f_size(target), order));
+ }
+
+ static int
+ Map2Size(int k, int majorOrder, int minorOrder)
+ {
+- if (majorOrder <= 0 || minorOrder <= 0 || k < 0)
++ if (majorOrder < 1 || minorOrder < 1)
+ return -1;
+- return k * majorOrder * minorOrder;
++ return safe_mul(k, safe_mul(majorOrder, minorOrder));
+ }
+
+ int
+ __glXMap2dReqSize(const GLbyte * pc, Bool swap)
+ {
+ GLenum target;
+- GLint uorder, vorder, k;
++ GLint uorder, vorder;
+
+ target = *(GLenum *) (pc + 32);
+ uorder = *(GLint *) (pc + 36);
+@@ -105,15 +99,14 @@ __glXMap2dReqSize(const GLbyte * pc, Bool swap)
+ uorder = SWAPL(uorder);
+ vorder = SWAPL(vorder);
+ }
+- k = __glMap2d_size(target);
+- return 8 * Map2Size(k, uorder, vorder);
++ return safe_mul(8, Map2Size(__glMap2d_size(target), uorder, vorder));
+ }
+
+ int
+ __glXMap2fReqSize(const GLbyte * pc, Bool swap)
+ {
+ GLenum target;
+- GLint uorder, vorder, k;
++ GLint uorder, vorder;
+
+ target = *(GLenum *) (pc + 0);
+ uorder = *(GLint *) (pc + 12);
+@@ -123,8 +116,7 @@ __glXMap2fReqSize(const GLbyte * pc, Bool swap)
+ uorder = SWAPL(uorder);
+ vorder = SWAPL(vorder);
+ }
+- k = __glMap2f_size(target);
+- return 4 * Map2Size(k, uorder, vorder);
++ return safe_mul(4, Map2Size(__glMap2f_size(target), uorder, vorder));
+ }
+
+ /**
+@@ -175,14 +167,16 @@ __glXImageSize(GLenum format, GLenum type, GLenum target,
+ GLint bytesPerElement, elementsPerGroup, groupsPerRow;
+ GLint groupSize, rowSize, padding, imageSize;
+
++ if (w == 0 || h == 0 || d == 0)
++ return 0;
++
+ if (w < 0 || h < 0 || d < 0 ||
+ (type == GL_BITMAP &&
+ (format != GL_COLOR_INDEX && format != GL_STENCIL_INDEX))) {
+ return -1;
+ }
+- if (w == 0 || h == 0 || d == 0)
+- return 0;
+
++ /* proxy targets have no data */
+ switch (target) {
+ case GL_PROXY_TEXTURE_1D:
+ case GL_PROXY_TEXTURE_2D:
+@@ -199,6 +193,12 @@ __glXImageSize(GLenum format, GLenum type, GLenum target,
+ return 0;
+ }
+
++ /* real data has to have real sizes */
++ if (imageHeight < 0 || rowLength < 0 || skipImages < 0 || skipRows < 0)
++ return -1;
++ if (alignment != 1 && alignment != 2 && alignment != 4 && alignment != 8)
++ return -1;
++
+ if (type == GL_BITMAP) {
+ if (rowLength > 0) {
+ groupsPerRow = rowLength;
+@@ -207,11 +207,14 @@ __glXImageSize(GLenum format, GLenum type, GLenum target,
+ groupsPerRow = w;
+ }
+ rowSize = bits_to_bytes(groupsPerRow);
++ if (rowSize < 0)
++ return -1;
+ padding = (rowSize % alignment);
+ if (padding) {
+ rowSize += alignment - padding;
+ }
+- return ((h + skipRows) * rowSize);
++
++ return safe_mul(safe_add(h, skipRows), rowSize);
+ }
+ else {
+ switch (format) {
+@@ -303,6 +306,7 @@ __glXImageSize(GLenum format, GLenum type, GLenum target,
+ default:
+ return -1;
+ }
++ /* known safe by the switches above, not checked */
+ groupSize = bytesPerElement * elementsPerGroup;
+ if (rowLength > 0) {
+ groupsPerRow = rowLength;
+@@ -310,18 +314,21 @@ __glXImageSize(GLenum format, GLenum type, GLenum target,
+ else {
+ groupsPerRow = w;
+ }
+- rowSize = groupsPerRow * groupSize;
++
++ if ((rowSize = safe_mul(groupsPerRow, groupSize)) < 0)
++ return -1;
+ padding = (rowSize % alignment);
+ if (padding) {
+ rowSize += alignment - padding;
+ }
+- if (imageHeight > 0) {
+- imageSize = (imageHeight + skipRows) * rowSize;
+- }
+- else {
+- imageSize = (h + skipRows) * rowSize;
+- }
+- return ((d + skipImages) * imageSize);
++
++ if (imageHeight > 0)
++ h = imageHeight;
++ h = safe_add(h, skipRows);
++
++ imageSize = safe_mul(h, rowSize);
++
++ return safe_mul(safe_add(d, skipImages), imageSize);
+ }
+ }
+
+@@ -445,9 +452,7 @@ __glXSeparableFilter2DReqSize(const GLbyte * pc, Bool swap)
+ /* XXX Should rowLength be used for either or both image? */
+ image1size = __glXImageSize(format, type, 0, w, 1, 1,
+ 0, rowLength, 0, 0, alignment);
+- image1size = __GLX_PAD(image1size);
+ image2size = __glXImageSize(format, type, 0, h, 1, 1,
+ 0, rowLength, 0, 0, alignment);
+- return image1size + image2size;
+-
++ return safe_add(safe_pad(image1size), image2size);
+ }
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0025-glx-Top-level-length-checking-for-swapped-VendorPriv.patch b/patches/source/xorg-server/patch/xorg-server/0025-glx-Top-level-length-checking-for-swapped-VendorPriv.patch
new file mode 100644
index 000000000..202dcaf14
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0025-glx-Top-level-length-checking-for-swapped-VendorPriv.patch
@@ -0,0 +1,52 @@
+From 4b8686ae33f68a1db609654d1b4ff9b20dcafd8a Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Mon, 10 Nov 2014 12:13:44 -0500
+Subject: [PATCH 25/31] glx: Top-level length checking for swapped
+ VendorPrivate requests [CVE-2014-8098 4/8]
+
+Reviewed-by: Keith Packard <keithp@keithp.com>
+Reviewed-by: Julien Cristau <jcristau@debian.org>
+Reviewed-by: Michal Srb <msrb@suse.com>
+Reviewed-by: Andy Ritger <aritger@nvidia.com>
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ glx/glxcmdsswap.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/glx/glxcmdsswap.c b/glx/glxcmdsswap.c
+index 43f88d3..6de14d2 100644
+--- a/glx/glxcmdsswap.c
++++ b/glx/glxcmdsswap.c
+@@ -962,11 +962,13 @@ __glXDispSwap_RenderLarge(__GLXclientState * cl, GLbyte * pc)
+ int
+ __glXDispSwap_VendorPrivate(__GLXclientState * cl, GLbyte * pc)
+ {
++ ClientPtr client = cl->client;
+ xGLXVendorPrivateReq *req;
+ GLint vendorcode;
+ __GLXdispatchVendorPrivProcPtr proc;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
++ REQUEST_AT_LEAST_SIZE(xGLXVendorPrivateReq);
+
+ req = (xGLXVendorPrivateReq *) pc;
+ __GLX_SWAP_SHORT(&req->length);
+@@ -989,11 +991,13 @@ __glXDispSwap_VendorPrivate(__GLXclientState * cl, GLbyte * pc)
+ int
+ __glXDispSwap_VendorPrivateWithReply(__GLXclientState * cl, GLbyte * pc)
+ {
++ ClientPtr client = cl->client;
+ xGLXVendorPrivateWithReplyReq *req;
+ GLint vendorcode;
+ __GLXdispatchVendorPrivProcPtr proc;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
++ REQUEST_AT_LEAST_SIZE(xGLXVendorPrivateWithReplyReq);
+
+ req = (xGLXVendorPrivateWithReplyReq *) pc;
+ __GLX_SWAP_SHORT(&req->length);
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0026-glx-Request-length-checks-for-SetClientInfoARB-CVE-2.patch b/patches/source/xorg-server/patch/xorg-server/0026-glx-Request-length-checks-for-SetClientInfoARB-CVE-2.patch
new file mode 100644
index 000000000..29c189614
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0026-glx-Request-length-checks-for-SetClientInfoARB-CVE-2.patch
@@ -0,0 +1,75 @@
+From 84f275b466fa69d14d91b2ad1353d05f642d3808 Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Mon, 10 Nov 2014 12:13:45 -0500
+Subject: [PATCH 26/31] glx: Request length checks for SetClientInfoARB
+ [CVE-2014-8098 5/8]
+
+Reviewed-by: Keith Packard <keithp@keithp.com>
+Reviewed-by: Julien Cristau <jcristau@debian.org>
+Reviewed-by: Michal Srb <msrb@suse.com>
+Reviewed-by: Andy Ritger <aritger@nvidia.com>
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ glx/clientinfo.c | 19 ++++++++++++++-----
+ 1 file changed, 14 insertions(+), 5 deletions(-)
+
+diff --git a/glx/clientinfo.c b/glx/clientinfo.c
+index 4aaa4c9..c5fef30 100644
+--- a/glx/clientinfo.c
++++ b/glx/clientinfo.c
+@@ -33,18 +33,21 @@ static int
+ set_client_info(__GLXclientState * cl, xGLXSetClientInfoARBReq * req,
+ unsigned bytes_per_version)
+ {
++ ClientPtr client = cl->client;
+ char *gl_extensions;
+ char *glx_extensions;
+
++ REQUEST_AT_LEAST_SIZE(xGLXSetClientInfoARBReq);
++
+ /* Verify that the size of the packet matches the size inferred from the
+ * sizes specified for the various fields.
+ */
+- const unsigned expected_size = sz_xGLXSetClientInfoARBReq
+- + (req->numVersions * bytes_per_version)
+- + __GLX_PAD(req->numGLExtensionBytes)
+- + __GLX_PAD(req->numGLXExtensionBytes);
++ int size = sz_xGLXSetClientInfoARBReq;
++ size = safe_add(size, safe_mul(req->numVersions, bytes_per_version));
++ size = safe_add(size, safe_pad(req->numGLExtensionBytes));
++ size = safe_add(size, safe_pad(req->numGLXExtensionBytes));
+
+- if (req->length != (expected_size / 4))
++ if (size < 0 || req->length != (size / 4))
+ return BadLength;
+
+ /* Verify that the actual length of the GL extension string matches what's
+@@ -80,8 +83,11 @@ __glXDisp_SetClientInfoARB(__GLXclientState * cl, GLbyte * pc)
+ int
+ __glXDispSwap_SetClientInfoARB(__GLXclientState * cl, GLbyte * pc)
+ {
++ ClientPtr client = cl->client;
+ xGLXSetClientInfoARBReq *req = (xGLXSetClientInfoARBReq *) pc;
+
++ REQUEST_AT_LEAST_SIZE(xGLXSetClientInfoARBReq);
++
+ req->length = bswap_16(req->length);
+ req->numVersions = bswap_32(req->numVersions);
+ req->numGLExtensionBytes = bswap_32(req->numGLExtensionBytes);
+@@ -99,8 +105,11 @@ __glXDisp_SetClientInfo2ARB(__GLXclientState * cl, GLbyte * pc)
+ int
+ __glXDispSwap_SetClientInfo2ARB(__GLXclientState * cl, GLbyte * pc)
+ {
++ ClientPtr client = cl->client;
+ xGLXSetClientInfoARBReq *req = (xGLXSetClientInfoARBReq *) pc;
+
++ REQUEST_AT_LEAST_SIZE(xGLXSetClientInfoARBReq);
++
+ req->length = bswap_16(req->length);
+ req->numVersions = bswap_32(req->numVersions);
+ req->numGLExtensionBytes = bswap_32(req->numGLExtensionBytes);
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0027-glx-Length-checking-for-non-generated-vendor-private.patch b/patches/source/xorg-server/patch/xorg-server/0027-glx-Length-checking-for-non-generated-vendor-private.patch
new file mode 100644
index 000000000..f748fa89c
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0027-glx-Length-checking-for-non-generated-vendor-private.patch
@@ -0,0 +1,46 @@
+From dd7ac54c7ed15cdc63626abb534c0e1434f37dec Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Mon, 10 Nov 2014 12:13:46 -0500
+Subject: [PATCH 27/31] glx: Length-checking for non-generated vendor private
+ requests [CVE-2014-8098 6/8]
+
+Reviewed-by: Keith Packard <keithp@keithp.com>
+Reviewed-by: Michal Srb <msrb@suse.com>
+Reviewed-by: Andy Ritger <aritger@nvidia.com>
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ glx/indirect_program.c | 2 ++
+ glx/swap_interval.c | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/glx/indirect_program.c b/glx/indirect_program.c
+index 0114d73..efd0027 100644
+--- a/glx/indirect_program.c
++++ b/glx/indirect_program.c
+@@ -69,6 +69,8 @@ DoGetProgramString(struct __GLXclientStateRec *cl, GLbyte * pc,
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ ClientPtr client = cl->client;
+
++ REQUEST_FIXED_SIZE(xGLXVendorPrivateWithReplyReq, 8);
++
+ pc += __GLX_VENDPRIV_HDR_SIZE;
+ if (cx != NULL) {
+ GLenum target;
+diff --git a/glx/swap_interval.c b/glx/swap_interval.c
+index 7533d26..90636f1 100644
+--- a/glx/swap_interval.c
++++ b/glx/swap_interval.c
+@@ -50,6 +50,8 @@ DoSwapInterval(__GLXclientState * cl, GLbyte * pc, int do_swap)
+ __GLXcontext *cx;
+ GLint interval;
+
++ REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 4);
++
+ cx = __glXLookupContextByTag(cl, tag);
+
+ if ((cx == NULL) || (cx->pGlxScreen == NULL)) {
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0028-glx-Length-checking-for-non-generated-single-request.patch b/patches/source/xorg-server/patch/xorg-server/0028-glx-Length-checking-for-non-generated-single-request.patch
new file mode 100644
index 000000000..cacde310a
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0028-glx-Length-checking-for-non-generated-single-request.patch
@@ -0,0 +1,565 @@
+From 48330fbc7cdc7a3de1a4eb1c0af297352075bd8f Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Mon, 10 Nov 2014 12:13:47 -0500
+Subject: [PATCH 28/31] glx: Length checking for non-generated single requests
+ (v2) [CVE-2014-8098 7/8]
+
+v2:
+Fix single versus vendor-private length checking for ARB_imaging subset
+extensions. (Julien Cristau)
+
+v3:
+Fix single versus vendor-private length checking for ARB_imaging subset
+extensions. (Julien Cristau)
+
+Reviewed-by: Michal Srb <msrb@suse.com>
+Reviewed-by: Andy Ritger <aritger@nvidia.com>
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+Signed-off-by: Julien Cristau <jcristau@debian.org>
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ glx/indirect_texture_compression.c | 4 ++++
+ glx/single2.c | 23 +++++++++++++++-----
+ glx/single2swap.c | 19 ++++++++++++----
+ glx/singlepix.c | 44 +++++++++++++++++++++++++-------------
+ glx/singlepixswap.c | 34 ++++++++++++++++++++++++-----
+ 5 files changed, 95 insertions(+), 29 deletions(-)
+
+diff --git a/glx/indirect_texture_compression.c b/glx/indirect_texture_compression.c
+index 5c2d06b..fe6c6fa 100644
+--- a/glx/indirect_texture_compression.c
++++ b/glx/indirect_texture_compression.c
+@@ -47,6 +47,8 @@ __glXDisp_GetCompressedTexImageARB(struct __GLXclientStateRec *cl, GLbyte * pc)
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ ClientPtr client = cl->client;
+
++ REQUEST_FIXED_SIZE(xGLXSingleReq, 8);
++
+ pc += __GLX_SINGLE_HDR_SIZE;
+ if (cx != NULL) {
+ const GLenum target = *(GLenum *) (pc + 0);
+@@ -93,6 +95,8 @@ __glXDispSwap_GetCompressedTexImageARB(struct __GLXclientStateRec *cl,
+ __glXForceCurrent(cl, bswap_32(req->contextTag), &error);
+ ClientPtr client = cl->client;
+
++ REQUEST_FIXED_SIZE(xGLXSingleReq, 8);
++
+ pc += __GLX_SINGLE_HDR_SIZE;
+ if (cx != NULL) {
+ const GLenum target = (GLenum) bswap_32(*(int *) (pc + 0));
+diff --git a/glx/single2.c b/glx/single2.c
+index 9597d29..d735149 100644
+--- a/glx/single2.c
++++ b/glx/single2.c
+@@ -49,11 +49,14 @@
+ int
+ __glXDisp_FeedbackBuffer(__GLXclientState * cl, GLbyte * pc)
+ {
++ ClientPtr client = cl->client;
+ GLsizei size;
+ GLenum type;
+ __GLXcontext *cx;
+ int error;
+
++ REQUEST_FIXED_SIZE(xGLXSingleReq, 8);
++
+ cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
+ if (!cx) {
+ return error;
+@@ -80,10 +83,13 @@ __glXDisp_FeedbackBuffer(__GLXclientState * cl, GLbyte * pc)
+ int
+ __glXDisp_SelectBuffer(__GLXclientState * cl, GLbyte * pc)
+ {
++ ClientPtr client = cl->client;
+ __GLXcontext *cx;
+ GLsizei size;
+ int error;
+
++ REQUEST_FIXED_SIZE(xGLXSingleReq, 4);
++
+ cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
+ if (!cx) {
+ return error;
+@@ -108,7 +114,7 @@ __glXDisp_SelectBuffer(__GLXclientState * cl, GLbyte * pc)
+ int
+ __glXDisp_RenderMode(__GLXclientState * cl, GLbyte * pc)
+ {
+- ClientPtr client;
++ ClientPtr client = cl->client;
+ xGLXRenderModeReply reply;
+ __GLXcontext *cx;
+ GLint nitems = 0, retBytes = 0, retval, newModeCheck;
+@@ -116,6 +122,8 @@ __glXDisp_RenderMode(__GLXclientState * cl, GLbyte * pc)
+ GLenum newMode;
+ int error;
+
++ REQUEST_FIXED_SIZE(xGLXSingleReq, 4);
++
+ cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
+ if (!cx) {
+ return error;
+@@ -192,7 +200,6 @@ __glXDisp_RenderMode(__GLXclientState * cl, GLbyte * pc)
+ ** selection array, as per the API for glRenderMode itself.
+ */
+ noChangeAllowed:;
+- client = cl->client;
+ reply = (xGLXRenderModeReply) {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+@@ -211,9 +218,12 @@ __glXDisp_RenderMode(__GLXclientState * cl, GLbyte * pc)
+ int
+ __glXDisp_Flush(__GLXclientState * cl, GLbyte * pc)
+ {
++ ClientPtr client = cl->client;
+ __GLXcontext *cx;
+ int error;
+
++ REQUEST_SIZE_MATCH(xGLXSingleReq);
++
+ cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
+ if (!cx) {
+ return error;
+@@ -227,10 +237,12 @@ __glXDisp_Flush(__GLXclientState * cl, GLbyte * pc)
+ int
+ __glXDisp_Finish(__GLXclientState * cl, GLbyte * pc)
+ {
++ ClientPtr client = cl->client;
+ __GLXcontext *cx;
+- ClientPtr client;
+ int error;
+
++ REQUEST_SIZE_MATCH(xGLXSingleReq);
++
+ cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
+ if (!cx) {
+ return error;
+@@ -321,7 +333,7 @@ __glXcombine_strings(const char *cext_string, const char *sext_string)
+ int
+ DoGetString(__GLXclientState * cl, GLbyte * pc, GLboolean need_swap)
+ {
+- ClientPtr client;
++ ClientPtr client = cl->client;
+ __GLXcontext *cx;
+ GLenum name;
+ const char *string;
+@@ -331,6 +343,8 @@ DoGetString(__GLXclientState * cl, GLbyte * pc, GLboolean need_swap)
+ char *buf = NULL, *buf1 = NULL;
+ GLint length = 0;
+
++ REQUEST_FIXED_SIZE(xGLXSingleReq, 4);
++
+ /* If the client has the opposite byte order, swap the contextTag and
+ * the name.
+ */
+@@ -347,7 +361,6 @@ DoGetString(__GLXclientState * cl, GLbyte * pc, GLboolean need_swap)
+ pc += __GLX_SINGLE_HDR_SIZE;
+ name = *(GLenum *) (pc + 0);
+ string = (const char *) CALL_GetString(GET_DISPATCH(), (name));
+- client = cl->client;
+
+ if (string == NULL)
+ string = "";
+diff --git a/glx/single2swap.c b/glx/single2swap.c
+index 1ca5328..907dfdf 100644
+--- a/glx/single2swap.c
++++ b/glx/single2swap.c
+@@ -45,6 +45,7 @@
+ int
+ __glXDispSwap_FeedbackBuffer(__GLXclientState * cl, GLbyte * pc)
+ {
++ ClientPtr client = cl->client;
+ GLsizei size;
+ GLenum type;
+
+@@ -52,6 +53,8 @@ __glXDispSwap_FeedbackBuffer(__GLXclientState * cl, GLbyte * pc)
+ __GLXcontext *cx;
+ int error;
+
++ REQUEST_FIXED_SIZE(xGLXSingleReq, 8);
++
+ __GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag);
+ cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
+ if (!cx) {
+@@ -81,12 +84,15 @@ __glXDispSwap_FeedbackBuffer(__GLXclientState * cl, GLbyte * pc)
+ int
+ __glXDispSwap_SelectBuffer(__GLXclientState * cl, GLbyte * pc)
+ {
++ ClientPtr client = cl->client;
+ __GLXcontext *cx;
+ GLsizei size;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+ int error;
+
++ REQUEST_FIXED_SIZE(xGLXSingleReq, 4);
++
+ __GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag);
+ cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
+ if (!cx) {
+@@ -113,7 +119,7 @@ __glXDispSwap_SelectBuffer(__GLXclientState * cl, GLbyte * pc)
+ int
+ __glXDispSwap_RenderMode(__GLXclientState * cl, GLbyte * pc)
+ {
+- ClientPtr client;
++ ClientPtr client = cl->client;
+ __GLXcontext *cx;
+ xGLXRenderModeReply reply;
+ GLint nitems = 0, retBytes = 0, retval, newModeCheck;
+@@ -124,6 +130,8 @@ __glXDispSwap_RenderMode(__GLXclientState * cl, GLbyte * pc)
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ int error;
+
++ REQUEST_FIXED_SIZE(xGLXSingleReq, 4);
++
+ __GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag);
+ cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
+ if (!cx) {
+@@ -204,7 +212,6 @@ __glXDispSwap_RenderMode(__GLXclientState * cl, GLbyte * pc)
+ ** selection array, as per the API for glRenderMode itself.
+ */
+ noChangeAllowed:;
+- client = cl->client;
+ reply = (xGLXRenderModeReply) {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+@@ -228,11 +235,14 @@ __glXDispSwap_RenderMode(__GLXclientState * cl, GLbyte * pc)
+ int
+ __glXDispSwap_Flush(__GLXclientState * cl, GLbyte * pc)
+ {
++ ClientPtr client = cl->client;
+ __GLXcontext *cx;
+ int error;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+
++ REQUEST_SIZE_MATCH(xGLXSingleReq);
++
+ __GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag);
+ cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
+ if (!cx) {
+@@ -247,12 +257,14 @@ __glXDispSwap_Flush(__GLXclientState * cl, GLbyte * pc)
+ int
+ __glXDispSwap_Finish(__GLXclientState * cl, GLbyte * pc)
+ {
++ ClientPtr client = cl->client;
+ __GLXcontext *cx;
+- ClientPtr client;
+ int error;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+
++ REQUEST_SIZE_MATCH(xGLXSingleReq);
++
+ __GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag);
+ cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
+ if (!cx) {
+@@ -264,7 +276,6 @@ __glXDispSwap_Finish(__GLXclientState * cl, GLbyte * pc)
+ cx->hasUnflushedCommands = GL_FALSE;
+
+ /* Send empty reply packet to indicate finish is finished */
+- client = cl->client;
+ __GLX_BEGIN_REPLY(0);
+ __GLX_PUT_RETVAL(0);
+ __GLX_SWAP_REPLY_HEADER();
+diff --git a/glx/singlepix.c b/glx/singlepix.c
+index 4137798..4771fb4 100644
+--- a/glx/singlepix.c
++++ b/glx/singlepix.c
+@@ -55,6 +55,8 @@ __glXDisp_ReadPixels(__GLXclientState * cl, GLbyte * pc)
+ int error;
+ char *answer, answerBuffer[200];
+
++ REQUEST_FIXED_SIZE(xGLXSingleReq, 28);
++
+ cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
+ if (!cx) {
+ return error;
+@@ -107,6 +109,8 @@ __glXDisp_GetTexImage(__GLXclientState * cl, GLbyte * pc)
+ char *answer, answerBuffer[200];
+ GLint width = 0, height = 0, depth = 1;
+
++ REQUEST_FIXED_SIZE(xGLXSingleReq, 20);
++
+ cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
+ if (!cx) {
+ return error;
+@@ -169,6 +173,8 @@ __glXDisp_GetPolygonStipple(__GLXclientState * cl, GLbyte * pc)
+ GLubyte answerBuffer[200];
+ char *answer;
+
++ REQUEST_FIXED_SIZE(xGLXSingleReq, 4);
++
+ cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
+ if (!cx) {
+ return error;
+@@ -231,15 +237,13 @@ GetSeparableFilter(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
+ compsize = __glGetTexImage_size(target, 1, format, type, width, 1, 1);
+ compsize2 = __glGetTexImage_size(target, 1, format, type, height, 1, 1);
+
+- if (compsize < 0)
++ if ((compsize = safe_pad(compsize)) < 0)
+ return BadLength;
+- if (compsize2 < 0)
++ if ((compsize2 = safe_pad(compsize2)) < 0)
+ return BadLength;
+- compsize = __GLX_PAD(compsize);
+- compsize2 = __GLX_PAD(compsize2);
+
+ CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes));
+- __GLX_GET_ANSWER_BUFFER(answer, cl, compsize + compsize2, 1);
++ __GLX_GET_ANSWER_BUFFER(answer, cl, safe_add(compsize, compsize2), 1);
+ __glXClearErrorOccured();
+ CALL_GetSeparableFilter(GET_DISPATCH(), (*(GLenum *) (pc + 0),
+ *(GLenum *) (pc + 4),
+@@ -265,7 +269,8 @@ int
+ __glXDisp_GetSeparableFilter(__GLXclientState * cl, GLbyte * pc)
+ {
+ const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
+-
++ ClientPtr client = cl->client;
++ REQUEST_FIXED_SIZE(xGLXSingleReq, 16);
+ return GetSeparableFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
+ }
+
+@@ -273,7 +278,8 @@ int
+ __glXDisp_GetSeparableFilterEXT(__GLXclientState * cl, GLbyte * pc)
+ {
+ const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
+-
++ ClientPtr client = cl->client;
++ REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16);
+ return GetSeparableFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
+ }
+
+@@ -343,7 +349,8 @@ int
+ __glXDisp_GetConvolutionFilter(__GLXclientState * cl, GLbyte * pc)
+ {
+ const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
+-
++ ClientPtr client = cl->client;
++ REQUEST_FIXED_SIZE(xGLXSingleReq, 16);
+ return GetConvolutionFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
+ }
+
+@@ -351,7 +358,8 @@ int
+ __glXDisp_GetConvolutionFilterEXT(__GLXclientState * cl, GLbyte * pc)
+ {
+ const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
+-
++ ClientPtr client = cl->client;
++ REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16);
+ return GetConvolutionFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
+ }
+
+@@ -411,7 +419,8 @@ int
+ __glXDisp_GetHistogram(__GLXclientState * cl, GLbyte * pc)
+ {
+ const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
+-
++ ClientPtr client = cl->client;
++ REQUEST_FIXED_SIZE(xGLXSingleReq, 16);
+ return GetHistogram(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
+ }
+
+@@ -419,7 +428,8 @@ int
+ __glXDisp_GetHistogramEXT(__GLXclientState * cl, GLbyte * pc)
+ {
+ const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
+-
++ ClientPtr client = cl->client;
++ REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16);
+ return GetHistogram(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
+ }
+
+@@ -471,7 +481,8 @@ int
+ __glXDisp_GetMinmax(__GLXclientState * cl, GLbyte * pc)
+ {
+ const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
+-
++ ClientPtr client = cl->client;
++ REQUEST_FIXED_SIZE(xGLXSingleReq, 16);
+ return GetMinmax(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
+ }
+
+@@ -479,7 +490,8 @@ int
+ __glXDisp_GetMinmaxEXT(__GLXclientState * cl, GLbyte * pc)
+ {
+ const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
+-
++ ClientPtr client = cl->client;
++ REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16);
+ return GetMinmax(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
+ }
+
+@@ -540,7 +552,8 @@ int
+ __glXDisp_GetColorTable(__GLXclientState * cl, GLbyte * pc)
+ {
+ const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
+-
++ ClientPtr client = cl->client;
++ REQUEST_FIXED_SIZE(xGLXSingleReq, 16);
+ return GetColorTable(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
+ }
+
+@@ -548,6 +561,7 @@ int
+ __glXDisp_GetColorTableSGI(__GLXclientState * cl, GLbyte * pc)
+ {
+ const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
+-
++ ClientPtr client = cl->client;
++ REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16);
+ return GetColorTable(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
+ }
+diff --git a/glx/singlepixswap.c b/glx/singlepixswap.c
+index 16ea408..7f007b5 100644
+--- a/glx/singlepixswap.c
++++ b/glx/singlepixswap.c
+@@ -57,6 +57,8 @@ __glXDispSwap_ReadPixels(__GLXclientState * cl, GLbyte * pc)
+ int error;
+ char *answer, answerBuffer[200];
+
++ REQUEST_FIXED_SIZE(xGLXSingleReq, 28);
++
+ __GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag);
+ cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
+ if (!cx) {
+@@ -122,6 +124,8 @@ __glXDispSwap_GetTexImage(__GLXclientState * cl, GLbyte * pc)
+ char *answer, answerBuffer[200];
+ GLint width = 0, height = 0, depth = 1;
+
++ REQUEST_FIXED_SIZE(xGLXSingleReq, 20);
++
+ __GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag);
+ cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
+ if (!cx) {
+@@ -197,6 +201,8 @@ __glXDispSwap_GetPolygonStipple(__GLXclientState * cl, GLbyte * pc)
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+
++ REQUEST_FIXED_SIZE(xGLXSingleReq, 4);
++
+ __GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag);
+ cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
+ if (!cx) {
+@@ -266,15 +272,13 @@ GetSeparableFilter(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
+ compsize = __glGetTexImage_size(target, 1, format, type, width, 1, 1);
+ compsize2 = __glGetTexImage_size(target, 1, format, type, height, 1, 1);
+
+- if (compsize < 0)
++ if ((compsize = safe_pad(compsize)) < 0)
+ return BadLength;
+- if (compsize2 < 0)
++ if ((compsize2 = safe_pad(compsize2)) < 0)
+ return BadLength;
+- compsize = __GLX_PAD(compsize);
+- compsize2 = __GLX_PAD(compsize2);
+
+ CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes));
+- __GLX_GET_ANSWER_BUFFER(answer, cl, compsize + compsize2, 1);
++ __GLX_GET_ANSWER_BUFFER(answer, cl, safe_add(compsize, compsize2), 1);
+ __glXClearErrorOccured();
+ CALL_GetSeparableFilter(GET_DISPATCH(), (*(GLenum *) (pc + 0),
+ *(GLenum *) (pc + 4),
+@@ -302,7 +306,9 @@ int
+ __glXDispSwap_GetSeparableFilter(__GLXclientState * cl, GLbyte * pc)
+ {
+ const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
++ ClientPtr client = cl->client;
+
++ REQUEST_FIXED_SIZE(xGLXSingleReq, 16);
+ return GetSeparableFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
+ }
+
+@@ -310,7 +316,9 @@ int
+ __glXDispSwap_GetSeparableFilterEXT(__GLXclientState * cl, GLbyte * pc)
+ {
+ const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
++ ClientPtr client = cl->client;
+
++ REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16);
+ return GetSeparableFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
+ }
+
+@@ -388,7 +396,9 @@ int
+ __glXDispSwap_GetConvolutionFilter(__GLXclientState * cl, GLbyte * pc)
+ {
+ const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
++ ClientPtr client = cl->client;
+
++ REQUEST_FIXED_SIZE(xGLXSingleReq, 16);
+ return GetConvolutionFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
+ }
+
+@@ -396,7 +406,9 @@ int
+ __glXDispSwap_GetConvolutionFilterEXT(__GLXclientState * cl, GLbyte * pc)
+ {
+ const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
++ ClientPtr client = cl->client;
+
++ REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16);
+ return GetConvolutionFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
+ }
+
+@@ -463,7 +475,9 @@ int
+ __glXDispSwap_GetHistogram(__GLXclientState * cl, GLbyte * pc)
+ {
+ const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
++ ClientPtr client = cl->client;
+
++ REQUEST_FIXED_SIZE(xGLXSingleReq, 16);
+ return GetHistogram(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
+ }
+
+@@ -471,7 +485,9 @@ int
+ __glXDispSwap_GetHistogramEXT(__GLXclientState * cl, GLbyte * pc)
+ {
+ const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
++ ClientPtr client = cl->client;
+
++ REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16);
+ return GetHistogram(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
+ }
+
+@@ -529,7 +545,9 @@ int
+ __glXDispSwap_GetMinmax(__GLXclientState * cl, GLbyte * pc)
+ {
+ const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
++ ClientPtr client = cl->client;
+
++ REQUEST_FIXED_SIZE(xGLXSingleReq, 16);
+ return GetMinmax(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
+ }
+
+@@ -537,7 +555,9 @@ int
+ __glXDispSwap_GetMinmaxEXT(__GLXclientState * cl, GLbyte * pc)
+ {
+ const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
++ ClientPtr client = cl->client;
+
++ REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16);
+ return GetMinmax(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
+ }
+
+@@ -605,7 +625,9 @@ int
+ __glXDispSwap_GetColorTable(__GLXclientState * cl, GLbyte * pc)
+ {
+ const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
++ ClientPtr client = cl->client;
+
++ REQUEST_FIXED_SIZE(xGLXSingleReq, 16);
+ return GetColorTable(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
+ }
+
+@@ -613,6 +635,8 @@ int
+ __glXDispSwap_GetColorTableSGI(__GLXclientState * cl, GLbyte * pc)
+ {
+ const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
++ ClientPtr client = cl->client;
+
++ REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16);
+ return GetColorTable(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
+ }
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0029-glx-Fix-mask-truncation-in-__glXGetAnswerBuffer-CVE-.patch b/patches/source/xorg-server/patch/xorg-server/0029-glx-Fix-mask-truncation-in-__glXGetAnswerBuffer-CVE-.patch
new file mode 100644
index 000000000..5a6cff9b4
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0029-glx-Fix-mask-truncation-in-__glXGetAnswerBuffer-CVE-.patch
@@ -0,0 +1,35 @@
+From 3e9dd82063cc50d649517ee21ce68cfe4b98a1f6 Mon Sep 17 00:00:00 2001
+From: Robert Morell <rmorell@nvidia.com>
+Date: Wed, 12 Nov 2014 18:51:43 -0800
+Subject: [PATCH 29/31] glx: Fix mask truncation in __glXGetAnswerBuffer
+ [CVE-2014-8093 6/6]
+
+On a system where sizeof(unsigned) != sizeof(intptr_t), the unary
+bitwise not operation will result in a mask that clears all high bits
+from temp_buf in the expression:
+ temp_buf = (temp_buf + mask) & ~mask;
+
+Signed-off-by: Robert Morell <rmorell@nvidia.com>
+Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ glx/indirect_util.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/glx/indirect_util.c b/glx/indirect_util.c
+index 7431d43..5914f5b 100644
+--- a/glx/indirect_util.c
++++ b/glx/indirect_util.c
+@@ -78,7 +78,7 @@ __glXGetAnswerBuffer(__GLXclientState * cl, size_t required_size,
+ void *local_buffer, size_t local_size, unsigned alignment)
+ {
+ void *buffer = local_buffer;
+- const unsigned mask = alignment - 1;
++ const intptr_t mask = alignment - 1;
+
+ if (local_size < required_size) {
+ size_t worst_case_size;
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0030-glx-Length-checking-for-RenderLarge-requests-v2-CVE-.patch b/patches/source/xorg-server/patch/xorg-server/0030-glx-Length-checking-for-RenderLarge-requests-v2-CVE-.patch
new file mode 100644
index 000000000..6542a5135
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0030-glx-Length-checking-for-RenderLarge-requests-v2-CVE-.patch
@@ -0,0 +1,159 @@
+From a2af6cb8a699966e13c0bbcafc41da2f0e814b86 Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Mon, 10 Nov 2014 12:13:43 -0500
+Subject: [PATCH 30/31] glx: Length checking for RenderLarge requests (v2)
+ [CVE-2014-8098 3/8]
+
+This is a half-measure until we start passing request length into the
+varsize function, but it's better than the nothing we had before.
+
+v2: Verify that there's at least a large render header's worth of
+dataBytes (Julien Cristau)
+
+Reviewed-by: Michal Srb <msrb@suse.com>
+Reviewed-by: Andy Ritger <aritger@nvidia.com>
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ glx/glxcmds.c | 57 ++++++++++++++++++++++++++++++++++-----------------------
+ 1 file changed, 34 insertions(+), 23 deletions(-)
+
+diff --git a/glx/glxcmds.c b/glx/glxcmds.c
+index 969bf01..4715328 100644
+--- a/glx/glxcmds.c
++++ b/glx/glxcmds.c
+@@ -2055,6 +2055,8 @@ __glXDisp_RenderLarge(__GLXclientState * cl, GLbyte * pc)
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+
++ REQUEST_AT_LEAST_SIZE(xGLXRenderLargeReq);
++
+ req = (xGLXRenderLargeReq *) pc;
+ if (client->swapped) {
+ __GLX_SWAP_SHORT(&req->length);
+@@ -2070,12 +2072,14 @@ __glXDisp_RenderLarge(__GLXclientState * cl, GLbyte * pc)
+ __glXResetLargeCommandStatus(cl);
+ return error;
+ }
++ if (safe_pad(req->dataBytes) < 0)
++ return BadLength;
+ dataBytes = req->dataBytes;
+
+ /*
+ ** Check the request length.
+ */
+- if ((req->length << 2) != __GLX_PAD(dataBytes) + sz_xGLXRenderLargeReq) {
++ if ((req->length << 2) != safe_pad(dataBytes) + sz_xGLXRenderLargeReq) {
+ client->errorValue = req->length;
+ /* Reset in case this isn't 1st request. */
+ __glXResetLargeCommandStatus(cl);
+@@ -2085,7 +2089,7 @@ __glXDisp_RenderLarge(__GLXclientState * cl, GLbyte * pc)
+
+ if (cl->largeCmdRequestsSoFar == 0) {
+ __GLXrenderSizeData entry;
+- int extra;
++ int extra = 0;
+ size_t cmdlen;
+ int err;
+
+@@ -2098,13 +2102,17 @@ __glXDisp_RenderLarge(__GLXclientState * cl, GLbyte * pc)
+ return __glXError(GLXBadLargeRequest);
+ }
+
++ if (dataBytes < __GLX_RENDER_LARGE_HDR_SIZE)
++ return BadLength;
++
+ hdr = (__GLXrenderLargeHeader *) pc;
+ if (client->swapped) {
+ __GLX_SWAP_INT(&hdr->length);
+ __GLX_SWAP_INT(&hdr->opcode);
+ }
+- cmdlen = hdr->length;
+ opcode = hdr->opcode;
++ if ((cmdlen = safe_pad(hdr->length)) < 0)
++ return BadLength;
+
+ /*
+ ** Check for core opcodes and grab entry data.
+@@ -2126,17 +2134,13 @@ __glXDisp_RenderLarge(__GLXclientState * cl, GLbyte * pc)
+ if (extra < 0) {
+ return BadLength;
+ }
+- /* large command's header is 4 bytes longer, so add 4 */
+- if (cmdlen != __GLX_PAD(entry.bytes + 4 + extra)) {
+- return BadLength;
+- }
+ }
+- else {
+- /* constant size command */
+- if (cmdlen != __GLX_PAD(entry.bytes + 4)) {
+- return BadLength;
+- }
++
++ /* the +4 is safe because we know entry.bytes is small */
++ if (cmdlen != safe_pad(safe_add(entry.bytes + 4, extra))) {
++ return BadLength;
+ }
++
+ /*
+ ** Make enough space in the buffer, then copy the entire request.
+ */
+@@ -2166,6 +2170,7 @@ __glXDisp_RenderLarge(__GLXclientState * cl, GLbyte * pc)
+ ** We are receiving subsequent (i.e. not the first) requests of a
+ ** multi request command.
+ */
++ int bytesSoFar; /* including this packet */
+
+ /*
+ ** Check the request number and the total request count.
+@@ -2184,11 +2189,18 @@ __glXDisp_RenderLarge(__GLXclientState * cl, GLbyte * pc)
+ /*
+ ** Check that we didn't get too much data.
+ */
+- if ((cl->largeCmdBytesSoFar + dataBytes) > cl->largeCmdBytesTotal) {
++ if ((bytesSoFar = safe_add(cl->largeCmdBytesSoFar, dataBytes)) < 0) {
++ client->errorValue = dataBytes;
++ __glXResetLargeCommandStatus(cl);
++ return __glXError(GLXBadLargeRequest);
++ }
++
++ if (bytesSoFar > cl->largeCmdBytesTotal) {
+ client->errorValue = dataBytes;
+ __glXResetLargeCommandStatus(cl);
+ return __glXError(GLXBadLargeRequest);
+ }
++
+ memcpy(cl->largeCmdBuf + cl->largeCmdBytesSoFar, pc, dataBytes);
+ cl->largeCmdBytesSoFar += dataBytes;
+ cl->largeCmdRequestsSoFar++;
+@@ -2200,17 +2212,16 @@ __glXDisp_RenderLarge(__GLXclientState * cl, GLbyte * pc)
+ ** This is the last request; it must have enough bytes to complete
+ ** the command.
+ */
+- /* NOTE: the two pad macros have been added below; they are needed
+- ** because the client library pads the total byte count, but not
+- ** the per-request byte counts. The Protocol Encoding says the
+- ** total byte count should not be padded, so a proposal will be
+- ** made to the ARB to relax the padding constraint on the total
+- ** byte count, thus preserving backward compatibility. Meanwhile,
+- ** the padding done below fixes a bug that did not allow
+- ** large commands of odd sizes to be accepted by the server.
++ /* NOTE: the pad macro below is needed because the client library
++ ** pads the total byte count, but not the per-request byte counts.
++ ** The Protocol Encoding says the total byte count should not be
++ ** padded, so a proposal will be made to the ARB to relax the
++ ** padding constraint on the total byte count, thus preserving
++ ** backward compatibility. Meanwhile, the padding done below
++ ** fixes a bug that did not allow large commands of odd sizes to
++ ** be accepted by the server.
+ */
+- if (__GLX_PAD(cl->largeCmdBytesSoFar) !=
+- __GLX_PAD(cl->largeCmdBytesTotal)) {
++ if (safe_pad(cl->largeCmdBytesSoFar) != cl->largeCmdBytesTotal) {
+ client->errorValue = dataBytes;
+ __glXResetLargeCommandStatus(cl);
+ return __glXError(GLXBadLargeRequest);
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/0031-glx-Pass-remaining-request-length-into-varsize-v2-CV.patch b/patches/source/xorg-server/patch/xorg-server/0031-glx-Pass-remaining-request-length-into-varsize-v2-CV.patch
new file mode 100644
index 000000000..e9a785f66
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0031-glx-Pass-remaining-request-length-into-varsize-v2-CV.patch
@@ -0,0 +1,935 @@
+From 37a79fa54d3ddd1d4f6c9c0362dbe9616151ec9c Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Mon, 10 Nov 2014 12:13:48 -0500
+Subject: [PATCH 31/31] glx: Pass remaining request length into ->varsize (v2)
+ [CVE-2014-8098 8/8]
+
+v2: Handle more multiplies in indirect_reqsize.c (Julien Cristau)
+
+Reviewed-by: Julien Cristau <jcristau@debian.org>
+Reviewed-by: Michal Srb <msrb@suse.com>
+Reviewed-by: Andy Ritger <aritger@nvidia.com>
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ glx/glxcmds.c | 7 ++-
+ glx/glxserver.h | 2 +-
+ glx/indirect_reqsize.c | 154 ++++++++++++++++++++++++-------------------------
+ glx/indirect_reqsize.h | 148 +++++++++++++++++++++++------------------------
+ glx/rensize.c | 27 ++++++---
+ 5 files changed, 174 insertions(+), 164 deletions(-)
+
+diff --git a/glx/glxcmds.c b/glx/glxcmds.c
+index 4715328..59b1de5 100644
+--- a/glx/glxcmds.c
++++ b/glx/glxcmds.c
+@@ -2013,7 +2013,8 @@ __glXDisp_Render(__GLXclientState * cl, GLbyte * pc)
+ if (entry.varsize) {
+ /* variable size command */
+ extra = (*entry.varsize) (pc + __GLX_RENDER_HDR_SIZE,
+- client->swapped);
++ client->swapped,
++ left - __GLX_RENDER_HDR_SIZE);
+ if (extra < 0) {
+ return BadLength;
+ }
+@@ -2090,6 +2091,7 @@ __glXDisp_RenderLarge(__GLXclientState * cl, GLbyte * pc)
+ if (cl->largeCmdRequestsSoFar == 0) {
+ __GLXrenderSizeData entry;
+ int extra = 0;
++ int left = (req->length << 2) - sz_xGLXRenderLargeReq;
+ size_t cmdlen;
+ int err;
+
+@@ -2130,7 +2132,8 @@ __glXDisp_RenderLarge(__GLXclientState * cl, GLbyte * pc)
+ ** will be in the 1st request, so it's okay to do this.
+ */
+ extra = (*entry.varsize) (pc + __GLX_RENDER_LARGE_HDR_SIZE,
+- client->swapped);
++ client->swapped,
++ left - __GLX_RENDER_LARGE_HDR_SIZE);
+ if (extra < 0) {
+ return BadLength;
+ }
+diff --git a/glx/glxserver.h b/glx/glxserver.h
+index 1bc398b..9e660a5 100644
+--- a/glx/glxserver.h
++++ b/glx/glxserver.h
+@@ -163,7 +163,7 @@ typedef int (*__GLXprocPtr) (__GLXclientState *, char *pc);
+ /*
+ * Tables for computing the size of each rendering command.
+ */
+-typedef int (*gl_proto_size_func) (const GLbyte *, Bool);
++typedef int (*gl_proto_size_func) (const GLbyte *, Bool, int);
+
+ typedef struct {
+ int bytes;
+diff --git a/glx/indirect_reqsize.c b/glx/indirect_reqsize.c
+index 86ea970..ce58214 100644
+--- a/glx/indirect_reqsize.c
++++ b/glx/indirect_reqsize.c
+@@ -31,24 +31,22 @@
+ #include "indirect_size.h"
+ #include "indirect_reqsize.h"
+
+-#define __GLX_PAD(x) (((x) + 3) & ~3)
+-
+ #if defined(__CYGWIN__) || defined(__MINGW32__)
+ #undef HAVE_ALIAS
+ #endif
+ #ifdef HAVE_ALIAS
+ #define ALIAS2(from,to) \
+- GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \
++ GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap, int reqlen ) \
+ __attribute__ ((alias( # to )));
+ #define ALIAS(from,to) ALIAS2( from, __glX ## to ## ReqSize )
+ #else
+ #define ALIAS(from,to) \
+- GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \
+- { return __glX ## to ## ReqSize( pc, swap ); }
++ GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap, int reqlen ) \
++ { return __glX ## to ## ReqSize( pc, swap, reqlen ); }
+ #endif
+
+ int
+-__glXCallListsReqSize(const GLbyte * pc, Bool swap)
++__glXCallListsReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLsizei n = *(GLsizei *) (pc + 0);
+ GLenum type = *(GLenum *) (pc + 4);
+@@ -60,11 +58,11 @@ __glXCallListsReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ compsize = __glCallLists_size(type);
+- return __GLX_PAD((compsize * n));
++ return safe_pad(safe_mul(compsize, n));
+ }
+
+ int
+-__glXBitmapReqSize(const GLbyte * pc, Bool swap)
++__glXBitmapReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLint row_length = *(GLint *) (pc + 4);
+ GLint image_height = 0;
+@@ -88,7 +86,7 @@ __glXBitmapReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ int
+-__glXFogfvReqSize(const GLbyte * pc, Bool swap)
++__glXFogfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLenum pname = *(GLenum *) (pc + 0);
+ GLsizei compsize;
+@@ -98,11 +96,11 @@ __glXFogfvReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ compsize = __glFogfv_size(pname);
+- return __GLX_PAD((compsize * 4));
++ return safe_pad(safe_mul(compsize, 4));
+ }
+
+ int
+-__glXLightfvReqSize(const GLbyte * pc, Bool swap)
++__glXLightfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLenum pname = *(GLenum *) (pc + 4);
+ GLsizei compsize;
+@@ -112,11 +110,11 @@ __glXLightfvReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ compsize = __glLightfv_size(pname);
+- return __GLX_PAD((compsize * 4));
++ return safe_pad(safe_mul(compsize, 4));
+ }
+
+ int
+-__glXLightModelfvReqSize(const GLbyte * pc, Bool swap)
++__glXLightModelfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLenum pname = *(GLenum *) (pc + 0);
+ GLsizei compsize;
+@@ -126,11 +124,11 @@ __glXLightModelfvReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ compsize = __glLightModelfv_size(pname);
+- return __GLX_PAD((compsize * 4));
++ return safe_pad(safe_mul(compsize, 4));
+ }
+
+ int
+-__glXMaterialfvReqSize(const GLbyte * pc, Bool swap)
++__glXMaterialfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLenum pname = *(GLenum *) (pc + 4);
+ GLsizei compsize;
+@@ -140,11 +138,11 @@ __glXMaterialfvReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ compsize = __glMaterialfv_size(pname);
+- return __GLX_PAD((compsize * 4));
++ return safe_pad(safe_mul(compsize, 4));
+ }
+
+ int
+-__glXPolygonStippleReqSize(const GLbyte * pc, Bool swap)
++__glXPolygonStippleReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLint row_length = *(GLint *) (pc + 4);
+ GLint image_height = 0;
+@@ -164,7 +162,7 @@ __glXPolygonStippleReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ int
+-__glXTexParameterfvReqSize(const GLbyte * pc, Bool swap)
++__glXTexParameterfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLenum pname = *(GLenum *) (pc + 4);
+ GLsizei compsize;
+@@ -174,11 +172,11 @@ __glXTexParameterfvReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ compsize = __glTexParameterfv_size(pname);
+- return __GLX_PAD((compsize * 4));
++ return safe_pad(safe_mul(compsize, 4));
+ }
+
+ int
+-__glXTexImage1DReqSize(const GLbyte * pc, Bool swap)
++__glXTexImage1DReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLint row_length = *(GLint *) (pc + 4);
+ GLint image_height = 0;
+@@ -206,7 +204,7 @@ __glXTexImage1DReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ int
+-__glXTexImage2DReqSize(const GLbyte * pc, Bool swap)
++__glXTexImage2DReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLint row_length = *(GLint *) (pc + 4);
+ GLint image_height = 0;
+@@ -236,7 +234,7 @@ __glXTexImage2DReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ int
+-__glXTexEnvfvReqSize(const GLbyte * pc, Bool swap)
++__glXTexEnvfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLenum pname = *(GLenum *) (pc + 4);
+ GLsizei compsize;
+@@ -246,11 +244,11 @@ __glXTexEnvfvReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ compsize = __glTexEnvfv_size(pname);
+- return __GLX_PAD((compsize * 4));
++ return safe_pad(safe_mul(compsize, 4));
+ }
+
+ int
+-__glXTexGendvReqSize(const GLbyte * pc, Bool swap)
++__glXTexGendvReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLenum pname = *(GLenum *) (pc + 4);
+ GLsizei compsize;
+@@ -260,11 +258,11 @@ __glXTexGendvReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ compsize = __glTexGendv_size(pname);
+- return __GLX_PAD((compsize * 8));
++ return safe_pad(safe_mul(compsize, 8));
+ }
+
+ int
+-__glXTexGenfvReqSize(const GLbyte * pc, Bool swap)
++__glXTexGenfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLenum pname = *(GLenum *) (pc + 4);
+ GLsizei compsize;
+@@ -274,11 +272,11 @@ __glXTexGenfvReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ compsize = __glTexGenfv_size(pname);
+- return __GLX_PAD((compsize * 4));
++ return safe_pad(safe_mul(compsize, 4));
+ }
+
+ int
+-__glXPixelMapfvReqSize(const GLbyte * pc, Bool swap)
++__glXPixelMapfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLsizei mapsize = *(GLsizei *) (pc + 4);
+
+@@ -286,11 +284,11 @@ __glXPixelMapfvReqSize(const GLbyte * pc, Bool swap)
+ mapsize = bswap_32(mapsize);
+ }
+
+- return __GLX_PAD((mapsize * 4));
++ return safe_pad(safe_mul(mapsize, 4));
+ }
+
+ int
+-__glXPixelMapusvReqSize(const GLbyte * pc, Bool swap)
++__glXPixelMapusvReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLsizei mapsize = *(GLsizei *) (pc + 4);
+
+@@ -298,11 +296,11 @@ __glXPixelMapusvReqSize(const GLbyte * pc, Bool swap)
+ mapsize = bswap_32(mapsize);
+ }
+
+- return __GLX_PAD((mapsize * 2));
++ return safe_pad(safe_mul(mapsize, 2));
+ }
+
+ int
+-__glXDrawPixelsReqSize(const GLbyte * pc, Bool swap)
++__glXDrawPixelsReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLint row_length = *(GLint *) (pc + 4);
+ GLint image_height = 0;
+@@ -330,7 +328,7 @@ __glXDrawPixelsReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ int
+-__glXPrioritizeTexturesReqSize(const GLbyte * pc, Bool swap)
++__glXPrioritizeTexturesReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLsizei n = *(GLsizei *) (pc + 0);
+
+@@ -338,11 +336,11 @@ __glXPrioritizeTexturesReqSize(const GLbyte * pc, Bool swap)
+ n = bswap_32(n);
+ }
+
+- return __GLX_PAD((n * 4) + (n * 4));
++ return safe_pad(safe_add(safe_mul(n, 4), safe_mul(n, 4)));
+ }
+
+ int
+-__glXTexSubImage1DReqSize(const GLbyte * pc, Bool swap)
++__glXTexSubImage1DReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLint row_length = *(GLint *) (pc + 4);
+ GLint image_height = 0;
+@@ -370,7 +368,7 @@ __glXTexSubImage1DReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ int
+-__glXTexSubImage2DReqSize(const GLbyte * pc, Bool swap)
++__glXTexSubImage2DReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLint row_length = *(GLint *) (pc + 4);
+ GLint image_height = 0;
+@@ -400,7 +398,7 @@ __glXTexSubImage2DReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ int
+-__glXColorTableReqSize(const GLbyte * pc, Bool swap)
++__glXColorTableReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLint row_length = *(GLint *) (pc + 4);
+ GLint image_height = 0;
+@@ -428,7 +426,7 @@ __glXColorTableReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ int
+-__glXColorTableParameterfvReqSize(const GLbyte * pc, Bool swap)
++__glXColorTableParameterfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLenum pname = *(GLenum *) (pc + 4);
+ GLsizei compsize;
+@@ -438,11 +436,11 @@ __glXColorTableParameterfvReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ compsize = __glColorTableParameterfv_size(pname);
+- return __GLX_PAD((compsize * 4));
++ return safe_pad(safe_mul(compsize, 4));
+ }
+
+ int
+-__glXColorSubTableReqSize(const GLbyte * pc, Bool swap)
++__glXColorSubTableReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLint row_length = *(GLint *) (pc + 4);
+ GLint image_height = 0;
+@@ -470,7 +468,7 @@ __glXColorSubTableReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ int
+-__glXConvolutionFilter1DReqSize(const GLbyte * pc, Bool swap)
++__glXConvolutionFilter1DReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLint row_length = *(GLint *) (pc + 4);
+ GLint image_height = 0;
+@@ -498,7 +496,7 @@ __glXConvolutionFilter1DReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ int
+-__glXConvolutionFilter2DReqSize(const GLbyte * pc, Bool swap)
++__glXConvolutionFilter2DReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLint row_length = *(GLint *) (pc + 4);
+ GLint image_height = 0;
+@@ -528,7 +526,7 @@ __glXConvolutionFilter2DReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ int
+-__glXConvolutionParameterfvReqSize(const GLbyte * pc, Bool swap)
++__glXConvolutionParameterfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLenum pname = *(GLenum *) (pc + 4);
+ GLsizei compsize;
+@@ -538,11 +536,11 @@ __glXConvolutionParameterfvReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ compsize = __glConvolutionParameterfv_size(pname);
+- return __GLX_PAD((compsize * 4));
++ return safe_pad(safe_mul(compsize, 4));
+ }
+
+ int
+-__glXTexImage3DReqSize(const GLbyte * pc, Bool swap)
++__glXTexImage3DReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLint row_length = *(GLint *) (pc + 4);
+ GLint image_height = *(GLint *) (pc + 8);
+@@ -579,7 +577,7 @@ __glXTexImage3DReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ int
+-__glXTexSubImage3DReqSize(const GLbyte * pc, Bool swap)
++__glXTexSubImage3DReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLint row_length = *(GLint *) (pc + 4);
+ GLint image_height = *(GLint *) (pc + 8);
+@@ -613,7 +611,7 @@ __glXTexSubImage3DReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ int
+-__glXCompressedTexImage1DARBReqSize(const GLbyte * pc, Bool swap)
++__glXCompressedTexImage1DARBReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLsizei imageSize = *(GLsizei *) (pc + 20);
+
+@@ -621,11 +619,11 @@ __glXCompressedTexImage1DARBReqSize(const GLbyte * pc, Bool swap)
+ imageSize = bswap_32(imageSize);
+ }
+
+- return __GLX_PAD(imageSize);
++ return safe_pad(imageSize);
+ }
+
+ int
+-__glXCompressedTexImage2DARBReqSize(const GLbyte * pc, Bool swap)
++__glXCompressedTexImage2DARBReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLsizei imageSize = *(GLsizei *) (pc + 24);
+
+@@ -633,11 +631,11 @@ __glXCompressedTexImage2DARBReqSize(const GLbyte * pc, Bool swap)
+ imageSize = bswap_32(imageSize);
+ }
+
+- return __GLX_PAD(imageSize);
++ return safe_pad(imageSize);
+ }
+
+ int
+-__glXCompressedTexImage3DARBReqSize(const GLbyte * pc, Bool swap)
++__glXCompressedTexImage3DARBReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLsizei imageSize = *(GLsizei *) (pc + 28);
+
+@@ -645,11 +643,11 @@ __glXCompressedTexImage3DARBReqSize(const GLbyte * pc, Bool swap)
+ imageSize = bswap_32(imageSize);
+ }
+
+- return __GLX_PAD(imageSize);
++ return safe_pad(imageSize);
+ }
+
+ int
+-__glXCompressedTexSubImage3DARBReqSize(const GLbyte * pc, Bool swap)
++__glXCompressedTexSubImage3DARBReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLsizei imageSize = *(GLsizei *) (pc + 36);
+
+@@ -657,11 +655,11 @@ __glXCompressedTexSubImage3DARBReqSize(const GLbyte * pc, Bool swap)
+ imageSize = bswap_32(imageSize);
+ }
+
+- return __GLX_PAD(imageSize);
++ return safe_pad(imageSize);
+ }
+
+ int
+-__glXProgramStringARBReqSize(const GLbyte * pc, Bool swap)
++__glXProgramStringARBReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLsizei len = *(GLsizei *) (pc + 8);
+
+@@ -669,11 +667,11 @@ __glXProgramStringARBReqSize(const GLbyte * pc, Bool swap)
+ len = bswap_32(len);
+ }
+
+- return __GLX_PAD(len);
++ return safe_pad(len);
+ }
+
+ int
+-__glXDrawBuffersARBReqSize(const GLbyte * pc, Bool swap)
++__glXDrawBuffersARBReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLsizei n = *(GLsizei *) (pc + 0);
+
+@@ -681,11 +679,11 @@ __glXDrawBuffersARBReqSize(const GLbyte * pc, Bool swap)
+ n = bswap_32(n);
+ }
+
+- return __GLX_PAD((n * 4));
++ return safe_pad(safe_mul(n, 4));
+ }
+
+ int
+-__glXPointParameterfvEXTReqSize(const GLbyte * pc, Bool swap)
++__glXPointParameterfvEXTReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLenum pname = *(GLenum *) (pc + 0);
+ GLsizei compsize;
+@@ -695,11 +693,11 @@ __glXPointParameterfvEXTReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ compsize = __glPointParameterfvEXT_size(pname);
+- return __GLX_PAD((compsize * 4));
++ return safe_pad(safe_mul(compsize, 4));
+ }
+
+ int
+-__glXProgramParameters4dvNVReqSize(const GLbyte * pc, Bool swap)
++__glXProgramParameters4dvNVReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLsizei num = *(GLsizei *) (pc + 8);
+
+@@ -707,11 +705,11 @@ __glXProgramParameters4dvNVReqSize(const GLbyte * pc, Bool swap)
+ num = bswap_32(num);
+ }
+
+- return __GLX_PAD((num * 32));
++ return safe_pad(safe_mul(num, 32));
+ }
+
+ int
+-__glXProgramParameters4fvNVReqSize(const GLbyte * pc, Bool swap)
++__glXProgramParameters4fvNVReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLsizei num = *(GLsizei *) (pc + 8);
+
+@@ -719,11 +717,11 @@ __glXProgramParameters4fvNVReqSize(const GLbyte * pc, Bool swap)
+ num = bswap_32(num);
+ }
+
+- return __GLX_PAD((num * 16));
++ return safe_pad(safe_mul(num, 16));
+ }
+
+ int
+-__glXVertexAttribs1dvNVReqSize(const GLbyte * pc, Bool swap)
++__glXVertexAttribs1dvNVReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLsizei n = *(GLsizei *) (pc + 4);
+
+@@ -731,11 +729,11 @@ __glXVertexAttribs1dvNVReqSize(const GLbyte * pc, Bool swap)
+ n = bswap_32(n);
+ }
+
+- return __GLX_PAD((n * 8));
++ return safe_pad(safe_mul(n, 8));
+ }
+
+ int
+-__glXVertexAttribs2dvNVReqSize(const GLbyte * pc, Bool swap)
++__glXVertexAttribs2dvNVReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLsizei n = *(GLsizei *) (pc + 4);
+
+@@ -743,11 +741,11 @@ __glXVertexAttribs2dvNVReqSize(const GLbyte * pc, Bool swap)
+ n = bswap_32(n);
+ }
+
+- return __GLX_PAD((n * 16));
++ return safe_pad(safe_mul(n, 16));
+ }
+
+ int
+-__glXVertexAttribs3dvNVReqSize(const GLbyte * pc, Bool swap)
++__glXVertexAttribs3dvNVReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLsizei n = *(GLsizei *) (pc + 4);
+
+@@ -755,11 +753,11 @@ __glXVertexAttribs3dvNVReqSize(const GLbyte * pc, Bool swap)
+ n = bswap_32(n);
+ }
+
+- return __GLX_PAD((n * 24));
++ return safe_pad(safe_mul(n, 24));
+ }
+
+ int
+-__glXVertexAttribs3fvNVReqSize(const GLbyte * pc, Bool swap)
++__glXVertexAttribs3fvNVReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLsizei n = *(GLsizei *) (pc + 4);
+
+@@ -767,11 +765,11 @@ __glXVertexAttribs3fvNVReqSize(const GLbyte * pc, Bool swap)
+ n = bswap_32(n);
+ }
+
+- return __GLX_PAD((n * 12));
++ return safe_pad(safe_mul(n, 12));
+ }
+
+ int
+-__glXVertexAttribs3svNVReqSize(const GLbyte * pc, Bool swap)
++__glXVertexAttribs3svNVReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLsizei n = *(GLsizei *) (pc + 4);
+
+@@ -779,11 +777,11 @@ __glXVertexAttribs3svNVReqSize(const GLbyte * pc, Bool swap)
+ n = bswap_32(n);
+ }
+
+- return __GLX_PAD((n * 6));
++ return safe_pad(safe_mul(n, 6));
+ }
+
+ int
+-__glXVertexAttribs4dvNVReqSize(const GLbyte * pc, Bool swap)
++__glXVertexAttribs4dvNVReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLsizei n = *(GLsizei *) (pc + 4);
+
+@@ -791,11 +789,11 @@ __glXVertexAttribs4dvNVReqSize(const GLbyte * pc, Bool swap)
+ n = bswap_32(n);
+ }
+
+- return __GLX_PAD((n * 32));
++ return safe_pad(safe_mul(n, 32));
+ }
+
+ int
+-__glXProgramNamedParameter4fvNVReqSize(const GLbyte * pc, Bool swap)
++__glXProgramNamedParameter4fvNVReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLsizei len = *(GLsizei *) (pc + 4);
+
+@@ -803,7 +801,7 @@ __glXProgramNamedParameter4fvNVReqSize(const GLbyte * pc, Bool swap)
+ len = bswap_32(len);
+ }
+
+- return __GLX_PAD(len);
++ return safe_pad(len);
+ }
+
+ ALIAS(Fogiv, Fogfv)
+diff --git a/glx/indirect_reqsize.h b/glx/indirect_reqsize.h
+index d2c1da7..22e1350 100644
+--- a/glx/indirect_reqsize.h
++++ b/glx/indirect_reqsize.h
+@@ -36,128 +36,128 @@
+ #define PURE
+ #endif
+
+-extern PURE _X_HIDDEN int __glXCallListsReqSize(const GLbyte * pc, Bool swap);
+-extern PURE _X_HIDDEN int __glXBitmapReqSize(const GLbyte * pc, Bool swap);
+-extern PURE _X_HIDDEN int __glXFogfvReqSize(const GLbyte * pc, Bool swap);
+-extern PURE _X_HIDDEN int __glXFogivReqSize(const GLbyte * pc, Bool swap);
+-extern PURE _X_HIDDEN int __glXLightfvReqSize(const GLbyte * pc, Bool swap);
+-extern PURE _X_HIDDEN int __glXLightivReqSize(const GLbyte * pc, Bool swap);
++extern PURE _X_HIDDEN int __glXCallListsReqSize(const GLbyte * pc, Bool swap, int reqlen);
++extern PURE _X_HIDDEN int __glXBitmapReqSize(const GLbyte * pc, Bool swap, int reqlen);
++extern PURE _X_HIDDEN int __glXFogfvReqSize(const GLbyte * pc, Bool swap, int reqlen);
++extern PURE _X_HIDDEN int __glXFogivReqSize(const GLbyte * pc, Bool swap, int reqlen);
++extern PURE _X_HIDDEN int __glXLightfvReqSize(const GLbyte * pc, Bool swap, int reqlen);
++extern PURE _X_HIDDEN int __glXLightivReqSize(const GLbyte * pc, Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXLightModelfvReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXLightModelivReqSize(const GLbyte * pc,
+- Bool swap);
+-extern PURE _X_HIDDEN int __glXMaterialfvReqSize(const GLbyte * pc, Bool swap);
+-extern PURE _X_HIDDEN int __glXMaterialivReqSize(const GLbyte * pc, Bool swap);
++ Bool swap, int reqlen);
++extern PURE _X_HIDDEN int __glXMaterialfvReqSize(const GLbyte * pc, Bool swap, int reqlen);
++extern PURE _X_HIDDEN int __glXMaterialivReqSize(const GLbyte * pc, Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXPolygonStippleReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXTexParameterfvReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXTexParameterivReqSize(const GLbyte * pc,
+- Bool swap);
+-extern PURE _X_HIDDEN int __glXTexImage1DReqSize(const GLbyte * pc, Bool swap);
+-extern PURE _X_HIDDEN int __glXTexImage2DReqSize(const GLbyte * pc, Bool swap);
+-extern PURE _X_HIDDEN int __glXTexEnvfvReqSize(const GLbyte * pc, Bool swap);
+-extern PURE _X_HIDDEN int __glXTexEnvivReqSize(const GLbyte * pc, Bool swap);
+-extern PURE _X_HIDDEN int __glXTexGendvReqSize(const GLbyte * pc, Bool swap);
+-extern PURE _X_HIDDEN int __glXTexGenfvReqSize(const GLbyte * pc, Bool swap);
+-extern PURE _X_HIDDEN int __glXTexGenivReqSize(const GLbyte * pc, Bool swap);
+-extern PURE _X_HIDDEN int __glXMap1dReqSize(const GLbyte * pc, Bool swap);
+-extern PURE _X_HIDDEN int __glXMap1fReqSize(const GLbyte * pc, Bool swap);
+-extern PURE _X_HIDDEN int __glXMap2dReqSize(const GLbyte * pc, Bool swap);
+-extern PURE _X_HIDDEN int __glXMap2fReqSize(const GLbyte * pc, Bool swap);
+-extern PURE _X_HIDDEN int __glXPixelMapfvReqSize(const GLbyte * pc, Bool swap);
+-extern PURE _X_HIDDEN int __glXPixelMapuivReqSize(const GLbyte * pc, Bool swap);
+-extern PURE _X_HIDDEN int __glXPixelMapusvReqSize(const GLbyte * pc, Bool swap);
+-extern PURE _X_HIDDEN int __glXDrawPixelsReqSize(const GLbyte * pc, Bool swap);
+-extern PURE _X_HIDDEN int __glXDrawArraysReqSize(const GLbyte * pc, Bool swap);
++ Bool swap, int reqlen);
++extern PURE _X_HIDDEN int __glXTexImage1DReqSize(const GLbyte * pc, Bool swap, int reqlen);
++extern PURE _X_HIDDEN int __glXTexImage2DReqSize(const GLbyte * pc, Bool swap, int reqlen);
++extern PURE _X_HIDDEN int __glXTexEnvfvReqSize(const GLbyte * pc, Bool swap, int reqlen);
++extern PURE _X_HIDDEN int __glXTexEnvivReqSize(const GLbyte * pc, Bool swap, int reqlen);
++extern PURE _X_HIDDEN int __glXTexGendvReqSize(const GLbyte * pc, Bool swap, int reqlen);
++extern PURE _X_HIDDEN int __glXTexGenfvReqSize(const GLbyte * pc, Bool swap, int reqlen);
++extern PURE _X_HIDDEN int __glXTexGenivReqSize(const GLbyte * pc, Bool swap, int reqlen);
++extern PURE _X_HIDDEN int __glXMap1dReqSize(const GLbyte * pc, Bool swap, int reqlen);
++extern PURE _X_HIDDEN int __glXMap1fReqSize(const GLbyte * pc, Bool swap, int reqlen);
++extern PURE _X_HIDDEN int __glXMap2dReqSize(const GLbyte * pc, Bool swap, int reqlen);
++extern PURE _X_HIDDEN int __glXMap2fReqSize(const GLbyte * pc, Bool swap, int reqlen);
++extern PURE _X_HIDDEN int __glXPixelMapfvReqSize(const GLbyte * pc, Bool swap, int reqlen);
++extern PURE _X_HIDDEN int __glXPixelMapuivReqSize(const GLbyte * pc, Bool swap, int reqlen);
++extern PURE _X_HIDDEN int __glXPixelMapusvReqSize(const GLbyte * pc, Bool swap, int reqlen);
++extern PURE _X_HIDDEN int __glXDrawPixelsReqSize(const GLbyte * pc, Bool swap, int reqlen);
++extern PURE _X_HIDDEN int __glXDrawArraysReqSize(const GLbyte * pc, Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXPrioritizeTexturesReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXTexSubImage1DReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXTexSubImage2DReqSize(const GLbyte * pc,
+- Bool swap);
+-extern PURE _X_HIDDEN int __glXColorTableReqSize(const GLbyte * pc, Bool swap);
++ Bool swap, int reqlen);
++extern PURE _X_HIDDEN int __glXColorTableReqSize(const GLbyte * pc, Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXColorTableParameterfvReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXColorTableParameterivReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXColorSubTableReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXConvolutionFilter1DReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXConvolutionFilter2DReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXConvolutionParameterfvReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXConvolutionParameterivReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXSeparableFilter2DReqSize(const GLbyte * pc,
+- Bool swap);
+-extern PURE _X_HIDDEN int __glXTexImage3DReqSize(const GLbyte * pc, Bool swap);
++ Bool swap, int reqlen);
++extern PURE _X_HIDDEN int __glXTexImage3DReqSize(const GLbyte * pc, Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXTexSubImage3DReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXCompressedTexImage1DARBReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXCompressedTexImage2DARBReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXCompressedTexImage3DARBReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXCompressedTexSubImage1DARBReqSize(const GLbyte *
+- pc, Bool swap);
++ pc, Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXCompressedTexSubImage2DARBReqSize(const GLbyte *
+- pc, Bool swap);
++ pc, Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXCompressedTexSubImage3DARBReqSize(const GLbyte *
+- pc, Bool swap);
++ pc, Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXProgramStringARBReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXDrawBuffersARBReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXPointParameterfvEXTReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXLoadProgramNVReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXProgramParameters4dvNVReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXProgramParameters4fvNVReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXRequestResidentProgramsNVReqSize(const GLbyte *
+- pc, Bool swap);
++ pc, Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXVertexAttribs1dvNVReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXVertexAttribs1fvNVReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXVertexAttribs1svNVReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXVertexAttribs2dvNVReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXVertexAttribs2fvNVReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXVertexAttribs2svNVReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXVertexAttribs3dvNVReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXVertexAttribs3fvNVReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXVertexAttribs3svNVReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXVertexAttribs4dvNVReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXVertexAttribs4fvNVReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXVertexAttribs4svNVReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXVertexAttribs4ubvNVReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXPointParameterivNVReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXProgramNamedParameter4dvNVReqSize(const GLbyte *
+- pc, Bool swap);
++ pc, Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXProgramNamedParameter4fvNVReqSize(const GLbyte *
+- pc, Bool swap);
++ pc, Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXDeleteFramebuffersEXTReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+ extern PURE _X_HIDDEN int __glXDeleteRenderbuffersEXTReqSize(const GLbyte * pc,
+- Bool swap);
++ Bool swap, int reqlen);
+
+ #undef PURE
+
+diff --git a/glx/rensize.c b/glx/rensize.c
+index 6ee0f9c..a532467 100644
+--- a/glx/rensize.c
++++ b/glx/rensize.c
+@@ -44,7 +44,7 @@
+ ((a & 0xff00U)<<8) | ((a & 0xffU)<<24))
+
+ int
+-__glXMap1dReqSize(const GLbyte * pc, Bool swap)
++__glXMap1dReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLenum target;
+ GLint order;
+@@ -61,7 +61,7 @@ __glXMap1dReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ int
+-__glXMap1fReqSize(const GLbyte * pc, Bool swap)
++__glXMap1fReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLenum target;
+ GLint order;
+@@ -86,7 +86,7 @@ Map2Size(int k, int majorOrder, int minorOrder)
+ }
+
+ int
+-__glXMap2dReqSize(const GLbyte * pc, Bool swap)
++__glXMap2dReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLenum target;
+ GLint uorder, vorder;
+@@ -103,7 +103,7 @@ __glXMap2dReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ int
+-__glXMap2fReqSize(const GLbyte * pc, Bool swap)
++__glXMap2fReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ GLenum target;
+ GLint uorder, vorder;
+@@ -359,13 +359,14 @@ __glXTypeSize(GLenum enm)
+ }
+
+ int
+-__glXDrawArraysReqSize(const GLbyte * pc, Bool swap)
++__glXDrawArraysReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ __GLXdispatchDrawArraysHeader *hdr = (__GLXdispatchDrawArraysHeader *) pc;
+ __GLXdispatchDrawArraysComponentHeader *compHeader;
+ GLint numVertexes = hdr->numVertexes;
+ GLint numComponents = hdr->numComponents;
+ GLint arrayElementSize = 0;
++ GLint x, size;
+ int i;
+
+ if (swap) {
+@@ -374,6 +375,13 @@ __glXDrawArraysReqSize(const GLbyte * pc, Bool swap)
+ }
+
+ pc += sizeof(__GLXdispatchDrawArraysHeader);
++ reqlen -= sizeof(__GLXdispatchDrawArraysHeader);
++
++ size = safe_mul(sizeof(__GLXdispatchDrawArraysComponentHeader),
++ numComponents);
++ if (size < 0 || reqlen < 0 || reqlen < size)
++ return -1;
++
+ compHeader = (__GLXdispatchDrawArraysComponentHeader *) pc;
+
+ for (i = 0; i < numComponents; i++) {
+@@ -417,17 +425,18 @@ __glXDrawArraysReqSize(const GLbyte * pc, Bool swap)
+ return -1;
+ }
+
+- arrayElementSize += __GLX_PAD(numVals * __glXTypeSize(datatype));
++ x = safe_pad(safe_mul(numVals, __glXTypeSize(datatype)));
++ if ((arrayElementSize = safe_add(arrayElementSize, x)) < 0)
++ return -1;
+
+ pc += sizeof(__GLXdispatchDrawArraysComponentHeader);
+ }
+
+- return ((numComponents * sizeof(__GLXdispatchDrawArraysComponentHeader)) +
+- (numVertexes * arrayElementSize));
++ return safe_add(size, safe_mul(numVertexes, arrayElementSize));
+ }
+
+ int
+-__glXSeparableFilter2DReqSize(const GLbyte * pc, Bool swap)
++__glXSeparableFilter2DReqSize(const GLbyte * pc, Bool swap, int reqlen)
+ {
+ __GLXdispatchConvolutionFilterHeader *hdr =
+ (__GLXdispatchConvolutionFilterHeader *) pc;
+--
+1.9.3
+
diff --git a/patches/source/xorg-server/patch/xorg-server/x11.startwithblackscreen.diff b/patches/source/xorg-server/patch/xorg-server/x11.startwithblackscreen.diff
new file mode 100644
index 000000000..8c0e3b546
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/x11.startwithblackscreen.diff
@@ -0,0 +1,14 @@
+diff -Nur xorg-server-1.12.1.orig/dix/window.c xorg-server-1.12.1/dix/window.c
+--- xorg-server-1.12.1.orig/dix/window.c 2012-03-29 21:57:25.000000000 -0500
++++ xorg-server-1.12.1/dix/window.c 2012-04-13 22:01:24.456073603 -0500
+@@ -145,8 +145,8 @@
+
+ Bool bgNoneRoot = FALSE;
+
+-static unsigned char _back_lsb[4] = { 0x88, 0x22, 0x44, 0x11 };
+-static unsigned char _back_msb[4] = { 0x11, 0x44, 0x22, 0x88 };
++static unsigned char _back_lsb[4] = { 0x00, 0x00, 0x00, 0x00 };
++static unsigned char _back_msb[4] = { 0x00, 0x00, 0x00, 0x00 };
+
+ static Bool WindowParentHasDeviceCursor(WindowPtr pWin,
+ DeviceIntPtr pDev, CursorPtr pCurs);
diff --git a/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-10971.diff b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-10971.diff
new file mode 100644
index 000000000..00ed28ac3
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-10971.diff
@@ -0,0 +1,40 @@
+From ba336b24052122b136486961c82deac76bbde455 Mon Sep 17 00:00:00 2001
+From: Michal Srb <msrb@suse.com>
+Date: Wed, 24 May 2017 15:54:42 +0300
+Subject: Xi: Do not try to swap GenericEvent.
+
+The SProcXSendExtensionEvent must not attempt to swap GenericEvent because
+it is assuming that the event has fixed size and gives the swapping function
+xEvent-sized buffer.
+
+A GenericEvent would be later rejected by ProcXSendExtensionEvent anyway.
+
+Signed-off-by: Michal Srb <msrb@suse.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+diff --git a/Xi/sendexev.c b/Xi/sendexev.c
+index 5e63bfc..5c2e0fc 100644
+--- a/Xi/sendexev.c
++++ b/Xi/sendexev.c
+@@ -95,9 +95,17 @@ SProcXSendExtensionEvent(ClientPtr client)
+
+ eventP = (xEvent *) &stuff[1];
+ for (i = 0; i < stuff->num_events; i++, eventP++) {
++ if (eventP->u.u.type == GenericEvent) {
++ client->errorValue = eventP->u.u.type;
++ return BadValue;
++ }
++
+ proc = EventSwapVector[eventP->u.u.type & 0177];
+- if (proc == NotImplemented) /* no swapping proc; invalid event type? */
++ /* no swapping proc; invalid event type? */
++ if (proc == NotImplemented) {
++ client->errorValue = eventP->u.u.type;
+ return BadValue;
++ }
+ (*proc) (eventP, &eventT);
+ *eventP = eventT;
+ }
+--
+cgit v0.10.2
diff --git a/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-10972.diff b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-10972.diff
new file mode 100644
index 000000000..edddc8d66
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-10972.diff
@@ -0,0 +1,36 @@
+From 05442de962d3dc624f79fc1a00eca3ffc5489ced Mon Sep 17 00:00:00 2001
+From: Michal Srb <msrb@suse.com>
+Date: Wed, 24 May 2017 15:54:39 +0300
+Subject: Xi: Zero target buffer in SProcXSendExtensionEvent.
+
+Make sure that the xEvent eventT is initialized with zeros, the same way as
+in SProcSendEvent.
+
+Some event swapping functions do not overwrite all 32 bytes of xEvent
+structure, for example XSecurityAuthorizationRevoked. Two cooperating
+clients, one swapped and the other not, can send
+XSecurityAuthorizationRevoked event to each other to retrieve old stack data
+from X server. This can be potentialy misused to go around ASLR or
+stack-protector.
+
+Signed-off-by: Michal Srb <msrb@suse.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+diff --git a/Xi/sendexev.c b/Xi/sendexev.c
+index 11d8202..1cf118a 100644
+--- a/Xi/sendexev.c
++++ b/Xi/sendexev.c
+@@ -78,7 +78,7 @@ SProcXSendExtensionEvent(ClientPtr client)
+ {
+ CARD32 *p;
+ int i;
+- xEvent eventT;
++ xEvent eventT = { .u.u.type = 0 };
+ xEvent *eventP;
+ EventSwapPtr proc;
+
+--
+cgit v0.10.2
+
+
diff --git a/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12176.diff b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12176.diff
new file mode 100644
index 000000000..9caf31247
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12176.diff
@@ -0,0 +1,31 @@
+From b747da5e25be944337a9cd1415506fc06b70aa81 Mon Sep 17 00:00:00 2001
+From: Nathan Kidd <nkidd@opentext.com>
+Date: Fri, 9 Jan 2015 10:15:46 -0500
+Subject: Unvalidated extra length in ProcEstablishConnection (CVE-2017-12176)
+
+Reviewed-by: Julien Cristau <jcristau@debian.org>
+Signed-off-by: Nathan Kidd <nkidd@opentext.com>
+Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+diff --git a/dix/dispatch.c b/dix/dispatch.c
+index 8b371b6..176c7a0 100644
+--- a/dix/dispatch.c
++++ b/dix/dispatch.c
+@@ -3702,7 +3702,12 @@ ProcEstablishConnection(ClientPtr client)
+ prefix = (xConnClientPrefix *) ((char *) stuff + sz_xReq);
+ auth_proto = (char *) prefix + sz_xConnClientPrefix;
+ auth_string = auth_proto + pad_to_int32(prefix->nbytesAuthProto);
+- if ((prefix->majorVersion != X_PROTOCOL) ||
++
++ if ((client->req_len << 2) != sz_xReq + sz_xConnClientPrefix +
++ pad_to_int32(prefix->nbytesAuthProto) +
++ pad_to_int32(prefix->nbytesAuthString))
++ reason = "Bad length";
++ else if ((prefix->majorVersion != X_PROTOCOL) ||
+ (prefix->minorVersion != X_PROTOCOL_REVISION))
+ reason = "Protocol version mismatch";
+ else
+--
+cgit v0.10.2
+
+
diff --git a/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12179_p1.diff b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12179_p1.diff
new file mode 100644
index 000000000..0b3734642
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12179_p1.diff
@@ -0,0 +1,42 @@
+From 211e05ac85a294ef361b9f80d689047fa52b9076 Mon Sep 17 00:00:00 2001
+From: Michal Srb <msrb@suse.com>
+Date: Fri, 7 Jul 2017 17:21:46 +0200
+Subject: Xi: Test exact size of XIBarrierReleasePointer
+
+Otherwise a client can send any value of num_barriers and cause reading or swapping of values on heap behind the receive buffer.
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+diff --git a/Xi/xibarriers.c b/Xi/xibarriers.c
+index af1562e..d82ecb6 100644
+--- a/Xi/xibarriers.c
++++ b/Xi/xibarriers.c
+@@ -830,10 +830,13 @@ SProcXIBarrierReleasePointer(ClientPtr client)
+ REQUEST(xXIBarrierReleasePointerReq);
+ int i;
+
+- info = (xXIBarrierReleasePointerInfo*) &stuff[1];
+-
+ swaps(&stuff->length);
++ REQUEST_AT_LEAST_SIZE(xXIBarrierReleasePointerReq);
++
+ swapl(&stuff->num_barriers);
++ REQUEST_FIXED_SIZE(xXIBarrierReleasePointerReq, stuff->num_barriers * sizeof(xXIBarrierReleasePointerInfo));
++
++ info = (xXIBarrierReleasePointerInfo*) &stuff[1];
+ for (i = 0; i < stuff->num_barriers; i++, info++) {
+ swaps(&info->deviceid);
+ swapl(&info->barrier);
+@@ -853,7 +856,7 @@ ProcXIBarrierReleasePointer(ClientPtr client)
+ xXIBarrierReleasePointerInfo *info;
+
+ REQUEST(xXIBarrierReleasePointerReq);
+- REQUEST_AT_LEAST_SIZE(xXIBarrierReleasePointerReq);
++ REQUEST_FIXED_SIZE(xXIBarrierReleasePointerReq, stuff->num_barriers * sizeof(xXIBarrierReleasePointerInfo));
+
+ info = (xXIBarrierReleasePointerInfo*) &stuff[1];
+ for (i = 0; i < stuff->num_barriers; i++, info++) {
+--
+cgit v0.10.2
+
+
diff --git a/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12179_p2.diff b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12179_p2.diff
new file mode 100644
index 000000000..346756033
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12179_p2.diff
@@ -0,0 +1,46 @@
+From d088e3c1286b548a58e62afdc70bb40981cdb9e8 Mon Sep 17 00:00:00 2001
+From: Nathan Kidd <nkidd@opentext.com>
+Date: Fri, 9 Jan 2015 10:04:41 -0500
+Subject: Xi: integer overflow and unvalidated length in
+ (S)ProcXIBarrierReleasePointer
+
+[jcristau: originally this patch fixed the same issue as commit
+ 211e05ac85 "Xi: Test exact size of XIBarrierReleasePointer", with the
+ addition of these checks]
+
+This addresses CVE-2017-12179
+
+Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Reviewed-by: Julien Cristau <jcristau@debian.org>
+Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Signed-off-by: Nathan Kidd <nkidd@opentext.com>
+Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+diff --git a/Xi/xibarriers.c b/Xi/xibarriers.c
+index d82ecb6..d0be701 100644
+--- a/Xi/xibarriers.c
++++ b/Xi/xibarriers.c
+@@ -834,6 +834,8 @@ SProcXIBarrierReleasePointer(ClientPtr client)
+ REQUEST_AT_LEAST_SIZE(xXIBarrierReleasePointerReq);
+
+ swapl(&stuff->num_barriers);
++ if (stuff->num_barriers > UINT32_MAX / sizeof(xXIBarrierReleasePointerInfo))
++ return BadLength;
+ REQUEST_FIXED_SIZE(xXIBarrierReleasePointerReq, stuff->num_barriers * sizeof(xXIBarrierReleasePointerInfo));
+
+ info = (xXIBarrierReleasePointerInfo*) &stuff[1];
+@@ -856,6 +858,9 @@ ProcXIBarrierReleasePointer(ClientPtr client)
+ xXIBarrierReleasePointerInfo *info;
+
+ REQUEST(xXIBarrierReleasePointerReq);
++ REQUEST_AT_LEAST_SIZE(xXIBarrierReleasePointerReq);
++ if (stuff->num_barriers > UINT32_MAX / sizeof(xXIBarrierReleasePointerInfo))
++ return BadLength;
+ REQUEST_FIXED_SIZE(xXIBarrierReleasePointerReq, stuff->num_barriers * sizeof(xXIBarrierReleasePointerInfo));
+
+ info = (xXIBarrierReleasePointerInfo*) &stuff[1];
+--
+cgit v0.10.2
+
+
diff --git a/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12183.diff b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12183.diff
new file mode 100644
index 000000000..b88ba950e
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12183.diff
@@ -0,0 +1,95 @@
+From 55caa8b08c84af2b50fbc936cf334a5a93dd7db5 Mon Sep 17 00:00:00 2001
+From: Nathan Kidd <nkidd@opentext.com>
+Date: Fri, 9 Jan 2015 11:43:05 -0500
+Subject: xfixes: unvalidated lengths (CVE-2017-12183)
+
+v2: Use before swap (Jeremy Huddleston Sequoia)
+
+v3: Fix wrong XFixesCopyRegion checks (Alan Coopersmith)
+
+Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Reviewed-by: Julien Cristau <jcristau@debian.org>
+Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Signed-off-by: Nathan Kidd <nkidd@opentext.com>
+Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+diff --git a/xfixes/cursor.c b/xfixes/cursor.c
+index c1ab3be..dc447ed 100644
+--- a/xfixes/cursor.c
++++ b/xfixes/cursor.c
+@@ -281,6 +281,7 @@ int _X_COLD
+ SProcXFixesSelectCursorInput(ClientPtr client)
+ {
+ REQUEST(xXFixesSelectCursorInputReq);
++ REQUEST_SIZE_MATCH(xXFixesSelectCursorInputReq);
+
+ swaps(&stuff->length);
+ swapl(&stuff->window);
+@@ -414,7 +415,7 @@ ProcXFixesSetCursorName(ClientPtr client)
+ REQUEST(xXFixesSetCursorNameReq);
+ Atom atom;
+
+- REQUEST_AT_LEAST_SIZE(xXFixesSetCursorNameReq);
++ REQUEST_FIXED_SIZE(xXFixesSetCursorNameReq, stuff->nbytes);
+ VERIFY_CURSOR(pCursor, stuff->cursor, client, DixSetAttrAccess);
+ tchar = (char *) &stuff[1];
+ atom = MakeAtom(tchar, stuff->nbytes, TRUE);
+@@ -1007,6 +1008,8 @@ SProcXFixesCreatePointerBarrier(ClientPtr client)
+ int i;
+ CARD16 *in_devices = (CARD16 *) &stuff[1];
+
++ REQUEST_AT_LEAST_SIZE(xXFixesCreatePointerBarrierReq);
++
+ swaps(&stuff->length);
+ swaps(&stuff->num_devices);
+ REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq, pad_to_int32(stuff->num_devices));
+diff --git a/xfixes/region.c b/xfixes/region.c
+index e773701..7c0a7d2 100644
+--- a/xfixes/region.c
++++ b/xfixes/region.c
+@@ -359,6 +359,7 @@ ProcXFixesCopyRegion(ClientPtr client)
+ RegionPtr pSource, pDestination;
+
+ REQUEST(xXFixesCopyRegionReq);
++ REQUEST_SIZE_MATCH(xXFixesCopyRegionReq);
+
+ VERIFY_REGION(pSource, stuff->source, client, DixReadAccess);
+ VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess);
+@@ -375,7 +376,7 @@ SProcXFixesCopyRegion(ClientPtr client)
+ REQUEST(xXFixesCopyRegionReq);
+
+ swaps(&stuff->length);
+- REQUEST_AT_LEAST_SIZE(xXFixesCopyRegionReq);
++ REQUEST_SIZE_MATCH(xXFixesCopyRegionReq);
+ swapl(&stuff->source);
+ swapl(&stuff->destination);
+ return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
+diff --git a/xfixes/saveset.c b/xfixes/saveset.c
+index 2043153..fd9c7a1 100644
+--- a/xfixes/saveset.c
++++ b/xfixes/saveset.c
+@@ -62,6 +62,7 @@ int _X_COLD
+ SProcXFixesChangeSaveSet(ClientPtr client)
+ {
+ REQUEST(xXFixesChangeSaveSetReq);
++ REQUEST_SIZE_MATCH(xXFixesChangeSaveSetReq);
+
+ swaps(&stuff->length);
+ swapl(&stuff->window);
+diff --git a/xfixes/xfixes.c b/xfixes/xfixes.c
+index 77efd64..248bf02 100644
+--- a/xfixes/xfixes.c
++++ b/xfixes/xfixes.c
+@@ -160,6 +160,7 @@ static _X_COLD int
+ SProcXFixesQueryVersion(ClientPtr client)
+ {
+ REQUEST(xXFixesQueryVersionReq);
++ REQUEST_SIZE_MATCH(xXFixesQueryVersionReq);
+
+ swaps(&stuff->length);
+ swapl(&stuff->majorVersion);
+--
+cgit v0.10.2
+
+
diff --git a/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-13723.diff b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-13723.diff
new file mode 100644
index 000000000..6e37be485
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-13723.diff
@@ -0,0 +1,116 @@
+From 94f11ca5cf011ef123bd222cabeaef6f424d76ac Mon Sep 17 00:00:00 2001
+From: Keith Packard <keithp@keithp.com>
+Date: Thu, 27 Jul 2017 10:08:32 -0700
+Subject: xkb: Handle xkb formated string output safely (CVE-2017-13723)
+
+Generating strings for XKB data used a single shared static buffer,
+which offered several opportunities for errors. Use a ring of
+resizable buffers instead, to avoid problems when strings end up
+longer than anticipated.
+
+Reviewed-by: Michal Srb <msrb@suse.com>
+Signed-off-by: Keith Packard <keithp@keithp.com>
+Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+diff --git a/xkb/xkbtext.c b/xkb/xkbtext.c
+index ead2b1a..d2a2567 100644
+--- a/xkb/xkbtext.c
++++ b/xkb/xkbtext.c
+@@ -47,23 +47,27 @@
+
+ /***====================================================================***/
+
+-#define BUFFER_SIZE 512
+-
+-static char textBuffer[BUFFER_SIZE];
+-static int tbNext = 0;
++#define NUM_BUFFER 8
++static struct textBuffer {
++ int size;
++ char *buffer;
++} textBuffer[NUM_BUFFER];
++static int textBufferIndex;
+
+ static char *
+ tbGetBuffer(unsigned size)
+ {
+- char *rtrn;
++ struct textBuffer *tb;
+
+- if (size >= BUFFER_SIZE)
+- return NULL;
+- if ((BUFFER_SIZE - tbNext) <= size)
+- tbNext = 0;
+- rtrn = &textBuffer[tbNext];
+- tbNext += size;
+- return rtrn;
++ tb = &textBuffer[textBufferIndex];
++ textBufferIndex = (textBufferIndex + 1) % NUM_BUFFER;
++
++ if (size > tb->size) {
++ free(tb->buffer);
++ tb->buffer = xnfalloc(size);
++ tb->size = size;
++ }
++ return tb->buffer;
+ }
+
+ /***====================================================================***/
+@@ -79,8 +83,6 @@ XkbAtomText(Atom atm, unsigned format)
+ int len;
+
+ len = strlen(atmstr) + 1;
+- if (len > BUFFER_SIZE)
+- len = BUFFER_SIZE - 2;
+ rtrn = tbGetBuffer(len);
+ strlcpy(rtrn, atmstr, len);
+ }
+@@ -128,8 +130,6 @@ XkbVModIndexText(XkbDescPtr xkb, unsigned ndx, unsigned format)
+ len = strlen(tmp) + 1;
+ if (format == XkbCFile)
+ len += 4;
+- if (len >= BUFFER_SIZE)
+- len = BUFFER_SIZE - 1;
+ rtrn = tbGetBuffer(len);
+ if (format == XkbCFile) {
+ strcpy(rtrn, "vmod_");
+@@ -140,6 +140,8 @@ XkbVModIndexText(XkbDescPtr xkb, unsigned ndx, unsigned format)
+ return rtrn;
+ }
+
++#define VMOD_BUFFER_SIZE 512
++
+ char *
+ XkbVModMaskText(XkbDescPtr xkb,
+ unsigned modMask, unsigned mask, unsigned format)
+@@ -147,7 +149,7 @@ XkbVModMaskText(XkbDescPtr xkb,
+ register int i, bit;
+ int len;
+ char *mm, *rtrn;
+- char *str, buf[BUFFER_SIZE];
++ char *str, buf[VMOD_BUFFER_SIZE];
+
+ if ((modMask == 0) && (mask == 0)) {
+ rtrn = tbGetBuffer(5);
+@@ -173,7 +175,7 @@ XkbVModMaskText(XkbDescPtr xkb,
+ len = strlen(tmp) + 1 + (str == buf ? 0 : 1);
+ if (format == XkbCFile)
+ len += 4;
+- if ((str - (buf + len)) <= BUFFER_SIZE) {
++ if ((str - (buf + len)) <= VMOD_BUFFER_SIZE) {
+ if (str != buf) {
+ if (format == XkbCFile)
+ *str++ = '|';
+@@ -199,8 +201,6 @@ XkbVModMaskText(XkbDescPtr xkb,
+ len = 0;
+ if (str)
+ len += strlen(str) + (mm == NULL ? 0 : 1);
+- if (len >= BUFFER_SIZE)
+- len = BUFFER_SIZE - 1;
+ rtrn = tbGetBuffer(len + 1);
+ rtrn[0] = '\0';
+
+--
+cgit v0.10.2
+
+
diff --git a/patches/source/xorg-server/post-install/xorg-server.post-install b/patches/source/xorg-server/post-install/xorg-server.post-install
new file mode 100644
index 000000000..e21a0f03a
--- /dev/null
+++ b/patches/source/xorg-server/post-install/xorg-server.post-install
@@ -0,0 +1,66 @@
+# Create the configuration directories for xorg-server 1.9.x
+mkdir -p $PKG/etc/X11/xorg.conf.d $PKG/usr/share/X11/xorg.conf.d
+
+# Create a sample keyboard layout
+# Enable zapping by default
+cat << EOF > $PKG/usr/share/X11/xorg.conf.d/90-keyboard-layout.conf
+Section "InputClass"
+ Identifier "keyboard-all"
+ MatchIsKeyboard "on"
+ MatchDevicePath "/dev/input/event*"
+ Driver "evdev"
+ Option "XkbLayout" "us"
+ #Option "XkbVariant" ""
+ Option "XkbOptions" "terminate:ctrl_alt_bksp"
+EndSection
+
+# READ THIS FOR CUSTOM KEYBOARD INFORMATION
+#
+# If you want to add a custom model/layout/variant to X, you will need to COPY
+# this file to /etc/X11/xorg.conf.d/ and edit that copy. After editing it to
+# suit, you will need to restart X.
+#
+# Here's an example of the lines from above:
+#
+# Section "InputClass"
+# Identifier "keyboard-all"
+# MatchIsKeyboard "on"
+# MatchDevicePath "/dev/input/event*"
+# Driver "evdev"
+# Option "XkbLayout" "us"
+# Option "XkbVariant" "intl"
+# Option "XkbOptions" "compose:rwin,terminate:ctrl_alt_bksp"
+# EndSection
+#
+# Many desktop environments, including KDE and Xfce, have their own methods to
+# configure keyboard layouts and such if you'd like to use them.
+#
+# If you prefer to use the "old" way of configuring keyboards (without input
+# device hotplugging), then you'll need to add the following lines to the
+# ServerFlags section of /etc/X11/xorg.conf:
+# Option "AllowEmptyInput" "false"
+# Option "AutoAddDevices" "false"
+# Option "AutoEnableDevices" "false"
+# Alternatively, you can break this up into separate "stubs" in the xorg.conf.d/
+# directory, but that's your call. Assuming you elect to keep a monolithic
+# /etc/X11/xorg.conf file, you can now edit the Keyboard section as usual.
+
+EOF
+
+# Add COPYING file:
+mkdir -p $PKG/usr/doc/xorg-server-$MODULAR_PACKAGE_VERSION
+cp -a COPYING $PKG/usr/doc/xorg-server-$MODULAR_PACKAGE_VERSION
+
+# Don't mess with my /var/log/ permissions:
+rmdir $PKG/var/log
+rmdir $PKG/var
+
+# While I hate to have X11 take over another generic-sounding
+# piece of prime filesystem real estate, this symlink will
+# direct (for now) proprietary X drivers into the corrent
+# location:
+
+( cd $PKG/usr/lib
+ rm -rf modules
+ ln -sf xorg/modules .
+)
diff --git a/patches/source/xorg-server/slack-desc/xorg-server b/patches/source/xorg-server/slack-desc/xorg-server
new file mode 100644
index 000000000..9d25b405d
--- /dev/null
+++ b/patches/source/xorg-server/slack-desc/xorg-server
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+xorg-server: xorg-server (The Xorg server, the core of the X Window System)
+xorg-server:
+xorg-server: Xorg is a full featured X server that was originally designed for UNIX
+xorg-server: and UNIX-like operating systems running on Intel x86 hardware. It now
+xorg-server: runs on a wider range of hardware and OS platforms. This work was
+xorg-server: derived by the X.Org Foundation from the XFree86 Project's XFree86
+xorg-server: 4.4rc2 release. The XFree86 release was originally derived from X386
+xorg-server: 1.2 by Thomas Roell which was contributed to X11R5 by Snitily Graphics
+xorg-server: Consulting Service.
+xorg-server:
+xorg-server: The home page for the X project is: http://www.x.org
diff --git a/patches/source/xorg-server/slack-desc/xorg-server-xephyr b/patches/source/xorg-server/slack-desc/xorg-server-xephyr
new file mode 100644
index 000000000..640f3d189
--- /dev/null
+++ b/patches/source/xorg-server/slack-desc/xorg-server-xephyr
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+xorg-server-xephyr: xorg-server-xephyr (Improved nested X server/client)
+xorg-server-xephyr:
+xorg-server-xephyr: Xephyr is a nested X-Client like Xnest, but with some additional
+xorg-server-xephyr: features like XRender support.
+xorg-server-xephyr:
+xorg-server-xephyr:
+xorg-server-xephyr:
+xorg-server-xephyr:
+xorg-server-xephyr:
+xorg-server-xephyr:
+xorg-server-xephyr:
diff --git a/patches/source/xorg-server/slack-desc/xorg-server-xnest b/patches/source/xorg-server/slack-desc/xorg-server-xnest
new file mode 100644
index 000000000..393f93bdd
--- /dev/null
+++ b/patches/source/xorg-server/slack-desc/xorg-server-xnest
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+xorg-server-xnest: xorg-server-xnest (a nested X server)
+xorg-server-xnest:
+xorg-server-xnest: Xnest is an experimental nested server for X that acts as both a
+xorg-server-xnest: client and a server. Xnest is a client of the real server which
+xorg-server-xnest: manages windows and graphics requests on its behalf. Xnest is a
+xorg-server-xnest: server to its own clients. Xnest manages windows and graphics
+xorg-server-xnest: requests on their behalf. To these clients Xnest appears to be a
+xorg-server-xnest: conventional server.
+xorg-server-xnest:
+xorg-server-xnest:
+xorg-server-xnest:
diff --git a/patches/source/xorg-server/slack-desc/xorg-server-xvfb b/patches/source/xorg-server/slack-desc/xorg-server-xvfb
new file mode 100644
index 000000000..aff9c642c
--- /dev/null
+++ b/patches/source/xorg-server/slack-desc/xorg-server-xvfb
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+xorg-server-xvfb: xorg-server-xvfb (virtual framebuffer X server)
+xorg-server-xvfb:
+xorg-server-xvfb: Xvfb is an X server that can run on machines with no display hardware
+xorg-server-xvfb: and no physical input devices. It emulates a dumb framebuffer using
+xorg-server-xvfb: virtual memory. The primary use of this server is intended to be
+xorg-server-xvfb: server testing. The mfb or cfb code for any depth can be exercised
+xorg-server-xvfb: with this server without the need for real hardware that supports the
+xorg-server-xvfb: desired depths. A secondary use is testing clients against unusual
+xorg-server-xvfb: depths and screen configurations.
+xorg-server-xvfb:
+xorg-server-xvfb:
diff --git a/patches/source/xorg-server/x11.SlackBuild b/patches/source/xorg-server/x11.SlackBuild
new file mode 100755
index 000000000..c3887dff2
--- /dev/null
+++ b/patches/source/xorg-server/x11.SlackBuild
@@ -0,0 +1,381 @@
+#!/bin/sh
+# Copyright 2007-2014 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ chown -R root:root .
+ find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.*
+ )
+ done
+ )
+ fi
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+
+ # If there's a ChangeLog, installing at least part of the recent history
+ # is useful, but don't let it get totally out of control:
+ if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # Strip binaries:
+ ( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/xorg-server/xorg-server.SlackBuild b/patches/source/xorg-server/xorg-server.SlackBuild
new file mode 100755
index 000000000..688448ec4
--- /dev/null
+++ b/patches/source/xorg-server/xorg-server.SlackBuild
@@ -0,0 +1,2 @@
+UPGRADE_PACKAGES=no ./x11.SlackBuild xserver xorg-server
+mv /tmp/x11-build/*txz /tmp
diff --git a/patches/source/xproto/arch.use.flags b/patches/source/xproto/arch.use.flags
new file mode 100644
index 000000000..11087c884
--- /dev/null
+++ b/patches/source/xproto/arch.use.flags
@@ -0,0 +1,9 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/xproto/build/xproto b/patches/source/xproto/build/xproto
new file mode 100644
index 000000000..a55e8cfcf
--- /dev/null
+++ b/patches/source/xproto/build/xproto
@@ -0,0 +1 @@
+1_slack14.1
diff --git a/patches/source/xproto/configure/configure b/patches/source/xproto/configure/configure
new file mode 100644
index 000000000..dcb1109bd
--- /dev/null
+++ b/patches/source/xproto/configure/configure
@@ -0,0 +1,13 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --with-udev-rules-dir=/lib/udev/rules.d \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/xproto/modularize b/patches/source/xproto/modularize
new file mode 100644
index 000000000..8a28ed93e
--- /dev/null
+++ b/patches/source/xproto/modularize
@@ -0,0 +1,279 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+dri3proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glamor-egl
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXpresent
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+libxshmfence
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+presentproto
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-errors
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-amdgpu
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/xproto/noarch b/patches/source/xproto/noarch
new file mode 100644
index 000000000..8785ee527
--- /dev/null
+++ b/patches/source/xproto/noarch
@@ -0,0 +1,75 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/xproto/package-blacklist b/patches/source/xproto/package-blacklist
new file mode 100644
index 000000000..603b8c31f
--- /dev/null
+++ b/patches/source/xproto/package-blacklist
@@ -0,0 +1,44 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+xf86-video-modesetting
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/xproto/post-install/xproto.post-install b/patches/source/xproto/post-install/xproto.post-install
new file mode 100644
index 000000000..5a3b79b3b
--- /dev/null
+++ b/patches/source/xproto/post-install/xproto.post-install
@@ -0,0 +1,2 @@
+# bloat
+rm -rf $PKG/usr/doc/xproto
diff --git a/patches/source/xproto/slack-desc/xproto b/patches/source/xproto/slack-desc/xproto
new file mode 100644
index 000000000..1c230b1e3
--- /dev/null
+++ b/patches/source/xproto/slack-desc/xproto
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+xproto: xproto (C prototypes for X Window System Core Protocol)
+xproto:
+xproto: xproto is part of X11.
+xproto:
+xproto: For more information about the X.Org Foundation (the providers of the
+xproto: X.Org implementation of the X Window System), see their website:
+xproto:
+xproto: http://www.x.org
+xproto:
+xproto:
+xproto:
diff --git a/patches/source/xproto/x11.SlackBuild b/patches/source/xproto/x11.SlackBuild
new file mode 100755
index 000000000..c3887dff2
--- /dev/null
+++ b/patches/source/xproto/x11.SlackBuild
@@ -0,0 +1,381 @@
+#!/bin/sh
+# Copyright 2007-2014 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ chown -R root:root .
+ find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.*
+ )
+ done
+ )
+ fi
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+
+ # If there's a ChangeLog, installing at least part of the recent history
+ # is useful, but don't let it get totally out of control:
+ if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # Strip binaries:
+ ( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/xproto/xproto.SlackBuild b/patches/source/xproto/xproto.SlackBuild
new file mode 100755
index 000000000..34af847e3
--- /dev/null
+++ b/patches/source/xproto/xproto.SlackBuild
@@ -0,0 +1,2 @@
+UPGRADE_PACKAGES=no ./x11.SlackBuild proto xproto
+mv /tmp/x11-build/xproto*txz /tmp
diff --git a/patches/source/xscreensaver/dump.android.osx.sources.sh b/patches/source/xscreensaver/dump.android.osx.sources.sh
new file mode 100755
index 000000000..3993f510b
--- /dev/null
+++ b/patches/source/xscreensaver/dump.android.osx.sources.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+# Repacks the xscreensaver tarball to remove the unneeded OSX sources.
+
+VERSION=${VERSION:-$(echo xscreensaver-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+
+tar xf xscreensaver-${VERSION}.tar.xz || exit 1
+mv xscreensaver-${VERSION}.tar.xz xscreensaver-${VERSION}.tar.xz.orig
+rm -r xscreensaver-${VERSION}/OSX/*
+rm -r xscreensaver-${VERSION}/android/*
+tar cf xscreensaver-${VERSION}.tar xscreensaver-${VERSION}
+rm -r xscreensaver-${VERSION}
+xz -9 xscreensaver-${VERSION}.tar
+touch -r xscreensaver-${VERSION}.tar.xz.orig xscreensaver-${VERSION}.tar.xz
+rm xscreensaver-${VERSION}.tar.xz.orig
diff --git a/patches/source/xscreensaver/setuid.c b/patches/source/xscreensaver/setuid.c
new file mode 100644
index 000000000..343dcf097
--- /dev/null
+++ b/patches/source/xscreensaver/setuid.c
@@ -0,0 +1,274 @@
+/* setuid.c --- management of runtime privileges.
+ * xscreensaver, Copyright (c) 1993-1998 Jamie Zawinski <jwz@jwz.org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation. No representations are made about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
+ * implied warranty.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <X11/Xlib.h> /* not used for much... */
+
+/* This file doesn't need the Xt headers, so stub these types out... */
+#undef XtPointer
+#define XtAppContext void*
+#define XrmDatabase void*
+#define XtIntervalId void*
+#define XtPointer void*
+#define Widget void*
+
+#include "xscreensaver.h"
+
+#ifndef EPERM
+#include <errno.h>
+#endif
+
+#include <pwd.h> /* for getpwnam() and struct passwd */
+#include <grp.h> /* for getgrgid() and struct group */
+
+static const char *
+uid_gid_string (uid_t uid, gid_t gid)
+{
+ static char buf[255];
+ struct passwd *p = 0;
+ struct group *g = 0;
+ p = getpwuid (uid);
+ g = getgrgid (gid);
+ sprintf (buf, "%s/%s (%ld/%ld)",
+ (p && p->pw_name ? p->pw_name : "???"),
+ (g && g->gr_name ? g->gr_name : "???"),
+ (long) uid, (long) gid);
+ return buf;
+}
+
+
+void
+describe_uids (saver_info *si, FILE *out)
+{
+ uid_t uid = getuid();
+ gid_t gid = getgid();
+ uid_t euid = geteuid();
+ gid_t egid = getegid();
+ char *s1 = strdup (uid_gid_string (uid, gid));
+ char *s2 = strdup (uid_gid_string (euid, egid));
+
+ if (si->orig_uid && *si->orig_uid &&
+ (!!strcmp (si->orig_uid, s1) ||
+ !!strcmp (si->orig_uid, s2)))
+ fprintf (out, "%s: initial effective uid/gid was %s\n", blurb(),
+ si->orig_uid);
+
+ fprintf (out, "%s: running as %s", blurb(), s1);
+ if (uid != euid || gid != egid)
+ fprintf (out, "; effectively %s", s2);
+ fprintf(out, "\n");
+ free(s1);
+ free(s2);
+}
+
+
+static int
+set_ids_by_number (uid_t uid, gid_t gid, char **message_ret)
+{
+ int uid_errno = 0;
+ int gid_errno = 0;
+ struct passwd *p = getpwuid (uid);
+ struct group *g = getgrgid (gid);
+
+ if (message_ret)
+ *message_ret = 0;
+
+ /* Rumor has it that some implementations of of setuid() do nothing
+ when called with -1; therefore, if the "nobody" user has a uid of
+ -1, then that would be Really Bad. Rumor further has it that such
+ systems really ought to be using -2 for "nobody", since that works.
+ So, if we get a uid (or gid, for good measure) of -1, switch to -2
+ instead. Note that this must be done after we've looked up the
+ user/group names with getpwuid(-1) and/or getgrgid(-1).
+ */
+ if (gid == (gid_t) -1) gid = (gid_t) -2;
+ if (uid == (uid_t) -1) uid = (uid_t) -2;
+
+ errno = 0;
+ if (setgid (gid) != 0)
+ gid_errno = errno ? errno : -1;
+
+ errno = 0;
+ if (setuid (uid) != 0)
+ uid_errno = errno ? errno : -1;
+
+ if (uid_errno == 0 && gid_errno == 0)
+ {
+ static char buf [1024];
+ sprintf (buf, "changed uid/gid to %s/%s (%ld/%ld).",
+ (p && p->pw_name ? p->pw_name : "???"),
+ (g && g->gr_name ? g->gr_name : "???"),
+ (long) uid, (long) gid);
+ if (message_ret)
+ *message_ret = buf;
+ return 0;
+ }
+ else
+ {
+ char buf [1024];
+ if (gid_errno)
+ {
+ sprintf (buf, "%s: couldn't set gid to %s (%ld)",
+ blurb(),
+ (g && g->gr_name ? g->gr_name : "???"),
+ (long) gid);
+ if (gid_errno == -1)
+ fprintf(stderr, "%s: unknown error\n", buf);
+ else
+ perror(buf);
+ }
+
+ if (uid_errno)
+ {
+ sprintf (buf, "%s: couldn't set uid to %s (%ld)",
+ blurb(),
+ (p && p->pw_name ? p->pw_name : "???"),
+ (long) uid);
+ if (uid_errno == -1)
+ fprintf(stderr, "%s: unknown error\n", buf);
+ else
+ perror(buf);
+ }
+
+ return -1;
+ }
+}
+
+
+/* If we've been run as setuid or setgid to someone else (most likely root)
+ turn off the extra permissions so that random user-specified programs
+ don't get special privileges. (On some systems it is necessary to install
+ this program as setuid root in order to read the passwd file to implement
+ lock-mode.)
+
+ *** WARNING: DO NOT DISABLE ANY OF THE FOLLOWING CODE!
+ If you do so, you will open a security hole. See the sections
+ of the xscreensaver manual titled "LOCKING AND ROOT LOGINS",
+ and "USING XDM".
+ */
+void
+hack_uid (saver_info *si)
+{
+
+ /* Discard privileges, and set the effective user/group ids to the
+ real user/group ids. That is, give up our "chmod +s" rights.
+ */
+ {
+ uid_t euid = geteuid();
+ gid_t egid = getegid();
+ uid_t uid = getuid();
+ gid_t gid = getgid();
+
+ si->orig_uid = strdup (uid_gid_string (euid, egid));
+
+ if (uid != euid || gid != egid)
+ if (set_ids_by_number (uid, gid, &si->uid_message) != 0)
+ saver_exit (si, 1, 0);
+ }
+
+
+ /* Locking can't work when running as root, because we have no way of
+ knowing what the user id of the logged in user is (so we don't know
+ whose password to prompt for.)
+
+ *** WARNING: DO NOT DISABLE THIS CODE!
+ If you do so, you will open a security hole. See the sections
+ of the xscreensaver manual titled "LOCKING AND ROOT LOGINS",
+ and "USING XDM".
+ */
+ if (getuid() == (uid_t) 0)
+ {
+ si->locking_disabled_p = True;
+ si->nolock_reason = "running as root";
+ }
+
+
+ /* If we're running as root, switch to a safer user. This is above and
+ beyond the fact that we've disabling locking, above -- the theory is
+ that running graphics demos as root is just always a stupid thing
+ to do, since they have probably never been security reviewed and are
+ more likely to be buggy than just about any other kind of program.
+ (And that assumes non-malicious code. There are also attacks here.)
+
+ *** WARNING: DO NOT DISABLE THIS CODE!
+ If you do so, you will open a security hole. See the sections
+ of the xscreensaver manual titled "LOCKING AND ROOT LOGINS",
+ and "USING XDM".
+ */
+ if (getuid() == (uid_t) 0)
+ {
+ struct passwd *p;
+
+ p = getpwnam ("nobody");
+ if (! p) p = getpwnam ("noaccess");
+ if (! p) p = getpwnam ("daemon");
+ if (! p)
+ {
+ fprintf (stderr,
+ "%s: running as root, and couldn't find a safer uid.\n",
+ blurb());
+ saver_exit(si, 1, 0);
+ }
+
+ if (set_ids_by_number (p->pw_uid, p->pw_gid, &si->uid_message) != 0)
+ saver_exit (si, -1, 0);
+ }
+
+
+ /* If there's anything even remotely funny looking about the passwd struct,
+ or if we're running as some other user from the list below (a
+ non-comprehensive selection of users known to be privileged in some way,
+ and not normal end-users) then disable locking. If it was possible,
+ switching to "nobody" would be the thing to do, but only root itself has
+ the privs to do that.
+
+ *** WARNING: DO NOT DISABLE THIS CODE!
+ If you do so, you will open a security hole. See the sections
+ of the xscreensaver manual titled "LOCKING AND ROOT LOGINS",
+ and "USING XDM".
+ */
+ {
+ uid_t uid = getuid (); /* get it again */
+ struct passwd *p = getpwuid (uid); /* get it again */
+
+ if (!p ||
+ uid == (uid_t) 0 ||
+ uid == (uid_t) -1 ||
+ uid == (uid_t) -2 ||
+ p->pw_uid == (uid_t) 0 ||
+ p->pw_uid == (uid_t) -1 ||
+ p->pw_uid == (uid_t) -2 ||
+ !p->pw_name ||
+ !*p->pw_name ||
+ !strcmp (p->pw_name, "root") ||
+ !strcmp (p->pw_name, "nobody") ||
+ !strcmp (p->pw_name, "noaccess") ||
+ !strcmp (p->pw_name, "operator") ||
+ !strcmp (p->pw_name, "daemon") ||
+ !strcmp (p->pw_name, "bin") ||
+ !strcmp (p->pw_name, "adm") ||
+ !strcmp (p->pw_name, "sys") ||
+ !strcmp (p->pw_name, "games"))
+ {
+ static char buf [1024];
+ sprintf (buf, "running as %s",
+ (p && p->pw_name && *p->pw_name
+ ? p->pw_name : "<unknown>"));
+ si->nolock_reason = buf;
+ si->locking_disabled_p = True;
+ si->dangerous_uid_p = True;
+ }
+ }
+}
diff --git a/patches/source/xscreensaver/slack-desc b/patches/source/xscreensaver/slack-desc
new file mode 100644
index 000000000..ea0efe024
--- /dev/null
+++ b/patches/source/xscreensaver/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+xscreensaver: xscreensaver (a screen saver and locker for X)
+xscreensaver:
+xscreensaver: A modular screen saver and locker for the X Window System. Highly
+xscreensaver: customizable: allows the use of any program that can draw on the
+xscreensaver: root window as a display mode. More than 100 display modes are
+xscreensaver: included in this package.
+xscreensaver:
+xscreensaver: Homepage: http://www.jwz.org/xscreensaver
+xscreensaver:
+xscreensaver:
+xscreensaver:
diff --git a/patches/source/xscreensaver/xscreensaver-getimage-file-5.14 b/patches/source/xscreensaver/xscreensaver-getimage-file-5.14
new file mode 100644
index 000000000..bc7bcbd9e
--- /dev/null
+++ b/patches/source/xscreensaver/xscreensaver-getimage-file-5.14
@@ -0,0 +1,555 @@
+#!/usr/bin/perl -w
+# Copyright © 2001-2011 Jamie Zawinski <jwz@jwz.org>.
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation. No representations are made about the suitability of this
+# software for any purpose. It is provided "as is" without express or
+# implied warranty.
+#
+# This program chooses a random file from under the given directory, and
+# prints its name. The file will be an image file whose dimensions are
+# larger than a certain minimum size.
+#
+# The various xscreensaver hacks that manipulate images ("jigsaw", etc.) get
+# the image to manipulate by running the "xscreensaver-getimage" program.
+#
+# Under X11, the "xscreensaver-getimage" program invokes this script,
+# depending on the value of the "chooseRandomImages" and "imageDirectory"
+# settings in the ~/.xscreensaver file (or .../app-defaults/XScreenSaver).
+# The screen savers invoke "xscreensaver-getimage" via utils/grabclient.c,
+# which then invokes this script.
+#
+# Under Cocoa, this script lives inside the .saver bundle, and is invoked
+# directly from utils/grabclient.c.
+#
+# Created: 12-Apr-01.
+
+require 5;
+#use diagnostics; # Fails on some MacOS 10.5 systems
+use strict;
+
+use POSIX;
+use Fcntl;
+
+use Fcntl ':flock'; # import LOCK_* constants
+
+use POSIX ':fcntl_h'; # S_ISDIR was here in Perl 5.6
+import Fcntl ':mode' unless defined &S_ISUID; # but it is here in Perl 5.8
+ # but in Perl 5.10, both of these load, and cause errors!
+ # So we have to check for S_ISUID instead of S_ISDIR? WTF?
+
+use bytes; # Larry can take Unicode and shove it up his ass sideways.
+ # Perl 5.8.0 causes us to start getting incomprehensible
+ # errors about UTF-8 all over the place without this.
+
+my $progname = $0; $progname =~ s@.*/@@g;
+my $version = q{ $Revision: 1.29 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/;
+
+my $verbose = 0;
+
+# Whether to use MacOS X's Spotlight to generate the list of files.
+# When set to -1, uses Spotlight if "mdfind" exists.
+#
+# (In my experience, this isn't actually any faster, and might not find
+# everything if your Spotlight index is out of date, which happens often.)
+#
+my $use_spotlight_p = 0;
+
+# Whether to cache the results of the last run.
+#
+my $cache_p = 1;
+
+# Regenerate the cache if it is older than this many seconds.
+#
+my $cache_max_age = 60 * 60 * 3; # 3 hours
+
+
+# This matches files that we are allowed to use as images (case-insensitive.)
+# Anything not matching this is ignored. This is so you can point your
+# imageDirectory at directory trees that have things other than images in
+# them, but it assumes that you gave your images sensible file extensions.
+#
+my @good_extensions = ('jpg', 'jpeg', 'pjpeg', 'pjpg', 'png', 'gif',
+ 'tif', 'tiff', 'xbm', 'xpm');
+my $good_file_re = '\.(' . join("|", @good_extensions) . ')$';
+
+# This matches file extensions that might occur in an image directory,
+# and that are never used in the name of a subdirectory. This is an
+# optimization that prevents us from having to stat() those files to
+# tell whether they are directories or not. (It speeds things up a
+# lot. Don't give your directories stupid names.)
+#
+my @nondir_extensions = ('ai', 'bmp', 'bz2', 'cr2', 'crw', 'db',
+ 'dmg', 'eps', 'gz', 'hqx', 'htm', 'html', 'icns', 'ilbm', 'mov',
+ 'nef', 'pbm', 'pdf', 'pl', 'ppm', 'ps', 'psd', 'sea', 'sh', 'shtml',
+ 'tar', 'tgz', 'thb', 'txt', 'xcf', 'xmp', 'Z', 'zip' );
+my $nondir_re = '\.(' . join("|", @nondir_extensions) . ')$';
+
+
+# JPEG, GIF, and PNG files that are are smaller than this are rejected:
+# this is so that you can use an image directory that contains both big
+# images and thumbnails, and have it only select the big versions.
+#
+my $min_image_width = 255;
+my $min_image_height = 255;
+
+my @all_files = (); # list of "good" files we've collected
+my %seen_inodes; # for breaking recursive symlink loops
+
+# For diagnostic messages:
+#
+my $dir_count = 1; # number of directories seen
+my $stat_count = 0; # number of files/dirs stat'ed
+my $skip_count_unstat = 0; # number of files skipped without stat'ing
+my $skip_count_stat = 0; # number of files skipped after stat
+
+sub find_all_files($);
+sub find_all_files($) {
+ my ($dir) = @_;
+
+ print STDERR "$progname: + reading dir $dir/...\n" if ($verbose > 1);
+
+ my $dd;
+ if (! opendir ($dd, $dir)) {
+ print STDERR "$progname: couldn't open $dir: $!\n" if ($verbose);
+ return;
+ }
+ my @files = readdir ($dd);
+ closedir ($dd);
+
+ my @dirs = ();
+
+ foreach my $file (@files) {
+ next if ($file =~ m/^\./); # silently ignore dot files/dirs
+
+ if ($file =~ m/[~%\#]$/) { # ignore backup files (and dirs...)
+ $skip_count_unstat++;
+ print STDERR "$progname: - skip file $file\n" if ($verbose > 1);
+ }
+
+ $file = "$dir/$file";
+
+ if ($file =~ m/$good_file_re/io) {
+ #
+ # Assume that files ending in .jpg exist and are not directories.
+ #
+ push @all_files, $file;
+ print STDERR "$progname: - found file $file\n" if ($verbose > 1);
+
+ } elsif ($file =~ m/$nondir_re/io) {
+ #
+ # Assume that files ending in .html are not directories.
+ #
+ $skip_count_unstat++;
+ print STDERR "$progname: -- skip file $file\n" if ($verbose > 1);
+
+ } else {
+ #
+ # Now we need to stat the file to see if it's a subdirectory.
+ #
+ # Note: we could use the trick of checking "nlinks" on the parent
+ # directory to see if this directory contains any subdirectories,
+ # but that would exclude any symlinks to directories.
+ #
+ my @st = stat($file);
+ my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
+ $atime,$mtime,$ctime,$blksize,$blocks) = @st;
+
+ $stat_count++;
+
+ if ($#st == -1) {
+ if ($verbose) {
+ my $ll = readlink $file;
+ if (defined ($ll)) {
+ print STDERR "$progname: + dangling symlink: $file -> $ll\n";
+ } else {
+ print STDERR "$progname: + unreadable: $file\n";
+ }
+ }
+ next;
+ }
+
+ next if ($seen_inodes{"$dev:$ino"}); # break symlink loops
+ $seen_inodes{"$dev:$ino"} = 1;
+
+ if (S_ISDIR($mode)) {
+ push @dirs, $file;
+ $dir_count++;
+ print STDERR "$progname: + found dir $file\n" if ($verbose > 1);
+
+ } else {
+ $skip_count_stat++;
+ print STDERR "$progname: + skip file $file\n" if ($verbose > 1);
+ }
+ }
+ }
+
+ foreach (@dirs) {
+ find_all_files ($_);
+ }
+}
+
+
+sub spotlight_all_files($) {
+ my ($dir) = @_;
+
+ my @terms = ();
+ # "public.image" matches all (indexed) images, including Photoshop, etc.
+# push @terms, "kMDItemContentTypeTree == 'public.image'";
+ foreach (@good_extensions) {
+
+ # kMDItemFSName hits the file system every time: much worse than "find".
+# push @terms, "kMDItemFSName == '*.$_'";
+
+ # kMDItemDisplayName matches against the name in the Spotlight index,
+ # but won't find files that (for whatever reason) didn't get indexed.
+ push @terms, "kMDItemDisplayName == '*.$_'";
+ }
+
+ $dir =~ s@([^-_/a-z\d.,])@\\$1@gsi; # quote for sh
+ my $cmd = "mdfind -onlyin $dir \"" . join (' || ', @terms) . "\"";
+
+ print STDERR "$progname: executing: $cmd\n" if ($verbose > 1);
+ @all_files = split (/[\r\n]+/, `$cmd`);
+}
+
+
+# If we're using cacheing, read the cache file and return its contents,
+# if any. This also holds an exclusive lock on the cache file, which
+# has the additional benefit that if two copies of this program are
+# running at once, one will wait for the other, instead of both of
+# them spanking the same file system at the same time.
+#
+my $cache_fd = undef;
+my $cache_file_name = undef;
+my $read_cache_p = 0;
+
+sub read_cache($) {
+ my ($dir) = @_;
+
+ return () unless ($cache_p);
+
+ my $dd = "$ENV{HOME}/Library/Caches"; # MacOS location
+ if (-d $dd) {
+ $cache_file_name = "$dd/org.jwz.xscreensaver.getimage.cache";
+ } elsif (-d "$ENV{HOME}/tmp") {
+ $cache_file_name = "$ENV{HOME}/tmp/.xscreensaver-getimage.cache";
+ } else {
+ $cache_file_name = "$ENV{HOME}/.xscreensaver-getimage.cache";
+ }
+
+ print STDERR "$progname: awaiting lock: $cache_file_name\n"
+ if ($verbose > 1);
+
+ my $file = $cache_file_name;
+ open ($cache_fd, '+>>', $file) || error ("unable to write $file: $!");
+ flock ($cache_fd, LOCK_EX) || error ("unable to lock $file: $!");
+ seek ($cache_fd, 0, 0) || error ("unable to rewind $file: $!");
+
+ my $mtime = (stat($cache_fd))[9];
+
+ if ($mtime + $cache_max_age < time) {
+ print STDERR "$progname: cache is too old\n" if ($verbose);
+ return ();
+ }
+
+ my $odir = <$cache_fd>;
+ $odir =~ s/[\r\n]+$//s if defined ($odir);
+ if (!defined ($odir) || ($dir ne $odir)) {
+ print STDERR "$progname: cache is for $odir, not $dir\n"
+ if ($verbose && $odir);
+ return ();
+ }
+
+ my @files = ();
+ while (<$cache_fd>) {
+ s/[\r\n]+$//s;
+ push @files, "$odir/$_";
+ }
+
+ print STDERR "$progname: " . ($#files+1) . " files in cache\n"
+ if ($verbose);
+
+ $read_cache_p = 1;
+ return @files;
+}
+
+
+sub write_cache($) {
+ my ($dir) = @_;
+
+ return unless ($cache_p);
+
+ # If we read the cache, just close it without rewriting it.
+ # If we didn't read it, then write it now.
+
+ if (! $read_cache_p) {
+
+ truncate ($cache_fd, 0) ||
+ error ("unable to truncate $cache_file_name: $!");
+ seek ($cache_fd, 0, 0) ||
+ error ("unable to rewind $cache_file_name: $!");
+
+ if ($#all_files >= 0) {
+ print $cache_fd "$dir\n";
+ foreach (@all_files) {
+ my $f = $_; # stupid Perl. do this to avoid modifying @all_files!
+ $f =~ s@^\Q$dir\L/@@so || die; # remove $dir from front
+ print $cache_fd "$f\n";
+ }
+ }
+
+ print STDERR "$progname: cached " . ($#all_files+1) . " files\n"
+ if ($verbose);
+ }
+
+ flock ($cache_fd, LOCK_UN) ||
+ error ("unable to unlock $cache_file_name: $!");
+ close ($cache_fd);
+ $cache_fd = undef;
+}
+
+
+sub find_random_file($) {
+ my ($dir) = @_;
+
+ if ($use_spotlight_p == -1) {
+ $use_spotlight_p = 0;
+ if (-x '/usr/bin/mdfind') {
+ $use_spotlight_p = 1;
+ }
+ }
+
+ @all_files = read_cache ($dir);
+
+ if ($#all_files >= 0) {
+ # got it from the cache...
+
+ } elsif ($use_spotlight_p) {
+ print STDERR "$progname: spotlighting $dir...\n" if ($verbose);
+ spotlight_all_files ($dir);
+ print STDERR "$progname: found " . ($#all_files+1) .
+ " file" . ($#all_files == 0 ? "" : "s") .
+ " via Spotlight\n"
+ if ($verbose);
+ } else {
+ print STDERR "$progname: recursively reading $dir...\n" if ($verbose);
+ find_all_files ($dir);
+ print STDERR "$progname: " .
+ "f=" . ($#all_files+1) . "; " .
+ "d=$dir_count; " .
+ "s=$stat_count; " .
+ "skip=${skip_count_unstat}+$skip_count_stat=" .
+ ($skip_count_unstat + $skip_count_stat) .
+ ".\n"
+ if ($verbose);
+ }
+
+ write_cache ($dir);
+
+# @all_files = sort(@all_files);
+
+ if ($#all_files < 0) {
+ print STDERR "$progname: no files in $dir\n";
+ exit 1;
+ }
+
+ my $max_tries = 50;
+ for (my $i = 0; $i < $max_tries; $i++) {
+
+ my $n = int (rand ($#all_files + 1));
+ my $file = $all_files[$n];
+ if (large_enough_p ($file)) {
+ $file =~ s@^\Q$dir\L/@@so || die; # remove $dir from front
+ return $file;
+ }
+ }
+
+ print STDERR "$progname: no suitable images in $dir " .
+ "(after $max_tries tries)\n";
+ exit 1;
+}
+
+
+sub large_enough_p($) {
+ my ($file) = @_;
+
+ my ($w, $h) = image_file_size ($file);
+
+ if (!defined ($h)) {
+ print STDERR "$progname: $file: unable to determine image size\n"
+ if ($verbose);
+ # Assume that unknown files are of good sizes: this will happen if
+ # they matched $good_file_re, but we don't have code to parse them.
+ # (This will also happen if the file is junk...)
+ return 1;
+ }
+
+ if ($w < $min_image_width || $h < $min_image_height) {
+ print STDERR "$progname: $file: too small ($w x $h)\n" if ($verbose);
+ return 0;
+ }
+
+ print STDERR "$progname: $file: $w x $h\n" if ($verbose);
+ return 1;
+}
+
+
+
+# Given the raw body of a GIF document, returns the dimensions of the image.
+#
+sub gif_size($) {
+ my ($body) = @_;
+ my $type = substr($body, 0, 6);
+ my $s;
+ return () unless ($type =~ /GIF8[7,9]a/);
+ $s = substr ($body, 6, 10);
+ my ($a,$b,$c,$d) = unpack ("C"x4, $s);
+ return (($b<<8|$a), ($d<<8|$c));
+}
+
+# Given the raw body of a JPEG document, returns the dimensions of the image.
+#
+sub jpeg_size($) {
+ my ($body) = @_;
+ my $i = 0;
+ my $L = length($body);
+
+ my $c1 = substr($body, $i, 1); $i++;
+ my $c2 = substr($body, $i, 1); $i++;
+ return () unless (ord($c1) == 0xFF && ord($c2) == 0xD8);
+
+ my $ch = "0";
+ while (ord($ch) != 0xDA && $i < $L) {
+ # Find next marker, beginning with 0xFF.
+ while (ord($ch) != 0xFF) {
+ return () if (length($body) <= $i);
+ $ch = substr($body, $i, 1); $i++;
+ }
+ # markers can be padded with any number of 0xFF.
+ while (ord($ch) == 0xFF) {
+ return () if (length($body) <= $i);
+ $ch = substr($body, $i, 1); $i++;
+ }
+
+ # $ch contains the value of the marker.
+ my $marker = ord($ch);
+
+ if (($marker >= 0xC0) &&
+ ($marker <= 0xCF) &&
+ ($marker != 0xC4) &&
+ ($marker != 0xCC)) { # it's a SOFn marker
+ $i += 3;
+ return () if (length($body) <= $i);
+ my $s = substr($body, $i, 4); $i += 4;
+ my ($a,$b,$c,$d) = unpack("C"x4, $s);
+ return (($c<<8|$d), ($a<<8|$b));
+
+ } else {
+ # We must skip variables, since FFs in variable names aren't
+ # valid JPEG markers.
+ return () if (length($body) <= $i);
+ my $s = substr($body, $i, 2); $i += 2;
+ my ($c1, $c2) = unpack ("C"x2, $s);
+ my $length = ($c1 << 8) | $c2;
+ return () if ($length < 2);
+ $i += $length-2;
+ }
+ }
+ return ();
+}
+
+# Given the raw body of a PNG document, returns the dimensions of the image.
+#
+sub png_size($) {
+ my ($body) = @_;
+ return () unless ($body =~ m/^\211PNG\r/s);
+ my ($bits) = ($body =~ m/^.{12}(.{12})/s);
+ return () unless defined ($bits);
+ return () unless ($bits =~ /^IHDR/);
+ my ($ign, $w, $h) = unpack("a4N2", $bits);
+ return ($w, $h);
+}
+
+
+# Given the raw body of a GIF, JPEG, or PNG document, returns the dimensions
+# of the image.
+#
+sub image_size($) {
+ my ($body) = @_;
+ return () if (length($body) < 10);
+ my ($w, $h) = gif_size ($body);
+ if ($w && $h) { return ($w, $h); }
+ ($w, $h) = jpeg_size ($body);
+ if ($w && $h) { return ($w, $h); }
+ # #### TODO: need image parsers for TIFF, XPM, XBM.
+ return png_size ($body);
+}
+
+# Returns the dimensions of the image file.
+#
+sub image_file_size($) {
+ my ($file) = @_;
+ my $in;
+ if (! open ($in, '<', $file)) {
+ print STDERR "$progname: $file: $!\n" if ($verbose);
+ return undef;
+ }
+ binmode ($in); # Larry can take Unicode and shove it up his ass sideways.
+ my $body = '';
+ sysread ($in, $body, 1024 * 50); # The first 50k should be enough.
+ close $in; # (It's not for certain huge jpegs...
+ return image_size ($body); # but we know they're huge!)
+}
+
+
+sub error($) {
+ my ($err) = @_;
+ print STDERR "$progname: $err\n";
+ exit 1;
+}
+
+sub usage() {
+ print STDERR "usage: $progname [--verbose] directory\n" .
+ " Prints the name of a randomly-selected image file. The directory\n" .
+ " is searched recursively. Images smaller than " .
+ "${min_image_width}x${min_image_height} are excluded.\n";
+ exit 1;
+}
+
+sub main() {
+ my $dir = undef;
+
+ while ($_ = $ARGV[0]) {
+ shift @ARGV;
+ if ($_ eq "--verbose") { $verbose++; }
+ elsif (m/^-v+$/) { $verbose += length($_)-1; }
+ elsif ($_ eq "--name") { } # ignored, for compatibility
+ elsif ($_ eq "--spotlight") { $use_spotlight_p = 1; }
+ elsif ($_ eq "--no-spotlight") { $use_spotlight_p = 0; }
+ elsif ($_ eq "--cache") { $cache_p = 1; }
+ elsif ($_ eq "--no-cache") { $cache_p = 0; }
+ elsif (m/^-./) { usage; }
+ elsif (!defined($dir)) { $dir = $_; }
+ else { usage; }
+ }
+
+ usage unless (defined($dir));
+
+ $dir =~ s@^~/@$ENV{HOME}/@s; # allow literal "~/"
+ $dir =~ s@/+$@@s; # omit trailing /
+
+ if (! -d $dir) {
+ print STDERR "$progname: $dir: not a directory\n";
+ usage;
+ }
+
+ my $file = find_random_file ($dir);
+ print STDOUT "$file\n";
+}
+
+main;
+exit 0;
diff --git a/patches/source/xscreensaver/xscreensaver.SlackBuild b/patches/source/xscreensaver/xscreensaver.SlackBuild
new file mode 100755
index 000000000..d2e14c466
--- /dev/null
+++ b/patches/source/xscreensaver/xscreensaver.SlackBuild
@@ -0,0 +1,141 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2012, 2013, 2014, 2016 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+VERSION=${VERSION:-$(echo xscreensaver-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-xscreensaver
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf xscreensaver-$VERSION
+tar xvf $CWD/xscreensaver-$VERSION.tar.?z* || exit 1
+cd xscreensaver-$VERSION
+
+# Allow xscreensaver to work setgid shadow. I'd rather avoid requiring
+# setuid root on this if at all possible...
+zcat $CWD/xscreensaver.setuid.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+
+# Add support for the electricsheep distributed screensaver:
+zcat $CWD/xscreensaver.electricsheep.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+
+# Remove a feature that pops up a nag screen claiming the version is old
+# after one year. Just don't send in bug reports on an old version, OK folks?
+# I hate to swim against upstream, but with all respect this feature is not
+# helpful to distributions.
+zcat $CWD/xscreensaver.no.expiration.date.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+xml_config=/usr/bin/xml-config xml2_config=/usr/bin/xml2-config \
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --with-x-app-defaults=/etc/X11/app-defaults \
+ --with-text-file=/usr/doc/netdate/COPYRIGHT \
+ --with-shadow \
+ --with-jpeg \
+ --with-gl \
+ --build=$ARCH-slackware-linux || exit 1
+
+# Build:
+make $NUMJOBS || make || exit 1
+make install_prefix=$PKG install-strip || exit 1
+
+# Needed for password unlock:
+chown root:shadow $PKG/usr/bin/xscreensaver
+chmod 2751 $PKG/usr/bin/xscreensaver
+
+# This is needed for the menus:
+mkdir -p $PKG/usr/share/pixmaps
+mkdir -p $PKG/etc
+mkdir -p $PKG/usr/doc/xscreensaver-$VERSION
+cp -a \
+ README* \
+ $PKG/usr/doc/xscreensaver-$VERSION
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1 | grep -v '\.gz$') ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# Insert an older version of xscreensaver-getimage-file to avoid depending
+# on libwww-perl. Maybe we'll eventually add this, but bundling 14 perl
+# modules is a lot of maintainance just to get slidescreen working again.
+# This restores the functionality that we had before without all that.
+cat $CWD/xscreensaver-getimage-file-5.14 > $PKG/usr/bin/xscreensaver-getimage-file
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/xscreensaver-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/xscreensaver/xscreensaver.electricsheep.diff b/patches/source/xscreensaver/xscreensaver.electricsheep.diff
new file mode 100644
index 000000000..27b11961c
--- /dev/null
+++ b/patches/source/xscreensaver/xscreensaver.electricsheep.diff
@@ -0,0 +1,20 @@
+--- ./driver/XScreenSaver_ad.h.orig 2008-12-28 01:59:19.000000000 -0600
++++ ./driver/XScreenSaver_ad.h 2009-05-15 16:22:44.000000000 -0500
+@@ -138,6 +138,7 @@
+ squiral -root \\n\
+ wander -root \\n\
+ - webcollage -root \\n\
++ electricsheep --root 1 \\n\
+ xflame -root \\n\
+ xmatrix -root \\n\
+ GL: gflux -root \\n\
+--- ./driver/XScreenSaver.ad.in.orig 2008-12-28 01:33:15.000000000 -0600
++++ ./driver/XScreenSaver.ad.in 2009-05-15 16:22:04.000000000 -0500
+@@ -239,6 +239,7 @@
+ squiral -root \n\
+ wander -root \n\
+ - webcollage -root \n\
++ electricsheep --root 1 \n\
+ xflame -root \n\
+ xmatrix -root \n\
+ @GL_KLUDGE@ GL: gflux -root \n\
diff --git a/patches/source/xscreensaver/xscreensaver.no.expiration.date.diff b/patches/source/xscreensaver/xscreensaver.no.expiration.date.diff
new file mode 100644
index 000000000..bdbcbe1d1
--- /dev/null
+++ b/patches/source/xscreensaver/xscreensaver.no.expiration.date.diff
@@ -0,0 +1,29 @@
+--- ./driver/prefs.c.orig 2016-05-23 22:08:27.000000000 -0500
++++ ./driver/prefs.c 2016-05-30 15:29:36.446721679 -0500
+@@ -1734,6 +1734,17 @@
+ shipping the last version with the old license and then never
+ upgrading it again -- which would be the worst possible outcome for
+ everyone involved, most especially the users.
++
++ ---
++
++ NOTE: This feature is disabled by Slackware... we do not ship multi-year
++ old versions, nor do we think it is a good idea to include nag screens
++ that activate when an expiration date is reached. In this case, the
++ nag screen was activated after only one year, which practically insures
++ that this will be seen before the next stable Slackware release.
++ If there's a problem that needs fixing, we'll issue a fix.
++ No nag screens please. Thanks for possibly reconsidering this!
++
+ */
+
+ time_t now = time ((time_t *) 0); /* */
+@@ -1766,5 +1777,7 @@
+ months = ((((tm->tm_year + 1900) * 12) + tm->tm_mon) - /* h */
+ (y * 12 + m)); /* p */
+ /* . */
+- return (months >= 17); /* */
++ /* Disable date checking for Slackware: */ /* \ö/ */
++ /* return (months >= 17); */ /* */
++ return ( 0 );
+ }
diff --git a/patches/source/xscreensaver/xscreensaver.setuid.diff b/patches/source/xscreensaver/xscreensaver.setuid.diff
new file mode 100644
index 000000000..c6810af55
--- /dev/null
+++ b/patches/source/xscreensaver/xscreensaver.setuid.diff
@@ -0,0 +1,179 @@
+--- ./driver/setuid.c.orig 2006-02-08 20:28:38.000000000 -0600
++++ ./driver/setuid.c 2006-04-04 16:48:08.000000000 -0500
+@@ -1,5 +1,5 @@
+ /* setuid.c --- management of runtime privileges.
+- * xscreensaver, Copyright (c) 1993-1998, 2005 Jamie Zawinski <jwz@jwz.org>
++ * xscreensaver, Copyright (c) 1993-1998 Jamie Zawinski <jwz@jwz.org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+@@ -41,7 +41,7 @@
+ struct group *g = 0;
+ p = getpwuid (uid);
+ g = getgrgid (gid);
+- sprintf (buf, "%.100s/%.100s (%ld/%ld)",
++ sprintf (buf, "%s/%s (%ld/%ld)",
+ (p && p->pw_name ? p->pw_name : "???"),
+ (g && g->gr_name ? g->gr_name : "???"),
+ (long) uid, (long) gid);
+@@ -74,50 +74,11 @@
+ }
+
+
+-/* Returns true if we need to call setgroups().
+-
+- Without calling setgroups(), the process will retain any supplementary
+- gids associated with the uid, e.g.:
+-
+- % groups root
+- root : root bin daemon sys adm disk wheel
+-
+- However, setgroups() can only be called by root, and returns EPERM
+- for other users even if the call would be a no-op (e.g., setting the
+- group list to the current list.) So, to avoid that spurious error,
+- before calling setgroups() we first check whether the current list
+- of groups contains only one element, our target group. If so, we
+- don't need to call setgroups().
+- */
+-static int
+-setgroups_needed_p (uid_t target_group)
+-{
+- gid_t groups[1024];
+- int n, size;
+- size = sizeof(groups) / sizeof(gid_t);
+- n = getgroups (size - 1, groups);
+- if (n < 0)
+- {
+- char buf [1024];
+- sprintf (buf, "%s: getgroups(%ld, ...)", blurb(), (long int)(size - 1));
+- perror (buf);
+- return 1;
+- }
+- else if (n == 0) /* an empty list means only egid is in effect. */
+- return 0;
+- else if (n == 1 && groups[0] == target_group) /* one element, the target */
+- return 0;
+- else /* more than one, or the wrong one. */
+- return 1;
+-}
+-
+-
+ static int
+ set_ids_by_number (uid_t uid, gid_t gid, char **message_ret)
+ {
+ int uid_errno = 0;
+ int gid_errno = 0;
+- int sgs_errno = 0;
+ struct passwd *p = getpwuid (uid);
+ struct group *g = getgrgid (gid);
+
+@@ -136,11 +97,6 @@
+ if (uid == (uid_t) -1) uid = (uid_t) -2;
+
+ errno = 0;
+- if (setgroups_needed_p (gid) &&
+- setgroups (1, &gid) < 0)
+- sgs_errno = errno ? errno : -1;
+-
+- errno = 0;
+ if (setgid (gid) != 0)
+ gid_errno = errno ? errno : -1;
+
+@@ -148,10 +104,10 @@
+ if (setuid (uid) != 0)
+ uid_errno = errno ? errno : -1;
+
+- if (uid_errno == 0 && gid_errno == 0 && sgs_errno == 0)
++ if (uid_errno == 0 && gid_errno == 0)
+ {
+ static char buf [1024];
+- sprintf (buf, "changed uid/gid to %.100s/%.100s (%ld/%ld).",
++ sprintf (buf, "changed uid/gid to %s/%s (%ld/%ld).",
+ (p && p->pw_name ? p->pw_name : "???"),
+ (g && g->gr_name ? g->gr_name : "???"),
+ (long) uid, (long) gid);
+@@ -162,71 +118,28 @@
+ else
+ {
+ char buf [1024];
+- gid_t groups[1024];
+- int n, size;
+-
+- if (sgs_errno)
+- {
+- sprintf (buf, "%s: couldn't setgroups to %.100s (%ld)",
+- blurb(),
+- (g && g->gr_name ? g->gr_name : "???"),
+- (long) gid);
+- if (sgs_errno == -1)
+- fprintf(stderr, "%s: unknown error\n", buf);
+- else
+- {
+- errno = sgs_errno;
+- perror(buf);
+- }
+-
+- fprintf (stderr, "%s: effective group list: ", blurb());
+- size = sizeof(groups) / sizeof(gid_t);
+- n = getgroups (size - 1, groups);
+- if (n < 0)
+- fprintf (stderr, "unknown!\n");
+- else
+- {
+- int i;
+- fprintf (stderr, "[");
+- for (i = 0; i < n; i++)
+- {
+- g = getgrgid (groups[i]);
+- if (i > 0) fprintf (stderr, ", ");
+- if (g && g->gr_name) fprintf (stderr, "%s", g->gr_name);
+- else fprintf (stderr, "%ld", (long) groups[i]);
+- }
+- fprintf (stderr, "]\n");
+- }
+- }
+-
+ if (gid_errno)
+ {
+- sprintf (buf, "%s: couldn't set gid to %.100s (%ld)",
++ sprintf (buf, "%s: couldn't set gid to %s (%ld)",
+ blurb(),
+ (g && g->gr_name ? g->gr_name : "???"),
+ (long) gid);
+ if (gid_errno == -1)
+ fprintf(stderr, "%s: unknown error\n", buf);
+ else
+- {
+- errno = gid_errno;
+- perror(buf);
+- }
++ perror(buf);
+ }
+
+ if (uid_errno)
+ {
+- sprintf (buf, "%s: couldn't set uid to %.100s (%ld)",
++ sprintf (buf, "%s: couldn't set uid to %s (%ld)",
+ blurb(),
+ (p && p->pw_name ? p->pw_name : "???"),
+ (long) uid);
+ if (uid_errno == -1)
+ fprintf(stderr, "%s: unknown error\n", buf);
+ else
+- {
+- errno = uid_errno;
+- perror(buf);
+- }
++ perror(buf);
+ }
+
+ return -1;
+@@ -350,7 +263,7 @@
+ !strcmp (p->pw_name, "games"))
+ {
+ static char buf [1024];
+- sprintf (buf, "running as %.100s",
++ sprintf (buf, "running as %s",
+ (p && p->pw_name && *p->pw_name
+ ? p->pw_name : "<unknown>"));
+ si->nolock_reason = buf;
diff --git a/patches/source/yptools/nsswitch.conf-nis b/patches/source/yptools/nsswitch.conf-nis
new file mode 100644
index 000000000..8f0805f00
--- /dev/null
+++ b/patches/source/yptools/nsswitch.conf-nis
@@ -0,0 +1,45 @@
+#
+# /etc/nsswitch.conf
+#
+# This is an example Name Service Switch config file with NIS+ and NIS
+# enabled. If you use these services, you can simply copy this file to
+# /etc/nsswitch.conf instead of doing a lot of editing.
+#
+# This file should be sorted with the most-used services at the beginning.
+#
+# The entry '[NOTFOUND=return]' means that the search for an
+# entry should stop if the search in the previous entry turned
+# up nothing. Note that if the search failed due to some other reason
+# (like no NIS server responding) then the search continues with the
+# next entry.
+#
+# Legal entries are:
+#
+# nisplus or nis+ Use NIS+ (NIS version 3)
+# nis or yp Use NIS (NIS version 2), also called YP
+# dns Use DNS (Domain Name Service)
+# files Use the local files
+# [NOTFOUND=return] Stop searching if not found so far
+#
+
+passwd: files nisplus nis
+shadow: files nisplus nis
+group: files nisplus nis
+
+hosts: files nisplus nis dns
+
+services: nisplus [NOTFOUND=return] files
+networks: nisplus [NOTFOUND=return] files
+protocols: nisplus [NOTFOUND=return] files
+rpc: nisplus [NOTFOUND=return] files
+ethers: nisplus [NOTFOUND=return] files
+netmasks: nisplus [NOTFOUND=return] files
+bootparams: nisplus [NOTFOUND=return] files
+
+netgroup: nisplus
+
+publickey: nisplus
+
+automount: files nisplus
+aliases: files nisplus
+
diff --git a/patches/source/yptools/rc.yp b/patches/source/yptools/rc.yp
new file mode 100644
index 000000000..eda9634e4
--- /dev/null
+++ b/patches/source/yptools/rc.yp
@@ -0,0 +1,123 @@
+#!/bin/sh
+# /etc/rc.d/rc.yp
+#
+# Start NIS (Network Information Service). NIS provides network-wide
+# distribution of hostname, username, and other information databases.
+# After configuring NIS, you will need to uncomment the parts of this
+# script that you want to run.
+#
+# NOTE: for detailed information about setting up NIS, see the
+# documentation in /usr/doc/yp-tools, /usr/doc/ypbind,
+# /usr/doc/ypserv, and /usr/doc/Linux-HOWTOs/NIS-HOWTO.
+
+# Set non-zero to enable yp client functions
+YP_CLIENT_ENABLE=1
+
+# Set non-zero to enable yp server functions
+YP_SERVER_ENABLE=0
+
+# If YP_SERVER_ENABLE is set, a non-zero YP_XFRD_ENABLE setting will
+# enable ypxfrd.
+YP_XFRD_ENABLE=0
+
+PID_PATH=/var/run
+
+yp_start() {
+
+ if [ $YP_SERVER_ENABLE -ne 0 ]; then
+ # NIS SERVER CONFIGURATION:
+ # If you are the master server for the NIS domain, you must run ypserv to
+ # service clients on the domain.
+ if [ -x /usr/sbin/ypserv ]; then
+ echo "Starting NIS server: /usr/sbin/ypserv"
+ /usr/sbin/ypserv
+ fi
+
+ # If you are the master server for the NIS domain, you must also run
+ # rpc.yppasswdd, which is the RPC server that lets users change their
+ # passwords. You might also want users to be able to change their shell
+ # and GECOS information, in which case you should comment out the first
+ # yppasswdd line and uncomment out the second one.
+
+ if [ -x /usr/sbin/rpc.yppasswdd ]; then
+ echo "Starting NIS master password server: /usr/sbin/rpc.yppasswdd"
+ /usr/sbin/rpc.yppasswdd
+ # echo "Starting NIS master password server: /usr/sbin/rpc.yppasswdd -e chsh -e chfn"
+ # /usr/sbin/rpc.yppasswdd -e chsh -e chfn
+ fi
+
+ # If you have NIS slave servers, you might also want to start up
+ # rpc.ypxfrd, which transfers changes in the NIS domain to slave servers.
+ # Alternatively, rpc.ypxfrd can be run out of inetd.
+ if [ $YP_XFRD_ENABLE -ne 0 ]; then
+ if [ -x /usr/sbin/rpc.ypxfrd ]; then
+ echo "Starting NIS transfer server: /usr/sbin/rpc.ypxfrd"
+ /usr/sbin/rpc.ypxfrd
+ fi
+ fi
+ fi
+
+ if [ $YP_CLIENT_ENABLE -ne 0 ]; then
+ # NIS CLIENT CONFIGURATION:
+ # If you are a NIS client, all you need to do is run ypbind, which will
+ # broadcast across the network to find a server. Your NIS server might
+ # also be a client.
+ if [ -d /var/yp ]; then
+ echo "Starting NIS services: /usr/sbin/ypbind -broadcast"
+ /usr/sbin/ypbind -broadcast
+ fi
+ fi
+}
+
+yp_stop() {
+ if [ -r ${PID_PATH}/ypbind.pid ]; then
+ echo "Stopping NIS services."
+ kill $(cat ${PID_PATH}/ypbind.pid)
+ fi
+
+ if [ -r ${PID_PATH}/ypxfrd.pid ]; then
+ echo "Stopping NIS transfer server."
+ kill $(cat ${PID_PATH}/ypxfrd.pid)
+ fi
+
+ if [ -r ${PID_PATH}/yppasswdd.pid ]; then
+ echo "Stopping NIS master password server."
+ kill $(cat ${PID_PATH}/yppasswdd.pid)
+ fi
+
+ if [ -r ${PID_PATH}/ypserv.pid ]; then
+ echo "Stopping NIS server."
+ kill $(cat ${PID_PATH}/ypserv.pid)
+ fi
+}
+
+# First, we must setup the NIS domainname. NOTE: this is not necessarily
+# the same as your DNS domainname, set in /etc/resolv.conf. The NIS
+# domainname is the name of a domain served by your NIS server.
+#
+# If /etc/defaultdomain has not been configured we'll bail out.
+if [ -r /etc/defaultdomain -a -x /bin/nisdomainname ]; then
+ if [ "$(nisdomainname)" == "(none)" ]; then
+ nisdomainname `cat /etc/defaultdomain`
+ fi
+else
+ echo "/etc/rc.d/rc.yp: NIS not configured. Hint: set up /etc/defaultdomain."
+ exit 0
+fi
+
+case "$1" in
+'start')
+ yp_start
+ ;;
+'stop')
+ yp_stop
+ ;;
+'restart')
+ yp_stop
+ yp_start
+ ;;
+*)
+ echo "usage $0 start|stop|restart"
+esac
+
+# # Done setting up NIS.
diff --git a/patches/source/yptools/slack-desc b/patches/source/yptools/slack-desc
new file mode 100644
index 000000000..bedfb39e6
--- /dev/null
+++ b/patches/source/yptools/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+yptools: yptools (NIS servers and clients)
+yptools:
+yptools: NIS stands for Network Information Service. NIS is usually used to
+yptools: provide /etc/passwd and /etc/group information throughout the network.
+yptools: Most Sun-based networks run NIS, and Linux machines can take full
+yptools: advantage of existing NIS service or provide NIS service themselves.
+yptools:
+yptools:
+yptools:
+yptools:
+yptools:
diff --git a/patches/source/yptools/yp-tools-2.14-glibc217-crypt.diff b/patches/source/yptools/yp-tools-2.14-glibc217-crypt.diff
new file mode 100644
index 000000000..148b06632
--- /dev/null
+++ b/patches/source/yptools/yp-tools-2.14-glibc217-crypt.diff
@@ -0,0 +1,86 @@
+Starting with glibc 2.17 (eglibc 2.17), crypt() fails with EINVAL
+(w/ NULL return) if the salt violates specifications. Additionally,
+on FIPS-140 enabled Linux systems, DES/MD5-encrypted passwords
+passed to crypt() fail with EPERM (w/ NULL return).
+
+If using glibc's crypt(), check return value to avoid a possible
+NULL pointer dereference.
+
+Author: mancha
+
+====
+
+--- yp-tools-2.14/src/yppasswd.c.orig 2010-04-21
++++ yp-tools-2.14/src/yppasswd.c 2013-05-22
+@@ -423,6 +423,7 @@ static int /* return values: 0 = not ok,
+ verifypassword (struct passwd *pwd, char *pwdstr, uid_t uid)
+ {
+ char *p, *q;
++ char *crypted_pass;
+ int ucase, lcase, other, r;
+ int passwdlen;
+
+@@ -448,12 +449,19 @@ verifypassword (struct passwd *pwd, char
+ }
+
+ passwdlen = get_passwd_len (pwd->pw_passwd);
+- if (pwd->pw_passwd[0]
+- && !strncmp (pwd->pw_passwd, crypt (pwdstr, pwd->pw_passwd), passwdlen)
+- && uid)
++ if (pwd->pw_passwd[0] && uid)
+ {
+- fputs (_("You cannot reuse the old password.\n"), stderr);
+- return 0;
++ crypted_pass = crypt (pwdstr, pwd->pw_passwd);
++ if (crypted_pass == NULL)
++ {
++ fputs (_("crypt() call failed.\n"), stderr);
++ return 0;
++ }
++ if (!strncmp (pwd->pw_passwd, crypted_pass, passwdlen))
++ {
++ fputs (_("You cannot reuse the old password.\n"), stderr);
++ return 0;
++ }
+ }
+
+ r = 0;
+@@ -517,6 +525,7 @@ int
+ main (int argc, char **argv)
+ {
+ char *s, *progname, *domainname = NULL, *user = NULL, *master = NULL;
++ char *crypted_pass;
+ int f_flag = 0, l_flag = 0, p_flag = 0, error, status;
+ int hash_id = DES;
+ char rounds[11] = "\0"; /* max length is '999999999$' */
+@@ -738,7 +747,13 @@ main (int argc, char **argv)
+ char *sane_passwd = alloca (passwdlen + 1);
+ strncpy (sane_passwd, pwd->pw_passwd, passwdlen);
+ sane_passwd[passwdlen] = 0;
+- if (strcmp (crypt (s, sane_passwd), sane_passwd))
++ crypted_pass = crypt (s, sane_passwd);
++ if (crypted_pass == NULL)
++ {
++ fprintf (stderr, _("crypt() call failed.\n"));
++ return 1;
++ }
++ if (strcmp (crypted_pass, sane_passwd))
+ {
+ fprintf (stderr, _("Sorry.\n"));
+ return 1;
+@@ -833,7 +848,14 @@ main (int argc, char **argv)
+ break;
+ }
+
+- yppwd.newpw.pw_passwd = strdup (crypt (buf, salt));
++ crypted_pass = crypt (buf, salt);
++ if (crypted_pass == NULL)
++ {
++ printf (_("crypt() call failed - password unchanged.\n"));
++ return 1;
++ }
++
++ yppwd.newpw.pw_passwd = strdup (crypted_pass);
+ }
+
+ if (f_flag)
diff --git a/patches/source/yptools/yptools.SlackBuild b/patches/source/yptools/yptools.SlackBuild
new file mode 100755
index 000000000..1f1a74f71
--- /dev/null
+++ b/patches/source/yptools/yptools.SlackBuild
@@ -0,0 +1,292 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2014 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+# Package version number:
+VERSION=2.14
+BUILD=${BUILD:-3_slack14.1}
+
+YPTOOLS=$VERSION
+YPBINDMT=1.37.1
+#YPMAKE=0.11
+YPSERV=2.31
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-yptools
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+echo "+==============+"
+echo "| yp-tools-$YPTOOLS |"
+echo "+==============+"
+cd $TMP
+mkdir -p $PKG/etc
+# Add etc/nsswitch.conf-nis as a full NIS+ example config file:
+zcat $CWD/nsswitch.conf-nis.gz > $PKG/etc/nsswitch.conf-nis.new
+rm -rf yp-tools-$YPTOOLS
+tar xvf $CWD/yp-tools-$YPTOOLS.tar.bz2 || exit 1
+cd yp-tools-$YPTOOLS || exit 1
+zcat $CWD/yp-tools-2.14-glibc217-crypt.diff.gz | patch -p1 --verbose || exit 1
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --disable-domainname \
+ $ARCH-slackware-linux
+# Don't ask
+make clean
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --disable-domainname \
+ $ARCH-slackware-linux
+make CFLAGS="$SLKCFLAGS" || exit 1
+mkdir -p $PKG/var/yp
+cat etc/nicknames > $PKG/var/yp/nicknames.new
+mkdir -p $PKG/usr/share/locale/de/LC_MESSAGES
+cat po/de.gmo > $PKG/usr/share/locale/de/LC_MESSAGES/yp-tools.mo
+cd src
+mkdir -p $PKG/usr/bin
+cat ypcat > $PKG/usr/bin/ypcat
+cat ypmatch > $PKG/usr/bin/ypmatch
+cat yppasswd > $PKG/usr/bin/yppasswd
+cat ypwhich > $PKG/usr/bin/ypwhich
+( cd $PKG/usr/bin
+ chmod 755 ypcat ypmatch yppasswd ypwhich )
+( cd $PKG/usr/bin
+ rm -rf ypchfn ypchsh
+ ln -sf yppasswd ypchfn
+ ln -sf yppasswd ypchsh )
+mkdir -p $PKG/usr/sbin
+cat yppoll > $PKG/usr/sbin/yppoll
+cat ypset > $PKG/usr/sbin/ypset
+( cd $PKG/usr/sbin
+ chmod 755 yppoll ypset )
+cd ../man
+mkdir -p $PKG/usr/man/man{1,5,8}
+cat nicknames.5 | gzip -9c > $PKG/usr/man/man5/nicknames.5.gz
+for file in *.1 ; do
+ cat $file | gzip -9c > $PKG/usr/man/man1/$file.gz
+done
+for file in *.8 ; do
+ cat $file | gzip -9c > $PKG/usr/man/man8/$file.gz
+done
+cd ..
+mkdir -p $PKG/usr/doc/yp-tools-$YPTOOLS
+cp -a \
+ ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS TODO \
+ $PKG/usr/doc/yp-tools-$YPTOOLS
+chown -R root:root $PKG/usr/doc/yp-tools-$YPTOOLS
+chmod 644 $PKG/usr/doc/yp-tools-$YPTOOLS/*
+
+echo "+================+"
+echo "| ypbind-mt-$YPBINDMT |"
+echo "+================+"
+cd $TMP
+rm -rf ypbind-mt-$YPBINDMT
+tar xvf $CWD/ypbind-mt-$YPBINDMT.tar.bz2 || exit 1
+cd ypbind-mt-$YPBINDMT || exit 1
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ $ARCH-slackware-linux
+# Hard to believe how sloppy these tarballs are. This is why I got complaints
+# that YP didn't work but it was "fixed with a simple recompile."
+make clean
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ $ARCH-slackware-linux
+make CFLAGS="$SLKCFLAGS" || exit 1
+mkdir -p $PKG/etc
+cat etc/yp.conf > $PKG/etc/yp.conf.new
+cat src/ypbind > $PKG/usr/sbin/ypbind
+chmod 755 $PKG/usr/sbin/ypbind
+cat man/yp.conf.5 | gzip -9c > $PKG/usr/man/man5/yp.conf.5.gz
+cat man/ypbind.8 | gzip -9c > $PKG/usr/man/man8/ypbind.8.gz
+mkdir -p $PKG/usr/share/locale/de/LC_MESSAGES
+cat po/de.gmo > $PKG/usr/share/locale/de/LC_MESSAGES/ypbind-mt.mo
+mkdir -p $PKG/usr/doc/ypbind-mt-$YPBINDMT
+cp -a \
+ ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS TODO \
+ $PKG/usr/doc/ypbind-mt-$YPBINDMT
+chown root:root $PKG/usr/doc/ypbind-mt-$YPBINDMT/*
+chmod 644 $PKG/usr/doc/ypbind-mt-$YPBINDMT/*
+
+# OBSOLETE (I don't see anyone packaging this anymore... inform me if it still
+# works and you use and care about it)
+#echo "+=============+"
+#echo "| ypmake-$YPMAKE |"
+#echo "+=============+"
+#cd $TMP
+#rm -rf ypmake-$YPMAKE
+#tar xvf $CWD/ypmake-$YPMAKE.tar.bz2 || exit 1
+#cd ypmake-$YPMAKE || exit 1
+#./configure
+## I'm just not taking chances with the cleanliness of these sources anymore...
+#make clean
+#./configure
+#make
+#cat ypmake > $PKG/usr/sbin/ypmake
+#chmod 755 $PKG/usr/sbin/ypmake
+#mkdir -p $PKG/usr/lib/yp/ypmake
+#install -o root -g root -m 644 aliases arrays automount config ethers group \
+ #gshadow hosts netgroup netid networks passwd protocols publickey rpc \
+ #services shadow ypservers $PKG/usr/lib/yp/ypmake
+#cat ypmake.conf.sample > $PKG/var/yp/ypmake.conf.new
+#cat ypmake.conf.man | gzip -9c > $PKG/usr/man/man5/ypmake.conf.5.gz
+#cat ypmake.man | gzip -9c > $PKG/usr/man/man8/ypmake.8.gz
+#mkdir -p $PKG/usr/doc/ypmake-$YPMAKE
+#cp -a CHANGES README TODO $PKG/usr/doc/ypmake-$YPMAKE
+#chmod 644 $PKG/usr/doc/ypmake-$YPMAKE/*
+#chown root:root $PKG/usr/doc/ypmake-$YPMAKE/*
+
+echo "+============+"
+echo "| ypserv-$YPSERV |"
+echo "+============+"
+cd $TMP
+rm -rf ypserv-$YPSERV
+tar xvf $CWD/ypserv-$YPSERV.tar.bz2 || exit 1
+cd ypserv-$YPSERV || exit 1
+# --with-ndbm=yes
+# Support for this was discontinued upstream
+# --enable-tcp-wrapper
+./configure \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --enable-fqdn \
+ --enable-yppasswd \
+ $ARCH-slackware-linux
+make clean
+./configure \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --enable-fqdn \
+ --enable-yppasswd \
+ $ARCH-slackware-linux
+make CFLAGS="$SLKCFLAGS" || exit 1
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/yp
+( cd scripts
+ for file in create_printcap match_printcap pwupdate ypinit ypxfr_1perday ypxfr_1perhour ypxfr_2perday ; do
+ cat $file | sed -e "s#/usr/lib/#/usr/lib${LIBDIRSUFFIX}/#" > $PKG/usr/lib${LIBDIRSUFFIX}/yp/$file
+ chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/yp/$file
+ done
+ for file in pwupdate.8 ypinit.8 ; do
+ gzip -9c $file > $PKG/usr/man/man8/$file.gz
+ done )
+for FILE in makedbm mknetid revnetgroup yphelper ypxfr ; do
+ ( cd $FILE
+ cat $FILE > $PKG/usr/lib${LIBDIRSUFFIX}/yp/$FILE
+ chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/yp/$FILE
+ cat ${FILE}.8 | gzip -9c > $PKG/usr/man/man8/${FILE}.8.gz )
+done
+cat rpc.ypxfrd/ypxfrd.8 | gzip -9c > $PKG/usr/man/man8/ypxfrd.8.gz
+for FILE in ypserv rpc.yppasswdd rpc.ypxfrd yppush ; do
+ ( cd $FILE
+ cat $FILE > $PKG/usr/sbin/$FILE
+ chmod 755 $PKG/usr/sbin/$FILE
+ cat ${FILE}.8 | gzip -9c > $PKG/usr/man/man8/${FILE}.8.gz )
+done
+cat rpc.yppasswdd/yppasswdd.8 | gzip -9c > $PKG/usr/man/man8/yppasswdd.8.gz
+cat scripts/ypMakefile > $PKG/var/yp/Makefile.new
+cat etc/securenets > $PKG/var/yp/securenets.new
+echo "# This file is part of the YP server package -- see 'man netgroup'" \
+ > $PKG/etc/netgroup.new
+cat etc/netgroup >> $PKG/etc/netgroup.new
+cat etc/netgroup.5 | gzip -9c > $PKG/usr/man/man5/netgroup.5.gz
+cat etc/ypserv.conf.5 | gzip -9c > $PKG/usr/man/man5/ypserv.conf.5.gz
+mkdir -p $PKG/usr/include/rpcsvc
+cat lib/ypxfrd.x > $PKG/usr/include/rpcsvc/ypxfrd.x
+mkdir -p $PKG/usr/doc/ypserv-$YPSERV
+cp -a \
+ AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS TODO \
+ $PKG/usr/doc/ypserv-$YPSERV
+chmod 644 $PKG/usr/doc/ypserv-$YPSERV/*
+chown root:root $PKG/usr/doc/ypserv-$YPSERV/*
+
+mkdir -p $PKG/etc/rc.d
+zcat $CWD/rc.yp.gz > $PKG/etc/rc.d/rc.yp.new
+chmod 644 $PKG/etc/rc.d/rc.yp.new
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# install script and package description:
+mkdir -p $PKG/install
+cat << EOF > $PKG/install/doinst.sh
+config() {
+ NEW="\$1"
+ OLD="\`dirname \$NEW\`/\`basename \$NEW .new\`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r \$OLD ]; then
+ mv \$NEW \$OLD
+ elif [ "\`cat \$OLD | md5sum\`" = "\`cat \$NEW | md5sum\`" ]; then # toss the redundant copy
+ rm \$NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+# Keep same perms on rc.yp.new:
+if [ -e etc/rc.d/rc.yp ]; then
+ cp -a etc/rc.d/rc.yp etc/rc.d/rc.yp.new.incoming
+ cat etc/rc.d/rc.yp.new > etc/rc.d/rc.yp.new.incoming
+ mv etc/rc.d/rc.yp.new.incoming etc/rc.d/rc.yp.new
+fi
+
+config etc/nsswitch.conf-nis.new
+config etc/netgroup.new
+config etc/yp.conf.new
+config etc/rc.d/rc.yp.new
+config var/yp/nicknames.new
+config var/yp/Makefile.new
+config var/yp/securenets.new
+rm -f etc/nsswitch.conf.new etc/nsswitch.conf-nis.new etc/netgroup.new etc/yp.conf.new var/yp/nicknames.new var/yp/Makefile.new var/yp/securenets.new
+EOF
+
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/yptools-$VERSION-$ARCH-$BUILD.txz
+